/* ── Design tokens ───────────────────────────────────────── */
:root {
  --bg: #050608;
  --bg-elevated: #0c0e13;
  --bg-card: #111419;
  --bg-terminal: #080a0f;
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.16);
  --border-glow: rgba(167, 139, 250, 0.28);
  --text: #f0f2f5;
  --text-muted: #9aa3ad;
  --text-dim: #636d78;
  --accent: #b794f6;
  --accent-bright: #d4bbff;
  --accent-dim: rgba(183, 148, 246, 0.14);
  --accent-glow: rgba(167, 139, 250, 0.35);
  --cyan: #5eead4;
  --cyan-dim: rgba(94, 234, 212, 0.12);
  --cyan-glow: rgba(94, 234, 212, 0.25);
  --terminal-green: #7ddea8;
  --terminal-green-bright: #a7f3c7;
  --terminal-dim: #4ade80;
  --amber: #fbbf24;
  --amber-dim: rgba(251, 191, 36, 0.12);
  --font-sans: "IBM Plex Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", "JetBrains Mono", ui-monospace, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --radius: 10px;
  --nav-h: 64px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.45), 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.55), 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-terminal:
    0 0 0 1px rgba(255, 255, 255, 0.06),
    0 0 0 1px rgba(167, 139, 250, 0.08) inset,
    0 4px 24px rgba(0, 0, 0, 0.5),
    0 32px 80px rgba(0, 0, 0, 0.65),
    0 0 100px rgba(94, 234, 212, 0.04),
    0 0 140px rgba(167, 139, 250, 0.07);
  --shadow-glow-focus:
    0 0 0 1px rgba(183, 148, 246, 0.45),
    0 0 40px rgba(167, 139, 250, 0.15),
    0 32px 80px rgba(0, 0, 0, 0.65);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
}

/* Layered ambient background */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 90% 60% at 15% -10%, rgba(167, 139, 250, 0.14), transparent 55%),
    radial-gradient(ellipse 70% 50% at 95% 5%, rgba(94, 234, 212, 0.08), transparent 50%),
    radial-gradient(ellipse 60% 45% at 50% 110%, rgba(125, 222, 168, 0.06), transparent 55%),
    radial-gradient(ellipse 40% 30% at 80% 60%, rgba(251, 191, 36, 0.04), transparent 45%);
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 85% 75% at 50% 40%, black 20%, transparent 75%);
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
}

