:root {
  color-scheme: dark;
  --void: #05070b;
  --void-2: #0b1118;
  --terminal: #0d1720;
  --terminal-2: #111f2b;
  --phosphor: #84ffb4;
  --amber: #ffd166;
  --cyan: #62e7ff;
  --orange: #ff9f43;
  --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;
  --page-max: 1480px;
  --media-padding: clamp(8px, 1.2vw, 14px);
  /* 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;
  }
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@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;
  overflow-wrap: break-word;
  /* 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;
}

img,
svg,
video,
canvas {
  max-width: 100%;
}

:where(
  h1, h2, h3, h4, p, li, a, button, strong, span, small,
  code, pre, blockquote, td, th, dd, dt
) {
  max-width: 100%;
  overflow-wrap: break-word;
}

:where(
  h1,
  h2,
  h3,
  a,
  code,
  .button,
  .badge,
  .status-dot,
  .tag-row span,
  .tech-chip,
  .doc-sibling,
  .classification-strip strong,
  .architecture-step-text
) {
  overflow-wrap: anywhere;
}

:where(
  main,
  section,
  article,
  div,
  nav,
  header,
  footer,
  .terminal-panel,
  .project-card,
  .card-body,
  .project-hero-copy,
  .story-copy,
  .accordion-body,
  .technology-key-item,
  .tech-bucket
) {
  min-width: 0;
}

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

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

.brand {
  gap: 9px;
  min-width: 0;
  text-decoration: none;
}

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

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

.brand small {
  color: var(--muted);
  font-size: 11px;
  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: 12px;
  font-weight: 900;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.primary-nav {
  gap: 4px;
}

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

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

main {
  margin: 0 auto;
  max-width: var(--page-max);
  padding: clamp(22px, 5vw, 72px);
  width: 100%;
}

.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 {
  align-items: center;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: start;
  max-width: 430px;
  overflow: hidden;
  padding: clamp(18px, 3.2vw, 34px);
}

.dash-hero-art {
  align-items: center;
  display: flex;
  justify-content: flex-start;
  max-width: 384px;
  min-height: clamp(192px, 25.6vw, 336px);
  position: relative;
  width: 100%;
}

.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: 22px;
  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: 336px;
  overflow: hidden;
  padding: clamp(14px, 3.2vw, 27px);
  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: 8px;
  position: relative;
  z-index: 1;
}

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

.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(12px, 1.92vw, 19px);
  font-weight: 900;
  letter-spacing: 0;
  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;
}

.dash-hero-intro .hero-lede {
  color: var(--bone);
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 800;
  line-height: 1.45;
  max-width: 760px;
}

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

.page-heading-label,
.contact-heading-label {
  font-size: clamp(28px, 4vw, 54px);
  letter-spacing: 0.06em;
  line-height: 1;
  margin-bottom: 0;
}

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

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

h1 {
  color: #fff;
  font-family: var(--mono);
  font-size: clamp(46px, 9vw, 112px);
  letter-spacing: 0;
  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;
  margin-bottom: 14px;
}

h3 {
  font-family: var(--mono);
  font-size: 26px;
  letter-spacing: 0;
  line-height: 1.1;
  margin-bottom: 12px;
}

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

.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-align: center;
  text-transform: uppercase;
  white-space: normal;
}

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

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

.button.is-disabled {
  border-color: var(--line);
  color: var(--muted);
  cursor: default;
  opacity: 0.82;
}

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

.button.is-disabled:hover {
  transform: none;
}

.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 .class-tile,
.route-strip a,
.project-card {
  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(16px, 3vw, 28px) 0;
  scroll-margin-top: 82px;
}

.route-strip a,
.classification-strip .class-tile {
  overflow: hidden;
}

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

.classification-strip .class-tile {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: clamp(54px, 8vw, 76px);
  padding: 12px;
  text-align: center;
  text-decoration: none;
  transition: border-color 140ms ease, transform 140ms ease, background 140ms ease;
}

.classification-strip .class-tile:hover,
.classification-strip .class-tile:focus-visible {
  background: rgba(255, 255, 255, 0.065);
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.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(14px, 2vw, 20px);
  line-height: 1.05;
  margin-top: 0;
}

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

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

/* The category tags carry the rainbow now that the rest of the page drops it:
   each tile is tinted in its classification color. */
.classification-strip .class-tile--venture { border-color: rgba(255, 92, 147, 0.55); }
.classification-strip .class-tile--fun-project { border-color: rgba(255, 209, 102, 0.55); }
.classification-strip .class-tile--private { border-color: rgba(132, 255, 180, 0.55); }
.classification-strip .class-tile--professional { border-color: rgba(98, 231, 255, 0.55); }

.classification-strip .class-tile--venture:hover,
.classification-strip .class-tile--venture:focus-visible { border-color: var(--venture); }
.classification-strip .class-tile--fun-project:hover,
.classification-strip .class-tile--fun-project:focus-visible { border-color: var(--fun); }
.classification-strip .class-tile--private:hover,
.classification-strip .class-tile--private:focus-visible { border-color: var(--private); }
.classification-strip .class-tile--professional:hover,
.classification-strip .class-tile--professional:focus-visible { border-color: var(--professional); }

.project-group {
  scroll-margin-top: 82px;
}

.project-group,
.studio-note,
.project-story,
.project-systems,
.signals,
.related-projects,
.contact-grid,
.tech-buckets,
.media-strip {
  margin-top: clamp(24px, 4.2vw, 56px);
}

.studio-note {
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(220px, 0.55fr) minmax(0, 1.45fr);
}

.dash-hero-simple + .studio-note {
  margin-top: clamp(16px, 2.8vw, 32px);
}

.studio-note h2 {
  font-size: clamp(28px, 3vw, 40px);
  text-wrap: balance;
}

.studio-note-copy {
  max-width: 820px;
}

.studio-note-copy .button {
  display: inline-flex;
  margin-top: 8px;
}

.home-projects {
  margin-top: clamp(24px, 4.2vw, 56px);
}

.home-projects-title {
  align-items: baseline;
  color: inherit;
  display: inline-flex;
  gap: 10px;
  text-decoration: none;
}

.home-projects-title h2 {
  margin: 0;
}

.home-projects-arrow {
  color: var(--phosphor);
  font-family: var(--mono);
  transition: transform 140ms ease;
}

.home-projects-title:hover .home-projects-arrow,
.home-projects-title:focus-visible .home-projects-arrow {
  transform: translateX(4px);
}

.thumb-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.thumb-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 14px;
  color: inherit;
  display: grid;
  grid-template-rows: auto auto;
  overflow: hidden;
  position: relative;
  text-decoration: none;
  transition: border-color 140ms ease, transform 140ms ease;
}

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

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

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

