/* ==========================================================================
   NeuraVision Research Lab — "Quiet Lattice + Constellation"
   Editorial-tech academic design system. Plain CSS, custom properties.
   Light paper body · two dark anchors (hero + footer) · green as data-ink.
   ========================================================================== */

/* ----------------------------------------------------------------- Fonts -- */
@font-face {
  /* NeuraVision brand font — compressed from the provided
     NeuravisionBRAND/FONT/Jura-VariableFont_wght.ttf */
  font-family: "Jura";
  src: url("../fonts/jura-brand.woff2") format("woff2"),
       url("../fonts/Jura-VariableFont_wght.ttf") format("truetype");
  font-weight: 300 700; font-display: swap; font-style: normal;
}
@font-face {
  font-family: "InterVar";
  src: url("../fonts/inter-variable.woff2") format("woff2");
  font-weight: 100 900; font-display: swap; font-style: normal;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/ibm-plex-mono-400.woff2") format("woff2");
  font-weight: 400; font-display: swap; font-style: normal;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/ibm-plex-mono-500.woff2") format("woff2");
  font-weight: 500; font-display: swap; font-style: normal;
}

/* ---------------------------------------------------------------- Tokens -- */
:root {
  /* light palette (default) */
  --bg: #FBFBFA;
  --surface: #FFFFFF;
  --surface-alt: #F4F5F3;
  --text: #1C1C1C;
  --muted: #5E635E;
  --border: #E4E6E2;
  --accent: #1F9E54;          /* on-light accent text, >=16px */
  --accent-strong: #096445;   /* small/dense green text */
  --brand: #28B560;           /* marks/rules/dots only on light */
  --brand-grad: linear-gradient(100deg, #20A159 0%, #28B560 55%, #096445 100%);
  --header-bg: rgba(255,255,255,.86);
  --toolbar-bg: rgba(251,251,250,.92);
  --hero-accent: #6BF0AD;      /* highlight word on the dark hero — light, high-contrast */
  color-scheme: light;

  /* dark anchor palette (hero / footer / sub-heroes) */
  --d-bg: #10231A;
  --d-bg2: #1C1C1C;
  --d-surface: #15291F;
  --d-text: #F3F5F2;
  --d-lead: #C9D2CC;
  --d-muted: #9DB0A4;
  --d-border: #26392F;
  --d-accent: #34C46C;

  /* fonts */
  --font-display: "Jura", "Trebuchet MS", system-ui, sans-serif;
  --font-body: "InterVar", -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* type scale */
  --step--1: clamp(0.81rem, 0.79rem + 0.1vw, 0.86rem);
  --step-0:  clamp(1rem, 0.96rem + 0.18vw, 1.0625rem);
  --step-1:  clamp(1.18rem, 1.1rem + 0.4vw, 1.33rem);
  --step-2:  clamp(1.45rem, 1.3rem + 0.7vw, 1.85rem);
  --step-3:  clamp(1.9rem, 1.6rem + 1.4vw, 2.85rem);
  --step-4:  clamp(2.6rem, 2rem + 3vw, 4.6rem);
  --step-hero: clamp(3rem, 2.2rem + 5vw, 6.5rem);
  --label: 0.72rem;

  /* spacing (px) */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px;
  --s7: 48px; --s8: 64px; --s9: 96px; --s10: 128px; --s11: 160px;

  /* radii */
  --r-sm: 6px; --r-md: 10px; --r-lg: 14px; --r-xl: 20px; --r-full: 999px;

  /* shadows */
  --shadow-1: 0 1px 2px rgba(28,28,28,.04), 0 1px 1px rgba(28,28,28,.03);
  --shadow-2: 0 6px 20px -8px rgba(28,28,28,.12), 0 2px 6px rgba(28,28,28,.05);
  --shadow-focus: 0 0 0 3px rgba(40,181,96,.32);
  --glow: 0 0 0 1px rgba(40,181,96,.18), 0 0 40px -8px rgba(40,181,96,.40);

  /* layout */
  --container: 1200px;
  --container-wide: 1320px;
  --container-prose: 720px;
  --gutter: clamp(20px, 5vw, 48px);
  --nav-h: 72px;
}

/* ------------------------------------------------- Dark theme (togglable) */
[data-theme="dark"] {
  --bg: #0E1714;
  --surface: #14201B;
  --surface-alt: #18241E;
  --text: #EDF1EE;
  --muted: #9FB2A7;
  --border: #273A30;
  --accent: #3FCB76;          /* readable green text on dark */
  --accent-strong: #45D17E;
  --header-bg: rgba(13,22,18,.82);
  --toolbar-bg: rgba(13,22,18,.9);
  --shadow-1: 0 1px 2px rgba(0,0,0,.45);
  --shadow-2: 0 12px 32px -14px rgba(0,0,0,.65), 0 2px 8px rgba(0,0,0,.4);
  color-scheme: dark;
}

/* ------------------------------------------------------------- Reset/base */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern" 1, "liga" 1;
  overflow-x: hidden;
}
img, svg, iframe { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--accent-strong); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: none; }
ul { list-style: none; padding: 0; }
:focus-visible { outline: none; box-shadow: var(--shadow-focus); border-radius: var(--r-sm); }
::selection { background: rgba(40,181,96,.22); }
.tnum { font-variant-numeric: tabular-nums; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 50%; transform: translateX(-50%) translateY(-150%);
  top: 8px; z-index: 1000; background: var(--text); color: #fff;
  padding: 10px 18px; border-radius: var(--r-md); font-family: var(--font-mono);
  font-size: var(--step--1); transition: transform .2s;
}
.skip-link:focus { transform: translateX(-50%) translateY(0); text-decoration: none; }

