/* Personal website. Source: templates/site/css/site.css (copied into website/ by build.py site). */

:root {
  --bg: #05070f;
  --bg-2: #0a1026;
  --ink: #eef1f8;
  --ink-2: #c3c9d8;
  --muted: #8a93a9;
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .14);
  --glass: rgba(16, 22, 44, .55);
  --glass-2: rgba(22, 30, 58, .7);
  --teal: #3ee6c8;
  --teal-d: #0c8c88;
  --violet: #9b8cff;
  --amber: #ffb547;
  --coral: #ff7a59;
  --earth: #2f7bff;
  --radius: 22px;
  --radius-s: 12px;
  --gutter: clamp(16px, 4vw, 48px);
  --maxw: 1200px;
  --display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --ease: cubic-bezier(.2, .7, .1, 1);
  --scroll: 0;                         /* 0 at the top, 1 at the bottom (set by site.js) */
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
::selection { background: rgba(62, 230, 200, .3); color: #fff; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 6px; }

/* ------------------------------------------------------------------ backdrop */
#sky { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -3; display: block; }
.horizon {                                   /* the Earth rises as you scroll: sky -> planet */
  position: fixed; inset: auto -20vw -1px -20vw; height: 70vh; z-index: -2; pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 120%, rgba(47, 123, 255, calc(.10 + .32 * var(--scroll))) 0%, transparent 60%),
    radial-gradient(70% 55% at 50% 118%, rgba(62, 230, 200, calc(.04 + .22 * var(--scroll))) 0%, transparent 62%);
  transition: opacity .3s;
}
.horizon::after {                            /* thin atmosphere line */
  content: ""; position: absolute; left: 50%; bottom: calc(-170vw + 12vh * var(--scroll));
  width: 180vw; height: 180vw; transform: translateX(-50%); border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(120, 200, 255, calc(.05 + .25 * var(--scroll))),
              0 -20px 80px rgba(62, 160, 255, calc(.05 + .25 * var(--scroll)));
}
.grain {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .06; mix-blend-mode: overlay;
  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='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 60; }
.progress span { display: block; height: 100%; width: calc(var(--scroll) * 100%);
  background: linear-gradient(90deg, var(--teal), var(--violet), var(--amber)); }

/* ------------------------------------------------------------------ nav */
.nav {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 50;
  width: min(var(--maxw), calc(100% - 2 * var(--gutter)));
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px 12px 10px 16px; border-radius: 999px;
  background: rgba(8, 12, 26, .55); border: 1px solid var(--line);
  backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
  transition: background .3s, border-color .3s;
}
.nav.is-scrolled { background: rgba(8, 12, 26, .8); border-color: var(--line-2); }
.nav__brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; }
.nav__mark {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  font: 600 13px/1 var(--mono); letter-spacing: .04em; color: var(--bg);
  background: conic-gradient(from 200deg, var(--teal), var(--violet), var(--amber), var(--teal));
}
.nav__name { font-size: 15px; letter-spacing: .01em; }
.nav__links { display: flex; align-items: center; gap: 4px; }
.nav__links a { text-decoration: none; font-size: 14px; color: var(--ink-2); padding: 8px 12px; border-radius: 999px; transition: color .2s, background .2s; }
.nav__links a:hover, .nav__links a.is-active { color: var(--ink); background: rgba(255, 255, 255, .06); }
.nav__links a.btn { color: var(--bg); margin-left: 6px; }
.nav__toggle { display: none; }

/* ------------------------------------------------------------------ shared */
.section { width: min(var(--maxw), calc(100% - 2 * var(--gutter))); margin: 0 auto; padding: clamp(80px, 12vw, 150px) 0 0; }
.section__head { max-width: 760px; margin-bottom: clamp(36px, 5vw, 60px); }
.eyebrow { font: 500 12px/1 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--teal); margin: 0 0 18px; }
h1, h2, h3, h4 { margin: 0; font-weight: 500; }
h2 { font: 400 clamp(36px, 5.2vw, 64px)/1.05 var(--display); letter-spacing: -.02em; font-variation-settings: "opsz" 144; }
h3 { font-size: 20px; font-weight: 600; letter-spacing: -.005em; }
.section__lead { color: var(--ink-2); font-size: 19px; margin: 18px 0 0; max-width: 640px; }
.subhead { font: 500 13px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin: 72px 0 22px; display: flex; align-items: center; gap: 16px; }
.subhead::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line-2), transparent); }