.thumb-media {
  /* Square tiles suit the project icon/hero art (penguin, medallion, emblem),
     which are mostly square — a 16:9 box left them small with wide side bars. */
  aspect-ratio: 1 / 1;
  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: var(--media-padding);
  place-items: center;
  position: relative;
}

.thumb-media img {
  border-radius: 10px;
  filter: saturate(1.08) contrast(1.12);
  height: 100%;
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  object-position: center;
  width: 100%;
}

.thumb-fallback {
  align-items: center;
  display: flex;
  inset: 0;
  justify-content: center;
  position: absolute;
}

.thumb-fallback-prompt {
  color: var(--phosphor);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.thumb-name {
  color: #fff;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.2;
  padding: 12px 14px;
}

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

.section-summary {
  margin: 0;
  max-width: 720px;
}

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

.group-professional .project-grid {
  margin-inline: auto;
  width: 90%;
}

.project-card {
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 100%;
  min-width: 0;
  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;
  aspect-ratio: 16 / 9;
  display: grid;
  min-height: 0;
  overflow: hidden;
  padding: var(--media-padding);
  place-items: center;
  position: relative;
  text-decoration: none;
}

.project-card--professional .project-media {
  aspect-ratio: 1;
  padding: clamp(12px, 2vw, 18px);
}

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

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

.project-card:hover .project-media img {
  filter: saturate(1.14) contrast(1.16);
}

.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;
  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(auto-fit, minmax(88px, 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: clip;
  white-space: normal;
}

.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 {
  min-width: 0;
  padding: 22px;
}

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

.card-meta {
  align-items: flex-start;
  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;
}

.badge,
.status-dot,
.tag-row span,
.tech-chip {
  max-width: 100%;
  min-width: 0;
  white-space: normal;
}

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

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

.card-body h3 {
  overflow-wrap: anywhere;
}

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

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

.byline span {
  color: var(--phosphor);
  text-transform: uppercase;
}

.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-hero-copy > .back-link {
  margin-bottom: 14px;
}

.project-footer-nav {
  display: flex;
  margin-top: clamp(28px, 4vw, 48px);
}

.back-link--footer {
  font-size: 14px;
  margin-bottom: 0;
}

.project-social-row {
  align-items: center;
  border-top: 1px solid rgba(255, 209, 102, 0.26);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  margin-top: 18px;
  padding-top: 16px;
}

.project-social-kicker {
  color: var(--amber);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

.project-social-link {
  background: rgba(255, 209, 102, 0.1);
  border: 1px solid rgba(255, 209, 102, 0.42);
  border-radius: 999px;
  color: var(--bone);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1;
  min-height: 34px;
  overflow-wrap: anywhere;
  padding: 11px 12px;
  text-decoration: none;
  text-transform: uppercase;
}

.project-social-link:hover,
.project-social-link:focus-visible {
  background: rgba(255, 209, 102, 0.18);
  border-color: rgba(255, 209, 102, 0.68);
  color: #fff;
}

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

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

.detail-card,
.project-systems article,
.story-copy,
.signals,
.studio-note,
.contact-grid article,
.tech-bucket {
  padding: 36px 24px 24px;
}

/* Long email/handle links overflow the narrow contact cards at the base h2
   size, breaking mid-word ("strange@treasureamongus.com"). Scale them to fit. */
.contact-grid article h2 {
  font-size: clamp(18px, 2.4vw, 28px);
}

.contact-grid--compact {
  gap: 16px;
  margin-top: clamp(20px, 3.5vw, 48px);
  max-width: 988px;
}

.contact-grid--compact article {
  padding: 34px 23px 23px;
}

.contact-grid--compact article h2 {
  font-size: clamp(17px, 2.25vw, 26px);
}

.contact-grid--compact article p {
  font-size: 15px;
}

/* Contact page: center every section's content (hero, actions, cards). */
.contact-hero,
.contact-grid--compact article {
  text-align: center;
}

.contact-hero .hero-actions {
  justify-content: center;
}

.contact-grid--compact {
  justify-items: center;
}

.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;
  max-width: 1040px;
}

.contact-hero {
  max-width: 988px;
  padding: clamp(30px, 4.75vw, 61px);
}

.contact-hero .page-heading-label {
  font-size: clamp(27px, 3.8vw, 51px);
}

.contact-hero .hero-actions {
  gap: 10px;
  margin-top: 22px;
}

.contact-hero .button {
  font-size: 11.5px;
  padding: 11px 17px;
}

.legal-heading h1 {
  font-size: clamp(36px, 7vw, 72px);
  margin-bottom: 14px;
}

.legal-heading p {
  max-width: 70ch;
}

.legal-body {
  margin: 22px auto 0;
  max-width: 1040px;
  padding: clamp(28px, 4vw, 56px);
}

.legal-body > :first-child {
  margin-top: 0;
}

.legal-body h2 {
  color: var(--phosphor);
  font-size: clamp(20px, 2.4vw, 28px);
  letter-spacing: 0.02em;
  line-height: 1.2;
  margin-top: 36px;
  margin-bottom: 12px;
  text-shadow: 0 0 18px rgba(132, 255, 180, 0.18);
  text-transform: uppercase;
}

.legal-body h3 {
  color: var(--bone);
  font-size: 18px;
  margin-bottom: 10px;
  margin-top: 28px;
}

.legal-body p {
  margin-bottom: 14px;
  max-width: 78ch;
}

.legal-body ul {
  color: #c6d1d3;
  font-size: 16px;
  line-height: 1.7;
  margin: 0 0 18px;
  max-width: 78ch;
  padding-left: 22px;
}

.legal-body li {
  margin-bottom: 8px;
}

.legal-body li::marker {
  color: var(--phosphor);
}

.legal-body a {
  color: var(--cyan);
  text-decoration: underline;
  text-decoration-color: rgba(98, 231, 255, 0.4);
  text-underline-offset: 3px;
}

.legal-body a:hover {
  color: var(--phosphor);
  text-decoration-color: var(--phosphor);
}

.legal-body strong {
  color: var(--bone);
}

.technology-key {
  align-items: center;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(150px, 0.28fr) minmax(0, 1fr);
  padding: 16px;
}

.technology-key .eyebrow {
  margin: 0;
}

.technology-key-list {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}

.technology-key-item {
  align-items: flex-start;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(132, 255, 180, 0.14);
  border-radius: 8px;
  display: flex;
  gap: 9px;
  min-width: 0;
  padding: 10px;
}

.technology-key-item[data-level="expertise"],
.tech-chip[data-level="expertise"] {
  --level-color: var(--phosphor);
}

.technology-key-item[data-level="intermediate"],
.tech-chip[data-level="intermediate"] {
  --level-color: var(--cyan);
}

.technology-key-item[data-level="ai-enabled"],
.tech-chip[data-level="ai-enabled"] {
  --level-color: var(--orange);
}

.technology-key-swatch {
  background: var(--level-color);
  border-radius: 999px;
  box-shadow: 0 0 16px color-mix(in srgb, var(--level-color), transparent 48%);
  display: block;
  flex: 0 0 auto;
  height: 11px;
  margin-top: 3px;
  width: 11px;
}

.technology-key-item strong {
  color: var(--bone);
  display: block;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
  text-transform: uppercase;
}

.technology-key-item small {
  color: #dbe7e6;
  display: block;
  font-size: 12px;
  line-height: 1.35;
  margin-top: 3px;
}

.tech-buckets {
  display: grid;
  gap: clamp(12px, 1.6vw, 18px);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.technology-key + .tech-buckets {
  margin-top: clamp(18px, 3vw, 42px);
}

.tech-bucket {
  padding: 32px 22px 22px;
}

.tech-bucket h2 {
  color: var(--bone);
  font-size: clamp(22px, 2.4vw, 32px);
  line-height: 1.05;
  margin: 0 0 14px;
}

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

.tech-chip {
  --level-color: var(--phosphor);
  align-items: center;
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--level-color) 18%, transparent),
      color-mix(in srgb, var(--level-color) 8%, transparent)
    ),
    rgba(13, 23, 32, 0.9);
  border: 1px solid color-mix(in srgb, var(--level-color) 62%, transparent);
  border-left: 4px solid var(--level-color);
  border-radius: 999px;
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, var(--level-color) 18%, transparent),
    0 0 18px color-mix(in srgb, var(--level-color) 12%, transparent);
  color: color-mix(in srgb, var(--level-color) 78%, var(--bone));
  display: inline-flex;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 900;
  gap: 7px;
  letter-spacing: 0.05em;
  padding: 7px 10px;
  text-shadow: 0 0 12px color-mix(in srgb, var(--level-color) 16%, transparent);
  text-transform: uppercase;
}

