/* =========================================================================
   lightNIIng — design system
   Theme tokens define the surfaces, borders, text ramp, and six accent
   schemes (Orange is
   the release default; Sage, Garnet, Periwinkle, Violet, Indigo optional).
   Light + dark, with the accent bleeding into focus rings, links, chips,
   and the translucent glow around every screenshot.
   ========================================================================= */

/* ------- Reset ------------------------------------------------------------ */
*,
*::before,
*::after {
  box-sizing: border-box;
}
* {
  margin: 0;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  /* Scale the whole type/space system a step or two up on large canvases so the
     page fills wide/4K screens instead of reading as tiny text in empty bands.
     Nothing changes at/under ~1600px (stays 16px); grows toward 21px on 4K.
     Almost everything is in rem, so this lifts headings, body, cards and gaps
     together — the way Linear et al. scale up when there's room.
     round(down, …, 1px) snaps the computed size to a whole pixel so the entire
     rem cascade resolves to integers (no sub-pixel fuzz); the plain clamp above
     is the fallback for browsers without CSS round(). */
  font-size: clamp(16px, 12px + 0.25vw, 21px);
  font-size: round(down, clamp(16px, 12px + 0.25vw, 21px), 1px);
}
img,
picture,
svg {
  display: block;
  max-width: 100%;
}
/* Keyboard focus: a clear ring in the current accent (outline follows each
   element's own border-radius in modern browsers). Mouse clicks don't trigger
   :focus-visible, so it stays out of the way for pointer users. */
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ------- Theme tokens (light; Orange accent by default) ------------------- */
:root {
  --bg-base: #f2f0ea;
  --bg-sidebar: #e7e4dc;
  --bg-elevated: #f8f7f3;

  --border-subtle: rgba(22, 24, 23, 0.11);
  --border-strong: rgba(22, 24, 23, 0.2);

  --fg-base: #171918;
  --fg-muted: rgba(23, 25, 24, 0.66);
  --fg-faint: rgba(23, 25, 24, 0.43);

  --hero-bg: #090b0b;
  --hero-fg: #f0f1ed;
  --hero-muted: rgba(240, 241, 237, 0.58);
  --chrome-bg: #faf9f5;

  /* Orange (#BF5700) is the shipped default. */
  --accent: #bf5700;
  --accent-hover: #a44900;
  --accent-text: #ffffff;
  --accent-control-text: var(--accent-text);
  --accent-control-hover-text: var(--accent-text);
  --accent-control-hover: var(--accent-hover);
  --accent-soft: rgba(191, 87, 0, 0.13);
  --accent-glow: rgba(191, 87, 0, 0.32);
  --about-radar-base-opacity: 0.48;

  /* Floating-ribbon drop shadow: black tinted with the accent. A plain black
     shadow vanishes on the dark theme's near-black surfaces, so the accent
     keeps it visible; the dark blocks below lean it further toward the accent. */
  --ribbon-shadow: color-mix(in srgb, color-mix(in srgb, var(--accent) 35%, #000) 55%, transparent);

  /* Type + rhythm. The platform UI font keeps the interface familiar; display
     headings use stronger weight and tracking for a branded feel. */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, system-ui, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo,
    "Cascadia Code", Consolas, monospace;

  /* Grows on large canvases (13" ≈ 1440px viewport stays ~1120), capped so the
     grid-based landing fills wide/4K screens without sprawling. Text-heavy
     tutorial pages cap tighter (--maxw-text) to keep a readable measure. */
  --maxw: clamp(1120px, 84vw, 1680px);
  --maxw-text: 1180px;

  color-scheme: light;
  accent-color: var(--accent);
}

/* Dark: explicit override wins; otherwise follow the OS when unset. */
:root[data-theme="dark"] {
  --bg-base: #0d0f0f;
  --bg-sidebar: #151817;
  --bg-elevated: #121514;

  --border-subtle: rgba(239, 241, 236, 0.1);
  --border-strong: rgba(239, 241, 236, 0.18);

  --fg-base: #eeefeb;
  --fg-muted: rgba(238, 239, 235, 0.64);
  --fg-faint: rgba(238, 239, 235, 0.4);
  --chrome-bg: #222624;

  --accent-soft: rgba(191, 87, 0, 0.2);
  --accent-glow: rgba(191, 87, 0, 0.45);
  --about-radar-base-opacity: 0.82;
  /* Lean the ribbon shadow toward the accent so it reads on dark surfaces. */
  --ribbon-shadow: color-mix(in srgb, color-mix(in srgb, var(--accent) 75%, #000) 55%, transparent);

  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg-base: #0d0f0f;
    --bg-sidebar: #151817;
    --bg-elevated: #121514;

    --border-subtle: rgba(239, 241, 236, 0.1);
    --border-strong: rgba(239, 241, 236, 0.18);

    --fg-base: #eeefeb;
    --fg-muted: rgba(238, 239, 235, 0.64);
    --fg-faint: rgba(238, 239, 235, 0.4);
    --chrome-bg: #222624;

    --accent-soft: rgba(191, 87, 0, 0.2);
    --accent-glow: rgba(191, 87, 0, 0.45);
    --about-radar-base-opacity: 0.82;
    --ribbon-shadow: color-mix(in srgb, color-mix(in srgb, var(--accent) 75%, #000) 55%, transparent);

    color-scheme: dark;
  }
}

/* ------- Accent schemes --------------------------------------------------- */
:root[data-accent="orange"] {
  --accent: #bf5700;
  --accent-hover: #a44900;
  --accent-text: #ffffff;
  --accent-soft: rgba(191, 87, 0, 0.13);
  --accent-glow: rgba(191, 87, 0, 0.32);
}
:root[data-accent="sage"] {
  --accent: #6f9179;
  --accent-hover: #5c7a65;
  --accent-text: #ffffff;
  --accent-control-text: #171918;
  --accent-control-hover-text: #ffffff;
  --accent-soft: rgba(163, 193, 173, 0.22);
  --accent-glow: rgba(135, 168, 146, 0.4);
}
:root[data-accent="garnet"] {
  --accent: #73000a;
  --accent-hover: #5e0008;
  --accent-text: #ffffff;
  --accent-soft: rgba(115, 0, 10, 0.14);
  --accent-glow: rgba(115, 0, 10, 0.36);
}
:root[data-accent="periwinkle"] {
  --accent: #88a9f1;
  --accent-hover: #6d90e0;
  --accent-text: #1a2620;
  --accent-soft: rgba(136, 169, 241, 0.22);
  --accent-glow: rgba(136, 169, 241, 0.45);
}
:root[data-accent="violet"] {
  --accent: #967dff;
  --accent-hover: #8269e0;
  --accent-text: #1a2620;
  --accent-control-hover: var(--accent);
  --accent-soft: rgba(150, 125, 255, 0.18);
  --accent-glow: rgba(150, 125, 255, 0.42);
}
:root[data-accent="indigo"] {
  --accent: #7a73ec;
  --accent-hover: #665fcd;
  --accent-text: #1a2620;
  --accent-control-text: #171918;
  --accent-control-hover-text: #ffffff;
  --accent-soft: rgba(122, 115, 236, 0.18);
  --accent-glow: rgba(122, 115, 236, 0.42);
}
/* Dark-mode readability: the light accents get white on-text when used as
   solid fills against dark surfaces would be low-contrast the other way, so
   keep their designed on-color. Nothing to override — vars already hold it. */

/* ------- Base ------------------------------------------------------------- */
body {
  font-family: var(--font-sans);
  color: var(--fg-base);
  background: var(--bg-base);
  line-height: 1.65;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  background-image: none;
}

main {
  overflow: clip;
}

::selection {
  background: var(--accent);
  color: var(--accent-text);
}

a {
  color: var(--accent);
  text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent);
  text-underline-offset: 2px;
}
a:hover {
  color: var(--accent-hover);
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: clamp(1.2rem, 4vw, 4rem);
}

/* theme + accent controls (live in the bottom-right tab) */
.controls {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding-right: calc(34px + 0.6rem);
}
.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 2px;
  border: 1px solid var(--border-strong);
  background: var(--bg-base);
  color: var(--fg-muted);
  cursor: pointer;
  caret-color: transparent;
  user-select: none;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.icon-btn:hover {
  color: var(--fg-base);
  border-color: var(--accent);
}
.icon-btn svg {
  width: 17px;
  height: 17px;
}
.icon-btn .moon {
  display: none;
}
:root[data-theme="dark"] .icon-btn .moon {
  display: block;
}
:root[data-theme="dark"] .icon-btn .sun {
  display: none;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .icon-btn .moon {
    display: block;
  }
  :root:not([data-theme]) .icon-btn .sun {
    display: none;
  }
}

.swatches {
  display: flex;
  gap: 5px;
  padding: 3px 5px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--bg-base);
}
.swatch {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 2px solid transparent;
  padding: 0;
  cursor: pointer;
  outline: none;
  /* Empty <button>s: stop Chromium painting a text caret on focus. */
  caret-color: transparent;
  user-select: none;
  transition: transform 0.12s;
}
.swatch:hover {
  transform: scale(1.18);
}
.swatch[aria-pressed="true"] {
  border-color: var(--fg-base);
}
.swatch--orange {
  background: #bf5700;
}
.swatch--sage {
  background: #6f9179;
}
.swatch--garnet {
  background: #73000a;
}
.swatch--periwinkle {
  background: #88a9f1;
}
.swatch--violet {
  background: #967dff;
}
.swatch--indigo {
  background: #7a73ec;
}

/* ------- Prose (rendered markdown inside panels) ------------------------- */
.prose {
  min-width: 0;
  max-width: 66ch;
}
.prose > * + * {
  margin-top: 1rem;
}
.prose h2,
.prose h3 {
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-top: 1.6rem;
}
.prose p {
  color: var(--fg-base);
}
.prose ul,
.prose ol {
  padding-left: 1.3rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.prose li {
  color: var(--fg-base);
}
.prose li::marker {
  color: var(--accent);
}
.prose strong {
  font-weight: 700;
}
.lead code,
.prose :not(pre) > code {
  font: inherit;
  padding: 0;
  background: none;
  color: var(--accent);
  white-space: inherit;
}
.prose pre {
  overflow-x: auto;
  padding: 1rem 1.15rem;
  border-radius: 2px;
  background: var(--bg-sidebar);
  border: 1px solid var(--border-subtle);
}
.prose pre code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: none;
  padding: 0;
  color: var(--fg-base);
  white-space: pre;
}
.prose blockquote {
  border-left: 3px solid var(--accent);
  padding: 0.2rem 0 0.2rem 1rem;
  color: var(--fg-muted);
  background: var(--accent-soft);
  border-radius: 2px;
}
.prose a {
  font-weight: 600;
}
.brand-inline__accent {
  color: var(--accent);
}

.prose img {
  border-radius: 1px;
  margin-top: 0.5rem;
}
.prose kbd {
  font-family: var(--font-mono);
  font-size: 0.82em;
  padding: 0.1em 0.45em;
  border-radius: 6px;
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  background: var(--bg-base);
}

/* ------- Callouts (blockquotes starting with a marker) ------------------- */
.callout {
  display: flex;
  gap: 0.8rem;
  padding: 1rem 1.2rem;
  border-radius: 2px;
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 38%, transparent);
}
.callout__icon {
  color: var(--accent);
  flex: none;
  font-size: 1.1rem;
  line-height: 1.5;
}
.callout p {
  margin: 0;
}

/* ------- Lightbox (click a screenshot to enlarge) ------------------------ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 4vmin;
  cursor: zoom-out;
  /* translucent + blurred backdrop, tinted toward the current surface */
  background: color-mix(in srgb, var(--bg-base) 58%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  backdrop-filter: blur(16px) saturate(1.3);
  /* hidden until opened */
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.2s ease, visibility 0s linear 0.2s;
}
.lightbox.open {
  visibility: visible;
  opacity: 1;
  transition: opacity 0.2s ease;
}
.lightbox__frame {
  margin: 0;
  padding: 12px;
  border-radius: 4px;
  background: var(--bg-base);
  border: 1px solid var(--border-subtle);
  /* the accent border + glow the brief asked for */
  box-shadow: 0 0 0 2px var(--accent),
    0 0 0 8px var(--accent-soft),
    0 40px 120px -30px var(--accent-glow);
  transform: scale(0.96);
  transition: transform 0.2s ease;
  max-width: min(96vw, 1680px);
  max-height: 92vh;
  display: flex;
}
.lightbox.open .lightbox__frame {
  transform: scale(1);
}
.lightbox__frame img {
  display: block;
  width: auto;
  height: auto;
  /* fit inside the frame minus its padding, preserving aspect ratio */
  max-width: calc(min(96vw, 1680px) - 24px);
  max-height: calc(92vh - 24px);
  border-radius: 1px;
}

.lightbox__frame--vector {
  padding: 8px;
}

.lightbox__frame--vector img {
  border-radius: 3px;
}

.lightbox__frame--scanner {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  contain: paint;
  padding: 0;
  border-radius: 18px;
  -webkit-mask-image: -webkit-radial-gradient(white, black);
}

.lightbox__frame--scanner::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: var(--accent);
  opacity: 0.14;
  pointer-events: none;
}

.lightbox__frame--scanner img {
  filter: grayscale(1) contrast(1.04);
  border-radius: inherit;
}

/* ------- Footer ----------------------------------------------------------- */
/* Controls tab pinned into the bottom-right corner: right + bottom edges flush
   with the page, only the top-left corner (poking up into content) rounded.
   Fixed, so it floats over whatever content is beneath it. Holds the accent
   swatches + light/dark toggle. */
.site-footer {
  position: fixed;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 5px 0.55rem 5px 0.65rem;
  color: var(--fg-base);
  background: var(--chrome-bg);
  -webkit-backdrop-filter: blur(10px) saturate(1.3);
  backdrop-filter: blur(10px) saturate(1.3);
  border-top: 1px solid var(--border-subtle);
  border-left: 1px solid var(--border-subtle);
  border-color: var(--border-strong);
  border-radius: 18px 0 0 0;
  box-shadow: -10px -12px 38px -22px var(--ribbon-shadow), 0 0 0 1px var(--border-subtle);
}

.site-footer .icon-btn {
  /* Remove the 34px roundel from the rail's height while keeping its hit area. */
  position: absolute;
  right: 0;
  bottom: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
}

.site-footer .icon-btn svg {
  width: 18px;
  height: 18px;
}

/* Keep the floating nav tab compact on small screens. */
@media (max-width: 480px) {
  .topbar__panel {
    gap: 0.85rem;
    padding: 0.55rem 0.85rem 0.6rem;
  }
  .brand {
    font-size: 1.05rem;
  }
  .brand__sub {
    display: none;
  }
  .topnav-link {
    font-size: 0.9rem;
  }
}

/* Instrument-like floating navigation. */
.topbar {
  position: fixed;
  z-index: 50;
  top: 0;
  left: 0;
  display: flex;
  align-items: stretch;
}

.topbar__panel {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-height: 2.8rem;
  padding: 0.5rem 1.35rem 0.54rem;
  color: var(--fg-base);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  background: var(--chrome-bg);
  border-bottom: 1px solid var(--border-strong);
  border-right: 1px solid var(--border-strong);
  border-color: var(--border-strong);
  border-radius: 0 0 14px 0;
  box-shadow: 10px 14px 42px -22px var(--ribbon-shadow);
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.65ch;
  font-size: 1rem;
  font-weight: 760;
  letter-spacing: -0.025em;
  color: var(--fg-base);
  text-decoration: none;
}

.brand__sub {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--fg-faint);
  text-transform: uppercase;
}