.card {
  position: relative; background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  transition: border-color .35s, transform .5s var(--ease), background .35s;
  overflow: hidden;
}
.card::before {                              /* spotlight that follows the pointer (--mx/--my from site.js) */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .35s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(62, 230, 200, .09), transparent 60%);
}
.card:hover { border-color: var(--line-2); }
.card:hover::before { opacity: 1; }

.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 13px 22px; border-radius: 999px;
  font: 600 15px/1 var(--sans); text-decoration: none; cursor: pointer; border: 0;
  color: var(--bg); background: linear-gradient(120deg, var(--teal), #8ff3df);
  box-shadow: 0 8px 30px -10px rgba(62, 230, 200, .6);
  transition: transform .25s var(--ease), box-shadow .25s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 14px 40px -12px rgba(62, 230, 200, .8); }
.btn--ghost { color: var(--ink); background: rgba(255, 255, 255, .04); border: 1px solid var(--line-2); box-shadow: none; }
.btn--ghost:hover { background: rgba(255, 255, 255, .09); box-shadow: none; }
.btn--small { padding: 9px 16px; font-size: 14px; }

.chips { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { font: 500 13px/1.25 var(--mono); color: var(--ink-2); padding: 8px 12px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .03); }
.chips--small li { font-size: 12px; padding: 7px 10px; }
.chips em { font-style: normal; color: var(--muted); }
.link { display: inline-flex; gap: 6px; margin-top: 20px; font: 500 14px/1.3 var(--mono); color: var(--teal); text-decoration: none; word-break: break-all; }
.link:hover { text-decoration: underline; text-underline-offset: 4px; }
.link__short { display: none; }
@media (max-width: 600px) { .link__full { display: none; } .link__short { display: inline; } }
.tag { display: inline-block; font: 500 12px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--amber); margin: 0 0 16px; }
.pulse { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--teal); margin-right: 10px; vertical-align: middle;
  box-shadow: 0 0 0 0 rgba(62, 230, 200, .6); animation: pulse 2.4s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(62, 230, 200, 0); } 100% { box-shadow: 0 0 0 0 rgba(62, 230, 200, 0); } }
.bullets { margin: 14px 0 0; padding: 0; list-style: none; }
.bullets li { position: relative; padding-left: 22px; margin: 10px 0; color: var(--ink-2); }
.bullets li::before { content: ""; position: absolute; left: 2px; top: .7em; width: 7px; height: 7px; border-radius: 2px; background: var(--teal); transform: rotate(45deg); }
.bullets strong { color: var(--ink); font-weight: 600; }

/* reveal on scroll (site.js adds .is-in); without JS or with ?static everything is visible */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0s); }
.js .reveal.is-in, .static .reveal { opacity: 1; transform: none; }

