:root {
  /* Cinematic Dark Mode: Midnight Graphite + Sapphire Ice + Emerald Telemetry */
  --bg: #07080d;
  --bg-elevated: #0e1119;
  --surface: rgba(16, 20, 30, 0.82);
  --surface-strong: #121620;
  --surface-subtle: #171c29;
  --console-bg: #0a0d14;
  --console-node: #151a26;
  --console-text: #f8fafc;
  --console-muted: #94a3b8;
  --border: rgba(148, 163, 184, 0.14);
  --border-strong: rgba(56, 189, 248, 0.36);
  --specular: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  --text: #f8fafc;
  --text-soft: #cbd5e1;
  --muted: #94a3b8;
  --blue: #38bdf8;
  --blue-soft: #60a5fa;
  --cyan: #38bdf8;
  --green: #34d399;
  --amber: #fbbf24;
  --accent-grad: linear-gradient(120deg, #f8fafc 0%, #bae6fd 48%, #38bdf8 100%);
  --btn-bg: #2563eb;
  --btn-hover: #1d4ed8;
  --nav-bg: rgba(10, 13, 20, 0.80);
  --shadow: 0 26px 70px rgba(0, 0, 0, 0.62);
  --spotlight: rgba(56, 189, 248, 0.12);
  --grid-line: rgba(148, 163, 184, 0.042);
  --width: 1140px;
  --radius: 18px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html[data-theme="light"] {
  /* Pro-Studio Light Mode: Porcelain + Monochrome + Royal Cobalt */
  --bg: #fafafa;
  --bg-elevated: #ffffff;
  --surface: rgba(255, 255, 255, 0.92);
  --surface-strong: #ffffff;
  --surface-subtle: #f4f4f5;
  --console-bg: #f4f4f5;
  --console-node: #ffffff;
  --console-text: #09090b;
  --console-muted: #52525b;
  --border: #e4e4e7;
  --border-strong: #d4d4d8;
  --specular: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  --text: #09090b;
  --text-soft: #27272a;
  --muted: #52525b;
  --blue: #2563eb;
  --blue-soft: #1d4ed8;
  --cyan: #0284c7;
  --green: #059669;
  --amber: #b45309;
  --accent-grad: linear-gradient(120deg, #09090b 0%, #1d4ed8 65%, #2563eb 100%);
  --btn-bg: #18181b;
  --btn-hover: #27272a;
  --nav-bg: rgba(255, 255, 255, 0.86);
  --shadow: 0 1px 3px rgba(9, 9, 11, 0.04), 0 18px 42px rgba(9, 9, 11, 0.06);
  --spotlight: rgba(37, 99, 235, 0.06);
  --grid-line: rgba(9, 9, 11, 0.035);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  min-width: 320px;
  overflow-x: hidden;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 68% 45% at 22% -6%, rgba(56, 189, 248, 0.13), transparent 68%),
    radial-gradient(ellipse 50% 38% at 84% 18%, rgba(16, 185, 129, 0.06), transparent 65%),
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 64px 64px, 64px 64px;
  font-family: "DM Sans", system-ui, -apple-system, sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease);
}

a { color: inherit; text-decoration: none; cursor: pointer; }
button { font-family: inherit; color: inherit; cursor: pointer; }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--btn-bg);
  color: #fff;
  font-weight: 700;
  transition: top 0.15s;
}
.skip-link:focus { top: 14px; }

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 2px;
  z-index: 100;
  background: var(--blue);
  transition: width 0.08s linear;
}

.container {
  width: min(var(--width), calc(100% - 44px));
  margin-inline: auto;
}

h1, h2, h3 {
  font-family: "Space Grotesk", system-ui, sans-serif;
}

.mono {
  font-family: "JetBrains Mono", ui-monospace, monospace;
}

.gradient-text {
  color: transparent;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
}

/* ── Floating Studio Pill Navbar ── */
.nav-wrap {
  position: sticky;
  top: 14px;
  z-index: 60;
  padding-inline: 22px;
  pointer-events: none;
}

.navbar {
  width: min(980px, 100%);
  margin-inline: auto;
  pointer-events: auto;
  background: var(--nav-bg);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: var(--specular), 0 12px 32px rgba(0, 0, 0, 0.14);
}

