/* ============================================================
   v3 — "Operator's Manual / Control Panel"
   Custom CSS layered on Tailwind v4 browser build.
   Theme tokens (resin, panel, bone, signal, ember, fonts) are
   declared in <style type="text/tailwindcss"> in index.html.
   This file holds plain CSS + dual-theme (dark/light) overrides.
   ============================================================ */

/* ─── Theme RGB triplets (for rgba() usage) — dark defaults ─── */
:root {
  --bone-rgb: 242, 237, 224;
  --signal-rgb: 232, 255, 58;
  --ember-rgb: 255, 77, 46;
  --resin-rgb: 12, 11, 9;
  --panel-rgb: 20, 18, 14;
  --panel-2-rgb: 28, 25, 19;
  --grid-color: rgba(242, 237, 224, 0.025);
}

/* ─── Light theme — "Drafting Paper" ─── */
[data-theme="light"] {
  --color-resin: #F2EDE0;
  --color-panel: #E8E1D2;
  --color-panel-2: #DED6C5;
  --color-line: rgba(26, 24, 20, 0.1);
  --color-line-strong: rgba(26, 24, 20, 0.2);
  --color-bone: #1A1814;
  --color-bone-dim: rgba(26, 24, 20, 0.68);
  --color-bone-faint: rgba(26, 24, 20, 0.42);
  --color-signal: #8A6A00;
  --color-ember: #C73E1A;

  --bone-rgb: 26, 24, 20;
  --signal-rgb: 138, 106, 0;
  --ember-rgb: 199, 62, 26;
  --resin-rgb: 242, 237, 224;
  --panel-rgb: 232, 225, 210;
  --panel-2-rgb: 222, 214, 197;
  --grid-color: rgba(26, 24, 20, 0.03);
}

html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body { font-family: 'Bricolage Grotesque', system-ui, sans-serif; font-weight: 300; }

/* ─── Atmospheric layers ─── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 60% at 20% 0%, rgba(var(--signal-rgb), 0.04), transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 100%, rgba(var(--ember-rgb), 0.03), transparent 60%);
}

/* Grain overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.4;
  mix-blend-mode: overlay;
  background-image:
    radial-gradient(rgba(var(--bone-rgb), 0.05) 1px, transparent 1px),
    radial-gradient(rgba(var(--bone-rgb), 0.03) 1px, transparent 1px);
  background-size: 3px 3px, 7px 7px;
  background-position: 0 0, 1px 2px;
}
[data-theme="light"] body::after { mix-blend-mode: multiply; opacity: 0.5; }

/* Hero scanlines (subtle, hero only) */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: repeating-linear-gradient(
    180deg,
    transparent 0,
    transparent 3px,
    rgba(var(--bone-rgb), 0.012) 3px,
    rgba(var(--bone-rgb), 0.012) 4px
  );
}
.hero > div { position: relative; z-index: 1; }

/* ─── Custom cursor (fine-pointer only) ─── */
.cursor, .cursor-ring {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 100;
  mix-blend-mode: difference;
}
.cursor {
  width: 6px; height: 6px;
  background: var(--color-signal);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.15s, height 0.15s, opacity 0.2s;
}
.cursor-ring {
  width: 28px; height: 28px;
  border: 1px solid rgba(var(--signal-rgb), 0.5);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.25s, height 0.25s, border-color 0.25s, opacity 0.2s;
}
.cursor.is-active { width: 10px; height: 10px; }
.cursor-ring.is-active { width: 44px; height: 44px; border-color: rgba(var(--signal-rgb), 0.9); }
@media (hover: none), (pointer: coarse) {
  .cursor, .cursor-ring { display: none; }
}

