/* ============ Tokens ============ */
:root {
  /* cabinet: black */
  --cab: #0c0c0d;          /* ground */
  --cab-deep: #151517;
  --cab-line: #26262a;
  --rail: #232326;
  --rail-hole: #050506;
  --panel: #151517;        /* powder-coated units */
  --panel-2: #1c1c1f;
  --panel-3: #2a2a2f;
  --steel: #6d6f73;

  /* ink */
  --ink: #f3eff0;
  --ink-2: #cbc4c6;
  --ink-3: #9d9497;
  --on-panel: #f3eff0;
  --on-panel-2: #a39a9d;

  /* label tape: burgundy + graphite */
  --burg: #7a1c33;
  --burg-edge: #4f0f20;
  --burg-light: #c65573;
  --graph: #2b2b30;
  --graph-edge: #17171a;

  /* patch cables, burgundy family */
  --cable-1: #8a2140;
  --cable-2: #a8304f;
  --cable-3: #6a1729;
  --cable-4: #b8435f;
  --cable-5: #7a1c33;
  --cable-6: #9b2a49;

  --led: #37d46a;
  --led-amber: #ffae1a;
  --led-off: #3b3f42;

  /* type */
  --f-sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --f-mono: "Martian Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* space */
  --s-1: .25rem; --s-2: .5rem; --s-3: .75rem; --s-4: 1rem; --s-5: 1.5rem;
  --s-6: 2rem; --s-7: 3rem; --s-8: 4.5rem; --s-9: 7rem;

  --rail-w: 34px;
  --max: 1280px;
  --ease-out: cubic-bezier(.16, 1, .3, 1);

  color-scheme: dark;
}

/* ============ Base ============ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--f-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--cab);
  /* powder-coat grain */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  font-variation-settings: "wdth" 100;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1.5px; text-underline-offset: .22em; }
p { margin: 0; }
h1, h2, h3 { margin: 0; line-height: 1.05; text-wrap: balance; }
button { font: inherit; color: inherit; }

::selection { background: var(--burg); color: var(--ink); }
:focus-visible { outline: 3px solid var(--burg-light); outline-offset: 3px; border-radius: 2px; }

html { scrollbar-color: var(--panel-3) var(--cab-deep); }
::-webkit-scrollbar { width: 12px; }
::-webkit-scrollbar-track { background: var(--cab-deep); }
::-webkit-scrollbar-thumb { background: var(--panel-3); border: 3px solid var(--cab-deep); border-radius: 2px; }

.mono {
  font-family: var(--f-mono);
  font-variation-settings: "wdth" 85;
  font-size: .75rem;
  letter-spacing: .02em;
  font-variant-numeric: tabular-nums;
}

.ico { width: 1.15em; height: 1.15em; flex: none; }

.skip {
  position: absolute; left: var(--s-4); top: -100px; z-index: 100;
  background: var(--burg); color: var(--ink); padding: var(--s-2) var(--s-4); font-weight: 700;
}
.skip:focus { top: var(--s-4); }

/* ============ Label tape ============ */
.tape {
  --r: 0deg;
  --d: 0ms;
  display: inline-block;
  width: fit-content;
  position: relative;
  padding: .12em .42em .1em;
  font-family: var(--f-sans);
  font-weight: 800;
  font-variation-settings: "wdth" 72;
  text-transform: uppercase;
  letter-spacing: .01em;
  line-height: 1;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgb(255 255 255 / .12), transparent 24%, transparent 80%, rgb(0 0 0 / .18)),
    var(--tape-bg);
  box-shadow:
    0 1px 0 var(--tape-edge),
    0 3px 6px -2px rgb(18 19 20 / .28),
    0 10px 18px -12px rgb(18 19 20 / .35);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  transform: rotate(var(--r));
  text-decoration: none;
}
.tape--y { --tape-bg: var(--burg); --tape-edge: var(--burg-edge); }
.tape--w { --tape-bg: var(--graph); --tape-edge: var(--graph-edge); }