/* NVE page — richer terminal atmosphere */
.page-nve::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 55% 45% at 50% 55%, rgba(94, 234, 212, 0.07), transparent 65%),
    radial-gradient(ellipse 40% 35% at 20% 80%, rgba(167, 139, 250, 0.1), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.page-nve main {
  position: relative;
  z-index: 1;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.25s var(--ease), opacity 0.25s var(--ease);
}

a:hover { color: var(--accent); }

img { max-width: 100%; display: block; }

/* ── Layout ─────────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
  background: rgba(5, 6, 8, 0.78);
  backdrop-filter: blur(20px) saturate(1.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.logo-mark {
  width: 28px;
  height: 28px;
  border: 1px solid rgba(183, 148, 246, 0.25);
  border-radius: 6px;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  background: linear-gradient(145deg, rgba(167, 139, 250, 0.12), rgba(94, 234, 212, 0.06));
  box-shadow: 0 0 20px rgba(167, 139, 250, 0.12);
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.logo:hover .logo-mark {
  border-color: var(--border-glow);
  color: var(--accent-bright);
  box-shadow: 0 0 28px rgba(167, 139, 250, 0.28);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.logo-text { color: var(--text-muted); font-size: 0.9rem; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.site-nav a {
  font-size: 0.875rem;
  color: var(--text-muted);
  position: relative;
}

.site-nav a.active,
.site-nav a:hover { color: var(--text); }

.site-nav a.active::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), var(--cyan));
  box-shadow: 0 0 12px rgba(167, 139, 250, 0.5);
  transform: scaleX(1);
  transition: transform 0.3s var(--ease);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.4rem 0.65rem;
  border-radius: 6px;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

main {
  position: relative;
  z-index: 1;
  padding-top: var(--nav-h);
}

.container {
  width: min(1120px, 100% - 2.5rem);
  margin-inline: auto;
}

/* ── Hero ───────────────────────────────────────────────── */
.hero {
  min-height: calc(100vh - var(--nav-h));
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(3rem, 8vh, 6rem) 0;
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 1.25rem;
  text-shadow: 0 0 24px rgba(94, 234, 212, 0.35);
}

.hero h1 {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin: 0 0 1.25rem;
  max-width: 14ch;
  background: linear-gradient(135deg, var(--text) 0%, var(--text) 45%, rgba(183, 148, 246, 0.85) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-lead {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--text-muted);
  max-width: 42ch;
  margin: 0 0 2.5rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.25rem;
  font-size: 0.875rem;
  font-family: var(--font-sans);
  font-weight: 500;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition:
    background 0.3s var(--ease),
    border-color 0.3s var(--ease),
    transform 0.2s var(--ease),
    color 0.3s var(--ease),
    box-shadow 0.3s var(--ease);
}

.btn:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-primary {
  background: linear-gradient(135deg, #f0f2f5 0%, #d4d8de 100%);
  color: #050608;
  border-color: rgba(255, 255, 255, 0.9);
  box-shadow:
    0 2px 12px rgba(255, 255, 255, 0.15),
    0 8px 24px rgba(0, 0, 0, 0.35);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #fff 0%, #eef0f4 100%);
  color: #050608;
  box-shadow:
    0 4px 20px rgba(255, 255, 255, 0.2),
    0 12px 32px rgba(0, 0, 0, 0.4);
}

.btn-ghost {
  color: var(--text-muted);
}

.btn-ghost:hover {
  color: var(--text);
  border-color: rgba(167, 139, 250, 0.25);
  background: rgba(167, 139, 250, 0.06);
  box-shadow: 0 0 24px rgba(167, 139, 250, 0.08);
}

/* ── Sections ────────────────────────────────────────────── */
.section {
  padding: clamp(4rem, 10vh, 7rem) 0;
  border-top: 1px solid rgba(167, 139, 250, 0.08);
  position: relative;
}

.section::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: min(120px, 30%);
  height: 1px;
  background: linear-gradient(90deg, var(--cyan), var(--accent), transparent);
  opacity: 0.5;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 0.75rem;
  opacity: 0.85;
}

.section h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
  background: linear-gradient(90deg, var(--text) 70%, rgba(183, 148, 246, 0.7) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-desc {
  color: var(--text-muted);
  max-width: 52ch;
  margin: 0 0 2.5rem;
}

/* ── Cards ───────────────────────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1px;
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.15), rgba(94, 234, 212, 0.08));
  border: 1px solid rgba(167, 139, 250, 0.12);
  border-radius: calc(var(--radius) + 2px);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.card-grid--featured {
  grid-template-columns: 1fr;
  max-width: 720px;
}

.card--featured {
  padding: 0;
  overflow: hidden;
}

.card--featured .card-tag,
.card--featured h3,
.card--featured p,
.card--featured .card-link {
  margin-left: 1.75rem;
  margin-right: 1.75rem;
}

.card--featured .card-tag {
  margin-top: 1.5rem;
}

.card--featured .card-link {
  margin-bottom: 1.75rem;
}

.card-preview {
  display: block;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(167, 139, 250, 0.1);
  background:
    radial-gradient(ellipse 80% 70% at 50% 0%, rgba(167, 139, 250, 0.1), transparent 65%),
    radial-gradient(ellipse 60% 50% at 100% 100%, rgba(94, 234, 212, 0.06), transparent 55%),
    #06080c;
  transition: filter 0.4s var(--ease);
  text-decoration: none;
  color: inherit;
}

.card-preview::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(17, 20, 25, 0.55) 100%);
  pointer-events: none;
}

.card-preview-terminal {
  position: relative;
  z-index: 1;
  margin: 1.25rem;
  border: 1px solid rgba(167, 139, 250, 0.18);
  border-radius: 12px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 16px 48px rgba(0, 0, 0, 0.45),
    0 0 60px rgba(167, 139, 250, 0.08);
  transform: translateY(0);
  transition: transform 0.5s var(--ease);
}

.card-preview-chrome {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.75rem;
  background: linear-gradient(180deg, #12151c, #0c0e13);
  border-bottom: 1px solid rgba(167, 139, 250, 0.1);
}

.card-preview-dot:nth-child(1) { background: #ff5f57; }
.card-preview-dot:nth-child(2) { background: #febc2e; }
.card-preview-dot:nth-child(3) { background: #28c840; }

.card-preview-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  box-shadow: 0 0 6px currentColor;
}

.card-preview-title {
  margin-left: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-dim);
  letter-spacing: 0.04em;
}

.card-preview-body {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 220px;
  background: linear-gradient(180deg, #090b10, #06080c);
}

@media (min-width: 540px) {
  .card-preview-body {
    grid-template-columns: 0.95fr 1.05fr;
    min-height: 200px;
  }
}

.card-preview-pane {
  padding: 0.85rem 0.9rem;
  min-width: 0;
}

.card-preview-pane--nav {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

@media (min-width: 540px) {
  .card-preview-pane--nav {
    border-bottom: none;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
  }
}

.card-preview-prompt {
  margin: 0 0 0.65rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text);
  line-height: 1.4;
}

.card-preview-list {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}

.card-preview-list li {
  display: grid;
  grid-template-columns: 0.85rem 5.5rem 1fr;
  gap: 0.35rem;
  align-items: baseline;
  padding: 0.35rem 0.45rem;
  margin-bottom: 0.15rem;
  border-radius: 10px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  position: relative;
  z-index: 1;
}

.card-preview-list li.is-selected {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.14), rgba(167, 139, 250, 0.1));
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 4px 16px rgba(0, 0, 0, 0.22),
    0 0 24px rgba(167, 139, 250, 0.12);
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
}

.card-preview-list li span:first-child {
  color: var(--accent-bright);
}

.card-preview-list li strong {
  color: var(--terminal-green-bright);
  font-weight: 500;
}

.card-preview-list li.is-selected strong {
  text-shadow: 0 0 12px rgba(125, 222, 168, 0.35);
}

.card-preview-list li em {
  font-style: normal;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-preview-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.65rem;
}

.card-preview-chips span {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.45rem;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--cyan);
}

.card-preview-chips span:nth-child(2) { color: var(--accent-bright); }
.card-preview-chips span:nth-child(3) { color: var(--terminal-green); }

.card-preview-study {
  margin: 0 0 0.25rem;
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-bright);
}

.card-preview-headline {
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  color: var(--text);
  line-height: 1.35;
}

.card-preview-graph {
  height: 72px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  overflow: hidden;
  margin-bottom: 0.65rem;
}

.card-preview-graph svg {
  width: 100%;
  height: 100%;
  display: block;
}

.card-preview-insight {
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  background: rgba(167, 139, 250, 0.07);
  border: 1px solid rgba(167, 139, 250, 0.14);
}

.card-preview-insight span {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.52rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--terminal-green-bright);
  margin-bottom: 0.25rem;
}

.card-preview-insight p {
  margin: 0;
  font-size: 0.62rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.card-preview-status {
  padding: 0.45rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.55rem;
  color: var(--text-dim);
  background: #0c0e13;
  border-top: 1px solid rgba(167, 139, 250, 0.1);
}

.card--featured:hover .card-preview-terminal {
  transform: translateY(-3px) scale(1.01);
}

.card--featured:hover .card-preview {
  filter: brightness(1.05);
}

.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;
}

.card {
  background: linear-gradient(165deg, var(--bg-card) 0%, rgba(12, 14, 19, 0.95) 100%);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: background 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.card:hover {
  background: linear-gradient(165deg, #151820 0%, #0e1118 100%);
  box-shadow: inset 0 0 40px rgba(167, 139, 250, 0.04);
}

.card-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-bright);
  text-shadow: 0 0 20px rgba(183, 148, 246, 0.4);
}

.card h3 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 500;
}

.card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  flex: 1;
}

.card-link {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.5rem;
}

.card-link:hover {
  color: var(--accent-bright);
  text-shadow: 0 0 16px rgba(183, 148, 246, 0.3);
}

/* ── Metrics strip ───────────────────────────────────────── */
.metrics-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.metric-item {
  padding: 1.25rem 0;
  border-top: 1px solid rgba(94, 234, 212, 0.12);
  transition: border-color 0.3s var(--ease);
}

.metric-item:hover {
  border-top-color: rgba(94, 234, 212, 0.28);
}

.metric-item strong {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.35rem;
  color: var(--text);
}

.metric-item span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ── Terminal ──────────────────────────────────────────────── */
.terminal-wrap {
  border: 1px solid rgba(167, 139, 250, 0.15);
  border-radius: calc(var(--radius) + 4px);
  overflow: hidden;
  background: var(--bg-terminal);
  box-shadow: var(--shadow-terminal);
  position: relative;
}

.terminal-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    145deg,
    rgba(167, 139, 250, 0.35) 0%,
    rgba(94, 234, 212, 0.12) 35%,
    rgba(255, 255, 255, 0.04) 50%,
    rgba(125, 222, 168, 0.1) 100%
  );
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  pointer-events: none;
  z-index: 3;
  opacity: 0.65;
}

.terminal-chrome {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: linear-gradient(180deg, rgba(18, 21, 28, 0.98) 0%, rgba(12, 14, 19, 0.98) 100%);
  border-bottom: 1px solid rgba(167, 139, 250, 0.1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  position: relative;
  z-index: 2;
}

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  box-shadow: 0 0 8px currentColor;
}

.terminal-dot:nth-child(1) { background: #ff5f57; color: rgba(255, 95, 87, 0.6); opacity: 0.95; }
.terminal-dot:nth-child(2) { background: #febc2e; color: rgba(254, 188, 46, 0.5); opacity: 0.95; }
.terminal-dot:nth-child(3) { background: #28c840; color: rgba(40, 200, 64, 0.5); opacity: 0.95; }

.terminal-title {
  margin-left: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  letter-spacing: 0.04em;
}

.terminal-body {
  padding: 1.25rem 1rem 0.75rem;
  min-height: 380px;
  max-height: 480px;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.55;
}

/* ── Terminal navigator (NVE browser) ─────────────────────── */
.page-nve .page-header-compact {
  padding-bottom: 1.5rem;
}

.page-nve .page-header-compact h1 {
  background: linear-gradient(135deg, var(--text) 50%, var(--cyan) 120%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.page-sub {
  color: var(--text-muted);
  max-width: 52ch;
  margin: 0;
  font-size: 0.95rem;
}

.nav-hint {
  font-size: 0.68rem;
  margin-bottom: 1rem;
  color: var(--text-dim);
}

.nav-hint kbd,
.terminal-keys kbd {
  display: inline-block;
  padding: 0.1em 0.4em;
  font-family: var(--font-mono);
  font-size: 0.9em;
  color: var(--cyan);
  background: var(--cyan-dim);
  border: 1px solid rgba(94, 234, 212, 0.2);
  border-radius: 4px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.nve-terminal-section {
  padding-bottom: clamp(3rem, 8vh, 5rem);
}

.nve-terminal-section .container,
.nve-terminal-section.container {
  max-width: min(1200px, 100% - 2rem);
}

.terminal-navigator {
  display: flex;
  flex-direction: column;
  outline: none;
  min-height: min(78vh, 820px);
  height: min(78vh, 820px);
  transition: border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.terminal-navigator:focus-visible {
  box-shadow: var(--shadow-glow-focus);
}

.terminal-viewport {
  flex: 1;
  min-height: 0;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 30% 20%, rgba(167, 139, 250, 0.06), transparent 55%),
    radial-gradient(ellipse 60% 50% at 90% 80%, rgba(94, 234, 212, 0.05), transparent 50%),
    linear-gradient(180deg, #090b10 0%, #06080c 100%);
  perspective: 1200px;
}

.terminal-viewport::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.03) 2px,
    rgba(0, 0, 0, 0.03) 4px
  );
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}

.terminal-pane.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate3d(0, 0, 0) scale(1);
  filter: blur(0);
  transition:
    opacity 0.52s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.56s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.48s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 0s;
  z-index: 1;
}

.terminal-pane-list {
  padding: 1.35rem 1.25rem 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.55;
  color: var(--text);
  position: relative;
  z-index: 1;
}

.terminal-pane {
  position: absolute;
  inset: 0;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate3d(0, 12px, 0) scale(0.993);
  filter: blur(10px);
  will-change: opacity, transform, filter;
  transition:
    opacity 0.48s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.52s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.44s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 0.52s;
}

.terminal-navigator[data-transitioning="true"] .terminal-pane {
  pointer-events: none;
}

.terminal-navigator[data-transitioning="true"] .terminal-pane.is-visible {
  pointer-events: auto;
}

/* Forward = deeper into tree */
.terminal-pane.drift-exit-forward {
  opacity: 0;
  visibility: visible;
  transform: translate3d(0, -20px, 0) scale(0.988);
  filter: blur(12px);
  z-index: 2;
  transition-duration: 0.38s;
}

.terminal-pane.drift-enter-forward {
  opacity: 0;
  visibility: visible;
  transform: translate3d(0, 28px, 0) scale(0.99);
  filter: blur(12px);
  z-index: 3;
}

/* Back = Esc / back button */
.terminal-pane.drift-exit-back {
  opacity: 0;
  visibility: visible;
  transform: translate3d(0, 22px, 0) scale(0.988);
  filter: blur(12px);
  z-index: 2;
  transition-duration: 0.38s;
}

.terminal-pane.drift-enter-back {
  opacity: 0;
  visibility: visible;
  transform: translate3d(0, -24px, 0) scale(0.99);
  filter: blur(12px);
  z-index: 3;
}

/* Frame ← → */
.terminal-pane.drift-exit-left {
  opacity: 0;
  visibility: visible;
  transform: translate3d(32px, 0, 0) scale(0.992);
  filter: blur(8px);
  z-index: 2;
  transition-duration: 0.28s;
}

.terminal-pane.drift-enter-left {
  opacity: 0;
  visibility: visible;
  transform: translate3d(-36px, 0, 0) scale(0.992);
  filter: blur(8px);
  z-index: 3;
}

.terminal-pane.drift-exit-right {
  opacity: 0;
  visibility: visible;
  transform: translate3d(-32px, 0, 0) scale(0.992);
  filter: blur(8px);
  z-index: 2;
  transition-duration: 0.28s;
}

.terminal-pane.drift-enter-right {
  opacity: 0;
  visibility: visible;
  transform: translate3d(36px, 0, 0) scale(0.992);
  filter: blur(8px);
  z-index: 3;
}

.terminal-pane.drift-settle {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate3d(0, 0, 0) scale(1);
  filter: blur(0);
  z-index: 1;
}

/* Staggered content reveal inside list pane */
.nav-content-inner.drift-stagger > * {
  opacity: 0;
  transform: translate3d(0, 10px, 0);
  animation: navDriftIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.nav-content-inner.drift-stagger > *:nth-child(1) { animation-delay: 0.04s; }
.nav-content-inner.drift-stagger > *:nth-child(2) { animation-delay: 0.08s; }
.nav-content-inner.drift-stagger > *:nth-child(3) { animation-delay: 0.12s; }
.nav-content-inner.drift-stagger > *:nth-child(4) { animation-delay: 0.16s; }
.nav-content-inner.drift-stagger > *:nth-child(5) { animation-delay: 0.2s; }
.nav-content-inner.drift-stagger > *:nth-child(n+6) { animation-delay: 0.24s; }

@keyframes navDriftIn {
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.viewer-panel-inner.drift-stagger > * {
  opacity: 0;
  transform: translate3d(0, 8px, 0);
  animation: navDriftIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.viewer-panel-inner.drift-stagger > *:nth-child(1) { animation-delay: 0.06s; }
.viewer-panel-inner.drift-stagger > *:nth-child(2) { animation-delay: 0.1s; }
.viewer-panel-inner.drift-stagger > *:nth-child(3) { animation-delay: 0.14s; }
.viewer-panel-inner.drift-stagger > *:nth-child(4) { animation-delay: 0.18s; }
.viewer-panel-inner.drift-stagger > *:nth-child(n+5) { animation-delay: 0.22s; }

.viewer-image-wrap.drift-image-in img {
  opacity: 0;
  transform: scale(0.97);
  animation: imageDriftIn 0.62s cubic-bezier(0.22, 1, 0.36, 1) 0.08s forwards;
}

.viewer-image-wrap.drift-slide-out-left img {
  animation: imageSlideOutLeft 0.28s cubic-bezier(0.4, 0, 0.6, 1) forwards;
}

.viewer-image-wrap.drift-slide-out-right img {
  animation: imageSlideOutRight 0.28s cubic-bezier(0.4, 0, 0.6, 1) forwards;
}

.viewer-panel-inner.drift-panel-out {
  animation: panelDriftOut 0.26s cubic-bezier(0.4, 0, 0.6, 1) forwards;
}

@keyframes imageDriftIn {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes imageSlideOutLeft {
  to {
    opacity: 0;
    transform: translate3d(-28px, 0, 0) scale(0.98);
    filter: blur(6px);
  }
}

@keyframes imageSlideOutRight {
  to {
    opacity: 0;
    transform: translate3d(28px, 0, 0) scale(0.98);
    filter: blur(6px);
  }
}

@keyframes panelDriftOut {
  to {
    opacity: 0;
    transform: translate3d(0, 10px, 0);
    filter: blur(4px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .terminal-pane,
  .terminal-pane.is-visible,
  .nav-content-inner.drift-stagger > *,
  .viewer-panel-inner.drift-stagger > *,
  .viewer-image-wrap.drift-image-in img,
  .viewer-panel-inner.drift-panel-out,
  .viewer-image-wrap.drift-slide-out-left img,
  .viewer-image-wrap.drift-slide-out-right img {
    animation: none !important;
    transition: none !important;
    transform: none !important;
    filter: none !important;
    opacity: 1 !important;
  }

  .nav-glass-bubble {
    transition: none !important;
  }

  .nav-item.selected {
    transform: none !important;
  }
}

.terminal-pane[hidden] {
  display: block !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.terminal-pane-viewer {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr 1fr;
  overflow: hidden;
}

@media (min-width: 900px) {
  .terminal-pane-viewer {
    grid-template-columns: 1.12fr 0.88fr;
    grid-template-rows: 1fr;
  }
}

.terminal-status {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 0.65rem 1rem;
  border-top: 1px solid rgba(167, 139, 250, 0.1);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-dim);
  background: linear-gradient(180deg, rgba(14, 16, 22, 0.98) 0%, rgba(10, 12, 17, 0.98) 100%);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
  position: relative;
  z-index: 2;
}

.terminal-back {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(167, 139, 250, 0.15);
  border-radius: 6px;
  padding: 0.35rem 0.65rem;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition:
    color 0.25s var(--ease),
    border-color 0.25s var(--ease),
    background 0.25s var(--ease),
    transform 0.25s var(--ease),
    box-shadow 0.25s var(--ease);
}

.terminal-back:hover {
  color: var(--accent-bright);
  border-color: rgba(183, 148, 246, 0.45);
  background: var(--accent-dim);
  box-shadow: 0 0 20px rgba(167, 139, 250, 0.15);
}

.terminal-back:active {
  transform: scale(0.97);
}

.terminal-back[hidden] {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.terminal-path {
  transition: opacity 0.35s var(--ease);
}

.terminal-navigator[data-transitioning="true"] .terminal-path {
  opacity: 0.45;
}

.terminal-keys {
  font-size: 0.62rem;
  text-align: right;
}

.nav-prompt {
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 0.35rem;
  letter-spacing: -0.01em;
  text-shadow: 0 0 30px rgba(255, 255, 255, 0.04);
}

.nav-path {
  color: var(--accent-bright);
  margin-bottom: 0.75rem;
  font-size: 0.75rem;
  text-shadow: 0 0 20px rgba(167, 139, 250, 0.25);
}

.nav-intro {
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  max-width: 58ch;
  line-height: 1.65;
  font-size: 0.82rem;
}

.nav-list-host {
  position: relative;
  margin: 0.5rem 0 0;
}

.nav-glass-bubble {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 0;
  border-radius: 14px;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.16) 0%,
      rgba(255, 255, 255, 0.05) 38%,
      rgba(167, 139, 250, 0.1) 100%
    );
  backdrop-filter: blur(22px) saturate(190%);
  -webkit-backdrop-filter: blur(22px) saturate(190%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.28),
    inset 0 -1px 1px rgba(0, 0, 0, 0.12),
    0 6px 20px rgba(0, 0, 0, 0.28),
    0 0 32px rgba(167, 139, 250, 0.14),
    0 0 48px rgba(94, 234, 212, 0.06);
  transition:
    top 0.42s cubic-bezier(0.22, 1, 0.36, 1),
    height 0.42s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.3s var(--ease);
  will-change: top, height;
}

.nav-glass-bubble.is-snapped {
  transition: none;
}

.nav-glass-bubble::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.42) 0%,
    rgba(255, 255, 255, 0.1) 22%,
    transparent 52%
  );
  pointer-events: none;
}

.nav-glass-bubble::after {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: calc(14px - 2px);
  background: radial-gradient(
    ellipse 80% 50% at 50% 0%,
    rgba(255, 255, 255, 0.12),
    transparent 70%
  );
  pointer-events: none;
}

.nav-list-host.has-selection .nav-glass-bubble {
  opacity: 1;
}

.nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
  position: relative;
  z-index: 1;
}

.nav-item {
  display: grid;
  grid-template-columns: 1.25rem minmax(0, 13rem) minmax(0, 1fr);
  gap: 0.5rem 0.75rem;
  align-items: baseline;
  padding: 0.55rem 0.65rem;
  margin: 0;
  border-radius: 14px;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  position: relative;
  z-index: 1;
  transition:
    color 0.25s var(--ease),
    transform 0.25s var(--ease);
}

.nav-item.selected {
  transform: scale(1.008);
}

.nav-item.selected .nav-label {
  color: var(--terminal-green-bright);
  text-shadow: 0 0 20px rgba(125, 222, 168, 0.45);
}

.nav-item.selected .nav-desc {
  color: rgba(240, 242, 245, 0.72);
}

.nav-cursor {
  color: var(--accent-bright);
  user-select: none;
  opacity: 0;
  transition: opacity 0.25s var(--ease);
}

.nav-item.selected .nav-cursor {
  opacity: 1;
  text-shadow: 0 0 14px rgba(183, 148, 246, 0.55);
}

.nav-label {
  color: var(--terminal-green);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.2s var(--ease), text-shadow 0.2s var(--ease);
}

.nav-desc {
  color: var(--text-dim);
  font-size: 0.72rem;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-doc {
  margin-top: 0.5rem;
}

.nav-doc-block {
  margin-bottom: 1.25rem;
  padding: 0.75rem 0 0.75rem 0.85rem;
  border-left: 2px solid rgba(94, 234, 212, 0.2);
  background: linear-gradient(90deg, rgba(94, 234, 212, 0.03), transparent 80%);
  border-radius: 0 6px 6px 0;
}

.nav-doc-h {
  display: block;
  color: var(--text);
  font-size: 0.78rem;
  margin-bottom: 0.35rem;
}

.nav-doc-block p,
.nav-list-plain {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.65;
}

.nav-list-plain {
  padding-left: 1.1rem;
}

.nav-list-plain li {
  margin-bottom: 0.35rem;
}

/* Viewer panes fill terminal height */
.viewer-image-wrap {
  background:
    radial-gradient(ellipse 70% 60% at 50% 40%, rgba(167, 139, 250, 0.05), transparent 70%),
    #050607;
  border-bottom: 1px solid rgba(167, 139, 250, 0.08);
  overflow: auto;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 1rem;
  min-height: 0;
  height: 100%;
  position: relative;
  z-index: 1;
}

@media (min-width: 900px) {
  .viewer-image-wrap {
    border-bottom: none;
    border-right: 1px solid var(--border);
  }
}

.viewer-zoom-wrap {
  transform-origin: top center;
  transition: transform 0.35s var(--ease);
  will-change: transform;
}

.viewer-zoom-wrap img {
  max-width: 100%;
  width: auto;
  height: auto;
  border-radius: 4px;
  border: 1px solid rgba(167, 139, 250, 0.15);
  box-shadow:
    0 8px 40px rgba(0, 0, 0, 0.55),
    0 0 60px rgba(94, 234, 212, 0.04),
    0 0 80px rgba(167, 139, 250, 0.06);
}

.viewer-panel {
  overflow-y: auto;
  overflow-x: hidden;
  padding: 1.25rem 1.35rem 1.5rem;
  min-height: 0;
  height: 100%;
  font-size: 0.82rem;
  line-height: 1.65;
  overscroll-behavior: contain;
  position: relative;
  z-index: 1;
  background: linear-gradient(180deg, rgba(10, 12, 17, 0.4) 0%, transparent 30%);
}

.viewer-tag {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-bright);
  margin-bottom: 0.5rem;
  text-shadow: 0 0 16px rgba(183, 148, 246, 0.35);
}

.viewer-title {
  margin: 0 0 0.65rem;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.viewer-headline {
  color: var(--text-muted);
  margin: 0 0 1.25rem;
  font-size: 0.82rem;
}

.viewer-block {
  margin-bottom: 1.25rem;
  padding: 0.85rem 1rem;
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.06) 0%, rgba(94, 234, 212, 0.03) 100%);
  border: 1px solid rgba(167, 139, 250, 0.12);
  border-radius: var(--radius);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 4px 16px rgba(0, 0, 0, 0.2);
}

.viewer-block-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--terminal-green-bright);
  margin-bottom: 0.45rem;
  text-shadow: 0 0 12px rgba(125, 222, 168, 0.3);
}

.viewer-block p {
  margin: 0;
  color: var(--text);
}

.viewer-highlights {
  margin: 0 0 1.25rem;
  padding-left: 1.1rem;
  color: var(--text-muted);
}

.viewer-highlights li {
  margin-bottom: 0.45rem;
}

.viewer-metrics-section {
  border-top: 1px solid rgba(94, 234, 212, 0.12);
  padding-top: 1rem;
}

.viewer-metric {
  margin-bottom: 0.85rem;
  padding: 0.5rem 0 0.5rem 0.65rem;
  border-left: 2px solid rgba(167, 139, 250, 0.15);
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
  border-radius: 0 4px 4px 0;
}

.viewer-metric:hover {
  border-left-color: var(--accent);
  background: rgba(167, 139, 250, 0.04);
}

.viewer-metric h4 {
  margin: 0 0 0.2rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text);
}

.viewer-metric p {
  margin: 0;
  font-size: 0.74rem;
  color: var(--text-dim);
  line-height: 1.55;
}

.viewer-frame-nav {
  margin-top: 1.25rem;
  font-size: 0.68rem;
  font-family: var(--font-mono);
}

@media (max-width: 640px) {
  .terminal-navigator {
    min-height: min(72vh, 680px);
    height: min(72vh, 680px);
  }

  .nav-item {
    grid-template-columns: 1rem 1fr;
    grid-template-rows: auto auto;
  }

  .nav-desc {
    grid-column: 2;
    white-space: normal;
  }
}


/* ── Page header (inner) ─────────────────────────────────── */
.page-header {
  padding: clamp(3rem, 8vh, 5rem) 0 2rem;
}

.page-header h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
  background: linear-gradient(135deg, var(--text) 60%, rgba(183, 148, 246, 0.8) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.page-header p {
  color: var(--text-muted);
  max-width: 52ch;
  margin: 0;
}

.breadcrumb {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-bottom: 1rem;
}

.breadcrumb a:hover { color: var(--accent); }

/* ── Two-col product layout ──────────────────────────────── */
.product-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  padding-bottom: 4rem;
}

@media (min-width: 960px) {
  .product-layout {
    grid-template-columns: 1fr 1.1fr;
    align-items: start;
    gap: 4rem;
  }

  .product-layout .terminal-wrap {
    position: sticky;
    top: calc(var(--nav-h) + 1.5rem);
  }
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.feature-list li {
  padding: 0.75rem 0 0.75rem 1rem;
  border-left: 2px solid rgba(167, 139, 250, 0.15);
  transition:
    border-color 0.3s var(--ease),
    background 0.3s var(--ease),
    box-shadow 0.3s var(--ease);
  border-radius: 0 6px 6px 0;
}

.feature-list li:hover {
  border-left-color: var(--accent);
  background: linear-gradient(90deg, rgba(167, 139, 250, 0.06), transparent 70%);
  box-shadow: inset 0 0 30px rgba(167, 139, 250, 0.03);
}

.feature-list strong {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.feature-list span {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ── Footer ──────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid rgba(167, 139, 250, 0.08);
  padding: 2rem 0;
  margin-top: 2rem;
  background: linear-gradient(180deg, transparent 0%, rgba(167, 139, 250, 0.02) 100%);
  position: relative;
}

.site-footer::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: min(200px, 40%);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.35;
}

.site-footer p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-dim);
}

