/* AntJanus — Night Drive / Mall Day
   Dark = synthwave night drive. Light = vaporwave pastel mall afternoon.
   One token set, two modes. */

:root {
  /* primitives: night */
  --night-900: #0b0320;
  --night-850: #12052b;
  --night-800: #1b0a40;
  --night-700: #26105a;
  --night-600: #4b2a8a;
  --lilac-100: #f5ecff;
  --lilac-300: #cdbcf2;
  --neon-pink: #ff3ea5;
  --neon-cyan: #2ee6ff;
  --neon-sun: #ffd23f;
  --neon-orange: #ff8a3d;
  --neon-violet: #b99bff;

  /* semantic: night (default) */
  --bg: var(--night-900);
  --bg-alt: var(--night-850);
  --surface: var(--night-800);
  --surface-2: var(--night-700);
  --line: var(--night-600);
  --text: var(--lilac-100);
  --muted: var(--lilac-300);
  --heading: #ffffff;
  --accent: var(--neon-pink);
  --accent-2: var(--neon-cyan);
  --accent-3: var(--neon-sun);
  --accent-4: var(--neon-orange);
  --accent-5: var(--neon-violet);
  --link: var(--neon-cyan);
  --on-accent: #1a0230;
  --focus: var(--neon-sun);

  --sky-top: #0b0320;
  --sky-mid: #33095f;
  --sky-low: #a3176d;
  --horizon: #ff6b9a;
  --floor: #12022b;
  --grid-line: rgba(255, 62, 165, 0.85);
  --sun-top: #ffe45c;
  --sun-bottom: #ff4fa8;
  --ridge-fill: #1a0535;
  --ridge-stroke: #2ee6ff;

  --panel: rgba(18, 5, 43, 0.86);
  --code-bg: #0a0118;
  --code-text: #f0e6ff;
  --tint-a: #ff3ea5;
  --tint-b: #2ee6ff;
  --tint-opacity: 0.28;

  --chrome: linear-gradient(180deg, #ffffff 0%, #d9f4ff 38%, #7fb7ff 49%, #2b0f55 50%, #ff7ad9 62%, #ffe8f7 100%);
  --glow-pink: 0 0 0.35em rgba(255, 62, 165, 0.75), 0 0 1.2em rgba(255, 62, 165, 0.35);
  --glow-cyan: 0 0 0.35em rgba(46, 230, 255, 0.7), 0 0 1.2em rgba(46, 230, 255, 0.3);
  --shadow-neon: 0 0 0 1px rgba(255, 62, 165, 0.5), 0 0 24px rgba(255, 62, 165, 0.25);
  --scanline: rgba(0, 0, 0, 0.28);

  --font-display: "Orbitron", "Arial Black", sans-serif;
  --font-script: "Mr Dafoe", "Brush Script MT", cursive;
  --font-body: "Space Grotesk", system-ui, sans-serif;
  --font-vcr: "VT323", "Courier New", monospace;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  --radius: 6px;
  --max: 1240px;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #fbeefe;
  --bg-alt: #f3e4ff;
  --surface: #ffffff;
  --surface-2: #f6ecff;
  --line: #d6b9f2;
  --text: #26073f;
  --muted: #56367a;
  --heading: #1c0433;
  --accent: #b0126b;
  --accent-2: #006b78;
  --accent-3: #7a5000;
  --accent-4: #a33c07;
  --accent-5: #5b2ca8;
  --link: #8a0f57;
  --on-accent: #ffffff;
  --focus: #5b2ca8;

  --sky-top: #b8f1ff;
  --sky-mid: #e3c9ff;
  --sky-low: #ffb3dc;
  --horizon: #ffd1e8;
  --floor: #ffe3f5;
  --grid-line: rgba(123, 77, 230, 0.7);
  --sun-top: #ffd36e;
  --sun-bottom: #ff7ac6;
  --ridge-fill: #f0d6ff;
  --ridge-stroke: #9a5cff;

  --panel: rgba(255, 255, 255, 0.9);
  --code-bg: #1d0b3a;
  --code-text: #f5ecff;
  --tint-a: #ff9ce5;
  --tint-b: #9ef0ff;
  --tint-opacity: 0.22;

  --chrome: linear-gradient(180deg, #5b2ca8 0%, #8a1d9e 48%, #b0126b 52%, #d0336f 100%);
  --glow-pink: none;
  --glow-cyan: none;
  --shadow-neon: 0 0 0 1px #d6b9f2, 0 10px 30px rgba(155, 90, 220, 0.18);
  --scanline: rgba(40, 0, 80, 0.06);
  color-scheme: light;
}

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5.5rem; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--link); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3, h4 { color: var(--heading); line-height: 1.15; margin: 0 0 0.5em; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--accent-3); color: #1a0230; padding: 0.6rem 1rem; font-weight: 700;
}
.skip:focus { top: 1rem; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* whole-page CRT scanline veil (decorative, very light) */
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 90;
  background: repeating-linear-gradient(180deg, transparent 0 2px, var(--scanline) 2px 3px);
  opacity: 0.35;
}

/* ---------- type helpers ---------- */
.chrome {
  font-family: var(--font-display);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  background: var(--chrome);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 0 rgba(255, 62, 165, 0.55)) drop-shadow(0 0 18px rgba(255, 62, 165, 0.25));
}
:root[data-theme="light"] .chrome { filter: drop-shadow(0 2px 0 rgba(255, 180, 230, 0.9)); }
.script {
  font-family: var(--font-script);
  font-weight: 400;
  color: var(--accent);
  text-shadow: var(--glow-pink);
  text-transform: none;
  letter-spacing: 0;
}
.vcr { font-family: var(--font-vcr); font-size: 1.4rem; line-height: 1.2; letter-spacing: 0.04em; }
.eyebrow {
  font-family: var(--font-vcr); font-size: 1.4rem; line-height: 1.2; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--accent-2); margin: 0 0 0.6rem;
  text-shadow: var(--glow-cyan);
}
.eyebrow::before { content: "\25B6\FE0E  "; color: var(--accent); }
.lede { font-size: 1.25rem; line-height: 1.55; color: var(--text); max-width: 60ch; }
.muted { color: var(--muted); }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  border-image: linear-gradient(90deg, var(--accent-2), var(--accent), var(--accent-3)) 1;
}
.topbar .wrap { display: flex; align-items: center; gap: 1rem; min-height: 4.25rem; }
.logo { display: flex; align-items: center; gap: 0.65rem; text-decoration: none; color: var(--heading); margin-right: auto; min-height: 44px; }
.logo svg { width: 42px; height: 42px; flex: none; }
.logo-words { display: flex; flex-direction: column; line-height: 1; }
.logo-words .script { font-size: 1.35rem; margin-bottom: 0.1rem; margin-left: 0.6rem; transform: rotate(-6deg); }
.logo-words .chrome { font-size: 1.05rem; letter-spacing: 0.12em; }

