/* ----------  TOKENS (light / warm beige)  ---------- */
:root{
  --bg:        #F2EEE5;   /* warm beige paper — easy on the eyes */
  --bg-soft:   #E9E3D6;   /* pill / subtle surface */
  --text:      #20201C;   /* near-black, warm — names & headings */
  --body:      #56534B;   /* readable body copy */
  --muted:     #6E6A60;   /* roles, labels */
  --faint:     #A39E91;   /* years, decorative */
  --line:      #DAD3C4;   /* hairlines / borders */
  --dash:      #C7C0B0;   /* dashed connectors */
  --ember:     #B0492F;   /* single warm accent, used sparingly */

  --serif: "Fraunces", Georgia, serif;
  --sans:  "Inter", system-ui, sans-serif;
  --mono:  "JetBrains Mono", ui-monospace, monospace;

  --measure: 720px;
}

*,*::before,*::after{ box-sizing:border-box; margin:0; padding:0; }
html{ scroll-behavior:smooth; }

body{
  background:var(--bg);
  color:var(--body);
  font-family:var(--sans);
  font-size:16px;
  line-height:1.7;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
  position:relative;
  min-height:100vh;
  overflow-x:hidden;
}

/* faint warm highlight from the top */
body::before{
  content:"";
  position:fixed; inset:0;
  background:linear-gradient(180deg, #F7F3EB 0%, rgba(247,243,235,0) 40%);
  pointer-events:none; z-index:0;
}
/* barely-there paper grain */
body::after{
  content:"";
  position:fixed; inset:0;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity:0.025; pointer-events:none; z-index:1; mix-blend-mode:multiply;
}

.wrap{
  position:relative; z-index:2;
  max-width:var(--measure);
  margin:0 auto;
  padding:clamp(2.5rem,8vw,5.5rem) 1.5rem clamp(4rem,8vw,7rem);
}

/* ----------  TOP ROW  ---------- */
.topbar{
  display:flex; justify-content:space-between; align-items:center;
  font-family:var(--mono); font-size:.72rem; letter-spacing:.14em;
  text-transform:uppercase; color:var(--muted);
  margin-bottom:clamp(4rem,12vw,7rem);
}
.status{ display:inline-flex; align-items:center; gap:.55rem; }
.dot{
  width:7px; height:7px; border-radius:50%; background:var(--ember);
  animation:pulse 3.2s ease-in-out infinite;
}
@keyframes pulse{ 0%,100%{opacity:1} 50%{opacity:.3} }
.topbar a{ color:var(--muted); text-decoration:none; transition:color .25s ease; }
.topbar a:hover{ color:var(--text); }

/* ----------  HERO  ---------- */
.hero{ margin-bottom:clamp(3.5rem,9vw,5.5rem); }
.hero h1{
  font-family:var(--serif); font-weight:400;
  font-size:clamp(3.4rem,11vw,5.6rem);
  line-height:.96; letter-spacing:-.02em;
  color:var(--text); margin-bottom:1.6rem;
}
.lead{
  font-size:clamp(1.05rem,2.6vw,1.2rem);
  color:var(--text); max-width:48ch;
  margin-bottom:1.4rem; line-height:1.55;
}
.lead .em{ color:var(--ember); font-style:italic; font-family:var(--serif); }
.bio{ max-width:56ch; }
.bio + .bio{ margin-top:1rem; }

/* ----------  SECTIONS  ---------- */
section{ margin-top:clamp(3.5rem,9vw,5rem); }
.eyebrow{
  font-family:var(--mono); font-size:.72rem; letter-spacing:.18em;
  text-transform:uppercase; color:var(--muted);
  display:flex; align-items:center; gap:1rem; margin-bottom:2rem;
}
.eyebrow::after{ content:""; flex:1; height:1px; background:var(--line); }

/* ----------  WORK / EXPERIENCE TIMELINE  ---------- */
.exp-head{
  width:100%; background:none; border:0; cursor:pointer; text-align:inherit;
  font:inherit; color:inherit;
  display:grid;
  grid-template-columns:auto minmax(28px,1fr) auto auto 20px;
  align-items:center;
  gap:0 clamp(.7rem,1.8vw,1.2rem);
  padding:1.05rem 0;
}
.exp-year{ color:var(--faint); font-size:.95rem; font-variant-numeric:tabular-nums; }
.exp-line{ display:flex; align-items:center; gap:.85rem; min-width:0; }
.exp-pill{
  background:var(--bg-soft);
  font-size:.72rem; font-weight:500; padding:.3rem .65rem;
  border-radius:999px; white-space:nowrap; line-height:1;
  animation:pill-gradient-blink 2.6s ease-in-out infinite;
}
@keyframes pill-gradient-blink{
  0%,100%{ color:var(--ember); opacity:1; }
  25%{ color:#D4843A; opacity:.9; }
  50%{ color:#C9A227; opacity:.35; }
  75%{ color:#D4843A; opacity:.9; }
}
.exp-dash{ flex:1; border-top:1px dashed var(--dash); height:0; min-width:24px; }
.exp-co{
  justify-self:end; color:var(--body);
  font-size:.98rem;
  transition:color .2s ease;
}
.exp-role{ justify-self:start; color:var(--muted); font-size:.98rem; }
.exp-chev{ justify-self:end; color:var(--faint); display:inline-flex; transition:color .2s ease; }
.exp-chev svg{ transition:transform .3s cubic-bezier(.2,.7,.3,1); }

.exp-head:hover .exp-co{ color:var(--ember); }
.exp-head:hover .exp-chev{ color:var(--ember); }
.exp-head:focus-visible{ outline:2px solid var(--ember); outline-offset:3px; border-radius:3px; }

.exp.open .exp-chev svg{ transform:rotate(180deg); }

.exp-body{ max-height:0; overflow:hidden; transition:max-height .4s cubic-bezier(.2,.7,.3,1); }
.exp.open .exp-body{ max-height:220px; }
.exp-body p{ color:var(--body); font-size:.95rem; max-width:62ch; padding:0 0 1.2rem; }

/* ----------  ELSEWHERE / LINKS  ---------- */
.links{ display:flex; flex-wrap:wrap; gap:1.75rem; }
.links a{
  color:var(--text); text-decoration:none; font-size:1rem;
  position:relative; padding-bottom:2px;
}
.links a::after{
  content:""; position:absolute; left:0; bottom:0; height:1px; width:100%;
  background:var(--ember); transform:scaleX(0); transform-origin:left;
  transition:transform .3s cubic-bezier(.2,.7,.3,1);
}
.links a:hover::after, .links a:focus-visible::after{ transform:scaleX(1); }
.links a:focus-visible{ outline:none; color:var(--ember); }

/* ----------  FOOTER  ---------- */
footer{
  margin-top:clamp(4rem,10vw,6rem);
  padding-top:1.75rem; border-top:1px solid var(--line);
  font-family:var(--mono); font-size:.72rem; letter-spacing:.1em;
  text-transform:uppercase; color:var(--muted);
  display:flex; justify-content:space-between; gap:1rem; flex-wrap:wrap;
}

/* ----------  MOTION  ---------- */
.reveal{ opacity:0; transform:translateY(14px); }
.reveal.in{ opacity:1; transform:none; transition:opacity .8s ease, transform .8s cubic-bezier(.2,.7,.3,1); }

/* ----------  MOBILE  ---------- */
@media (max-width:600px){
  .exp-head{
    grid-template-columns:auto 1fr 20px;
    grid-template-areas:
      "year line chev"
      "co   co   chev"
      "role role chev";
    align-items:center; gap:.3rem .8rem;
  }
  .exp-year{ grid-area:year; }
  .exp-line{ grid-area:line; }
  .exp-dash{ display:none; }
  .exp-co{ grid-area:co; justify-self:start; }
  .exp-role{ grid-area:role; }
  .exp-chev{ grid-area:chev; align-self:center; }
}

@media (prefers-reduced-motion:reduce){
  *{ animation:none !important; transition:none !important; }
  .reveal{ opacity:1; transform:none; }
  html{ scroll-behavior:auto; }
}