.footer-credit {
  margin-top: 0.35rem !important;
  font-size: 0.72rem !important;
  color: var(--text-dim);
  opacity: 0.75;
}

/* ── Animations ──────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.7s var(--ease),
    transform 0.7s var(--ease);
  transition-delay: var(--d, 0ms);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ── Mobile nav ──────────────────────────────────────────── */
@media (max-width: 640px) {
  .nav-toggle { display: block; }

  .site-nav {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 0;
    transform: translateY(-110%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.35s var(--ease), opacity 0.35s var(--ease);
  }

  body.nav-open .site-nav {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .site-nav a {
    display: block;
    padding: 0.85rem 1.25rem;
    width: 100%;
  }

  .hero h1 { max-width: none; }
}

.muted { color: var(--text-muted); }

/* ── Home: institutional terminal background ─────────────── */
body.page-home {
  background: #0a0b0d;
  position: relative;
  isolation: isolate;
}

body.page-home::before,
body.page-home::after {
  display: none;
}

.terminal-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background: #0a0b0d;
}

.terminal-bg__field,
.terminal-bg__data {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.terminal-bg__field {
  z-index: 0;
}

.terminal-bg__data {
  z-index: 1;
}

.terminal-bg__vignette {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: radial-gradient(
    ellipse 75% 65% at 50% 42%,
    transparent 0%,
    rgba(10, 11, 13, 0.35) 55%,
    rgba(10, 11, 13, 0.85) 100%
  );
  pointer-events: none;
}

body.page-home .site-home {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

/* ── NVE intro hero (scroll, not overlay) ─────────────────── */
body.page-nve.nve-intro-scroll {
  overflow-x: hidden;
}

.nve-intro {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  background: #030304;
  transition: opacity 0.55s var(--ease);
}

.nve-intro[hidden] {
  display: none;
}

body.page-home .nve-intro {
  background: transparent;
}

.nve-intro-backdrop {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.nve-intro-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: inherit;
  padding: 2rem clamp(1.25rem, 4vw, 3rem) 4rem;
}

.nve-intro-terminal {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: min(720px, calc(100vw - 3rem));
}

.nve-intro-scroll-hint {
  position: absolute;
  bottom: clamp(1.75rem, 5vh, 3rem);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-dim);
  opacity: 0.7;
  transition: opacity 0.4s var(--ease);
  pointer-events: none;
}

.nve-intro-scroll-hint.is-hidden {
  opacity: 0;
}

.nve-intro-scroll-line {
  display: block;
  width: 1px;
  height: 2.25rem;
  background: linear-gradient(to bottom, transparent, var(--text-dim));
  animation: introScrollPulse 2.2s ease-in-out infinite;
}

@keyframes introScrollPulse {
  0%, 100% { transform: scaleY(0.55); opacity: 0.35; }
  50% { transform: scaleY(1); opacity: 0.85; }
}

.nve-intro-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 35%, rgba(0, 0, 0, 0.6) 100%);
}