.topnav-link {
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.025em;
  color: var(--fg-muted);
  text-decoration: none;
  transition: color 0.15s;
}

.topbar__sep {
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--fg-faint);
  opacity: 0.6;
  user-select: none;
}

.page-home .topbar__panel {
  color: var(--fg-base);
  background: var(--chrome-bg);
  border-color: var(--border-strong);
}

.page-home .brand {
  color: var(--fg-base);
}

.page-home .brand__sub,
.page-home .topnav-link,
.page-home .topbar__sep {
  color: var(--fg-muted);
}

.page-home .topnav-link:hover {
  color: var(--accent);
}

.topbar__peek {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.5ch;
  margin-left: -0.3rem;
  padding: 0 1rem 0 1.35rem;
  font: inherit;
  color: var(--accent-control-text);
  background: var(--accent);
  border: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 72%, white);
  border-right: 1px solid color-mix(in srgb, var(--accent) 72%, white);
  border-radius: 0 0 14px 0;
  box-shadow: 0 8px 34px -10px var(--accent-glow), 0 0 22px -8px var(--accent-glow);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: zoom-in;
  transition: color 0.15s, background 0.15s, box-shadow 0.15s;
}

.topbar__peek::before {
  content: "";
  position: absolute;
  top: 0;
  right: calc(100% - 1px);
  bottom: -1px;
  width: 5.5rem;
  pointer-events: none;
  background: inherit;
  border-bottom: inherit;
}

