/* Self-hosted fonts. Removes the only third-party dependency on the page,
   lets the CSP stay at 'self', and stops leaking visitor IPs to Google.
   Variable woff2, latin + latin-ext subsets only. */
@font-face{
  font-family:'Inter';
  font-style:normal;
  font-weight:300 700;
  font-display:swap;
  src:url('assets/fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face{
  font-family:'Inter';
  font-style:normal;
  font-weight:300 700;
  font-display:swap;
  src:url('assets/fonts/inter-latin.woff2') format('woff2');
  unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face{
  font-family:'JetBrains Mono';
  font-style:normal;
  font-weight:400 500;
  font-display:swap;
  src:url('assets/fonts/jetbrains-mono-latin-ext.woff2') format('woff2');
  unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face{
  font-family:'JetBrains Mono';
  font-style:normal;
  font-weight:400 500;
  font-display:swap;
  src:url('assets/fonts/jetbrains-mono-latin.woff2') format('woff2');
  unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
:root{
  --bg:#06070a;
  --ink:#e9edf2;
  --ink-dim:#9aa5b1;
  --ink-faint:#5d6672;
  --line:rgba(233,237,242,.12);
  --gold:#f3c969;
  --gold-soft:rgba(243,201,105,.18);
  --card:rgba(255,255,255,.028);
  --max:980px;
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto}}

body{
  margin:0;
  background:var(--bg);
  color:var(--ink);
  font-family:Inter,system-ui,-apple-system,"Segoe UI",sans-serif;
  font-weight:400;
  line-height:1.65;
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
}

/* ---------- circuit board layer ---------- */
/* Fixed to the viewport, not the document. A full-document-height SVG means
   every dashoffset change repaints the whole page area each scroll frame;
   pinning it to one screen is what keeps the signal smooth. */
.board{
  position:fixed;
  inset:0;
  z-index:0;
  pointer-events:none;
}
.board svg{display:block;width:100%;height:100%}

.vignette{
  position:fixed;
  inset:0;
  z-index:1;
  pointer-events:none;
  background:
    radial-gradient(120% 80% at 50% 0%,transparent 35%,rgba(6,7,10,.72) 100%),
    linear-gradient(to bottom,rgba(6,7,10,.55),transparent 18%,transparent 82%,rgba(6,7,10,.75));
}

main{
  position:relative;
  z-index:2;
  max-width:var(--max);
  margin:0 auto;
  padding:0 28px 120px;
}

/* Scrim between the board and the copy. main creates a stacking context, so a
   z-index:-1 child sits behind the text but still above the traces — the gold
   signal passes behind the reading column instead of blooming through it. */
main::before{
  content:"";
  position:fixed;
  inset:0;
  z-index:-1;
  pointer-events:none;
  background:radial-gradient(ellipse 64% 72% at 50% 50%,rgba(6,7,10,.80) 0%,rgba(6,7,10,.62) 45%,transparent 78%);
}

/* Dark halo on glyphs so thin strokes stay legible if a trace passes behind. */
h1,h2,h3,p,.chips li,.certs li,.list li,.badge,.btn,.role-when,.when{
  text-shadow:0 0 10px rgba(6,7,10,.92),0 0 3px rgba(6,7,10,.8);
}

/* ---------- hero ---------- */
.hero{
  display:flex;
  flex-direction:column;
  justify-content:center;
  padding:56px 0 0;
}
.hero-inner{
  display:flex;
  align-items:center;
  gap:40px;
  flex-wrap:wrap;
}

/* Portrait card, 3:4 to match the source photo exactly — a group shot in a
   small circle is unreadable, and matching the aspect means nothing is cropped. */
.avatar{
  position:relative;
  flex:0 0 auto;
  width:180px;
  height:180px;
  border-radius:50%;
  overflow:hidden;
  background:#0d1016;
  border:1px solid rgba(243,201,105,.35);
  box-shadow:0 0 0 6px rgba(243,201,105,.05),0 18px 50px rgba(0,0,0,.6);
}
/* profile-v3.jpg is already cropped square (447x447) and framed for this circle,
   so no offset is needed. Reframe the file, not these values — a head filling
   much more than ~80% of the square gets sliced by the circular mask. */
.avatar img{
  display:block;
  position:relative;
  z-index:1;
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center;
}
.avatar-initials{
  position:absolute;inset:0;
  display:none;
  align-items:center;justify-content:center;
  font-family:"JetBrains Mono",ui-monospace,monospace;
  font-size:52px;letter-spacing:.06em;
  color:var(--gold);
  opacity:.75;
}
.avatar.is-fallback .avatar-initials{display:flex}

.hero-text{flex:1 1 320px;min-width:280px}
h1{
  margin:0;
  font-size:clamp(2.6rem,7vw,4.4rem);
  font-weight:700;
  letter-spacing:-.03em;
  line-height:1.02;
}
.tagline{
  margin:14px 0 2px;
  font-size:clamp(1rem,2.4vw,1.2rem);
  color:var(--gold);
  font-weight:500;
  letter-spacing:.01em;
}
.meta{
  margin:0;
  color:var(--ink-faint);
  font-family:"JetBrains Mono",ui-monospace,monospace;
  font-size:.82rem;
  letter-spacing:.04em;
}

.badges{display:flex;flex-wrap:wrap;gap:8px;margin:20px 0 26px}
.badge{
  font-family:"JetBrains Mono",ui-monospace,monospace;
  font-size:.7rem;
  letter-spacing:.1em;
  text-transform:uppercase;
  padding:6px 11px;
  border:1px solid var(--line);
  border-radius:3px;
  color:var(--ink-dim);
  background:rgba(255,255,255,.02);
}
.badge-gold{
  color:var(--gold);
  border-color:rgba(243,201,105,.4);
  background:var(--gold-soft);
}

.actions,.contact-row{display:flex;gap:12px;flex-wrap:wrap}
.btn{
  display:inline-block;
  padding:11px 22px;
  border:1px solid var(--line);
  border-radius:4px;
  color:var(--ink);
  text-decoration:none;
  font-size:.92rem;
  font-weight:500;
  background:rgba(255,255,255,.02);
  transition:border-color .2s,background .2s,transform .2s,color .2s;
}
.btn:hover{border-color:rgba(243,201,105,.55);color:var(--gold);transform:translateY(-1px)}
.btn-primary{
  border-color:rgba(243,201,105,.5);
  background:var(--gold-soft);
  color:var(--gold);
}
.btn-primary:hover{background:rgba(243,201,105,.26)}

.scroll-cue{
  display:none;
  margin:auto auto 20px;
  width:22px;height:36px;
  border:1px solid var(--line);
  border-radius:12px;
  position:relative;
}
.scroll-cue span{
  position:absolute;left:50%;top:8px;
  width:3px;height:6px;margin-left:-1.5px;
  border-radius:2px;background:var(--gold);
  animation:cue 1.9s ease-in-out infinite;
}
@keyframes cue{0%{opacity:0;transform:translateY(0)}30%{opacity:1}100%{opacity:0;transform:translateY(13px)}}

/* ---------- sections ---------- */
.section{padding:84px 0 0;scroll-margin-top:40px}
h2{
  display:flex;align-items:baseline;gap:14px;
  margin:0 0 26px;
  font-size:clamp(1.35rem,3.2vw,1.8rem);
  font-weight:600;
  letter-spacing:-.015em;
}
h2::after{
  content:"";
  flex:1 1 auto;
  height:1px;
  background:linear-gradient(to right,var(--line),transparent);
}
.idx{
  font-family:"JetBrains Mono",ui-monospace,monospace;
  font-size:.72rem;
  color:var(--gold);
  letter-spacing:.14em;
  opacity:.85;
}
.sub{
  margin:26px 0 10px;
  font-size:.74rem;
  font-weight:500;
  letter-spacing:.14em;
  text-transform:uppercase;
  color:var(--ink-faint);
  font-family:"JetBrains Mono",ui-monospace,monospace;
}
p{margin:0 0 16px;color:var(--ink-dim);max-width:68ch}
.lead{color:var(--ink);font-size:1.08rem}

/* chips */
.chips{list-style:none;display:flex;flex-wrap:wrap;gap:8px;padding:0;margin:0}
.chips li{
  font-size:.85rem;
  padding:6px 13px;
  border:1px solid var(--line);
  border-radius:999px;
  color:var(--ink-dim);
  background:rgba(255,255,255,.02);
  transition:border-color .2s,color .2s;
}
.chips li:hover{border-color:rgba(243,201,105,.45);color:var(--gold)}

/* experience */
.role{
  display:flex;
  gap:28px;
  padding:26px 0;
  border-top:1px solid var(--line);
  flex-wrap:wrap;
}
.role:first-of-type{border-top:none}
.role-when{
  flex:0 0 150px;
  font-family:"JetBrains Mono",ui-monospace,monospace;
  font-size:.76rem;
  letter-spacing:.05em;
  color:var(--ink-faint);
  padding-top:5px;
}
.role-body{flex:1 1 380px;min-width:260px}
.role-body h3{margin:0;font-size:1.12rem;font-weight:600;letter-spacing:-.01em}
.org{margin:3px 0 12px;color:var(--gold);font-size:.9rem;opacity:.9}

/* cards */
.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(248px,1fr));gap:14px}
.card{
  padding:20px;
  border:1px solid var(--line);
  border-radius:6px;
  background:var(--card);
  backdrop-filter:blur(2px);
  transition:border-color .22s,transform .22s,background .22s;
}
.card:hover{border-color:rgba(243,201,105,.42);transform:translateY(-3px);background:rgba(243,201,105,.05)}
.card h3{margin:0 0 8px;font-size:1rem;font-weight:600}
.card p{margin:0;font-size:.9rem}

/* lists */
.list{list-style:none;padding:0;margin:0}
.list li{
  padding:14px 0;
  border-top:1px solid var(--line);
  color:var(--ink-dim);
  display:flex;justify-content:space-between;gap:16px;flex-wrap:wrap;
}
.list li:first-child{border-top:none}
.list strong{color:var(--ink);font-weight:600}
.when{
  font-family:"JetBrains Mono",ui-monospace,monospace;
  font-size:.75rem;color:var(--ink-faint);white-space:nowrap;
}

.certs{list-style:none;padding:0;margin:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(252px,1fr));gap:8px}
.certs li{
  position:relative;
  padding:9px 0 9px 22px;
  color:var(--ink-dim);
  font-size:.93rem;
}
.certs li::before{
  content:"";
  position:absolute;left:4px;top:50%;
  width:6px;height:6px;margin-top:-3px;
  border-radius:50%;
  background:var(--gold);
  box-shadow:0 0 8px rgba(243,201,105,.6);
}

footer{border-top:1px solid var(--line);margin-top:84px}
.colophon{
  margin-top:40px;
  font-family:"JetBrains Mono",ui-monospace,monospace;
  font-size:.74rem;
  color:var(--ink-faint);
}

/* reveal on scroll */
.reveal{opacity:0;transform:translateY(16px);transition:opacity .6s ease,transform .6s ease}
.reveal.in{opacity:1;transform:none}
@media (prefers-reduced-motion:reduce){
  .reveal{opacity:1;transform:none;transition:none}
  .scroll-cue span{animation:none}
}

@media (max-width:620px){
  main{padding:0 20px 90px}
  .avatar{width:132px;height:132px}
  .role-when{flex-basis:100%}
}

/* ---------- 404 ---------- */
/* Styles live here rather than inline because the CSP has no 'unsafe-inline'. */
.notfound{
  min-height:70svh;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:flex-start;
  padding:80px 0 0;
}
.notfound .code{
  font-family:"JetBrains Mono",ui-monospace,monospace;
  font-size:.78rem;
  letter-spacing:.18em;
  color:var(--gold);
  margin:0 0 14px;
}
.notfound h1{font-size:clamp(2rem,5vw,3.1rem);margin:0 0 14px}
.notfound p{margin:0 0 28px}
