/* ==========================================================================
   Tokens
   ========================================================================== */
:root {
  --bg: #f6f7f2;
  --bg-alt: #eef1ea;
  --surface: #ffffff;
  --surface-2: #f2f4ef;
  --text: #0e1a15;
  --muted: #4b5f57;
  --line: rgba(14, 26, 21, 0.10);
  --line-strong: rgba(14, 26, 21, 0.22);
  --accent: #16794b;      /* canopy */
  --accent-2: #9a5b00;    /* laser amber */
  --accent-3: #0b6fa4;    /* GEDI cyan */
  --accent-4: #6d4ad8;    /* ML violet */
  --accent-ink: #ffffff;
  --shadow: 0 1px 2px rgba(14, 26, 21, .05), 0 8px 24px rgba(14, 26, 21, .06);
  --hero-veil: linear-gradient(90deg, rgba(246, 247, 242, .96) 0%, rgba(246, 247, 242, .82) 38%, rgba(246, 247, 242, 0) 70%);

  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --radius: 14px;
  --radius-sm: 8px;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 32px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1110;
    --bg-alt: #0e1614;
    --surface: #111a17;
    --surface-2: #17231f;
    --text: #e7efea;
    --muted: #9db2a8;
    --line: rgba(231, 239, 234, 0.09);
    --line-strong: rgba(231, 239, 234, 0.2);
    --accent: #4ade95;
    --accent-2: #f2b43c;
    --accent-3: #5cc8ff;
    --accent-4: #a78bfa;
    --accent-ink: #06130d;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .25);
    --hero-veil: linear-gradient(90deg, rgba(11, 17, 16, .95) 0%, rgba(11, 17, 16, .78) 38%, rgba(11, 17, 16, 0) 70%);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b1110;
  --bg-alt: #0e1614;
  --surface: #111a17;
  --surface-2: #17231f;
  --text: #e7efea;
  --muted: #9db2a8;
  --line: rgba(231, 239, 234, 0.09);
  --line-strong: rgba(231, 239, 234, 0.2);
  --accent: #4ade95;
  --accent-2: #f2b43c;
  --accent-3: #5cc8ff;
  --accent-4: #a78bfa;
  --accent-ink: #06130d;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .25);
  --hero-veil: linear-gradient(90deg, rgba(11, 17, 16, .95) 0%, rgba(11, 17, 16, .78) 38%, rgba(11, 17, 16, 0) 70%);
  color-scheme: dark;
}

/* ==========================================================================
   Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.1; letter-spacing: -0.02em; margin: 0; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 2px solid var(--accent-3); outline-offset: 2px; border-radius: 4px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--surface); padding: 8px 12px; }
.eyebrow {
  font: 500 .78rem/1.2 var(--font-mono);
  letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin: 0 0 .8rem;
}
.h-sm { font-size: .95rem; font-family: var(--font-mono); font-weight: 500; letter-spacing: .02em; color: var(--muted); margin: 1.6rem 0 .8rem; text-transform: uppercase; }

/* buttons & controls */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  font: 500 .92rem/1 var(--font-sans);
  padding: .78em 1.1em; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--text);
  text-decoration: none; cursor: pointer; transition: transform .15s, background .15s, border-color .15s;
}
.btn:hover { transform: translateY(-1px); border-color: var(--accent); }
.btn--primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.btn--ghost { background: transparent; }
.btn--sm { padding: .5em .9em; font-size: .85rem; }
.pill {
  display: inline-block; font: 500 .8rem/1 var(--font-mono);
  padding: .5em .8em; border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 85%, transparent); color: var(--text);
  border: 1px solid var(--line); backdrop-filter: blur(8px);
}
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); }
.seg button {
  font: 500 .82rem/1 var(--font-sans); color: var(--muted); background: none; border: 0;
  padding: .55em .9em; border-radius: 999px; cursor: pointer;
}
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.range { width: 100%; accent-color: var(--accent); }

/* ==========================================================================
   Nav
   ========================================================================== */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav__inner { display: flex; align-items: center; gap: 24px; height: 60px; }