.nav-inner {
  min-height: 54px;
  padding: 5px 10px 5px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 700 0.98rem "Space Grotesk", sans-serif;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.brand img {
  width: 32px;
  height: 32px;
  display: block;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
}

.nav-links a {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 500;
  padding: 7px 12px;
  border-radius: 999px;
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.nav-links a:hover {
  color: var(--text);
  background: var(--surface-subtle);
}
.nav-links a.active {
  color: var(--text);
  background: var(--surface-subtle);
  font-weight: 600;
}

.nav-controls { display: flex; align-items: center; gap: 6px; }

.theme-circle {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-subtle);
  color: var(--text-soft);
  transition: border-color 0.2s, color 0.2s, transform 0.2s var(--ease);
}
.theme-circle:hover {
  border-color: var(--border-strong);
  color: var(--text);
  transform: scale(1.06);
}
.theme-circle svg,
.menu-toggle svg { width: 16px; height: 16px; }

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-subtle);
}

/* ── Hero ── */
.hero {
  min-height: 620px;
  display: flex;
  align-items: center;
  padding-block: 68px 50px;
}

.hero-layout {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.16fr) minmax(320px, 0.86fr);
  gap: 44px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--blue-soft);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.availability {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  margin-bottom: 22px;
  background: var(--surface-strong);
  box-shadow: var(--specular);
  color: var(--text-soft);
  font-size: 0.76rem;
  font-weight: 500;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.55);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); }
  70%  { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.hero h1 {
  max-width: 720px;
  font-size: clamp(2.85rem, 5.6vw, 4.85rem);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.045em;
  margin-bottom: 18px;
}

.hero-subtitle {
  color: var(--text-soft);
  font-size: clamp(1.06rem, 1.8vw, 1.32rem);
  font-weight: 500;
  line-height: 1.45;
  margin-bottom: 15px;
}

.hero-copy {
  max-width: 650px;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 10px 18px;
  font-size: 0.88rem;
  font-weight: 600;
  background: var(--surface-strong);
  box-shadow: var(--specular);
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease), background-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 25%, rgba(255, 255, 255, 0.16) 50%, transparent 75%);
  transform: translateX(-120%);
  transition: transform 0.55s var(--ease);
  pointer-events: none;
}
.btn:hover::after { transform: translateX(120%); }
.btn:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
}
.btn:active { transform: scale(0.97); }

/* Hero Staggered Entrance */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-layout > div > *,
.hero-layout > aside {
  animation: fadeUp 0.55s var(--ease) both;
}
.hero-layout > div > *:nth-child(1) { animation-delay: 0.04s; }
.hero-layout > div > *:nth-child(2) { animation-delay: 0.10s; }
.hero-layout > div > *:nth-child(3) { animation-delay: 0.16s; }
.hero-layout > div > *:nth-child(4) { animation-delay: 0.22s; }
.hero-layout > div > *:nth-child(5) { animation-delay: 0.28s; }
.hero-layout > div > *:nth-child(6) { animation-delay: 0.34s; }
.hero-layout > aside { animation-delay: 0.18s; }