.tape--xl { font-size: clamp(3.4rem, 10.5vw, 6rem); padding: .1em .32em .06em; letter-spacing: -.005em; }
.tape--lg { font-size: clamp(1.9rem, 4.6vw, 3rem); }
.tape--md { font-size: clamp(.95rem, 1.7vw, 1.2rem); font-variation-settings: "wdth" 80; padding: .45em .7em .4em; letter-spacing: .03em; }
.tape--sm { font-size: .78rem; font-variation-settings: "wdth" 82; padding: .5em .7em .45em; letter-spacing: .05em; }
.tape--xs { font-size: .72rem; font-variation-settings: "wdth" 80; padding: .45em .55em .4em; letter-spacing: .06em; box-shadow: 0 1px 0 var(--tape-edge), 0 2px 3px -1px rgb(0 0 0 / .35); }

/* print-in, like the label leaves the machine */
@media (prefers-reduced-motion: no-preference) {
  .js .hero .tape,
  .js .bay__label,
  .js .is-in .tape:not(.port__label):not(.readout__title) {
    animation: print 900ms var(--ease-out) var(--d) both;
  }
  @keyframes print {
    from { clip-path: polygon(0 0, 0 0, 0 100%, 0 100%); transform: rotate(var(--r)) translateX(-.08em); }
    to   { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); transform: rotate(var(--r)); }
  }
}

/* ============ LEDs & screws ============ */
.led {
  display: inline-block;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--led-off);
  box-shadow: inset 0 -1px 1px rgb(0 0 0 / .5);
  flex: none;
}
.led--on { background: var(--led); box-shadow: 0 0 0 1px rgb(0 0 0 / .35), 0 1px 3px rgb(55 212 106 / .55); }
.led--amber { background: var(--led-amber); box-shadow: 0 0 0 1px rgb(0 0 0 / .35), 0 1px 3px rgb(255 174 26 / .5); }
@media (prefers-reduced-motion: no-preference) {
  .led--blink { animation: blink 1.9s steps(1) infinite; }
  .led--blink:nth-of-type(2n) { animation-duration: 1.3s; animation-delay: -.4s; }
  @keyframes blink { 0%, 62% { opacity: 1; } 63%, 78% { opacity: .25; } 79%, 86% { opacity: 1; } 87%, 100% { opacity: .35; } }
}

.screw {
  position: absolute;
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--steel);
  box-shadow: 0 0 0 1.5px #0b0c0d;
}
.screw::after {
  content: ""; position: absolute; inset: 5.5px 2px; background: #3a3d40; border-radius: 1px; transform: rotate(var(--sr, 32deg));
}

/* ============ Topbar ============ */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: var(--panel);
  color: var(--on-panel);
  border-bottom: 1px solid #000;
  box-shadow: 0 6px 14px -8px rgb(0 0 0 / .45);
}
.topbar__in {
  max-width: var(--max); margin: 0 auto;
  display: flex; align-items: center; gap: var(--s-5);
  padding: .7rem calc(var(--rail-w) + var(--s-5));
  min-height: 56px;
}
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--on-panel); }
.brand .mono { font-weight: 700; letter-spacing: .08em; }
.topbar__meta { display: flex; gap: var(--s-5); color: var(--on-panel-2); margin-right: auto; font-family: var(--f-sans); font-size: .82rem; letter-spacing: .01em; }
.topbar__meta b { font-family: var(--f-mono); font-size: .75rem; }
.topbar__meta b { color: var(--on-panel); font-weight: 500; }
.topnav { display: flex; gap: .35rem; }
.topnav a {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .45rem .75rem;
  font-size: .86rem; font-weight: 600; font-variation-settings: "wdth" 88;
  text-decoration: none; color: var(--on-panel);
  background: var(--panel-2);
  border: 1px solid #000;
  border-radius: 3px;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .05);
  transition: background-color .2s, color .2s;
}
.port-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--led-off); transition: background-color .2s, box-shadow .2s; }
.topnav a:hover, .topnav a:focus-visible { background: var(--panel-3); }
.topnav a:hover .port-dot, .topnav a[aria-current="true"] .port-dot { background: var(--led); box-shadow: 0 1px 3px rgb(55 212 106 / .7); }
.topnav__cta { background: var(--burg) !important; color: var(--ink) !important; border-color: var(--burg-edge) !important; }
.topnav__cta .port-dot { background: var(--ink); }
.topnav__cta:hover { background: var(--cable-2) !important; }