.topbar__peek:hover {
  color: var(--accent-control-hover-text);
  background: var(--accent-control-hover);
  box-shadow: 0 10px 38px -8px var(--accent-glow), 0 0 28px -6px var(--accent-glow);
}

.topbar__peek svg {
  width: 15px;
  height: 15px;
}

@media (max-width: 620px) {
  .topbar__peek {
    display: none;
  }
}

/* Hero: a dark imaging field with NiiVue-generated cortical geometry. */
.hero {
  position: relative;
  min-height: 0;
  padding-block: clamp(3.5rem, 4.4vw, 4.4rem) clamp(1.75rem, 2.5vw, 2.25rem);
  overflow: hidden;
  color: var(--hero-fg);
  background: var(--hero-bg);
  text-align: left;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.34;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: clamp(56px, 5vw, 88px) clamp(56px, 5vw, 88px);
  mask-image: linear-gradient(to right, black, transparent 72%);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 69% 51%, color-mix(in srgb, var(--accent) 15%, transparent), transparent 34%);
}

.hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(30rem, 1.1fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5.5rem);
}

.hero__copy {
  position: relative;
  z-index: 3;
  max-width: 43rem;
}

.hero__kicker {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: clamp(1.15rem, 2vw, 1.8rem);
  color: var(--hero-muted);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero__kicker span {
  width: 1.8rem;
  height: 1px;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}

.hero h1 {
  max-width: 15ch;
  font-size: clamp(2.85rem, 5.6vw, 5.8rem);
  font-weight: 650;
  line-height: 0.97;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.hero__wordmark > span {
  color: var(--accent);
  text-shadow: 0 0 18px var(--accent-glow);
}

.hero h1 > b {
  max-width: 18ch;
  margin-top: 0.24em;
  font-size: 0.46em;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.hero h1 b {
  display: inline-block;
  color: var(--hero-fg);
  font-weight: inherit;
}

.hero h1 b::after {
  content: "";
  display: block;
  width: 1.4em;
  height: 0.08em;
  margin-top: 0.15em;
  background: var(--accent);
}

.hero__tagline {
  max-width: 57ch;
  margin-top: clamp(1.4rem, 2.2vw, 2rem);
  color: var(--hero-muted);
  font-size: clamp(1rem, 1.45vw, 1.18rem);
  font-weight: 430;
  line-height: 1.65;
  text-wrap: pretty;
}

.hero__modalities {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1rem, 2vw, 2rem);
  margin-top: clamp(1.5rem, 2.8vw, 2.4rem);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero__modalities a {
  position: relative;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding-block: 0.35rem;
  color: var(--hero-muted);
  border-bottom: 1px solid transparent;
  text-decoration: none;
  transition: color 180ms ease, border-color 180ms ease;
}

.hero__modalities a:hover {
  color: var(--hero-fg);
  border-color: var(--accent);
}

.hero__modalities b {
  color: var(--accent);
  font-weight: 550;
}

.hero__visual {
  --hero-scan: 18%;
  --hero-radar-speed: 14.3s;
  --hero-image-size: 118% auto;
  --hero-base-image: url("mesh-base.png");
  --hero-active-image: url("mesh-active.png");
  position: relative;
  min-height: clamp(22rem, 36vw, 33rem);
  margin-right: min(-10vw, -3rem);
  isolation: isolate;
  animation: hero-radar-position var(--hero-radar-speed) linear infinite;
}

:root[data-hero-variant="voxel"] .hero__visual,
:root[data-hero-variant="coronal"] .hero__visual,
:root[data-hero-variant="sagittal"] .hero__visual,
:root[data-hero-variant="render"] .hero__visual,
:root[data-hero-variant="mri"] .hero__visual {
  --hero-image-size: 96% auto;
  animation-name: hero-radar-position-wide;
}

:root[data-hero-variant="voxel"] .hero__visual {
  --hero-base-image: url("voxel-base.png");
  --hero-active-image: url("voxel-active.png");
}

:root[data-hero-variant="coronal"] .hero__visual {
  --hero-base-image: url("coronal-base.png");
  --hero-active-image: url("coronal-active.png");
}

:root[data-hero-variant="sagittal"] .hero__visual {
  --hero-base-image: url("sagittal-base.png");
  --hero-active-image: url("sagittal-active.png");
}

:root[data-hero-variant="render"] .hero__visual {
  --hero-base-image: url("render-base.png");
  --hero-active-image: url("render-active.png");
}

:root[data-hero-variant="mri"] .hero__visual {
  --hero-base-image: url("mri-base.png");
  --hero-active-image: url("mri-active.png");
}

.hero__visual[role="button"] {
  cursor: pointer;
  user-select: none;
}

.hero__visual.radar-paused,
.hero__visual.radar-paused .hero__scanline,
.hero__visual.radar-offscreen,
.hero__visual.radar-offscreen .hero__scanline {
  animation-play-state: paused;
}

.hero__mesh-base,
.hero__activation {
  position: absolute;
  inset: 0;
  background-position: center;
  background-repeat: no-repeat;
  /* One shared size keeps each base/activation pair registered. */
  background-size: var(--hero-image-size);
}

.hero__mesh-base {
  z-index: 1;
  background-image: var(--hero-base-image);
  filter: contrast(1.02) brightness(0.78);
  opacity: 0.88;
}

.hero__activation {
  z-index: 2;
  background: linear-gradient(
    90deg,
    transparent 0%,
    transparent calc(var(--hero-scan) - 46.8%),
    color-mix(in srgb, var(--accent) 5%, transparent) calc(var(--hero-scan) - 39%),
    color-mix(in srgb, var(--accent) 16%, transparent) calc(var(--hero-scan) - 23.4%),
    color-mix(in srgb, var(--accent) 42%, transparent) calc(var(--hero-scan) - 10.4%),
    color-mix(in srgb, var(--accent) 76%, transparent) calc(var(--hero-scan) - 3.64%),
    var(--accent) calc(var(--hero-scan) - 0.12%),
    transparent calc(var(--hero-scan) + 0.12%),
    transparent 100%
  );
  -webkit-mask: var(--hero-active-image) center / var(--hero-image-size) no-repeat;
  mask: var(--hero-active-image) center / var(--hero-image-size) no-repeat;
  filter: drop-shadow(0 0 8px var(--accent-glow));
  opacity: 0.96;
}

.hero__scanline {
  position: absolute;
  z-index: 3;
  top: 12%;
  bottom: 12%;
  left: var(--hero-scan);
  width: 2px;
  background: linear-gradient(transparent, color-mix(in srgb, var(--accent) 92%, white) 28%, color-mix(in srgb, var(--accent) 92%, white) 72%, transparent);
  box-shadow: 0 0 6px var(--accent), 0 0 22px var(--accent-glow);
  transform: translateX(-50%);
  opacity: 0;
  animation: hero-radar-line var(--hero-radar-speed) linear infinite;
}

.hero__coordinates {
  position: absolute;
  z-index: 4;
  right: 8%;
  bottom: 10%;
  display: flex;
  gap: 1.2rem;
  color: rgba(240, 241, 237, 0.42);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero__coordinates--voxel,
.hero__coordinates--coronal,
.hero__coordinates--sagittal,
.hero__coordinates--render,
.hero__coordinates--mri {
  display: none;
}

:root[data-hero-variant="voxel"] .hero__coordinates--mesh,
:root[data-hero-variant="coronal"] .hero__coordinates--mesh,
:root[data-hero-variant="sagittal"] .hero__coordinates--mesh,
:root[data-hero-variant="render"] .hero__coordinates--mesh,
:root[data-hero-variant="mri"] .hero__coordinates--mesh {
  display: none;
}

:root[data-hero-variant="voxel"] .hero__coordinates--voxel,
:root[data-hero-variant="coronal"] .hero__coordinates--coronal,
:root[data-hero-variant="sagittal"] .hero__coordinates--sagittal,
:root[data-hero-variant="render"] .hero__coordinates--render,
:root[data-hero-variant="mri"] .hero__coordinates--mri {
  display: flex;
}

@property --hero-scan {
  syntax: "<percentage>";
  inherits: true;
  initial-value: 18%;
}

@keyframes hero-radar-position {
  from { --hero-scan: 18%; }
  to { --hero-scan: 82%; }
}

@keyframes hero-radar-position-wide {
  from { --hero-scan: 0%; }
  to { --hero-scan: 100%; }
}

@keyframes hero-radar-line {
  0%, 99.7% { opacity: 0.92; }
  99.8%, 100% { opacity: 0; }
}

/* Editorial section structure. */
.section {
  padding-block: clamp(4.4rem, 7.2vw, 7.2rem);
}

.page-home #projects {
  padding-block: clamp(2.1rem, 3.2vw, 3.2rem) clamp(1.25rem, 2vw, 1.8rem);
}

.page-home #projects .cards {
  border-bottom: 0;
}

.page-home .section--tools {
  padding-block: clamp(1.9rem, 2.8vw, 2.8rem) clamp(0.4rem, 0.8vw, 0.7rem);
}

.section__head {
  display: grid;
  grid-template-columns: minmax(16rem, 0.8fr) minmax(20rem, 1fr);
  align-items: end;
  gap: clamp(2rem, 8vw, 9rem);
  max-width: none;
  margin-bottom: clamp(2.5rem, 4.8vw, 4.4rem);
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--border-strong);
}

.page-home .section__head {
  margin-bottom: 0;
  padding-bottom: 1.2rem;
  border-bottom: 0;
}

.section__eyebrow {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.67rem;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.page-home .section__eyebrow {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.74rem;
}

.page-home .section__eyebrow::before {
  content: "";
  width: 1.8rem;
  height: 1px;
  flex: none;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}

.section h2 {
  max-width: 15ch;
  margin-top: 0.75rem;
  font-size: clamp(2.05rem, 3.65vw, 3.9rem);
  font-weight: 620;
  line-height: 1.02;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.section__lead {
  max-width: 54ch;
  margin: 0;
  color: var(--fg-muted);
  font-size: clamp(1rem, 1.35vw, 1.15rem);
  line-height: 1.65;
  text-wrap: pretty;
}

/* Tutorials become an indexed protocol list, not a grid of generic cards. */
.cards {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-bottom: 1px solid var(--border-strong);
}

.card {
  position: relative;
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr) 6rem;
  align-items: center;
  gap: clamp(1rem, 3vw, 3rem);
  min-height: 6.35rem;
  padding: clamp(0.85rem, 1.5vw, 1.3rem) 0;
  color: inherit;
  text-decoration: none;
  background: transparent;
  border: 0;
  border-top: 1px solid var(--border-strong);
  border-radius: 0;
  overflow: visible;
  transition: color 220ms ease, background 220ms ease, padding 220ms ease;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 2px;
  height: auto;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: center;
  opacity: 1;
  transition: transform 220ms ease;
}

.card:hover {
  padding-inline: 1.1rem;
  color: inherit;
  background: color-mix(in srgb, var(--accent) 5%, transparent);
  border-color: var(--border-strong);
  box-shadow: none;
  transform: none;
}

.card:hover::before {
  transform: scaleY(1);
}

.card__index,
.step__num {
  display: inline-grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  color: var(--accent-text);
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 50%;
  box-shadow: 0 6px 18px -8px var(--accent-glow);
  font-family: var(--font-mono);
  /* At the 16px minimum root, 1.2rem/700 qualifies as WCAG large text, so the
     branded on-accent pairs use the 3:1 threshold without changing colors. */
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
}

.card__index {
  align-self: start;
  margin-top: 0.1rem;
}

.card__content {
  display: grid;
  grid-template-columns: minmax(13rem, 0.7fr) minmax(18rem, 1fr);
  align-items: start;
  gap: 0.85rem clamp(2rem, 5vw, 6rem);
}

.card__tags {
  display: flex;
  flex-wrap: wrap;
  grid-column: 1 / -1;
  gap: 0.35rem 0.7rem;
}

.chip {
  padding: 0;
  color: var(--fg-faint);
  background: transparent;
  border-radius: 0;
  font-family: var(--font-mono);
  font-size: 0.63rem;
  font-weight: 550;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.chip + .chip::before {
  content: "/";
  margin-right: 0.7rem;
  color: var(--border-strong);
}

.card h3 {
  max-width: 18ch;
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  font-weight: 650;
  line-height: 1.12;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.card p {
  max-width: 56ch;
  color: var(--fg-muted);
  font-size: 0.94rem;
  line-height: 1.62;
}

.card__meta {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  margin: 0;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 550;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg-faint);
}

.card__go {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent);
}

.card__go svg {
  transition: transform 180ms ease;
}

.card:hover .card__go svg {
  transform: translateX(4px);
}

/* Dark technical index — a deliberate bookend to the dark imaging hero. */
.section--tools {
  color: var(--hero-fg);
  background: #0a0c0c;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.section--tools .section__head {
  border-color: rgba(255, 255, 255, 0.16);
}

.section--tools .section__lead {
  color: var(--hero-muted);
}

.tools {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0 2rem;
}

.tool {
  min-height: 6rem;
  padding: 0.8rem 0 1rem;
  color: var(--hero-fg);
  text-decoration: none;
  background: transparent;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 0;
  transition: border-color 180ms ease, transform 180ms ease;
}

.tool:hover {
  color: var(--hero-fg);
  background: transparent;
  border-color: var(--accent);
  transform: translateY(-2px);
}

.tool strong {
  display: inline-block;
  color: var(--hero-fg);
  font-size: 0.95rem;
  font-weight: 650;
}

.tool strong::after {
  content: "↗";
  margin-left: 0.45rem;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.tool span {
  display: block;
  max-width: 30ch;
  margin-top: 0.55rem;
  color: var(--hero-muted);
  font-size: 0.78rem;
  line-height: 1.55;
}

/* Tutorial and About pages share the same quieter editorial language. */
.container:has(> .panels) {
  max-width: var(--maxw-text);
}

.tut-hero {
  max-width: var(--maxw);
}

.tut-hero,
.about {
  position: relative;
}

.tut-hero::before,
.about::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: clamp(1.2rem, 4vw, 4rem);
  width: 1px;
  background: var(--border-subtle);
  pointer-events: none;
}

.tut-hero {
  padding-block: clamp(5rem, 7vw, 6.8rem) clamp(2rem, 4vw, 3rem);
  border-bottom: 1px solid var(--border-strong);
}

.tut-hero .back,
.about .back {
  display: inline-flex;
  align-items: center;
  gap: 0.4ch;
  margin-bottom: clamp(1.6rem, 3vw, 2.5rem);
  color: var(--fg-faint);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  text-decoration: none;
}

.tut-hero .back:hover,
.about .back:hover {
  color: var(--accent);
}

.tut-hero h1 {
  max-width: 16ch;
  font-size: clamp(2.7rem, 6vw, 5.4rem);
  font-weight: 630;
  line-height: 0.98;
  letter-spacing: -0.055em;
  text-wrap: balance;
}

.tut-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(24rem, 1.1fr);
  align-items: center;
  gap: clamp(2rem, 3.5vw, 4rem);
}

.tut-hero__copy {
  min-width: 0;
}

.tut-hero__scanner {
  position: relative;
  isolation: isolate;
  width: 100%;
  max-width: 40rem;
  aspect-ratio: 4 / 3;
  justify-self: end;
  padding: 0;
  overflow: hidden;
  contain: paint;
  color: inherit;
  background: var(--bg-sidebar);
  border: 1px solid color-mix(in srgb, var(--accent) 12%, transparent);
  border-radius: 18px;
  /* Force older WebKit versions to clip composited children to the radius. */
  -webkit-mask-image: -webkit-radial-gradient(white, black);
  box-shadow:
    inset 0 0 28px color-mix(in srgb, var(--accent) 10%, transparent),
    0 22px 55px -44px color-mix(in srgb, var(--accent) 32%, transparent);
  cursor: pointer;
}

.tut-hero__scanner::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  background: var(--accent);
  /* A normal translucent wash is visually close to color blending, but it
     remains in the same stable compositing layer on older mobile Safari. */
  opacity: 0.14;
  pointer-events: none;
}

