/* ==========================================================================
   BLAHA LABS — After Hours at the Bench
   Night-first workshop: phosphor scopes, copper traces, hot-iron accents.
   Day mode is the same shop with the overhead lights on.
   ========================================================================== */

:root {
  color-scheme: dark;

  --base: #07080a;
  --paper: #12151c;
  --ink: #f3ead8;
  --muted: rgba(243, 234, 216, 0.68);
  --muted2: rgba(243, 234, 216, 0.4);

  --solder: #ff6a2a;
  --phosphor: #f0b429;
  --laser: #3dffc5;
  --copper: #c47a3a;
  --hot: #ff3b1a;

  --orange: var(--solder);
  --mustard: var(--phosphor);
  --teal: var(--laser);
  --brown: var(--copper);
  --accent: var(--solder);

  --border: rgba(243, 234, 216, 0.16);
  --border-w: 1px;
  --shadow-hard: 0 18px 50px rgba(0, 0, 0, 0.45);
  --shadow-hard-sm: 0 10px 28px rgba(0, 0, 0, 0.35);
  --shadow-hard-lg: 0 28px 70px rgba(0, 0, 0, 0.55);
  --grid-line: rgba(61, 255, 197, 0.06);

  --r-lg: 18px;
  --r-md: 12px;
  --r-sm: 8px;
  --pad: clamp(20px, 5vw, 56px);
  --max: 1180px;

  --font-display: "Bricolage Grotesque", "Space Grotesk", sans-serif;
  --font-body: "Space Grotesk", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "IBM Plex Mono", "Space Mono", ui-monospace, monospace;

  --snap: cubic-bezier(0.2, 0.9, 0.3, 1.4);
  --smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] {
  color-scheme: light;

  --base: #ebe2c8;
  --paper: #f7f0dc;
  --ink: #1c120c;
  --muted: rgba(28, 18, 12, 0.66);
  --muted2: rgba(28, 18, 12, 0.4);

  --solder: #e0601a;
  --phosphor: #d9a52d;
  --laser: #2e6b64;
  --copper: #8a5a2b;
  --hot: #c43c12;

  --border: #1c120c;
  --border-w: 3px;
  --shadow-hard: 6px 6px 0 var(--ink);
  --shadow-hard-sm: 3px 3px 0 var(--ink);
  --shadow-hard-lg: 10px 10px 0 var(--ink);
  --grid-line: rgba(28, 18, 12, 0.08);
}

[data-theme="dark"] { color-scheme: dark; }

* { box-sizing: border-box; -webkit-font-smoothing: antialiased; }

html { scroll-behavior: smooth; }
html, body { min-height: 100vh; margin: 0; color: var(--ink); background: var(--base); }

body {
  font-family: var(--font-body);
  line-height: 1.55;
  overflow-x: hidden;
  position: relative;
  transition: background-color 0.4s var(--smooth), color 0.4s var(--smooth);
}

a { color: inherit; text-decoration: none; }

::selection { background: var(--phosphor); color: #1c120c; }

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

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--base); }
::-webkit-scrollbar-thumb {
  background: var(--solder);
  border: 2px solid var(--base);
  border-radius: 8px;
}

html.is-booting { overflow: hidden; }

.skip-link {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 5000;
  padding: 10px 16px;
  background: var(--phosphor);
  color: #1c120c;
  font-family: var(--font-mono);
  font-weight: 700;
  border-radius: 8px;
}
.skip-link:focus { top: 12px; }

/* ==========================================================================
   Atmosphere
   ========================================================================== */
.atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.75;
}

.lamp {
  position: fixed;
  width: 48vmax;
  height: 48vmax;
  left: 0;
  top: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(circle, rgba(255, 120, 40, 0.16), transparent 62%);
  mix-blend-mode: screen;
  opacity: 0.9;
  will-change: transform;
}

[data-theme="light"] .lamp {
  mix-blend-mode: multiply;
  opacity: 0.28;
  background: radial-gradient(circle, rgba(224, 96, 26, 0.22), transparent 62%);
}

.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--base);
  overflow: hidden;
}

.bg__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse 120% 90% at 50% 0%, black 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 120% 90% at 50% 0%, black 30%, transparent 100%);
}

.bg__vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(0, 0, 0, 0.55) 100%);
  pointer-events: none;
}

[data-theme="light"] .bg__vignette { display: none; }

.bg__grain {
  position: absolute;
  inset: -20%;
  opacity: 0.08;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

.content-wrapper { position: relative; z-index: 1; }

/* Copper-trace cursor — PCB runs + solder pads that fade behind the pointer */
.copper-trace {
  position: fixed;
  inset: 0;
  z-index: 1150;
  width: 100%;
  height: 100%;
  pointer-events: none;
  mix-blend-mode: screen;
}
[data-theme="light"] .copper-trace {
  mix-blend-mode: multiply;
  opacity: 0.88;
}
@media (prefers-reduced-motion: reduce) {
  .copper-trace { display: none !important; }
}

/* ==========================================================================
   Boot CRT
   ========================================================================== */
.boot {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  padding: clamp(24px, 6vw, 72px);
  background: #040806;
  color: #3dffc5;
  font-family: var(--font-mono);
  transition: opacity 0.4s var(--smooth);
}

.boot[hidden] { display: none; }
.boot.is-out { opacity: 0; pointer-events: none; }

.boot__crt {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(transparent 0 2px, rgba(0, 0, 0, 0.18) 2px 3px),
    radial-gradient(ellipse at center, transparent 50%, rgba(0, 0, 0, 0.55) 100%);
}

.boot__scope {
  position: relative;
  width: min(720px, 100%);
  height: 160px;
  border: 1px solid rgba(61, 255, 197, 0.35);
  border-radius: 6px;
  box-shadow: 0 0 40px rgba(61, 255, 197, 0.12), inset 0 0 30px rgba(61, 255, 197, 0.08);
}

.boot__mark {
  margin: 0;
  font-size: clamp(1.1rem, 3vw, 1.4rem);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #3dffc5;
  text-shadow: 0 0 18px rgba(61, 255, 197, 0.45);
}
.boot__mark span { opacity: 0.45; letter-spacing: 0.08em; }

.boot__log {
  margin: 0;
  min-height: 9.5em;
  font-size: 0.92rem;
  line-height: 1.55;
  color: #9affd8;
}

.boot__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.boot__hint { margin: 0; font-size: 0.75rem; color: rgba(61, 255, 197, 0.45); }

.boot .btn--ghost {
  color: #3dffc5;
  border-color: rgba(61, 255, 197, 0.35);
}

/* ==========================================================================
   Type
   ========================================================================== */
h1, h2, h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.display-1 { font-size: clamp(2.7rem, 7.2vw, 5.4rem); }
.display-2 { font-size: clamp(2rem, 4.8vw, 3.3rem); }

.marker {
  display: inline-block;
  padding: 0 0.18em;
  border-radius: 0.12em;
  transform: rotate(-1.2deg);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.marker--solder, .marker--orange {
  background: var(--solder);
  color: #fff6ea;
  box-shadow: 0 0 24px rgba(255, 106, 42, 0.35);
}
.marker--phosphor, .marker--mustard {
  background: var(--phosphor);
  color: #1c120c;
  box-shadow: 0 0 24px rgba(240, 180, 41, 0.28);
}
.marker--laser, .marker--teal {
  background: var(--laser);
  color: #04140f;
  box-shadow: 0 0 24px rgba(61, 255, 197, 0.28);
}

.led {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3a3f46;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}
.led--live {
  background: var(--laser);
  box-shadow: 0 0 10px var(--laser);
  animation: ledPulse 1.8s ease-in-out infinite;
}
.led--hot {
  background: var(--solder);
  box-shadow: 0 0 10px var(--solder);
  animation: ledPulse 1.2s ease-in-out infinite;
}

@keyframes ledPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

@keyframes pulseDot {
  0%   { box-shadow: 0 0 0 0 rgba(61, 255, 197, 0.55); }
  70%  { box-shadow: 0 0 0 9px rgba(61, 255, 197, 0); }
  100% { box-shadow: 0 0 0 0 rgba(61, 255, 197, 0); }
}

.sticker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  background: var(--paper);
  color: var(--ink);
  border: var(--border-w) solid var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow-hard-sm);
}