/* ============ Rack frame ============ */
.rack {
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 calc(var(--rail-w) + var(--s-5));
}
/* 19" mounting rails with square holes */
.rack::before, .rack::after {
  content: "";
  position: absolute; top: 0; bottom: 0;
  width: var(--rail-w);
  background:
    linear-gradient(to bottom, var(--rail-hole) 0 9px, transparent 9px 15.8px) center 6px / 9px 15.8px repeat-y,
    linear-gradient(90deg, rgb(255 255 255 / .06), transparent 20%, transparent 78%, rgb(0 0 0 / .3)),
    var(--rail);
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / .12);
}
.rack::before { left: 0; }
.rack::after { right: 0; }

.unit {
  position: relative;
  padding: var(--s-9) 0;
  border-top: 1px solid var(--cab-line);
}
.unit:first-child { border-top: 0; }
/* rack-unit mark in the rail */
.unit::before {
  content: attr(data-he);
  position: absolute;
  left: calc(-1 * (var(--rail-w) + var(--s-5)));
  top: var(--s-6);
  width: var(--rail-w);
  padding: .3rem 0;
  font-family: var(--f-mono);
  font-variation-settings: "wdth" 75;
  font-size: .6rem;
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
  color: var(--ink);
  background: var(--graph);
  box-shadow: 0 1px 2px rgb(0 0 0 / .3);
  z-index: 1;
}

.unit__head { display: grid; gap: var(--s-4); margin-bottom: var(--s-7); }
.unit__sub { color: var(--ink-3); font-size: 1rem; max-width: 46ch; }

/* ============ Buttons ============ */
.btn {
  display: inline-flex; align-items: center; gap: .6rem;
  min-height: 52px;
  padding: .8rem 1.35rem;
  font-weight: 700; font-size: 1rem; font-variation-settings: "wdth" 90;
  text-decoration: none;
  border-radius: 3px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .25s var(--ease-out), box-shadow .25s var(--ease-out), background-color .2s;
}
.btn--primary {
  background: var(--burg); color: var(--ink);
  box-shadow: 0 2px 0 var(--burg-edge), 0 10px 20px -10px rgb(0 0 0 / .7);
}
.btn--primary .ico { color: var(--ink); }
.btn--primary:hover { transform: translateY(-2px); background: var(--cable-2); box-shadow: 0 2px 0 var(--burg-edge), 0 16px 24px -12px rgb(0 0 0 / .7); }
.btn--primary:active { transform: translateY(1px); box-shadow: 0 1px 0 var(--burg-edge), 0 6px 12px -8px rgb(0 0 0 / .5); }

.btn--port, .btn--ghost {
  background: rgb(255 255 255 / .03);
  border-color: #4a4449;
  color: var(--ink);
}
.btn--port:hover, .btn--ghost:hover { background: var(--graph); }
.btn--ghost.is-done { background: var(--burg); border-color: var(--burg); color: var(--ink); }

/* ============ Hero ============ */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: var(--s-8);
  align-items: center;
  padding-top: var(--s-8);
  padding-bottom: var(--s-8);
  min-height: calc(100svh - 56px);
}
.hero__text { display: grid; gap: var(--s-5); justify-items: start; }
.hero__name { display: grid; gap: .18em; justify-items: start; margin-bottom: var(--s-2); }
.hero__name .tape:nth-child(2) { margin-left: .5em; }
.hero__first { display: flex; align-items: flex-end; gap: .35em; }
.hero__middle { font-size: clamp(1.1rem, 2.4vw, 1.6rem); padding: .3em .5em .25em; margin-bottom: .35em; text-transform: none; font-variation-settings: "wdth" 80; }
.hero__role { margin-bottom: var(--s-2); }
.hero__lede { font-size: clamp(1.15rem, 1.6vw, 1.35rem); line-height: 1.5; max-width: 34ch; color: var(--ink); font-variation-settings: "wdth" 96; }
.hero__joke { font-style: italic; color: var(--ink-3); font-size: 1.02rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-3); }

