/* =========================================================
   ault.andrims.net · "Darkroom datasheet" design
   Dark = darkroom (safelight amber on graphite)
   Light = print (ink on warm paper)
   ========================================================= */

:root,
[data-theme="dark"] {
  --bg: #0d0e10;
  --bg-2: #121316;
  --panel: #16181b;
  --panel-2: #1c1e22;
  --line: #2a2c31;
  --line-2: #3a3d43;
  --text: #ece7df;
  --muted: #a8a299;
  --faint: #8b857c;
  --accent: #ff8a4c;       /* darkroom safelight */
  --accent-ink: #1a0d05;
  --led: #6ee7a0;          /* status LED */
  --led-dim: #1f3a2b;
  --grid: rgba(255, 255, 255, .035);
  --shadow: 0 30px 60px -30px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #f3efe7;
  --bg-2: #ece7dc;
  --panel: #faf8f3;
  --panel-2: #f1ede4;
  --line: #d9d2c4;
  --line-2: #c4bcab;
  --text: #1b1a17;
  --muted: #57524a;
  --faint: #6b665d;
  --accent: #b9400c;
  --accent-ink: #fff8f2;
  --led: #15803d;
  --led-dim: #c9dfcf;
  --grid: rgba(0, 0, 0, .045);
  --shadow: 0 30px 60px -36px rgba(60, 40, 10, .35);
  color-scheme: light;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 48px 48px;
  color: var(--text);
  font: 400 1.0625rem/1.65 "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  overflow-x: hidden;
  transition: background-color .3s, color .3s;
}
.mono { font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace; }
a { color: inherit; }
img { max-width: 100%; }
code { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: .9em; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }

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

.wrap {
  width: 100%;
  max-width: 1800px;
  margin: 0 auto;
  padding-left: clamp(16px, 4vw, 72px);
  padding-right: clamp(16px, 4vw, 72px);
}

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: 1800px; margin: 0 auto;
  padding: 12px clamp(16px, 4vw, 72px);
  display: flex; align-items: center; gap: 24px;
}
.brand {
  font-family: "IBM Plex Mono", monospace; font-weight: 500; text-decoration: none;
  font-size: 1.05rem; letter-spacing: -.01em; margin-right: auto;
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px;
}
.brand .prompt { color: var(--accent); }
.nav nav { display: flex; gap: 4px; }
.nav nav a {
  display: flex; align-items: baseline; gap: 6px;
  padding: 8px 12px; border-radius: 8px;
  text-decoration: none; color: var(--muted); font-size: .92rem;
  transition: color .2s, background-color .2s;
}
.nav nav a span { font-family: "IBM Plex Mono", monospace; font-size: .7rem; color: var(--faint); }
.nav nav a:hover { color: var(--text); background: var(--panel); }
.nav nav a.active { color: var(--text); }
.nav nav a.active span { color: var(--accent); }
.nav-tools { display: flex; gap: 8px; }
.icon-btn {
  display: inline-grid; place-items: center;
  width: 40px; height: 40px; padding: 0;
  background: transparent; color: var(--text);
  border: 1px solid var(--line); border-radius: 10px; cursor: pointer;
  font: 500 1.3rem/1 "IBM Plex Sans", sans-serif;
  transition: border-color .2s, background-color .2s;
}
.icon-btn:hover { border-color: var(--line-2); background: var(--panel); }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
[data-theme="dark"] .i-moon, [data-theme="light"] .i-sun { display: none; }
.menu-btn { display: none; }
.progress { height: 2px; background: transparent; }
.progress span { display: block; height: 100%; width: 0; background: var(--accent); }