.tech-chip .technology-key-swatch {
  height: 8px;
  margin-top: 0;
  width: 8px;
}

.technology-hero {
  display: flex;
  justify-content: center;
  overflow: hidden;
  padding: clamp(10px, 1.6vw, 16px);
  position: relative;
}

.technology-hero-image {
  display: block;
  height: auto;
  max-height: clamp(130px, 20vw, 190px);
  object-fit: contain;
  width: 100%;
}

.technology-hero + .github-profile-panel,
.github-profile-panel + .technology-key {
  margin-top: clamp(18px, 3vw, 42px);
}

.github-profile-panel {
  display: grid;
  gap: 22px;
  margin-top: 0;
  padding: clamp(24px, 4vw, 36px);
}

.github-profile-heading {
  align-items: flex-start;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 860px;
}

/* Each top-level div is a tag group; scope to direct children so nested
   markup (e.g. the .stack-badge-fallback chips site.js injects) is untouched. */
.github-stack-table > div {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(132, 255, 180, 0.16);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 16px 18px;
}

.github-stack-table > div > strong {
  color: var(--phosphor);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.github-stack-table {
  display: grid;
  gap: clamp(14px, 2.2vw, 18px);
}

.github-stack-table > div > span {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.github-stack-table img {
  display: block;
  height: 22px;
  max-width: 100%;
  width: auto;
}

/* Fallback chip swapped in by site.js when a shields.io badge fails to load. */
.stack-badge-fallback {
  align-items: center;
  background: rgba(132, 255, 180, 0.08);
  border: 1px solid rgba(132, 255, 180, 0.24);
  border-radius: 6px;
  color: #dbe7e6;
  display: inline-flex;
  font-family: var(--mono);
  font-size: 12px;
  padding: 4px 8px;
}

.footer {
  align-items: start;
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: grid;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 800;
  gap: 18px;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  padding: 28px clamp(18px, 4vw, 60px);
  text-transform: uppercase;
}

.footer-brand {
  display: grid;
  gap: 6px;
}

.footer-brand strong {
  color: var(--phosphor);
}

.footer-links,
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.footer-links a,
.footer-legal a {
  color: inherit;
  text-decoration: none;
}

.footer-links a:hover,
.footer-legal a:hover {
  color: var(--phosphor);
}

.footer-legal a + a::before {
  content: " // ";
  color: var(--muted);
}

.about-hero {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: clamp(20px, 3vw, 36px);
}

.about-hero-portrait {
  border: 1px solid var(--line);
  border-radius: 16px;
  flex: 0 0 auto;
  height: auto;
  max-height: 280px;
  object-fit: cover;
  width: clamp(140px, 26vw, 220px);
}

.about-hero-text {
  flex: 1 1 320px;
  min-width: 0;
}

/* Generic page hero band for placeholder imagery (contact, etc.). */
.page-hero-media {
  display: flex;
  justify-content: center;
  margin-bottom: clamp(14px, 2.5vw, 22px);
  overflow: hidden;
  padding: clamp(10px, 1.6vw, 16px);
}

.page-hero-media img {
  border-radius: 14px;
  display: block;
  max-height: clamp(130px, 20vw, 190px);
  max-width: 100%;
  object-fit: contain;
  width: 100%;
}

.about-hero-quote {
  border-left: 3px solid var(--phosphor);
  color: var(--bone);
  font-family: var(--mono);
  font-size: clamp(18px, 2vw, 26px);
  font-weight: 900;
  line-height: 1.25;
  margin: 24px 0 22px;
  padding: 4px 0 4px 18px;
}

.about-nav {
  align-items: center;
  background: rgba(7, 14, 20, 0.72);
  border: 1px solid var(--line);
  border-radius: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: clamp(18px, 3vw, 36px);
  padding: 12px;
}

.about-nav a {
  background: rgba(132, 255, 180, 0.06);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  padding: 8px 14px;
  text-decoration: none;
  text-transform: uppercase;
  transition: border-color 140ms ease, color 140ms ease, background 140ms ease;
}

.about-nav a {
  --nav-color: var(--phosphor);
}

.about-nav a:nth-child(1) { --nav-color: var(--venture); }
.about-nav a:nth-child(2) { --nav-color: var(--professional); }
.about-nav a:nth-child(3) { --nav-color: var(--amber); }

.about-nav a::before {
  background: var(--nav-color);
  border-radius: 999px;
  content: "";
  display: inline-block;
  height: 8px;
  margin-right: 8px;
  vertical-align: middle;
  width: 8px;
}

.about-nav a:hover,
.about-nav a:focus-visible {
  background: color-mix(in srgb, var(--nav-color) 14%, transparent);
  border-color: var(--nav-color);
  color: var(--nav-color);
}

.about-accordion {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.about-accordion-card {
  --card-color: var(--phosphor);
  border-left: 3px solid var(--card-color);
  overflow: hidden;
  padding: 0;
  scroll-margin-top: 82px;
}

.about-accordion-card:nth-child(1) { --card-color: var(--venture); }
.about-accordion-card:nth-child(2) { --card-color: var(--professional); }
.about-accordion-card:nth-child(3) { --card-color: var(--private); }

#music {
  --card-color: var(--amber);
  --music-secondary-accent: var(--professional);
  --music-warm-line: rgba(255, 209, 102, 0.24);
  --music-cool-line: rgba(98, 231, 255, 0.18);
  border-color: var(--music-cool-line);
  border-left-color: var(--card-color);
}

.about-accordion-card .accordion-title {
  color: var(--card-color);
}

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

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

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

.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::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: var(--card-color);
  color: var(--card-color);
  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;
}

#music .accordion-body {
  border-top-color: var(--music-warm-line);
}