/* ------------------------------------------------------------------ hero */
.hero {
  position: relative; min-height: 100svh; width: min(var(--maxw), calc(100% - 2 * var(--gutter))); margin: 0 auto;
  display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; column-gap: 40px;
  padding: 130px 0 76px;
}
.kicker { font: 500 13px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2); margin: 0 0 26px; }
.hero__name {
  font: 300 clamp(64px, 10.5vw, 148px)/.9 var(--display); letter-spacing: -.035em; font-variation-settings: "opsz" 144;
  margin: 0 0 26px;
}
.hero__name em {
  font-style: italic; font-weight: 400;
  background: linear-gradient(100deg, var(--teal) 10%, var(--violet) 55%, var(--amber) 95%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  padding-right: .08em;
}
.hero__tagline { font: italic 400 clamp(24px, 2.6vw, 34px)/1.2 var(--display); margin: 0 0 18px; color: var(--ink); }
.hero__intro { font-size: clamp(17px, 1.5vw, 20px); color: var(--ink-2); max-width: 560px; margin: 0; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.chips--hero { margin-top: 26px; }
.chips--hero li { font-size: 12px; color: var(--muted); }

.hero__visual { display: grid; place-items: center; }
.orbit { position: relative; width: min(440px, 80vw); aspect-ratio: 1; display: grid; place-items: center; }
.orbit__ring { position: absolute; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .1); animation: spin linear infinite; }
.orbit__ring--1 { inset: 0; animation-duration: 38s; border-color: rgba(62, 230, 200, .25); }
.orbit__ring--2 { inset: 9%; animation-duration: 26s; animation-direction: reverse; border-style: dashed; }
.orbit__ring--3 { inset: -9%; animation-duration: 60s; border-color: rgba(155, 140, 255, .18); }
.sat { position: absolute; top: -5px; left: calc(50% - 5px); width: 10px; height: 10px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 18px 4px rgba(62, 230, 200, .7); }
.sat--amber { background: var(--amber); box-shadow: 0 0 18px 4px rgba(255, 181, 71, .6); top: auto; bottom: -5px; }
.sat--violet { background: var(--violet); box-shadow: 0 0 18px 4px rgba(155, 140, 255, .6); left: -5px; top: calc(50% - 5px); }
@keyframes spin { to { transform: rotate(360deg); } }
.orbit__photo {
  position: relative; margin: 0; width: 64%; aspect-ratio: 1; border-radius: 50%; overflow: hidden;
  box-shadow: 0 0 0 1px var(--line-2), 0 0 80px -10px rgba(62, 230, 200, .45), 0 30px 80px -20px rgba(0, 0, 0, .8);
  background: radial-gradient(circle at 35% 30%, #1b2a55, #0a1026 60%, #05070f);
}
.orbit__photo img { width: 100%; height: 100%; object-fit: cover; }
.orbit__photo.is-placeholder { display: grid; place-items: center; }
.placeholder-mark { font: 300 clamp(48px, 7vw, 84px)/1 var(--display); font-style: italic; color: rgba(255, 255, 255, .22); }
.orbit__photo::after {                       /* soft rim light */
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle at 75% 85%, rgba(47, 123, 255, .35), transparent 45%);
  mix-blend-mode: screen; pointer-events: none;
}

.metrics { grid-column: 1 / -1; list-style: none; padding: 0; margin: 64px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.metric { background: rgba(8, 12, 26, .72); padding: 26px 24px; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.metric__value { display: block; font: 300 clamp(38px, 4.4vw, 56px)/1 var(--display); letter-spacing: -.02em; color: var(--ink); }
.metric__label { display: block; margin-top: 10px; font-size: 14px; line-height: 1.45; color: var(--muted); }
.scroll-cue { position: absolute; left: 50%; bottom: 8px; width: 24px; height: 38px; border: 1px solid var(--line-2); border-radius: 12px; transform: translateX(-50%); }
.scroll-cue span { position: absolute; left: 50%; top: 8px; width: 3px; height: 8px; margin-left: -1.5px; border-radius: 2px; background: var(--ink-2); animation: cue 2s infinite; }
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }

/* ------------------------------------------------------------------ story */
.story { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 5vw, 72px); align-items: start; }
/* sticky only where all six focus cards fit on screen */
@media (min-height: 1000px) { .focus { position: sticky; top: 110px; } }
.story__text p { margin: 0 0 22px; font-size: 18px; color: var(--ink-2); }
.story__text p:first-child { font: 400 clamp(22px, 2.2vw, 28px)/1.4 var(--display); color: var(--ink); }
.focus { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.focus__item { padding: 22px 24px 22px 76px; }
.focus__num { position: absolute; left: 24px; top: 24px; font: 500 13px/1 var(--mono); color: var(--teal); }
.focus__item h3 { font-size: 18px; }
.focus__item p { margin: 6px 0 0; color: var(--muted); font-size: 15px; line-height: 1.55; }

/* ------------------------------------------------------------------ work */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin-bottom: 26px; }
.feature__body { padding: clamp(28px, 4vw, 48px); }
.feature__title { font: 400 clamp(28px, 3.2vw, 40px)/1.1 var(--display); letter-spacing: -.015em; }
.feature__text { color: var(--ink-2); margin: 18px 0 0; }
.feature__visual { position: relative; padding: clamp(24px, 3.5vw, 40px); border-left: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(62, 230, 200, .05), rgba(155, 140, 255, .04) 60%, transparent); display: flex; flex-direction: column; gap: 22px; }
.feature--flip .feature__body { order: 2; }
.feature--compact { grid-template-columns: 1.15fr .85fr; }
.feature--compact .feature__body { padding: clamp(24px, 3vw, 34px); }
.feature--compact .feature__title { font-size: clamp(24px, 2.4vw, 30px); }
.feature--compact .feature__text { font-size: 16px; }
.feature--compact .feature__visual { padding: clamp(20px, 2.6vw, 30px); justify-content: center; }
.anim-slot--thin { min-height: 64px; flex: 0 0 64px; }
.feature--flip .feature__visual { border-left: 0; border-right: 1px solid var(--line); }