.tut-hero__scanner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.04);
  opacity: 0;
  transform: scale(1.015);
  transition: opacity 0.22s ease, transform 0.35s ease;
}

.tut-hero__scanner.is-ready img {
  opacity: 0.9;
}

.tut-hero__scanner:hover img,
.tut-hero__scanner:focus-visible img {
  transform: scale(1.035);
}

.tut-hero__scanner.is-loading img {
  /* Keep the current decoded image visible while its successor loads. */
  opacity: 0.9;
}

.tut-hero__scanner:active {
  transform: translateY(1px);
}

.tut-hero .lead {
  max-width: 60ch;
  margin-top: 1.35rem;
  color: var(--fg-muted);
  font-size: clamp(1rem, 1.5vw, 1.17rem);
  line-height: 1.68;
}

.tut-hero__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.6rem;
}

.panels {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-bottom: clamp(2.5rem, 5vw, 4.5rem);
}

.panel {
  margin-top: clamp(2rem, 4vw, 3.5rem);
  padding: clamp(1.25rem, 2.4vw, 2rem);
  background: color-mix(in srgb, var(--accent) 4%, var(--bg-elevated));
  border: 0;
  border-left: 2px solid var(--accent);
  border-radius: 0;
}

.step {
  display: grid;
  align-items: center;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: clamp(2rem, 6vw, 6.5rem);
  min-height: 0;
  padding-block: clamp(3rem, 5.5vw, 5.2rem);
  border-top: 1px solid var(--border-strong);
}