.nve-intro-scanlines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.14) 2px,
    rgba(0, 0, 0, 0.14) 4px
  );
  opacity: 0.35;
}

.nve-intro-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 55% 45% at 50% 50%, rgba(125, 222, 168, 0.07), transparent 65%),
    radial-gradient(ellipse 40% 35% at 20% 80%, rgba(167, 139, 250, 0.08), transparent 60%);
  animation: introGlowPulse 4s ease-in-out infinite;
}

@keyframes introGlowPulse {
  0%, 100% { opacity: 0.65; }
  50% { opacity: 1; }
}

.nve-intro-line {
  width: 100%;
  font-family: var(--font-mono);
  font-size: clamp(1rem, 2.6vw, 1.25rem);
  line-height: 1.65;
  letter-spacing: 0.01em;
  white-space: pre-wrap;
  word-break: break-word;
  text-align: left;
}

.nve-intro-prompt {
  white-space: nowrap;
}

.nve-intro-user { color: #7ddea8; text-shadow: 0 0 20px rgba(125, 222, 168, 0.35); }
.nve-intro-at { color: #9aa3ad; }
.nve-intro-host { color: #5eead4; text-shadow: 0 0 16px rgba(94, 234, 212, 0.25); }
.nve-intro-colon { color: #9aa3ad; }
.nve-intro-path { color: #b794f6; }
.nve-intro-dollar { color: #9aa3ad; }

.nve-intro-dollar::after {
  content: " ";
}

.nve-intro-typed {
  color: #e8eaed;
  text-shadow: 0 0 24px rgba(255, 255, 255, 0.08);
  min-width: 1ch;
  display: inline;
}

.nve-intro-cursor {
  display: inline-block;
  width: 0.58em;
  height: 1.05em;
  margin-left: 1px;
  vertical-align: text-bottom;
  background: #7ddea8;
  box-shadow: 0 0 12px rgba(125, 222, 168, 0.65);
  animation: introCursorBlink 1.05s step-end infinite;
}

@keyframes introCursorBlink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

.glass-bubble-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.72rem 1.35rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.16) 0%,
    rgba(255, 255, 255, 0.05) 38%,
    rgba(167, 139, 250, 0.1) 100%
  );
  backdrop-filter: blur(22px) saturate(190%);
  -webkit-backdrop-filter: blur(22px) saturate(190%);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.28),
    inset 0 -1px 1px rgba(0, 0, 0, 0.12),
    0 6px 20px rgba(0, 0, 0, 0.28),
    0 0 32px rgba(167, 139, 250, 0.14),
    0 0 48px rgba(94, 234, 212, 0.06);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: lowercase;
  color: var(--text);
  cursor: pointer;
  overflow: hidden;
  transition:
    transform 0.28s var(--ease),
    border-color 0.28s var(--ease),
    box-shadow 0.28s var(--ease);
}

.glass-bubble-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.42) 0%,
    rgba(255, 255, 255, 0.1) 22%,
    transparent 52%
  );
  pointer-events: none;
}