#music summary::after {
  border-color: var(--music-warm-line);
  color: var(--card-color);
}

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

.accordion-subheading {
  color: var(--card-color);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  margin: 28px 0 0;
  opacity: 0.85;
  text-transform: uppercase;
}

.manifesto-cards {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin-top: 26px;
}

.manifesto-card {
  --manifesto-card-color: var(--card-color);
  align-content: start;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--manifesto-card-color) 9%, transparent), transparent 48%),
    rgba(5, 7, 11, 0.38);
  border: 1px solid color-mix(in srgb, var(--manifesto-card-color) 24%, var(--line));
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 16px;
}

.manifesto-card:nth-child(1) { --manifesto-card-color: var(--fun); }
.manifesto-card:nth-child(2) { --manifesto-card-color: var(--phosphor); }
.manifesto-card:nth-child(3) { --manifesto-card-color: var(--amber); }

.manifesto-card h4 {
  color: var(--manifesto-card-color);
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 900;
  line-height: 1.2;
  margin: 0;
  text-transform: uppercase;
}

.manifesto-card-list {
  align-content: start;
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.manifesto-card-list li {
  color: var(--bone);
  line-height: 1.58;
  padding-left: 15px;
  position: relative;
}

.manifesto-card-list li::before {
  background: var(--manifesto-card-color);
  border-radius: 999px;
  content: "";
  height: 5px;
  left: 0;
  position: absolute;
  top: 0.72em;
  width: 5px;
}

.manifesto-card .build-tags {
  margin-top: 2px;
}

.music-projects {
  display: grid;
  gap: 14px;
  list-style: none;
  margin: 26px 0 0;
  padding: 0;
  /* "Music" nav link targets #albums here; clear the sticky header on jump. */
  scroll-margin-top: 82px;
}

.music-education {
  background:
    linear-gradient(135deg, rgba(255, 209, 102, 0.08), rgba(98, 231, 255, 0.04)),
    rgba(5, 7, 11, 0.38);
  border: 1px solid var(--music-warm-line);
  border-radius: 8px;
  display: grid;
  gap: 16px;
  margin: 26px 0 28px;
  padding: 18px;
}

.music-education-header {
  align-items: end;
  border-bottom: 1px solid rgba(255, 209, 102, 0.18);
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 0.9fr) minmax(220px, 0.7fr);
  padding-bottom: 14px;
}