.step:nth-of-type(even) .step__media {
  order: -1;
}

.step__body {
  min-width: 0;
}

.step:first-child {
  border-top: 0;
}

.step__num {
  margin-bottom: 1.5rem;
}

.step__body h2 {
  max-width: 20ch;
  margin-bottom: 1.2rem;
  font-size: clamp(1.65rem, 3vw, 2.55rem);
  font-weight: 620;
  line-height: 1.08;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.shot {
  margin: 0;
  padding: 7px;
  background: color-mix(in srgb, var(--bg-sidebar) 82%, #000);
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  box-shadow: 18px 28px 70px -42px var(--accent-glow);
  cursor: zoom-in;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.shot:hover {
  transform: translateY(-2px);
  box-shadow: 18px 34px 80px -40px var(--accent-glow);
}

.shot img {
  border-radius: 1px;
  width: 100%;
  height: auto;
}

.shot figcaption {
  padding: 0.65rem 0.3rem 0.1rem;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.03em;
  color: var(--fg-faint);
  text-align: center;
}

.content-shot {
  width: min(100%, var(--content-image-width, 60rem));
  margin-inline: auto;
  padding: 0;
  overflow: hidden;
  background: transparent;
  border: 0;
  border-radius: 8px;
  box-shadow: none;
}

.content-shot:hover {
  box-shadow: none;
}

.content-shot__media {
  position: relative;
  display: block;
  overflow: hidden;
  background: transparent;
  border-radius: 8px 8px 0 0;
}

.content-shot__media img {
  display: block;
  filter: grayscale(1) contrast(1.04);
}

.content-shot__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--accent);
  mix-blend-mode: color;
  opacity: 0.16;
  pointer-events: none;
}

.content-shot figcaption {
  padding: 0.7rem 0.85rem 0.75rem;
  background: color-mix(in srgb, var(--accent) 10%, var(--bg-base));
  border-radius: 0 0 8px 8px;
}

.chart-shot {
  padding: 0;
  background: color-mix(in srgb, var(--accent) 10%, var(--bg-base));
  border: 0;
  border-radius: 18px;
  box-shadow: none;
  overflow: hidden;
}

.prose > * + .chart-shot {
  margin-top: 1.75rem;
}

.chart-shot:hover {
  box-shadow: none;
}

.chart-shot img,
.chart-shot .chart-svg {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 18px 18px 0 0;
}

.chart-shot figcaption {
  padding: 0.8rem 0.5rem 0.75rem;
}

.chart-source {
  position: relative;
  z-index: 1;
  height: 0;
  padding-right: 1rem;
  transform: translateY(calc(-2.15rem - 4px));
  text-align: right;
}

.chart-source a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-decoration: none;
  text-transform: uppercase;
}

