:root {
  color-scheme: dark;
  --void: #05070b;
  --void-2: #0b1118;
  --terminal: #0d1720;
  --terminal-2: #111f2b;
  --phosphor: #84ffb4;
  --amber: #ffd166;
  --cyan: #62e7ff;
  --pink: #ff5c93;
  --bone: #f6ead2;
  --muted: #8ea0a8;
  --line: rgba(132, 255, 180, 0.22);
  --line-strong: rgba(132, 255, 180, 0.5);
  --venture: #ff5c93;
  --fun: #ffd166;
  --private: #84ffb4;
  --professional: #62e7ff;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
  --radius: 18px;
  /* ui-monospace resolves to the platform's native mono (SF Mono, Cascadia,
     etc.) so the terminal aesthetic is consistent on macOS, Windows, and Linux
     without shipping a web font. */
  --mono: ui-monospace, "JetBrains Mono", "Cascadia Code", "SF Mono", Consolas,
    "DejaVu Sans Mono", monospace;
  --sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, sans-serif;
  /* Retro hero bars — kept as named tokens instead of inline hex. */
  --bar-1: #ff3b70;
  --bar-2: #ff8c42;
  --bar-3: var(--amber);
  --bar-4: var(--phosphor);
  --bar-5: var(--cyan);
  --bar-6: #b388ff;
}

* {
  box-sizing: border-box;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  background:
    radial-gradient(circle at top left, rgba(98, 231, 255, 0.16), transparent 30rem),
    radial-gradient(circle at 85% 15%, rgba(255, 92, 147, 0.12), transparent 24rem),
    linear-gradient(135deg, var(--void), var(--void-2) 45%, #07110d);
  color: var(--bone);
  font-family: var(--sans);
  margin: 0;
  min-height: 100vh;
  /* clip instead of hidden: prevents horizontal scroll bleed without turning
     body into a scroll container (which would break sticky descendants). */
  overflow-x: clip;
}

body::before {
  background-image:
    linear-gradient(rgba(132, 255, 180, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(132, 255, 180, 0.05) 1px, transparent 1px);
  background-size: 42px 42px;
  content: "";
  inset: 0;
  mask-image: linear-gradient(to bottom, black, transparent 72%);
  pointer-events: none;
  position: fixed;
  z-index: -2;
}

.scanlines {
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.035),
    rgba(255, 255, 255, 0.035) 1px,
    transparent 1px,
    transparent 5px
  );
  inset: 0;
  mix-blend-mode: soft-light;
  pointer-events: none;
  position: fixed;
  z-index: 50;
}

a {
  color: inherit;
}

.topbar {
  align-items: center;
  backdrop-filter: blur(18px);
  background: rgba(5, 7, 11, 0.82);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: 14px clamp(18px, 4vw, 60px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand,
.primary-nav {
  align-items: center;
  display: flex;
}

.brand {
  gap: 12px;
  text-decoration: none;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  color: var(--phosphor);
  font-family: var(--mono);
  font-size: 15px;
  letter-spacing: 0.04em;
  line-height: 1.1;
  text-transform: uppercase;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.brand-mark {
  align-items: center;
  background: linear-gradient(135deg, rgba(132, 255, 180, 0.18), rgba(98, 231, 255, 0.18));
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  box-shadow: 0 0 30px rgba(132, 255, 180, 0.14);
  color: var(--phosphor);
  display: flex;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 900;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.primary-nav {
  gap: 8px;
}

.primary-nav a {
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 800;
  padding: 9px 12px;
  text-decoration: none;
  text-transform: uppercase;
}

.primary-nav a:hover {
  border-color: var(--line);
  color: var(--phosphor);
}

main {
  padding: clamp(22px, 5vw, 72px);
}

.terminal-panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015)),
    rgba(13, 23, 32, 0.84);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  position: relative;
}

.dash-hero-simple {
  display: grid;
  gap: clamp(22px, 4vw, 42px);
  grid-template-columns: 1fr;
  justify-items: center;
  overflow: hidden;
  padding: clamp(22px, 4vw, 46px);
}

.dash-hero-art {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: clamp(240px, 32vw, 420px);
  width: min(100%, 480px);
}

.retro-screen {
  aspect-ratio: 1 / 1;
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.07),
      rgba(255, 255, 255, 0.07) 1px,
      transparent 1px,
      transparent 7px
    ),
    radial-gradient(circle at 50% 45%, rgba(132, 255, 180, 0.18), transparent 56%),
    #081014;
  border: 2px solid rgba(246, 234, 210, 0.32);
  border-radius: 28px;
  box-shadow:
    inset 0 0 44px rgba(0, 0, 0, 0.8),
    0 0 55px rgba(98, 231, 255, 0.12),
    var(--shadow);
  display: grid;
  max-width: 420px;
  overflow: hidden;
  padding: clamp(18px, 4vw, 34px);
  position: relative;
  width: 100%;
}

.retro-screen::before {
  background:
    radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.18), transparent 12%),
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  content: "";
  inset: 0;
  opacity: 0.5;
  pointer-events: none;
  position: absolute;
}

.retro-bars {
  align-self: end;
  display: grid;
  gap: 10px;
  position: relative;
  z-index: 1;
}

.retro-bars span {
  border-radius: 999px;
  box-shadow: 0 0 22px currentColor;
  display: block;
  height: clamp(12px, 2.8vw, 24px);
}

.retro-bars span:nth-child(1) { background: var(--bar-1); color: var(--bar-1); width: 58%; }
.retro-bars span:nth-child(2) { background: var(--bar-2); color: var(--bar-2); width: 72%; }
.retro-bars span:nth-child(3) { background: var(--bar-3); color: var(--bar-3); width: 86%; }
.retro-bars span:nth-child(4) { background: var(--bar-4); color: var(--bar-4); width: 100%; }
.retro-bars span:nth-child(5) { background: var(--bar-5); color: var(--bar-5); width: 82%; }
.retro-bars span:nth-child(6) { background: var(--bar-6); color: var(--bar-6); width: 64%; }

.retro-screen pre {
  align-self: start;
  color: var(--bone);
  font-family: var(--mono);
  font-size: clamp(15px, 2.4vw, 24px);
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 1.1;
  margin: 0;
  position: relative;
  text-shadow: 0 0 18px rgba(246, 234, 210, 0.32);
  z-index: 1;
}