.music-education-label {
  color: var(--card-color);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 900;
  margin: 0;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.music-education h3 {
  color: var(--bone);
  font-family: var(--mono);
  font-size: 20px;
  line-height: 1.2;
  margin: 5px 0 0;
}

.music-education-header p:last-child {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
  margin: 0;
}

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

.music-credential-card {
  background: rgba(5, 7, 11, 0.52);
  border: 1px solid rgba(246, 234, 210, 0.14);
  border-radius: 8px;
  display: grid;
  gap: 6px;
  min-height: 134px;
  padding: 14px;
}

.music-credential-kind {
  color: var(--amber);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.music-credential-card strong {
  color: var(--bone);
  display: block;
  font-family: var(--mono);
  font-size: 18px;
  line-height: 1.25;
}

.music-credential-school {
  color: var(--music-secondary-accent);
  font-weight: 800;
}

.music-credential-location {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
}

.music-project {
  background:
    linear-gradient(135deg, rgba(255, 209, 102, 0.04), rgba(98, 231, 255, 0.025) 54%, transparent),
    rgba(5, 7, 11, 0.34);
  align-items: start;
  border: 1px solid var(--music-cool-line);
  border-radius: 8px;
  display: grid;
  gap: 16px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  padding: 16px;
}

.music-project-cover {
  align-self: start;
  border: 1px solid var(--music-warm-line);
  display: block;
  overflow: hidden;
  width: clamp(118px, 13vw, 156px);
}

.music-project-cover:hover,
.music-project-cover:focus-visible {
  border-color: var(--card-color);
}

.music-project-cover img {
  aspect-ratio: 1;
  display: block;
  object-fit: cover;
  width: 100%;
}

.music-project-heading {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.music-project-heading a {
  color: var(--card-color);
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 900;
  text-decoration: none;
}

.music-project-heading a:hover,
.music-project-heading a:focus-visible {
  color: var(--music-secondary-accent);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.music-project-heading span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.music-project-notes {
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
}

.music-project-notes li {
  color: var(--bone);
  line-height: 1.58;
  margin: 0;
  padding-left: 15px;
  position: relative;
}

.music-project-notes li::before {
  background: var(--card-color);
  border-radius: 999px;
  content: "";
  height: 5px;
  left: 0;
  position: absolute;
  top: 0.72em;
  width: 5px;
}

.music-note-label {
  color: var(--amber);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 900;
  margin-right: 5px;
  text-transform: uppercase;
}

.music-source {
  color: var(--muted);
  font-size: 0.92em;
}

.music-source a {
  border-bottom: 1px dotted rgba(142, 160, 168, 0.55);
  color: inherit;
  font-weight: 600;
  text-decoration: none;
}

.music-source a:hover,
.music-source a:focus-visible {
  border-bottom-color: currentColor;
  color: var(--music-secondary-accent);
}

.music-project-button {
  align-items: center;
  align-self: end;
  border: 1px solid var(--music-cool-line);
  color: var(--bone);
  display: inline-flex;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 900;
  justify-self: end;
  padding: 9px 12px;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
}

.music-project-button:hover,
.music-project-button:focus-visible {
  background: rgba(255, 209, 102, 0.08);
  border-color: var(--card-color);
  color: var(--music-secondary-accent);
}

.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,
  .technology-key,
  .story-section,
  .studio-note,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .technology-key-list {
    grid-template-columns: 1fr;
  }

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

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

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

  .section-heading {
    flex-direction: row;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

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

  .footer-links,
  .footer-legal {
    justify-content: flex-start;
  }

  .primary-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    width: 100%;
  }

  .primary-nav a {
    flex: 0 0 auto;
    font-size: 12px;
    padding: 8px 12px;
    text-align: center;
  }

  main {
    padding: 18px;
  }

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

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

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

  /* Keep the category tags as a compact 2x2 grid on phones rather than a
     tall single column. */
  .classification-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-card {
    grid-template-rows: auto 1fr;
  }

  .music-education-header,
  .music-education-grid,
  .music-project {
    grid-template-columns: 1fr;
  }

  .music-project-button {
    justify-self: start;
  }

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

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

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

@media (max-width: 480px) {
  main {
    padding: 14px;
  }

  .music-education,
  .music-project {
    padding: 14px;
  }

  h1 {
    font-size: clamp(34px, 12vw, 56px);
  }
}

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

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

.project-hero-banner {
  background:
    radial-gradient(circle at 18% 12%, rgba(132, 255, 180, 0.14), transparent 14rem),
    radial-gradient(circle at 82% 80%, rgba(98, 231, 255, 0.12), transparent 18rem),
    rgba(5, 12, 18, 0.9);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: center;
  max-height: clamp(220px, 42vh, 460px);
  overflow: hidden;
  width: 100%;
}

.project-hero-banner img {
  display: block;
  height: 100%;
  max-height: clamp(220px, 42vh, 460px);
  max-width: 100%;
  object-fit: contain;
  object-position: center;
  width: 100%;
}

.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;
  height: 100%;
  min-height: 0;
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  object-position: center;
  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;
  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;
  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-wrap: anywhere;
  overflow-x: auto;
  padding: 18px;
  white-space: pre-wrap;
}

@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 {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 12px;
  scrollbar-color: var(--line-strong) rgba(7, 16, 23, 0.78);
  scrollbar-width: thin;
  scroll-padding-left: 2px;
  scroll-snap-type: x proximity;
}

.media-grid--thumbs::-webkit-scrollbar {
  height: 8px;
}

.media-grid--thumbs::-webkit-scrollbar-track {
  background: rgba(7, 16, 23, 0.78);
  border-radius: 999px;
}

.media-grid--thumbs::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 999px;
}

.media-thumb {
  background: rgba(7, 16, 23, 0.72);
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--phosphor);
  cursor: zoom-in;
  display: block;
  flex: 0 0 clamp(250px, 31vw, 430px);
  padding: clamp(8px, 1vw, 12px);
  scroll-snap-align: start;
  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;
  display: block;
  max-height: min(22vh, 190px);
  object-fit: contain;
  padding: 0;
}

.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 {
  overflow: hidden;
  min-width: 0;
  padding: 36px 24px 24px;
}

.architecture-panel strong {
  color: var(--bone);
  display: block;
  font-family: var(--mono);
  font-size: 26px;
  letter-spacing: 0;
  line-height: 1.2;
  margin-bottom: 18px;
  margin-top: 6px;
}

.architecture-flow {
  display: grid;
  gap: 12px;
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
}

.architecture-flow li {
  align-items: center;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(132, 255, 180, 0.2);
  border-radius: 12px;
  display: grid;
  gap: 12px;
  grid-template-columns: auto minmax(0, 1fr);
  min-height: 64px;
  padding: 14px;
  position: relative;
}

.architecture-flow li:not(:last-child)::after {
  background: linear-gradient(to bottom, var(--line-strong), transparent);
  bottom: -13px;
  content: "";
  height: 12px;
  left: 28px;
  position: absolute;
  width: 2px;
}

.architecture-step-index {
  align-items: center;
  background: rgba(132, 255, 180, 0.1);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--phosphor);
  display: inline-flex;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 900;
  height: 30px;
  justify-content: center;
  width: 42px;
}