/* --------------------------------------------------------------- Layout -- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.container-wide { max-width: var(--container-wide); }
.container-prose { max-width: var(--container-prose); }
.grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--s5); }

.section { padding-block: clamp(64px, 8vw, 128px); position: relative; }
.section--tight { padding-block: clamp(48px, 6vw, 80px); }

/* dark-light feathered seam */
.seam-top { position: relative; }
.seam-top::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 80px;
  background: linear-gradient(to bottom, rgba(16,35,26,.06), transparent);
  pointer-events: none;
}

/* ------------------------------------------------------- Typography utils */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.12; letter-spacing: -0.01em; color: var(--text); }
h2 { font-size: var(--step-3); font-weight: 500; }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); line-height: 1.5; }
p { max-width: 68ch; }
.lead { font-size: var(--step-1); line-height: 1.5; color: var(--muted); letter-spacing: -0.011em; max-width: 58ch; }
.mono { font-family: var(--font-mono); }
.eyebrow {
  font-family: var(--font-mono); font-size: var(--label); font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent-strong);
}

/* section header — the signature FIG device */
.fig-head { position: relative; margin-bottom: var(--s7); }
.fig-eyebrow {
  display: flex; align-items: center; gap: var(--s3);
  font-family: var(--font-mono); font-size: var(--label); font-weight: 500;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent-strong);
  margin-bottom: var(--s4);
}
.fig-eyebrow::before { content: ""; width: 24px; height: 2px; background: var(--brand); flex: none; }
.fig-eyebrow::after { content: ""; height: 1px; background: var(--border); flex: 1 1 auto; }
.fig-head h2 { max-width: 22ch; }
.fig-head .lead { margin-top: var(--s4); }
.plate-numeral {
  position: absolute; right: 0; top: -0.35em; font-family: var(--font-display);
  font-weight: 700; font-size: clamp(4rem, 10vw, 9rem); line-height: 1;
  color: var(--surface-alt); z-index: -1; letter-spacing: -0.04em; user-select: none;
}

/* generic ruled divider with green tick */
.rule { display: flex; align-items: center; gap: var(--s3); margin-block: var(--s7); }
.rule::before { content: ""; width: 24px; height: 2px; background: var(--brand); flex: none; }
.rule::after { content: ""; height: 1px; background: var(--border); flex: 1; }
.rule span, .rule .rule-label { font-family: var(--font-mono); font-size: var(--label); font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin: 0; }

/* --------------------------------------------------------------- Buttons */
.btn {
  display: inline-flex; align-items: center; gap: var(--s2); justify-content: center;
  font-family: var(--font-display); font-weight: 600; font-size: 0.95rem;
  letter-spacing: 0.12em; text-transform: uppercase; padding: 12px 22px;
  border-radius: var(--r-md); border: 1px solid transparent; transition: all .16s ease;
  text-decoration: none; line-height: 1;
}
.btn:hover { text-decoration: none; }
.btn-primary { background-image: var(--brand-grad); color: #fff; }
.btn-primary:hover { filter: brightness(1.06); transform: translateY(-1px); box-shadow: var(--glow); }
.btn-primary:active { transform: translateY(0); }
.btn-ghost { border-color: var(--border); color: var(--text); background: var(--surface); }
.btn-ghost:hover { border-color: var(--brand); color: var(--accent-strong); background: var(--surface-alt); transform: translateY(-1px); }
.btn-link {
  display: inline-flex; align-items: center; gap: var(--s2);
  font-family: var(--font-mono); font-size: var(--step--1); letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--accent-strong); padding: 4px 0;
}
.btn-link .arr { transition: transform .18s ease; color: var(--brand); }
.btn-link:hover { text-decoration: none; }
.btn-link:hover .arr { transform: translateX(3px); }

/* index chip buttons (PDF / arXiv / CODE / BibTeX) */
.chip {
  display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono);
  font-size: 0.72rem; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 5px 10px; border: 1px solid var(--border); border-radius: var(--r-sm);
  color: var(--text); background: var(--surface); transition: all .15s ease;
}
.chip:hover { background: var(--surface-alt); border-color: var(--brand); color: var(--accent-strong); text-decoration: none; }

/* on-dark button variants */
.is-dark .btn-ghost { background: transparent; border-color: var(--d-border); color: var(--d-text); }
.is-dark .btn-ghost:hover { border-color: var(--d-accent); color: var(--d-accent); background: rgba(255,255,255,.04); }