.nav__brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 600; }
.nav__mark {
  font: 700 .8rem/1 var(--font-mono); letter-spacing: -.02em;
  width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px;
  color: var(--accent-ink); background: linear-gradient(135deg, var(--accent), var(--accent-3));
}
.nav__links { display: flex; gap: 4px; list-style: none; margin: 0 0 0 auto; padding: 0; }
.nav__links a { color: var(--muted); text-decoration: none; font-size: .9rem; padding: .5em .7em; border-radius: 8px; }
.nav__links a:hover { color: var(--text); background: var(--surface-2); }
nav { margin-left: auto; }
.theme-toggle {
  width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface);
  display: grid; place-items: center; cursor: pointer; color: var(--text);
}
.theme-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.i-moon { display: none; }
:root[data-theme="dark"] .i-sun { display: none; }
:root[data-theme="dark"] .i-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .i-sun { display: none; }
  :root:not([data-theme="light"]) .i-moon { display: block; }
}
@media (max-width: 860px) {
  .nav__links { display: none; }
  .nav__name { font-size: .95rem; }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero { position: relative; min-height: min(92vh, 860px); display: flex; align-items: stretch; overflow: hidden; isolation: isolate; }
.hero__canvas, .hero .anim__canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; cursor: grab; touch-action: pan-y; }
.hero .anim__canvas:active, .anim--band .anim__canvas:active { cursor: grabbing; }
.hero::before { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--hero-veil); pointer-events: none; }
.hero__fallback {
  position: absolute; inset: 0; z-index: -3; display: none;
  background: url('../img/cards/wsci-fusion.webp') right center / cover no-repeat; opacity: .5;
}
.no-webgl .hud { display: none; }
.hero__inner { position: relative; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 32px; align-items: center; width: 100%; padding-top: 56px; padding-bottom: 56px; pointer-events: none; }
.hero__copy, .hud { pointer-events: auto; }
.hero h1 { font-size: clamp(2.8rem, 7vw, 5.4rem); margin-bottom: .25em; letter-spacing: -0.035em; }
.hero__tagline { font-size: clamp(1.15rem, 2vw, 1.45rem); line-height: 1.4; max-width: 30ch; color: var(--text); }
.hero__roles { list-style: none; padding: 0; margin: 0 0 1.8rem; color: var(--muted); font-size: .95rem; }
.hero__roles li { padding-left: 1.1em; position: relative; margin: .25em 0; }
.hero__roles li::before { content: ''; position: absolute; left: 0; top: .62em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 10px; }

.hud {
  justify-self: end; align-self: end; width: min(100%, 380px);
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  border: 1px solid var(--line); border-radius: var(--radius);
  backdrop-filter: blur(14px) saturate(1.3); box-shadow: var(--shadow);
  padding: 12px; font-size: .85rem;
}
.hud__stages { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin-bottom: 10px; }
.hud__stages button span { display: block; opacity: .6; font-size: .62rem; margin-bottom: 2px; }
.hud__stages button {
  font: 500 .68rem/1 var(--font-mono); padding: .5em 0; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--line); background: transparent; color: var(--muted);
}
.hud__stages button.is-active { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.hud__title { font: 600 .95rem/1.2 var(--font-display); margin: 2px 2px 2px; }
.hud__caption { color: var(--muted); margin: 0 2px 8px; min-height: 2.6em; line-height: 1.3; }
.hud__code {
  margin: 0 0 8px; padding: 10px; border-radius: 8px; min-height: 5.6em;
  background: color-mix(in srgb, var(--bg) 80%, transparent); border: 1px solid var(--line);
  font: 400 .72rem/1.5 var(--font-mono); white-space: pre-wrap; word-break: break-all; color: var(--text);
}
.hud__chart { width: 100%; height: 118px; }
.hud__note { font: 400 .7rem/1.3 var(--font-mono); color: var(--muted); margin: 8px 2px 0; }
@media (max-width: 900px) {
  .hero { min-height: auto; flex-direction: column; }
  .hero::before { background: linear-gradient(180deg, color-mix(in srgb, var(--bg) 92%, transparent) 0%, color-mix(in srgb, var(--bg) 55%, transparent) 55%, transparent 100%); }
  .hero__inner { grid-template-columns: 1fr; padding-top: 40px; padding-bottom: 24px; }
  .hero__canvas { position: absolute; }
  .hud { justify-self: stretch; width: 100%; margin-top: 38vh; }
  .hud__chart { height: 96px; }
}

/* ==========================================================================
   Stats
   ========================================================================== */
.stats { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg-alt); }
.stats__grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 22px 16px; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; }
.stat__v { font: 600 clamp(1.6rem, 3vw, 2.2rem)/1 var(--font-display); letter-spacing: -.02em; }
.stat__l { color: var(--text); font-size: .9rem; margin-top: 4px; }
.stat__n { color: var(--muted); font: 400 .72rem/1.3 var(--font-mono); margin-top: 2px; }
@media (max-width: 700px) {
  .stats__grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
}