.architecture-step-text {
  color: #dbe7e6;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.45;
}

@media (max-width: 1050px) {
  .media-thumb {
    flex-basis: min(48vw, 360px);
  }
}

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

  .media-thumb {
    flex-basis: min(82vw, 340px);
  }

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

.project-collection-head {
  margin-top: clamp(28px, 5vw, 70px);
  margin-inline: auto;
  max-width: min(1120px, 100%);
  padding-inline: clamp(12px, 2vw, 20px);
}

.project-collection-title {
  font-size: clamp(1.1rem, 2.4vw, 1.5rem);
  margin: 4px 0 0;
}

.project-carousel {
  align-items: center;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr);
  margin-top: clamp(28px, 5vw, 70px);
  margin-inline: auto;
  max-width: min(1120px, 100%);
  padding: clamp(12px, 2vw, 20px);
  position: relative;
}

.project-collection-head + .project-carousel {
  margin-top: 14px;
}

.project-carousel-frame {
  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;
  cursor: zoom-in;
  display: grid;
  justify-self: center;
  min-width: 0;
  padding: var(--media-padding);
  place-items: center;
  transition: border-color 160ms ease;
  width: 100%;
}

.project-carousel-frame.media-landscape {
  aspect-ratio: 16 / 9;
  max-height: min(62vh, 560px);
  width: 100%;
}