/* --------------------------------------------------------------- Badges -- */
.venue-badge {
  display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono);
  font-size: 0.72rem; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--accent-strong); background: var(--surface-alt); border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: 4px 9px; white-space: nowrap;
}
.venue-badge.is-top::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); flex: none; }
.status-badge {
  display: inline-flex; align-items: center; font-family: var(--font-display); font-weight: 600;
  font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: #fff;
  background-image: var(--brand-grad); border-radius: var(--r-full); padding: 3px 11px;
}

/* count chips (vital stats) */
.stats { display: flex; flex-wrap: wrap; gap: var(--s6); }
.stat { position: relative; }
.stat .num {
  font-family: var(--font-display); font-weight: 700; font-size: clamp(1.8rem, 1.4rem + 1.6vw, 2.6rem);
  line-height: 1; font-variant-numeric: tabular-nums; display: inline-block;
  padding-bottom: 4px; border-bottom: 2px solid var(--brand);
}
.stat .cap {
  display: flex; align-items: center; gap: 6px; margin-top: var(--s2);
  font-family: var(--font-mono); font-size: var(--label); letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted);
}
.stat .cap::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }

/* =====================================================================
   HEADER / NAV
   ===================================================================== */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100; height: var(--nav-h);
  display: flex; align-items: center; transition: height .22s ease, background .22s ease, box-shadow .22s ease;
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: var(--s5); width: 100%; }
.site-header.is-stuck {
  height: 60px; background: var(--header-bg); backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--border);
}
.nav-right { display: flex; align-items: center; gap: var(--s5); }
/* dark theme: always use the white mark in the header bar */
[data-theme="dark"] .brand .mark-light { display: none; }
[data-theme="dark"] .brand .mark-dark { display: block; }
/* theme toggle */
.theme-toggle { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--r-md); color: var(--text); border: 1px solid transparent; flex: none;
  transition: background .15s, border-color .15s, color .15s; }
.theme-toggle:hover { background: var(--surface-alt); border-color: var(--border); }
.theme-toggle svg { width: 19px; height: 19px; }
.theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
.site-header.on-dark:not(.is-stuck) .theme-toggle { color: #fff; }
.site-header.on-dark:not(.is-stuck) .theme-toggle:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.2); }
/* over dark hero (home top, before stuck) */
.site-header.on-dark:not(.is-stuck) { color: var(--d-text); }
.site-header.on-dark:not(.is-stuck) .nav-link { color: rgba(243,245,242,.82); }
.site-header.on-dark:not(.is-stuck) .brand-name { color: #fff; }
.site-header.on-dark:not(.is-stuck) .brand-sub { color: var(--d-muted); }
.site-header.on-dark:not(.is-stuck) .nav-toggle span { background: #fff; }
.site-header.on-dark:not(.is-stuck) .mark-light { display: none; }
.site-header.on-dark:not(.is-stuck) .mark-dark { display: block; }

.brand { display: inline-flex; align-items: center; gap: var(--s3); }
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: 30px; }
.brand .mark-dark { display: none; }
.brand-name { font-family: var(--font-display); font-weight: 600; font-size: 1.18rem; letter-spacing: -0.01em; color: var(--text); line-height: 1; }
.brand-sub { font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); display: block; margin-top: 3px; }

.nav-links { display: flex; align-items: center; gap: var(--s6); }
.nav-link {
  position: relative; font-family: var(--font-display); font-weight: 500; font-size: 0.95rem;
  letter-spacing: 0.02em; color: var(--text); padding: 6px 0;
}
.nav-link:hover { text-decoration: none; }
.nav-link::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 2px;
  background: var(--brand); transform: scaleX(0); transform-origin: left; transition: transform .18s ease;
}
.nav-link:hover::after, .nav-link[aria-current="page"]::after { transform: scaleX(1); }
.nav-tag { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.14em; color: var(--muted); text-transform: uppercase; }

.nav-toggle { display: none; width: 44px; height: 44px; flex-direction: column; gap: 5px; align-items: center; justify-content: center; }
.nav-toggle span { width: 22px; height: 2px; background: var(--text); transition: .2s; }

/* mobile drawer */
.nav-drawer {
  position: fixed; inset: 0 0 0 auto; width: min(88vw, 380px); background: var(--surface);
  border-left: 1px solid var(--border); transform: translateX(100%); transition: transform .28s cubic-bezier(.4,0,.2,1);
  z-index: 200; padding: calc(var(--nav-h) + var(--s5)) var(--s6) var(--s6); display: flex; flex-direction: column; gap: var(--s2);
}
.nav-drawer.open { transform: translateX(0); }
.nav-drawer a { display: flex; align-items: baseline; gap: var(--s4); font-family: var(--font-display); font-weight: 500; font-size: var(--step-1); color: var(--text); padding: var(--s4) 0; border-bottom: 1px solid var(--border); }
.nav-drawer a:hover { text-decoration: none; color: var(--accent-strong); }
.nav-drawer a .idx { font-family: var(--font-mono); font-size: 0.8rem; color: var(--accent-strong); }
.drawer-overlay { position: fixed; inset: 0; background: rgba(28,28,28,.42); opacity: 0; visibility: hidden; transition: opacity .28s; z-index: 150; }
.drawer-overlay.open { opacity: 1; visibility: visible; }
.drawer-close { position: absolute; top: var(--s4); right: var(--s5); width: 44px; height: 44px; font-size: 1.6rem; color: var(--muted); }