.dash-hero-intro {
  align-self: center;
  max-width: 820px;
}

.terminal-hero,
.project-hero {
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
}

.hero-copy,
.project-hero-copy,
.page-heading {
  padding: clamp(32px, 5vw, 64px);
}

.dash-hero {
  align-items: stretch;
}

.dash-hero-copy {
  background:
    radial-gradient(circle at 12% 15%, rgba(255, 92, 147, 0.14), transparent 18rem),
    radial-gradient(circle at 84% 72%, rgba(98, 231, 255, 0.12), transparent 22rem),
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
    rgba(13, 23, 32, 0.9);
  overflow: hidden;
}

.dash-hero-copy::after {
  background:
    linear-gradient(90deg, transparent, rgba(132, 255, 180, 0.52), transparent),
    linear-gradient(90deg, transparent, rgba(255, 209, 102, 0.42), transparent);
  content: "";
  height: 2px;
  inset: auto 34px 30px;
  opacity: 0.7;
  position: absolute;
}

.hero-briefing {
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid var(--line);
  border-radius: 16px;
  display: grid;
  gap: 10px;
  margin: 28px 0;
  max-width: 760px;
  padding: 18px;
}

.hero-briefing-label,
.console-header span,
.console-path span {
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-briefing strong {
  color: var(--bone);
  font-family: var(--mono);
  font-size: clamp(18px, 2.1vw, 28px);
  letter-spacing: -0.04em;
  line-height: 1.12;
}

.eyebrow {
  color: var(--phosphor);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.14em;
  margin: 0 0 12px;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  line-height: 0.95;
}

h1 {
  color: #fff;
  font-family: var(--mono);
  font-size: clamp(46px, 9vw, 112px);
  letter-spacing: -0.08em;
  margin-bottom: 18px;
  max-width: 980px;
  text-shadow: 0 0 34px rgba(132, 255, 180, 0.16);
  text-transform: uppercase;
}

h2 {
  color: #fff;
  font-family: var(--mono);
  font-size: clamp(30px, 5vw, 64px);
  letter-spacing: -0.06em;
  margin-bottom: 14px;
}

h3 {
  font-family: var(--mono);
  font-size: 26px;
  letter-spacing: -0.05em;
  margin-bottom: 12px;
}

p {
  color: #c6d1d3;
  font-size: 16px;
  line-height: 1.7;
}

.terminal-command {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--muted);
  display: grid;
  font-family: var(--mono);
  gap: 6px;
  margin: 26px 0;
  padding: 16px;
}

.terminal-command strong {
  color: var(--amber);
  font-size: 15px;
}

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

.button {
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  padding: 12px 18px;
  text-decoration: none;
  text-transform: uppercase;
}

.button.primary {
  background: var(--phosphor);
  border-color: var(--phosphor);
  color: #041108;
}

.button.secondary {
  color: var(--bone);
}

.button:hover {
  transform: translateY(-1px);
}

.hero-monitor,
.project-visual {
  align-content: space-between;
  background:
    radial-gradient(circle at 50% 22%, rgba(132, 255, 180, 0.2), transparent 18rem),
    rgba(9, 16, 23, 0.9);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  min-height: 430px;
  overflow: hidden;
  padding: 28px;
  position: relative;
}

.dash-console {
  background:
    radial-gradient(circle at 50% 42%, rgba(132, 255, 180, 0.2), transparent 10rem),
    radial-gradient(circle at 82% 18%, rgba(255, 209, 102, 0.14), transparent 12rem),
    linear-gradient(135deg, rgba(5, 7, 11, 0.95), rgba(11, 26, 34, 0.92));
  gap: 22px;
}

.dash-console::before {
  background-image:
    linear-gradient(rgba(132, 255, 180, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(98, 231, 255, 0.07) 1px, transparent 1px);
  background-size: 26px 26px;
  content: "";
  inset: 0;
  opacity: 0.5;
  pointer-events: none;
  position: absolute;
}

.console-header,
.console-path,
.mission-grid {
  position: relative;
  z-index: 1;
}

.console-header {
  align-items: start;
  display: flex;
  gap: 14px;
  justify-content: space-between;
}

.console-header strong {
  color: var(--amber);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.console-path {
  background: rgba(0, 0, 0, 0.38);
  border: 1px solid rgba(132, 255, 180, 0.28);
  border-radius: 14px;
  display: grid;
  gap: 8px;
  padding: 16px;
}

.console-path strong {
  color: var(--bone);
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.35;
}

.console-radar {
  aspect-ratio: 1;
  border: 1px solid rgba(132, 255, 180, 0.34);
  border-radius: 50%;
  box-shadow:
    0 0 40px rgba(132, 255, 180, 0.15),
    inset 0 0 38px rgba(132, 255, 180, 0.08);
  display: grid;
  margin: 4px auto;
  max-width: 260px;
  place-items: center;
  position: relative;
  width: min(100%, 260px);
  z-index: 1;
}

.console-radar::before,
.console-radar::after,
.radar-ring,
.radar-blip {
  content: "";
  position: absolute;
}

.console-radar::before {
  background: linear-gradient(90deg, transparent 49.5%, rgba(132, 255, 180, 0.35) 50%, transparent 50.5%);
  inset: 10px;
}

.console-radar::after {
  background: conic-gradient(from 225deg, rgba(132, 255, 180, 0.48), rgba(132, 255, 180, 0.06), transparent 38%);
  border-radius: 50%;
  inset: 16px;
  mix-blend-mode: screen;
}

.radar-ring {
  border: 1px solid rgba(98, 231, 255, 0.22);
  border-radius: 50%;
}

.ring-one { inset: 22%; }
.ring-two { inset: 36%; }
.ring-three { inset: 50%; }

.radar-blip {
  background: var(--amber);
  border-radius: 50%;
  box-shadow: 0 0 16px rgba(255, 209, 102, 0.75);
  height: 8px;
  width: 8px;
}

.blip-one { left: 28%; top: 32%; }
.blip-two { right: 26%; top: 42%; }
.blip-three { bottom: 26%; left: 46%; }
.blip-four { bottom: 38%; right: 38%; }

.mission-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, 1fr);
}