.sticker--solder, .sticker--orange { background: var(--solder); color: #fff6ea; border-color: transparent; }
.sticker--phosphor, .sticker--mustard { background: var(--phosphor); color: #1c120c; border-color: transparent; }
.sticker--laser, .sticker--teal { background: var(--laser); color: #04140f; border-color: transparent; }
.sticker:hover { transform: rotate(2deg) scale(1.04); }

.panel {
  background: var(--paper);
  border: var(--border-w) solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-hard);
  overflow: hidden;
  transition: transform 0.3s var(--snap), box-shadow 0.3s var(--snap), background-color 0.4s var(--smooth);
}

[data-theme="dark"] .panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 28%),
    var(--paper);
  box-shadow: var(--shadow-hard), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.panel--ideas { padding: 28px; }

/* ==========================================================================
   Layout
   ========================================================================== */
.page {
  max-width: var(--max);
  margin: 0 auto;
  padding: 140px var(--pad) 80px;
}

.page-home .page { padding-top: 128px; }

.section { position: relative; margin-top: 120px; scroll-margin-top: 120px; }
.section--narrow { max-width: 800px; }

.section__head {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 36px;
}

.section__num {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: #04140f;
  background: var(--laser);
  padding: 6px 12px;
  border-radius: 6px;
  flex-shrink: 0;
  box-shadow: 0 0 18px rgba(61, 255, 197, 0.25);
}

[data-theme="light"] .section__num {
  color: var(--paper);
  background: var(--ink);
  box-shadow: none;
}

.section__intro {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 640px;
  margin: 0 0 40px;
}

.section__intro a {
  color: var(--ink);
  font-weight: 700;
  text-decoration: underline wavy var(--solder) 2px;
  text-underline-offset: 4px;
}

.section--flush { margin-top: 36px; }

.section__more {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 8px 14px;
  border: var(--border-w) solid var(--border);
  border-radius: 999px;
  background: var(--paper);
  box-shadow: var(--shadow-hard-sm);
  white-space: nowrap;
  transition: transform 0.2s var(--snap), box-shadow 0.2s var(--snap), background 0.2s var(--smooth);
}

.section__more:hover {
  transform: translate(-2px, -2px);
  background: var(--phosphor);
  color: #1c120c;
}

.section__foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 48px;
}

/* ==========================================================================
   Nav + shop-light switch
   ========================================================================== */
.nav-wrap {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 16px var(--pad);
  display: flex;
  justify-content: center;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px 8px 16px;
  border-radius: 16px;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  border: var(--border-w) solid var(--border);
  width: 100%;
  max-width: 980px;
  box-shadow: var(--shadow-hard);
  backdrop-filter: blur(16px);
}

[data-theme="dark"] .nav {
  background: rgba(12, 14, 18, 0.72);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(61, 255, 197, 0.08);
}

.nav__logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.nav__logo-tag {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--laser);
  opacity: 0.8;
}

[data-theme="light"] .nav__logo-tag { color: var(--solder); }

.nav__links { display: flex; gap: 4px; margin-left: auto; }

.nav__link {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: all 0.25s var(--snap);
}

.nav__link:hover {
  background: var(--solder);
  color: #fff6ea;
  transform: rotate(-1.5deg);
}

.nav__link.is-current {
  border-color: color-mix(in srgb, var(--laser) 50%, transparent);
  color: var(--laser);
}

.lamp-switch {
  position: relative;
  width: 72px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid rgba(61, 255, 197, 0.35);
  background: #0b0d10;
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
  overflow: hidden;
}

[data-theme="light"] .lamp-switch { background: #2a1b12; }

.lamp-switch__knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--laser);
  box-shadow: 0 0 12px var(--laser);
  transition: transform 0.35s var(--snap), background 0.3s var(--smooth);
}

[data-theme="light"] .lamp-switch__knob {
  transform: translateX(38px);
  background: var(--phosphor);
  box-shadow: 0 0 12px var(--phosphor);
}

.lamp-switch__label {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(243, 234, 216, 0.55);
}
.lamp-switch__label--night { left: 30px; }
.lamp-switch__label--day { left: 8px; opacity: 0; }
[data-theme="light"] .lamp-switch__label--night { opacity: 0; }
[data-theme="light"] .lamp-switch__label--day { opacity: 1; color: #f3ead8; }

.stations {
  position: fixed;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stations__item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted2);
  writing-mode: horizontal-tb;
}

.stations__item.is-active { color: var(--laser); }
.stations__item.is-active .led {
  background: var(--laser);
  box-shadow: 0 0 10px var(--laser);
}

.stations__item.is-heat:not(.is-active) .led,
.stations__item.is-heat .led.led--hot {
  background: var(--solder);
  box-shadow: 0 0 10px var(--solder);
}
.stations__item.is-heat.is-active { color: var(--solder); }
.stations__item.is-heat.is-active .led {
  background: var(--hot);
  box-shadow: 0 0 14px var(--hot);
}

@media (max-width: 1320px) { .stations { display: none; } }

/* ==========================================================================
   Hero + instrument
   ========================================================================== */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
  padding: 12px 0 48px;
  min-height: calc(100vh - 170px);
}

.hero--page {
  display: block;
  min-height: 0;
  padding: 10px 0 20px;
  scroll-margin-top: 120px;
}
.hero--page .hero__title { margin-bottom: 20px; }

.hero__badge { margin-bottom: 28px; }
.hero__title { margin-bottom: 28px; }
.hero__period { color: var(--solder); }

.hero__sub {
  font-size: clamp(1.08rem, 2vw, 1.32rem);
  line-height: 1.5;
  color: var(--muted);
  max-width: 620px;
  margin: 0 0 36px;
}

.hero__sub a {
  color: var(--ink);
  font-weight: 700;
  text-decoration: underline wavy var(--solder) 2px;
  text-underline-offset: 4px;
}

.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; }

.hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  list-style: none;
  padding: 0;
  margin: 32px 0 0;
}

.hero__stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 128px;
  padding: 12px 16px;
  background: var(--paper);
  border: var(--border-w) solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-hard-sm);
}

.hero__stat strong {
  font-family: var(--font-mono);
  font-size: 1.45rem;
  line-height: 1;
  color: var(--laser);
  text-shadow: 0 0 16px rgba(61, 255, 197, 0.25);
}

[data-theme="light"] .hero__stat strong { color: var(--solder); text-shadow: none; }

.hero__stat span {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero__instrument { perspective: 1400px; }

.instrument {
  transform: rotateX(8deg) rotateY(-16deg);
  transform-style: preserve-3d;
  transition: transform 0.45s var(--ease-out-expo);
}

.instrument__bezel {
  background: linear-gradient(180deg, #1a1e24, #0c0e12);
  border: 1px solid rgba(243, 234, 216, 0.16);
  border-radius: 18px;
  overflow: hidden;
  box-shadow:
    0 30px 60px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

[data-theme="light"] .instrument__bezel {
  background: linear-gradient(180deg, #2a2118, #1a140f);
  border: 3px solid var(--ink);
}

.instrument__chrome {
  display: flex;
  justify-content: space-between;
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(243, 234, 216, 0.55);
  background: #0a0c10;
}

.instrument__live { display: inline-flex; align-items: center; gap: 6px; color: var(--laser); }

.instrument__scope {
  display: block;
  width: 100%;
  height: min(38vw, 280px);
  background: #07140f;
}

.instrument__readouts {
  display: flex;
  justify-content: space-between;
  padding: 8px 14px 12px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  color: var(--laser);
  background: #0a0c10;
}

.instrument__tray {
  display: flex;
  align-items: flex-end;
  gap: 18px;
  margin-top: 14px;
  padding: 12px 8px 0;
}

.knob {
  width: 52px;
  text-align: center;
  color: var(--muted);
}
.knob i {
  display: block;
  width: 42px;
  height: 42px;
  margin: 0 auto 6px;
  border-radius: 50%;
  background:
    conic-gradient(from var(--rot, 0deg), #2a2f36, #111318 40%, #4a515c 42%, #111318 44%, #2a2f36);
  border: 2px solid rgba(243, 234, 216, 0.2);
  box-shadow: inset 0 0 0 6px #0c0e12, 0 8px 16px rgba(0, 0, 0, 0.4);
  position: relative;
}
.knob i::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 6px;
  width: 3px;
  height: 10px;
  background: var(--solder);
  border-radius: 1px;
  transform: translateX(-50%);
}
.knob em {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-style: normal;
  letter-spacing: 0.14em;
}

.solder-iron {
  margin-left: auto;
  display: flex;
  align-items: center;
  transform: rotate(-12deg);
}
.solder-iron__tip {
  width: 18px;
  height: 8px;
  background: linear-gradient(90deg, #f4ead4, var(--solder));
  border-radius: 2px 0 0 2px;
  box-shadow: 0 0 16px var(--solder);
}
.solder-iron__body {
  width: 72px;
  height: 14px;
  background: linear-gradient(180deg, #3a414c, #1a1d22);
  border-radius: 0 8px 8px 0;
}

.instrument__caption {
  margin: 12px 0 0;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted2);
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   Ticker
   ========================================================================== */
.ticker {
  position: relative;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%) rotate(-0.8deg);
  background: var(--solder);
  border-top: var(--border-w) solid color-mix(in srgb, var(--ink) 50%, transparent);
  border-bottom: var(--border-w) solid color-mix(in srgb, var(--ink) 50%, transparent);
  padding: 12px 0;
  overflow: hidden;
  margin: 8px 0 28px;
  box-shadow: 0 0 40px rgba(255, 106, 42, 0.25);
}

.ticker__track {
  display: flex;
  white-space: nowrap;
  animation: tickerScroll 26s linear infinite;
  width: max-content;
}

.ticker__item {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.16em;
  color: #1c120c;
}

@keyframes tickerScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-33.333%); }
}

/* ==========================================================================
   Grid & Cards
   ========================================================================== */
.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 28px;
}

.card {
  grid-column: span 12;
  position: relative;
  background: var(--paper);
  border: var(--border-w) solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-hard);
  overflow: visible;
  transition: transform 0.3s var(--snap), box-shadow 0.3s var(--snap);
  --card-accent: var(--solder);
}