/* ==========================================================================
   Sections
   ========================================================================== */
.section { padding: clamp(56px, 9vw, 104px) 0; }
.section--alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section__head { margin-bottom: 36px; max-width: 760px; }
.section__head--row { max-width: none; display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; }
.section__lede { color: var(--muted); font-size: 1.05rem; margin-top: .8rem; }

/* featured bento */
.featured { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.card {
  position: relative; display: flex; flex-direction: column; min-width: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); transition: transform .2s, border-color .2s;
}
.card:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.card--xl { grid-column: span 4; }
.card--l { grid-column: span 2; }
.card--m { grid-column: span 3; }
.card--s { grid-column: span 2; }
.card--w { grid-column: span 6; }
.card--w .card__body { display: grid; grid-template-columns: 1fr auto; column-gap: 24px; }
.card--w .card__body > * { grid-column: 1; }
.card--w .card__links { grid-column: 2; grid-row: 1 / span 5; align-self: center; margin: 0; }
.card__media { position: relative; background: var(--surface-2); aspect-ratio: 16 / 7; overflow: hidden; }
.card--l .card__media, .card--s .card__media { aspect-ratio: 16 / 10; }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__media--contain img { object-fit: contain; padding: 10px; }
.card__media--light { background: #fff; }
.card__rank {
  position: absolute; top: 10px; left: 10px; z-index: 1;
  font: 600 .75rem/1 var(--font-mono); padding: .45em .6em; border-radius: 7px;
  background: color-mix(in srgb, var(--bg) 80%, transparent); color: var(--text); backdrop-filter: blur(6px);
}
.card__body { padding: 18px 18px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card__meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font: 500 .72rem/1 var(--font-mono); color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.kind { padding: .35em .55em; border-radius: 6px; }
.kind--paper { background: color-mix(in srgb, var(--accent-4) 16%, transparent); color: var(--accent-4); }
.kind--data { background: color-mix(in srgb, var(--accent-3) 16%, transparent); color: var(--accent-3); }
.kind--background { background: color-mix(in srgb, var(--accent-2) 16%, transparent); color: var(--accent-2); }
.kind--software { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); }
.card h3 { font-size: 1.12rem; line-height: 1.25; }
.card__venue { font-size: .85rem; color: var(--muted); margin: 0; }
.card__summary { font-size: .93rem; margin: 0; }
.card__metric { font: 500 .78rem/1.3 var(--font-mono); color: var(--accent-2); margin: 0; }
.card__links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 6px; }
.card__links a {
  font: 500 .8rem/1 var(--font-sans); text-decoration: none; color: var(--text);
  padding: .5em .75em; border-radius: 999px; border: 1px solid var(--line-strong);
}
.card__links a:hover { border-color: var(--accent); color: var(--accent); }
@media (max-width: 960px) {
  .card--xl, .card--m { grid-column: span 6; }
  .card--l, .card--s { grid-column: span 3; }
}
@media (max-width: 620px) {
  .card--l, .card--s { grid-column: span 6; }
  .card--w .card__body { display: flex; }
}