.chart-source svg {
  width: 13px;
  height: 13px;
}

.about {
  isolation: isolate;
  overflow: hidden;
  padding-block: clamp(5rem, 7vw, 6.8rem) clamp(3.5rem, 6vw, 5.5rem);
}

.about__radar {
  --about-radar-angle: 0deg;
  --about-radar-speed: 14.3s;
  --about-radar-base: url("rq-ax-base.png");
  --about-radar-active: url("rq-ax-active.png");
  position: absolute;
  z-index: 2;
  top: clamp(1.5rem, 3vw, 3rem);
  right: clamp(-4rem, -2vw, -1rem);
  width: clamp(18rem, 30vw, 29rem);
  aspect-ratio: 1;
  isolation: isolate;
  animation: about-radar-position var(--about-radar-speed) linear infinite;
}

.hero__about-radar {
  top: 50%;
  right: clamp(1.5rem, 8vw, 9rem);
  width: clamp(22rem, 34vw, 34rem);
  transform: translateY(-50%);
}

:root[data-about-radar-variant="cor"] .about__radar {
  --about-radar-base: url("rq-cor-base.png");
  --about-radar-active: url("rq-cor-active.png");
}

:root[data-about-radar-variant="mesh"] .about__radar {
  --about-radar-base: url("rq-mesh-base.png");
  --about-radar-active: url("rq-mesh-active.png");
}