/* ─── Left vertical spine ─── */
.spine {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 32px;
  border-right: 1px solid rgba(var(--bone-rgb), 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 40;
  background: rgba(var(--resin-rgb), 0.6);
  backdrop-filter: blur(8px);
}
.spine-text {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: rgba(var(--bone-rgb), 0.32);
  white-space: nowrap;
}

/* ─── Telemetry bar ─── */
.telemetry-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  background: rgba(var(--resin-rgb), 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(var(--bone-rgb), 0.08);
}
@media (min-width: 1024px) {
  .telemetry-bar { left: 32px; }
}

/* ─── Nav bar ─── */
.nav-bar {
  position: fixed;
  top: 32px; left: 0; right: 0;
  z-index: 40;
  background: rgba(var(--resin-rgb), 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(var(--bone-rgb), 0.06);
}
@media (min-width: 1024px) {
  .nav-bar { left: 32px; }
}
@media (max-width: 1023px) {
  .nav-bar { top: 32px; }
}

.nav-link {
  position: relative;
  transition: color 0.2s ease;
}
.nav-link:hover { color: var(--color-bone); }
.nav-link::after {
  content: '';
  position: absolute;
  left: 0; bottom: -4px;
  width: 0; height: 1px;
  background: var(--color-signal);
  transition: width 0.25s ease;
}
.nav-link:hover::after, .nav-link.is-active::after { width: 100%; }
.nav-link.is-active { color: var(--color-bone); }
.mobile-link { transition: color 0.2s ease; }
.mobile-link:hover { color: var(--color-signal); }

/* Offset anchors for fixed header + spine */
section[id] { scroll-margin-top: 100px; }

/* ─── LEDs ─── */
.led {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.led-signal {
  background: var(--color-signal);
  box-shadow: 0 0 6px rgba(var(--signal-rgb), 0.7), 0 0 12px rgba(var(--signal-rgb), 0.3);
}
[data-theme="light"] .led-signal {
  box-shadow: 0 0 4px rgba(var(--signal-rgb), 0.5), 0 0 8px rgba(var(--signal-rgb), 0.2);
}
.led-ember {
  background: var(--color-ember);
  box-shadow: 0 0 6px rgba(var(--ember-rgb), 0.7), 0 0 12px rgba(var(--ember-rgb), 0.3);
  animation: led-pulse 2s ease-in-out infinite;
}
[data-theme="light"] .led-ember {
  box-shadow: 0 0 4px rgba(var(--ember-rgb), 0.5), 0 0 8px rgba(var(--ember-rgb), 0.2);
}
@keyframes led-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}
@media (prefers-reduced-motion: reduce) {
  .led-ember { animation: none; }
}

/* ─── Hero stroke text (signature moment) ─── */
.stroke-text {
  color: transparent;
  -webkit-text-stroke: 2px var(--color-bone);
  text-stroke: 2px var(--color-bone);
}
@media (max-width: 640px) {
  .stroke-text { -webkit-text-stroke: 1.5px var(--color-bone); }
}

/* ─── Buttons ─── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: var(--color-signal);
  color: var(--color-resin);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: 4px;
  transition: all 0.2s ease;
  position: relative;
}
.btn-primary:hover {
  background: var(--color-bone);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px -8px rgba(var(--signal-rgb), 0.5);
}
.btn-bracket { color: rgba(var(--resin-rgb), 0.5); transition: color 0.2s; }
.btn-primary:hover .btn-bracket { color: rgba(var(--resin-rgb), 0.9); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.125rem;
  border: 1px solid rgba(var(--bone-rgb), 0.14);
  color: var(--color-bone);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8125rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: 4px;
  transition: all 0.2s ease;
}
.btn-ghost:hover {
  border-color: var(--color-signal);
  color: var(--color-signal);
}

/* ─── Theme toggle button ─── */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 2px 8px;
  border: 1px solid rgba(var(--bone-rgb), 0.15);
  border-radius: 2px;
  background: transparent;
  color: rgba(var(--bone-rgb), 0.6);
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: all 0.2s ease;
}
.theme-toggle:hover {
  border-color: var(--color-signal);
  color: var(--color-signal);
}
.theme-toggle svg { flex-shrink: 0; }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="light"] .theme-toggle .icon-sun { display: block; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }

/* ─── Spec table ─── */
.spec-cell {
  background: var(--color-resin);
  padding: 0.875rem 1rem;
}
.spec-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: rgba(var(--bone-rgb), 0.4);
}
.spec-value {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-bone);
  margin-top: 0.25rem;
  line-height: 1;
}

/* ─── Operator card (avatar) ─── */
.operator-card { max-width: 280px; }
.operator-frame {
  position: relative;
  aspect-ratio: 1;
  border: 1px solid rgba(var(--bone-rgb), 0.14);
  overflow: hidden;
}
.operator-frame img {
  filter: grayscale(0.2) contrast(1.05);
  transition: filter 0.5s ease;
}
.operator-card:hover .operator-frame img { filter: grayscale(0) contrast(1.1); }
.corner {
  position: absolute;
  width: 14px; height: 14px;
  border-color: var(--color-signal);
  z-index: 2;
}
.corner-tl { top: -1px; left: -1px; border-top: 2px solid; border-left: 2px solid; }
.corner-tr { top: -1px; right: -1px; border-top: 2px solid; border-right: 2px solid; }
.corner-bl { bottom: -1px; left: -1px; border-bottom: 2px solid; border-left: 2px solid; }
.corner-br { bottom: -1px; right: -1px; border-bottom: 2px solid; border-right: 2px solid; }

