:root{
  --paper:#FFFFFF;
  --ink:#17130F;
  --muted:#726A60;
  --accent:#4A4E7C;
  --border:#E7E2D9;
  --wash:#F4F1EB;
  --max:980px;
}

*{box-sizing:border-box;}
html{scroll-behavior:smooth;}
@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto;}
  *{animation-duration:0.01ms !important; animation-iteration-count:1 !important; transition-duration:0.01ms !important;}
}

body{
  margin:0;
  background:var(--paper);
  color:var(--ink);
  font-family:'Work Sans', system-ui, sans-serif;
  font-size:16px;
  line-height:1.65;
  -webkit-font-smoothing:antialiased;
}

a{color:inherit;}
a:focus-visible, button:focus-visible{
  outline:2px solid var(--accent);
  outline-offset:3px;
  border-radius:2px;
}

.wrap{max-width:var(--max); margin:0 auto; padding:0 28px;}

.mono{font-family:'IBM Plex Mono', monospace;}
.eyebrow{
  font-family:'IBM Plex Mono', monospace;
  font-size:11px;
  letter-spacing:0.14em;
  text-transform:uppercase;
  color:var(--accent);
  font-weight:500;
}

/* ---------- NAV ---------- */
nav{
  padding:22px 0 0;
}
nav .wrap{
  display:flex; align-items:center; justify-content:space-between;
  padding-bottom:18px;
  border-bottom:1px solid var(--border);
}
.brand{
  font-family:'IBM Plex Mono', monospace;
  font-size:12px; font-weight:500;
  letter-spacing:0.06em;
  text-decoration:none;
  color:var(--muted);
}
.brand span{color:var(--accent);}
.navlinks{
  display:flex; gap:26px;
  font-family:'IBM Plex Mono', monospace;
  font-size:11px;
  letter-spacing:0.08em;
  text-transform:uppercase;
}
.navlinks a{text-decoration:none; color:var(--muted); transition:color .2s;}
.navlinks a:hover{color:var(--accent);}
@media (max-width:640px){ .navlinks{display:none;} }