/* Interactive Micro-Animations across HUD, Cards, Filters, FAQ, Pitch */
.hud-tab, .filter-btn, .topic-pill, .lab-btn {
  transition: transform 0.16s var(--ease), background-color 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.hud-tab:active, .filter-btn:active, .topic-pill:active, .lab-btn:active {
  transform: scale(0.95);
}
.hud-screen {
  transition: opacity 0.22s var(--ease), transform 0.22s var(--ease);
}
.hud-screen.is-switching {
  opacity: 0.35;
  transform: translateY(4px);
}
.project-card:hover .project-icon {
  transform: translateY(-2px) scale(1.06);
  border-color: var(--blue);
  color: var(--blue-soft);
}
.project-icon {
  transition: transform 0.24s var(--ease), border-color 0.24s var(--ease), color 0.24s var(--ease);
}
.project-links a, .hud-screen-link {
  transition: color 0.18s var(--ease), transform 0.18s var(--ease);
}
.project-links a:hover, .hud-screen-link:hover {
  transform: translateX(3px);
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(10px) scale(0.985); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.project-card.is-entering {
  animation: cardIn 0.34s var(--ease) both;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.faq-item[open] .faq-answer {
  animation: slideDown 0.26s var(--ease);
}
.faq-item summary::after {
  transition: transform 0.24s var(--ease), color 0.2s;
}
.faq-item[open] summary::after {
  content: "+";
  transform: rotate(45deg);
  color: var(--blue-soft);
}
@keyframes pitchPulse {
  0%   { border-color: var(--blue); transform: scale(0.992); }
  100% { border-color: var(--border); transform: scale(1); }
}
.pitch-preview.is-updated {
  animation: pitchPulse 0.38s var(--ease);
}

.btn-primary {
  background: var(--btn-bg);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.24);
}
.btn-primary:hover {
  background: var(--btn-hover);
  border-color: transparent;
}

.btn-secondary {
  background: var(--surface-strong);
  color: var(--text);
}

.tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 24px; }
.tag {
  padding: 5px 11px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface-subtle);
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 500;
}

/* ── Theme-Adaptive Telemetry Console Card ── */
.hud-card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 22px;
  background: var(--surface-strong);
  box-shadow: var(--specular), var(--shadow);
}

.hud-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 14px;
  margin-bottom: 15px;
  border-bottom: 1px solid var(--border);
}

.hud-id {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.71rem;
  color: var(--muted);
  letter-spacing: 0.7px;
}
.hud-id img { width: 24px; height: 24px; }

.geo-badge {
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.67rem;
  font-weight: 600;
  color: var(--green);
  background: rgba(16, 185, 129, 0.08);
  white-space: nowrap;
}

.hud-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 14px;
}

.hud-tab {
  min-height: 36px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface-subtle);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: all 0.18s var(--ease);
}
.hud-tab:hover { color: var(--text); border-color: var(--border-strong); }
.hud-tab[aria-selected="true"] {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

.hud-screen {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--console-bg);
  color: var(--console-text);
}

.hud-screen-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 0.69rem;
  color: var(--blue-soft);
}

.hud-screen h2 {
  font-size: 1.24rem;
  color: var(--console-text);
  margin-bottom: 6px;
}

.hud-screen p {
  font-size: 0.84rem;
  color: var(--console-muted);
  line-height: 1.6;
  margin-bottom: 12px;
}

.hud-pipeline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 11px;
  border-radius: 8px;
  background: var(--console-node);
  border: 1px solid var(--border);
  font-size: 0.7rem;
  color: var(--text-soft);
  margin-bottom: 12px;
  overflow-x: auto;
}

.hud-screen-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--blue-soft);
}
.hud-screen-link:hover { text-decoration: underline; }

.hud-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.hud-metrics div { text-align: center; }
.hud-metrics strong {
  display: block;
  font: 700 1.05rem "Space Grotesk", sans-serif;
  color: var(--text);
}
.hud-metrics span { font-size: 0.71rem; color: var(--muted); }

/* ── 3D Architecture Lab (3Dviz Pro Max / Three.js 0.180) ── */
.lab-shell {
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--surface-strong);
  box-shadow: var(--specular), var(--shadow);
  overflow: hidden;
}

.lab-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-subtle);
}

.lab-modes,
.lab-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.lab-btn {
  min-height: 36px;
  padding: 6px 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  transition: all 0.18s var(--ease);
}
.lab-btn:hover {
  color: var(--text);
  border-color: var(--border-strong);
}
.lab-btn[aria-pressed="true"] {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

.lab-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.42fr) minmax(300px, 0.88fr);
  align-items: stretch;
}

.lab-stage {
  position: relative;
  width: 100%;
  height: 520px;
  background: var(--console-bg);
  overflow: hidden;
  border-right: 1px solid var(--border);
}

#labCanvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
  touch-action: pan-y;
}
#labCanvas:active { cursor: grabbing; }

.lab-hud {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 14px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  pointer-events: none;
}