/* ─── Marquee ─── */
.marquee {
  display: inline-flex;
  gap: 1.25rem;
  align-items: center;
  will-change: transform;
  animation: marquee-scroll 42s linear infinite;
}
.marquee span { white-space: nowrap; }
@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .marquee { animation: none; }
}

/* ─── Tags ─── */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.75rem;
  border: 1px solid rgba(var(--bone-rgb), 0.12);
  color: rgba(var(--bone-rgb), 0.7);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-radius: 2px;
  transition: all 0.2s ease;
}
.tag:hover {
  border-color: var(--color-signal);
  color: var(--color-signal);
}

/* ─── Margin note (about) ─── */
.margin-note {
  margin-top: 1.5rem;
  padding-left: 1rem;
  border-left: 1px solid rgba(var(--signal-rgb), 0.3);
}

/* ─── Schematic divider ─── */
.schematic-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 2rem 1.5rem;
  max-width: 6xl;
  margin: 0 auto;
}
.sd-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--bone-rgb), 0.15), rgba(var(--bone-rgb), 0.15), transparent);
  max-width: 200px;
}
.sd-node {
  width: 6px; height: 6px;
  background: var(--color-signal);
  transform: rotate(45deg);
  box-shadow: 0 0 8px rgba(var(--signal-rgb), 0.5);
}
.sd-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.25em;
  color: rgba(var(--bone-rgb), 0.45);
  text-transform: uppercase;
}

/* ─── Log entry (experience) ─── */
.log-entry {
  border: 1px solid rgba(var(--bone-rgb), 0.08);
  background: rgba(var(--panel-rgb), 0.6);
  border-radius: 4px;
  transition: border-color 0.25s ease, background 0.25s ease;
}
.log-entry:hover {
  border-color: rgba(var(--signal-rgb), 0.25);
  background: rgba(var(--panel-2-rgb), 0.8);
}
.log-head {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 1rem;
  padding: 0.625rem 1rem;
  border-bottom: 1px solid rgba(var(--bone-rgb), 0.06);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
}
.log-ts {
  color: rgba(var(--bone-rgb), 0.55);
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.log-bar {
  height: 4px;
  background: rgba(var(--bone-rgb), 0.06);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}
.log-bar > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--color-signal), rgba(var(--signal-rgb), 0.4));
  border-radius: 2px;
}
.log-dur {
  color: rgba(var(--bone-rgb), 0.7);
  white-space: nowrap;
}
.log-status {
  color: var(--color-signal);
  font-size: 9px;
  letter-spacing: 0.18em;
  padding: 2px 6px;
  border: 1px solid rgba(var(--signal-rgb), 0.3);
  border-radius: 2px;
}
.log-entry .log-status:not(:first-of-type) { /* placeholder */ }
.log-entry:nth-child(1) .log-status { color: var(--color-signal); border-color: rgba(var(--signal-rgb), 0.4); }
.log-status:is([data-closed]) { color: rgba(var(--bone-rgb), 0.4); border-color: rgba(var(--bone-rgb), 0.15); }

.log-body { padding: 1.25rem 1.25rem 1.5rem; }
.log-title {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-bone);
  letter-spacing: -0.01em;
}
.log-org {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--color-signal);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-left: 0.5rem;
}
.log-events {
  margin-top: 0.875rem;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  list-style: none;
}
.log-events li {
  position: relative;
  padding-left: 1.25rem;
  color: rgba(var(--bone-rgb), 0.72);
  font-size: 0.9375rem;
  line-height: 1.5;
}
.log-events li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--color-signal);
  font-size: 0.75rem;
  top: 2px;
}