.mission-grid div {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
}

.mission-grid span {
  color: var(--phosphor);
  display: block;
  font-family: var(--mono);
  font-size: 34px;
  font-weight: 900;
}

.mission-grid p {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  margin: 0;
  text-transform: uppercase;
}

.mascot-ascii,
.detail-card pre,
.project-systems pre {
  color: var(--phosphor);
  font-family: var(--mono);
  margin: 0;
  white-space: pre-wrap;
}

.mascot-ascii {
  font-size: clamp(22px, 4vw, 42px);
  line-height: 1.05;
  text-shadow: 0 0 26px rgba(132, 255, 180, 0.28);
}

.metric-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, 1fr);
}

.metric-grid div,
.classification-strip a,
.route-strip a,
.project-card,
.tech-row {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.metric-grid div {
  padding: 16px;
}

.metric-grid span,
.classification-strip span {
  color: var(--phosphor);
  display: block;
  font-family: var(--mono);
  font-size: 34px;
  font-weight: 900;
}

.classification-strip span {
  font-size: clamp(24px, 6vw, 30px);
  line-height: 1;
}

.metric-grid p,
.classification-strip small {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  margin: 0;
  text-transform: uppercase;
}

.route-strip,
.classification-strip {
  display: grid;
  gap: 14px;
  margin: 22px 0;
}

.route-strip {
  grid-template-columns: repeat(4, 1fr);
}

.classification-strip {
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: clamp(22px, 4vw, 42px) 0;
}

.route-strip a,
.classification-strip a {
  overflow: hidden;
  text-decoration: none;
}

.route-strip a {
  padding: 18px;
}

.classification-strip a {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: clamp(84px, 12vw, 118px);
  padding: 18px;
  text-align: center;
}

.route-strip code {
  color: var(--amber);
  display: block;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 900;
  margin-bottom: 8px;
}

.route-strip span,
.classification-strip strong {
  color: #fff;
  display: block;
  font-family: var(--mono);
  font-weight: 900;
}

.classification-strip strong {
  font-size: clamp(18px, 2.4vw, 28px);
  line-height: 1.05;
  margin-top: 0;
}

.classification-strip small {
  display: block;
  line-height: 1.45;
  margin-top: 12px;
  text-transform: none;
}

.classification-strip a:nth-child(1) strong { color: var(--venture); }
.classification-strip a:nth-child(2) strong { color: var(--fun); }
.classification-strip a:nth-child(3) strong { color: var(--private); }
.classification-strip a:nth-child(4) strong { color: var(--professional); }

.classification-strip a:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.project-group,
.studio-note,
.project-story,
.project-systems,
.signals,
.related-projects,
.about-grid,
.contact-grid,
.tech-list,
.media-strip {
  margin-top: clamp(28px, 5vw, 70px);
}

.section-heading {
  align-items: end;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 18px;
}

.section-heading span {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 900;
  padding: 9px 12px;
  text-transform: uppercase;
}

.project-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.project-card {
  display: grid;
  grid-template-rows: minmax(220px, clamp(220px, 20vw, 280px)) 1fr;
  min-height: 100%;
  overflow: hidden;
  position: relative;
}

.project-card::after {
  background: var(--phosphor);
  content: "";
  height: 3px;
  inset: 0 0 auto;
  opacity: 0.8;
  position: absolute;
}

.project-card--venture::after { background: var(--venture); }
.project-card--fun-project::after { background: var(--fun); }
.project-card--private::after { background: var(--private); }
.project-card--professional::after { background: var(--professional); }

.project-media {
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 209, 102, 0.12), transparent 11rem),
    linear-gradient(135deg, rgba(132, 255, 180, 0.1), rgba(98, 231, 255, 0.08)),
    #071017;
  display: grid;
  overflow: hidden;
  padding: clamp(8px, 1.2vw, 14px);
  place-items: center;
  position: relative;
  text-decoration: none;
}

.project-media img,
.project-visual img,
.media-strip img {
  display: block;
  height: 100%;
  object-fit: contain;
  width: 100%;
}

.project-media img {
  border-radius: 12px;
  filter: saturate(1.08) contrast(1.12);
  max-height: 100%;
  transition: transform 220ms ease;
}

.project-card:hover .project-media img {
  transform: scale(1.04);
}

.title-card-media {
  align-content: center;
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(132, 255, 180, 0.11),
      rgba(132, 255, 180, 0.11) 1px,
      transparent 1px,
      transparent 5px
    ),
    radial-gradient(circle at 16% 16%, rgba(255, 92, 147, 0.38), transparent 8rem),
    radial-gradient(circle at 84% 78%, rgba(98, 231, 255, 0.3), transparent 9rem),
    linear-gradient(135deg, #020305 0%, #080a22 56%, #120b02 100%);
  display: grid;
  height: 100%;
  justify-items: stretch;
  min-height: 220px;
  overflow: hidden;
  padding: clamp(16px, 2vw, 26px);
  position: relative;
  text-align: left;
}