.nav { display: flex; align-items: center; gap: 0.25rem; }
.nav ul { list-style: none; display: flex; gap: 0.15rem; margin: 0; padding: 0; }
.nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 0.8rem;
  font-family: var(--font-display); font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text); text-decoration: none; border-bottom: 2px solid transparent;
  transition: color 150ms, border-color 150ms, text-shadow 150ms;
}
.nav a:hover { color: var(--accent-2); text-shadow: var(--glow-cyan); }
.nav a[aria-current="page"] { color: var(--accent); border-bottom-color: var(--accent); text-shadow: var(--glow-pink); }
.nav a.nav-ai {
  border: 1px solid var(--accent); border-radius: 999px; min-height: 36px; margin: 4px 0.3rem;
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 22%, transparent), color-mix(in srgb, var(--accent-2) 22%, transparent));
}
.nav a.nav-ai[aria-current="page"] { background: var(--accent); color: var(--on-accent); text-shadow: none; }

.theme-toggle, .menu-btn {
  display: inline-flex; align-items: center; gap: 0.45rem; min-height: 44px; min-width: 44px; padding: 0 0.8rem;
  background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 999px;
  font-family: var(--font-vcr); font-size: 1.25rem; letter-spacing: 0.06em; cursor: pointer;
  transition: border-color 150ms, color 150ms;
}
.theme-toggle:hover, .menu-btn:hover { border-color: var(--accent); color: var(--accent); }
.theme-toggle .dot { width: 0.75rem; height: 0.75rem; border-radius: 50%; background: linear-gradient(var(--sun-top), var(--sun-bottom)); box-shadow: 0 0 8px var(--sun-bottom); }
.menu-btn { display: none; }

@media (max-width: 940px) {
  .menu-btn { display: inline-flex; }
  .nav { position: absolute; top: 100%; left: 0; right: 0; display: none; flex-direction: column; align-items: stretch;
    background: var(--bg); border-bottom: 2px solid var(--accent); padding: 0.5rem var(--gutter) 1rem; }
  .nav.is-open { display: flex; }
  .nav ul { flex-direction: column; }
  .nav a { width: 100%; font-size: 0.95rem; border-bottom: 1px solid var(--line); }
  .nav a.nav-ai { justify-content: center; margin: 0.6rem 0 0; }
  .nav .theme-toggle { margin-top: 0.6rem; justify-content: center; }
  .logo-words .chrome { font-size: 0.95rem; }
}

/* ---------- reading progress ---------- */
.progress { position: fixed; top: 0; left: 0; height: 4px; width: 100%; z-index: 60; transform-origin: 0 50%; transform: scaleX(0);
  background: linear-gradient(90deg, var(--accent-2), var(--accent), var(--accent-3)); box-shadow: 0 0 10px var(--accent); }

/* ---------- horizon scene ---------- */
.horizon {
  position: relative; isolation: isolate; overflow: hidden;
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 45%, var(--sky-low) 72%, var(--horizon) 76%);
}
.horizon::before { /* optional painted backdrop; CSS scene stands alone without it */
  content: ""; position: absolute; inset: 0; z-index: -3; opacity: 0.55; mix-blend-mode: screen;
  background: url("assets/synth-horizon.webp") center bottom / cover no-repeat;
}
.stars { position: absolute; inset: 0 0 40% 0; z-index: -3; opacity: 0.8;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 18%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 28% 8%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 44% 26%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 63% 12%, #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 79% 22%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 91% 6%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 6% 40%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 54% 44%, #fff 50%, transparent 51%);
}
:root[data-theme="light"] .stars { opacity: 0; }
.sun {
  position: absolute; z-index: -2; left: 50%; bottom: 30%;
  width: min(44vw, 440px); aspect-ratio: 1; border-radius: 50%; translate: -50% 30%;
  background: linear-gradient(180deg, var(--sun-top) 10%, var(--sun-bottom) 85%);
  box-shadow: 0 0 60px color-mix(in srgb, var(--sun-bottom) 60%, transparent), 0 0 140px color-mix(in srgb, var(--sun-bottom) 35%, transparent);
  -webkit-mask-image: linear-gradient(180deg, #000 0 52%, transparent 52% 55%, #000 55% 63%, transparent 63% 67%, #000 67% 74%, transparent 74% 79%, #000 79% 85%, transparent 85% 91%, #000 91%);
  mask-image: linear-gradient(180deg, #000 0 52%, transparent 52% 55%, #000 55% 63%, transparent 63% 67%, #000 67% 74%, transparent 74% 79%, #000 79% 85%, transparent 85% 91%, #000 91%);
}
.ridge { position: absolute; z-index: -1; left: 0; right: 0; bottom: 30%; height: 16%; width: 100%; }
.ridge polygon { fill: var(--ridge-fill); stroke: var(--ridge-stroke); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.ridge polyline { fill: none; stroke: var(--ridge-stroke); stroke-width: 1; opacity: 0.55; vector-effect: non-scaling-stroke; }
.floor { position: absolute; z-index: -1; left: 0; right: 0; bottom: 0; height: 30%; overflow: hidden; perspective: 260px; perspective-origin: 50% 0%; background: var(--floor);
  border-top: 2px solid var(--horizon); box-shadow: 0 -6px 30px var(--horizon); }
.floor::before {
  content: ""; position: absolute; left: -150%; right: -150%; bottom: 0; height: 400%;
  transform: rotateX(72deg); transform-origin: 50% 100%;
  background-image: linear-gradient(var(--grid-line) 2px, transparent 2px), linear-gradient(90deg, var(--grid-line) 2px, transparent 2px);
  background-size: 56px 56px;
  animation: drive 1.1s linear infinite;
}
.floor::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, var(--floor) 0%, transparent 35%); }
@keyframes drive { to { background-position: 0 56px; } }

/* inner-page band variant */
.horizon--band { padding: 3.5rem 0 11rem; }
.horizon--band .sun { left: 80%; width: min(34vw, 300px); bottom: 34%; }
.horizon--band .ridge { bottom: 34%; height: 18%; }
.horizon--band .floor { height: 34%; }
.band-head { position: relative; max-width: 46rem; }
.band-head h1 { font-size: clamp(2.2rem, 5.2vw, 4.25rem); margin-bottom: 0.3em; }
.band-head .lede { color: var(--heading); text-shadow: 0 1px 12px var(--sky-top); }
@media (max-width: 700px) {
  .horizon--band { padding: 2.5rem 0 9rem; }
  .horizon--band .sun { left: 82%; width: 42vw; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 48px; padding: 0 1.4rem;
  font-family: var(--font-display); font-weight: 700; font-size: 0.875rem; letter-spacing: 0.12em; text-transform: uppercase;
  text-decoration: none; border-radius: var(--radius); cursor: pointer; border: 2px solid var(--accent);
  background: var(--accent); color: var(--on-accent); box-shadow: 0 0 18px color-mix(in srgb, var(--accent) 55%, transparent);
  transition: transform 150ms, box-shadow 150ms, background 150ms;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 0 30px color-mix(in srgb, var(--accent) 75%, transparent); }
.btn:active { transform: translateY(1px); }
.btn--ghost { background: transparent; color: var(--accent-2); border-color: var(--accent-2); box-shadow: inset 0 0 12px color-mix(in srgb, var(--accent-2) 25%, transparent); }
.btn--ghost:hover { box-shadow: 0 0 20px color-mix(in srgb, var(--accent-2) 45%, transparent); }
.btn--link { background: none; border: 0; box-shadow: none; color: var(--muted); padding: 0 0.4rem; text-decoration: underline; text-underline-offset: 0.3em; }
.btn--link:hover { color: var(--accent); box-shadow: none; }
.btn.is-success { background: var(--accent-2); border-color: var(--accent-2); }

/* ---------- sections ---------- */
.section { padding: clamp(3.5rem, 7vw, 6rem) 0; }
.section--alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { display: grid; grid-template-columns: auto 1fr auto; align-items: end; gap: 0.5rem 1.25rem; margin-bottom: 2.25rem; }
.track-no {
  font-family: var(--font-display); font-weight: 900; font-size: clamp(2.6rem, 6vw, 4.5rem); line-height: 0.85;
  color: transparent; -webkit-text-stroke: 1.5px var(--accent); text-shadow: var(--glow-pink);
}
.section-head h2 { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; font-size: clamp(1.4rem, 2.8vw, 2.1rem); margin: 0; }
.section-head p { margin: 0.25rem 0 0; color: var(--muted); }
.section-head .more { font-family: var(--font-vcr); font-size: 1.35rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-2); white-space: nowrap; min-height: 44px; display: inline-flex; align-items: center; }
@media (max-width: 640px) {
  .section-head { grid-template-columns: auto 1fr; }
  .section-head .more { grid-column: 1 / -1; }
}

.grid { display: grid; gap: 1.5rem; }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 460px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }

/* ---------- tinted media (unifies mismatched art) ---------- */
.tint { position: relative; overflow: hidden; background: var(--surface-2); }
.tint img { width: 100%; height: 100%; object-fit: cover; transition: transform 400ms; }
.tint::after { content: ""; position: absolute; inset: 0; pointer-events: none; mix-blend-mode: color;
  background: linear-gradient(135deg, var(--tint-a), var(--tint-b)); opacity: var(--tint-opacity); transition: opacity 250ms; }
.tint::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: repeating-linear-gradient(180deg, transparent 0 2px, rgba(0,0,0,0.18) 2px 3px); }

/* ---------- post card ---------- */
.card {
  position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: transform 200ms, box-shadow 200ms, border-color 200ms;
}
.card:hover, .card:focus-within { transform: translateY(-4px); border-color: var(--accent); box-shadow: var(--shadow-neon); }
.card:hover .tint::after { opacity: 0; }
.card:hover .tint img { transform: scale(1.04); }
.card .tint { aspect-ratio: 16 / 9; }
.card-body { display: flex; flex-direction: column; gap: 0.5rem; padding: 1.25rem 1.35rem 1.4rem; flex: 1; }
.card h3 { font-size: 1.25rem; line-height: 1.3; margin: 0; font-weight: 700; }
.card h3 a { color: var(--heading); text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; }
.card p { margin: 0; color: var(--muted); }
.meta { font-family: var(--font-vcr); font-size: 1.3rem; line-height: 1.1; letter-spacing: 0.05em; color: var(--accent-2); text-transform: uppercase; }
.meta .sep { color: var(--accent); padding: 0 0.3em; }
.card .no-img { aspect-ratio: 16/9; display: grid; place-items: center; }

/* ---------- tracklist rows ---------- */
.tracklist { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); counter-reset: track; }
.tracklist li { counter-increment: track; border-bottom: 1px solid var(--line); }
.track {
  position: relative; display: grid; grid-template-columns: 3.5rem 1fr auto; gap: 0.25rem 1.25rem; align-items: baseline;
  padding: 1.15rem 0.75rem; transition: background 150ms;
}
.track::before { content: counter(track, decimal-leading-zero); font-family: var(--font-vcr); font-size: 1.8rem; color: var(--accent); text-shadow: var(--glow-pink); }
.track:hover, .track:focus-within { background: color-mix(in srgb, var(--accent) 9%, transparent); }
.track h3 { font-size: 1.2rem; margin: 0; }
.track h3 a { color: var(--heading); text-decoration: none; }
.track h3 a::after { content: ""; position: absolute; inset: 0; }
.track h3 a:hover { color: var(--accent); }
.track p { grid-column: 2 / 3; margin: 0.2rem 0 0; color: var(--muted); }
.track .meta { text-align: right; white-space: nowrap; }
.track .coll { display: block; color: var(--accent-5); }
@media (max-width: 640px) {
  .track { grid-template-columns: 2.5rem 1fr; }
  .track .meta { grid-column: 2; text-align: left; order: -1; }
  .track p { grid-column: 2; }
}

