/* Dillon Green — portfolio. Plain CSS, no build step.
   Type: Archivo (variable, wdth 62–125) + JetBrains Mono, both OFL, self-hosted. */

@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/jetbrains-mono.woff2") format("woff2");
  font-weight: 100 800;
  font-display: swap;
}

/* ---------- tokens ---------- */
:root {
  color-scheme: light;
  --bg: #f5f4f0;
  --bg-2: #ffffff;
  --bg-3: #ebe9e3;
  --line: #dcd9d0;
  --line-2: #c9c5ba;
  --ink: #15181c;
  --ink-2: #474e58;
  --ink-3: #5c6570;
  --accent: #0a6c7d;
  --accent-ink: #ffffff;
  --accent-soft: rgba(10, 108, 125, 0.09);
  --live: #19693b;
  --amber: #8a5a00;
  --shadow: 0 1px 2px rgba(20, 24, 28, 0.04), 0 8px 28px rgba(20, 24, 28, 0.06);
  --grid: rgba(20, 24, 28, 0.045);

  --sans: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --radius: 14px;
  --gutter: 16px;
  --max: 1180px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0b0d10;
    --bg-2: #12161b;
    --bg-3: #181d24;
    --line: #242b34;
    --line-2: #323b47;
    --ink: #e9ecf0;
    --ink-2: #b0b8c3;
    --ink-3: #8a95a3;
    --accent: #62d3e6;
    --accent-ink: #04232a;
    --accent-soft: rgba(98, 211, 230, 0.1);
    --live: #5fd38d;
    --amber: #f0b44c;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 30px rgba(0, 0, 0, 0.25);
    --grid: rgba(233, 236, 240, 0.04);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b0d10;
  --bg-2: #12161b;
  --bg-3: #181d24;
  --line: #242b34;
  --line-2: #323b47;
  --ink: #e9ecf0;
  --ink-2: #b0b8c3;
  --ink-3: #8a95a3;
  --accent: #62d3e6;
  --accent-ink: #04232a;
  --accent-soft: rgba(98, 211, 230, 0.1);
  --live: #5fd38d;
  --amber: #f0b44c;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 30px rgba(0, 0, 0, 0.25);
  --grid: rgba(233, 236, 240, 0.04);
}

@media (min-width: 640px) { :root { --gutter: 28px; } }
@media (min-width: 1024px) { :root { --gutter: 40px; } }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 76px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-feature-settings: "ss01" on;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { margin: 0; line-height: 1.08; font-weight: 750; letter-spacing: -0.02em; text-wrap: balance; }
::selection { background: var(--accent); color: var(--accent-ink); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 8px;
  font-weight: 600; text-decoration: none;
}
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: calc(var(--max) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.mono { font-family: var(--mono); }
.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; }

/* ---------- header ---------- */
.top {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.top.is-stuck { border-bottom-color: var(--line); }
.top .wrap { display: flex; align-items: center; gap: 16px; height: 60px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; font-weight: 700; letter-spacing: -0.01em; white-space: nowrap;
}
.brand-mark {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px;
  background: var(--ink); color: var(--bg);
  font-family: var(--mono); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.02em;
}
.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav a {
  font-size: 0.9rem; color: var(--ink-2); text-decoration: none;
  padding: 8px 10px; border-radius: 8px;
}
.nav a:hover { color: var(--ink); background: var(--bg-3); }
.nav .hide-sm { display: none; }
@media (min-width: 720px) { .nav .hide-sm { display: inline-block; } }
.nav .hide-xs { display: none; }
@media (min-width: 440px) { .nav .hide-xs { display: inline-block; } }
.theme-btn {
  display: grid; place-items: center; width: 38px; height: 38px; margin-left: 4px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--bg-2); color: var(--ink);
  cursor: pointer; padding: 0;
}
.theme-btn:hover { border-color: var(--line-2); }
.theme-btn svg { width: 18px; height: 18px; }
.theme-btn .i-sun { display: none; }
:root[data-theme="dark"] .theme-btn .i-sun { display: block; }
:root[data-theme="dark"] .theme-btn .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-btn .i-sun { display: block; }
  :root:not([data-theme="light"]) .theme-btn .i-moon { display: none; }
}

/* ---------- buttons, chips ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  min-height: 46px; padding: 0 18px; border-radius: 11px;
  font: 600 0.95rem/1 var(--sans); text-decoration: none; white-space: nowrap;
  border: 1px solid var(--line-2); color: var(--ink); background: var(--bg-2);
  transition: transform 0.15s, border-color 0.15s, background 0.15s;
}
.btn svg { width: 17px; height: 17px; flex: none; }
.btn:hover { border-color: var(--ink-3); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { border-color: var(--accent); filter: brightness(1.06); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; list-style: none; }
.chips li {
  font: 500 0.74rem/1 var(--mono); letter-spacing: 0.01em;
  padding: 6px 8px; border-radius: 6px;
  color: var(--ink-2); background: var(--bg-3); border: 1px solid var(--line);
}

.status {
  display: inline-flex; align-items: center; gap: 7px;
  font: 600 0.72rem/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-2); padding: 6px 9px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--bg-2); white-space: nowrap;
}
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); flex: none; }
.status.live::before { background: var(--live); box-shadow: 0 0 0 3px color-mix(in srgb, var(--live) 22%, transparent); }
.status.review::before { background: var(--amber); }
.status.soon::before { background: var(--accent); }

.link-arrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 600; font-size: 0.95rem; color: var(--accent); text-decoration: none;
}
.link-arrow svg { width: 15px; height: 15px; transition: transform 0.15s; }
.link-arrow:hover { text-decoration: underline; }
.link-arrow:hover svg { transform: translate(2px, -2px); }
.link-arrow.internal:hover svg { transform: translateX(3px); }

/* ---------- section scaffolding ---------- */
section { padding-block: 72px; }
@media (min-width: 900px) { section { padding-block: 88px; } }
.kicker {
  display: flex; align-items: center; gap: 12px;
  font: 600 0.75rem/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 18px;
}
.kicker b { color: var(--accent); font-weight: 600; white-space: nowrap; }
.kicker::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.section-head { display: grid; gap: 14px; margin-bottom: 40px; max-width: 760px; }
.section-head h2 { font-size: clamp(1.9rem, 1.2rem + 2.6vw, 3rem); font-stretch: 112%; }
.section-head p { color: var(--ink-2); margin: 0; font-size: 1.08rem; }