.grid > .card:nth-child(3n+2) { --card-accent: var(--phosphor); }
.grid > .card:nth-child(3n+3) { --card-accent: var(--laser); }

.card:hover {
  transform: translateY(-6px) rotate(-0.4deg);
  box-shadow: 0 0 0 1px var(--card-accent), 0 22px 50px color-mix(in srgb, var(--card-accent) 22%, transparent);
}

[data-theme="light"] .card:hover {
  transform: translate(-4px, -4px) rotate(-0.6deg);
  box-shadow: 10px 10px 0 var(--card-accent);
}

.card:active { transform: translate(1px, 1px); }

.card__link { display: flex; flex-direction: column; height: 100%; }

.card__img-wrap {
  aspect-ratio: 16/10;
  overflow: hidden;
  border-radius: calc(var(--r-lg) - var(--border-w)) calc(var(--r-lg) - var(--border-w)) 0 0;
  border-bottom: var(--border-w) solid var(--border);
  position: relative;
}

.card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease-out-expo);
}
.card:hover .card__img { transform: scale(1.06); }

.card__fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 70% 20%, color-mix(in srgb, var(--card-accent) 40%, transparent), transparent 46%),
    repeating-linear-gradient(-45deg, color-mix(in srgb, var(--card-accent) 70%, #111), color-mix(in srgb, var(--card-accent) 70%, #111) 18px, color-mix(in srgb, var(--card-accent) 40%, #111) 18px, color-mix(in srgb, var(--card-accent) 40%, #111) 36px);
}

.card__fallback span {
  font-size: 4rem;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 0 20px rgba(0, 0, 0, 0.4);
}

.card__content {
  position: relative;
  padding: 34px 26px 26px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card__tag {
  position: absolute;
  top: -16px;
  left: 20px;
  z-index: 2;
}

.card__title {
  font-size: 1.5rem;
  margin-bottom: 10px;
}
.card:hover .card__title { color: var(--card-accent); }

.card__desc {
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.55;
  margin: 0 0 20px;
}

.card__cta {
  margin-top: auto;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.card__arrow {
  display: inline-block;
  transition: transform 0.3s var(--snap);
}
.card:hover .card__arrow { transform: translateX(6px); }

@media (min-width: 768px) { .card--small { grid-column: span 6; } }
@media (min-width: 1024px) { .card--small { grid-column: span 4; } }

.card--large .card__img-wrap {
  max-height: min(42vw, 340px);
  aspect-ratio: 21 / 9;
}
.card--large .card__img { object-position: top center; }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: var(--r-md);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.96rem;
  border: var(--border-w) solid var(--border);
  box-shadow: var(--shadow-hard);
  cursor: pointer;
  transition: transform 0.2s var(--snap), box-shadow 0.2s var(--snap), background 0.2s var(--smooth);
}

.btn:hover { transform: translate(-2px, -2px); }
.btn:active { transform: translate(2px, 2px); }

.btn--solder, .btn--orange {
  background: var(--solder);
  color: #fff6ea;
  border-color: transparent;
  box-shadow: 0 10px 28px rgba(255, 106, 42, 0.28);
}
.btn--phosphor, .btn--mustard {
  background: var(--phosphor);
  color: #1c120c;
  border-color: transparent;
}
.btn--ghost { background: transparent; }

/* ==========================================================================
   Bento
   ========================================================================== */
.bento {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin: 36px 0 8px;
}

.bento__card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  min-height: 168px;
  padding: 22px 20px 18px;
  text-decoration: none;
  transition: transform 0.3s var(--snap), box-shadow 0.3s var(--snap);
}

.bento__card:hover {
  transform: translateY(-6px);
  box-shadow: 0 0 0 1px var(--laser), var(--shadow-hard-lg);
}

.bento__card--build { --glow: var(--solder); }
.bento__card--play { --glow: var(--laser); }
.bento__card--idea { --glow: var(--phosphor); }
.bento__card--idea.is-hot { --glow: var(--solder); }
.bento__card--sky { --glow: var(--copper); }

.bento__card {
  background:
    radial-gradient(circle at 88% 18%, color-mix(in srgb, var(--glow) 28%, transparent), transparent 42%),
    var(--paper);
}

.bento__label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.bento__title {
  font-family: var(--font-display);
  font-size: 1.32rem;
  line-height: 1.15;
}

.bento__cta {
  margin-top: auto;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ==========================================================================
   Arcade cabinet
   ========================================================================== */
.arcade { margin-top: 8px; scroll-margin-top: 120px; }

/* Reveal's translateY would create a containing block and kill sticky picker. */
html.js .arcade[data-reveal],
html.js .arcade[data-reveal].in-view {
  transform: none;
}

.arcade__live {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.arcade__picker {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 18px;
  position: sticky;
  top: 88px;
  z-index: 40;
  padding: 10px 0 12px;
  background: color-mix(in srgb, var(--base) 88%, transparent);
  backdrop-filter: blur(12px);
}

.arcade__pick {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  padding: 12px;
  background: var(--paper);
  color: var(--ink);
  border: var(--border-w) solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-hard-sm);
  cursor: pointer;
  transition: transform 0.2s var(--snap), background 0.2s var(--smooth);
}

.arcade__pick:hover { transform: translateY(-2px); }
.arcade__pick:focus-visible { z-index: 1; }

.arcade__pick.is-active {
  background: #0b0d10;
  color: var(--laser);
  border-color: color-mix(in srgb, var(--laser) 45%, transparent);
  box-shadow: 0 0 24px rgba(61, 255, 197, 0.12);
}

[data-theme="light"] .arcade__pick.is-active {
  background: var(--ink);
  color: var(--paper);
}

.arcade__pick-icon { font-size: 1.5rem; line-height: 1; }
.arcade__pick-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.arcade__pick-copy strong { font-family: var(--font-display); font-size: 1rem; }
.arcade__pick-copy em {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  opacity: 0.75;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.arcade__cabinet {
  position: relative;
  overflow: hidden;
  transform: perspective(1400px) rotateX(4deg);
  transform-origin: center top;
  background:
    linear-gradient(180deg, #1c140e 0%, var(--paper) 22%);
  border-color: color-mix(in srgb, var(--copper) 55%, var(--border));
}

.arcade__marquee {
  display: flex;
  gap: 32px;
  padding: 10px 0;
  background: var(--solder);
  color: #fff6ea;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  white-space: nowrap;
  overflow: hidden;
  border-bottom: var(--border-w) solid var(--border);
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.25);
}

.arcade__marquee span { animation: tickerScroll 18s linear infinite; }

.arcade__hud {
  display: grid;
  grid-template-columns: 1fr 1.4fr 1fr;
  gap: 12px;
  padding: 14px 18px 8px;
}

.arcade__stat { display: flex; flex-direction: column; gap: 2px; }
.arcade__stat--title { text-align: center; }
.arcade__stat:last-child { text-align: right; }

.arcade__stat-label {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.arcade__stat-value {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--laser);
}

.arcade__screen {
  position: relative;
  margin: 8px 18px 12px;
  height: min(62vw, 460px);
  min-height: 260px;
  border: var(--border-w) solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: #07140f;
  box-shadow: inset 0 0 0 3px #04100c, inset 0 0 60px rgba(0, 0, 0, 0.45), 0 0 40px rgba(61, 255, 197, 0.08);
  outline: none;
  touch-action: manipulation;
}

.arcade__screen.is-shake { animation: cabinetShake 0.42s var(--snap); }
.arcade__screen.is-flash::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 106, 42, 0.28);
  animation: screenFlash 0.35s var(--smooth) forwards;
  pointer-events: none;
  z-index: 3;
}

@keyframes cabinetShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px) rotate(-0.4deg); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(2px); }
}

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

.arcade__canvas { display: block; width: 100%; height: 100%; }

.arcade__glass {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    repeating-linear-gradient(transparent 0 2px, rgba(0, 0, 0, 0.14) 2px 3px),
    radial-gradient(ellipse at center, transparent 42%, rgba(0, 0, 0, 0.42) 100%);
  mix-blend-mode: multiply;
}

[data-theme="light"] .arcade__glass { mix-blend-mode: normal; opacity: 0.55; }

.arcade__overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px;
  text-align: center;
  background: rgba(4, 16, 12, 0.62);
  color: #fbf3e1;
  backdrop-filter: blur(3px);
}