.lab-readout {
  max-width: 480px;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--nav-bg);
  backdrop-filter: blur(14px);
  pointer-events: auto;
}
.lab-readout-tag {
  font-size: 0.67rem;
  font-weight: 700;
  color: var(--blue-soft);
  letter-spacing: 0.8px;
}
.lab-readout h3 { font-size: 0.98rem; margin: 2px 0 3px; }
.lab-readout p { font-size: 0.78rem; color: var(--muted); line-height: 1.48; }

.lab-legend {
  padding: 6px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--nav-bg);
  backdrop-filter: blur(14px);
  font-size: 0.68rem;
  color: var(--muted);
  white-space: nowrap;
}

.lab-hover-tip {
  position: absolute;
  top: 14px;
  left: 16px;
  padding: 5px 11px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  font-size: 0.71rem;
  font-weight: 600;
  color: var(--blue-soft);
  pointer-events: none;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.15s var(--ease), transform 0.15s var(--ease);
}
.lab-hover-tip.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Audience Value Switcher (Companies & Power Users) ── */
.audience-shell {
  margin-top: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-strong);
  box-shadow: var(--specular);
  overflow: hidden;
}
.audience-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-subtle);
}
.audience-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.audience-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 20px;
}
.audience-card {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface-subtle);
}
.audience-card h3 { font-size: 0.96rem; margin-bottom: 5px; color: var(--text); }
.audience-card p { font-size: 0.82rem; color: var(--muted); line-height: 1.55; }

/* ── Search & Quick-Start CLI Drawer ── */
.project-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.search-input {
  min-width: 240px;
  flex: 0 1 300px;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--text);
  font-size: 0.83rem;
  font-family: inherit;
  transition: border-color 0.2s;
}
.search-input:focus { border-color: var(--blue-soft); outline: none; }

.cli-drawer {
  margin-top: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-strong);
  box-shadow: var(--specular);
  overflow: hidden;
}
.cli-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-subtle);
}
.cli-tabs { display: flex; flex-wrap: wrap; gap: 7px; }
.cli-body {
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  background: var(--console-bg);
}
.cli-code {
  margin: 0;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--console-text);
  overflow-x: auto;
  flex: 1 1 420px;
}

.tech-pill-btn {
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface-subtle);
  color: var(--text-soft);
  font-size: 0.75rem;
  transition: border-color 0.18s, color 0.18s, transform 0.15s;
}
.tech-pill-btn:hover {
  border-color: var(--blue-soft);
  color: var(--blue-soft);
  transform: translateY(-1px);
}

/* ── Detailed 3D Component Inspector Panel ── */
.lab-inspector {
  display: flex;
  flex-direction: column;
  height: 520px;
  background: var(--surface-strong);
}

.lab-inspector-head {
  padding: 16px 18px 13px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-subtle);
}
.lab-inspector-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.lab-inspector-badge {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--blue-soft);
}
.lab-inspector-repo {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--blue-soft);
  white-space: nowrap;
  flex-shrink: 0;
}
.lab-inspector-repo:hover { text-decoration: underline; }
.lab-inspector-head h3 { font-size: 1.05rem; margin-bottom: 3px; }
.lab-inspector-head p { font-size: 0.79rem; color: var(--muted); line-height: 1.45; }

.lab-parts-list {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px;
  display: grid;
  gap: 8px;
  align-content: start;
}

.lab-part-card {
  width: 100%;
  text-align: left;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-subtle);
  transition: transform 0.16s var(--ease), border-color 0.18s var(--ease), background-color 0.18s var(--ease);
}
.lab-part-card:hover {
  border-color: var(--border-strong);
  transform: translateX(2px);
}
.lab-part-card[aria-pressed="true"] {
  border-color: var(--blue);
  background: rgba(59, 130, 246, 0.1);
}
.lab-part-top {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  margin-bottom: 5px;
}
.lab-part-name {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.87rem;
  font-weight: 700;
  color: var(--text);
}
.lab-part-mat {
  font-size: 0.68rem;
  color: var(--blue-soft);
}
.lab-part-desc {
  font-size: 0.77rem;
  color: var(--muted);
  line-height: 1.5;
}

.lab-fallback {
  display: none;
  padding: 28px;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}
.lab-stage.no-webgl #labCanvas { display: none; }
.lab-stage.no-webgl .lab-fallback { display: block; }