.title-card-media::before {
  background-image:
    linear-gradient(rgba(132, 255, 180, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(98, 231, 255, 0.08) 1px, transparent 1px);
  background-size: 24px 24px;
  content: "";
  inset: 0;
  opacity: 0.72;
  pointer-events: none;
  position: absolute;
}

.title-card-media::after {
  background: linear-gradient(90deg, transparent, rgba(255, 92, 147, 0.82), rgba(255, 209, 102, 0.9), rgba(98, 231, 255, 0.82), transparent);
  content: "";
  height: 3px;
  inset: auto 24px 24px;
  opacity: 0.85;
  position: absolute;
}

.title-card-window {
  background: rgba(2, 5, 10, 0.82);
  border: 1px solid rgba(132, 255, 180, 0.38);
  border-radius: 18px;
  box-shadow:
    0 0 0 1px rgba(255, 92, 147, 0.12),
    0 0 34px rgba(98, 231, 255, 0.13),
    inset 0 0 28px rgba(132, 255, 180, 0.08);
  display: grid;
  gap: 10px;
  min-height: 100%;
  overflow: hidden;
  padding: clamp(16px, 2.2vw, 26px);
  position: relative;
  z-index: 1;
}

.title-card-lights {
  display: flex;
  gap: 8px;
}

.title-card-lights span {
  border-radius: 50%;
  display: block;
  height: 11px;
  width: 11px;
}

.title-card-lights span:nth-child(1) { background: var(--pink); }
.title-card-lights span:nth-child(2) { background: var(--amber); }
.title-card-lights span:nth-child(3) { background: var(--phosphor); }

.title-card-prompt,
.title-card-stats span,
.title-card-ascii {
  font-family: var(--mono);
  font-weight: 900;
  margin: 0;
}

.title-card-prompt {
  color: var(--cyan);
  font-size: clamp(0.7rem, 1.25vw, 0.9rem);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.title-card-media strong {
  color: var(--bone);
  font-family: var(--mono);
  font-size: clamp(1.6rem, 4.2vw, 3.3rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 0.94;
  max-width: 12ch;
  overflow-wrap: anywhere;
  text-shadow:
    2px 2px 0 var(--pink),
    -2px -2px 0 var(--cyan),
    0 0 28px rgba(132, 255, 180, 0.34);
  text-transform: uppercase;
}

.title-card-stats {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.title-card-stats span {
  border: 1px solid rgba(255, 209, 102, 0.42);
  border-radius: 10px;
  color: var(--amber);
  font-size: clamp(0.58rem, 1vw, 0.78rem);
  letter-spacing: 0.08em;
  overflow: hidden;
  padding: 8px 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.title-card-ascii {
  align-self: end;
  color: var(--phosphor);
  font-size: clamp(0.86rem, 2vw, 1.55rem);
  line-height: 1.05;
  text-shadow:
    0 0 14px rgba(132, 255, 180, 0.46),
    2px 0 0 rgba(255, 92, 147, 0.28),
    -2px 0 0 rgba(98, 231, 255, 0.28);
  white-space: pre;
}

.title-card-media.large {
  min-height: 100%;
}

.card-body {
  padding: 22px;
}

.card-meta,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.card-meta {
  justify-content: space-between;
  margin-bottom: 16px;
}

.badge,
.status-dot,
.tag-row span,
.tech-index {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--phosphor);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
  padding: 6px 9px;
  text-transform: uppercase;
}

.status-dot {
  color: var(--amber);
}

.card-body h3 a {
  text-decoration: none;
}

.card-body p,
.byline {
  font-size: 14px;
}

.byline {
  color: var(--amber);
  font-family: var(--mono);
  font-weight: 800;
}

.highlight-list {
  color: #dbe7e6;
  margin: 18px 0;
  padding-left: 18px;
}

.highlight-list li {
  line-height: 1.6;
  margin-bottom: 8px;
}

.highlight-list li::marker {
  color: var(--phosphor);
}

.tag-row {
  margin-top: 18px;
}

.project-hero {
  align-items: stretch;
}

.back-link {
  color: var(--amber);
  display: inline-block;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 24px;
  text-decoration: none;
  text-transform: uppercase;
}

.project-visual {
  aspect-ratio: 16 / 10;
  min-height: auto;
  padding: clamp(10px, 1.5vw, 18px);
  place-items: center;
}

.project-visual img {
  border-radius: 14px;
  max-height: min(62vh, 560px);
}

.about-grid,
.contact-grid,
.project-systems {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr 1fr;
}

.about-grid--solo {
  grid-template-columns: minmax(0, 1fr);
}

.detail-card,
.project-systems article,
.story-copy,
.signals,
.studio-note,
.about-grid article,
.contact-grid article,
.tech-row,
.technology-summary,
.technology-section,
.technology-footnote {
  padding: 36px 24px 24px;
}

.detail-card pre,
.project-systems pre {
  background: rgba(0, 0, 0, 0.26);
  border: 1px solid var(--line);
  border-radius: 14px;
  line-height: 1.55;
  overflow-x: auto;
  padding: 16px;
}

.media-strip {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, 1fr);
}

.media-strip img {
  aspect-ratio: 16 / 10;
  background:
    radial-gradient(circle at 20% 10%, rgba(132, 255, 180, 0.12), transparent 9rem),
    rgba(7, 16, 23, 0.72);
  border: 1px solid var(--line);
  border-radius: 16px;
  max-height: 320px;
  padding: 10px;
}

.project-story {
  display: grid;
  gap: 24px;
  grid-template-columns: 0.8fr 1.2fr;
}

.story-copy p:last-child,
.studio-note p:last-child {
  margin-bottom: 0;
}

.signals {
  display: grid;
  gap: 18px;
  grid-template-columns: 0.7fr 1.3fr;
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.project-links a {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--bone);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 900;
  padding: 9px 12px;
  text-decoration: none;
}

.page-heading {
  margin: 0 auto;
  max-width: 1040px;
}

.tech-list {
  display: grid;
  gap: 14px;
}

.tech-row {
  align-items: center;
  display: grid;
  gap: 20px;
  grid-template-columns: 0.6fr 1.4fr;
}

.tech-row h2 {
  font-size: clamp(24px, 3vw, 40px);
  margin: 12px 0 8px;
}

.technology-hero {
  overflow: hidden;
  position: relative;
}

.technology-hero h1 {
  font-size: clamp(44px, 7vw, 92px);
  max-width: 920px;
}

.technology-summary {
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: clamp(28px, 5vw, 70px);
  overflow: hidden;
}

.technology-summary div {
  background: rgba(255, 255, 255, 0.035);
  min-width: 0;
  padding: 18px;
}

.technology-summary span {
  color: var(--phosphor);
  display: block;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 18px;
}

.technology-summary strong {
  color: var(--bone);
  display: block;
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.1;
  margin-bottom: 10px;
}

.technology-summary p {
  color: #dbe7e6;
  font-size: 14px;
  line-height: 1.55;
  margin: 0;
}

.primary-stack {
  margin-top: 18px;
  padding: 24px;
}

.primary-stack .eyebrow {
  margin-bottom: 12px;
}

.primary-stack-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.primary-stack-chip {
  align-items: baseline;
  background: rgba(132, 255, 180, 0.06);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--phosphor);
  display: inline-flex;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 900;
  gap: 8px;
  letter-spacing: 0.05em;
  padding: 8px 12px;
  text-transform: uppercase;
}

.primary-stack-chip[data-count="3"],
.primary-stack-chip[data-count="4"],
.primary-stack-chip[data-count="5"],
.primary-stack-chip[data-count="6"] {
  background: rgba(132, 255, 180, 0.14);
  border-color: var(--line-strong);
  color: var(--bone);
}

.primary-stack-chip[data-count="2"] {
  background: rgba(132, 255, 180, 0.1);
}

.primary-stack-count {
  color: var(--muted);
  font-size: 11px;
}

.primary-stack-chip[data-count="3"] .primary-stack-count,
.primary-stack-chip[data-count="4"] .primary-stack-count,
.primary-stack-chip[data-count="5"] .primary-stack-count,
.primary-stack-chip[data-count="6"] .primary-stack-count {
  color: var(--amber);
}

.technology-matrices {
  display: grid;
  gap: 14px;
  margin-top: clamp(28px, 5vw, 70px);
}

.tech-matrix {
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(250px, 0.78fr) minmax(0, 1.22fr);
}

.tech-matrix-heading {
  margin-bottom: 0;
}

.tech-matrix-heading h2,
.technology-footnote h2 {
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1;
  margin: 12px 0 14px;
}

.tech-matrix-heading p:last-child,
.technology-footnote p:last-child {
  color: #dbe7e6;
  line-height: 1.65;
}

.capability-list {
  display: grid;
  gap: 0;
}

.capability-row {
  border-top: 1px solid rgba(132, 255, 180, 0.14);
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(150px, 0.42fr) minmax(0, 0.58fr);
  padding: 16px 0;
}

.capability-row:last-child {
  border-bottom: 1px solid rgba(132, 255, 180, 0.14);
}

.capability-row h3 {
  color: var(--bone);
  font-size: clamp(17px, 1.8vw, 22px);
  line-height: 1.08;
  margin: 0;
}

.capability-row p {
  color: #dbe7e6;
  font-size: 14px;
  line-height: 1.58;
  margin: 0;
}

.capability-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  grid-column: 2;
}

.capability-tags span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.tech-matrix-empty {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 13px;
  margin: 0;
}

.technology-footnote {
  margin-top: 18px;
}

.technology-footnote p + p {
  margin-top: 12px;
}

.technology-footnote a {
  color: var(--amber);
}

.footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 800;
  gap: 14px;
  justify-content: space-between;
  padding: 28px clamp(18px, 4vw, 60px);
  text-transform: uppercase;
}