/* ---------- hero ---------- */
.hero { padding-block: 40px 24px; position: relative; isolation: isolate; }
@media (min-width: 900px) { .hero { padding-block: 72px 32px; } }
.hero::before {
  /* faint display graticule */
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 32px 32px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 30% 30%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 70% at 30% 30%, #000 30%, transparent 75%);
}
.annunciator {
  display: flex; align-items: flex-start; gap: 10px;
  font: 600 0.72rem/1.3 var(--mono); letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-2); margin-bottom: 28px;
}
.annunciator .lamp {
  width: 8px; height: 8px; border-radius: 50%; background: var(--live); flex: none; margin-top: 4px;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--live) 20%, transparent);
}
.hero-grid { display: grid; gap: 28px; align-items: end; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.08fr 1fr; gap: 56px; } }
.hero h1 {
  font-size: clamp(3.1rem, 1.2rem + 9vw, 7.4rem);
  font-stretch: 125%;
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 0.9;
}
.hero h1 span { display: block; }
.hero h1 .dot { display: inline; color: var(--accent); }
.role {
  margin-top: 18px;
  font: 500 0.82rem/1.5 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3);
}
.lead { font-size: clamp(1.15rem, 1rem + 0.6vw, 1.42rem); line-height: 1.45; color: var(--ink); margin-bottom: 26px; text-wrap: pretty; }
.lead em { font-style: normal; color: var(--ink-2); }
.cta { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- ARINC 429 word ---------- */
.word {
  margin: 48px 0 0;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg-2); box-shadow: var(--shadow);
  overflow: hidden;
}
.word-bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px;
  padding: 12px 16px; border-bottom: 1px solid var(--line);
  font: 600 0.7rem/1.4 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3);
}
.word-bar .hint { color: var(--ink-3); font-weight: 500; letter-spacing: 0.04em; text-transform: none; }
.word-bar .hint a { color: var(--accent); text-underline-offset: 3px; }
.word-body { padding: 16px; display: grid; gap: 16px; }
@media (min-width: 900px) { .word-body { grid-template-columns: 1fr auto; align-items: center; gap: 28px; padding: 20px 22px; } }

.bits { display: grid; grid-template-columns: repeat(16, minmax(0, 1fr)); gap: 3px; }
@media (min-width: 720px) { .bits { grid-template-columns: repeat(32, minmax(0, 1fr)); } }
.bit {
  appearance: none; border: 0; margin: 0; padding: 0;
  display: grid; grid-template-rows: auto auto; justify-items: center; gap: 1px;
  padding-block: 6px 5px; border-radius: 5px; cursor: pointer;
  font-family: var(--mono); color: var(--ink);
  background: var(--bg-3);
  border-top: 2px solid var(--f, var(--line-2));
  transition: background 0.15s, color 0.15s;
}
.bit .n { font-size: 0.56rem; color: var(--ink-3); line-height: 1; }
.bit .v { font-size: 0.95rem; font-weight: 600; line-height: 1.2; }
.bit[aria-pressed="true"] { background: color-mix(in srgb, var(--f, var(--ink)) 16%, var(--bg-3)); }
.bit[aria-pressed="false"] .v { color: var(--ink-3); font-weight: 400; }
.bit:hover { background: color-mix(in srgb, var(--f, var(--ink)) 26%, var(--bg-3)); }
.bit.flip { animation: flip 0.35s ease; }
@keyframes flip { 0% { transform: scaleY(1); } 45% { transform: scaleY(0.2); } 100% { transform: scaleY(1); } }