@media (max-width: 980px) {
  .lab-workspace { grid-template-columns: 1fr; }
  .lab-stage { height: 400px; border-right: none; border-bottom: 1px solid var(--border); }
  .lab-inspector { height: auto; max-height: 420px; }
}

@media (max-width: 760px) {
  .lab-stage { height: 360px; }
  .lab-hud { flex-direction: column; align-items: flex-start; }
  .lab-legend { display: none; }
}

/* ── Spotlight Card Base ── */
.spotlight-card {
  position: relative;
  overflow: hidden;
  --mx: 50%;
  --my: 50%;
}
.spotlight-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(380px circle at var(--mx) var(--my), var(--spotlight), transparent 45%);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
  z-index: 0;
}
.spotlight-card:hover::before { opacity: 1; }
.spotlight-card > * { position: relative; z-index: 1; }

/* ── Sections ── */
.section { padding-block: 76px 16px; }
.section-heading { margin-bottom: 28px; }
.section-heading h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.55rem);
  font-weight: 700;
  letter-spacing: -0.035em;
}
.section-heading p { max-width: 720px; color: var(--muted); margin-top: 8px; }

.panel {
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-strong);
  box-shadow: var(--specular);
}

/* ── About & Workflow ── */
.about-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 18px; }
.about-copy { color: var(--text-soft); line-height: 1.85; }
.about-copy p + p { margin-top: 13px; }

.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fact {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--surface-strong);
  box-shadow: var(--specular);
}
.fact strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
  font: 700 1.03rem "Space Grotesk", sans-serif;
}
.fact span { color: var(--muted); font-size: 0.82rem; }

.workflow-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.workflow-step {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--surface-strong);
  box-shadow: var(--specular);
}
.workflow-step .step-num { color: var(--blue-soft); font-size: 0.71rem; font-weight: 700; }
.workflow-step h3 { font-size: 0.96rem; margin: 5px 0; }
.workflow-step p { color: var(--muted); font-size: 0.81rem; line-height: 1.55; }

/* ── Filter Bar ── */
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.filter-btn {
  min-height: 38px;
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--muted);
  font-size: 0.81rem;
  font-weight: 600;
  transition: all 0.18s var(--ease);
}
.filter-btn:hover { color: var(--text); border-color: var(--border-strong); }
.filter-btn[aria-pressed="true"] {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

/* ── Bento Grid & Theme-Adaptive Diagrams ── */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.project-card {
  display: flex;
  flex-direction: column;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-strong);
  box-shadow: var(--specular), var(--shadow);
  transition: transform 0.22s var(--ease), border-color 0.22s var(--ease);
}
.project-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
}
.project-card.is-hidden { display: none; }

.project-card.bento-wide {
  grid-column: span 2;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 24px;
  align-items: center;
}

.project-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.project-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface-subtle);
  color: var(--text);
}
.project-icon svg { width: 19px; height: 19px; }

.status {
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-subtle);
  color: var(--text-soft);
  font-size: 0.67rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  white-space: nowrap;
}
.status-archived {
  border-color: rgba(245, 158, 11, 0.35);
  color: var(--amber);
}

/* Theme-adaptive architecture schematic panel */
.arch-preview {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--console-bg);
  margin-bottom: 16px;
}
.bento-wide .arch-preview { margin-bottom: 0; padding: 18px; }
.arch-preview svg { width: 100%; height: auto; display: block; }

.svg-node { fill: var(--console-node); stroke: var(--border-strong); stroke-width: 1.2; }
.svg-node-accent { fill: var(--console-node); stroke: var(--blue); stroke-width: 1.4; }
.svg-node-ok { fill: var(--console-node); stroke: var(--green); stroke-width: 1.2; }
.svg-node-warn { fill: var(--console-node); stroke: var(--amber); stroke-width: 1.2; }
.svg-title { fill: var(--console-text); font-family: "JetBrains Mono", monospace; font-size: 10px; font-weight: 600; }
.svg-title-accent { fill: var(--blue-soft); font-family: "JetBrains Mono", monospace; font-size: 10px; font-weight: 700; }
.svg-title-warn { fill: var(--amber); font-family: "JetBrains Mono", monospace; font-size: 10px; font-weight: 700; }
.svg-sub { fill: var(--console-muted); font-family: "JetBrains Mono", monospace; font-size: 8px; }
.svg-caption { fill: var(--console-muted); font-family: "JetBrains Mono", monospace; font-size: 8.5px; }