.about-hero .terminal-command span {
  color: var(--bone);
  font-family: var(--mono);
  font-size: clamp(18px, 2vw, 28px);
  font-weight: 900;
}

.quote-strip,
.about-accordion {
  display: grid;
  gap: 18px;
  margin-top: clamp(28px, 5vw, 70px);
}

.quote-strip {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.quote-strip--manifesto {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.quote-strip blockquote {
  color: var(--bone);
  font-family: var(--mono);
  font-size: clamp(18px, 2vw, 26px);
  font-weight: 900;
  line-height: 1.25;
  margin: 0;
  padding: 28px;
}

.story-section {
  display: grid;
  gap: 24px;
  grid-template-columns: 0.72fr 1.28fr;
  margin-top: clamp(28px, 5vw, 70px);
  padding: 36px 24px 24px;
}

.story-columns {
  columns: 2 280px;
  column-gap: 28px;
}

.story-columns p {
  break-inside: avoid;
}

.about-accordion {
  gap: 12px;
}

.about-accordion-card {
  overflow: hidden;
  padding: 0;
}

.about-accordion-card:nth-child(4) {
  border-color: rgba(98, 231, 255, 0.34);
}

.about-accordion-card:nth-child(5) {
  border-color: rgba(255, 209, 102, 0.34);
}

.about-accordion-card summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  list-style: none;
  padding: 24px;
  position: relative;
}

.about-accordion-card summary::-webkit-details-marker {
  display: none;
}

.about-accordion-card summary .eyebrow {
  flex: 0 0 190px;
  margin: 0;
}

.about-accordion-card summary::after {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--phosphor);
  content: "+";
  display: grid;
  flex: 0 0 36px;
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 900;
  height: 36px;
  line-height: 1;
  place-items: center;
  transition: transform 160ms ease, color 160ms ease, border-color 160ms ease;
  width: 36px;
}

.about-accordion-card[open] summary::after {
  border-color: rgba(255, 209, 102, 0.56);
  color: var(--amber);
  content: "−";
  transform: rotate(180deg);
}

.about-accordion-card summary:focus-visible {
  outline: 2px solid var(--phosphor);
  outline-offset: -6px;
}

.accordion-title {
  color: var(--bone);
  flex: 1;
  font-family: var(--mono);
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 900;
  line-height: 1.1;
}

.accordion-body {
  border-top: 1px solid var(--line);
  padding: 0 24px 24px;
}

.accordion-body p:first-child {
  margin-top: 22px;
}

.signal-card {
  background:
    radial-gradient(circle at 82% 18%, rgba(255, 209, 102, 0.14), transparent 14rem),
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015)),
    rgba(13, 23, 32, 0.84);
}

.music-card {
  background:
    radial-gradient(circle at 12% 24%, rgba(98, 231, 255, 0.13), transparent 13rem),
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015)),
    rgba(13, 23, 32, 0.84);
}

.music-link {
  display: inline-flex;
  margin-top: 4px;
}

.build-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.build-tags span {
  background: rgba(132, 255, 180, 0.08);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--bone);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 900;
  padding: 10px 12px;
  text-transform: uppercase;
}