/* ---------- PHOTO PLACEHOLDER ---------- */
.photo{
  position:relative;
  background:var(--wash);
  border:1px dashed var(--border);
  overflow:hidden;
  display:flex; align-items:center; justify-content:center;
  text-align:center;
}
.photo img{
  position:absolute; inset:0;
  width:100%; height:100%;
  object-fit:cover;
  object-position:50% 30%;
}
.photo.contain{background:#fff; border-style:solid;}
.photo.contain img{
  object-fit:contain;
  object-position:center;
  padding:16px;
  box-sizing:border-box;
}
.photo-label{
  font-size:9.5px;
  letter-spacing:0.04em;
  color:var(--muted);
  padding:8px;
  line-height:1.6;
}

/* ---------- HERO ---------- */
header.hero{padding:56px 0 64px;}
.hero-id-row{
  display:flex;
  align-items:center;
  gap:22px;
}
.avatar{
  width:88px; height:88px;
  border-radius:50%;
  flex:none;
}
.avatar .photo-label{font-size:7px; padding:4px; line-height:1.4;}

h1{
  font-family:'Bricolage Grotesque', sans-serif;
  font-weight:600;
  font-size:1.9rem;
  line-height:1.15;
  letter-spacing:-0.01em;
  margin:0 0 6px;
}
.accent{color:var(--accent);}

.tagline{
  margin:0 0 14px;
  font-size:0.98rem;
  color:var(--muted);
}

.pill-row{display:flex; gap:10px; flex-wrap:wrap;}
.pill{
  font-family:'IBM Plex Mono', monospace;
  font-size:11px;
  letter-spacing:0.04em;
  text-decoration:none;
  color:var(--ink);
  background:var(--wash);
  border:1px solid var(--border);
  border-radius:100px;
  padding:6px 14px;
  transition:border-color .2s, color .2s;
}
.pill:hover{border-color:var(--accent); color:var(--accent);}

.hero-about{margin-top:40px;}
.hero-about .lede{
  max-width:60ch;
  margin:10px 0 0;
  font-size:1.05rem;
  color:var(--muted);
}

.plot-path{
  stroke:var(--accent);
  stroke-width:1.6;
  fill:none;
  stroke-linecap:round;
  stroke-dasharray:400;
  stroke-dashoffset:400;
  animation:draw 2.2s ease-out .3s forwards;
}
@keyframes draw{ to{ stroke-dashoffset:0; } }

/* ---------- SECTION LABELS ---------- */
section{padding:72px 0;}
section + section{border-top:1px solid var(--border);}
.section-head{
  display:flex; align-items:baseline; justify-content:space-between;
  gap:20px; margin-bottom:44px; flex-wrap:wrap;
}
.section-head h2{
  font-family:'Bricolage Grotesque', sans-serif;
  font-weight:600;
  font-size:1.9rem;
  margin:0;
}

/* ---------- INDEX ROWS (research / sidequests) ---------- */
.index-list{display:flex; flex-direction:column;}
.index-row{
  display:grid;
  grid-template-columns:150px 140px 1fr;
  gap:24px;
  padding:32px 0;
  border-top:1px solid var(--border);
  align-items:start;
}
.index-row:first-child{border-top:none;}
@media (max-width:760px){
  .index-row{grid-template-columns:1fr; gap:14px;}
  .idx-photo{max-width:260px;}
}
.idx-photo{aspect-ratio:1/1; width:100%;}
.idx-figure{
  aspect-ratio:4/3; width:100%;
  border:1px solid var(--border);
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  padding:10px; margin:0;
}
.idx-figure svg{width:100%; height:auto; display:block;}
.idx-figure figcaption{
  font-family:'IBM Plex Mono', monospace;
  font-size:9px;
  letter-spacing:0.05em;
  color:var(--muted);
  margin-top:6px;
}
.idx-meta{
  font-size:11px;
  letter-spacing:0.05em;
  color:var(--muted);
  padding-top:4px;
}
.idx-body h3{
  font-family:'Bricolage Grotesque', sans-serif;
  font-weight:600;
  font-size:1.32rem;
  margin:0 0 10px;
  line-height:1.28;
}
.idx-body p{margin:0 0 14px; color:var(--ink); font-size:0.97rem; max-width:62ch;}
.idx-tags{
  font-size:10.5px;
  letter-spacing:0.08em;
  color:var(--accent);
  text-transform:uppercase;
}

/* ---------- WORK LOG ---------- */
.log{
  margin-top:12px;
  border-left:2px solid var(--accent);
  padding-left:20px;
  display:flex; flex-direction:column; gap:10px;
}
.log .cmd{font-family:'IBM Plex Mono', monospace; font-size:12.5px; color:var(--muted);}
.log .cmd .prompt{color:var(--accent); margin-right:6px;}
.log .result{font-size:0.93rem; color:var(--ink); margin-left:1px;}

/* ---------- FOOTER ---------- */
footer{padding:64px 0 56px;}
.foot-grid{
  display:flex; justify-content:space-between; align-items:flex-end;
  flex-wrap:wrap; gap:32px;
}
footer h2{
  font-family:'Bricolage Grotesque', sans-serif; font-weight:600;
  font-size:2rem; margin:14px 0 0;
}
.foot-links{
  display:flex; gap:26px; flex-wrap:wrap;
  font-family:'IBM Plex Mono', monospace;
  font-size:12px; letter-spacing:0.05em; text-transform:uppercase;
}
.foot-links a{text-decoration:none; border-bottom:1px solid var(--border); padding-bottom:2px; transition:border-color .2s, color .2s;}
.foot-links a:hover{color:var(--accent); border-color:var(--accent);}
.foot-base{
  margin-top:52px; padding-top:20px; border-top:1px solid var(--border);
  display:flex; justify-content:space-between; flex-wrap:wrap; gap:12px;
  font-size:11px; color:var(--muted); font-family:'IBM Plex Mono', monospace;
}

.reveal{opacity:0; transform:translateY(14px); transition:opacity .6s ease, transform .6s ease;}
.reveal.in{opacity:1; transform:none;}