.project-carousel-frame.media-square {
  aspect-ratio: 1;
  max-height: min(62vh, 560px);
  width: min(100%, 720px);
}

.project-carousel-frame.media-portrait {
  aspect-ratio: 9 / 16;
  max-height: min(76vh, 720px);
  width: min(100%, 430px);
}

.project-carousel-frame:hover,
.project-carousel-frame:focus-visible {
  border-color: var(--line-strong);
}

.project-carousel-frame img {
  display: block;
  height: 100%;
  max-height: 100%;
  max-width: 100%;
  min-height: 0;
  min-width: 0;
  object-fit: contain;
  object-position: center;
  width: 100%;
}

.project-carousel-nav {
  align-items: center;
  background: rgba(3, 8, 12, 0.76);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--phosphor);
  cursor: pointer;
  display: inline-flex;
  font-family: var(--mono);
  font-size: 30px;
  font-weight: 900;
  height: 44px;
  justify-content: center;
  line-height: 1;
  position: absolute;
  top: calc(50% - 14px);
  transform: translateY(-50%);
  width: 44px;
  z-index: 2;
}

.project-carousel-nav:hover,
.project-carousel-nav:focus-visible {
  border-color: var(--line-strong);
}

/* Single-image projects hide the nav arrows and the lone dot via the
   `hidden` attribute; these display rules would otherwise override it. */
.project-carousel-nav[hidden],
.project-carousel-dots[hidden] {
  display: none;
}

.project-carousel-prev {
  left: clamp(18px, 2.4vw, 30px);
}

.project-carousel-next {
  right: clamp(18px, 2.4vw, 30px);
}

.project-carousel-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  grid-column: 1;
  justify-content: center;
}

.project-carousel-dot {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(132, 255, 180, 0.26);
  border-radius: 999px;
  cursor: pointer;
  height: 11px;
  padding: 0;
  width: 11px;
}

.project-carousel-dot.is-active {
  background: var(--phosphor);
  border-color: var(--phosphor);
  box-shadow: 0 0 14px rgba(132, 255, 180, 0.5);
}

@media (max-width: 760px) {
  .project-carousel {
    gap: 10px;
    padding: 10px;
  }

  .project-carousel-frame.media-square {
    width: min(100%, 520px);
  }

  .project-carousel-frame.media-portrait {
    width: min(100%, 360px);
  }

  .project-carousel-nav {
    font-size: 24px;
    height: 38px;
    width: 38px;
  }
}

/* --- 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;
}

/* --- 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;
}

/* --- 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;
}

/* --- Responsive consistency ----------------------------------------- */
.hero-actions .button,
.project-links a,
.doc-sibling,
.tech-chip,
.build-tags span,
.about-nav a {
  min-width: 0;
}

@media (max-width: 760px) {
  h1 {
    font-size: 2.6rem;
    line-height: 1.08;
  }

  h2 {
    font-size: 2rem;
    line-height: 1.12;
  }

  h3,
  .architecture-panel strong {
    font-size: 1.45rem;
    line-height: 1.18;
  }

  .hero-copy,
  .project-hero-copy,
  .page-heading,
  .detail-card,
  .project-systems article,
  .story-copy,
  .signals,
  .studio-note,
  .contact-grid article,
  .tech-bucket,
  .project-docs article,
  .architecture-panel {
    padding: 24px 18px;
  }

  .hero-actions,
  .project-links {
    display: grid;
    grid-template-columns: 1fr;
  }

  .hero-actions .button,
  .project-links a {
    justify-content: center;
    width: 100%;
  }

  .about-nav,
  .build-tags,
  .tech-buckets,
  .tech-bucket-list {
    display: grid;
    grid-template-columns: 1fr;
  }

  .card-meta {
    display: grid;
    grid-template-columns: 1fr;
  }

  .title-card-window {
    gap: 8px;
    padding: 16px;
  }

  .title-card-media strong {
    font-size: 1.9rem;
    line-height: 1;
    max-width: 100%;
  }

  .title-card-stats {
    grid-template-columns: 1fr;
  }

  .title-card-ascii {
    font-size: 0.78rem;
    overflow: hidden;
  }
}