/* ---------- buttons, chips ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px; min-height: 44px;
  border: 1px solid var(--line-2); border-radius: 10px;
  text-decoration: none; font-weight: 500; font-size: .95rem;
  background: var(--panel);
  transition: border-color .2s, transform .2s, background-color .2s;
}
.btn:hover { border-color: var(--accent); transform: translateY(-1px); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { filter: brightness(1.06); }

.chips, .tags { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li, .tags li {
  padding: 5px 12px; border: 1px solid var(--line); border-radius: 6px;
  color: var(--muted); font-size: .8rem; background: var(--bg-2);
}
.note {
  margin: 24px 0 0; font-size: .82rem; color: var(--faint);
  font-family: "IBM Plex Mono", monospace;
  border-left: 2px dashed var(--line-2); padding: 2px 0 2px 12px;
}

/* ---------- hero ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 96px);
  align-items: center;
  min-height: calc(100svh - 66px);
  padding-top: clamp(48px, 8vh, 120px);
  padding-bottom: clamp(48px, 8vh, 120px);
}
.kicker { display: flex; align-items: center; gap: 10px; margin: 0 0 20px; color: var(--muted); font-size: .9rem; }
h1 {
  font-family: "Instrument Serif", Georgia, serif; font-weight: 400;
  font-size: clamp(3.6rem, 10vw, 10.5rem); line-height: .9; letter-spacing: -.02em;
  margin: 0 0 28px;
}
h1 em { font-style: italic; color: var(--accent); }
.lead { max-width: 58ch; color: var(--muted); font-size: clamp(1.05rem, 1.3vw, 1.25rem); margin: 0; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

.led {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--led); box-shadow: 0 0 10px var(--led);
  animation: blink 2.4s infinite;
}

/* viewfinder */
.viewfinder {
  border: 1px solid var(--line); border-radius: 16px; background: var(--panel);
  box-shadow: var(--shadow); overflow: hidden;
}
.vf-bar {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 10px 16px; font-size: .72rem; letter-spacing: .08em; color: var(--faint);
  background: var(--bg-2);
}
.vf-bar:first-child { border-bottom: 1px solid var(--line); }
.vf-bar:last-child { border-top: 1px solid var(--line); }
.vf-frame {
  position: relative; aspect-ratio: 4 / 3.2;
  display: grid; place-items: center; padding: 40px;
  background:
    radial-gradient(60% 60% at 50% 45%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 70%),
    var(--panel);
}
.vf-frame .c { position: absolute; width: 28px; height: 28px; border: 2px solid var(--text); opacity: .8; animation: focus-in 1.1s cubic-bezier(.2,.8,.2,1) both; }
.vf-frame .tl { top: 18px; left: 18px; border-right: 0; border-bottom: 0; --dx: -14px; --dy: -14px; }
.vf-frame .tr { top: 18px; right: 18px; border-left: 0; border-bottom: 0; --dx: 14px; --dy: -14px; }
.vf-frame .bl { bottom: 18px; left: 18px; border-right: 0; border-top: 0; --dx: -14px; --dy: 14px; }
.vf-frame .br { bottom: 18px; right: 18px; border-left: 0; border-top: 0; --dx: 14px; --dy: 14px; }
.vf-specs::before {
  content: ""; position: absolute; inset: -14px -18px;
  border: 1.5px solid var(--led); border-radius: 6px; opacity: 0; pointer-events: none;
  animation: af-lock 1.6s .6s ease-out forwards;
}
.vf-specs { position: relative; list-style: none; margin: 0; padding: 0; width: 100%; max-width: 380px; font-size: .85rem; }
.vf-specs li {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 12px 0; border-bottom: 1px dashed var(--line-2);
}
.vf-specs li:last-child { border-bottom: 0; }
.vf-specs b { font-weight: 400; color: var(--faint); text-transform: uppercase; letter-spacing: .1em; font-size: .72rem; padding-top: 2px; }
.vf-specs span { color: var(--text); text-align: right; }

/* ---------- sections ---------- */
.section {
  display: grid;
  grid-template-columns: minmax(220px, 3fr) minmax(0, 9fr);
  gap: clamp(24px, 4vw, 80px);
  padding-top: clamp(72px, 10vw, 140px);
  padding-bottom: clamp(24px, 3vw, 40px);
  position: relative;
}
.section::before {
  content: ""; position: absolute; top: 0;
  left: clamp(16px, 4vw, 72px); right: clamp(16px, 4vw, 72px);
  border-top: 1px solid var(--line);
}
.sec-head { position: sticky; top: 100px; align-self: start; }
.sec-num { display: block; color: var(--accent); font-size: .8rem; letter-spacing: .12em; margin-bottom: 10px; }
h2 {
  font-family: "Instrument Serif", Georgia, serif; font-weight: 400;
  font-size: clamp(2.4rem, 4.2vw, 4rem); line-height: 1; letter-spacing: -.01em;
}
.sec-sub { margin: 14px 0 0; color: var(--muted); max-width: 32ch; }
.sec-body { min-width: 0; }
.big {
  font-family: "Instrument Serif", Georgia, serif; font-size: clamp(1.8rem, 3vw, 2.8rem);
  line-height: 1.15; margin: 0 0 32px; max-width: 24ch;
}
.big em { color: var(--accent); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 3vw, 48px); color: var(--muted); margin-bottom: 28px; }
.two-col p { margin: 0; }
h3 { font-size: 1.2rem; line-height: 1.3; letter-spacing: -.005em; }