/* =====================================================================
   HERO  (dark figure-plate)
   ===================================================================== */
.is-dark { color: var(--d-text); }
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  background: radial-gradient(120% 120% at 100% 100%, #10231A 0%, #14241B 45%, #1C1C1C 100%);
  color: var(--d-text);
  min-height: clamp(560px, 82vh, 820px); display: flex; align-items: center;
  padding-block: clamp(96px, 12vw, 160px);
}
.hero::before { /* lab graph-paper dot grid */
  content: ""; position: absolute; inset: 0; z-index: -2;
  background-image: radial-gradient(rgba(40,181,96,.05) 1px, transparent 1px);
  background-size: 24px 24px;
}
.hero::after { /* off-center green glow */
  content: ""; position: absolute; width: 70%; height: 80%; right: -5%; top: -10%; z-index: -2;
  background: radial-gradient(circle at 70% 30%, rgba(40,181,96,.18), transparent 60%);
  filter: blur(8px);
}
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.hero .container { position: relative; z-index: 1; }
.hero .grid { align-items: center; width: 100%; }
.hero-content { grid-column: 1 / 8; }
.hero-eyebrow { color: var(--d-accent); margin-bottom: var(--s5); }
.hero-eyebrow::before { background: var(--d-accent); }
.hero-eyebrow::after { background: var(--d-border); }
.hero-title { font-family: var(--font-display); font-weight: 600; font-size: var(--step-hero); line-height: 1.02; letter-spacing: -0.02em; color: #fff; }
.hero-title .accent { color: var(--hero-accent); font-weight: 700; text-shadow: 0 2px 22px rgba(4,18,12,.55); }
.hero-lead { font-size: var(--step-1); line-height: 1.5; color: var(--d-lead); max-width: 52ch; margin-top: var(--s6); }
.hero-cta { display: flex; flex-wrap: wrap; gap: var(--s4); margin-top: var(--s7); }
.hero-visual { grid-column: 8 / 13; position: relative; display: flex; align-items: center; justify-content: center; min-height: 360px; }
.hero-mark { width: clamp(200px, 25vw, 340px); filter: drop-shadow(0 8px 34px rgba(40,181,96,.50)); position: relative; z-index: 3; }
.hero-halo { position: absolute; width: min(130%, 460px); aspect-ratio: 1; border-radius: 50%; z-index: 1;
  background: radial-gradient(circle, rgba(40,181,96,.42), rgba(40,181,96,.10) 45%, transparent 70%); filter: blur(12px); }
.hero-ring { position: absolute; width: min(112%, 420px); aspect-ratio: 1; border-radius: 50%; z-index: 2;
  border: 1px dashed rgba(52,196,108,.28); }
.hero-ring::after { content: ""; position: absolute; inset: 22px; border-radius: 50%; border: 1px solid rgba(52,196,108,.14); }
@media (prefers-reduced-motion: no-preference) {
  .hero-mark { animation: floaty 7s ease-in-out infinite; }
  .hero-halo { animation: halo 6s ease-in-out infinite; }
  .hero-ring { animation: spin 44s linear infinite; }
  .hero-ring::after { animation: spin 64s linear infinite reverse; }
  .constellation .signal2 { animation-delay: 3s; }
}
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes halo { 0%,100% { transform: scale(.9); opacity: .65; } 50% { transform: scale(1.08); opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }

/* node constellation (decorative svg) */
.constellation { position: absolute; inset: -10% ; z-index: -1; pointer-events: none; opacity: .9; }
.constellation .node { fill: var(--brand); transform-box: fill-box; transform-origin: center; }
.constellation .link { stroke: rgba(40,181,96,.35); stroke-width: 1; fill: none; }
.constellation .signal { stroke: #34C46C; stroke-width: 2; fill: none; stroke-linecap: round; filter: drop-shadow(0 0 4px rgba(52,196,108,.8)); }


/* compact dark sub-hero for inner pages */
.subhero {
  position: relative; overflow: hidden; color: var(--d-text);
  background: radial-gradient(120% 160% at 90% 120%, #10231A 0%, #16271C 50%, #1C1C1C 100%);
  padding-block: clamp(72px, 12vh, 120px); padding-top: calc(var(--nav-h) + var(--s7));
}
.subhero::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(40,181,96,.05) 1px, transparent 1px); background-size: 24px 24px; z-index: 0; }
.subhero .container { position: relative; z-index: 1; }
.subhero .fig-eyebrow { color: var(--d-accent); }
.subhero .fig-eyebrow::before { background: var(--d-accent); }
.subhero .fig-eyebrow::after { background: var(--d-border); }
.subhero h1 { font-family: var(--font-display); font-weight: 600; font-size: var(--step-4); color: #fff; line-height: 1.05; }
.subhero .lead { color: var(--d-lead); margin-top: var(--s4); }
.subhero-stats { margin-top: var(--s6); }
.subhero-stats .stat .num { color: #fff; }
.subhero-stats .stat .cap { color: var(--d-muted); }
.subhero .constellation-strip { position: absolute; inset: 0; opacity: .5; z-index: 0; }

/* =====================================================================
   HOME sections
   ===================================================================== */
.about-grid { align-items: start; }
.about-copy { grid-column: 1 / 8; }
.about-copy p + p { margin-top: var(--s4); }
.about-panel { grid-column: 8 / 13; }

.data-table { border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; background: var(--surface-alt); }
.data-table .row { display: grid; grid-template-columns: 38% 1fr; gap: var(--s4); padding: var(--s4) var(--s5); border-bottom: 1px solid var(--border); }
.data-table .row:last-child { border-bottom: none; }
.data-table .k { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.data-table .v { font-size: var(--step--1); color: var(--text); }
.data-table .v a { color: var(--accent-strong); }

/* research cards (home) */
.area-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s5); }
.area-card {
  display: flex; flex-direction: column; gap: var(--s3); padding: var(--s6); background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r-lg); position: relative; overflow: hidden; transition: box-shadow .2s, transform .2s;
}
.area-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px; background-image: var(--brand-grad); transform: scaleX(0); transform-origin: left; transition: transform .25s ease; }
.area-card:hover { box-shadow: var(--shadow-2); transform: translateY(-2px); text-decoration: none; }
.area-card:hover::before { transform: scaleX(1); }
.area-card .idx { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em; color: var(--accent-strong); }
.area-card h3 { font-size: var(--step-1); font-weight: 600; }
.area-card .tag { color: var(--muted); font-size: var(--step--1); }
.area-card .area-icon { width: 38px; height: 38px; color: var(--accent-strong); transition: color .25s ease, transform .25s ease; }
.area-card:hover .area-icon { color: var(--brand); transform: translateY(-2px); }
.area-card .more { margin-top: auto; }

/* featured publication band — cinematic dark anchor */
.featured { position: relative; overflow: hidden; color: var(--d-text); border-block: 1px solid var(--d-border);
  background: radial-gradient(120% 150% at 12% 18%, #15291F 0%, #10231A 48%, #1C1C1C 100%); }
.featured::before { content: ""; position: absolute; inset: 0; z-index: 0;
  background-image: radial-gradient(rgba(40,181,96,.05) 1px, transparent 1px); background-size: 24px 24px; }
.featured .container { position: relative; z-index: 1; }
.featured .fig-eyebrow { color: var(--d-accent); }
.featured .fig-eyebrow::before { background: var(--d-accent); }
.featured .fig-eyebrow::after { background: var(--d-border); }
.featured .fig-head h2 { color: #fff; }
.featured .inner { display: grid; grid-template-columns: 1fr 1.3fr; gap: var(--s8); align-items: center; }
.featured-mark { aspect-ratio: 4/3; border-radius: var(--r-xl); border: 1px solid var(--d-border); background: radial-gradient(circle at 50% 45%, #1a3326, #0a160f); display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; box-shadow: var(--glow); }
.featured-mark img { width: 44%; filter: drop-shadow(0 0 34px rgba(40,181,96,.55)); position: relative; z-index: 1; }
@media (prefers-reduced-motion: no-preference) { .featured-mark img { animation: floaty 7s ease-in-out infinite; } }
.featured-meta .kicker { display: flex; gap: var(--s3); align-items: center; margin-bottom: var(--s4); }
.featured-meta h3 { font-size: var(--step-2); font-weight: 600; line-height: 1.22; margin-bottom: var(--s4); color: #fff; }
.featured-meta h3 a { color: #fff; }
.featured-meta h3 a:hover { color: var(--d-accent); }
.featured-meta .authors { color: var(--d-muted); font-size: var(--step--1); margin-bottom: var(--s5); }
.featured-meta .authors .pi { color: var(--d-accent); font-weight: 600; }
.featured-meta .authors .lab { color: var(--d-text); font-weight: 600; }
.featured .venue-badge { background: rgba(40,181,96,.10); border-color: var(--d-border); color: var(--d-accent); }
.featured .chip { background: rgba(255,255,255,.04); border-color: var(--d-border); color: var(--d-text); }
.featured .chip:hover { background: rgba(40,181,96,.12); border-color: var(--d-accent); color: var(--d-accent); }

/* =====================================================================
   TEAM
   ===================================================================== */
.pi-card { display: grid; grid-template-columns: minmax(220px, 320px) 1fr; gap: var(--s8); align-items: start; }
.pi-photo { border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--border); aspect-ratio: 3/4; }
.pi-photo img { width: 100%; height: 100%; object-fit: cover; }
.pi-info .kicker { margin-bottom: var(--s3); }
.pi-info h3 { font-size: var(--step-2); font-weight: 600; }
.pi-info .role { font-family: var(--font-mono); font-size: var(--step--1); color: var(--accent-strong); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: var(--s5); }
.pi-info p { margin-bottom: var(--s5); }
.pi-facts { border-top: 1px solid var(--border); }
.pi-facts .row { display: grid; grid-template-columns: 30% 1fr; gap: var(--s4); padding: var(--s3) 0; border-bottom: 1px solid var(--border); }
.pi-facts .k { font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.pi-facts .v { font-size: var(--step--1); }
.social-row { display: flex; gap: var(--s4); margin-top: var(--s5); align-items: center; }
.social-row a { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.04em; min-height: 28px; padding: 4px 2px; }
.social-row a:hover { color: var(--accent-strong); text-decoration: none; }
.social-row svg { width: 18px; height: 18px; }

.member-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--s7) var(--s6); }
.member-card { position: relative; display: block; }
.member-card:hover { text-decoration: none; }
.member-photo { position: relative; aspect-ratio: 4/5; border-radius: var(--r-lg); overflow: hidden; background: var(--surface-alt); }
.member-photo img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.02); transition: transform .45s cubic-bezier(.2,.7,.2,1), filter .45s ease; will-change: transform; }
.member-photo::after { content: ""; position: absolute; inset: 0; border-radius: var(--r-lg); box-shadow: inset 0 0 0 0 var(--brand); transition: box-shadow .25s ease; pointer-events: none; }
.member-card:hover .member-photo img { transform: scale(1.045); filter: grayscale(0) saturate(1.06) contrast(1.02); }
.member-card:hover .member-photo::after { box-shadow: inset 0 0 0 2px var(--brand); }
.member-card:hover .member-photo { box-shadow: var(--shadow-2); }
.member-idx { position: absolute; top: 8px; left: 8px; z-index: 2; font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.06em; color: #fff; background: rgba(28,28,28,.45); padding: 2px 7px; border-radius: var(--r-sm); backdrop-filter: blur(4px); }
.member-info { margin-top: var(--s4); }
.member-info .name { font-family: var(--font-display); font-weight: 600; font-size: var(--step-1); color: var(--text); line-height: 1.2; }
.member-info .role { font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-top: 4px; }
.member-info .mtag { color: var(--accent-strong); font-size: var(--step--1); margin-top: 6px; }
.member-links { display: flex; gap: var(--s3); margin-top: var(--s3); opacity: 0; transform: translateY(6px); transition: all .25s ease; }
.member-card:hover .member-links, .member-card:focus-within .member-links { opacity: 1; transform: translateY(0); }
.member-links a { color: var(--muted); display: inline-flex; align-items: center; justify-content: center; min-width: 28px; min-height: 28px; padding: 4px; margin: -4px; }
.member-links a:hover { color: var(--accent-strong); }
.member-links svg { width: 17px; height: 17px; }
/* keep contact links discoverable where hover is unavailable (touch) */
@media (hover: none) { .member-links { opacity: 1; transform: none; } }
/* initials fallback */
.avatar-fallback { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 600; font-size: 2.4rem; color: #fff; background: radial-gradient(circle at 40% 35%, #15291F, #08130d); }

/* =====================================================================
   RESEARCH (zig-zag blocks)
   ===================================================================== */
.research-block { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s8); align-items: center; padding-block: clamp(48px, 6vw, 88px); }
.research-block:nth-child(even) .rb-visual { order: -1; }
.rb-text .plate { font-family: var(--font-display); font-weight: 700; font-size: clamp(2.4rem, 5vw, 4rem); color: #CBD0CA; line-height: 1; letter-spacing: -0.04em; }
.rb-text .num { font-family: var(--font-mono); color: var(--accent-strong); font-size: 0.8rem; letter-spacing: 0.1em; }
.rb-text h2 { font-size: var(--step-2); font-weight: 600; margin: var(--s2) 0 var(--s4); }
.rb-text p { color: var(--text); }
.rb-text .lead { color: var(--muted); margin-bottom: var(--s4); }
.rb-visual { aspect-ratio: 5/4; border-radius: var(--r-xl); border: 1px solid var(--border); background: radial-gradient(circle at 50% 40%, #15291F, #0c1c14); display: flex; align-items: center; justify-content: center; overflow: hidden; position: relative; }
.rb-visual svg { width: 60%; opacity: .92; }
.research-block + .research-block { border-top: 1px solid var(--border); }

/* methods interstitial */
.interstitial { background: radial-gradient(120% 160% at 80% 120%, #10231A, #1C1C1C); color: var(--d-text); }
.interstitial h2 { color: #fff; }
.interstitial .lead { color: var(--d-lead); }

/* =====================================================================
   PUBLICATIONS (dataset rows)
   ===================================================================== */
.pub-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s4); position: sticky; top: 60px; z-index: 40; background: var(--toolbar-bg); backdrop-filter: blur(8px); padding-block: var(--s4); margin-bottom: var(--s5); border-bottom: 1px solid var(--border); }
.filter-pills { display: flex; flex-wrap: wrap; gap: var(--s2); }
.filter-pill { font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.04em; text-transform: uppercase; padding: 6px 13px; border: 1px solid var(--border); border-radius: var(--r-full); color: var(--muted); background: var(--surface); transition: all .15s; }
.filter-pill:hover { border-color: var(--brand); color: var(--accent-strong); }
.filter-pill[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.pub-count { font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.pub-count b { color: var(--accent-strong); font-weight: 500; }

.pub-year { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.4rem,3vw,2rem); color: var(--border); letter-spacing: 0.04em; margin: var(--s7) 0 var(--s2); display: flex; align-items: center; gap: var(--s4); }
.pub-year::after { content: ""; flex: 1; height: 1px; background: var(--border); }

.pub-row { display: grid; grid-template-columns: 64px 1fr auto; gap: var(--s5); padding: var(--s5) var(--s3); border-top: 1px solid var(--border); position: relative; transition: background .15s; align-items: start; }
.pub-row::before { content: ""; position: absolute; left: 0; top: -1px; bottom: 0; width: 2px; background: var(--brand); transform: scaleY(0); transform-origin: top; transition: transform .2s; }
.pub-row:hover { background: var(--surface-alt); }
.pub-row:hover::before { transform: scaleY(1); }
.pub-row:last-child { border-bottom: 1px solid var(--border); }
.pub-rail { font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted); padding-top: 2px; }
.pub-main { min-width: 0; }
.pub-main .pub-title { font-family: var(--font-display); font-weight: 600; font-size: var(--step-1); line-height: 1.3; color: var(--text); }
.pub-main a.pub-title:hover { color: var(--accent-strong); }
.pub-authors { font-size: var(--step--1); color: var(--muted); margin-top: var(--s2); }
.pub-authors .lab { color: var(--text); font-weight: 600; }
.pub-authors .pi { color: var(--accent-strong); font-weight: 600; }
.pub-extra { display: flex; flex-direction: column; align-items: flex-end; gap: var(--s3); }
.pub-links { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.pub-cite { font-family: var(--font-mono); font-size: 0.7rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.pub-cite b { color: var(--accent-strong); font-weight: 500; }
.pub-row.is-hidden { display: none; }

/* =====================================================================
   NEWS log
   ===================================================================== */
.news-list { border-top: 1px solid var(--border); }
.news-item { display: grid; grid-template-columns: 104px 40px 1fr; gap: var(--s4); padding: var(--s5) 0; border-bottom: 1px solid var(--border); align-items: start; position: relative; }
.news-date { font-family: var(--font-mono); font-size: 0.74rem; color: var(--muted); letter-spacing: 0.04em; text-transform: uppercase; padding-top: 3px; }
.news-glyph { width: 34px; height: 34px; border: 1px solid var(--border); border-radius: var(--r-sm); display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: 0.82rem; color: var(--accent-strong); position: relative; }
.news-item.is-new .news-glyph::after { content: ""; position: absolute; top: -4px; right: -4px; width: 9px; height: 9px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 3px var(--bg); }
.news-body .nh { font-size: var(--step-0); color: var(--text); font-weight: 500; display: inline; }
.news-body .nh a:hover { color: var(--accent-strong); }
.news-body .ns { color: var(--muted); font-size: var(--step--1); margin-top: 4px; }
.news-body .status-badge { margin-left: var(--s2); vertical-align: middle; }

/* =====================================================================
   JOIN
   ===================================================================== */
.join-layout { display: grid; grid-template-columns: 1fr; gap: var(--s8); align-items: start; }
@media (min-width: 861px) { .join-layout { grid-template-columns: 1fr minmax(260px, 360px); } }
.join-block + .join-block { margin-top: var(--s7); }
.join-block h3 { font-size: var(--step-1); font-weight: 600; margin-bottom: var(--s4); display: flex; align-items: center; gap: var(--s3); }
.join-block h3 .slash { font-family: var(--font-mono); color: var(--accent-strong); font-size: 0.9rem; }
.position { border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--s5); margin-bottom: var(--s4); background: var(--surface); }
.position .ptop { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); margin-bottom: var(--s3); }
.position h4 { font-size: var(--step-1); font-weight: 600; }
.position .aud { font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.steps { counter-reset: step; list-style: none; padding: 0; }
.steps li { counter-increment: step; position: relative; padding: var(--s3) 0 var(--s3) 32px; }
.steps li::before { content: counter(step,decimal-leading-zero); position: absolute; left: 0; top: var(--s3); font-family: var(--font-mono); color: var(--accent-strong); font-size: 0.82rem; line-height: inherit; }
.checklist li { display: grid; grid-template-columns: 18px 1fr; gap: var(--s3); padding: var(--s2) 0; align-items: baseline; }
.checklist li::before { content: ""; width: 7px; height: 7px; margin-top: 8px; border-radius: 50%; background: var(--brand); }
.join-aside { border: 1px solid var(--border); background: var(--surface-alt); border-radius: var(--r-lg); padding: var(--s5); }

/* =====================================================================
   CONTACT
   ===================================================================== */
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: var(--s8); align-items: start; }
.contact-info .data-table { background: var(--surface); }
.contact-actions { display: flex; flex-wrap: wrap; gap: var(--s4); margin-top: var(--s6); align-items: center; }
.map-frame { position: relative; border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 4/3; background: var(--surface-alt); }
.map-frame iframe { width: 100%; height: 100%; border: 0; filter: grayscale(.3) contrast(1.05); }
/* sits over the (always-light) map tiles, so fixed colours independent of theme */
.map-frame .coord { position: absolute; bottom: 10px; left: 12px; font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.08em; color: #096445; background: rgba(255,255,255,.92); padding: 3px 8px; border-radius: var(--r-sm); }

/* =====================================================================
   JOIN CTA band
   ===================================================================== */
.cta-band { background: var(--surface-alt); border-block: 1px solid var(--border); }
.cta-band .inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s5); }
.cta-band h2 { font-size: var(--step-2); font-weight: 600; }
.cta-band p { color: var(--muted); margin-top: var(--s2); }

/* =====================================================================
   FOOTER
   ===================================================================== */
.site-footer { position: relative; background: linear-gradient(160deg, #1C1C1C 0%, #10231A 100%); color: var(--d-text); padding-top: var(--s9); padding-bottom: var(--s6); border-top: 2px solid transparent; border-image: var(--brand-grad) 1; overflow: hidden; }
.footer-orn { position: absolute; top: 28px; left: 0; right: 0; opacity: .35; height: 40px; z-index: 0; }
.site-footer .container { position: relative; z-index: 1; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: var(--s7); padding-bottom: var(--s8); }
.footer-brand .brand-name { color: #fff; }
.footer-brand img { width: 36px; height: 36px; margin-bottom: var(--s4); }
.footer-brand p { color: var(--d-muted); font-size: var(--step--1); margin-top: var(--s3); max-width: 34ch; }
.footer-brand .addr { font-family: var(--font-mono); font-size: 0.72rem; color: var(--d-muted); margin-top: var(--s4); letter-spacing: 0.04em; }
.footer-col h4 { font-family: var(--font-display); font-weight: 600; font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--d-accent); margin-bottom: var(--s4); }
.footer-col a, .footer-col li { color: var(--d-muted); font-size: var(--step--1); padding: 5px 0; display: block; }
.footer-col a:hover { color: #fff; text-decoration: none; }
.footer-coord { font-family: var(--font-mono); font-size: 0.7rem; color: var(--d-muted); letter-spacing: 0.04em; margin-top: var(--s3); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s3); padding-top: var(--s5); border-top: 1px solid rgba(255,255,255,.1); font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--d-muted); }

/* =====================================================================
   Reveal animations
   ===================================================================== */
/* reveal is opt-in only when JS is present, so no-JS users / crawlers see all */
.js [data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity .6s cubic-bezier(.2,.7,.2,1), transform .6s cubic-bezier(.2,.7,.2,1); transition-delay: calc(var(--i, 0) * 70ms); }
.js [data-reveal].is-visible { opacity: 1; transform: none; }

/* constellation breathing + signal */
@media (prefers-reduced-motion: no-preference) {
  .constellation .node { animation: breathe var(--dur, 5s) ease-in-out infinite; animation-delay: var(--delay, 0s); }
  .constellation .signal { stroke-dasharray: 40 600; animation: trace 6s linear infinite; }
  @keyframes breathe { 0%,100% { opacity: .85; transform: scale(1); } 50% { opacity: 1; transform: scale(1.12); } }
  @keyframes trace { 0% { stroke-dashoffset: 640; } 100% { stroke-dashoffset: 0; } }
  .news-item.is-new .news-glyph::after { animation: pulse 2.4s ease-in-out infinite; }
  @keyframes pulse { 0%,100% { box-shadow: 0 0 0 3px var(--bg), 0 0 0 0 rgba(40,181,96,.5); } 50% { box-shadow: 0 0 0 3px var(--bg), 0 0 0 6px rgba(40,181,96,0); } }
}
@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* =====================================================================
   Responsive
   ===================================================================== */
@media (max-width: 1024px) {
  .featured .inner { grid-template-columns: 1fr; gap: var(--s6); }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--s6); }
  .brand-sub { display: none; }
}
@media (max-width: 860px) {
  :root { --nav-h: 64px; }
  .nav-links, .nav-tag { display: none; }
  .nav-toggle { display: flex; }
  .hero .grid { grid-template-columns: 1fr; }
  .hero-content { grid-column: 1 / -1; order: 2; }
  .hero-visual { grid-column: 1 / -1; order: 1; margin-bottom: var(--s6); }
  .hero-mark { width: 160px; }
  .hero-visual { min-height: 220px; }
  .about-copy, .about-panel { grid-column: 1 / -1; }
  .area-grid { grid-template-columns: 1fr 1fr; }
  .pi-card { grid-template-columns: 1fr; gap: var(--s5); }
  .pi-photo { max-width: 280px; }
  .research-block { grid-template-columns: 1fr; gap: var(--s5); }
  .research-block:nth-child(even) .rb-visual { order: 0; }
  .plate-numeral { display: none; }
}
@media (max-width: 560px) {
  .area-grid { grid-template-columns: 1fr; }
  .pub-row { grid-template-columns: 1fr; gap: var(--s3); }
  .pub-extra { align-items: flex-start; }
  .pub-links { justify-content: flex-start; }
  .news-item { grid-template-columns: 1fr; gap: var(--s2); }
  .news-glyph { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
  .cta-band .inner { flex-direction: column; align-items: flex-start; }
}