.arcade__overlay[hidden] { display: none; }

.arcade__kicker {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--phosphor);
}

.arcade__overlay-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  color: #fbf3e1;
}

.arcade__overlay-msg {
  margin: 0 0 8px;
  max-width: 420px;
  color: rgba(251, 243, 225, 0.82);
}

.arcade__hint {
  margin: 0 18px 16px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
}

.arcade__pad {
  display: none;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 0 18px 18px;
}

.arcade__pad button {
  height: 48px;
  border: 2px solid var(--border);
  border-radius: 10px;
  background: var(--phosphor);
  color: #1c120c;
  font-weight: 800;
  cursor: pointer;
}

.arcade__pad-action { background: var(--solder); color: #fff6ea; grid-column: span 4; }

.arcade__match {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 16px;
  z-index: 1;
  perspective: 900px;
  background: #07140f;
}

.arcade__match[hidden] { display: none; }

.match-card {
  position: relative;
  border: 2px solid rgba(243, 234, 216, 0.45);
  border-radius: 12px;
  background: var(--solder);
  cursor: pointer;
  transform-style: preserve-3d;
  transition: transform 0.35s var(--snap), background-color 0.25s var(--smooth);
}

.match-card__face {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(1.4rem, 4vw, 2rem);
  backface-visibility: hidden;
}

.match-card__face--front { transform: rotateY(180deg); }
.match-card.is-open { transform: rotateY(180deg); background: var(--paper); }
.match-card.is-done { background: var(--phosphor); }
.match-card:focus-visible { z-index: 2; }

@media (pointer: coarse) {
  .arcade__pad:not([hidden]) { display: grid; }
}

@media (hover: none) {
  .arcade__pick:hover { transform: none; }
}

/* ==========================================================================
   Arcade season card
   ========================================================================== */
.pass {
  margin-top: 22px;
  padding: 22px 22px 20px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--solder) 14%, transparent), transparent 28%),
    var(--paper);
  border-color: color-mix(in srgb, var(--copper) 50%, var(--border));
}

.pass__head { margin-bottom: 16px; }

.pass__kicker {
  margin: 0 0 6px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--solder);
}

.pass__title {
  font-size: clamp(1.35rem, 2.4vw, 1.8rem);
  margin-bottom: 8px;
}

.pass__lede {
  margin: 0 0 10px;
  max-width: 48ch;
  color: var(--muted);
}

.pass__progress {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--laser);
}

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

.pass__stamp {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  gap: 2px 10px;
  padding: 12px;
  border: var(--border-w) dashed color-mix(in srgb, var(--copper) 55%, var(--border));
  border-radius: 12px;
  background: color-mix(in srgb, var(--base) 40%, transparent);
}

.pass__stamp.is-punched {
  border-style: solid;
  border-color: color-mix(in srgb, var(--phosphor) 55%, var(--border));
  background: color-mix(in srgb, var(--phosphor) 12%, transparent);
}

.pass__badge {
  grid-row: 1 / span 2;
  align-self: center;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
}

.pass__stamp.is-punched .pass__badge { color: var(--phosphor); }

.pass__copy { min-width: 0; }
.pass__copy strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1rem;
}
.pass__copy em {
  display: block;
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--muted);
}

.pass__mark {
  grid-column: 2;
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted2);
}

.pass__stamp.is-punched .pass__mark { color: var(--phosphor); }

.pass__cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin-top: 16px;
}

.pass__cta-note {
  color: var(--muted);
  font-size: 0.92rem;
}

.pass--teaser {
  padding: 16px 16px 14px;
}

.pass--teaser .pass__lede { display: none; }
.pass--teaser .pass__title { font-size: 1.15rem; }
.pass--teaser .pass__cta .btn { padding: 10px 16px; }

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

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  padding: 72px 0 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.footer__telemetry {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 18px 28px;
  margin-bottom: 28px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted2);
}

.footer__telemetry em {
  font-style: normal;
  color: var(--laser);
  font-weight: 700;
}

.footer__marquee { overflow: hidden; margin-bottom: 28px; opacity: 0.28; }

.footer__marquee-track {
  display: flex;
  white-space: nowrap;
  width: max-content;
  animation: tickerScroll 40s linear infinite;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 3.4rem);
  letter-spacing: 0.02em;
  -webkit-text-stroke: 1px var(--ink);
  color: transparent;
}

.footer__text {
  color: var(--muted2);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 0 var(--pad);
  display: inline-block;
}

.footer__lab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 16px var(--pad) 0;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--laser);
  opacity: 0.55;
}

.footer__lab span { opacity: 0.7; letter-spacing: 0.12em; }

.footer__lab:hover {
  opacity: 1;
  color: var(--phosphor);
}

html:not(.is-lab-open) .footer__lab[hidden] { display: none; }

/* ==========================================================================
   Reveal
   ========================================================================== */
html.js [data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s var(--ease-out-expo), transform 0.7s var(--ease-out-expo);
}

html.js [data-reveal].in-view {
  opacity: 1;
  transform: translateY(0);
}

html.js .hero [data-reveal] { opacity: 1; transform: none; }

.giscus, .giscus-frame { width: 100%; max-width: 100%; }

/* ==========================================================================
   Prose
   ========================================================================== */
.prose {
  color: var(--ink);
  font-size: 1.08rem;
  line-height: 1.75;
}

.prose h2 {
  font-size: 1.9rem;
  margin: 2em 0 0.6em;
  display: inline-block;
  border-bottom: 4px solid var(--phosphor);
  padding-bottom: 4px;
}

.prose p { margin: 0 0 1.4em; }
.prose ul { padding-left: 1.3em; margin: 0 0 1.4em; }
.prose li { margin-bottom: 0.5em; }
.prose li::marker { color: var(--solder); content: "✦ "; }

.prose a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: underline wavy var(--solder) 2px;
  text-underline-offset: 4px;
}

.prose a:hover { color: var(--solder); }

.prose code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: color-mix(in srgb, var(--phosphor) 30%, transparent);
  padding: 2px 7px;
  border-radius: 6px;
  border: 1px solid var(--muted2);
}

.prose strong { color: var(--ink); }

.contact {
  margin-top: 64px;
  padding: 44px 36px;
  text-align: center;
  background:
    radial-gradient(circle at 12% 20%, color-mix(in srgb, var(--solder) 16%, transparent), transparent 40%),
    radial-gradient(circle at 88% 80%, color-mix(in srgb, var(--phosphor) 22%, transparent), transparent 40%),
    var(--paper);
}

.contact__title { font-size: clamp(1.5rem, 3vw, 2.1rem); margin-bottom: 12px; }
.contact__sub { color: var(--muted); margin: 0 auto 30px; max-width: 480px; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   Career scope — About station timebase
   ========================================================================== */
.about-bench {
  display: grid;
  gap: 28px;
}

.about-bench .prose { max-width: 42rem; }

.career-scope { min-width: 0; }

.career-scope__instrument { transform: none; }

.career-scope__stage {
  position: relative;
  background: #07140f;
  isolation: isolate;
}

.career-scope__canvas {
  display: block;
  width: 100%;
  height: min(34vw, 240px);
  min-height: 168px;
  background: #07140f;
}

.career-scope__markers {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  pointer-events: none;
}

.career-scope:not(.is-ready) .career-scope__markers {
  position: static;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 12px 16px;
  pointer-events: auto;
}

.career-scope:not(.is-ready) .career-scope__markers li {
  position: static;
  transform: none;
}

.career-scope:not(.is-ready) .career-scope__blip {
  width: auto;
  height: auto;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(61, 255, 197, 0.12);
  color: #f3ead8;
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.career-scope:not(.is-ready) .career-scope__blip .sr-only {
  position: static;
  width: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

.career-scope.is-ready .career-scope__markers li {
  position: absolute;
  transform: translate(-50%, -50%);
}

.career-scope__blip {
  position: relative;
  display: block;
  width: 44px;
  height: 44px;
  pointer-events: auto;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.career-scope__blip::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--laser);
  box-shadow: 0 0 12px var(--laser);
  transform: translate(-50%, -50%);
}

.career-scope__blip.is-hot::before {
  background: var(--solder);
  box-shadow: 0 0 14px var(--solder);
}

.career-scope__blip.is-active::before,
.career-scope__blip:focus-visible::before {
  width: 13px;
  height: 13px;
}

.career-scope__timebase {
  position: relative;
  height: 30px;
  background: #0a0c10;
  overflow: hidden;
}

.career-scope__tick {
  position: absolute;
  top: 8px;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  color: var(--laser);
  white-space: nowrap;
}

.career-scope__hud {
  display: grid;
  gap: 6px;
  padding: 14px 16px 16px;
  background: #0a0c10;
  border-top: 1px solid rgba(61, 255, 197, 0.12);
}

.career-scope__kicker {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(243, 234, 216, 0.55);
}

.career-scope__title {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.92rem;
  line-height: 1.35;
  color: #f3ead8;
}

.career-scope__summary {
  margin: 0;
  max-width: 62ch;
  font-size: 0.88rem;
  line-height: 1.45;
  color: rgba(243, 234, 216, 0.72);
}

.career-scope__open {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--laser);
  text-decoration: underline wavy rgba(61, 255, 197, 0.55) 1px;
  text-underline-offset: 4px;
}

.career-scope__open:hover { color: var(--phosphor); }

.career-scope__noscript {
  margin: 12px 0 0;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
}

@media (max-width: 720px) {
  .career-scope__canvas { height: 176px; }
}

@media (prefers-reduced-motion: reduce) {
  .career-scope__instrument { transform: none; }
}

/* ==========================================================================
   Workbench DMM — probe the homepage builds
   ========================================================================== */
.dmm {
  min-width: 0;
  margin: 0 0 36px;
}

.dmm__instrument { transform: none; }

.dmm__face {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(180px, 0.85fr);
  gap: 14px;
  align-items: stretch;
  padding: 14px;
  background: #07140f;
}

.dmm__lcd {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 6px;
  min-height: 132px;
  padding: 12px 14px 10px;
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(61, 255, 197, 0.06), transparent 42%),
    #04150f;
  box-shadow:
    inset 0 0 0 1px rgba(61, 255, 197, 0.18),
    inset 0 18px 40px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.dmm__lcd::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0 2px,
    rgba(4, 10, 8, 0.18) 2px 3px
  );
  opacity: 0.45;
}