/* ---------- engineering: signal trace ---------- */
.trace {
  list-style: none; margin: 0 0 28px; padding: 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  position: relative;
}
.node {
  position: relative; padding: 32px; background: var(--panel);
  border: 1px solid var(--line);
}
.node:first-child { border-radius: 14px 0 0 14px; }
.node:last-child { border-radius: 0 14px 14px 0; border-left: 0; }
.node p { color: var(--muted); margin: 12px 0 0; }
.node-label {
  display: flex; align-items: center; gap: 10px;
  font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--faint);
  margin-bottom: 18px;
}
.pin { width: 12px; height: 12px; border-radius: 50%; border: 2px solid currentColor; flex: none; }
.node.done .node-label { color: var(--led); }
.node.done .pin { background: var(--led); box-shadow: 0 0 10px var(--led); }
.node.next .node-label { color: var(--accent); }
.node.next { border-style: dashed; border-left-style: solid; }
/* the copper trace running between the two pins */
.node.done::after {
  content: ""; position: absolute; top: 45px; left: 50px; right: -32px; height: 2px;
  background: linear-gradient(90deg, var(--led), var(--accent));
  z-index: 1; pointer-events: none;
  transform-origin: left; animation: trace 1.2s .2s ease-out both;
}
.node.done .node-label { position: relative; z-index: 2; background: var(--panel); padding-right: 10px; width: max-content; }

/* ---------- homelab: rack ---------- */
.rack {
  border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  background:
    repeating-linear-gradient(180deg, transparent 0 10px, var(--grid) 10px 11px),
    var(--bg-2);
  padding: 0 18px 18px; margin-bottom: 28px;
}
.rack-top {
  display: flex; justify-content: space-between; padding: 12px 4px;
  font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--faint);
}
.unit {
  display: grid; grid-template-columns: 44px 54px minmax(0, 1fr) auto;
  align-items: center; gap: 18px;
  padding: 22px 22px 22px 14px; margin-top: 10px;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line); border-radius: 8px;
  transition: border-color .2s, transform .2s;
}
.unit:hover { border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); transform: translateX(4px); }
.unit .u { font-size: .72rem; color: var(--faint); border-right: 1px solid var(--line); padding-right: 10px; }
.unit-body p { margin: 6px 0 0; color: var(--muted); max-width: 70ch; }
.leds { display: flex; gap: 8px; }
.leds i { width: 8px; height: 8px; border-radius: 50%; background: var(--led-dim); }
.leds i:nth-child(1) { background: var(--led); box-shadow: 0 0 8px var(--led); }
.leds i:nth-child(2) { background: var(--led); animation: blink 1.3s infinite steps(2); }
.leds i:nth-child(3) { background: var(--accent); opacity: .85; animation: blink 3.1s .4s infinite steps(2); }
.unit:nth-of-type(3) .leds i:nth-child(2) { animation-duration: .9s; }
.unit:nth-of-type(4) .leds i:nth-child(2) { animation-duration: 1.7s; }
.ports { display: grid; grid-template-columns: repeat(2, 16px); gap: 6px; }
.ports i { width: 16px; height: 12px; border: 1.5px solid var(--line-2); border-radius: 2px; background: var(--bg); }
.unit.empty {
  grid-template-columns: 44px minmax(0, 1fr);
  background: transparent; border-style: dashed;
}
.unit.empty:hover { transform: none; }
.unit.empty .note { margin: 0; border: 0; padding: 0; }