.flow-line {
  stroke: var(--blue);
  stroke-width: 1.8;
  stroke-dasharray: 5 5;
  animation: flow 1.8s linear infinite;
}
.flow-line-warn { stroke: var(--amber); }
@keyframes flow { to { stroke-dashoffset: -20; } }

.project-card h3 { font-size: 1.36rem; margin-bottom: 3px; }
.project-type { margin-bottom: 10px; color: var(--blue-soft); font-size: 0.84rem; font-weight: 600; }
.project-card p { color: var(--muted); font-size: 0.9rem; line-height: 1.74; }

.project-tech { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0 18px; }
.project-tech span {
  padding: 4px 9px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-subtle);
  color: var(--text-soft);
  font-size: 0.72rem;
}

.project-links { display: flex; flex-wrap: wrap; gap: 14px; margin-top: auto; }
.project-links a { color: var(--blue-soft); font-size: 0.86rem; font-weight: 600; }
.project-links a:hover { text-decoration: underline; }
.note { margin-top: 10px; color: var(--amber) !important; font-size: 0.78rem !important; }

/* ── Comparison Matrix ── */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-strong);
  box-shadow: var(--specular);
}
.spec-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 0.88rem; }
.spec-table th, .spec-table td { padding: 14px 16px; border-bottom: 1px solid var(--border); vertical-align: top; }
.spec-table th {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--muted);
  background: var(--surface-subtle);
}
.spec-table tr:last-child td { border-bottom: none; }
.spec-table a { color: var(--blue-soft); font-weight: 600; white-space: nowrap; }

/* ── Technologies & Focus ── */
.tech-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.tech-group {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface-strong);
  box-shadow: var(--specular);
}
.tech-group h3 { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; font-size: 1rem; }
.tech-group h3 svg { width: 17px; height: 17px; color: var(--blue-soft); flex-shrink: 0; }
.tech-list { display: flex; flex-wrap: wrap; gap: 7px; }
.tech-list span {
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface-subtle);
  color: var(--text-soft);
  font-size: 0.75rem;
}

.focus-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.focus-item {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--surface-strong);
  box-shadow: var(--specular);
}
.focus-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-subtle);
  color: var(--text);
}
.focus-icon svg { width: 17px; height: 17px; }
.focus-item strong { display: block; font-size: 0.94rem; }
.focus-item small { display: block; margin-top: 3px; color: var(--muted); font-size: 0.82rem; }

/* ── FAQ ── */
.faq-list { display: grid; gap: 10px; }
.faq-item {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-strong);
  box-shadow: var(--specular);
  overflow: hidden;
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  min-height: 54px;
  padding: 15px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary h3 { font-size: 1rem; font-weight: 600; margin: 0; }
.faq-item summary::after { content: "+"; color: var(--muted); font-size: 1.25rem; font-weight: 600; transition: transform 0.24s var(--ease), color 0.2s; }
.faq-item[open] summary::after { content: "+"; transform: rotate(45deg); color: var(--blue-soft); }
.faq-answer { padding: 0 20px 18px; color: var(--muted); font-size: 0.91rem; line-height: 1.75; }
.faq-answer p + p { margin-top: 10px; }

/* ── Contact ── */
.contact {
  padding: 38px 28px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--surface-strong);
  box-shadow: var(--specular), var(--shadow);
}
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
.contact h2 { font-size: clamp(1.85rem, 3.6vw, 2.4rem); margin-bottom: 10px; }
.contact-intro p { color: var(--muted); margin-bottom: 20px; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.collab-box {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--surface-subtle);
}
.collab-box h3 { font-size: 0.98rem; margin-bottom: 10px; }
.topic-pills { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 12px; }
.topic-pill {
  min-height: 36px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--text-soft);
  font-size: 0.77rem;
  font-weight: 600;
}
.topic-pill[aria-pressed="true"] {
  border-color: var(--text);
  background: var(--text);
  color: var(--bg);
}
.pitch-preview {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-strong);
  color: var(--text-soft);
  font-size: 0.84rem;
  line-height: 1.6;
  margin-bottom: 12px;
}
.collab-actions { display: flex; flex-wrap: wrap; gap: 9px; }