.dmm__lcd-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(61, 255, 197, 0.7);
}

.dmm__range {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dmm__unit {
  flex-shrink: 0;
  color: var(--phosphor);
}

.dmm__digits-wrap {
  position: relative;
  min-height: 1.15em;
}

.dmm__ghost,
.dmm__digits {
  font-family: var(--font-mono);
  font-size: clamp(1.8rem, 4.2vw, 2.6rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.12em;
  line-height: 1.15;
  white-space: nowrap;
}

.dmm__ghost {
  position: absolute;
  inset: 0;
  color: rgba(61, 255, 197, 0.1);
  pointer-events: none;
}

.dmm__digits {
  position: relative;
  color: var(--laser);
  text-shadow: 0 0 14px rgba(61, 255, 197, 0.35);
}

.dmm[data-dmm-tone="phosphor"] .dmm__digits {
  color: var(--phosphor);
  text-shadow: 0 0 14px rgba(240, 180, 41, 0.4);
}

.dmm[data-dmm-tone="solder"] .dmm__digits {
  color: var(--solder);
  text-shadow: 0 0 16px rgba(255, 106, 42, 0.45);
}

.dmm[data-dmm-tone="copper"] .dmm__digits {
  color: #e0a36a;
  text-shadow: 0 0 12px rgba(196, 122, 58, 0.4);
}

.dmm[data-dmm-tone="idle"] .dmm__digits {
  color: rgba(61, 255, 197, 0.45);
  text-shadow: none;
}

.dmm__lcd[data-continuity="spike"] {
  box-shadow:
    inset 0 0 0 1px rgba(255, 106, 42, 0.45),
    inset 0 0 28px rgba(255, 106, 42, 0.18);
}

.dmm__lcd[data-continuity="closed"] {
  box-shadow:
    inset 0 0 0 1px rgba(61, 255, 197, 0.45),
    inset 0 0 28px rgba(61, 255, 197, 0.12);
}

.dmm__label {
  margin: 0;
  max-width: 100%;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.35;
  color: rgba(243, 234, 216, 0.78);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dmm__controls {
  display: grid;
  grid-template-rows: auto auto 1fr;
  justify-items: center;
  gap: 10px;
  padding: 4px 4px 0;
}

.dmm__dial {
  --dmm-rot: -48deg;
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background:
    conic-gradient(from var(--dmm-rot), #2a2f36, #111318 38%, #4a515c 42%, #111318 46%, #2a2f36);
  border: 2px solid rgba(243, 234, 216, 0.2);
  box-shadow: inset 0 0 0 8px #0c0e12, 0 8px 16px rgba(0, 0, 0, 0.4);
}

.dmm__dial i {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 3px;
  height: 14px;
  background: var(--solder);
  border-radius: 1px;
  transform: translate(-50%, -50%) rotate(var(--dmm-rot)) translateY(-22px);
  transition: transform 0.35s var(--ease-out-expo);
}

.dmm__dial span {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 0.52rem;
  letter-spacing: 0.08em;
  color: rgba(243, 234, 216, 0.55);
}

.dmm__dial span:nth-of-type(1) { left: 6px; top: 28px; }
.dmm__dial span:nth-of-type(2) { left: 50%; bottom: 6px; transform: translateX(-50%); }
.dmm__dial span:nth-of-type(3) { right: 8px; top: 28px; }

.dmm__modes {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

.dmm__mode {
  min-height: 44px;
  min-width: 44px;
  padding: 8px 12px;
  border: 1px solid rgba(243, 234, 216, 0.2);
  border-radius: 999px;
  background: #0a0c10;
  color: rgba(243, 234, 216, 0.72);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.dmm__mode:hover,
.dmm__mode.is-active {
  color: #04140f;
  background: var(--laser);
  border-color: var(--laser);
}

.dmm[data-dmm-tone="solder"] .dmm__mode.is-active {
  background: var(--solder);
  border-color: var(--solder);
  color: #1c120c;
}

.dmm[data-dmm-tone="phosphor"] .dmm__mode.is-active,
.dmm[data-dmm-tone="copper"] .dmm__mode.is-active {
  background: var(--phosphor);
  border-color: var(--phosphor);
  color: #1c120c;
}

.dmm__gauge {
  width: 120px;
  height: 70px;
  overflow: visible;
}

.dmm__arc {
  stroke: rgba(61, 255, 197, 0.28);
  stroke-width: 3;
}

.dmm__needle {
  stroke: var(--solder);
  stroke-width: 2.5;
  stroke-linecap: round;
  transform-box: view-box;
  transform-origin: 50px 50px;
  transform: rotate(-72deg);
  transition: transform 0.45s var(--ease-out-expo);
}

.dmm[data-dmm-tone="laser"] .dmm__needle { stroke: var(--laser); }
.dmm[data-dmm-tone="phosphor"] .dmm__needle { stroke: var(--phosphor); }

.dmm__jacks {
  display: flex;
  justify-content: space-between;
  padding: 8px 14px 12px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(243, 234, 216, 0.45);
  background: #0a0c10;
}

.dmm__jacks span::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 8px;
  border-radius: 50%;
  background: #1a120c;
  box-shadow: inset 0 0 0 2px var(--copper), 0 0 0 1px rgba(243, 234, 216, 0.2);
  vertical-align: -1px;
}

.dmm__noscript {
  margin: 0 0 24px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
}

.card__pad {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, #2a1c12 0 28%, transparent 30%),
    radial-gradient(circle at 50% 50%, var(--copper) 0 42%, #1a120c 44% 62%, var(--copper) 64% 72%, transparent 74%);
  box-shadow: 0 0 0 1px rgba(196, 122, 58, 0.45), 0 6px 14px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

.card__link { position: relative; }

.card.is-probed {
  box-shadow: 0 0 0 1px var(--laser), 0 22px 50px color-mix(in srgb, var(--laser) 22%, transparent);
}

[data-theme="light"] .card.is-probed {
  box-shadow: 10px 10px 0 var(--laser);
}

.card.is-probed .card__pad {
  box-shadow: 0 0 0 2px var(--laser), 0 0 16px rgba(61, 255, 197, 0.45);
}

.card.is-probed[data-probe-id] .card__title { color: var(--card-accent); }

@media (max-width: 720px) {
  .dmm__face {
    grid-template-columns: 1fr;
    padding: 12px;
  }
  .dmm__controls { grid-template-rows: auto auto auto; }
  .dmm__modes { width: 100%; }
  .dmm__mode { flex: 1 1 0; }
}

@media (prefers-reduced-motion: reduce) {
  .dmm__instrument { transform: none; }
  .dmm__needle { transition: none; }
  .dmm__dial,
  .dmm__dial i { transition: none; }
}

/* ==========================================================================
   Idea-box heat — IR camera on the Ideas station
   ========================================================================== */
.idea-heat { min-width: 0; }

.idea-heat__instrument { transform: none; }

.idea-heat .instrument__live { color: var(--solder); }

.idea-heat__stage {
  position: relative;
  background: #0a0604;
  isolation: isolate;
}

.idea-heat__canvas {
  display: block;
  width: 100%;
  height: 120px;
  background: #0a0604;
}

.idea-heat__reticle {
  position: absolute;
  inset: 10px 12px 28px;
  pointer-events: none;
  border: 1px solid rgba(255, 246, 234, 0.18);
  box-shadow:
    inset 12px 0 18px -14px rgba(255, 59, 26, 0.35),
    inset -12px 0 18px -14px rgba(240, 180, 41, 0.28);
}

.idea-heat__reticle::before,
.idea-heat__reticle::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border: 1px solid rgba(255, 246, 234, 0.45);
}

.idea-heat__reticle::before {
  left: -1px;
  top: -1px;
  border-right: 0;
  border-bottom: 0;
}

.idea-heat__reticle::after {
  right: -1px;
  bottom: -1px;
  border-left: 0;
  border-top: 0;
}

.idea-heat__scale {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 8px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(243, 234, 216, 0.55);
  background: #0a0c10;
}

.idea-heat__lut {
  flex: 1;
  height: 8px;
  border-radius: 99px;
  background: linear-gradient(
    90deg,
    #12141c 0%,
    #1a2744 16%,
    #16605c 36%,
    var(--phosphor) 58%,
    var(--solder) 78%,
    var(--hot) 90%,
    #fff6ea 100%
  );
  box-shadow: inset 0 0 0 1px rgba(243, 234, 216, 0.12);
}

.idea-heat__hud {
  display: grid;
  gap: 14px;
  padding: 14px 16px 16px;
  background: #0a0c10;
  border-top: 1px solid rgba(255, 106, 42, 0.16);
}

.idea-heat__hud-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 16px;
}

.idea-heat__kicker,
.idea-heat__peak {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.idea-heat__kicker { color: rgba(243, 234, 216, 0.45); }
.idea-heat__peak { color: var(--solder); }

.idea-heat__chips {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.idea-heat__chip {
  --heat: 0.5;
  display: grid;
  grid-template-columns: 6px minmax(0, 1fr) auto;
  gap: 0 14px;
  align-items: stretch;
  min-height: 44px;
  padding: 0 12px 0 0;
  border: 1px solid rgba(243, 234, 216, 0.12);
  border-radius: 10px;
  background:
    linear-gradient(
      90deg,
      color-mix(in srgb, var(--hot) calc(var(--heat) * 22%), transparent),
      transparent 42%
    ),
    #11151c;
  color: #f3ead8;
}

.idea-heat__chip[data-heat-band="iron"] { box-shadow: inset 0 0 0 1px rgba(255, 59, 26, 0.35); }
.idea-heat__chip[data-heat-band="hot"] { box-shadow: inset 0 0 0 1px rgba(255, 106, 42, 0.28); }
.idea-heat__chip[data-heat-band="warm"] { box-shadow: inset 0 0 0 1px rgba(240, 180, 41, 0.22); }

.idea-heat__chip:focus-within {
  box-shadow: 0 0 0 1px var(--phosphor), inset 0 0 0 1px rgba(240, 180, 41, 0.28);
}

.idea-heat__chip-bar {
  width: 6px;
  border-radius: 10px 0 0 10px;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--hot) calc(var(--heat) * 100%), var(--phosphor)),
    color-mix(in srgb, var(--solder) calc(var(--heat) * 80%), var(--laser))
  );
}

.idea-heat__chip-body {
  min-width: 0;
  padding: 12px 0;
}

.idea-heat__why {
  margin: 0 0 4px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--solder);
}

.idea-heat__name {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin: -8px 0;
  padding: 8px 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #f3ead8;
}

.idea-heat__name:hover { color: var(--phosphor); }

.idea-heat__blurb {
  margin: 4px 0 0;
  font-size: 0.88rem;
  line-height: 1.45;
  color: rgba(243, 234, 216, 0.62);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.idea-heat__meter {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  padding: 10px 0;
}

.idea-heat__temp {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--phosphor);
}

.idea-heat__temp small {
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  color: rgba(243, 234, 216, 0.45);
}

.idea-heat__band {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--solder);
}

.idea-heat__vote {
  min-width: 44px;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 106, 42, 0.45);
  border-radius: 8px;
  background: transparent;
  color: #fff6ea;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
}

.idea-heat__vote:hover,
.idea-heat__vote:focus-visible {
  background: color-mix(in srgb, var(--solder) 22%, transparent);
}

.idea-heat__vote[aria-pressed="true"] {
  background: var(--solder);
  color: #fff6ea;
  border-color: transparent;
}

.idea-heat__sink {
  padding: 16px 16px 20px;
  background:
    linear-gradient(180deg, rgba(255, 59, 26, 0.06), transparent 28%),
    #0c0e12;
  border-top: 1px solid rgba(240, 180, 41, 0.12);
}

.idea-heat__sink-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(243, 234, 216, 0.45);
}