:root[data-about-radar-variant="sag"] .about__radar {
  --about-radar-base: url("rq-sag-base.png");
  --about-radar-active: url("rq-sag-active.png");
}

:root[data-about-radar-variant="mri"] .about__radar {
  --about-radar-base: url("rq-mri-base.png");
  --about-radar-active: url("rq-mri-active.png");
}

:root[data-about-radar-variant="axrender"] .about__radar {
  --about-radar-base: url("rq-axrender-base.png");
  --about-radar-active: url("rq-axrender-active.png");
}

:root[data-about-radar-variant="corrender"] .about__radar {
  --about-radar-base: url("rq-corrender-base.png");
  --about-radar-active: url("rq-corrender-active.png");
}

:root[data-about-radar-variant="sagrender"] .about__radar {
  --about-radar-base: url("rq-sagrender-base.png");
  --about-radar-active: url("rq-sagrender-active.png");
}

.about__radar[role="button"] {
  cursor: pointer;
  user-select: none;
}

.about__radar-base,
.about__radar-activation,
.about__radar-arm {
  position: absolute;
}

.about__radar-base {
  z-index: 1;
  inset: 0;
  background: var(--about-radar-base) center / contain no-repeat;
  filter: contrast(1.02) brightness(0.8);
  opacity: var(--about-radar-base-opacity);
}

.about__radar-activation {
  z-index: 2;
  inset: 0;
  -webkit-mask: var(--about-radar-active) center / contain no-repeat;
  mask: var(--about-radar-active) center / contain no-repeat;
  mask-mode: alpha;
  filter: drop-shadow(0 0 8px var(--accent-glow));
  opacity: 1;
}

.about__radar-sweep {
  position: absolute;
  inset: 0;
  background: conic-gradient(
    from -76deg at 50% 50%,
    transparent 0deg,
    color-mix(in srgb, var(--accent) 8%, transparent) 12deg,
    color-mix(in srgb, var(--accent) 42%, transparent) 54deg,
    var(--accent) 76deg,
    transparent 76deg
  );
  transform: rotate(var(--about-radar-angle));
}

.about__radar-arm {
  z-index: 3;
  top: 50%;
  left: 50%;
  width: 50%;
  height: 2px;
  background: var(--accent);
  transform: translateY(-50%) rotate(calc(var(--about-radar-angle) - 90deg));
  transform-origin: left center;
}

.about__radar.radar-paused,
.about__radar.radar-offscreen {
  animation-play-state: paused;
}

@property --about-radar-angle {
  syntax: "<angle>";
  inherits: true;
  initial-value: 0deg;
}

@keyframes about-radar-position {
  from { --about-radar-angle: 0deg; }
  to { --about-radar-angle: 360deg; }
}

.about > .container {
  position: relative;
  z-index: 1;
  max-width: var(--maxw-text);
}

.about .section__head {
  display: block;
  max-width: 58rem;
}

.about .section__head h2 {
  max-width: 14ch;
}

.about__prose {
  max-width: 68ch;
  margin-bottom: 2.5rem;
}

.about__prose p {
  color: var(--fg-muted);
  line-height: 1.6;
}

.about__prose > p + p {
  margin-top: 1.25rem;
}

.about__lead {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
}

.about__fronts {
  margin-block: 1.6rem 1.8rem;
}

.about__fronts > div {
  display: grid;
  grid-template-columns: minmax(10rem, 0.42fr) minmax(0, 1fr);
  gap: clamp(1.2rem, 3vw, 2.5rem);
  padding-block: 1.15rem;
  border-top: 1px solid var(--border-strong);
}

.about__fronts dt {
  color: var(--fg-base);
  font-weight: 650;
  line-height: 1.35;
}

.about__fronts dd {
  color: var(--fg-muted);
  line-height: 1.6;
}

.about__prose a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.about__prose a:hover {
  text-decoration: underline;
}

.about__quote {
  position: absolute;
  z-index: 2;
  top: clamp(28rem, 46vw, 45rem);
  right: clamp(1rem, 4vw, 4rem);
  width: clamp(15rem, 23vw, 20rem);
  padding-top: 1rem;
  border-top: 1px solid color-mix(in srgb, var(--accent) 58%, transparent);
  color: var(--fg-base);
  text-align: right;
}

.about__quote p {
  font-size: clamp(1.15rem, 1.8vw, 1.5rem);
  font-weight: 580;
  line-height: 1.3;
  letter-spacing: -0.025em;
}

.about__quote cite {
  display: block;
  margin-top: 0.65rem;
  color: var(--fg-faint);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 550;
  letter-spacing: 0.055em;
  text-align: left;
}

.about-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0 2rem;
}

.about-link {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-height: 5.5rem;
  padding: 0.9rem 0;
  background: transparent;
  border: 0;
  border-top: 1px solid var(--border-strong);
  border-radius: 0;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}

.about-link:hover {
  background: transparent;
  border-color: var(--accent);
  transform: translateY(-2px);
}

.about-link__label {
  display: inline-flex;
  align-items: center;
  gap: 0.4ch;
  color: var(--fg-base);
  font-weight: 650;
}

.about-link__sub {
  margin-top: 0.45rem;
  color: var(--fg-muted);
  font-size: 0.9rem;
}

/* About-page bookend: the home page's technical field panel, adapted for
   the team's physical research hub and documentary architectural image. */
.about-hub {
  padding-block: clamp(3.4rem, 5.5vw, 5.6rem);
}

.about-hub .section__head {
  margin-bottom: clamp(2rem, 3.5vw, 3.2rem);
}

.about-hub .section__head h2 {
  max-width: 12ch;
}

.about-hub .section__lead {
  max-width: 68ch;
  line-height: 1.68;
}

.about-hub .section__lead a {
  color: var(--hero-fg);
  font-weight: 620;
  text-decoration-color: color-mix(in srgb, var(--accent) 58%, transparent);
  text-underline-offset: 0.2em;
}

.about-hub .section__lead a:hover {
  color: var(--accent);
}

.about-hub__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(18rem, 0.55fr);
  align-items: stretch;
  gap: clamp(2rem, 5vw, 5rem);
}

.about-hub__image {
  position: relative;
  isolation: isolate;
  align-self: start;
  margin: 0;
  overflow: hidden;
  background: #0a0c0c;
  border-radius: 18px;
  box-shadow: 0 24px 64px -42px var(--accent-glow);
}