@media (max-width: 1050px) {
  .dash-hero-simple,
  .terminal-hero,
  .project-hero,
  .project-story,
  .signals,
  .tech-row,
  .technology-summary,
  .tech-matrix,
  .story-section {
    grid-template-columns: 1fr;
  }

  .technology-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .classification-strip,
  .route-strip,
  .media-strip,
  .quote-strip {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 760px) {
  .topbar,
  .footer,
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .primary-nav {
    flex-wrap: wrap;
  }

  main {
    padding: 18px;
  }

  .about-accordion-card summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .about-accordion-card summary .eyebrow {
    flex-basis: auto;
  }

  .about-accordion-card summary::after {
    position: absolute;
    right: 18px;
    top: 18px;
  }

  .project-grid,
  .classification-strip,
  .route-strip,
  .about-grid,
  .contact-grid,
  .project-systems,
  .media-strip,
  .metric-grid,
  .mission-grid,
  .quote-strip {
    grid-template-columns: 1fr;
  }

  .technology-summary,
  .capability-row {
    grid-template-columns: 1fr;
  }

  .capability-tags {
    grid-column: 1;
  }

  .project-card {
    grid-template-rows: minmax(200px, 54vw) 1fr;
  }

  .project-visual {
    aspect-ratio: 4 / 3;
  }

  .media-strip img {
    aspect-ratio: 4 / 3;
    max-height: 420px;
  }

  h1 {
    font-size: clamp(40px, 14vw, 68px);
  }

  .technology-hero h1 {
    font-size: clamp(34px, 10vw, 42px);
  }
}

.project-hero--single {
  display: block;
  overflow: hidden;
}

.project-hero--single .project-hero-copy {
  max-width: 980px;
}

.media-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.media-grid img,
.media-grid--empty .title-card-media {
  aspect-ratio: 16 / 9;
  background:
    radial-gradient(circle at 20% 10%, rgba(132, 255, 180, 0.12), transparent 9rem),
    rgba(7, 16, 23, 0.72);
  border: 1px solid var(--line);
  border-radius: 16px;
  min-height: 0;
  object-fit: contain;
  padding: clamp(8px, 1vw, 12px);
  width: 100%;
}

.media-grid img {
  max-height: min(38vh, 340px);
}

.media-grid--empty {
  grid-template-columns: minmax(0, 1fr);
}

.project-manifest,
.project-architecture {
  display: grid;
  gap: 24px;
}

.project-manifest {
  grid-template-columns: minmax(180px, 0.35fr) minmax(0, 1fr);
}

.manifest-card {
  padding: clamp(24px, 4vw, 36px);
}

.architecture-panel pre {
  background: rgba(0, 0, 0, 0.26);
  border: 1px solid var(--line);
  border-radius: 14px;
  line-height: 1.55;
  overflow-x: auto;
  padding: 16px;
}

.scan-source,
.doc-empty,
.doc-link-card small {
  color: var(--muted);
}

.docs-panel {
  overflow: hidden;
  padding: 0;
}

.docs-panel summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  list-style: none;
  padding: 24px;
}

.docs-panel summary::-webkit-details-marker {
  display: none;
}

.docs-panel summary::after {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--phosphor);
  content: "+";
  display: grid;
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 900;
  height: 36px;
  line-height: 1;
  place-items: center;
  transition: transform 160ms ease, color 160ms ease, border-color 160ms ease;
  width: 36px;
}

.docs-panel[open] summary::after {
  border-color: rgba(255, 209, 102, 0.56);
  color: var(--amber);
  content: "−";
  transform: rotate(180deg);
}

.docs-panel summary strong {
  color: var(--bone);
  display: block;
  font-family: var(--mono);
  font-size: clamp(20px, 2.4vw, 34px);
  letter-spacing: -0.04em;
  margin-top: 6px;
}

.doc-link-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 0 24px 24px;
}

.doc-link-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  display: grid;
  gap: 8px;
  padding: 18px;
  text-decoration: none;
}

.doc-link-card span {
  color: var(--phosphor);
  font-family: var(--mono);
  font-weight: 900;
  text-transform: uppercase;
}

.doc-empty {
  margin: 0;
  padding: 0 24px 24px;
}

.doc-page {
  margin: 0 auto;
  max-width: 980px;
  overflow: hidden;
  padding: clamp(28px, 5vw, 64px);
}

.doc-page-header {
  border-bottom: 1px solid var(--line);
  margin-bottom: 32px;
  padding-bottom: 24px;
}

.markdown-poem {
  color: #dbe7e6;
  font-size: clamp(17px, 1.6vw, 21px);
  line-height: 1.75;
}

.markdown-poem h1,
.markdown-poem h2,
.markdown-poem h3 {
  color: var(--bone);
  font-family: var(--mono);
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin: 1.6em 0 0.5em;
  text-transform: uppercase;
}

.markdown-poem h1 { font-size: clamp(36px, 5vw, 68px); }
.markdown-poem h2 { color: var(--phosphor); font-size: clamp(28px, 3.5vw, 48px); }
.markdown-poem h3 { color: var(--amber); font-size: clamp(22px, 2.6vw, 34px); }

.markdown-poem blockquote {
  border-left: 3px solid var(--pink);
  color: var(--bone);
  font-family: var(--mono);
  font-size: 1.08em;
  font-weight: 900;
  margin: 28px 0;
  padding: 8px 0 8px 22px;
}

.markdown-poem code {
  color: var(--amber);
  font-family: var(--mono);
}

.markdown-poem pre {
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow-x: auto;
  padding: 18px;
}

@media (max-width: 1050px) {
  .project-manifest {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .media-grid,
  .doc-link-grid {
    grid-template-columns: 1fr;
  }

  .media-grid img {
    max-height: 420px;
  }
}

.media-grid--thumbs {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.media-thumb {
  background: rgba(7, 16, 23, 0.72);
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--phosphor);
  cursor: zoom-in;
  display: grid;
  gap: 8px;
  padding: clamp(8px, 1vw, 12px);
  text-align: left;
  transition: border-color 160ms ease, transform 160ms ease;
  width: 100%;
}

.media-thumb:hover,
.media-thumb:focus-visible {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.media-thumb img {
  aspect-ratio: 16 / 9;
  background:
    radial-gradient(circle at 20% 10%, rgba(132, 255, 180, 0.12), transparent 9rem),
    rgba(7, 16, 23, 0.72);
  border: 0;
  border-radius: 12px;
  max-height: min(22vh, 190px);
  object-fit: contain;
  padding: 0;
}

.media-thumb span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.image-modal {
  background: rgba(3, 8, 12, 0.96);
  border: 1px solid rgba(132, 255, 180, 0.45);
  border-radius: 20px;
  box-shadow: 0 0 60px rgba(98, 231, 255, 0.16);
  max-height: 94vh;
  max-width: 94vw;
  padding: clamp(36px, 5vw, 58px) clamp(12px, 2vw, 24px) clamp(12px, 2vw, 24px);
  width: min(1200px, 94vw);
}

.image-modal::backdrop {
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(6px);
}

.image-modal img {
  display: block;
  max-height: calc(94vh - 88px);
  object-fit: contain;
  width: 100%;
}

.image-modal-close {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--phosphor);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 26px;
  font-weight: 900;
  height: 42px;
  line-height: 1;
  position: absolute;
  right: 14px;
  top: 12px;
  width: 42px;
}

.image-modal-nav {
  align-items: center;
  background: rgba(3, 8, 12, 0.78);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--phosphor);
  cursor: pointer;
  display: flex;
  font-family: var(--mono);
  font-size: 30px;
  font-weight: 900;
  height: 52px;
  justify-content: center;
  line-height: 1;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
}