.idea-heat__sink-empty {
  margin: 0;
  padding: 16px 14px;
  border: 1px dashed rgba(240, 180, 41, 0.28);
  border-radius: 8px;
  font-size: 0.92rem;
  line-height: 1.5;
  color: rgba(243, 234, 216, 0.72);
}

.idea-heat__sink-empty strong { color: var(--phosphor); }

.idea-heat__noscript {
  margin: 12px 0 0;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
}

.idea-heat .giscus,
.idea-heat .giscus-frame {
  background: transparent;
}

@media (max-width: 720px) {
  .idea-heat__chip {
    grid-template-columns: 6px minmax(0, 1fr);
    padding-bottom: 10px;
  }
  .idea-heat__meter {
    grid-column: 2;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 10px 14px;
    padding: 0 0 8px;
  }
  .idea-heat__canvas { height: 96px; }
}

@media (prefers-reduced-motion: reduce) {
  .idea-heat__instrument { transform: none; }
}

.project__header { padding-bottom: 60px; margin-bottom: 60px; position: relative; }
.project__header::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--solder), var(--laser));
  border-radius: 2px;
}

.project__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 8px 16px;
  border: var(--border-w) solid var(--border);
  border-radius: 999px;
  background: var(--paper);
  box-shadow: var(--shadow-hard-sm);
  margin-bottom: 40px;
}

.project__back:hover { transform: translate(-2px, -2px); }
.project__status { display: inline-flex; margin-bottom: 24px; margin-left: 16px; }
.project__title { margin-bottom: 44px; }
.project__meta { display: flex; flex-wrap: wrap; gap: 40px; }
.project__meta-item { display: flex; flex-direction: column; gap: 10px; }
.project__meta-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  font-weight: 700;
}
.project__meta-value { font-weight: 600; font-size: 1.05rem; }
.project__chips { display: flex; flex-wrap: wrap; gap: 8px; }

.chip {
  display: inline-block;
  padding: 5px 13px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  border: var(--border-w) solid var(--border);
  border-radius: 999px;
  background: var(--paper);
  transition: all 0.25s var(--snap);
}

.chip--link:hover, .chip--tag:hover {
  background: var(--ink);
  color: var(--base);
  transform: rotate(-2deg) scale(1.05);
}

.project__hero { margin-bottom: 70px; overflow: hidden; }
.project__body { max-width: 780px; margin: 0 auto 100px; }
.project__gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
  margin-bottom: 100px;
}
.project__gallery-item { margin: 0; }
.project__gallery-item img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; cursor: zoom-in; }

.filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: -10px 0 34px;
}

.filter__btn {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 7px 14px;
  border: var(--border-w) solid var(--border);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
}

.filter__btn:hover { transform: translate(-2px, -2px); }
.filter__btn.is-active { background: var(--ink); color: var(--base); }
.card.is-filtered { display: none; }

.card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-bottom: 10px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.grid__empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px;
  color: var(--muted);
  border: var(--border-w) dashed var(--muted2);
  border-radius: var(--r-md);
}

@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .instrument { transform: none; }
  .instrument__scope { height: 220px; }
}

@media (max-width: 900px) {
  .arcade__picker { grid-template-columns: 1fr; }
  .arcade__hud { grid-template-columns: 1fr 1fr; }
  .arcade__stat--title { grid-column: 1 / -1; text-align: left; }
}

.nav__logo-mark { white-space: nowrap; }

@media (max-width: 720px) {
  .nav {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    align-items: center;
    gap: 8px 10px;
    border-radius: 18px;
    padding: 10px 10px 8px 12px;
  }
  .nav__logo { grid-column: 1; grid-row: 1; }
  .lamp-switch { grid-column: 2; grid-row: 1; width: 64px; height: 30px; }
  .nav__links {
    grid-column: 1 / -1;
    grid-row: 2;
    margin-left: 0;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0;
  }
  .nav__link {
    text-align: center;
    font-size: 0.68rem;
    padding: 6px 2px;
  }
  .nav__logo-tag { display: none; }
  .lamp-switch__label { display: none; }
  [data-theme="light"] .lamp-switch__knob { transform: translateX(32px); }
  .arcade__picker { top: 132px; }
}

@media (max-width: 768px) {
  .bento { grid-template-columns: 1fr; }
  .section__more { margin-left: 0; }
  .hero__stat { min-width: 0; flex: 1 1 120px; }
  .section { margin-top: 90px; }
}