/* ---------- photography: contact sheet ---------- */
.sheet {
  background: #0a0a0b; color: #d8d3cb;
  border-radius: 14px; padding: 14px 14px 18px;
  border: 1px solid var(--line);
}
[data-theme="light"] .sheet { background: #1b1a17; }
.sheet-edge {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 2px 4px 12px; font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: #ffb27e;
}
/* Justified rows: each frame grows by its aspect ratio so every row has
   an even height, whatever mix of portrait, landscape and square photos. */
.gallery { display: flex; flex-wrap: wrap; gap: 10px; --row: clamp(120px, 15vw, 250px); }
.gallery::after { content: ""; flex-grow: 1000000; }
.photo-cta { margin: 22px 0 0; display: flex; justify-content: flex-end; }
@media (max-width: 420px) { .photo-cta { justify-content: stretch; } }
.frame {
  --r: 1.5;
  position: relative; margin: 0;
  flex: var(--r) 1 calc(var(--r) * var(--row));
  aspect-ratio: var(--r);
  max-height: calc(var(--row) * 1.6);
  overflow: hidden; border-radius: 4px; background: #17171a;
}
.frame button {
  all: unset; display: block; width: 100%; height: 100%; cursor: zoom-in;
}
.frame button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.frame img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s cubic-bezier(.2,.8,.2,1), filter .3s; }
.frame:hover img { transform: scale(1.035); }
.frame .fn {
  position: absolute; top: 8px; left: 10px; z-index: 1;
  font: 500 .66rem/1 "IBM Plex Mono", monospace; letter-spacing: .1em; color: #ffb27e;
  text-shadow: 0 1px 4px rgba(0,0,0,.6); pointer-events: none;
}
.frame figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 28px 12px 10px;
  background: linear-gradient(transparent, rgba(0,0,0,.75)); color: #fff; font-size: .82rem;
  opacity: 0; transform: translateY(6px); transition: .3s; pointer-events: none;
}
.frame:hover figcaption, .frame:focus-within figcaption { opacity: 1; transform: none; }
.frame.ph {
  display: grid; place-items: center;
  background: repeating-linear-gradient(135deg, #151517 0 14px, #1a1a1d 14px 28px);
  border: 1px dashed #34343a; color: #8a857c;
  font: .75rem "IBM Plex Mono", monospace; letter-spacing: .08em;
}

/* lightbox */
.lightbox {
  width: min(96vw, 1400px); max-width: none; max-height: 94vh; padding: 0;
  border: 1px solid var(--line); border-radius: 14px; background: #0a0a0b; color: #ece7df;
}
.lightbox::backdrop { background: rgba(5,5,6,.88); backdrop-filter: blur(4px); }
.lightbox figure { margin: 0; display: grid; place-items: center; padding: 16px 16px 0; }
.lightbox img { max-width: 100%; max-height: calc(94vh - 120px); object-fit: contain; border-radius: 4px; }
.lightbox figcaption { padding: 10px 4px 0; color: #b5afa6; font-size: .9rem; text-align: center; }
.lb-controls { display: flex; justify-content: center; align-items: center; gap: 12px; padding: 12px 16px 16px; }
.lb-controls .icon-btn { color: #ece7df; border-color: #34343a; }
.lb-controls .mono { font-size: .8rem; color: #8a857c; min-width: 64px; text-align: center; }

/* ---------- resume ---------- */
.resume { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: clamp(22px, 2.5vw, 36px); }
.panel-h { font-size: .75rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); margin-bottom: 18px; }
.log { list-style: none; margin: 0; padding: 0; }
.log li {
  display: grid; grid-template-columns: 9.5em minmax(0, 1fr); gap: 16px;
  padding: 14px 0; border-top: 1px solid var(--line);
}
.log li:first-child { border-top: 0; padding-top: 0; }
.log .when { color: var(--accent); font-size: .8rem; padding-top: 3px; }
.log strong { display: block; font-weight: 600; }
.log div span { color: var(--muted); font-size: .95rem; }
.cert { margin: 18px 0 0; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: .95rem; }
.cert a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.log li.todo { opacity: .7; }
.log li.todo .when { color: var(--faint); }
.skills > div { padding: 14px 0; border-top: 1px solid var(--line); }
.skills > div:first-child { border-top: 0; padding-top: 0; }
h4 { font-size: .78rem; font-weight: 500; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 10px; }

.proj-h { font-family: "Instrument Serif", Georgia, serif; font-weight: 400; font-size: clamp(1.8rem, 2.6vw, 2.4rem); margin: 56px 0 18px; }
.projects { display: grid; grid-template-columns: 1fr; gap: 20px; }
.project {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: clamp(22px, 2.5vw, 36px);
  border-top: 3px solid var(--accent); transition: border-color .2s, transform .2s;
}
.project:hover { transform: translateY(-2px); }
.project h4 { font-family: "IBM Plex Sans", sans-serif; text-transform: none; letter-spacing: -.01em; font-size: 1.5rem; font-weight: 600; color: var(--text); margin: 12px 0 10px; }
.project p { color: var(--muted); margin: 0 0 22px; max-width: 75ch; }
.project-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }

/* ---------- contact & footer ---------- */
.contact .big { max-width: 22ch; font-size: clamp(2.2rem, 4.5vw, 4.2rem); }
.links { display: flex; flex-wrap: wrap; gap: 12px; }
footer {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  margin-top: clamp(72px, 10vw, 140px); padding-top: 28px; padding-bottom: 36px;
  border-top: 1px solid var(--line); color: var(--faint); font-size: .85rem;
}

/* ---------- motion ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.8,.2,1); }
.js .reveal.in { opacity: 1; transform: none; }
@keyframes blink { 50% { opacity: .25; } }
@keyframes focus-in { from { transform: translate(var(--dx), var(--dy)); opacity: 0; } }
@keyframes af-lock {
  0% { opacity: 0; transform: scale(1.6); }
  40% { opacity: 1; transform: scale(1); }
  55% { opacity: .2; } 70% { opacity: 1; }
  100% { opacity: .9; transform: scale(1); }
}
@keyframes trace { from { transform: scaleX(0); } }

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

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .nav nav a span { display: none; }
}
@media (max-width: 1000px) {
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .viewfinder { max-width: 560px; }
  .section { grid-template-columns: 1fr; gap: 28px; }
  .sec-head { position: static; }
  .sec-sub { max-width: 60ch; }
}
@media (max-width: 860px) {
  .menu-btn { display: inline-grid; }
  .nav nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0; padding: 8px clamp(16px, 4vw, 72px) 16px;
    background: var(--bg); border-bottom: 1px solid var(--line);
  }
  .nav nav.open { display: flex; }
  .nav nav a { padding: 14px 8px; font-size: 1rem; }
  .nav nav a span { display: inline; }
  .resume { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  body { font-size: 1rem; }
  .two-col { grid-template-columns: 1fr; }
  .trace { grid-template-columns: minmax(0, 1fr); }
  .node { padding: 24px 20px 24px 48px; }
  .node .pin { position: absolute; left: 18px; top: 28px; }
  .node .node-label, .node.done .node-label { position: static; }
  .node.done .node-label { width: auto; padding-right: 0; flex-wrap: wrap; }
  .node-label { letter-spacing: .05em; }
  .node:first-child { border-radius: 14px 14px 0 0; }
  .node:last-child { border-radius: 0 0 14px 14px; border-left: 1px dashed var(--line); border-top: 0; }
  .node.done::after { top: 40px; bottom: -28px; left: 23px; right: auto; width: 2px; height: auto; background: linear-gradient(180deg, var(--led), var(--accent)); transform-origin: top; animation-name: trace-v; }
  .node.next .pin { z-index: 2; background: var(--panel); }
  .unit { grid-template-columns: 34px minmax(0, 1fr); gap: 12px; padding: 18px 16px 18px 10px; }
  .unit .leds { grid-column: 2; grid-row: 1; }
  .unit .unit-body { grid-column: 1 / -1; }
  .unit .u { grid-row: 1; }
  .unit .ports { display: none; }
  .unit.empty .note { grid-column: 2; }
  .rack { padding: 0 10px 10px; }
  .vf-frame { padding: 44px 30px; }
  .vf-specs::before { inset: -10px -10px; }
  .log li { grid-template-columns: 1fr; gap: 2px; }
  .gallery { gap: 6px; --row: 104px; }
  .frame figcaption { opacity: 1; transform: none; }
}
@keyframes trace-v { from { transform: scaleY(0); } }
@media (max-width: 420px) {
  .vf-bar span:nth-child(2) { display: none; }
  .btn { width: 100%; justify-content: center; }
}

/* ---------- legal pages & footer links ---------- */
footer a { text-decoration: none; }
footer a:hover { color: var(--accent); }
.legal { max-width: 760px; padding-top: clamp(32px, 6vw, 72px); }
.legal h1 { margin: 24px 0 8px; font-size: clamp(2.2rem, 5vw, 3.4rem); }
.legal h2 { font-size: 1.25rem; margin: 32px 0 8px; }
.legal p, .legal li { color: var(--muted); }
.legal a { color: var(--accent); }
.legal-date { color: var(--faint); font-size: .8rem; }