.image-modal-prev {
  left: clamp(8px, 1.5vw, 18px);
}

.image-modal-next {
  right: clamp(8px, 1.5vw, 18px);
}

.image-modal-nav:hover {
  border-color: var(--line-strong);
}

.image-modal-close:focus-visible,
.image-modal-nav:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.image-modal-counter {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  margin: 10px 0 0;
  text-align: center;
}

.manifest-list {
  color: #dbe7e6;
  display: grid;
  gap: 8px 26px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  line-height: 1.55;
  margin: 18px 0 0;
  padding-left: 18px;
}

.manifest-list li::marker {
  color: var(--phosphor);
}

@media (max-width: 760px) {
  .manifest-list {
    grid-template-columns: 1fr;
  }
}

.project-architecture {
  margin-top: clamp(28px, 5vw, 70px);
}

.architecture-panel {
  padding: 36px 24px 24px;
}

.architecture-panel strong {
  color: var(--bone);
  display: block;
  font-family: var(--mono);
  font-size: clamp(20px, 2.4vw, 34px);
  letter-spacing: -0.04em;
  margin-bottom: 18px;
  margin-top: 6px;
}

@media (max-width: 1050px) {
  .media-grid--thumbs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .media-grid--thumbs {
    grid-template-columns: 1fr;
  }

  .media-thumb img {
    max-height: 240px;
  }
}

.leafbook {
  margin-top: clamp(28px, 5vw, 70px);
}

.leafbook-heading {
  margin-bottom: 14px;
}

.leafbook-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-color: var(--line-strong) transparent;
}

.leafbook-tabs a {
  background: rgba(132, 255, 180, 0.06);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  flex: 0 0 auto;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  padding: 10px 12px;
  text-decoration: none;
  text-transform: uppercase;
}

.leafbook-tabs a:hover,
.leafbook-tabs a:focus-visible {
  border-color: var(--line-strong);
  color: var(--phosphor);
}

.leafbook-track {
  display: grid;
  gap: clamp(16px, 3vw, 28px);
  grid-auto-columns: minmax(min(82vw, 420px), 720px);
  grid-auto-flow: column;
  overflow-x: auto;
  padding: 4px clamp(18px, 4vw, 48px) 24px 0;
  scroll-padding-left: 2px;
  scroll-snap-type: x mandatory;
  scrollbar-color: var(--line-strong) transparent;
}

.leaf-page {
  background:
    radial-gradient(circle at 88% 16%, rgba(132, 255, 180, 0.13), transparent 10rem),
    linear-gradient(145deg, rgba(16, 30, 40, 0.96), rgba(7, 13, 19, 0.95));
  border-radius: 34px;
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  display: grid;
  min-height: clamp(430px, 58vh, 620px);
  overflow: hidden;
  padding: clamp(28px, 5vw, 58px);
  position: relative;
  scroll-snap-align: start;
}