@media (max-width: 480px) {
  .hero__cta .btn { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
  html.js [data-reveal] { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
  .instrument { transform: none; }
  .arcade__cabinet { transform: none; }
}

@media print {
  .bg, .atmosphere, .lamp, .copper-trace, .boot, .nav-wrap, .stations, .footer__marquee, .arcade__glass { display: none; }
  .page { padding: 0; }
  .panel, .card { border: 1px solid #ccc; box-shadow: none; background: white; }
}

/* ==========================================================================
   Project blog: reading progress, header extras
   ========================================================================== */
.progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 5px;
  z-index: 1100;
  pointer-events: none;
}

.progress__bar {
  height: 100%;
  transform-origin: 0 50%;
  transform: scaleX(0);
  background: var(--accent);
  border-right: 3px solid var(--ink);
}

.project__badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-bottom: 26px;
}

.project__status { display: inline-flex; align-items: center; gap: 8px; margin: 0; }

.project__status-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--ink);
  animation: pulseDot 1.6s ease-in-out infinite;
}

.project__readtime {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.project__deck {
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  line-height: 1.5;
  color: var(--muted);
  max-width: 720px;
  margin: -20px 0 40px;
}

.chip--tag:hover { background: var(--ink); color: var(--paper); transform: rotate(2deg); }
[data-theme="dark"] .chip--tag:hover { color: var(--base); }

.project__hero { margin-bottom: 70px; overflow: hidden; }
.project__hero-img { width: 100%; display: block; aspect-ratio: 21 / 9; object-fit: cover; cursor: zoom-in; }
.project__hero-img--contain { aspect-ratio: 16 / 9; object-fit: contain; background: var(--ink); }
.project__hero-caption {
  padding: 12px 18px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
  border-top: var(--border-w) solid var(--ink);
}

/* ==========================================================================
   Project blog: two-column layout with the build-log rail
   ========================================================================== */
.project__layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 780px);
  gap: 56px;
  justify-content: center;
  margin-bottom: 90px;
}

.project__main { min-width: 0; }
.project__body { margin: 0 0 70px; max-width: none; }

.project__rail { position: relative; }

.rail {
  position: sticky;
  top: 110px;
  padding: 18px 0 18px 18px;
  border-left: var(--border-w) solid var(--ink);
}

[data-theme="dark"] .rail { border-color: rgba(241, 228, 200, 0.85); }

.rail__title {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin: 0 0 14px;
}

.rail__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }

.rail__link {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 7px 10px 7px 8px;
  border-radius: var(--r-sm);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--muted);
  transition: color 0.2s var(--smooth), background-color 0.2s var(--smooth), transform 0.2s var(--snap);
}

.rail__link::before {
  content: "";
  position: absolute;
  left: calc(-18px - var(--border-w) / 2 - 5px);
  top: 50%;
  width: 11px; height: 11px;
  border-radius: 50%;
  border: var(--border-w) solid var(--ink);
  background: var(--base);
  transform: translateY(-50%) scale(0.75);
  transition: background-color 0.2s var(--smooth), transform 0.25s var(--snap);
}

[data-theme="dark"] .rail__link::before { border-color: rgba(241, 228, 200, 0.85); }

.rail__num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted2);
  min-width: 2ch;
}

.rail__link:hover { color: var(--ink); background: color-mix(in srgb, var(--mustard) 30%, transparent); transform: translateX(3px); }

.rail__item.is-done .rail__link::before { background: var(--ink); }
.rail__item.is-active .rail__link { color: var(--ink); background: var(--paper); box-shadow: var(--shadow-hard-sm); border: 2px solid var(--ink); padding: 5px 8px 5px 6px; }
.rail__item.is-active .rail__link::before { background: var(--orange); transform: translateY(-50%) scale(1.15); }
.rail__item.is-active .rail__num { color: var(--orange); }

.rail__top {
  display: inline-block;
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.rail__top:hover { color: var(--orange); }

/* ==========================================================================
   Project blog: prose extras (numbered headings, anchors, code, notes, media)
   ========================================================================== */
.project__body { counter-reset: section; }

.project__body > h2 {
  counter-increment: section;
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 14px;
  border-bottom: 0;
  padding-bottom: 0;
  scroll-margin-top: 110px;
}

.project__body > h2::before {
  content: counter(section, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--paper);
  background: var(--ink);
  padding: 4px 8px;
  border-radius: 6px;
  transform: rotate(-3deg);
  flex-shrink: 0;
}

[data-theme="dark"] .project__body > h2::before { color: var(--base); }

.prose h2 .anchor,
.prose h3 .anchor {
  margin-left: 6px;
  font-weight: 700;
  color: var(--muted2);
  text-decoration: none;
  opacity: 0;
  transition: opacity 0.2s var(--smooth), color 0.2s var(--smooth);
}
.prose h2:hover .anchor, .prose h3:hover .anchor, .prose .anchor:focus-visible { opacity: 1; }
.prose .anchor:hover { color: var(--orange); }

.prose h3 {
  font-size: 1.3rem;
  margin: 1.8em 0 0.5em;
  scroll-margin-top: 110px;
}

.prose h3::before { content: "→ "; color: var(--orange); }

.prose ol { padding-left: 1.5em; margin: 0 0 1.4em; }
.prose ol li::marker { color: var(--orange); font-weight: 700; font-family: var(--font-mono); }

.prose hr {
  border: 0;
  height: 4px;
  margin: 3em 0;
  background: repeating-linear-gradient(90deg, var(--ink) 0 14px, transparent 14px 26px);
  opacity: 0.35;
}

.prose kbd {
  font-family: var(--font-mono);
  font-size: 0.8em;
  padding: 2px 7px;
  border: 2px solid var(--ink);
  border-bottom-width: 4px;
  border-radius: 6px;
  background: var(--paper);
}

/* Sticky-note blockquotes */
.prose blockquote {
  position: relative;
  margin: 2.2em 0;
  padding: 22px 26px 22px 30px;
  background: color-mix(in srgb, var(--mustard) 55%, var(--paper));
  color: #2a1b12;
  border: var(--border-w) solid var(--ink);
  border-radius: 4px;
  box-shadow: var(--shadow-hard);
  transform: rotate(-0.6deg);
  font-size: 1.02rem;
}

.prose blockquote::before {
  content: "";
  position: absolute;
  top: -14px;
  left: 50%;
  width: 90px; height: 24px;
  transform: translateX(-50%) rotate(-2deg);
  background: color-mix(in srgb, var(--orange) 45%, transparent);
  border: 1px dashed rgba(42, 27, 18, 0.35);
}

.prose blockquote p { margin: 0; }
.prose blockquote p + p { margin-top: 0.8em; }
.prose blockquote code { border-color: rgba(42, 27, 18, 0.35); }
.prose blockquote a { color: #8a4a12; }

/* Tables */
.prose table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 2em 0;
  border: var(--border-w) solid var(--ink);
  border-radius: var(--r-sm);
  box-shadow: var(--shadow-hard-sm);
  background: var(--paper);
  font-size: 0.96rem;
  overflow: hidden;
}

.prose th, .prose td { padding: 12px 16px; text-align: left; vertical-align: top; }
.prose th {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: var(--ink);
  color: var(--paper);
}
[data-theme="dark"] .prose th { color: var(--base); }
.prose tr:nth-child(even) td { background: color-mix(in srgb, var(--ink) 4%, transparent); }
.prose td + td, .prose th + th { border-left: 2px solid color-mix(in srgb, var(--ink) 15%, transparent); }
.prose tr + tr td { border-top: 2px solid color-mix(in srgb, var(--ink) 15%, transparent); }

/* Figures made from markdown images */
.prose__figure {
  margin: 2.2em 0;
  overflow: hidden;
}
.prose__figure img { display: block; max-width: 100%; height: auto; margin: 0 auto; cursor: zoom-in; }
.prose__figure video { display: block; width: 100%; height: auto; background: var(--ink); }
.prose__figure--portrait img, .prose__figure--portrait video { max-height: 80vh; width: auto; }
.prose__figure figcaption {
  padding: 12px 18px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
  border-top: var(--border-w) solid var(--ink);
}

/* Code blocks */
.codeblock {
  position: relative;
  margin: 2em 0;
  border: var(--border-w) solid var(--ink);
  border-radius: var(--r-sm);
  box-shadow: var(--shadow-hard);
  background: #2a1b12;
  color: #f1e4c8;
  overflow: hidden;
}

[data-theme="dark"] .codeblock { background: #140d09; border-color: rgba(241, 228, 200, 0.85); }

.codeblock__chrome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px 8px 14px;
  background: rgba(241, 228, 200, 0.08);
  border-bottom: 2px solid rgba(241, 228, 200, 0.15);
}

.codeblock__lang {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--mustard);
  color: #2a1b12;
  transform: rotate(-2deg);
}