.results__title { font: 500 12px/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 6px; }
.bar { margin-top: 16px; }
.bar__label { margin: 0 0 8px; font-size: 14px; color: var(--ink); font-weight: 600; }
.bar__row { display: grid; grid-template-columns: 112px 1fr 50px; align-items: center; gap: 12px; margin: 6px 0; font: 400 12.5px/1 var(--mono); color: var(--ink-2); }
.bar__track { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .06); overflow: hidden; }
.bar__fill { display: block; height: 100%; width: calc(var(--v) * 100%); border-radius: inherit; background: linear-gradient(90deg, var(--teal-d), var(--teal));
  transform-origin: left; transform: scaleX(var(--grow, 1)); transition: transform 1.4s var(--ease) .2s; }
.js .feature:not(.is-in) .bar__fill { --grow: 0; }
.static .bar__fill { --grow: 1 !important; }
.bar__row--base { color: var(--muted); }
.bar__row--base .bar__fill { background: rgba(255, 255, 255, .28); }
.bar__val { text-align: right; color: var(--ink); }
.bar__row--base .bar__val { color: var(--muted); }
.notes { margin: 6px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.notes li { font-size: 14px; color: var(--muted); padding: 10px 0 0 20px; position: relative; line-height: 1.5; }
.notes li::before { content: "→"; position: absolute; left: 0; color: var(--amber); }

.statgrid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.statgrid li { border: 1px solid var(--line); border-radius: var(--radius-s); padding: 18px 16px; background: rgba(5, 7, 15, .35); }
.statgrid__value { display: block; font: 300 clamp(26px, 2.8vw, 36px)/1 var(--display); color: var(--ink); }
.statgrid__label { display: block; margin-top: 8px; font-size: 13px; line-height: 1.4; color: var(--muted); }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.tile--wide { grid-column: span 2; }   /* personal projects: wide tile (5 tiles = 2 full rows) */
/* desktop: 24 columns; each pair of tiles shares a row, widths set per tile (master tile_span) so both fill their height */
@media (min-width: 1081px) {
  .grid { grid-template-columns: repeat(24, minmax(0, 1fr)); }
  .grid > .tile { grid-column: span var(--span, 8); }
  .grid > .tile--wide { grid-column: span var(--span, 16); }
}
.tile--wide .tile__art { height: 150px; }
.tile { padding: 0 24px 26px; display: flex; flex-direction: column; }
.tile h4 { font-size: 19px; font-weight: 600; margin-top: 22px; }
.tile p { color: var(--muted); font-size: 15px; line-height: 1.6; margin: 10px 0 0; }
.tile .link { margin-top: auto; padding-top: 18px; }
.tile .chips { margin-bottom: 4px; }
.tile__art { margin: 0 -24px; height: 120px; border-bottom: 1px solid var(--line); }
.tile .tile__tag { margin: 18px 0 0; font: 500 11px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--amber); }
.tile__tag + h4 { margin-top: 10px; }
.ministats { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.ministats li { font: 400 12px/1.3 var(--sans); color: var(--muted); padding: 6px 10px; border-radius: 10px; border: 1px solid var(--line); background: rgba(5, 7, 15, .35); }
.ministats b { font: 500 13px/1 var(--mono); color: var(--teal); margin-right: 4px; }

/* dashboard frame for the real-time pipeline (filled later by the pipeline-dashboard animation) */
.context { margin-top: 22px; padding: 14px 16px; border-radius: var(--radius-s); border: 1px solid var(--line); border-left: 2px solid var(--amber); background: rgba(5, 7, 15, .35); }
.context__title { margin: 0; font: 500 11px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--amber); }
.context p:last-child { margin: 8px 0 0; font-size: 14.5px; line-height: 1.55; color: var(--ink-2); }
.dash { flex: 1; min-height: 190px; display: flex; flex-direction: column; border-radius: var(--radius-s); border: 1px solid var(--line-2); overflow: hidden; background: rgba(5, 7, 15, .5); }
.dash__bar { display: flex; align-items: center; gap: 6px; padding: 9px 12px; border-bottom: 1px solid var(--line); font: 500 11px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.dash__bar i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, .14); }
.dash__bar span { margin-left: 8px; }
.dash__bar .pulse { margin: 0 0 0 auto; width: 7px; height: 7px; }
.dash__body { position: relative; flex: 1; }
.anim-slot__art--dash { background:
    linear-gradient(180deg, transparent 0 24%, rgba(255, 255, 255, .04) 24% 25%, transparent 25% 49%, rgba(255, 255, 255, .04) 49% 50%, transparent 50% 74%, rgba(255, 255, 255, .04) 74% 75%, transparent 75%),
    radial-gradient(90% 70% at 70% 100%, rgba(62, 230, 200, .14), transparent 60%),
    linear-gradient(135deg, #0a1128, #060a18); }
.anim-slot__art--dash::after { opacity: .25; }
.dash.is-live .anim-slot__art { display: none; }

/* animation slots: a static, tasteful visual until a real animation is registered (see site.js) */
.anim-slot { position: relative; }
.anim-slot--wide { min-height: 150px; border-radius: var(--radius-s); border: 1px solid var(--line); overflow: hidden; flex: 1; }
.anim-slot__art { position: absolute; inset: 0; display: block; overflow: hidden;
  background:
    radial-gradient(60% 80% at 20% 30%, rgba(62, 230, 200, .18), transparent 60%),
    radial-gradient(50% 70% at 85% 70%, rgba(155, 140, 255, .18), transparent 60%),
    linear-gradient(135deg, #0b1330, #070b1a); }
.anim-slot__art::after { content: ""; position: absolute; inset: 0; opacity: .5;
  background-image: radial-gradient(rgba(255, 255, 255, .55) 1px, transparent 1.4px); background-size: 22px 22px;
  mask-image: radial-gradient(70% 70% at 50% 50%, #000, transparent); -webkit-mask-image: radial-gradient(70% 70% at 50% 50%, #000, transparent); }
.anim-slot__art--1 { background: radial-gradient(70% 90% at 70% 20%, rgba(255, 181, 71, .18), transparent 60%), linear-gradient(135deg, #0f1430, #070b1a); }
.anim-slot__art--2 { background: radial-gradient(70% 90% at 30% 80%, rgba(47, 123, 255, .22), transparent 60%), linear-gradient(135deg, #0a1430, #070b1a); }
.anim-slot__art--earth { background:
    radial-gradient(120% 120% at 50% 140%, rgba(47, 123, 255, .55), rgba(62, 230, 200, .18) 45%, transparent 70%),
    linear-gradient(180deg, #060a18, #0a1838); }
.anim-slot__art--earth::after { background-image: linear-gradient(rgba(255, 255, 255, .08) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .08) 1px, transparent 1px); background-size: 28px 28px; opacity: .6; }
.anim-slot__art--grid::after { background-image: linear-gradient(rgba(155, 140, 255, .22) 1px, transparent 1px), linear-gradient(90deg, rgba(155, 140, 255, .22) 1px, transparent 1px); background-size: 18px 18px; opacity: .7; }
.anim-slot.is-live .anim-slot__art { display: none; }       /* a registered animation took over */
.dev .anim-slot::before { content: "animation slot: " attr(data-anim); position: absolute; z-index: 5; top: 8px; left: 8px;
  font: 500 11px/1 var(--mono); color: var(--bg); background: var(--amber); padding: 5px 8px; border-radius: 6px; }

/* ------------------------------------------------------------------ experience */
.timeline { list-style: none; margin: 0; padding: 0 0 0 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 200px; top: 8px; bottom: 8px; width: 1px;
  background: linear-gradient(180deg, var(--teal), var(--violet) 50%, rgba(255, 255, 255, .06)); }
.timeline__item { position: relative; display: grid; grid-template-columns: 200px 1fr; gap: 0 34px; margin-bottom: 26px; }
.timeline__node { position: absolute; left: 194px; top: 30px; width: 13px; height: 13px; border-radius: 50%; background: var(--bg); border: 2px solid var(--teal); box-shadow: 0 0 16px rgba(62, 230, 200, .6); }
.timeline__date { margin: 0; padding: 26px 26px 0 0; font: 500 13px/1.4 var(--mono); color: var(--teal); text-align: right; }
.timeline__card { padding: 24px 28px; grid-column: 2; }
.timeline__card h3 { font-size: 21px; }
.official { font-weight: 400; color: var(--muted); font-size: 15px; }
.timeline__org { margin: 4px 0 0; font-size: 15px; color: var(--ink-2); font-weight: 600; }
.timeline__context { margin: 10px 0 0; color: var(--muted); font-size: 15px; font-style: italic; }
.timeline .bullets li { font-size: 15.5px; line-height: 1.6; }
.edu { margin: 56px 0 0 234px; }
.edu ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.edu li { display: grid; grid-template-columns: 70px auto 1fr; gap: 18px; align-items: baseline; padding: 16px 22px; background: rgba(8, 12, 26, .72); }
.edu__year { font: 500 13px/1 var(--mono); color: var(--teal); }
.edu li span:last-child { color: var(--muted); font-size: 15px; }

/* ------------------------------------------------------------------ toolkit */
.toolkit { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.toolkit__group { padding: 22px 22px 24px; }
/* 3 columns: ML+Generative | Vision+Statistics | LLMs+Data | Programming+Learning */
.toolkit__group:nth-child(1), .toolkit__group:nth-child(3), .toolkit__group:nth-child(6) { grid-column: span 2; }
.toolkit__group h3 { font: 500 12px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--teal); }
.toolkit__group .chips { margin-top: 14px; }
.toolkit__group--learning { grid-column: span 2 !important; background: linear-gradient(140deg, rgba(255, 181, 71, .08), var(--glass) 55%); }
.toolkit__group--learning h3 { color: var(--amber); }
.toolkit__group--learning .pulse { background: var(--amber); animation-name: pulse-amber; }
@keyframes pulse-amber { 0% { box-shadow: 0 0 0 0 rgba(255, 181, 71, .6); } 70% { box-shadow: 0 0 0 10px rgba(255, 181, 71, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 181, 71, 0); } }
.toolkit__lang { margin-top: 22px; }
.toolkit__group--learning .toolkit__lang { color: var(--ink-2); }

/* ------------------------------------------------------------------ research */
.metrics--research { margin: 0 0 18px; }
.research { display: grid; grid-template-columns: 1.25fr .75fr; gap: 18px; }
.research__pubs, .research__lead { padding: 28px 30px; }
.pubs { margin: 16px 0 0; padding: 0; list-style: none; counter-reset: p; }
.pubs li { counter-increment: p; position: relative; padding: 14px 0 14px 44px; border-top: 1px solid var(--line); }
.pubs li::before { content: counter(p, decimal-leading-zero); position: absolute; left: 0; top: 16px; font: 500 12px/1 var(--mono); color: var(--violet); }
.pubs__title { display: block; color: var(--ink); font-size: 15.5px; line-height: 1.45; }
.pubs__venue { display: block; margin-top: 4px; font: 400 12.5px/1.4 var(--mono); color: var(--muted); }
.research__lead .bullets li { font-size: 15px; }

/* ------------------------------------------------------------------ life */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 220px; grid-auto-flow: dense; gap: 14px; }
.gallery__item { position: relative; margin: 0; border-radius: var(--radius-s); overflow: hidden; border: 1px solid var(--line); background: var(--glass); }
.gallery__item.is-wide { grid-column: span 2; }
.gallery__item.is-tall { grid-row: span 2; }
.gallery__item.is-big { grid-column: span 2; grid-row: span 2; }
.gallery__open { display: block; width: 100%; height: 100%; cursor: zoom-in; }
.gallery__open:focus-visible { outline: 2px solid var(--teal); outline-offset: -2px; }
/* formal finish: hairline frame, quiet hover, no heavy effects */
#life .gallery__item { border-color: rgba(255, 255, 255, .1); box-shadow: 0 18px 40px -28px rgba(0, 0, 0, .8); }
#life .gallery__item img { filter: saturate(.94); transition: transform 1.4s var(--ease), filter .6s; }
#life .gallery__item:hover img { transform: scale(1.03); filter: saturate(1); }
/* lightbox */
.lightbox { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: rgba(3, 5, 12, .92); backdrop-filter: blur(6px); opacity: 0; transition: opacity .3s; }
.lightbox.is-open { opacity: 1; }
.lightbox img { max-width: min(92vw, 1400px); max-height: 86vh; width: auto; height: auto; border-radius: 6px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
.lightbox button { position: absolute; font: 500 13px/1 var(--mono); color: var(--ink); background: rgba(5, 7, 15, .6); border: 1px solid var(--line-2); border-radius: 999px; padding: 11px 15px; cursor: pointer; }
.lightbox .lb-close { top: 16px; right: 16px; }
.lightbox .lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: 16px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-alt { position: absolute; bottom: 16px; left: 16px; right: 16px; text-align: center; font-size: 13px; color: var(--muted); }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.gallery__item:hover img { transform: scale(1.04); }
.gallery__item figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 16px 12px; font-size: 14px; color: #fff;
  background: linear-gradient(transparent, rgba(5, 7, 15, .85)); }
.gallery__item.is-placeholder span { position: absolute; inset: 0;
  background: radial-gradient(80% 80% at 30% 20%, rgba(62, 230, 200, .10), transparent 60%), radial-gradient(70% 70% at 80% 90%, rgba(155, 140, 255, .12), transparent 60%), linear-gradient(135deg, #0c1430, #070b1a); }
.gallery__item.is-placeholder span::after { content: ""; position: absolute; left: 50%; top: 50%; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .18); box-shadow: 0 0 0 10px rgba(255, 255, 255, .03); }

/* ------------------------------------------------------------------ contact & footer */
.contact { padding-bottom: 40px; }
.contact__card { padding: clamp(36px, 6vw, 80px); text-align: center;
  background: radial-gradient(80% 120% at 50% 0%, rgba(62, 230, 200, .12), transparent 60%), var(--glass-2); }
.contact__card h2 { max-width: 760px; margin: 0 auto; }
.contact__card .section__lead { margin: 20px auto 0; }
.contact__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 34px; }
.social { list-style: none; padding: 0; margin: 30px 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 26px; }
.social a { font: 500 14px/1 var(--mono); color: var(--ink-2); text-decoration: none; }
.social a:hover { color: var(--teal); }
.footer { width: min(var(--maxw), calc(100% - 2 * var(--gutter))); margin: 0 auto; padding: 40px 0 50px; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  font: 400 13px/1.4 var(--mono); color: var(--muted); border-top: 1px solid var(--line); margin-top: 60px; }
.footer p { margin: 0; }
.footer a { color: var(--muted); text-decoration: none; }
.footer a:hover { color: var(--ink); }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); opacity: 0; z-index: 70; padding: 12px 18px; border-radius: 999px;
  font: 500 14px/1 var(--sans); color: var(--bg); background: var(--teal); transition: opacity .3s, transform .3s var(--ease); pointer-events: none; }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 1080px) {
  .nav__name { display: none; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .toolkit { grid-template-columns: repeat(2, 1fr); }
  .toolkit__group:nth-child(n) { grid-column: span 1; }
  .toolkit__group:nth-child(1), .toolkit__group:nth-child(6) { grid-column: span 2; }
  .toolkit__group--learning { grid-column: span 1 !important; }
}
@media (max-width: 900px) {
  body { font-size: 16px; }
  .nav { padding: 8px 8px 8px 12px; }
  .nav__toggle { display: grid; place-items: center; gap: 5px; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line-2); background: transparent; cursor: pointer; }
  .nav__toggle span { display: block; width: 16px; height: 1.5px; background: var(--ink); transition: transform .3s; }
  .nav__toggle[aria-expanded="true"] span:first-child { transform: translateY(3.25px) rotate(45deg); }
  .nav__toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.25px) rotate(-45deg); }
  .nav__links { position: absolute; top: calc(100% + 10px); left: 0; right: 0; flex-direction: column; align-items: stretch; padding: 10px; border-radius: 22px;
    background: rgba(8, 12, 26, .95); border: 1px solid var(--line-2); opacity: 0; visibility: hidden; transform: translateY(-6px); transition: .25s var(--ease); }
  .nav__links.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav__links a { padding: 12px 14px; }
  .nav__links a.btn { margin: 6px 0 0; justify-content: center; }
  .hero { grid-template-columns: 1fr; padding-top: 110px; text-align: left; }
  .hero__visual { order: -1; margin-bottom: 20px; }
  .orbit { width: min(300px, 72vw); }
  .metrics { grid-template-columns: repeat(2, 1fr); margin-top: 48px; }
  .story, .feature, .research { grid-template-columns: minmax(0, 1fr); }
  .feature > * { min-width: 0; }
  .feature__visual, .feature--flip .feature__visual { border: 0; border-top: 1px solid var(--line); }
  .feature--flip .feature__body { order: 0; }
  .timeline::before { left: 6px; }
  .focus { position: static; }
  .timeline__item { grid-template-columns: 1fr; padding-left: 34px; }
  .timeline__node { left: 0; top: 4px; }
  .timeline__date { text-align: left; padding: 0 0 10px; }
  .timeline__card { grid-column: 1; }
  .edu { margin-left: 0; }
  .edu li { grid-template-columns: 56px 1fr; }
  .edu li span:last-child { grid-column: 2; }
  .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 170px; }
}
@media (max-width: 600px) {
  .grid, .toolkit { grid-template-columns: 1fr; }
  .tile--wide { grid-column: span 1; }
  .toolkit__group:nth-child(n), .toolkit__group--learning { grid-column: span 1 !important; }
  .statgrid { grid-template-columns: 1fr; }
  .bar__row { grid-template-columns: 92px 1fr 44px; gap: 8px; }
  .metric { padding: 20px 16px; }
  .footer { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* preview mode (?static): fixed hero height so full-page screenshots in a tall window look like a real screen */
.static .hero { min-height: 900px; }

/* ------------------------------------------------------------------ hidden-echo video */
.echo-video { aspect-ratio: 16 / 9; border-radius: var(--radius-s); border: 1px solid var(--line); overflow: hidden; background: #05070f; }
.echo-video video { display: block; width: 100%; height: 100%; object-fit: cover; }
.echo-links { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-top: -8px; }
.echo-links .link, .echo-links .paperlinks { margin: 0; }
.echo-try { margin-top: 0; }
.echo-note { margin: -10px 0 0; font-size: 13px; color: var(--muted); }
.feature__wide { grid-column: 1 / -1; order: 3; padding: clamp(20px, 3vw, 36px); border-top: 1px solid var(--line); }
.feature__wide .echo-note { max-width: 80ch; }
.paperlinks { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 14px 0 0; }
.paperlinks .link { margin: 0; }

/* empty animation slots stay hidden until an animation registers (is-live) or real content exists; ?dev shows them */
html:not(.dev) .anim-slot[data-anim]:not(.is-live):not(.orbit):not(.echo-video):not(.gallery):not([data-src]) { display: none; }
.link--paper { word-break: normal; overflow-wrap: break-word; }
.tile .link--paper { margin-top: 0; }
.tile__links { margin-top: auto; padding-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.tile__links .link, .tile__links .paperlinks { margin: 0; padding: 0; }

/* "Try it yourself" in the project cards (2026-11-21): a calm pill button with a play disc, so visitors see it at once */
.link.echo-try { display: inline-flex; align-items: center; gap: 10px; word-break: normal; padding: 9px 16px 9px 9px; border-radius: 999px;
  font: 600 13.5px/1.3 var(--sans); color: var(--ink); text-decoration: none; border: 1px solid rgba(62, 230, 200, .45);
  background: linear-gradient(180deg, rgba(62, 230, 200, .14), rgba(62, 230, 200, .06)); box-shadow: 0 10px 26px -16px rgba(62, 230, 200, .8);
  transition: background .2s var(--ease), border-color .2s, transform .2s var(--ease), box-shadow .2s; }
.link.echo-try::before { content: ""; flex: none; width: 24px; height: 24px; border-radius: 50%;
  background: var(--teal) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M5.5 3.5l7 4.5-7 4.5z' fill='%2304121a'/%3E%3C/svg%3E") center / 13px no-repeat;
  box-shadow: 0 0 12px rgba(62, 230, 200, .45); }
.link.echo-try:hover { border-color: var(--teal); background: linear-gradient(180deg, rgba(62, 230, 200, .22), rgba(62, 230, 200, .1)); transform: translateY(-1px); box-shadow: 0 14px 30px -14px rgba(62, 230, 200, .9); }
.link.echo-try span[aria-hidden] { color: var(--teal); }
.echo-links { gap: 10px; }

/* project boxes reached by a link (/#project-<id> or /p/<id>/): keep the top clear of the fixed menu */
[id^="project-"] { scroll-margin-top: 90px; }
.feature__body .echo-links { margin-top: 20px; }