.about-hub__image::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: var(--accent);
  mix-blend-mode: color;
  opacity: 0.16;
  pointer-events: none;
}

.about-hub__image img {
  display: block;
  width: 100%;
  height: auto;
  filter: grayscale(1) contrast(1.04);
  opacity: 0.9;
}

.about-hub__directory {
  display: flex;
  flex-direction: column;
}

.about-hub__directory > * {
  padding: 1rem 0 1.15rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.about-hub__directory a {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  color: var(--hero-fg);
  text-decoration: none;
  transition: border-color 180ms ease, transform 180ms ease;
}

.about-hub__directory a:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.about-hub__directory strong {
  font-size: 0.95rem;
  font-weight: 650;
}

.about-hub__directory a span,
.about-hub__directory address {
  color: var(--hero-muted);
  font-size: 0.78rem;
  line-height: 1.55;
}

.about-hub__directory a span {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.about-hub__directory address {
  display: flex;
  flex-direction: column;
  margin: 0;
  font-style: normal;
}

/* lightNIIng identity: make NII the mark. */
.brand--lightniing {
  display: inline-block;
  gap: 0;
  letter-spacing: -0.025em;
  white-space: nowrap;
}

.brand--lightniing span {
  color: var(--accent);
  font-weight: 800;
  letter-spacing: inherit;
  text-shadow: 0 0 16px var(--accent-glow);
}

.brand--lightniing span::after {
  content: none;
}

/* The About page uses a static relief; the animated scanner is reserved for
   the hero. */
.about::after {
  content: "";
  position: absolute;
  z-index: 0;
  top: clamp(1.5rem, 3vw, 3rem);
  right: clamp(-4rem, -2vw, -1rem);
  width: clamp(18rem, 30vw, 29rem);
  aspect-ratio: 188 / 256;
  pointer-events: none;
  background: var(--accent);
  -webkit-mask: url("T1w-axial-outline.png") center / contain no-repeat;
  mask: url("T1w-axial-outline.png") center / contain no-repeat;
  filter:
    drop-shadow(-2px -2px 0 color-mix(in srgb, var(--accent) 30%, white))
    drop-shadow(3px 3px 0 color-mix(in srgb, var(--accent) 38%, black))
    drop-shadow(0 0 12px var(--accent-glow));
  opacity: 0.78;
}

@media (max-width: 760px) {
  .hero__about-radar {
    top: auto;
    right: -3.5rem;
    bottom: -5rem;
    width: 19rem;
    transform: none;
    opacity: 0.58;
  }

  .about::after {
    right: -5rem;
    width: 17rem;
    opacity: 0.35;
  }

}

@media (max-width: 900px) {
  .about__quote {
    display: none;
  }
}

@media (max-width: 1100px) {
  .hero {
    min-height: auto;
  }

  .hero__grid {
    grid-template-columns: minmax(0, 0.95fr) minmax(24rem, 1.05fr);
    gap: 1rem;
  }

  .hero__visual {
    margin-right: -9rem;
  }

  .card__content {
    grid-template-columns: minmax(12rem, 0.8fr) minmax(16rem, 1fr);
    column-gap: 2rem;
  }

  .tools {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 821px) and (max-width: 1250px) {
  :root[data-hero-variant="render"] .hero__visual {
    margin-right: 0;
  }
}

@media (max-width: 820px) {
  .hero {
    padding-bottom: 3rem;
  }

  .hero__grid {
    grid-template-columns: 1fr;
  }

  .hero__copy {
    max-width: 38rem;
  }

  .hero__modalities {
    display: none;
  }

  .hero__visual {
    min-height: min(32rem, 76vw);
    margin: -3rem -10vw -2rem 18vw;
  }

  :root[data-hero-variant="voxel"] .hero__visual,
  :root[data-hero-variant="coronal"] .hero__visual,
  :root[data-hero-variant="sagittal"] .hero__visual,
  :root[data-hero-variant="render"] .hero__visual,
  :root[data-hero-variant="mri"] .hero__visual {
    min-height: clamp(16rem, 43vw, 22rem);
    margin: -0.5rem -1rem -2rem;
  }

  .hero__coordinates {
    right: 12%;
  }

  .about__radar {
    --about-radar-base-opacity: 0.48;
    right: -4.5rem;
    width: 18rem;
  }

  .section__head {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 1.6rem;
  }

  .about-hub__grid {
    grid-template-columns: 1fr;
  }

  .card {
    grid-template-columns: 2.5rem minmax(0, 1fr) 5rem;
    gap: 1rem;
  }

  .card__content {
    grid-template-columns: 1fr;
  }

  .card__tags {
    grid-column: auto;
  }

  .tut-hero__grid {
    grid-template-columns: 1fr;
    gap: 2.25rem;
  }

  .tut-hero__scanner {
    max-width: 42rem;
  }

  .step {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .step:nth-of-type(even) .step__media {
    order: 0;
  }

  .tools,
  .about-links {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .topbar__panel {
    gap: 0.55rem;
    padding-inline: 0.75rem;
  }

  .topbar__sep {
    display: none;
  }

  .topnav-link {
    font-size: 0.68rem;
  }

  .hero {
    padding-top: 4.5rem;
  }

  .hero h1 {
    font-size: clamp(2.6rem, 12.5vw, 3.8rem);
  }

  .hero__visual {
    min-height: 20rem;
    margin: -1rem -8rem -2rem 0;
  }

  .hero__coordinates {
    right: 20%;
    flex-direction: column;
    gap: 0.2rem;
  }

  .section {
    padding-block: 3.5rem;
  }

  .section__head {
    margin-bottom: 2rem;
  }

  .card {
    grid-template-columns: 2rem minmax(0, 1fr);
    min-height: 0;
  }

  .card__meta {
    grid-column: 2;
    flex-direction: row;
    align-items: center;
    margin-top: 0.8rem;
  }

  .tools,
  .about-links {
    grid-template-columns: 1fr;
  }

  .about__fronts > div {
    grid-template-columns: 1fr;
    gap: 0.45rem;
  }

  .tool {
    min-height: 0;
  }

  .step {
    padding-block: 2.7rem;
  }

  .tut-hero::before,
  .about::before {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }

  .hero__visual,
  .hero__scanline,
  .about__radar {
    animation: none !important;
  }

  .hero__activation {
    display: none;
  }

  .hero__scanline {
    opacity: 0;
  }

  .hero__mesh-base {
    opacity: 0.78;
  }

  .about__radar-activation,
  .about__radar-arm {
    display: none;
  }
}