.codeblock__copy {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 5px 12px;
  border: 2px solid #f1e4c8;
  border-radius: 999px;
  background: transparent;
  color: #f1e4c8;
  cursor: pointer;
  transition: transform 0.2s var(--snap), background-color 0.2s var(--smooth), color 0.2s var(--smooth);
}
.codeblock__copy:hover { background: var(--mustard); color: #2a1b12; border-color: var(--mustard); transform: rotate(-2deg) scale(1.05); }
.codeblock__copy:active { transform: scale(0.96); }

.codeblock pre {
  margin: 0;
  padding: 18px 20px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.6;
  tab-size: 2;
}

.codeblock pre code { background: none; border: 0; padding: 0; font-size: inherit; }

/* Rouge token colours: cream, orange for keywords, mustard for literals */
.highlight .c, .highlight .c1, .highlight .cm, .highlight .cp { color: rgba(241, 228, 200, 0.5); font-style: italic; }
.highlight .k, .highlight .kd, .highlight .kn, .highlight .kr, .highlight .kt, .highlight .kp, .highlight .nt { color: #f0762d; font-weight: 700; }
.highlight .s, .highlight .s1, .highlight .s2, .highlight .sb, .highlight .sr, .highlight .se,
.highlight .m, .highlight .mi, .highlight .mf, .highlight .mh, .highlight .il { color: #e6b23a; }
.highlight .nf, .highlight .fm, .highlight .nc, .highlight .nn { color: #f1e4c8; font-weight: 700; }
.highlight .na, .highlight .nv, .highlight .vi, .highlight .bp, .highlight .nx { color: rgba(241, 228, 200, 0.9); }
.highlight .o, .highlight .p, .highlight .ow { color: rgba(241, 228, 200, 0.7); }
.highlight .gi { color: #e6b23a; } .highlight .gd { color: #f0762d; }
.highlight .err { background: none; color: #f0762d; }

/* ==========================================================================
   Project blog: spec sheet, parts list, build-log timeline
   ========================================================================== */
.specsheet {
  position: relative;
  overflow: visible;
  padding: 34px 28px 24px;
  margin: 0 0 56px;
  background:
    radial-gradient(circle at 90% 10%, color-mix(in srgb, var(--mustard) 18%, transparent), transparent 45%),
    var(--paper);
}

.specsheet__badge { position: absolute; top: -16px; left: 22px; }

.specsheet__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 18px 28px;
  margin: 0;
}

.specsheet__row { display: flex; flex-direction: column; gap: 4px; }
.specsheet__row dt {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}
.specsheet__row dd { margin: 0; font-weight: 700; font-size: 1.05rem; line-height: 1.35; }

.bom { margin: 0 0 70px; }

.bom__title, .timeline__title {
  font-family: var(--font-display);
  font-size: 1.9rem;
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 0 0 24px;
}

.bom__num {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--mustard);
  color: #2a1b12;
  transform: rotate(-3deg);
}

.bom__list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: var(--border-w) solid var(--ink);
  border-radius: var(--r-md);
  background: var(--paper);
  box-shadow: var(--shadow-hard);
  overflow: hidden;
}

.bom__item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 20px;
}

.bom__item + .bom__item { border-top: 2px dashed color-mix(in srgb, var(--ink) 25%, transparent); }

.bom__check {
  flex-shrink: 0;
  width: 20px; height: 20px;
  margin-top: 2px;
  border: var(--border-w) solid var(--ink);
  border-radius: 5px;
  background: var(--base);
  position: relative;
}
.bom__check::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 2px;
  background: var(--orange);
  opacity: 0;
  transition: opacity 0.2s var(--smooth);
}
.bom__item:hover .bom__check::after { opacity: 1; }

.bom__body { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.bom__name { font-weight: 700; }
a.bom__name { text-decoration: underline wavy var(--orange) 2px; text-underline-offset: 4px; }
a.bom__name:hover { color: var(--orange); }
.bom__note { color: var(--muted); font-size: 0.95rem; }
.bom__qty {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 9px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--mustard);
  color: #2a1b12;
}

.timeline { margin: 0 0 70px; }

.timeline__list {
  list-style: none;
  margin: 0;
  padding: 0 0 0 26px;
  border-left: var(--border-w) solid var(--ink);
  display: flex;
  flex-direction: column;
  gap: 26px;
}

[data-theme="dark"] .timeline__list { border-color: rgba(241, 228, 200, 0.85); }

.timeline__item { position: relative; }

.timeline__item::before {
  content: "";
  position: absolute;
  left: calc(-26px - var(--border-w) / 2 - 7px);
  top: 6px;
  width: 15px; height: 15px;
  border-radius: 50%;
  border: var(--border-w) solid var(--ink);
  background: var(--mustard);
}
.timeline__item:first-child::before { background: var(--orange); }

.timeline__date {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 6px;
}

.timeline__heading { display: block; font-size: 1.1rem; margin-bottom: 4px; }
.timeline__note { margin: 0; color: var(--muted); }
.timeline__note a { color: var(--ink); font-weight: 600; text-decoration: underline wavy var(--orange) 2px; }

/* ==========================================================================
   Project blog: newer / older navigation, comments, lightbox
   ========================================================================== */
.project__nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: 1056px;
  margin: 0 auto 80px;
}

.navcard {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 22px 26px;
  border: var(--border-w) solid var(--ink);
  border-radius: var(--r-md);
  background: var(--paper);
  box-shadow: var(--shadow-hard);
  transition: transform 0.25s var(--snap), box-shadow 0.25s var(--snap);
}

[data-theme="dark"] .navcard { border-color: rgba(241, 228, 200, 0.85); }

.navcard--older { text-align: right; align-items: flex-end; }
.navcard--empty { opacity: 0.6; box-shadow: none; border-style: dashed; }

a.navcard:hover { transform: translate(-4px, -4px); box-shadow: var(--shadow-hard-lg); }
a.navcard--newer:hover { background: color-mix(in srgb, var(--mustard) 24%, var(--paper)); }
a.navcard--older:hover { background: color-mix(in srgb, var(--orange) 18%, var(--paper)); }

.navcard__label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.navcard__title { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; line-height: 1.2; }

.project__comments { max-width: 1056px; margin: 0 auto 60px; }
.project__comments-title { font-size: 1.6rem; margin: 0 0 8px; }
.project__comments-sub { color: var(--muted); margin: 0 0 24px; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: rgba(42, 27, 18, 0.88);
  cursor: zoom-out;
  animation: fadeIn 0.2s var(--smooth);
}

.lightbox[hidden] { display: none; }

.lightbox__figure { margin: 0; max-width: min(1200px, 100%); max-height: 100%; display: flex; flex-direction: column; }
.lightbox__img {
  max-width: 100%;
  max-height: calc(100vh - 140px);
  object-fit: contain;
  border: var(--border-w) solid #f1e4c8;
  border-radius: var(--r-sm);
  box-shadow: 10px 10px 0 var(--orange);
  cursor: default;
}
.lightbox__caption {
  margin-top: 22px;
  text-align: center;
  color: #f1e4c8;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.lightbox__close {
  position: absolute;
  top: 22px; right: 22px;
  width: 46px; height: 46px;
  border: var(--border-w) solid #f1e4c8;
  border-radius: 50%;
  background: var(--orange);
  color: #fbf3e1;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s var(--snap);
}
.lightbox__close:hover { transform: rotate(90deg) scale(1.08); }

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

/* ==========================================================================
   Homepage: tag filter + card meta
   ========================================================================== */
.filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: -10px 0 34px;
}

.filter__btn {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 7px 14px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  transition: transform 0.2s var(--snap), background-color 0.2s var(--smooth), color 0.2s var(--smooth), box-shadow 0.2s var(--snap);
}

[data-theme="dark"] .filter__btn { border-color: rgba(241, 228, 200, 0.85); }

.filter__btn:hover { transform: translate(-2px, -2px) rotate(-1deg); box-shadow: var(--shadow-hard-sm); }
.filter__btn.is-active { background: var(--ink); color: var(--paper); box-shadow: var(--shadow-hard-sm); }
[data-theme="dark"] .filter__btn.is-active { color: var(--base); }

.card.is-filtered { display: none; }

.card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-bottom: 10px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.grid__empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px;
  color: var(--muted);
  border: var(--border-w) dashed var(--muted2);
  border-radius: var(--r-md);
}

/* ==========================================================================
   Project blog: responsive
   ========================================================================== */
@media (max-width: 1024px) {
  .project__layout { grid-template-columns: minmax(0, 780px); }
  .project__rail { display: none; }
}

@media (max-width: 640px) {
  .project__nav { grid-template-columns: 1fr; }
  .navcard--older { text-align: left; align-items: flex-start; }
  .prose blockquote { transform: none; padding: 20px 18px; }
  .specsheet { padding: 30px 20px 20px; }
  .lightbox { padding: 16px; }
  .lightbox__img { max-height: calc(100vh - 120px); }
  .project__body > h2 { flex-wrap: wrap; gap: 10px; }
}

@media print {
  .progress, .project__rail, .project__comments, .codeblock__copy, .lightbox { display: none !important; }
  .codeblock, .prose blockquote { box-shadow: none; transform: none; }
}