/* the slide-in bay holding the portrait */
.bay {
  position: relative;
  margin: 0;
  padding: 22px 22px 0;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border-radius: 4px;
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / .06),
    0 0 0 1px #2a2a2f,
    0 30px 50px -28px rgb(0 0 0 / .65);
  transform: rotate(.6deg);
}
.screw--tl { top: 5px; left: 5px; }
.screw--tr { top: 5px; right: 5px; --sr: 78deg; }
.screw--bl { bottom: 5px; left: 5px; --sr: 12deg; }
.screw--br { bottom: 5px; right: 5px; --sr: 55deg; }
.bay__photo { position: relative; }
.bay__photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 22%;
  border-radius: 2px;
  box-shadow: 0 0 0 1px #000, inset 0 0 0 1px rgb(255 255 255 / .1);
}
.bay__label { position: absolute; left: -26px; bottom: 28px; }
.bay__status {
  display: flex; align-items: center; gap: var(--s-4);
  padding: .9rem 4px 1.05rem;
  color: var(--on-panel-2);
  font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  font-variation-settings: "wdth" 80;
}
.stat { display: inline-flex; align-items: center; gap: .4rem; }
.stat--end { margin-left: auto; text-transform: none; letter-spacing: .04em; font-weight: 400; }

/* ============ About ============ */
.about {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: var(--s-8);
  align-items: start;
}
.about__copy { display: grid; gap: var(--s-4); justify-items: start; }
.about__copy h2 { margin-bottom: var(--s-4); }
.about__copy p { max-width: 62ch; color: var(--ink-2); }
.about__copy p:first-of-type { font-size: 1.2rem; color: var(--ink); line-height: 1.55; }
.about__sign { font-weight: 700; color: var(--ink) !important; font-variation-settings: "wdth" 92; margin-top: var(--s-2); }