/* ── Palette, Toast, Footer ── */
.palette-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
  place-items: start center;
  padding-top: 12vh;
  background: rgba(9, 9, 11, 0.7);
  backdrop-filter: blur(8px);
}
.palette-backdrop.open { display: grid; }
.palette {
  width: min(520px, calc(100% - 28px));
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  background: var(--bg-elevated);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.palette-input {
  width: 100%;
  padding: 15px 18px;
  border: none;
  border-bottom: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font-size: 0.96rem;
  font-family: inherit;
}
.palette-list { list-style: none; max-height: 300px; overflow-y: auto; padding: 8px; }
.palette-item button {
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: none;
  border-radius: 10px;
  background: transparent;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
}
.palette-item button:hover { background: var(--surface-subtle); }
.palette-item span.hint { font-size: 0.74rem; color: var(--muted); }

.toast {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 150;
  padding: 10px 16px;
  border: 1px solid var(--border-strong);
  border-radius: 11px;
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 600;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}
.toast.show { opacity: 1; transform: translateY(0); }

footer {
  margin-top: 72px;
  padding-block: 26px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.82rem;
}
.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 16px; }
.footer-links a:hover { color: var(--text); }

/* ── Dedicated Technical Guide Pages (/keplerbridge/) ── */
.doc-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 10px;
}
.doc-breadcrumb a:hover { color: var(--blue-soft); }
.doc-hero { padding: 48px 0 28px; }
.doc-hero h1 { font-size: clamp(2rem, 4.4vw, 3.3rem); line-height: 1.08; letter-spacing: -0.03em; margin-bottom: 16px; }
.doc-lead { max-width: 78ch; color: var(--text-soft); font-size: 1.04rem; line-height: 1.65; margin-bottom: 22px; }
.doc-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-block: 22px 10px;
}
.doc-metric {
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-strong);
  box-shadow: var(--specular);
}
.doc-metric strong { display: block; font-size: 1.35rem; font-family: "Space Grotesk", sans-serif; color: var(--blue-soft); }
.doc-metric span { display: block; font-size: 0.8rem; color: var(--muted); margin-top: 3px; }
.doc-prose-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.doc-card {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface-strong);
  box-shadow: var(--specular);
}
.doc-card h3 { font-size: 1.08rem; margin-bottom: 10px; color: var(--text); }
.doc-card p { color: var(--text-soft); font-size: 0.93rem; line-height: 1.72; margin-bottom: 10px; }
.doc-card p:last-child { margin-bottom: 0; }
.doc-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
@media (max-width: 980px) {
  .doc-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .doc-prose-grid, .doc-steps { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .doc-metrics { grid-template-columns: 1fr; }
}

.reveal { opacity: 1; transform: none; transition: opacity 0.45s var(--ease), transform 0.45s var(--ease); }
.js-ready .reveal { opacity: 0; transform: translateY(12px); }
.js-ready .reveal.visible { opacity: 1; transform: none; }

@media (max-width: 980px) {
  .hero-layout, .about-grid, .contact-grid, .project-card.bento-wide { grid-template-columns: 1fr; }
  .project-card.bento-wide { grid-column: span 1; }
  .tech-grid, .audience-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workflow-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .nav-wrap { padding-inline: 12px; top: 8px; }
  .navbar { border-radius: 16px; }
  .container { width: min(var(--width), calc(100% - 30px)); }
  .menu-toggle { display: inline-flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 62px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 12px 16px 16px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--bg-elevated);
    box-shadow: var(--shadow);
  }
  .nav-links.open { display: flex; }
  .nav-links a { display: block; padding: 11px 12px; }
  .hero { min-height: 0; padding-block: 44px 32px; }
  .section { padding-top: 56px; }
  .bento-grid, .tech-grid, .focus-grid, .workflow-strip, .facts, .audience-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .js-ready .reveal { opacity: 1; transform: none; }
}