/* Compact sub-entries */
.sub-entry {
  border: 1px solid rgba(var(--bone-rgb), 0.08);
  padding: 0.875rem 1rem;
  border-radius: 3px;
  background: rgba(var(--resin-rgb), 0.5);
}
.sub-entry h4 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--color-bone);
}
.sub-org {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6875rem;
  color: var(--color-signal);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 0.25rem;
}
.sub-ts {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6875rem;
  color: rgba(var(--bone-rgb), 0.4);
  margin-top: 0.125rem;
}
.sub-desc {
  font-size: 0.8125rem;
  color: rgba(var(--bone-rgb), 0.65);
  margin-top: 0.5rem;
  line-height: 1.5;
}

/* ─── Rack unit (skills) ─── */
.rack-unit {
  border: 1px solid rgba(var(--bone-rgb), 0.08);
  background: rgba(var(--panel-rgb), 0.5);
  border-radius: 4px;
  overflow: hidden;
  transition: border-color 0.25s ease, transform 0.25s ease;
}
.rack-unit:hover {
  border-color: rgba(var(--signal-rgb), 0.3);
  transform: translateY(-2px);
}
.rack-head {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.625rem 0.875rem;
  border-bottom: 1px solid rgba(var(--bone-rgb), 0.06);
  background: rgba(var(--panel-2-rgb), 0.6);
}
.rack-id {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  color: rgba(var(--bone-rgb), 0.4);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.rack-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--color-bone);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 500;
  flex: 1;
}
.rack-body {
  padding: 0.75rem 0.875rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  list-style: none;
}
.rack-body li {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  color: rgba(var(--bone-rgb), 0.75);
  font-size: 0.9375rem;
  transition: color 0.2s ease;
}
.rack-unit:hover .rack-body li { color: var(--color-bone); }
.rack-body .led { transition: box-shadow 0.25s ease; }
.rack-unit:hover .led-signal {
  box-shadow: 0 0 10px rgba(var(--signal-rgb), 0.9), 0 0 18px rgba(var(--signal-rgb), 0.4);
}
[data-theme="light"] .rack-unit:hover .led-signal {
  box-shadow: 0 0 6px rgba(var(--signal-rgb), 0.6), 0 0 12px rgba(var(--signal-rgb), 0.25);
}

/* ─── Directory (projects) ─── */
.directory {
  border: 1px solid rgba(var(--bone-rgb), 0.08);
  border-radius: 4px;
  overflow: hidden;
  background: rgba(var(--panel-rgb), 0.5);
}
.dir-head, .dir-row {
  display: grid;
  grid-template-columns: 90px 1fr 60px 60px 130px 100px;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 1rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
}
@media (max-width: 640px) {
  .dir-head, .dir-row { grid-template-columns: 80px 1fr 50px 50px; }
}
.dir-head {
  background: rgba(var(--panel-2-rgb), 0.7);
  border-bottom: 1px solid rgba(var(--bone-rgb), 0.1);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(var(--bone-rgb), 0.4);
}
.dir-row {
  border-bottom: 1px solid rgba(var(--bone-rgb), 0.04);
  color: rgba(var(--bone-rgb), 0.75);
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.dir-row:last-child { border-bottom: none; }
.dir-row:hover {
  background: rgba(var(--signal-rgb), 0.05);
  color: var(--color-bone);
}
.dir-perm { color: rgba(var(--bone-rgb), 0.4); font-size: 11px; }
.dir-name {
  color: var(--color-bone);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
}
.dir-icon { font-size: 10px; transition: transform 0.2s ease; }
.dir-row:hover .dir-icon { transform: translateX(2px); }
.dir-meta { color: rgba(var(--bone-rgb), 0.6); font-size: 11px; }
.dir-lang {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: flex-end;
  color: rgba(var(--bone-rgb), 0.7);
  font-size: 11px;
}
.lang-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.lang-js { background: #F7DF1E; }
.lang-ts { background: #3178C6; }

/* ─── Transmit panel (contact) ─── */
.transmit-panel {
  border: 1px solid rgba(var(--bone-rgb), 0.1);
  background: rgba(var(--panel-rgb), 0.5);
  border-radius: 4px;
  overflow: hidden;
}
.transmit-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.625rem 1rem;
  border-bottom: 1px solid rgba(var(--bone-rgb), 0.08);
  background: rgba(var(--panel-2-rgb), 0.6);
}
.transmit-body { padding: 2rem 1.5rem 2.5rem; }
@media (min-width: 768px) { .transmit-body { padding: 2.5rem 2.5rem 3rem; } }

.transmit-channel {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border: 1px solid rgba(var(--bone-rgb), 0.08);
  background: rgba(var(--resin-rgb), 0.5);
  border-radius: 3px;
  text-decoration: none;
  color: var(--color-bone);
  transition: all 0.2s ease;
}
.transmit-channel:hover {
  border-color: rgba(var(--signal-rgb), 0.35);
  background: rgba(var(--panel-rgb), 0.8);
  transform: translateY(-1px);
}
.transmit-channel-primary {
  border-color: rgba(var(--signal-rgb), 0.3);
  background: rgba(var(--signal-rgb), 0.04);
}
.tc-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  color: rgba(var(--bone-rgb), 0.4);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.tc-icon { color: var(--color-signal); display: flex; }
.tc-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--color-bone);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.transmit-channel-wide {
  grid-column: 1 / -1;
}
.transmit-channel-wide .tc-value {
  white-space: normal;
  word-break: break-word;
  font-size: 15px;
  font-weight: 600;
}
.tc-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  color: rgba(var(--bone-rgb), 0.4);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ─── Footer ASCII art ─── */
footer pre {
  display: inline-block;
  margin: 0;
  white-space: pre;
}

/* ─── Scroll reveal ─── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ─── Rack unit variants ─── */
.rack-unit-wide { /* spans 2 columns on md */ }
.rack-body-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
}
@media (min-width: 768px) {
  .rack-body-grid { grid-template-columns: 1fr 1fr; }
}