.f-p    { --f: var(--ink-3); }
.f-ssm  { --f: var(--amber); }
.f-data { --f: var(--accent); }
.f-sdi  { --f: #9b87f5; }
.f-lbl  { --f: var(--live); }

.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 12px 0 0; padding: 0; list-style: none; font: 500 0.72rem/1.3 var(--mono); color: var(--ink-2); }
.legend li { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.legend li::before { content: ""; width: 10px; height: 3px; border-radius: 2px; background: var(--f); }
.legend b { color: var(--ink); font-weight: 600; }

.readout {
  display: grid; gap: 2px; min-width: 0;
  padding: 12px 14px; border-radius: 10px; background: var(--bg-3); border: 1px solid var(--line);
  font-family: var(--mono);
}
@media (min-width: 900px) { .readout { min-width: 270px; } }
.readout .lbl { font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.readout .val { font-size: 1.7rem; font-weight: 700; color: var(--accent); line-height: 1.15; font-variant-numeric: tabular-nums; }
.readout .val small { font-size: 0.9rem; font-weight: 600; color: var(--ink-2); margin-left: 4px; }
.readout .sub { font-size: 0.74rem; color: var(--ink-2); }
.readout .ok { color: var(--live); }
.readout .bad { color: var(--amber); }
.readout-actions { display: flex; gap: 12px; margin-top: 8px; }
.readout button {
  appearance: none; background: none; border: 0; padding: 0; cursor: pointer;
  font: 600 0.72rem/1 var(--mono); color: var(--accent); text-decoration: underline; text-underline-offset: 3px;
}

/* ---------- featured work ---------- */
.work-list { display: grid; gap: 28px; }
.project {
  display: grid; border: 1px solid var(--line); border-radius: calc(var(--radius) + 4px);
  background: var(--bg-2); overflow: hidden; box-shadow: var(--shadow);
}
@media (min-width: 900px) {
  .project { grid-template-columns: 1.1fr 1fr; min-height: 440px; }
  .project.flip .media { order: 2; border-right: 0; border-left: 1px solid var(--line); }
}
.media {
  position: relative; min-width: 0;
  background: var(--bg-3);
  border-bottom: 1px solid var(--line);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 24px 24px;
}
@media (min-width: 900px) { .media { border-bottom: 0; border-right: 1px solid var(--line); } }

.phones {
  display: flex; justify-content: center; align-items: center;
  padding: 36px 12px 0; height: 100%; min-height: 320px; overflow: hidden;
}
@media (min-width: 900px) { .phones { padding: 44px 24px 0; align-items: flex-end; } }
.phone {
  flex: none; width: clamp(118px, 30vw, 200px);
  border-radius: clamp(16px, 4vw, 26px); overflow: hidden;
  border: 1px solid var(--line-2);
  background: #000;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
  aspect-ratio: 1290 / 2796;
}
.phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.phone.side { transform: translateY(26px) scale(0.92); opacity: 0.96; }
.phone.side:first-child { margin-right: -26px; }
.phone.side:last-child { margin-left: -26px; }
.phone.main { position: relative; z-index: 1; }
@media (min-width: 900px) {
  .phone { width: min(200px, 30%); }
  .phones { margin-bottom: -40px; } /* phones run off the bottom edge */
  .phone.side { transform: translateY(30px) scale(0.9); }
}

.shot-wide { padding: 20px; display: grid; place-items: center; height: 100%; }
@media (min-width: 900px) { .shot-wide { padding: 32px; } }
.shot-wide img { border-radius: 10px; border: 1px solid var(--line-2); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22); width: 100%; }

.project-body { padding: 26px 22px 28px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
@media (min-width: 640px) { .project-body { padding: 34px 34px 36px; } }
@media (min-width: 900px) { .project-body { padding: 44px 44px; justify-content: center; } }
.project-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; justify-content: space-between; }
.platforms { font: 600 0.72rem/1.3 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.project h3 { font-size: clamp(1.7rem, 1.2rem + 1.8vw, 2.5rem); font-stretch: 115%; }
.project h3 .sub { display: block; margin-top: 8px; font-size: 1.02rem; font-stretch: 100%; font-weight: 600; letter-spacing: -0.005em; color: var(--ink-2); line-height: 1.35; }
.project p { color: var(--ink-2); margin: 0; }
.project .links { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; margin-top: 2px; }
.project .note { font: 500 0.78rem/1.4 var(--mono); color: var(--ink-3); }

/* PAR "display unit" panel */
.du {
  height: 100%; padding: 22px; display: grid; align-content: center; gap: 14px;
}
@media (min-width: 900px) { .du { padding: 36px; } }
.du-screen {
  border-radius: 12px; background: #0a0d11; color: #e6ebf0; border: 1px solid #262e38;
  padding: 16px; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.03), 0 18px 40px rgba(0,0,0,0.2);
  font-family: var(--mono);
}
.du-head { display: flex; justify-content: space-between; gap: 8px; font-size: 0.66rem; letter-spacing: 0.12em; color: #8a95a3; padding-bottom: 12px; border-bottom: 1px solid #222a33; margin-bottom: 12px; }
.du-head .on { color: #5fd38d; }
.du-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
@media (min-width: 480px) { .du-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 900px) { .du-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .du-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.du-cell { display: grid; gap: 2px; min-width: 0; }
.du-cell .k { font-size: 0.62rem; letter-spacing: 0.12em; color: #8a95a3; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.du-cell .v { font-size: 1.45rem; font-weight: 700; color: #62d3e6; line-height: 1.1; font-variant-numeric: tabular-nums; }
.du-cell .v.g { color: #5fd38d; }
.du-cell .v.w { color: #e6ebf0; }
.du-flow {
  margin-top: 14px; padding-top: 12px; border-top: 1px solid #222a33;
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 0.66rem; letter-spacing: 0.06em; color: #b0b8c3;
}
.du-flow span { padding: 4px 6px; border: 1px solid #2c3540; border-radius: 4px; white-space: nowrap; }
.du-flow i { font-style: normal; color: #62d3e6; }
.du-caption { font: 500 0.72rem/1.4 var(--mono); color: var(--ink-3); text-align: center; margin: 0; }

/* ---------- more shipped ---------- */
.grid-4 { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.tile {
  display: flex; flex-direction: column; min-width: 0;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2);
  overflow: hidden; transition: border-color 0.15s, transform 0.2s;
}
.tile:hover { border-color: var(--line-2); }
.thumb {
  position: relative; aspect-ratio: 16 / 11; background: var(--bg-3); overflow: hidden;
  border-bottom: 1px solid var(--line);
  display: grid; place-items: center;
}
.thumb .portrait {
  position: absolute; left: 50%; top: 11%; transform: translateX(-50%);
  width: 46%; max-width: 200px; height: auto;
  border-radius: 12px 12px 0 0; border: 1px solid var(--line-2); border-bottom: 0;
  box-shadow: 0 10px 26px rgba(0,0,0,0.18);
}
.thumb .landscape { width: 86%; border-radius: 8px; border: 1px solid var(--line-2); box-shadow: 0 10px 26px rgba(0,0,0,0.16); }
.thumb .cover { width: 100%; height: 100%; object-fit: cover; object-position: top left; }
.tile-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.tile h3 { font-size: 1.2rem; font-stretch: 110%; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tile p { color: var(--ink-2); font-size: 0.95rem; margin: 0; flex: 1; }
.tile .link-arrow { font-size: 0.88rem; margin-top: 4px; }
.tile .tag { font: 600 0.66rem/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }

/* ---------- how I work ---------- */
.practice { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
@media (min-width: 760px) { .practice { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.practice > div { background: var(--bg-2); padding: 26px 22px 28px; }
@media (min-width: 760px) { .practice > div { padding: 32px 32px 34px; } }
.practice .num { font: 600 0.72rem/1 var(--mono); color: var(--accent); letter-spacing: 0.1em; }
.practice h3 { font-size: 1.3rem; font-stretch: 110%; margin: 12px 0 10px; }
.practice p { color: var(--ink-2); margin: 0; }

/* ---------- experience ---------- */
.xp { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.xp > li { display: grid; gap: 6px 32px; padding: 26px 0; border-bottom: 1px solid var(--line); }
@media (min-width: 820px) { .xp > li { grid-template-columns: 220px 1fr; } }
.xp .when { font: 500 0.8rem/1.5 var(--mono); color: var(--ink-3); padding-top: 4px; }
.xp h3 { font-size: 1.28rem; font-stretch: 108%; letter-spacing: -0.01em; }
.xp h3 { text-wrap: pretty; }
.xp h3 .org { display: block; margin-top: 4px; font-size: 1.02rem; font-stretch: 100%; color: var(--ink-2); font-weight: 600; }
@media (min-width: 820px) {
  .xp h3 .org { display: inline; margin: 0; font-size: inherit; font-stretch: inherit; }
  .xp h3 .org::before { content: " · "; }
}
.xp ul { margin: 10px 0 0; padding-left: 1.1em; color: var(--ink-2); }
.xp li li { margin-bottom: 4px; }
.xp li li::marker { color: var(--ink-3); }
.xp-foot { margin-top: 26px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; color: var(--ink-2); font-size: 0.95rem; }

/* ---------- experiments (low-key) ---------- */
.lab { padding-top: 0; }
.lab .section-head h2 { font-size: clamp(1.4rem, 1.1rem + 1.2vw, 1.9rem); }
.lab .grid-4 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 14px; }
.lab .tile { background: transparent; }
.lab .thumb { aspect-ratio: 16 / 10; }
.lab .thumb .portrait { width: 52%; top: 9%; border-radius: 10px 10px 0 0; }
.lab .tile h3 { font-size: 1.02rem; }
.lab .tile p { font-size: 0.88rem; }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line); padding-block: 56px 44px; }
.foot-grid { display: grid; gap: 28px; }
@media (min-width: 820px) { .foot-grid { grid-template-columns: 1fr auto; align-items: end; } }
.foot h2 { font-size: clamp(1.8rem, 1.1rem + 2.6vw, 3rem); font-stretch: 118%; margin-bottom: 12px; }
.foot p { color: var(--ink-2); margin: 0; max-width: 520px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 10px; }
.colophon {
  margin-top: 44px; padding-top: 20px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
  font: 500 0.74rem/1.5 var(--mono); color: var(--ink-3);
}
.colophon a { color: var(--ink-2); }

/* ---------- case study (par.html) ---------- */
.cs-hero { padding-block: 48px 40px; }
@media (min-width: 900px) { .cs-hero { padding-block: 80px 56px; } }
.back { display: inline-flex; align-items: center; gap: 8px; font: 600 0.78rem/1 var(--mono); letter-spacing: 0.06em; color: var(--ink-3); text-decoration: none; margin-bottom: 28px; }
.back:hover { color: var(--accent); }
.back svg { width: 14px; height: 14px; }
.cs-hero h1 { font-size: clamp(2.3rem, 1.2rem + 5vw, 4.8rem); font-stretch: 120%; font-weight: 800; letter-spacing: -0.03em; line-height: 0.98; max-width: 14ch; }
.cs-hero .lead { margin-top: 22px; max-width: 760px; color: var(--ink-2); }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-top: 36px; }
@media (min-width: 720px) { .facts { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.facts div { background: var(--bg-2); padding: 18px 18px 16px; min-width: 0; }
.facts dt { font: 600 0.66rem/1.3 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.facts dd { margin: 6px 0 0; font: 700 clamp(1.5rem, 1.1rem + 1.4vw, 2.1rem)/1.05 var(--mono); color: var(--ink); font-variant-numeric: tabular-nums; }
.facts dd small { display: block; margin-top: 4px; font: 500 0.78rem/1.35 var(--sans); color: var(--ink-2); }

.cs-section { padding-block: 56px; border-top: 1px solid var(--line); }
@media (min-width: 900px) { .cs-section { padding-block: 80px; } }
.cs-grid { display: grid; gap: 18px 56px; }
@media (min-width: 900px) { .cs-grid { grid-template-columns: 260px 1fr; } }
.cs-grid > header .kicker { margin-bottom: 12px; }
.cs-grid > header .kicker::after { display: none; }
.cs-grid h2 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.3rem); font-stretch: 112%; }
.prose { max-width: 720px; color: var(--ink-2); }
.prose p { margin-bottom: 1.1em; }
.prose strong { color: var(--ink); font-weight: 650; }
.feature-list { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
@media (min-width: 720px) { .feature-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.feature-list li { background: var(--bg-2); padding: 20px 20px 22px; }
.feature-list h3 { font-size: 1.06rem; font-stretch: 106%; letter-spacing: -0.005em; margin-bottom: 8px; color: var(--ink); line-height: 1.25; }
.feature-list p { margin: 0; font-size: 0.95rem; color: var(--ink-2); }

.diagram {
  margin: 8px 0 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2);
  padding: 16px; overflow: hidden;
}
@media (min-width: 720px) { .diagram { padding: 24px; } }
.diagram svg { width: 100%; height: auto; }
.diagram figcaption { margin-top: 14px; font: 500 0.76rem/1.5 var(--mono); color: var(--ink-3); }
.diagram .d-box { fill: var(--bg-3); stroke: var(--line-2); stroke-width: 1.25; }
.diagram .d-core { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 1.5; }
.diagram .d-store { fill: var(--bg-2); stroke: var(--ink-3); stroke-width: 1.25; }
.diagram .d-group { fill: none; stroke: var(--line-2); stroke-width: 1; stroke-dasharray: 4 4; }
.diagram .d-t { fill: var(--ink); font: 650 14px var(--sans); }
.diagram .d-s { fill: var(--ink-2); font: 500 11.5px var(--mono); }
.diagram .d-g { fill: var(--ink-3); font: 600 10.5px var(--mono); letter-spacing: 0.12em; }
.diagram .d-line { stroke: var(--ink-3); stroke-width: 1.4; fill: none; }
.diagram .d-line.a { stroke: var(--accent); }
.diagram .d-arrow { fill: var(--ink-3); }
.diagram .d-arrow.a { fill: var(--accent); }
.diagram .d-small { display: block; }
.diagram .d-large { display: none; }
@media (min-width: 760px) { .diagram .d-small { display: none; } .diagram .d-large { display: block; } }

.checks { display: grid; gap: 14px; margin-top: 8px; }
@media (min-width: 720px) { .checks { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.check { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; background: var(--bg-2); }
.check .n { font: 700 1.9rem/1 var(--mono); color: var(--accent); }
.check .t { margin-top: 8px; font-weight: 650; color: var(--ink); }
.check p { margin: 6px 0 0; font-size: 0.92rem; color: var(--ink-2); }
.checks + .prose { margin-top: 22px; }
.disclaimer {
  margin-top: 8px; padding: 14px 16px; border-radius: 10px; border: 1px dashed var(--line-2);
  font: 500 0.8rem/1.5 var(--mono); color: var(--ink-3);
}

/* ---------- motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- print ---------- */
@media print {
  .top, .theme-btn, .word, .cta { display: none !important; }
  body { background: #fff; color: #000; }
}
.hero h1 + .lead { margin-top: 24px; }

/* =====================================================================
   Fun layer (assets/js/fun.js). All motion is removed under reduced motion
   by the global rule above; JS also checks the preference before animating.
   ===================================================================== */
[hidden] { display: none !important; }

.term-btn { font: 700 0.78rem/1 var(--mono); letter-spacing: -0.02em; }
.glitch { display: inline-block; }

/* blinking cursor on the hero name */
.hero h1 .dot { animation: blink 1.15s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* cursor-reactive grid + spotlight in the hero */
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0;
  transition: opacity 0.5s;
  background-image:
    radial-gradient(380px circle at var(--hx, 50%) var(--hy, 50%), var(--accent-soft), transparent 70%),
    linear-gradient(color-mix(in srgb, var(--accent) 22%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--accent) 22%, transparent) 1px, transparent 1px);
  background-size: auto, 32px 32px, 32px 32px;
  -webkit-mask-image: radial-gradient(240px circle at var(--hx, 50%) var(--hy, 50%), #000, transparent 75%);
  mask-image: radial-gradient(240px circle at var(--hx, 50%) var(--hy, 50%), #000, transparent 75%);
}
.hero.lit::after { opacity: 1; }

/* card tilt + pointer glow */
.project, .tile {
  position: relative;
  transform: perspective(1400px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.45s cubic-bezier(.2,.7,.2,1), border-color 0.2s, box-shadow 0.3s;
}
.project.is-tilting, .tile.is-tilting { transition: transform 0.08s linear, border-color 0.2s, box-shadow 0.3s; }
.project::after, .tile::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0;
  transition: opacity 0.35s;
  background: radial-gradient(520px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--accent) 11%, transparent), transparent 60%);
}
.project.is-tilting::after, .tile.is-tilting::after { opacity: 1; }
.project.is-tilting, .tile.is-tilting { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }

/* RGB-split glitch on project names while hovering their card */
.project:hover .glitch, .tile:hover .glitch, .hero h1:hover span { animation: glitch 0.42s steps(2) 1; }
@keyframes glitch {
  0%   { text-shadow: 2px 0 #ff2bd6, -2px 0 #2be4ff; transform: translateX(0); }
  25%  { text-shadow: -3px 0 #ff2bd6, 3px 0 #2be4ff; transform: translateX(1px); clip-path: inset(10% 0 55% 0); }
  50%  { text-shadow: 2px 0 #ff2bd6, -2px 0 #2be4ff; transform: translateX(-1px); clip-path: inset(50% 0 10% 0); }
  75%  { text-shadow: -1px 0 #ff2bd6, 1px 0 #2be4ff; clip-path: none; }
  100% { text-shadow: none; transform: none; }
}

/* scanlines on the PAR display unit */
.du-screen { position: relative; overflow: hidden; }
.du-screen::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(255,255,255,0.028) 0 1px, transparent 1px 3px);
}

/* smart mirror frames */
.phone.mframe {
  aspect-ratio: 720 / 1280; border-radius: 6px; border: 7px solid #221c17; background: #000;
  box-shadow: 0 0 0 1px #3a3029, 0 18px 40px rgba(0, 0, 0, 0.3);
}
.as-btn { appearance: none; background: none; border: 0; padding: 0; cursor: pointer; font-family: inherit; }

/* boot / POST overlay */
.boot {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px;
  background: var(--bg); transition: opacity 0.4s;
}
.boot.out, .intrusion.out, .rain.out, .toast.out { opacity: 0; }
.boot-text {
  margin: 0; max-width: 100%; overflow: hidden; min-height: 9.5em;
  font: 500 clamp(0.7rem, 0.55rem + 0.7vw, 0.95rem)/1.65 var(--mono); color: var(--ink-2); white-space: pre;
}
.boot-text::first-line { color: var(--accent); font-weight: 700; }
.boot-text::after { content: "▮"; color: var(--accent); animation: blink 0.8s steps(1) infinite; }
.boot-hint {
  position: absolute; left: 0; right: 0; bottom: 28px; margin: 0; text-align: center;
  font: 500 0.72rem/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3);
}

/* katakana rain */
.rain { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 40; pointer-events: none; opacity: 0.55; transition: opacity 0.6s; }
:root[data-theme="light"] .rain:not(.front) { opacity: 0.35; }
.rain.front { z-index: 89; opacity: 1; }

/* netrunner intrusion */
.intrusion {
  position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 20px; cursor: pointer;
  background: rgba(2, 5, 7, 0.72); transition: opacity 0.45s;
}
.intrusion-text {
  margin: 0; max-width: 100%; overflow: hidden; white-space: pre-wrap;
  font: 600 clamp(0.72rem, 0.5rem + 0.9vw, 1.05rem)/1.7 var(--mono); color: #3cff8f;
  text-shadow: 0 0 8px rgba(60, 255, 143, 0.55);
}
.intrusion .boot-hint { color: #8a95a3; }
html.glitching body { animation: shake 0.65s steps(3) 1; }
html.glitching h1, html.glitching h2, html.glitching h3 { text-shadow: 3px 0 #ff2bd6, -3px 0 #2be4ff; }
html.glitching img { filter: hue-rotate(90deg) saturate(2); }
@keyframes shake {
  0% { transform: translate(0); } 20% { transform: translate(-4px, 2px) skewX(2deg); }
  40% { transform: translate(5px, -1px); filter: invert(1); } 60% { transform: translate(-2px, 1px) skewX(-3deg); filter: none; }
  80% { transform: translate(3px, 0); } 100% { transform: none; }
}

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 95; transform: translateX(-50%);
  max-width: calc(100vw - 32px); padding: 12px 16px; border-radius: 10px;
  background: var(--ink); color: var(--bg); font: 600 0.85rem/1.4 var(--mono); box-shadow: var(--shadow);
  transition: opacity 0.4s;
}

/* terminal */
.term {
  width: min(760px, calc(100vw - 24px)); height: min(520px, calc(100dvh - 48px)); max-width: none; max-height: none;
  padding: 0; border: 1px solid #2a333d; border-radius: 12px; overflow: hidden;
  background: #0a0d11; color: #d6e4ee; font: 500 0.86rem/1.55 var(--mono);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}
.term[open] { display: flex; flex-direction: column; }
.term::backdrop { background: rgba(5, 8, 12, 0.5); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.term-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px 8px 8px 14px; border-bottom: 1px solid #1e252e; color: #8a95a3; font-size: 0.74rem; letter-spacing: 0.06em;
}
.term-x {
  appearance: none; width: 30px; height: 30px; border-radius: 8px; border: 1px solid #2a333d; background: #12161b;
  color: #d6e4ee; font: 600 1rem/1 var(--mono); cursor: pointer;
}
.term-x:hover { border-color: #62d3e6; }
.term-out { flex: 1; overflow-y: auto; padding: 14px; }
.t-line { white-space: pre-wrap; overflow-wrap: anywhere; }
.t-line.cmd { color: #62d3e6; margin-top: 8px; }
.t-line.err { color: #ff8aa0; }
.t-line.ok { color: #5fd38d; }
.t-line.dim { color: #8a95a3; }
.t-line a { color: #62d3e6; }
.term-form { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-top: 1px solid #1e252e; }
.term-form:focus-within { background: #0d1217; }
.term-ps { color: #5fd38d; white-space: nowrap; }
.term-in {
  flex: 1; min-width: 0; background: transparent; border: 0; outline: none; color: #e9ecf0;
  font: inherit; caret-color: #62d3e6; padding: 6px 0;
}

.hint { color: var(--ink-3); }
.hint kbd {
  font: 600 0.72rem/1 var(--mono); padding: 2px 5px; border-radius: 4px;
  border: 1px solid var(--line-2); background: var(--bg-2); color: var(--ink-2);
}

@media print { .boot, .term, .rain, .intrusion, .toast { display: none !important; } }
@media (min-width: 900px) {
  .phone.mframe { width: min(220px, 31%); }
  .phone.main.mframe { width: min(250px, 36%); }
}

/* =====================================================================
   Writing, guestbook, studio, privacy (subpages). Same tokens as above.
   ===================================================================== */

/* nav: current page + a wider breakpoint so mobile keeps two links */
.nav a[aria-current="page"] { color: var(--ink); background: var(--bg-3); }
.nav .hide-lg { display: none; }
@media (min-width: 1024px) { .nav .hide-lg { display: inline-block; } }

/* footer site links */
.foot-nav { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.foot-nav a { color: var(--ink-2); }
.foot-nav a:hover { color: var(--accent); }

/* ---------- post lists (home strip + /writing/) ---------- */
.strip { padding-top: 0; }
.strip .section-head { margin-bottom: 22px; }
.strip .section-head h2 { font-size: clamp(1.4rem, 1.1rem + 1.2vw, 1.9rem); }
.post-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.post-links a {
  display: grid; gap: 4px 24px; padding: 18px 20px; background: var(--bg-2); text-decoration: none;
  transition: background 0.15s;
}
@media (min-width: 720px) { .post-links a { grid-template-columns: 190px 1fr auto; align-items: baseline; padding: 20px 24px; } }
.post-links a:hover { background: var(--bg-3); }
.post-links .date { font: 500 0.76rem/1.5 var(--mono); color: var(--ink-3); letter-spacing: 0.04em; white-space: nowrap; }
.post-links .title { font-size: 1.12rem; font-weight: 700; font-stretch: 106%; letter-spacing: -0.01em; line-height: 1.3; color: var(--ink); }
.post-links .sum { display: block; margin-top: 6px; font-size: 0.95rem; font-weight: 400; font-stretch: 100%; letter-spacing: 0; color: var(--ink-2); }
.post-links .go { display: inline-flex; align-items: center; gap: 6px; font: 600 0.74rem/1 var(--mono); color: var(--accent); white-space: nowrap; }
.post-links .go svg { width: 14px; height: 14px; transition: transform 0.15s; }
.post-links a:hover .go svg { transform: translateX(3px); }

/* ---------- long-form posts ---------- */
.post-head h1 { font-size: clamp(2.1rem, 1.2rem + 3.6vw, 3.9rem); max-width: 20ch; }
.post-meta {
  display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 24px;
  font: 500 0.76rem/1.5 var(--mono); letter-spacing: 0.04em; color: var(--ink-3);
}
.post-meta { gap: 6px 10px; }
.post-meta span + span::before { content: "·"; margin-right: 10px; color: var(--ink-3); }
.post-body { padding-block: 8px 64px; }
@media (min-width: 900px) { .post-body { padding-block: 16px 88px; } }
.post {
  font-size: 1.05rem; line-height: 1.72; color: var(--ink-2);
  overflow-wrap: break-word;
}
@media (min-width: 640px) { .post { font-size: 1.1rem; } }
.post > :first-child { margin-top: 0; }
.post p { margin: 0 0 1.15em; text-wrap: pretty; }
.post strong { color: var(--ink); font-weight: 650; }
.post a:not(.btn) { color: var(--accent); }
.post h2 {
  margin: 2.1em 0 0.7em; color: var(--ink);
  font-size: clamp(1.45rem, 1.2rem + 1vw, 1.95rem); font-stretch: 110%; line-height: 1.15;
}
.post h3 { margin: 1.8em 0 0.5em; color: var(--ink); font-size: 1.18rem; font-stretch: 106%; letter-spacing: -0.01em; line-height: 1.3; }
.post ul, .post ol { margin: 0 0 1.2em; padding-left: 1.3em; }
.post li { margin-bottom: 0.45em; padding-left: 0.2em; }
.post li::marker { color: var(--ink-3); }
.post blockquote {
  margin: 1.6em 0; padding: 2px 0 2px 18px; border-left: 3px solid var(--accent); color: var(--ink);
  font-size: 1.06em; line-height: 1.55;
}
.post blockquote p:last-child { margin-bottom: 0; }
.post hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }
.post code {
  font: 500 0.84em/1.4 var(--mono); color: var(--ink);
  background: var(--bg-3); border: 1px solid var(--line); border-radius: 5px; padding: 0.08em 0.36em;
}
.post pre {
  margin: 1.5em 0; padding: 16px 18px; border-radius: 12px; border: 1px solid #262e38;
  background: #0a0d11; color: #d6e4ee; overflow-x: auto; -webkit-overflow-scrolling: touch;
  font: 500 0.8rem/1.65 var(--mono); tab-size: 2;
}
@media (min-width: 640px) { .post pre { font-size: 0.85rem; padding: 18px 22px; } }
.post pre code { font: inherit; color: inherit; background: none; border: 0; padding: 0; }
.post pre .c { color: #8a95a3; }
.post pre .k { color: #62d3e6; }
.post pre .g { color: #5fd38d; }
.post pre .a { color: #f0b44c; }
.post pre .v { color: #c3b5ff; }
.table-wrap {
  margin: 1.5em 0; overflow-x: auto; -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line); border-radius: 12px; background: var(--bg-2);
}
.post table { width: 100%; border-collapse: collapse; font-size: 0.92rem; line-height: 1.45; }
.post th, .post td { padding: 10px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.post th { font: 600 0.68rem/1.3 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); background: var(--bg-3); white-space: nowrap; }
.post td { color: var(--ink-2); }
.post td:first-child { color: var(--ink); font-family: var(--mono); font-size: 0.86rem; white-space: nowrap; }
.post tr:last-child td { border-bottom: 0; }
.callout {
  margin: 1.6em 0; padding: 16px 18px; border-radius: 12px;
  border: 1px solid var(--line); border-left: 3px solid var(--accent); background: var(--bg-2);
  font-size: 0.97rem;
}
.callout p:last-child { margin-bottom: 0; }
.callout .k { display: block; margin-bottom: 6px; font: 600 0.7rem/1.3 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
/* posts use a narrower measure; the bit-flipper sits in a wider band between text blocks */
.wrap.narrow { max-width: calc(760px + var(--gutter) * 2); }
.wrap.mid { max-width: calc(1080px + var(--gutter) * 2); }
.post-body .word { margin: 8px 0 14px; }
.word-try { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 2em; }
.word-try button {
  appearance: none; cursor: pointer; padding: 8px 11px; border-radius: 8px;
  font: 600 0.76rem/1.2 var(--mono); color: var(--ink-2); background: var(--bg-2); border: 1px solid var(--line-2);
}
.word-try button:hover { color: var(--ink); border-color: var(--accent); }
.word-try button b { color: var(--accent); font-weight: 600; }
.post-end { margin-top: 2.6em; padding-top: 24px; border-top: 1px solid var(--line); display: grid; gap: 18px; }
.post-end p { margin: 0; font-size: 0.96rem; }
.post-end .links { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- forms (guestbook + waitlist) ---------- */
.form { display: grid; gap: 18px; }
.field { display: grid; gap: 7px; min-width: 0; }
.field > label, .field > .label {
  font: 600 0.74rem/1.3 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2);
}
.field .opt { color: var(--ink-3); font-weight: 500; letter-spacing: 0.02em; text-transform: none; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; margin: 0; padding: 12px 14px;
  font: 400 1rem/1.45 var(--sans); color: var(--ink);
  background: var(--bg); border: 1px solid var(--line-2); border-radius: 10px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field textarea { min-height: 128px; resize: vertical; }
.field select {
  appearance: none; padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%23808a96' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 15px center;
}
.field select:invalid { color: var(--ink-3); }
.field select option { color: var(--ink); }
.field input::placeholder, .field textarea::placeholder { color: var(--ink-3); opacity: 0.8; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--ink-3); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); outline: none; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.field-row { display: grid; gap: 18px; }
@media (min-width: 560px) { .field-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.field-hint { display: flex; justify-content: space-between; gap: 12px; font: 500 0.74rem/1.4 var(--mono); color: var(--ink-3); }
.field-hint .count { margin-left: auto; font-variant-numeric: tabular-nums; white-space: nowrap; }
.field-hint .count.over { color: var(--amber); font-weight: 700; }
.field-check { display: flex; align-items: flex-start; gap: 10px; font-size: 0.97rem; color: var(--ink-2); cursor: pointer; }
.field-check input { flex: none; width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--accent); cursor: pointer; }
.hp { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.form-foot .fine { margin: 0; font: 500 0.74rem/1.5 var(--mono); color: var(--ink-3); flex: 1 1 220px; }
.form-foot .fine a { color: var(--ink-2); }
button.btn { cursor: pointer; }
button.btn:disabled { opacity: 0.6; cursor: progress; }
.form-status { margin: 0; font: 600 0.86rem/1.45 var(--mono); color: var(--ink-2); }
.form-status:empty { display: none; }
.form-status.ok { color: var(--live); }
.form-status.err { color: var(--amber); }
.panel {
  border: 1px solid var(--line); border-radius: calc(var(--radius) + 4px); background: var(--bg-2);
  box-shadow: var(--shadow); padding: 22px 18px;
}
@media (min-width: 640px) { .panel { padding: 30px 30px 32px; } }
.noscript-note { margin: 0; padding: 14px 16px; border-radius: 10px; border: 1px dashed var(--line-2); font: 500 0.82rem/1.5 var(--mono); color: var(--ink-2); }

/* ---------- guestbook ---------- */
.gb-section { padding-top: 8px; }
.gb-grid { display: grid; gap: 24px; align-items: start; }
@media (min-width: 900px) { .gb-grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 36px; } }
.gb-window { border: 1px solid var(--line-2); border-radius: 12px; background: var(--bg-2); box-shadow: var(--shadow); overflow: hidden; }
.gb-titlebar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 10px 9px 14px; border-bottom: 1px solid var(--line-2);
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 22%, var(--bg-3)), var(--bg-3) 70%);
  font: 600 0.74rem/1.2 var(--mono); letter-spacing: 0.04em; color: var(--ink);
}
.gb-titlebar .ctl { display: flex; gap: 4px; }
.gb-titlebar .ctl i {
  display: grid; place-items: center; width: 20px; height: 18px; border-radius: 3px;
  font: 700 0.66rem/1 var(--mono); font-style: normal; color: var(--ink-2); background: var(--bg-2);
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.5), inset -1px -1px 0 rgba(0, 0, 0, 0.18); border: 1px solid var(--line-2);
}
.gb-window .form { padding: 20px 18px 22px; }
@media (min-width: 640px) { .gb-window .form { padding: 26px 26px 28px; } }
.marquee {
  overflow: hidden; white-space: nowrap; border-bottom: 1px dashed var(--line-2);
  font: 600 0.72rem/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent);
  padding: 9px 0; background: var(--accent-soft);
}
.marquee span { display: inline-block; padding-left: 100%; animation: marquee 24s linear infinite; }
@keyframes marquee { to { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) { .marquee span { padding-left: 14px; } }
.gb-side { display: grid; gap: 18px; }
.counter-box {
  display: grid; justify-items: center; gap: 12px; padding: 22px 18px 20px; text-align: center;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2);
}
.counter-box .cap { font: 600 0.7rem/1.3 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); margin: 0; }
.odometer { display: inline-flex; gap: 4px; padding: 6px; border-radius: 8px; background: #05070a; border: 1px solid #262e38; position: relative; overflow: hidden; }
.odometer span {
  display: grid; place-items: center; width: 1.45em; height: 1.85em; border-radius: 4px;
  font: 700 clamp(1.3rem, 1rem + 1.2vw, 1.75rem)/1 var(--mono); color: #5fd38d; font-variant-numeric: tabular-nums;
  background: linear-gradient(#141a21, #0a0d11 48%, #0d1116 52%, #141a21);
  text-shadow: 0 0 8px rgba(95, 211, 141, 0.45);
}
.odometer::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 3px);
}
.counter-box .sub { margin: 0; font-size: 0.9rem; color: var(--ink-2); }
.badges { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.badge88 {
  display: grid; place-items: center; width: 88px; height: 31px; padding: 0 4px; text-align: center;
  font: 700 0.54rem/1.1 var(--mono); letter-spacing: 0.05em; text-transform: uppercase;
  border: 1px solid #000; box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.4), inset -1px -1px 0 rgba(0, 0, 0, 0.4);
}
.badge88.b1 { background: #0a0d11; color: #5fd38d; }
.badge88.b2 { background: #0a6c7d; color: #fff; }
.badge88.b3 { background: #f0b44c; color: #1a1200; }
.badge88.b4 { background: #e9ecf0; color: #15181c; }
.gb-rules { padding: 18px 18px 16px 20px; border: 1px dashed var(--line-2); border-radius: var(--radius); font-size: 0.93rem; color: var(--ink-2); }
.gb-rules h2 { font: 600 0.72rem/1.3 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 10px; }
.gb-rules ul { margin: 0; padding-left: 1.3em; }
.gb-rules li { margin-bottom: 5px; }
.gb-rules li::marker { content: "★  "; color: var(--accent); font-size: 0.8em; }
.gb-entries { margin-top: 64px; }
.gb-entries .section-head { margin-bottom: 22px; }
.gb-entries .section-head h2 { font-size: clamp(1.4rem, 1.1rem + 1.2vw, 1.9rem); }
.gb-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
@media (min-width: 900px) { .gb-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.gb-entry { min-width: 0; padding: 16px 18px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); }
.gb-entry .head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.gb-entry .num { font: 600 0.72rem/1 var(--mono); color: var(--accent); }
.gb-entry .who { font-weight: 700; font-stretch: 106%; color: var(--ink); overflow-wrap: anywhere; }
.gb-entry .when { margin-left: auto; font: 500 0.72rem/1.4 var(--mono); color: var(--ink-3); }
.gb-entry .site { display: block; margin-top: 2px; font: 500 0.76rem/1.4 var(--mono); color: var(--ink-3); overflow-wrap: anywhere; }
.gb-entry .msg { margin: 10px 0 0; color: var(--ink-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.gb-new {
  font: 700 0.6rem/1 var(--mono); letter-spacing: 0.08em; color: var(--accent-ink); background: var(--accent);
  padding: 3px 5px; border-radius: 3px; animation: blink 1.2s steps(1) infinite;
}
.gb-empty { padding: 22px; border: 1px dashed var(--line-2); border-radius: var(--radius); color: var(--ink-2); font: 500 0.88rem/1.5 var(--mono); text-align: center; }

/* ---------- studio ---------- */
.who-for { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 28px 0 0; }
.who-for li {
  padding: 8px 13px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--bg-2);
  font-size: 0.92rem; font-weight: 600; color: var(--ink-2);
}
.waitlist-grid { display: grid; gap: 28px; align-items: start; }
@media (min-width: 900px) { .waitlist-grid { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: 56px; } }
.waitlist-grid .section-head { margin-bottom: 0; }
.steps { margin: 22px 0 0; padding: 0; list-style: none; display: grid; gap: 14px; counter-reset: step; }
.steps li { display: grid; grid-template-columns: 30px 1fr; gap: 12px; color: var(--ink-2); font-size: 0.97rem; }
.steps li::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  font: 600 0.74rem/1.9 var(--mono); color: var(--accent);
}

/* ---------- terminal: fly ---------- */
.t-fly { position: relative; height: 30px; margin: 6px 0 2px; overflow: hidden; }
.t-fly::before {
  content: ""; position: absolute; left: 0; right: 0; top: 15px; border-top: 1px dashed rgba(98, 211, 230, 0.35);
  transform-origin: left; animation: t-trail var(--fly-ms, 3200ms) linear forwards;
}
.t-fly svg { position: absolute; top: 3px; left: 0; width: 46px; height: 24px; color: #62d3e6; animation: t-fly var(--fly-ms, 3200ms) linear forwards; }
@keyframes t-fly { from { transform: translateX(-50px); } to { transform: translateX(var(--fly-to, 700px)); } }
@keyframes t-trail { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.t-fly.calm svg { left: 50%; transform: translateX(-50%); animation: none; }
.t-fly.calm::before { animation: none; transform: none; }