/* ---------- CRT monitor frame ---------- */
.crt {
  position: relative; padding: 14px 14px 38px; border-radius: 22px;
  background: linear-gradient(160deg, #3a2a52, #1a1026 60%, #120a1c); box-shadow: 0 30px 60px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.15);
}
:root[data-theme="light"] .crt { background: linear-gradient(160deg, #f6f0ea, #e0d6cc 60%, #cfc2b6); box-shadow: 0 24px 50px rgba(120, 60, 160, 0.25), inset 0 1px 0 #fff; }
.crt-screen { position: relative; overflow: hidden; border-radius: 14px / 18px; background: #06010f; aspect-ratio: 4 / 3; }
.crt-screen img { width: 100%; height: 100%; object-fit: cover; filter: saturate(1.15) contrast(1.05); }
.crt-screen::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    repeating-linear-gradient(180deg, transparent 0 2px, rgba(0,0,0,0.3) 2px 4px),
    radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,0.55) 100%);
  box-shadow: inset 0 0 40px rgba(0,0,0,0.6); }
.crt-screen .osd { position: absolute; z-index: 2; top: 0.7rem; left: 0.9rem; right: 0.9rem; display: flex; justify-content: space-between;
  font-family: var(--font-vcr); font-size: 1.4rem; color: #fff; text-shadow: 2px 0 0 rgba(255,0,120,0.7), -2px 0 0 rgba(0,220,255,0.7); pointer-events: none; }
.crt-brand { position: absolute; bottom: 9px; left: 20px; font-family: var(--font-vcr); font-size: 1.25rem; color: #cdbcf2; letter-spacing: 0.2em; }
:root[data-theme="light"] .crt-brand { color: #5a4a66; }
.crt-knobs { position: absolute; bottom: 12px; right: 20px; display: flex; gap: 8px; }
.crt-knobs i { width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #888, #222); }
.crt-knobs i:first-child { background: radial-gradient(circle, #ff3ea5, #7a0040); box-shadow: 0 0 8px #ff3ea5; width: 8px; height: 8px; margin-top: 3px; }

/* ---------- home hero ---------- */
.hero { display: flex; align-items: flex-start; padding: clamp(2rem, 5vw, 4rem) 0 250px; }
.hero .sun { width: min(46vw, 500px); left: 57%; bottom: 210px; }
.hero .ridge { bottom: 210px; height: 110px; }
.hero .floor { height: 210px; }
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.hero-panel { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: clamp(1.4rem, 3.5vw, 2.6rem);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent), 0 30px 80px rgba(0,0,0,0.35); backdrop-filter: blur(6px); }
.hero h1 { font-size: clamp(2rem, 4.3vw, 3.6rem); line-height: 1.08; margin-bottom: 0.4em; }
.hero h1 .script { display: block; font-size: 0.95em; text-transform: none; margin: 0.1em 0 -0.1em 0.4em; transform: rotate(-4deg); transform-origin: left; }
.hero .lede { margin-bottom: 1.5rem; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1rem; }
.hero-crt { transform: rotate(2deg); }
.hero-crt .crt-screen img { object-position: 20% 30%; }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-crt { max-width: 420px; margin: 0 auto; transform: rotate(0); order: -1; }
  .hero { padding-bottom: 200px; }
  .hero .floor { height: 170px; } .hero .ridge, .hero .sun { bottom: 170px; } .hero .sun { left: 50%; width: 80vw; }
}

/* ---------- LCD stats ---------- */
.lcd { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 0 0 1.6rem; }
.lcd div { background: var(--bg); padding: 0.8rem 0.9rem; }
.lcd b { display: block; font-family: var(--font-vcr); font-weight: 400; font-size: 2.4rem; line-height: 1; color: var(--accent-3); text-shadow: 0 0 10px color-mix(in srgb, var(--accent-3) 60%, transparent); }
.lcd span { display: block; font-size: 0.875rem; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; margin-top: 0.25rem; }
@media (max-width: 420px) { .lcd b { font-size: 2rem; } .lcd div { padding: 0.7rem 0.6rem; } }

/* ---------- cassette / tape cards (featured + stories) ---------- */
.tape {
  position: relative; display: flex; flex-direction: column; border-radius: 12px; padding: 14px;
  background: linear-gradient(180deg, #2b1b47, #150b26); border: 1px solid #4b3a6a; color: #f5ecff;
  box-shadow: 0 18px 40px rgba(0,0,0,0.35); transition: transform 200ms, box-shadow 200ms;
}
:root[data-theme="light"] .tape { background: linear-gradient(180deg, #ffffff, #f2e6ff); border-color: #d6b9f2; color: #26073f; box-shadow: 0 14px 30px rgba(150, 90, 220, 0.18); }
.tape:hover, .tape:focus-within { transform: translateY(-4px) rotate(-0.6deg); box-shadow: var(--shadow-neon); }
.tape-label { position: relative; border-radius: 6px; overflow: hidden; background: linear-gradient(180deg, var(--sun-top), var(--sun-bottom) 60%, var(--accent-5)); padding: 3px; }
.tape-label .tint { aspect-ratio: 16 / 8; border-radius: 4px; }
.tape-side { position: absolute; top: 8px; left: 8px; z-index: 3; font-family: var(--font-vcr); font-size: 1.25rem; background: #0b0320; color: var(--neon-sun); padding: 0 0.45rem; border-radius: 3px; }
.tape-reels { display: flex; justify-content: space-between; align-items: center; margin: 12px 18% 10px; height: 34px; border-radius: 17px; background: rgba(0,0,0,0.35); padding: 0 6px; }
:root[data-theme="light"] .tape-reels { background: rgba(80, 30, 120, 0.12); }
.tape-reels i { width: 26px; height: 26px; border-radius: 50%; border: 5px dotted currentColor; opacity: 0.8; animation: spin 6s linear infinite paused; }
.tape:hover .tape-reels i { animation-play-state: running; }
@keyframes spin { to { transform: rotate(360deg); } }
.tape h3 { font-size: 1.2rem; line-height: 1.3; margin: 0.25rem 0 0.4rem; color: inherit; }
.tape h3 a { color: inherit; text-decoration: none; }
.tape h3 a::after { content: ""; position: absolute; inset: 0; }
.tape p { margin: 0; color: inherit; opacity: 0.88; }
.tape .meta { color: var(--neon-cyan); }
:root[data-theme="light"] .tape .meta { color: #006b78; }
.tape.is-soon { opacity: 0.75; border-style: dashed; }
.tape.is-soon .tape-label { background: repeating-linear-gradient(135deg, #3a2a52 0 10px, #2b1b47 10px 20px); }
:root[data-theme="light"] .tape.is-soon .tape-label { background: repeating-linear-gradient(135deg, #efe2ff 0 10px, #e2d0fb 10px 20px); }
.tape.is-soon .soon-screen { aspect-ratio: 16/8; display: grid; place-items: center; font-family: var(--font-vcr); font-size: 1.6rem; letter-spacing: 0.1em; }

/* ---------- arcade cabinets (experiments) ---------- */
.cabinet {
  position: relative; display: flex; flex-direction: column; gap: 0.6rem; padding: 1.4rem 1.3rem 1.3rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px 18px 6px 6px; overflow: hidden;
  transition: transform 200ms, box-shadow 200ms, border-color 200ms;
}
.cabinet::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 6px; background: linear-gradient(90deg, var(--accent-2), var(--accent), var(--accent-3)); }
.cabinet:hover, .cabinet:focus-within { transform: translateY(-4px); border-color: var(--accent); box-shadow: var(--shadow-neon); }
.cabinet .marquee { font-family: var(--font-vcr); font-size: 1.3rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent-3); }
.cabinet h3 { font-size: 1.2rem; margin: 0; }
.cabinet h3 a { color: var(--heading); text-decoration: none; }
.cabinet h3 a::after { content: ""; position: absolute; inset: 0; }
.cabinet p { margin: 0; color: var(--muted); }
.cabinet .icon { width: 52px; height: 52px; }
.cabinet .icon * { fill: none; stroke: var(--accent-2); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; list-style: none; margin: 0; padding: 0; }
.chip { display: inline-flex; align-items: center; min-height: 30px; padding: 0.1rem 0.7rem; border: 1px solid var(--line); border-radius: 999px;
  font-family: var(--font-mono); font-size: 0.8125rem; color: var(--text); background: color-mix(in srgb, var(--accent-5) 10%, transparent); text-decoration: none; }
a.chip:hover { border-color: var(--accent); color: var(--accent); }
.badge { display: inline-block; font-family: var(--font-vcr); font-size: 1.2rem; line-height: 1; padding: 0.2rem 0.5rem 0.15rem; border-radius: 3px; text-transform: uppercase; letter-spacing: 0.08em; }
.badge--new { background: var(--accent-3); color: #1a0230; }
.badge--updated { background: transparent; color: var(--accent-2); border: 1px solid var(--accent-2); }
.badge--pink { background: var(--accent); color: var(--on-accent); }

/* ---------- neon sign / work with me ---------- */
.neon-box { position: relative; border-radius: 12px; padding: clamp(1.5rem, 4vw, 2.5rem); background: #0b0320; color: #f5ecff; border: 2px solid var(--neon-pink);
  box-shadow: 0 0 22px rgba(255,62,165,0.45), inset 0 0 22px rgba(255,62,165,0.25); }
.neon-box h2, .neon-box h3 { color: #fff; }
.neon-word { font-family: var(--font-script); font-size: clamp(2.4rem, 5vw, 3.4rem); line-height: 1; color: #ff9bd2; margin: 0 0 0.4rem;
  text-shadow: 0 0 4px #fff, 0 0 12px #ff3ea5, 0 0 28px #ff3ea5; animation: flicker 7s infinite; }
@keyframes flicker { 0%, 92%, 96%, 100% { opacity: 1; } 94% { opacity: 0.55; } 95% { opacity: 0.9; } }
.neon-box p { color: #e6d9ff; }
.neon-box .btn { --accent: #ff3ea5; --on-accent: #1a0230; }
.neon-box a:not(.btn) { color: #7ff2ff; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 1.6rem; }
.panel h3 { font-family: var(--font-display); font-size: 1rem; letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 1rem; color: var(--accent-2); }
.link-list { list-style: none; margin: 0; padding: 0; }
.link-list li { border-bottom: 1px dashed var(--line); }
.link-list li:last-child { border-bottom: 0; }
.link-list a { display: flex; justify-content: space-between; gap: 1rem; min-height: 48px; align-items: center; color: var(--heading); text-decoration: none; font-weight: 600; }
.link-list a span { color: var(--muted); font-weight: 400; font-family: var(--font-vcr); font-size: 1.25rem; }
.link-list a:hover { color: var(--accent); }

/* ---------- footer ---------- */
.footer { position: relative; margin-top: 0; }
.footer .horizon { height: 180px; }
.footer .horizon .sun { width: 220px; bottom: 45%; }
.footer .horizon .ridge { bottom: 45%; height: 30%; }
.footer .horizon .floor { height: 45%; }
.footer-main { background: var(--bg-alt); border-top: 1px solid var(--line); padding: 3rem 0 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.4fr; gap: 2rem; }
.footer h2 { font-family: var(--font-display); font-size: 0.9rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent-2); margin-bottom: 0.8rem; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li a { display: inline-flex; min-height: 40px; align-items: center; color: var(--text); text-decoration: none; }
.footer li a:hover { color: var(--accent); text-decoration: underline; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; border-top: 1px solid var(--line); margin-top: 2.5rem; padding-top: 1.25rem; font-family: var(--font-vcr); font-size: 1.25rem; color: var(--muted); }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

.subscribe { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; }
.subscribe label { flex-basis: 100%; }
.subscribe input { flex: 1 1 12rem; min-height: 48px; padding: 0 0.9rem; border-radius: var(--radius); border: 1px solid var(--line); background: var(--bg); color: var(--text); font: inherit; }
.subscribe input::placeholder { color: var(--muted); }
.form-status { flex-basis: 100%; margin: 0.25rem 0 0; min-height: 1.5em; color: var(--accent-2); }

/* ---------- jump bar / filter pills ---------- */
.pillbar { position: sticky; top: 4.25rem; z-index: 20; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.pillbar .wrap { display: flex; gap: 0.5rem; align-items: center; overflow-x: auto; padding-top: 0.6rem; padding-bottom: 0.6rem; scrollbar-width: thin; }
.pillbar .label { font-family: var(--font-vcr); font-size: 1.3rem; color: var(--muted); white-space: nowrap; margin-right: 0.25rem; }
.pill { display: inline-flex; align-items: center; gap: 0.4rem; min-height: 44px; padding: 0 1rem; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); text-decoration: none; white-space: nowrap; font: 600 0.9375rem var(--font-body); cursor: pointer; transition: border-color 150ms, background 150ms, color 150ms; }
.pill:hover { border-color: var(--accent); color: var(--accent); }
.pill[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); box-shadow: 0 0 14px color-mix(in srgb, var(--accent) 55%, transparent); }
.pill .count { font-family: var(--font-vcr); font-size: 1.2rem; opacity: 0.85; }

/* ---------- projects ---------- */
.feature { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 2rem; align-items: center; }
@media (max-width: 900px) { .feature { grid-template-columns: 1fr; } }
.proj { position: relative; display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); gap: 1.75rem; align-items: center; padding: 1.5rem; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.proj:nth-child(even) .crt { order: 2; }
.proj .crt { padding: 10px 10px 30px; border-radius: 16px; }
.proj .crt-screen { aspect-ratio: 16 / 10; }
.proj .crt-screen img { object-fit: contain; background: #06010f; }
.proj h3 { font-size: 1.5rem; margin-bottom: 0.4rem; }
.proj p { color: var(--muted); }
.proj .gh { display: inline-flex; align-items: center; gap: 0.4rem; min-height: 44px; font-weight: 700; }
.proj-stats { display: flex; flex-wrap: wrap; gap: 1.25rem; margin: 0.75rem 0; font-family: var(--font-vcr); font-size: 1.3rem; }
.proj-stats b { color: var(--accent-3); font-weight: 400; font-size: 1.6rem; }
@media (max-width: 760px) { .proj { grid-template-columns: 1fr; } .proj:nth-child(even) .crt { order: 0; } }

.cart { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 10px 10px 4px 4px; overflow: hidden; transition: transform 200ms, box-shadow 200ms, border-color 200ms; }
.cart:hover, .cart:focus-within { transform: translateY(-4px); border-color: var(--accent); box-shadow: var(--shadow-neon); }
.cart .tint { aspect-ratio: 16 / 10; background: #06010f; }
.cart .tint img { object-fit: cover; }
.cart .tint.contain img { object-fit: contain; }
.cart-body { padding: 1rem 1.15rem 1.2rem; display: flex; flex-direction: column; gap: 0.45rem; flex: 1; }
.cart h3 { font-size: 1.15rem; margin: 0; }
.cart h3 a { color: var(--heading); text-decoration: none; }
.cart h3 a::after { content: ""; position: absolute; inset: 0; }
.cart p { margin: 0; color: var(--muted); font-size: 1rem; }
.cart .ph { aspect-ratio: 16/10; display: grid; place-items: center; font-family: var(--font-vcr); font-size: 1.8rem; letter-spacing: 0.08em; color: var(--neon-cyan); text-shadow: 0 0 10px var(--neon-cyan);
  background: radial-gradient(ellipse at 50% 120%, #4a0f6b, #0b0320 70%); }
.stars-row { font-family: var(--font-vcr); font-size: 1.3rem; color: var(--accent-3); }

/* ---------- about ---------- */
.about-hero { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 2.5rem; align-items: center; }
.about-hero .crt-screen { aspect-ratio: 1 / 1; }
@media (max-width: 860px) { .about-hero { grid-template-columns: 1fr; } .about-hero .crt { max-width: 380px; } }
.highway { display: flex; gap: 2px; margin: 1.5rem 0 2.5rem; border-radius: var(--radius); overflow: hidden; }
.highway div { padding: 0.75rem 0.7rem; min-width: 0; background: var(--surface-2); border-top: 3px solid var(--accent); }
.highway div:nth-child(2n) { border-top-color: var(--accent-2); }
.highway div:nth-child(3n) { border-top-color: var(--accent-3); }
.highway b { display: block; font-size: 0.9375rem; line-height: 1.25; color: var(--heading); }
.highway span { font-family: var(--font-vcr); font-size: 1.2rem; color: var(--muted); }
@media (max-width: 900px) { .highway { flex-wrap: wrap; } .highway div { flex: 1 1 45% !important; } }

.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 11px; top: 0.5rem; bottom: 0.5rem; width: 2px; background: linear-gradient(var(--accent), var(--accent-2), var(--accent-3)); box-shadow: 0 0 10px var(--accent); }
.timeline > li { position: relative; padding: 0 0 2.5rem 3rem; }
.timeline > li::before { content: ""; position: absolute; left: 3px; top: 0.4rem; width: 18px; height: 18px; border-radius: 50%; background: var(--bg); border: 3px solid var(--accent); box-shadow: 0 0 10px var(--accent); }
.timeline h3 { font-family: var(--font-display); font-size: 1.2rem; text-transform: uppercase; letter-spacing: 0.06em; margin: 0 0 0.2rem; }
.timeline .period { font-family: var(--font-vcr); font-size: 1.35rem; color: var(--accent-2); }
.roles { list-style: none; padding: 0; margin: 0.8rem 0 0; display: grid; gap: 0.6rem; }
.roles li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.8rem 1rem; }
.roles b { color: var(--heading); }
.roles ul { margin: 0.6rem 0 0; padding-left: 1.2rem; color: var(--muted); }
.roles ul li { background: none; border: 0; padding: 0.15rem 0; }

.principles { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); counter-reset: p; }
.principles li { counter-increment: p; position: relative; padding: 1.4rem 1.3rem 1.3rem; border: 1px solid rgba(46,230,255,0.45); border-radius: 10px; background: rgba(46,230,255,0.05);
  font-size: 1.2rem; font-style: italic; line-height: 1.45; color: #f5ecff; }
.principles li::before { content: "RULE " counter(p, decimal-leading-zero); display: block; font-style: normal; font-family: var(--font-vcr); font-size: 1.25rem; color: #7ff2ff; margin-bottom: 0.4rem; }

.caps { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); }
.caps > div { padding: 1.3rem; border-radius: 10px; border: 1px solid rgba(255,62,165,0.45); background: rgba(255,62,165,0.05); }
.caps h3 { font-family: var(--font-display); font-size: 1rem; text-transform: uppercase; letter-spacing: 0.1em; color: #ff9bd2; }
.caps p { color: #e6d9ff; }
.caps .chip { color: #f5ecff; border-color: #6a4a9a; background: rgba(185,155,255,0.12); }

.dark-stage { background: radial-gradient(ellipse at 50% 0%, #2a0a4a, #0b0320 70%); color: #f5ecff; border-top: 2px solid var(--neon-pink); border-bottom: 2px solid var(--neon-cyan); }
.dark-stage h2, .dark-stage h3 { color: #fff; }
.dark-stage .section-head p, .dark-stage .muted { color: #cdbcf2; }
.dark-stage .track-no { -webkit-text-stroke-color: #ff3ea5; }
.dark-stage .section-head .more, .dark-stage a:not(.btn) { color: #7ff2ff; }
.dark-stage .eyebrow { color: #7ff2ff; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.beyond { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.beyond li { padding: 1rem 1.2rem; border-left: 4px solid var(--accent); background: var(--surface); border-radius: 0 var(--radius) var(--radius) 0; }
.beyond b { display: block; font-family: var(--font-display); letter-spacing: 0.06em; text-transform: uppercase; font-size: 0.95rem; color: var(--heading); margin-bottom: 0.2rem; }

/* ---------- article ---------- */
.article-hero { padding: 3rem 0 12rem; }
.article-hero .sun { left: 78%; width: min(30vw, 320px); bottom: 32%; }
.article-hero .ridge { bottom: 32%; }
.article-hero .floor { height: 32%; }
.article-hero-grid { display: grid; grid-template-columns: 1.3fr 0.7fr; gap: 2.5rem; align-items: center; }
.article-hero h1 { font-size: clamp(2rem, 4.4vw, 3.5rem); line-height: 1.1; }
.crumbs { font-family: var(--font-vcr); font-size: 1.35rem; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 0.8rem; }
.crumbs a { color: var(--heading); }
.article-hero .lede { color: var(--heading); }
.article-hero .crt { transform: rotate(-2deg); }
.article-hero .crt-screen { aspect-ratio: 16 / 10; }
@media (max-width: 900px) { .article-hero-grid { grid-template-columns: 1fr; } .article-hero .crt { max-width: 360px; } .article-hero .sun { left: 85%; } }

.article-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 3rem; max-width: var(--max); margin: 0 auto; padding: 3rem var(--gutter) 2rem; }
.toc { position: sticky; top: 6rem; align-self: start; max-height: calc(100vh - 7rem); overflow: auto; }
.toc h2, .toc summary { font-family: var(--font-vcr); font-size: 1.35rem; font-weight: 400; letter-spacing: 0.08em; color: var(--accent-2); text-transform: uppercase; margin: 0 0 0.6rem; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.toc a { display: block; padding: 0.45rem 0 0.45rem 1rem; margin-left: -2px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; font-size: 1rem; line-height: 1.35; }
.toc a:hover { color: var(--heading); }
.toc a[aria-current="true"] { color: var(--accent); border-left-color: var(--accent); text-shadow: var(--glow-pink); }
.toc details summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; }
.toc-mobile { display: none; }
@media (max-width: 1100px) {
  .article-layout { grid-template-columns: minmax(0, 1fr); padding-top: 1.5rem; }
  .toc-desktop { display: none; }
  .toc-mobile { display: block; position: static; max-height: none; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 0.25rem 1rem; }
  .toc-mobile ol { margin-bottom: 0.75rem; }
}

.prose { font-size: 1.125rem; line-height: 1.75; max-width: 44rem; }
.prose > * { margin-top: 0; margin-bottom: 1.3em; }
.prose h2 { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.45rem, 2.5vw, 1.9rem); text-transform: uppercase; letter-spacing: 0.03em; margin-top: 2.4em; padding-top: 0.5em; position: relative; }
.prose h2::before { content: ""; display: block; width: 72px; height: 4px; margin-bottom: 0.8rem; background: linear-gradient(90deg, var(--accent), var(--accent-3)); box-shadow: 0 0 10px var(--accent); }
.prose h2 a.anchor { color: inherit; text-decoration: none; }
.prose ol, .prose ul { padding-left: 1.4em; }
.prose li { margin-bottom: 0.35em; }
.prose li::marker { color: var(--accent); font-weight: 700; }
.prose code { font-family: var(--font-mono); font-size: 0.9em; background: var(--surface-2); padding: 0.1em 0.35em; border-radius: 4px; border: 1px solid var(--line); }
.prose em { color: var(--heading); }

.code { position: relative; margin: 0 0 1.6em; border-radius: 10px; background: var(--code-bg); border: 1px solid #3b2066; overflow: hidden;
  box-shadow: 0 0 0 1px rgba(46,230,255,0.15), 0 16px 40px rgba(0,0,0,0.3); }
@media (min-width: 1300px) { .code { margin-right: -4rem; } }
.code-bar { display: flex; justify-content: space-between; align-items: center; padding: 0.3rem 0.5rem 0.3rem 1rem; background: linear-gradient(90deg, #2a0a4a, #14062b); border-bottom: 1px solid #3b2066; }
.code-bar .lang { font-family: var(--font-vcr); font-size: 1.3rem; color: #7ff2ff; letter-spacing: 0.08em; }
.code-bar .lang::before { content: "\25CF  "; color: #ff3ea5; }
.copy-btn { min-height: 38px; padding: 0 0.9rem; background: transparent; border: 1px solid #6a4a9a; color: #f5ecff; border-radius: 4px; font-family: var(--font-vcr); font-size: 1.2rem; letter-spacing: 0.06em; cursor: pointer; }
.copy-btn:hover { border-color: #ff3ea5; color: #ff9bd2; }
.code pre { margin: 0; padding: 1.1rem 1.2rem 1.3rem; overflow-x: auto; font-family: var(--font-mono); font-size: 0.9375rem; line-height: 1.65; color: var(--code-text); tab-size: 2;
  background-image: repeating-linear-gradient(180deg, transparent 0 3px, rgba(255,255,255,0.018) 3px 4px); }
.code pre code { background: none; border: 0; padding: 0; font-size: inherit; }
.tok-k { color: #ff7ad9; }
.tok-s { color: #ffd23f; }
.tok-c { color: #a996d6; font-style: italic; }
.tok-t { color: #7ff2ff; }

.callout { position: relative; padding: 1rem 1.2rem 1rem 1.3rem; border-radius: 0 8px 8px 0; border-left: 4px solid var(--accent-5); background: color-mix(in srgb, var(--accent-5) 9%, var(--surface)); }
.callout p { margin: 0; }
.callout .tag { display: inline-block; font-family: var(--font-vcr); font-size: 1.25rem; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 0.25rem; }
.callout--why { border-left-color: var(--accent-2); background: color-mix(in srgb, var(--accent-2) 8%, var(--surface)); }
.callout--why .tag { color: var(--accent-2); }
.callout--q { border-left-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }
.callout--q .tag { color: var(--accent); }
.callout--note .tag { color: var(--accent-5); }
.callout--skill { border-left-color: var(--accent-3); background: color-mix(in srgb, var(--accent-3) 9%, var(--surface)); }
.callout--skill .tag { color: var(--accent-3); }

.article-foot { max-width: 44rem; }
.share-row { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.8rem; }
.share-row .btn { font-size: 0.8rem; }

.md-link { font-family: var(--font-vcr); font-size: 1.3rem; }

/* ---------- patterns ---------- */
.three-ways { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.three-ways > div { background: var(--surface); padding: 1.3rem; }
.three-ways h3 { font-family: var(--font-display); font-size: 1rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent); }
.three-ways p { margin: 0; color: var(--muted); }
@media (max-width: 800px) { .three-ways { grid-template-columns: 1fr; } }

.search-row { display: grid; gap: 1rem; margin: 2rem 0 1rem; }
.search-field { position: relative; }
.search-field input { width: 100%; min-height: 56px; padding: 0 1rem 0 3rem; border-radius: 8px; border: 2px solid var(--line); background: var(--surface); color: var(--text); font: 1.0625rem var(--font-body); }
.search-field input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent); }
.search-field input::placeholder { color: var(--muted); }
.search-field::before { content: ">"; position: absolute; left: 1.1rem; top: 50%; translate: 0 -52%; font-family: var(--font-vcr); font-size: 1.8rem; color: var(--accent); }
.filter-row { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.result-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.25rem; }
.result-row .count { font-family: var(--font-vcr); font-size: 1.4rem; color: var(--accent-2); }
.select { min-height: 44px; padding: 0 0.8rem; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: 1rem var(--font-body); }

.pcard { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; transition: transform 200ms, box-shadow 200ms, border-color 200ms; }
.pcard:hover, .pcard:focus-within { transform: translateY(-4px); border-color: var(--accent); box-shadow: var(--shadow-neon); }
.pscreen { position: relative; height: 170px; background: #0b0320; overflow: hidden; border-bottom: 1px solid var(--line); }
.pscreen::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(180deg, transparent 0 2px, rgba(0,0,0,0.3) 2px 3px); pointer-events: none; }
.pscreen .glyph { position: absolute; inset: 18px 18px 38px; }
.pscreen .pname { position: absolute; left: 14px; bottom: 8px; font-family: var(--font-vcr); font-size: 1.25rem; color: #7ff2ff; text-shadow: 0 0 8px rgba(46,230,255,0.7); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; right: 14px; }
.pbody { padding: 1.1rem 1.2rem 1.25rem; display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.pbody h3 { font-size: 1.2rem; margin: 0; }
.pbody h3 a { color: var(--heading); text-decoration: none; }
.pbody h3 a::after { content: ""; position: absolute; inset: 0; }
.pbody p { margin: 0; color: var(--muted); font-size: 1rem; }
.pbody .good { color: var(--text); font-size: 0.9375rem; }
.pbody .good b { color: var(--accent-2); }
.pmeta { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.empty { text-align: center; padding: 3rem 1rem; border: 2px dashed var(--line); border-radius: 12px; }
.empty .vcr { color: var(--accent); font-size: 2rem; }

/* glyph primitives, drawn with CSS per category */
.g-bars { display: flex; align-items: flex-end; gap: 6px; }
.g-bars i { flex: 1; background: linear-gradient(#ff3ea5, #7a2fd6); border-radius: 2px 2px 0 0; box-shadow: 0 0 8px rgba(255,62,165,0.5); }
.g-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.g-tiles i { border: 1px solid #2ee6ff; border-radius: 3px; background: rgba(46,230,255,0.12); }
.g-tiles i:nth-child(3n) { background: rgba(255,62,165,0.35); border-color: #ff3ea5; }
.g-ui { display: grid; grid-template-rows: auto 1fr auto; gap: 8px; }
.g-ui .bar { height: 14px; border-radius: 3px; background: #2ee6ff; box-shadow: 0 0 8px #2ee6ff; width: 60%; }
.g-ui .box { border: 1px dashed #b99bff; border-radius: 6px; }
.g-ui .btns { display: flex; gap: 6px; }
.g-ui .btns i { width: 60px; height: 20px; border-radius: 4px; background: #ff3ea5; }
.g-ui .btns i + i { background: transparent; border: 1px solid #ff3ea5; }
.g-form { display: flex; flex-direction: column; gap: 8px; justify-content: center; }
.g-form i { height: 18px; border-radius: 4px; border: 1px solid #b99bff; background: rgba(185,155,255,0.1); }
.g-form i:nth-child(2) { width: 70%; }
.g-form i:last-child { width: 40%; background: #ffd23f; border-color: #ffd23f; }
.g-color { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0; border-radius: 6px; overflow: hidden; }
.g-color i:nth-child(1) { background: #0b0320; } .g-color i:nth-child(2) { background: #4b2a8a; } .g-color i:nth-child(3) { background: #b0126b; }
.g-color i:nth-child(4) { background: #ff3ea5; } .g-color i:nth-child(5) { background: #ff8a3d; } .g-color i:nth-child(6) { background: #ffd23f; }

/* pattern detail */
.back { display: inline-flex; align-items: center; min-height: 44px; font-family: var(--font-vcr); font-size: 1.35rem; color: var(--heading); }
.usecases { columns: 2 16rem; padding-left: 1.2rem; margin: 0.5rem 0 1.5rem; }
.usecases li { margin-bottom: 0.35rem; }
.usecases li::marker { color: var(--accent); }
.panes { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent-2) 25%, transparent); }
.panes-bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem; padding: 0.5rem; background: var(--bg-alt); border-bottom: 1px solid var(--line); }
.tabs { display: flex; flex-wrap: wrap; gap: 0.25rem; }
.tab { min-height: 44px; padding: 0 1rem; border: 1px solid transparent; border-radius: 6px; background: none; color: var(--muted); font: 700 0.8125rem var(--font-display); letter-spacing: 0.1em; text-transform: uppercase; cursor: pointer; }
.tab:hover { color: var(--heading); }
.tab[aria-selected="true"] { color: var(--accent); border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); text-shadow: var(--glow-pink); }
.pane-actions { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.pane-actions button { min-height: 44px; padding: 0 0.9rem; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: 1.2rem var(--font-vcr); letter-spacing: 0.05em; cursor: pointer; }
.pane-actions button:hover { border-color: var(--accent-2); color: var(--accent-2); }
.pane { padding: 1.5rem; }
.pane[hidden] { display: none; }
.pane pre { margin: 0; padding: 1.1rem; background: var(--code-bg); color: var(--code-text); border-radius: 8px; overflow-x: auto; font: 0.9375rem/1.6 var(--font-mono); }
.pane .note { margin: 0 0 1rem; padding: 0.8rem 1rem; border-left: 3px solid var(--accent-2); background: color-mix(in srgb, var(--accent-2) 8%, var(--surface)); color: var(--text); }
.prompt-text { max-width: 44rem; font-size: 1.0625rem; line-height: 1.7; }

/* the demo pattern: hairline stat strip */
.stage { background: var(--bg); border: 1px dashed var(--line); border-radius: 10px; padding: 1.5rem; }
.stage-cap { color: var(--muted); margin: 0 0 0.8rem; }
.hss { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; grid-template-columns: 1fr; margin-bottom: 1.8rem; }
@media (min-width: 21rem) { .hss { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 42rem) { .hss { grid-template-columns: repeat(4, 1fr); } }
.hss--filter { grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr)); }
.hss > * { background: var(--surface); padding: 0.9rem 1rem; min-width: 0; }
.hss .l { display: block; font: 0.8125rem var(--font-mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.hss .v { display: block; font: 700 1.6rem/1.2 var(--font-body); font-variant-numeric: tabular-nums; color: var(--heading); }
.hss .v.dim { color: var(--muted); font-weight: 400; }
.hss .s { display: block; font-size: 0.875rem; color: var(--muted); }
.hss button { text-align: left; border: 0; color: inherit; cursor: pointer; font: inherit; min-height: 44px; }
.hss button:hover { background: color-mix(in srgb, var(--accent) 7%, var(--surface)); }
.hss button[aria-pressed="true"] { background: color-mix(in srgb, var(--accent) 16%, var(--surface)); box-shadow: inset 0 -3px 0 var(--accent); }
.dl-list { list-style: none; margin: 0.8rem 0 0; padding: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.dl-list li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.7rem 1rem; border-bottom: 1px solid var(--line); background: var(--surface); }
.dl-list li:last-child { border-bottom: 0; }
.dl-list .st { font-family: var(--font-mono); font-size: 0.875rem; white-space: nowrap; }
.st--Done { color: var(--accent-2); } .st--Failed { color: var(--accent); } .st--Downloading { color: var(--accent-3); } .st--Queued { color: var(--muted); }
.hss-status { margin: 0.8rem 0 0; font-weight: 600; }

/* writing */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }
.mini-list { list-style: none; margin: 0; padding: 0; }
.mini-list li { position: relative; display: grid; grid-template-columns: 96px 1fr; gap: 1rem; align-items: center; padding: 0.8rem 0; border-bottom: 1px dashed var(--line); }
.mini-list .tint { aspect-ratio: 4/3; border-radius: 4px; }
.mini-list a { color: var(--heading); font-weight: 700; text-decoration: none; font-size: 1.08rem; line-height: 1.3; }
.mini-list a::after { content: ""; position: absolute; inset: 0; }
.mini-list a:hover { color: var(--accent); }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag-cloud a { min-height: 40px; font-size: 0.9375rem; }
.tag-cloud a b { font-family: var(--font-vcr); font-size: 1.15rem; font-weight: 400; color: var(--accent); margin-left: 0.35rem; }

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

/* UI pattern library article */
.prose .prose-fig { margin: 2rem 0; }
.prose .prose-fig .crt-screen { aspect-ratio: auto; }
.prose .prose-fig .crt-screen img { height: auto; display: block; }
.prose .callout p + p { margin-top: .8em; }
.prose .live-pattern a.btn { white-space: normal; text-decoration: none; }
.prose p code { overflow-wrap: anywhere; }