/* ==========================================================================
   Explore (apps)
   ========================================================================== */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.tabs button {
  font: 500 .92rem/1.2 var(--font-sans); color: var(--muted); cursor: pointer;
  padding: .75em 1em; border-radius: 12px; border: 1px solid var(--line); background: var(--surface);
}
.tabs button[aria-selected="true"] { color: var(--text); border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.tabs__k { font-family: var(--font-mono); color: var(--accent); margin-right: .4em; }
.panel[hidden] { display: none; }
.app {
  display: grid; grid-template-columns: minmax(0, 1fr) 340px; min-height: 560px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
}
.app__stage { position: relative; min-height: 420px; background: #0a0f0d; }
.map, .tls-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.tls-canvas { cursor: grab; touch-action: none; }
.app__overlay { position: absolute; z-index: 500; pointer-events: none; }
.app__overlay--top { top: 12px; left: 50%; transform: translateX(-50%); }
.app__side { padding: 22px; border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; font-size: .92rem; }
.app__side h3 { font-size: 1.2rem; }
.app__side p { margin: 0; }
.controls { display: flex; gap: 10px; align-items: center; }
.controls--stack { flex-direction: column; align-items: stretch; }
.field { display: grid; grid-template-columns: auto 1fr 2ch; gap: 10px; align-items: center; font: 500 .8rem/1 var(--font-mono); color: var(--muted); }
.field output { color: var(--text); text-align: right; }
.checks { display: flex; flex-direction: column; gap: 6px; font-size: .88rem; }
.checks input { accent-color: var(--accent); margin-right: 6px; }
.spark { width: 100%; height: 90px; }
.legend { font: 400 .72rem/1 var(--font-mono); color: var(--muted); }
.legend__bar { height: 10px; border-radius: 5px; margin-bottom: 5px; }
.legend__ticks { display: flex; justify-content: space-between; }
.legend__title { margin-bottom: 6px; color: var(--text); }
.probe { font: 400 .8rem/1.4 var(--font-mono); color: var(--muted); min-height: 2.8em; }
.credit { font-size: .75rem; color: var(--muted); margin-top: auto !important; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0; }
.facts div { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; }
.facts dt { font: 400 .7rem/1.2 var(--font-mono); color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.facts dd { margin: 4px 0 0; font: 600 1.15rem/1.1 var(--font-display); }
.app-msg { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; text-align: center; color: #cfdcd5; font-size: .92rem; }
.leaflet-container { background: #0a0f0d; font-family: var(--font-sans); }
.leaflet-container canvas { max-width: none !important; }
.leaflet-control-attribution { font-size: 10px; }
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .app__stage { min-height: 62vw; }
  .app__stage--3d { min-height: 110vw; max-height: 620px; }
  .app__side { border-left: 0; border-top: 1px solid var(--line); }
}

/* ==========================================================================
   Expertise
   ========================================================================== */
.expertise { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.tile__icon { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); color: var(--accent); }
.tile__icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.tile h3 { font-size: 1.05rem; }
.tile p { color: var(--muted); font-size: .9rem; margin: 0; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.tags span { font: 400 .72rem/1 var(--font-mono); padding: .45em .6em; border-radius: 6px; background: var(--surface-2); color: var(--text); }
.tile--agentic { border-color: color-mix(in srgb, var(--accent-4) 45%, var(--line)); }
.tile--agentic .tile__icon { color: var(--accent-4); }

/* ==========================================================================
   Publications
   ========================================================================== */
.pubs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.pub { display: grid; grid-template-columns: 64px 1fr auto; gap: 16px; padding: 16px 0; border-top: 1px solid var(--line); align-items: start; }
.pub[hidden] { display: none; }
.pub__year { font: 500 .85rem/1.5 var(--font-mono); color: var(--muted); }
.pub__title { font-weight: 600; line-height: 1.35; }
.pub__title a { color: var(--text); text-decoration: none; }
.pub__title a:hover { color: var(--accent); text-decoration: underline; }
.pub__authors { color: var(--muted); font-size: .88rem; margin-top: 2px; }
.pub__venue { font-size: .88rem; font-style: italic; }
.pub__type { font: 500 .7rem/1 var(--font-mono); text-transform: uppercase; letter-spacing: .05em; padding: .45em .6em; border-radius: 6px; white-space: nowrap; }
.pub__type--article { background: color-mix(in srgb, var(--accent-4) 14%, transparent); color: var(--accent-4); }
.pub__type--data { background: color-mix(in srgb, var(--accent-3) 14%, transparent); color: var(--accent-3); }
.pub__type--software, .pub__type--thesis, .pub__type--preprint { background: var(--surface-2); color: var(--muted); }
.more { margin-top: 18px; color: var(--muted); font-size: .9rem; }
.twocol { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-top: 24px; }
.mini { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: .9rem; }
.mini li { display: grid; grid-template-columns: 44px 1fr; gap: 10px; }
.mini .y { font: 500 .8rem/1.5 var(--font-mono); color: var(--muted); }
.mini .w { color: var(--muted); font-size: .84rem; }
@media (max-width: 700px) {
  .pub { grid-template-columns: 48px 1fr; }
  .pub__type { grid-column: 2; justify-self: start; }
  .twocol { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Software
   ========================================================================== */
.software { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.repo { display: flex; flex-direction: column; gap: 8px; padding: 18px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); text-decoration: none; color: var(--text); transition: border-color .2s, transform .2s; }
.repo:hover { border-color: var(--accent); transform: translateY(-2px); }
.repo__head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.repo__name { font: 600 1.05rem/1.2 var(--font-mono); }
.repo__stars { font: 500 .8rem/1 var(--font-mono); color: var(--accent-2); white-space: nowrap; }
.repo__desc { color: var(--muted); font-size: .9rem; margin: 0; }
.repo__lang { font: 400 .75rem/1.5 var(--font-mono); color: var(--muted); margin-top: auto; }
.repo__lang span { display: block; }
.contrib { margin-top: 20px; color: var(--muted); font-size: .9rem; }

/* ==========================================================================
   About
   ========================================================================== */
.about { display: grid; grid-template-columns: 300px 1fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
.about__photo img { border-radius: 20px; width: 100%; height: auto; box-shadow: var(--shadow); }
.about__text h2 { margin-bottom: 1rem; }
.about__text > div > p { font-size: 1.04rem; max-width: 68ch; }
.about__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.links { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.links a { display: inline-block; font-size: .85rem; text-decoration: none; padding: .45em .8em; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--text); }
.links a:hover { border-color: var(--accent); color: var(--accent); }
.timeline { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line-strong); }
.timeline li { position: relative; padding: 0 0 16px 18px; }
.timeline li::before { content: ''; position: absolute; left: -5px; top: .5em; width: 9px; height: 9px; border-radius: 50%; background: var(--bg-alt); border: 2px solid var(--accent); }
.timeline .t-role { font-weight: 600; line-height: 1.3; }
.timeline .t-org { color: var(--muted); font-size: .88rem; }
.timeline .t-yr { font: 500 .75rem/1.5 var(--font-mono); color: var(--accent); }
.timeline .t-note { font-size: .85rem; color: var(--muted); }
@media (max-width: 860px) {
  .about { grid-template-columns: 1fr; }
  .about__photo { max-width: 260px; }
  .about__cols { grid-template-columns: 1fr; gap: 0; }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer { padding: 48px 0; border-top: 1px solid var(--line); }
.footer__inner { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; }
.footer__title { font: 600 1.4rem/1.2 var(--font-display); margin: 0 0 .3em; }
.footer__mail { font: 500 1.1rem/1 var(--font-mono); }
.footer__meta { color: var(--muted); font-size: .8rem; max-width: 52ch; margin: 0; }
.noscript { text-align: center; padding: 16px; }

/* ==========================================================================
   v2: animations, intro, TLS comparison
   ========================================================================== */
.anim.is-loading .hud__body { opacity: .5; }
.anim.is-failed .hud { display: none; }
.no-webgl .anim .hud { display: none; }

/* intro (photo + bio) */
.intro { padding: clamp(40px, 6vw, 72px) 0 0; border-top: 1px solid var(--line); background: var(--bg-alt); }
.intro__grid { display: grid; grid-template-columns: 220px minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 48px); align-items: start; }
.intro__photo img { width: 100%; height: auto; border-radius: 18px; box-shadow: var(--shadow); }
.intro__photo .links { margin-top: 14px; }
.intro__text h2 { margin-bottom: 1rem; }
.intro__bio p { font-size: 1.04rem; max-width: 64ch; }
.intro__facts .h-sm:first-child { margin-top: .2rem; }
.facts-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.facts-list li { display: flex; flex-direction: column; }
.fl-main { font-weight: 600; line-height: 1.3; font-size: .93rem; }
.fl-main a { color: var(--text); }
.fl-sub { color: var(--muted); font-size: .82rem; }
.intro .stats__grid { margin-top: clamp(32px, 5vw, 56px); border-top: 1px solid var(--line); }
@media (max-width: 980px) {
  .intro__grid { grid-template-columns: 180px 1fr; }
  .intro__facts { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 24px; }
  .intro__facts .h-sm { grid-row: 1; margin-top: 0; }
  .intro__facts .facts-list { grid-row: 2; }
}
@media (max-width: 640px) {
  .intro__grid { grid-template-columns: 1fr; }
  .intro__photo { max-width: 200px; }
  .intro__facts { display: block; }
  .intro__facts .h-sm { margin-top: 1.4rem; }
}

/* dark band for the second animation */
.section--dark { background: #080d0c; color: #e7efea; border-top: 1px solid rgba(255,255,255,.06); border-bottom: 1px solid rgba(255,255,255,.06); }
.section--dark .section__lede { color: #9db2a8; }
.section--dark .eyebrow { color: #4ade95; }
.anim--band { position: relative; height: min(78vh, 720px); min-height: 520px; border-radius: var(--radius); overflow: hidden; border: 1px solid rgba(255,255,255,.08);
  background: radial-gradient(120% 90% at 30% 20%, #10201b 0%, #070b0a 70%); }
.anim--band .anim__canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; touch-action: pan-y; }
.hud--band { position: absolute; right: 14px; bottom: 14px; width: min(380px, calc(100% - 28px));
  --surface: #111a17; --bg: #0b1110; --text: #e7efea; --muted: #9db2a8; --line: rgba(231,239,234,.09); --line-strong: rgba(231,239,234,.2); --accent: #4ade95; --accent-ink: #06130d; --accent-2: #f2b43c; --accent-4: #a78bfa;
  color: var(--text); }
@media (max-width: 760px) {
  .anim--band { height: auto; min-height: 0; display: flex; flex-direction: column; }
  .anim--band .anim__canvas { position: relative; height: 62vh; }
  .hud--band { position: relative; right: auto; bottom: auto; width: auto; margin: 10px; }
}

/* TLS then & now */
.split-labels { position: absolute; top: 52px; left: 0; right: 0; display: flex; pointer-events: none; z-index: 5; }
.split-labels span { flex: 1; text-align: center; font: 500 .75rem/1 var(--font-mono); color: #e7efea; opacity: .85; letter-spacing: .04em; }
.split-labels.is-single span:last-child { display: none; }
.split-labels.is-single span:first-child { flex: 1; }
.app__stage--3d .split-line { position: absolute; top: 0; bottom: 0; left: 50%; width: 1px; background: rgba(255,255,255,.22); pointer-events: none; }
.field--select { grid-template-columns: auto 1fr; }
.field select { font: 500 .85rem/1.2 var(--font-sans); color: var(--text); background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: .45em .6em; }
.compare table { width: 100%; border-collapse: collapse; font-size: .8rem; }
.compare th, .compare td { padding: 5px 6px; border-bottom: 1px solid var(--line); text-align: right; }
.compare th:first-child, .compare td:first-child { text-align: left; color: var(--muted); font-weight: 400; }
.compare thead th { font: 500 .7rem/1.2 var(--font-mono); color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.compare .yes { color: var(--accent); }
.compare .no { color: var(--muted); opacity: .6; }
.compare .new { color: var(--accent-2); font: 500 .65rem/1 var(--font-mono); margin-left: 4px; }
/* keep 3D apps at a fixed height; long side panels scroll */
@media (min-width: 901px) {
  #panel-tls .app, #panel-planet .app { height: 640px; }
  #panel-tls .app__side, #panel-planet .app__side { overflow-y: auto; }
}

/* ==========================================================================
   v3: story panels (draggable, minimizable) and hero layout
   ========================================================================== */
.hud__bar { display: flex; align-items: center; gap: 8px; margin: -4px -2px 8px; cursor: grab; user-select: none; touch-action: none; }
.hud__bar:active { cursor: grabbing; }
.hud__grip { font-size: .9rem; color: var(--muted); line-height: 1; }
.hud__label { font: 500 .68rem/1 var(--font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); flex: 1; }
.hud__min { width: 24px; height: 22px; border-radius: 6px; border: 1px solid var(--line); background: transparent; color: var(--text); cursor: pointer; font: 600 .9rem/1 var(--font-mono); }
.hud.is-min .hud__body, .hud.is-min .hud__note { display: none; }
.hud.is-min .hud__stages { margin-bottom: 0; }
.hud.is-dragging { transition: none; opacity: .92; }
.hud { will-change: transform; }

/* hero: copy and story panel share the left column, the scene lives on the right */
@media (min-width: 901px) {
  .hero__inner { grid-template-columns: minmax(0, 560px) 1fr; grid-template-rows: auto auto; align-content: center; row-gap: 22px; padding-top: 40px; padding-bottom: 40px; }
  .hero__copy { grid-column: 1; grid-row: 1; }
  .hero .hud { grid-column: 1; grid-row: 2; justify-self: start; align-self: start; width: min(100%, 440px); }
  .hero h1 { font-size: clamp(2.6rem, 5vw, 4.3rem); }
  .hero__tagline { max-width: 34ch; }
  .hero__roles { margin-bottom: 1.2rem; }
  .hero .hud__chart { height: 96px; }
  .hero .hud__code { min-height: 4.6em; }
  .hero { min-height: min(96vh, 900px); }
}
/* band: panel starts top-left; the scene is offset to the right */
.hud--band { right: auto; left: 14px; top: 14px; bottom: auto; }
@media (max-width: 760px) { .hud--band { left: auto; top: auto; } }

/* GEDI shot popups */
.muted { color: var(--muted); font-size: .8em; }
.shot-pop { font: 400 12px/1.45 var(--font-mono); }
.shot-pop b { font-family: var(--font-sans); font-size: 13px; }
.shot-pop table { border-collapse: collapse; margin-top: 4px; }
.shot-pop td { padding: 1px 8px 1px 0; }
.shot-pop td:first-child { color: #5b6b63; }
.shot-pop .bad { color: #b4412f; }

/* animation fallback: static poster + note (no WebGL) */
.anim__poster { position: absolute; inset: 0; z-index: -2; background: right center / contain no-repeat; display: flex; align-items: flex-end; justify-content: flex-end; pointer-events: none; }
.anim--band .anim__poster { z-index: 0; background-position: center; }
.anim__note { margin: 0 16px 16px auto; max-width: 420px; font: 400 .78rem/1.4 var(--font-mono); color: #cfdcd5; background: rgba(8,13,12,.78); border: 1px solid rgba(255,255,255,.12); border-radius: 10px; padding: 10px 12px; pointer-events: auto; }
.hero .anim__poster { left: 45%; }
@media (max-width: 900px) { .hero .anim__poster { left: 0; opacity: .45; } }
.hero .anim__poster { -webkit-mask-image: radial-gradient(ellipse 70% 65% at 58% 52%, #000 55%, transparent 100%); mask-image: radial-gradient(ellipse 70% 65% at 58% 52%, #000 55%, transparent 100%); }
.hero .anim__note { margin-bottom: 28px; }
.anim__why { display: block; margin-top: 6px; opacity: .7; font-size: .7rem; word-break: break-word; }
.lang-toggle { height: 36px; min-width: 40px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; font: 600 .78rem/1 var(--font-mono); letter-spacing: .04em; }
.lang-toggle:hover { border-color: var(--accent); }
.nav__inner .lang-toggle { margin-left: auto; }
.nav__inner nav + .lang-toggle { margin-left: 0; }
.plot-name { font: 600 .92rem/1.3 var(--font-sans); margin: 0; }