.leaf-page::before {
  background-image:
    linear-gradient(rgba(132, 255, 180, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(132, 255, 180, 0.045) 1px, transparent 1px);
  background-size: 32px 32px;
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
}

.leaf-page-arrow {
  background: rgba(7, 16, 23, 0.72);
  border: 2px solid rgba(132, 255, 180, 0.28);
  border-radius: 50%;
  color: var(--phosphor);
  cursor: pointer;
  display: grid;
  font-family: var(--mono);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 900;
  height: clamp(64px, 8vw, 88px);
  line-height: 1;
  padding: 0;
  place-items: center;
  position: absolute;
  right: clamp(24px, 4vw, 44px);
  top: clamp(24px, 4vw, 44px);
  transition: border-color 160ms ease, color 160ms ease, transform 160ms ease;
  width: clamp(64px, 8vw, 88px);
  z-index: 2;
}


.leaf-page-arrow--previous {
  left: clamp(24px, 4vw, 44px);
  right: auto;
}

.leaf-page-arrow:hover,
.leaf-page-arrow:focus-visible {
  border-color: var(--line-strong);
  color: var(--amber);
  transform: translateX(3px);
}

.leaf-page-arrow[data-leaf-direction="previous"]:hover,
.leaf-page-arrow[data-leaf-direction="previous"]:focus-visible {
  transform: translateX(-3px);
}

.leaf-page:nth-child(3n+2) {
  background:
    radial-gradient(circle at 90% 16%, rgba(255, 209, 102, 0.13), transparent 11rem),
    linear-gradient(145deg, rgba(31, 34, 29, 0.96), rgba(8, 14, 16, 0.95));
}

.leaf-page:nth-child(3n) {
  background:
    radial-gradient(circle at 90% 16%, rgba(98, 231, 255, 0.14), transparent 11rem),
    linear-gradient(145deg, rgba(14, 34, 42, 0.96), rgba(6, 12, 18, 0.95));
}

.leaf-page--wide {
  min-width: min(86vw, 820px);
}

.leaf-page-copy {
  align-self: end;
  max-width: 58ch;
  position: relative;
  z-index: 1;
}

.leaf-page h3 {
  color: var(--bone);
  font-size: clamp(36px, 6vw, 70px);
  letter-spacing: -0.07em;
  line-height: 0.98;
  margin-bottom: 24px;
  max-width: 11ch;
}

.leaf-page p {
  font-size: clamp(15px, 1.6vw, 18px);
}

.leaf-page-index {
  color: rgba(132, 255, 180, 0.08);
  font-family: var(--mono);
  font-size: clamp(110px, 19vw, 220px);
  font-weight: 900;
  line-height: 0.8;
  position: absolute;
  right: clamp(20px, 4vw, 44px);
  bottom: clamp(12px, 3vw, 30px);
}

@media (max-width: 760px) {
  .leafbook-track {
    grid-auto-columns: minmax(82vw, 1fr);
    padding-right: 18px;
  }

  .leaf-page {
    border-radius: 26px;
    min-height: 520px;
  }

  .leaf-page-arrow {
    font-size: 28px;
    height: 58px;
    width: 58px;
  }
}

/* --- Accessibility utility ------------------------------------------- */
.visually-hidden {
  border: 0;
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

/* --- Dashboard project filter --------------------------------------- */
.project-filter {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 22px;
}

.filter-search {
  flex: 1 1 240px;
}

.filter-search input {
  background: rgba(2, 6, 10, 0.85);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--bone);
  font-family: var(--mono);
  font-size: 13px;
  padding: 10px 16px;
  width: 100%;
}

.filter-search input::placeholder {
  color: var(--muted);
}

.filter-search input:focus-visible {
  border-color: var(--line-strong);
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-chip {
  background: rgba(2, 6, 10, 0.7);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 7px 13px;
  text-transform: uppercase;
  transition:
    border-color 140ms ease,
    color 140ms ease,
    background-color 140ms ease;
}

.filter-chip:hover {
  border-color: var(--line-strong);
  color: var(--bone);
}

.filter-chip.is-active {
  background: var(--phosphor);
  border-color: var(--phosphor);
  color: var(--void);
}

.filter-chip:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.filter-empty {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 13px;
  margin: 0;
  width: 100%;
}

.filter-reset {
  background: none;
  border: none;
  color: var(--cyan);
  cursor: pointer;
  font: inherit;
  text-decoration: underline;
}

/* --- Broken project image fallback ---------------------------------- */
.project-media.media-failed::after {
  align-items: center;
  color: var(--muted);
  content: "// image unavailable";
  display: flex;
  font-family: var(--mono);
  font-size: 12px;
  inset: 0;
  justify-content: center;
  letter-spacing: 0.08em;
  position: absolute;
  text-transform: uppercase;
}

/* --- Leafbook carousel navigation ----------------------------------- */
.leafbook-track:focus-visible {
  border-radius: 16px;
  outline: 2px solid var(--cyan);
  outline-offset: 4px;
}

.leafbook-nav {
  align-items: center;
  display: flex;
  gap: 14px;
  justify-content: center;
  margin-top: 16px;
}

.leafbook-step {
  background: rgba(2, 6, 10, 0.7);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--phosphor);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 900;
  height: 40px;
  line-height: 1;
  width: 40px;
}

.leafbook-step:hover:not(:disabled) {
  border-color: var(--line-strong);
}

.leafbook-step:disabled {
  color: var(--muted);
  cursor: not-allowed;
  opacity: 0.4;
}

.leafbook-dots {
  display: flex;
  gap: 10px;
}

.leafbook-dot {
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  cursor: pointer;
  height: 11px;
  padding: 0;
  transition:
    background-color 140ms ease,
    transform 140ms ease;
  width: 11px;
}

.leafbook-dot:hover {
  background: var(--line-strong);
}

.leafbook-dot.is-active {
  background: var(--phosphor);
  border-color: var(--phosphor);
  transform: scale(1.2);
}

.leafbook-step:focus-visible,
.leafbook-dot:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

/* --- Project documents ---------------------------------------------- */
.project-docs {
  margin-top: clamp(28px, 5vw, 70px);
}

.project-docs article {
  padding: 36px 24px 24px;
}

.doc-link-list {
  display: grid;
  gap: 14px;
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
}

.doc-link-list li {
  border-left: 2px solid var(--line-strong);
  padding-left: 14px;
}

.doc-link-list a {
  color: var(--phosphor);
  font-family: var(--mono);
  font-weight: 700;
}

.doc-link-list span {
  color: var(--muted);
  display: block;
  font-size: 13px;
  margin-top: 4px;
}

/* --- Doc page: sibling nav + table of contents ---------------------- */
.doc-siblings {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 0;
}

.doc-sibling {
  background: rgba(2, 6, 10, 0.7);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  padding: 7px 13px;
  text-decoration: none;
}

.doc-sibling:hover {
  border-color: var(--line-strong);
  color: var(--bone);
}

.doc-sibling.is-current {
  background: var(--phosphor);
  border-color: var(--phosphor);
  color: var(--void);
}

.doc-toc {
  background: rgba(2, 6, 10, 0.6);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin: 22px 0 0;
  padding: 18px 22px;
}

.doc-toc ol {
  display: grid;
  gap: 6px;
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}

.doc-toc a {
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 13px;
  text-decoration: none;
}

.doc-toc a:hover {
  text-decoration: underline;
}

.doc-toc-l2 {
  padding-left: 16px;
}

.doc-toc-l3 {
  padding-left: 32px;
}

.doc-toc a:focus-visible,
.doc-sibling:focus-visible,
.doc-link-list a:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

/* --- Accessibility: skip link + focus baseline ---------------------- */
.skip-link {
  background: var(--phosphor);
  border-radius: 0 0 10px 0;
  color: var(--void);
  font-family: var(--mono);
  font-weight: 700;
  left: 0;
  padding: 10px 16px;
  position: fixed;
  text-decoration: none;
  top: 0;
  transform: translateY(-130%);
  transition: transform 140ms ease;
  z-index: 100;
}

.skip-link:focus {
  transform: translateY(0);
}

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

/* Prose links get an affordance beyond colour alone. */
.markdown-poem a,
.story-copy a,
.story-columns a {
  color: var(--cyan);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* --- 404 page ------------------------------------------------------- */
.error-page {
  margin: clamp(20px, 6vw, 80px) auto;
  max-width: 760px;
  padding: clamp(28px, 5vw, 56px);
  text-align: center;
}

.error-ascii {
  color: var(--pink);
  font-family: var(--mono);
  font-size: clamp(11px, 2vw, 16px);
  margin: 20px 0 26px;
  overflow-x: auto;
}

.error-page .hero-actions {
  justify-content: center;
}