/* Skill assessment badge */
.skill-badge {
  display: inline-block;
  padding: 1px 4px;
  margin-left: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 8px;
  font-weight: 600;
  color: var(--color-resin);
  background: var(--color-signal);
  border-radius: 2px;
  letter-spacing: 0.05em;
  vertical-align: middle;
}

/* Credential date */
.cred-date {
  margin-left: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: rgba(var(--bone-rgb), 0.35);
  letter-spacing: 0.05em;
}

/* ─── Recommendation cards ─── */
.reco-card {
  border: 1px solid rgba(var(--bone-rgb), 0.08);
  background: rgba(var(--panel-rgb), 0.6);
  border-radius: 4px;
  padding: 1.5rem;
  transition: border-color 0.25s ease, background 0.25s ease;
}
.reco-card:hover {
  border-color: rgba(var(--signal-rgb), 0.25);
  background: rgba(var(--panel-2-rgb), 0.8);
}
.reco-head {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  margin-bottom: 1rem;
  padding-bottom: 0.875rem;
  border-bottom: 1px solid rgba(var(--bone-rgb), 0.06);
}
.reco-name {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-bone);
}
.reco-role {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-signal);
}
.reco-text {
  font-family: 'Instrument Serif', Georgia, serif;
  font-style: italic;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: rgba(var(--bone-rgb), 0.75);
}
.reco-meta {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(var(--bone-rgb), 0.06);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(var(--bone-rgb), 0.35);
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--color-resin); }
::-webkit-scrollbar-thumb {
  background: rgba(var(--bone-rgb), 0.15);
  border-radius: 5px;
  border: 2px solid var(--color-resin);
}
::-webkit-scrollbar-thumb:hover { background: rgba(var(--signal-rgb), 0.4); }

/* ─── Focus ─── */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--color-signal);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ─── Display font optical tuning ─── */
h1.font-display, h2.font-display {
  font-optical-sizing: auto;
  letter-spacing: -0.015em;
}

/* ─── Body padding for fixed spine on desktop ─── */
@media (min-width: 1024px) {
  body { padding-left: 32px; }
  .telemetry-bar .max-w-6xl,
  .nav-bar .max-w-6xl,
  main .max-w-6xl,
  footer .max-w-6xl { max-width: calc(72rem - 32px); }
}

/* ─── Top padding for fixed telemetry + nav ─── */
main { padding-top: 0; }
.hero { margin-top: 64px; }
@media (max-width: 1023px) {
  .hero { margin-top: 60px; }
}

/* ─── Theme transition ─── */
body, .telemetry-bar, .nav-bar, .spine,
.spec-cell, .log-entry, .rack-unit, .rack-head,
.directory, .dir-head, .transmit-panel, .transmit-head,
.transmit-channel, .sub-entry, .reco-card,
.btn-primary, .btn-ghost, .tag, .theme-toggle {
  transition-property: background-color, border-color, color, box-shadow;
  transition-duration: 0.3s;
  transition-timing-function: ease;
}