/* ===========================================================================
   Admin console (private /admin surface)
   Reuses the public terminal palette but stays visually distinct from the
   public site. Login + locked dashboard shell only (Phase 1).
   ======================================================================== */
.nav-lock {
  opacity: 0.55;
  font-size: 0.95em;
  transition: opacity 0.18s ease;
}
.nav-lock:hover,
.nav-lock:focus-visible {
  opacity: 1;
}

.admin-topbar {
  border-bottom: 1px solid var(--line-strong);
}
.admin-main {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: clamp(20px, 4vw, 48px);
  width: 100%;
}
.admin-nav {
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
}
.admin-logout-form {
  margin: 0;
  display: inline;
}
.admin-logout {
  font: inherit;
  color: var(--pink);
  background: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.25rem 0.85rem;
  cursor: pointer;
}
.admin-logout:hover {
  border-color: var(--pink);
}

/* --- Login --- */
.admin-login {
  min-height: 60vh;
  display: grid;
  place-items: center;
  gap: 18px;
}
.admin-login-hero {
  width: min(420px, 100%);
}
.admin-login-card {
  width: min(420px, 100%);
  background: var(--terminal);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(24px, 4vw, 40px);
}
.admin-login-card h1 {
  margin: 0 0 1.25rem;
  font-family: var(--mono);
}
.admin-form {
  display: grid;
  gap: 0.4rem;
}
.admin-form label {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.6rem;
}
.admin-form input {
  font: inherit;
  padding: 0.6rem 0.75rem;
  background: var(--void-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--bone);
}
.admin-form input:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 1px;
}
.admin-form button {
  margin-top: 1.25rem;
  font: inherit;
  font-weight: 600;
  padding: 0.65rem 1rem;
  background: var(--phosphor);
  color: var(--void);
  border: none;
  border-radius: 10px;
  cursor: pointer;
}
.admin-form button:hover {
  background: var(--cyan);
}
.admin-error {
  background: rgba(255, 92, 147, 0.12);
  border: 1px solid var(--pink);
  border-radius: 10px;
  padding: 0.6rem 0.8rem;
  color: var(--bone);
  margin: 0 0 1rem;
}

/* --- Dashboard --- */
.admin-overview-head h1 {
  font-family: var(--mono);
  margin-bottom: 0.25rem;
}
.admin-overview-head p {
  color: var(--muted);
  margin-top: 0;
}
.admin-panel {
  margin-top: 1.5rem;
  background: var(--terminal);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(18px, 3vw, 30px);
}
.admin-note {
  color: var(--muted);
  max-width: 60ch;
}
.admin-project-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: grid;
  gap: 0.5rem;
}
.admin-project-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--void-2);
}
.admin-project-name {
  font-weight: 600;
}
.admin-project-class {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--amber);
}
.admin-project-link {
  margin-left: auto;
  font-size: 0.85rem;
  color: var(--cyan);
}

/* --- Project tracking (Phase 2) --- */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  font-size: 0.92rem;
}
.admin-table th,
.admin-table td {
  text-align: left;
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.admin-table th {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.admin-tag {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--void);
  background: var(--amber);
  border-radius: 999px;
  padding: 0.1rem 0.5rem;
  margin-left: 0.4rem;
}
.admin-track,
.admin-form select,
.admin-form textarea {
  font: inherit;
}
.admin-track {
  color: var(--void);
  background: var(--phosphor);
  border: none;
  border-radius: 999px;
  padding: 0.25rem 0.85rem;
  cursor: pointer;
}
.admin-track:hover {
  background: var(--cyan);
}
.admin-inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.75rem;
}
.admin-inline-form input {
  flex: 1 1 12rem;
}
.admin-inline-form button {
  margin-top: 0;
}
.admin-grid-form {
  max-width: 640px;
}
.admin-form select,
.admin-form textarea {
  padding: 0.6rem 0.75rem;
  background: var(--void-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--bone);
}
.admin-form textarea {
  resize: vertical;
}
.admin-check {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.9rem;
  color: var(--bone);
}
.admin-check input {
  width: auto;
}
.admin-meta {
  display: grid;
  grid-template-columns: minmax(8rem, max-content) 1fr;
  gap: 0.4rem 1rem;
  margin: 0.5rem 0 0;
}
.admin-meta dt {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--muted);
}
.admin-meta dd {
  margin: 0;
}
.admin-danger {
  border-color: var(--pink);
}