.glass-bubble-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.32),
    0 10px 28px rgba(0, 0, 0, 0.32),
    0 0 40px rgba(167, 139, 250, 0.2),
    0 0 56px rgba(94, 234, 212, 0.08);
}

.glass-bubble-btn:focus-visible {
  outline: none;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.32),
    0 0 0 1px rgba(183, 148, 246, 0.45),
    0 0 40px rgba(167, 139, 250, 0.15);
}

.glass-bubble-btn:active {
  transform: translateY(0) scale(0.98);
}

.nve-intro-cta {
  opacity: 0;
  transform: translateY(10px) scale(0.96);
  transition:
    opacity 0.55s var(--ease),
    transform 0.55s var(--ease),
    visibility 0.55s var(--ease);
}

.nve-intro-cta.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.nve-intro-arrow {
  color: var(--cyan);
  font-size: 1.15em;
  line-height: 1;
  text-shadow: 0 0 14px rgba(94, 234, 212, 0.45);
  transition: transform 0.28s var(--ease);
}

.glass-bubble-btn:hover .nve-intro-arrow {
  transform: translateX(4px);
}

.site-home.is-entering,
.nve-main.is-entering {
  animation: nveMainEnter 0.75s var(--ease) forwards;
}

@keyframes nveMainEnter {
  from {
    opacity: 0;
    transform: translateY(12px);
    filter: blur(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .nve-intro-glow {
    animation: none;
  }

  .nve-intro-cursor {
    animation: none;
    opacity: 1;
  }

  .nve-intro-scroll-line {
    animation: none;
    opacity: 0.6;
  }

  .site-home.is-entering,
  .nve-main.is-entering {
    animation: none;
  }
}