.sheet {
  background: var(--graph);
  border-radius: 3px;
  box-shadow: 0 0 0 1px #34343a, 0 2px 4px rgb(0 0 0 / .08), 0 18px 34px -24px rgb(0 0 0 / .45);
  transform: rotate(-.7deg);
}
.sheet__head {
  display: flex; justify-content: space-between;
  padding: .7rem 1.1rem;
  background: var(--panel); color: var(--on-panel);
  border-radius: 3px 3px 0 0;
}
.sheet__head { font-size: .85rem; font-variation-settings: "wdth" 85; }
.sheet__head span:first-child { font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.sheet__list { margin: 0; padding: .4rem 1.1rem; }
.sheet__list div {
  display: grid; grid-template-columns: 8.5rem 1fr; gap: var(--s-3);
  padding: .62rem 0;
  border-bottom: 1px dashed var(--cab-line);
}
.sheet__list dt { font-size: .8rem; font-weight: 600; font-variation-settings: "wdth" 85; letter-spacing: .02em; color: var(--ink-3); padding-top: .2rem; }
.sheet__list dd { margin: 0; font-weight: 600; font-size: .98rem; line-height: 1.35; }
.sheet__load { padding: .9rem 1.1rem 1.2rem; }
.sheet__loadhead { display: flex; justify-content: space-between; align-items: baseline; font-weight: 700; margin-bottom: .55rem; }
.slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.slot { height: 16px; background: var(--cab-deep); border-radius: 2px; box-shadow: inset 0 1px 2px rgb(0 0 0 / .18); }
.slot--done { background: var(--burg-light); }
.slot--now { background: linear-gradient(90deg, var(--burg-light) 0 50%, var(--cab-deep) 50%); }
@media (prefers-reduced-motion: no-preference) {
  .slot--now { background-size: 200% 100%; background-image: linear-gradient(90deg, var(--burg-light) 0 50%, var(--cab-deep) 50%); animation: fill 3.2s var(--ease-out) infinite alternate; }
  @keyframes fill { from { background-position: 100% 0; } to { background-position: 40% 0; } }
}

/* ============ Projects: devices ============ */
.devices { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.device {
  --cable: var(--cable-1);
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--s-6);
  align-items: stretch;
  padding: var(--s-6) var(--s-6) var(--s-6) var(--s-7);
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  color: var(--on-panel);
  border-radius: 3px;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .06), 0 0 0 1px #2a2a2f, 0 14px 24px -18px rgb(0 0 0 / .7);
  transition: transform .35s var(--ease-out);
}
/* rack ears */
.device::before, .device::after {
  content: ""; position: absolute; top: 50%; width: 9px; height: 9px; border-radius: 50%;
  background: var(--steel); box-shadow: 0 0 0 1.5px #0b0c0d;
  transform: translateY(-50%);
}
.device::before { left: -22px; }
.device::after { right: -22px; }
.device:hover { transform: translateX(6px); }
.device__face { display: grid; gap: .7rem; align-content: start; justify-items: start; }
.device__title {
  font-size: clamp(1.4rem, 2.8vw, 2.1rem);
  margin-bottom: .35rem;
  --r: -.5deg;
}
.device:nth-child(even) .device__title { --r: .6deg; }
.device__body { color: var(--on-panel); opacity: .92; max-width: 62ch; }
.device__warn { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-top: .35rem; font-size: .92rem; color: var(--on-panel-2); }
.device__warn span {
  font-variation-settings: "wdth" 85; font-size: .72rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .1em;
  padding: .28rem .5rem;
  background: var(--cable); color: #fff;
  border-radius: 2px;
}
.device__io {
  display: flex; flex-direction: column; justify-content: space-between; align-items: flex-end; gap: var(--s-4);
  min-width: 11rem;
}
.leds { display: flex; gap: 6px; padding-top: .3rem; }
.jack {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .6rem .8rem;
  font-weight: 600; font-variation-settings: "wdth" 88; font-size: .9rem;
  text-decoration: none;
  color: var(--on-panel);
  background: #0c0d0e;
  border: 1px solid #000;
  border-radius: 3px;
  box-shadow: inset 0 2px 4px rgb(0 0 0 / .7), 0 1px 0 rgb(255 255 255 / .06);
  position: relative;
  transition: background-color .2s, color .2s;
}
a.jack::before {
  content: ""; width: 10px; height: 10px; border-radius: 2px; flex: none;
  background: var(--cable);
  box-shadow: 0 0 0 2px #000;
}
a.jack:hover { background: var(--cable); color: #fff; }
a.jack:hover::before { background: #fff; }
.jack--local { color: var(--on-panel-2); box-shadow: none; background: transparent; border-color: rgb(255 255 255 / .12); }

/* ============ Skills: patch panel ============ */
.patch { position: relative; }
.patch__panel {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: var(--s-5);
  padding: 1.4rem 3.2rem 1.6rem;
  background: linear-gradient(180deg, #26282b, var(--panel) 40%);
  border-radius: 3px;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .07), 0 0 0 1px #2a2a2f, 0 22px 40px -26px rgb(0 0 0 / .75);
  z-index: 1;
}
.screw--l { left: 14px; top: 50%; transform: translateY(-50%); }
.screw--r { right: 14px; top: 50%; transform: translateY(-50%); --sr: 70deg; }
.patch__ports {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: var(--s-4);
}
.port {
  --cable: var(--cable-1);
  display: grid;
  justify-items: center;
  gap: .6rem;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--on-panel-2);
}
.port__label { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.port__jack {
  position: relative;
  width: 58px; height: 50px;
  background: #050506;
  border-radius: 3px;
  box-shadow: inset 0 3px 6px rgb(0 0 0 / .9), 0 0 0 2px #3a3d41, 0 0 0 3px #0a0a0b;
  transition: box-shadow .25s var(--ease-out);
}
/* RJ45 keyway */
.port__jack::before {
  content: ""; position: absolute; left: 50%; bottom: 7px; width: 22px; height: 9px;
  transform: translateX(-50%);
  background: #1a1b1d; border-radius: 1px;
}
.port__jack::after {
  content: ""; position: absolute; left: 12px; right: 12px; top: 9px; height: 6px;
  background: repeating-linear-gradient(90deg, #b99a3a 0 2px, transparent 2px 4.2px);
  opacity: .8;
}
.port__led { position: absolute; top: -12px; right: 2px; width: 6px; height: 6px; border-radius: 50%; background: var(--led-off); transition: background-color .2s, box-shadow .2s; }
.port__no { font-size: .66rem; color: var(--on-panel-2); }
.port:hover .port__jack { box-shadow: inset 0 3px 6px rgb(0 0 0 / .9), 0 0 0 2px var(--cable), 0 0 0 3px #0a0a0b; }
.port:focus-visible { outline: none; }
.port:focus-visible .port__jack { box-shadow: inset 0 3px 6px rgb(0 0 0 / .9), 0 0 0 3px var(--burg-light), 0 0 0 5px #000; }
.port[aria-pressed="true"] .port__led,
.port--zeno.is-linked .port__led { background: var(--led); box-shadow: 0 1px 4px rgb(55 212 106 / .9); }
.port[aria-pressed="true"] .port__label { background: var(--burg); }
.port[aria-pressed="true"] .port__no { color: var(--on-panel); }

.port--zeno {
  flex: none;
  padding-left: var(--s-5);
  border-left: 1px solid rgb(255 255 255 / .1);
  cursor: default;
}

.patch__cable {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  overflow: visible;
  pointer-events: none;
  z-index: 2;
}
.cable-path { fill: none; stroke-linecap: round; }

.readout {
  position: relative;
  justify-items: start;
  margin-top: 150px;
  padding: 1.4rem 1.6rem 1.7rem;
  background: var(--graph);
  border-radius: 3px;
  box-shadow: 0 0 0 1px #34343a, 0 2px 4px rgb(0 0 0 / .08), 0 20px 40px -26px rgb(0 0 0 / .5);
  display: grid; gap: .6rem;
  min-height: 11.5rem;
  max-width: 44rem;
  margin-left: auto;
}
.readout__bar { justify-self: stretch; display: flex; justify-content: space-between; gap: var(--s-4); color: var(--ink-3); padding-bottom: .55rem; border-bottom: 1px dashed var(--cab-line); }
#ro-state { display: inline-flex; align-items: center; gap: .45rem; }
#ro-state::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--led-off); }
.readout.is-linked #ro-state::before { background: var(--led); box-shadow: 0 1px 3px rgb(55 212 106 / .8); }
.readout__title { font-size: clamp(1.3rem, 2.4vw, 1.8rem); --r: -.6deg; margin: .3rem 0 .2rem; }
.readout__body { color: var(--ink-2); max-width: 58ch; font-size: 1.05rem; }
@media (prefers-reduced-motion: no-preference) {
  .readout.is-swap .readout__title, .readout.is-swap .readout__body, .readout.is-swap .readout__list, .readout.is-swap .readout__note { animation: swap .5s var(--ease-out); }
  @keyframes swap { from { opacity: 0; filter: blur(3px); transform: translateY(4px); } to { opacity: 1; filter: blur(0); transform: none; } }
}

/* ============ Contact ============ */
.contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 20rem);
  gap: var(--s-8);
  align-items: center;
  padding-bottom: var(--s-9);
}
.contact__main { display: grid; gap: var(--s-5); justify-items: start; }
.contact__h { display: grid; gap: .16em; justify-items: start; font-size: clamp(2.6rem, 7.4vw, 5.6rem); }
.contact__h .tape:nth-child(2) { margin-left: .4em; }
.contact__lede { max-width: 48ch; font-size: 1.15rem; color: var(--ink-2); }
.mailtape { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-4); margin: var(--s-3) 0 var(--s-2); }
.tape--mail {
  font-size: clamp(1.5rem, 4.6vw, 3.1rem);
  text-transform: none;
  font-variation-settings: "wdth" 80;
  padding: .18em .5em .14em;
  transition: transform .3s var(--ease-out);
}
.tape--mail:hover { transform: rotate(0deg) translateY(-2px); }
.links { list-style: none; margin: 0; padding: .25rem 0 0; width: 100%; max-width: 40rem; border-top: 1px solid var(--ink); }
.links a {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: var(--s-4);
  padding: 1rem .25rem;
  border-bottom: 1px solid var(--cab-line);
  text-decoration: none; font-weight: 700; font-size: 1.1rem;
  transition: background-color .2s;
}
.links a > * { transition: transform .3s var(--ease-out); }
.links a:hover > * { transform: translateX(.6rem); }
.links__val { color: var(--ink-3); font-weight: 500; font-size: 1rem; }
.links a:hover { background: var(--graph); }

.sticker { margin: 0; position: relative; transform: rotate(3deg); justify-self: center; width: 100%; max-width: 20rem; }
.sticker img {
  aspect-ratio: 1; object-fit: cover; object-position: 50% 24%;
  border: 10px solid var(--graph);
  outline: 1px solid #3a3a40;
  box-shadow: 0 2px 4px rgb(0 0 0 / .12), 0 24px 40px -24px rgb(0 0 0 / .55);
}
.sticker figcaption { position: absolute; bottom: -14px; left: 50%; translate: -50% 0; white-space: nowrap; }

/* ============ Footer ============ */
.foot { background: var(--panel); color: var(--on-panel-2); }
.foot__in {
  max-width: var(--max); margin: 0 auto;
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-4) var(--s-6);
  padding: 1.6rem calc(var(--rail-w) + var(--s-5));
  font-size: .92rem;
}
.foot__in p:nth-child(2) { margin-right: auto; }
.foot__up { display: inline-flex; align-items: center; gap: .4rem; color: var(--on-panel); font-weight: 600; text-decoration: none; }
.foot__up:hover { color: var(--burg-light); }

/* ============ Responsive ============ */
@media (max-width: 1080px) {
  .topbar__meta span:first-child { display: none; }
  .patch__ports { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: var(--s-6); }
}

@media (max-width: 900px) {
  :root { --rail-w: 14px; }
  .rack { padding: 0 calc(var(--rail-w) + var(--s-4)); }
  .rack::before, .rack::after { background: linear-gradient(to bottom, var(--rail-hole) 0 5px, transparent 5px 12px) center 6px / 5px 12px repeat-y, var(--rail); }
  .unit::before { display: none; }
  .topbar__in { padding: .6rem var(--s-4); gap: var(--s-3); }
  .topbar__meta { display: none; }
  .brand { margin-right: auto; }
  .topnav a:not(.topnav__cta) { display: none; }

  .unit { padding: var(--s-8) 0; }
  .hero { grid-template-columns: 1fr; gap: var(--s-7); min-height: 0; padding-top: var(--s-6); }
  .hero { gap: var(--s-5); padding-top: var(--s-5); }
  .hero__text { gap: var(--s-4); }
  .tape--xl { font-size: clamp(2.6rem, 13vw, 3.2rem); }
  .hero__lede { font-size: 1.05rem; }
  .hero__joke { font-size: .95rem; }
  .hero__actions { margin-top: 0; }
  .bay { order: -1; max-width: 12.5rem; width: 100%; justify-self: center; padding: 12px 12px 0; }
  .bay__photo img { aspect-ratio: 1; }
  .bay__label { font-size: .7rem; left: -14px; bottom: 12px; }
  .bay__label-long { display: none; }
  .bay__status { gap: .7rem; font-size: .7rem; }
  .bay__label { bottom: 18px; }
  .bay__label { left: -10px; }
  .about { grid-template-columns: 1fr; gap: var(--s-7); }
  .contact { grid-template-columns: 1fr; gap: var(--s-7); }
  .sticker { max-width: 15rem; }

  .device { grid-template-columns: 1fr; gap: var(--s-4); padding: var(--s-5); }
  .device::before, .device::after { display: none; }
  .device__io { flex-direction: row; align-items: center; min-width: 0; }
  .device:hover { transform: none; }

  .patch__panel { flex-direction: column; padding: 1.4rem 1.2rem 1.4rem; gap: var(--s-5); }
  .screw--l, .screw--r { top: 12px; transform: none; }
  .port--zeno { padding: var(--s-4) 0 0; border-left: 0; border-top: 1px solid rgb(255 255 255 / .1); }
  .readout { margin-top: var(--s-5); }
  .patch__panel { padding-bottom: 3.4rem; }
}

@media (max-width: 520px) {
  body { font-size: 1rem; }
  .hero__name .tape:nth-child(2) { margin-left: .25em; }
  .tape--md { font-size: .82rem; }
  .patch__ports { column-gap: var(--s-3); }
  .port__jack { width: 50px; height: 44px; }
  .port__label.tape--xs { font-size: .7rem; }
  .sheet__list div { grid-template-columns: 1fr; gap: .15rem; }
  .links a { grid-template-columns: auto 1fr; }
  .links__val { grid-column: 2; }
  .foot__in p:nth-child(2) { margin-right: 0; }
}

/* plugged ports: the boot covers the port number */
.port[aria-pressed="true"] .port__no,
.port--zeno.is-linked .port__no { visibility: hidden; }
@media (max-width: 900px) { .stat--end { display: none; } }

/* readout detail */
.readout__list { list-style: none; margin: .4rem 0 0; padding: 0; display: grid; gap: .55rem; max-width: 62ch; }
.readout__list li { position: relative; padding-left: 1.4rem; color: var(--ink-2); line-height: 1.5; }
.readout__list li::before { content: ""; position: absolute; left: 0; top: .6em; width: .6rem; height: 2px; background: var(--burg-light); }
.readout__note { margin-top: .5rem; padding-top: .7rem; border-top: 1px dashed var(--cab-line); color: var(--ink-3); font-style: italic; }
.readout { max-width: 52rem; }
