/* ============================================================
   SKM portfolio — styles.css
   Design language: "Drafting" (v4) — the site as an engineering drawing set
      · graph-paper canvas: fixed blueprint grid behind everything
      · drawing frame with brighter corner ticks around the viewport
      · dimension lines, sheet tabs (SHT 01/06), balloons, a title block
      · brand = cyan line ink #22d3ee; markup red for annotations
      · stamp buttons: solid ink blocks with hard offset shadows, no glow
      · Barlow Condensed display (drafting lettering) + Inter body
      · light theme = warm drafting vellum, dark ink offsets — print block
   ============================================================ */

/* ---------------- Design tokens ---------------- */
:root,
[data-theme="dark"] {
  --bg: #0b1b30;              /* canvas: blueprint navy */
  --bg-raised: #0e213a;
  --surface: rgba(160, 200, 255, 0.05);     /* vellum wash */
  --surface-strong: rgba(160, 200, 255, 0.09);
  --surface-deep: rgba(160, 200, 255, 0.14);
  --text: #eaf2fd;            /* ink */
  --text-body: #c2d4ea;       /* body copy */
  --text-dim: #8fa9c7;        /* metadata, secondary */
  --text-soft: #7895b4;       /* lowest emphasis (kept >=4.5:1 on vellum wash) */
  --accent: #22d3ee;          /* cyan line ink: links, highlights */
  --accent-2: #7dd3fc;        /* sky: focus rings, partners */
  --accent-grad: linear-gradient(120deg, #22d3ee 0%, #38bdf8 100%);
  --accent-active: #67e8f9;
  --accent-ink: #071522;      /* text on ink-block buttons */
  --accent-soft: rgba(34, 211, 238, 0.10);
  --grad-soft: rgba(34, 211, 238, 0.10);
  --hot: #ff8f6b;             /* markup red: annotations, honest notes */
  --info: #7dd3fc;
  --info-soft: rgba(125, 211, 252, 0.15);
  --line: rgba(126, 178, 235, 0.18);        /* hairline */
  --line-soft: rgba(126, 178, 235, 0.10);
  --line-strong: rgba(126, 178, 235, 0.34);
  --grid-line: rgba(126, 178, 235, 0.055);  /* graph paper, minor */
  --grid-major: rgba(126, 178, 235, 0.10);  /* graph paper, major */
  --tick: rgba(126, 178, 235, 0.55);        /* corner ticks, terminators */
  --header-bg: rgba(11, 27, 48, 0.88);
  --sel: rgba(34, 211, 238, 0.30);
  --sel-ink: #eaf2fd;
  --keycap-start: rgba(160, 200, 255, 0.10);
  --keycap-end: rgba(160, 200, 255, 0.03);
  --glow: 4px 4px 0 rgba(34, 211, 238, 0.16);
  --glow-strong: 6px 6px 0 rgba(34, 211, 238, 0.30);
}

[data-theme="light"] {
  --bg: #f4f1e8;              /* canvas: warm drafting vellum */
  --bg-raised: #fbfaf4;
  --surface: rgba(255, 255, 255, 0.66);
  --surface-strong: rgba(255, 255, 255, 0.94);
  --surface-deep: #eae5d6;
  --text: #14243d;            /* ink */
  --text-body: #33445f;
  --text-dim: #5a6b85;
  --text-soft: #566579;
  --accent: #0e7490;          /* cyan ink darkened for paper */
  --accent-2: #0369a1;
  --accent-grad: linear-gradient(120deg, #0891b2 0%, #0369a1 100%);
  --accent-active: #075985;
  --accent-ink: #f7fbff;
  --accent-soft: rgba(3, 105, 161, 0.08);
  --grad-soft: rgba(3, 105, 161, 0.08);
  --hot: #b3402a;             /* markup red on paper */
  --info: #0369a1;
  --info-soft: rgba(3, 105, 161, 0.10);
  --line: rgba(20, 36, 61, 0.16);
  --line-soft: rgba(20, 36, 61, 0.10);
  --line-strong: rgba(20, 36, 61, 0.34);
  --grid-line: rgba(20, 36, 61, 0.05);
  --grid-major: rgba(20, 36, 61, 0.09);
  --tick: rgba(20, 36, 61, 0.45);
  --header-bg: rgba(244, 241, 232, 0.90);
  --sel: #bfe6f0;
  --sel-ink: #14243d;
  --keycap-start: #ffffff;
  --keycap-end: #efeadb;
  --glow: 4px 4px 0 rgba(20, 36, 61, 0.75);
  --glow-strong: 6px 6px 0 rgba(20, 36, 61, 0.85);
}

/* Light-theme contrast repair.
   On vellum, multiplying an already-muted ink by an opacity utility drops
   secondary copy under 4.5:1 (measured 3.17 for the struck-through skills and
   3.61 for the margin notes). Paper is light enough that the wash is not
   needed for hierarchy, so the ink goes back to full strength. */
[data-theme='light'] .dim-group,
[data-theme='light'] .cta-stamp,
[data-theme='light'] .opacity-80 { opacity: 1; }

:root {
  --font-display: 'Barlow Condensed', 'Inter', -apple-system, sans-serif;
  --font-body: 'Inter', -apple-system, system-ui, 'Helvetica Neue', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
  /* drafting corners: near-square, never pill */
  --r-xs: 2px;
  --r-btn: 3px;
  --r-card: 4px;
  --r-panel: 6px;
  --r-pill: 9999px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 4rem;
}

body {
  position: relative;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-feature-settings: "calt", "kern", "liga", "ss03";
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

/* Graph paper: a fixed blueprint grid behind the whole page. Pure CSS. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px),
    linear-gradient(var(--grid-major) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-major) 1px, transparent 1px);
  background-size: 12px 12px, 12px 12px, 96px 96px, 96px 96px;
  background-position: -1px -1px, -1px -1px, -1px -1px, -1px -1px;
}

/* Drawing frame: faint border around the viewport with brighter corner
   ticks, exactly like a sheet cut from a drawing set. Fixed, inert. */
body::after {
  content: '';
  position: fixed;
  top: 64px;
  left: 10px;
  right: 10px;
  bottom: 10px;
  z-index: 40;
  pointer-events: none;
  border: 1px solid var(--line);
  background:
    linear-gradient(var(--tick), var(--tick)) left top / 18px 1px,
    linear-gradient(var(--tick), var(--tick)) left top / 1px 18px,
    linear-gradient(var(--tick), var(--tick)) right top / 18px 1px,
    linear-gradient(var(--tick), var(--tick)) right top / 1px 18px,
    linear-gradient(var(--tick), var(--tick)) left bottom / 18px 1px,
    linear-gradient(var(--tick), var(--tick)) left bottom / 1px 18px,
    linear-gradient(var(--tick), var(--tick)) right bottom / 18px 1px,
    linear-gradient(var(--tick), var(--tick)) right bottom / 1px 18px;
  background-repeat: no-repeat;
  background-origin: border-box;
}

::selection { background: var(--sel); color: var(--sel-ink); }

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0.5rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}
.skip-link:focus { left: 0; }

/* Gradient text helper: kept for compatibility, restyled as ink */
.grad-text {
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------------- Buttons: stamped ink blocks ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 40px;
  padding: 0 18px;
  border-radius: var(--r-btn);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.25;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color 0.15s ease, border-color 0.15s ease,
    color 0.15s ease, box-shadow 0.2s ease, transform 0.15s ease;
}
.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: var(--glow);
}
.btn-primary:hover {
  box-shadow: var(--glow-strong);
  transform: translate(-1px, -1px);
}
.btn-primary:active {
  box-shadow: 2px 2px 0 rgba(34, 211, 238, 0.20);
  transform: translate(2px, 2px);
}
[data-theme="light"] .btn-primary:active {
  box-shadow: 2px 2px 0 rgba(20, 36, 61, 0.55);
}
.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--line-strong);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.btn-pill { border-radius: var(--r-btn); }

/* ---------------- Header ---------------- */
.site-header {
  position: fixed;
  top: 0;
  inset-inline: 0;
  z-index: 50;
  background: var(--header-bg);
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  border-bottom: 1px solid var(--line-strong);
}

.nav-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  max-width: 1440px;
  height: 56px;
  margin: 0 auto;
  padding: 0 20px;
}
@media (min-width: 640px) { .nav-inner { padding: 0 32px; } }
@media (min-width: 1024px) { .nav-inner { padding: 0 80px; } }

.wordmark {
  justify-self: start;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
  transition: color 0.15s ease;
}
.wordmark:hover { color: var(--accent); }

/* drawing-number tag in the header utilities */
.rev-tag {
  display: none;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-soft);
  border: 1px solid var(--line);
  padding: 3px 8px;
  white-space: nowrap;
}
@media (min-width: 1200px) { .rev-tag { display: inline-block; } }

.nav-tabs {
  justify-self: center;
  display: flex;
  align-items: stretch;
  gap: 1.75rem;
  height: 56px;
}
.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.15s ease;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}
.nav-link:hover { color: var(--text); }
.nav-link.active { color: var(--text); }
.nav-link.active::after { transform: scaleX(1); }

.nav-utils {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.mobile-link {
  color: var(--text-dim);
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s ease;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-body);
}
.mobile-link:hover, .mobile-link.active { color: var(--accent); }

.logo-cursor { color: var(--accent); animation: blink 1.1s steps(2, start) infinite; }

.burger-line {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.menu-open .burger-line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-open .burger-line:nth-child(2) { opacity: 0; }
.menu-open .burger-line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Theme switch: a physical rocker, not a pill */
.theme-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 52px;
  height: 26px;
  padding: 3px;
  border-radius: var(--r-btn);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.2s ease;
}
.theme-switch:hover { border-color: var(--accent); }
.theme-knob {
  width: 18px;
  height: 18px;
  border-radius: 1px;
  background: var(--accent);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
[data-theme="light"] .theme-knob { transform: translateX(26px); }
.theme-label {
  position: absolute;
  right: 7px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  pointer-events: none;
}
[data-theme="light"] .theme-label { right: auto; left: 7px; }

/* ---------------- Hero ---------------- */
.annotation {
  display: inline-block;
  margin-top: 2.5rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.7;
  color: var(--hot);
  transform: rotate(-3deg);
  border-left: 2px solid var(--hot);
  padding-left: 0.75rem;
}

.inline-link {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
  transition: opacity 0.15s ease, text-decoration-thickness 0.15s ease;
}
.inline-link:hover { opacity: 0.75; text-decoration-thickness: 2px; }

.hero-eyebrow {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1.25rem;
  margin: 0 0 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  line-height: 1.5;
}
.hero-eyebrow .eyebrow-dwg { color: var(--text-soft); }
.hero-eyebrow .eyebrow-role { color: var(--accent); }

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 7.5vw, 5.5rem);
  font-weight: 700;
  line-height: 0.96;
  letter-spacing: 0.005em;
  text-transform: uppercase;
}
.hero-sub {
  display: block;
  margin-top: 0.85rem;
  font-size: clamp(1.15rem, 2.6vw, 1.75rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.045em;
  color: var(--text-dim);
}
.hero-dim { color: var(--accent); }

/* Dimension line: |◄———— measured, not claimed ————►| */
.dim-rule {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  max-width: 46rem;
  margin-top: 1.35rem;
}
.dim-rule::before,
.dim-rule::after {
  content: '';
  position: absolute;
  top: -5px;
  bottom: -5px;
  width: 1px;
  background: var(--tick);
  opacity: 0.8;
}
.dim-rule::before { left: 0; }
.dim-rule::after { right: 0; }
.dim-end {
  flex: 1 1 auto;
  min-width: 24px;
  height: 11px;
  background: var(--tick);
  clip-path: polygon(
    0 45.45%,
    calc(100% - 9px) 45.45%,
    calc(100% - 9px) 0,
    100% 50%,
    calc(100% - 9px) 100%,
    calc(100% - 9px) 54.55%,
    0 54.55%
  );
}
.dim-end.is-flip { transform: scaleX(-1); }
.dim-rule-text {
  position: relative;
  background: var(--bg);
  padding: 0 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  white-space: nowrap;
}

.hero-anim { opacity: 1; transform: none; }
.js .hero-anim {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.js .hero-anim.in { opacity: 1; transform: none; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 3rem;
  align-items: start;
}
@media (min-width: 1024px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: 3.5rem;
  }
}

/* ---------------- Search card: a drafting form block ---------------- */
.search-pill {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 600px;
  min-height: 64px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--glow);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.search-pill:hover { border-color: var(--tick); box-shadow: var(--glow-strong); }
.search-seg {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 6px 18px;
  transition: background-color 0.15s ease;
}
.search-seg:hover { background: var(--surface-strong); }
.search-seg + .search-seg { border-left: 1px solid var(--line); }
.search-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-soft);
}
.search-value {
  font-size: 0.875rem;
  line-height: 1.43;
  color: var(--text-body);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-orb {
  flex: none;
  width: 48px;
  height: 48px;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: var(--r-btn);
  background: var(--accent);
  color: var(--accent-ink);
  cursor: pointer;
  transition: box-shadow 0.2s ease, transform 0.15s ease;
}
.search-orb:hover { box-shadow: var(--glow-strong); transform: translate(-1px, -1px); }
.search-orb:active { transform: translate(1px, 1px); box-shadow: none; }
.search-orb svg { display: block; }
@media (max-width: 639px) {
  .search-seg:not(:first-child) { display: none; }
}

/* ---------------- Chips: callout tags ---------------- */
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  max-width: 600px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  height: 34px;
  padding: 0 13px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-xs);
  background: var(--surface);
  color: var(--text-body);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.chip:hover {
  background: var(--surface-strong);
  color: var(--text);
  border-color: var(--accent);
}
.chip strong {
  color: var(--accent);
  font-weight: 700;
}

/* ---------------- Capability brief (HR-first band) ----------------
   Sits between the marquee and sheet 01. Un-numbered on purpose.
   Same drafting furniture as the rest: hairline frame, corner ticks,
   vellum washes, hard ink-block buttons, no pills, no progress bars. */
.brief-band { padding: 2.5rem 1.25rem 0; }
@media (min-width: 640px) { .brief-band { padding: 3rem 2rem 0; } }
@media (min-width: 1024px) { .brief-band { padding: 3.5rem 5rem 0; } }

.brief-panel {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-panel);
  padding: 28px 22px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
@media (min-width: 640px) { .brief-panel { padding: 34px 30px; } }
.brief-panel::after {
  content: '';
  position: absolute;
  inset: 5px;
  pointer-events: none;
  border-radius: var(--r-card);
  background:
    linear-gradient(var(--tick), var(--tick)) left top / 14px 1px,
    linear-gradient(var(--tick), var(--tick)) left top / 1px 14px,
    linear-gradient(var(--tick), var(--tick)) right top / 14px 1px,
    linear-gradient(var(--tick), var(--tick)) right top / 1px 14px,
    linear-gradient(var(--tick), var(--tick)) left bottom / 14px 1px,
    linear-gradient(var(--tick), var(--tick)) left bottom / 1px 14px,
    linear-gradient(var(--tick), var(--tick)) right bottom / 14px 1px,
    linear-gradient(var(--tick), var(--tick)) right bottom / 1px 14px;
  background-repeat: no-repeat;
}

.brief-kicker {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--tick);
  border-radius: var(--r-xs);
  padding: 0.25rem 0.6rem;
}
.brief-title {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.2vw, 2.4rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin: 0.85rem 0 0;
}
.brief-sub {
  font-size: 0.98rem;
  line-height: 1.6;
  color: var(--text-dim);
  margin: 0.7rem 0 0;
  max-width: 66ch;
}

.brief-grid {
  list-style: none;
  margin: 1.6rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}
.brief-card {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 16px 15px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.brief-card:hover {
  border-color: var(--tick);
  box-shadow: var(--glow);
  transform: translate(-1px, -1px);
}
.brief-card-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0;
}
.brief-card-title::before {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  background: var(--accent);
  vertical-align: middle;
}
.brief-card-body {
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text-dim);
  margin: 0.6rem 0 0;
}
.brief-tags {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  line-height: 1.6;
  letter-spacing: 0.02em;
  color: var(--text-soft);
  margin: 0.7rem 0 0;
}

.brief-proof {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin: 1.6rem 0 0;
}
.brief-metric {
  border-top: 1px dashed var(--line-strong);
  padding-top: 0.8rem;
}
.brief-metric-label {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-soft);
}
.brief-metric-val {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.01em;
  color: var(--accent);
  margin: 0.2rem 0 0;
}
.brief-metric-note {
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--text-dim);
  margin: 0.15rem 0 0;
}

.brief-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 1.8rem 0 0;
}
.brief-fine {
  flex: 1 1 100%;
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--text-soft);
  margin: 0.35rem 0 0;
}

/* ---------------- CLI terminal ---------------- */
.cli {
  --term-bg: #081526;
  --term-fg: #eaf2fd;
  --term-dim: #8fa9c7;
  --term-accent: #22d3ee;
  --term-err: #ff8f6b;
  --term-line: rgba(126, 178, 235, 0.16);
  background: var(--term-bg);
  color: var(--term-fg);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-card);
  overflow: hidden;
  box-shadow: var(--glow);
}

.cli-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--term-line);
  background: rgba(160, 200, 255, 0.05);
}
.cli-dot { width: 11px; height: 11px; border-radius: 50%; }
.cli-title {
  margin-left: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--term-dim);
}

.cli-out {
  height: 300px;
  overflow-y: auto;
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.65;
  scrollbar-width: thin;
}
.cli-out:empty::before {
  content: 'waiting for input... (this terminal is fully functional, promise)';
  color: var(--term-dim);
  opacity: 0.7;
}

.cli-line { white-space: pre-wrap; word-break: break-word; }
.cli-echo { color: var(--term-dim); }
.cli-echo .who { color: var(--term-accent); }
.cli-out-accent { color: var(--term-accent); }
.cli-out-dim { color: var(--term-dim); }
.cli-out-err { color: var(--term-err); }
.cli-out strong { color: var(--term-fg); font-weight: 700; }

.cli-form {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--term-line);
}
.cli-prompt {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--term-accent);
  white-space: nowrap;
  user-select: none;
}
.cli-input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--term-fg);
  caret-color: var(--term-accent);
}
.cli-input::placeholder { color: var(--term-dim); }

.hint-cmd {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font: inherit;
}
.hint-cmd:hover { opacity: 0.7; }
.chip.hint-cmd {
  color: var(--text-body);
  text-decoration: none;
  background: linear-gradient(180deg, var(--keycap-start), var(--keycap-end));
  border: 1px solid var(--line-strong);
  border-radius: var(--r-xs);
  padding: 0 10px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}
.chip.hint-cmd:hover { color: var(--text); opacity: 1; }

/* ---------------- Status ribbon ---------------- */
.marquee {
  background: var(--bg);
  border-top: 1px dashed var(--line-strong);
  border-bottom: 1px dashed var(--line-strong);
}
.marquee-track {
  display: flex;
  align-items: center;
  width: max-content;
  gap: 0;
  animation: mq 38s linear infinite;
}
.mq-item {
  color: var(--text-dim);
  padding: 0 1.25rem;
  white-space: nowrap;
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
}
.mq-sep { color: var(--accent-2); font-family: var(--font-mono); }

@keyframes mq {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------------- Section heads: sheet tabs ---------------- */
.sec-head {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;   /* narrow screens: the title column drops to its own line
                        instead of pushing the ship strip past the viewport */
  gap: 1.25rem;
}
@media (max-width: 639px) { .sec-head { gap: 0.75rem 1rem; } }
/* the rule that runs to the sheet edge, terminator tick at its end */
.sec-head::after {
  content: '';
  flex: 1 1 auto;
  min-width: 48px;
  align-self: flex-start;
  height: 16px;
  margin-top: 0.7rem;
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--tick);
}
.sec-index {
  position: relative;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.33;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--tick);
  border-radius: var(--r-xs);
  padding: 0.2rem 0.55rem;
  margin-top: 0.35rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-family: var(--font-mono);
  white-space: nowrap;
}
.sec-index::before { content: 'SHT '; color: var(--text-soft); font-weight: 500; }
.sec-index::after { content: '/06'; color: var(--text-soft); font-weight: 500; }
.sec-title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.6vw, 2.75rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.sec-sub {
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--text-dim);
  margin-top: 0.55rem;
  max-width: 58ch;
}

/* ---------------- About: host card as a title block ---------------- */
.host-col { display: flex; flex-direction: column; gap: 1.5rem; }
.host-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-card);
  padding: 24px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.host-card::after {
  content: '';
  position: absolute;
  inset: 4px;
  pointer-events: none;
  background:
    linear-gradient(var(--tick), var(--tick)) left top / 12px 1px,
    linear-gradient(var(--tick), var(--tick)) left top / 1px 12px,
    linear-gradient(var(--tick), var(--tick)) right top / 12px 1px,
    linear-gradient(var(--tick), var(--tick)) right top / 1px 12px,
    linear-gradient(var(--tick), var(--tick)) left bottom / 12px 1px,
    linear-gradient(var(--tick), var(--tick)) left bottom / 1px 12px,
    linear-gradient(var(--tick), var(--tick)) right bottom / 12px 1px,
    linear-gradient(var(--tick), var(--tick)) right bottom / 1px 12px;
  background-repeat: no-repeat;
}
.host-card:hover { border-color: var(--tick); box-shadow: var(--glow); }
.host-avatar {
  width: 72px;
  height: 72px;
  border-radius: 2px;
  object-fit: cover;
  background: var(--surface-strong);
  display: block;
  border: 2px solid var(--accent);
}
.host-name {
  margin: 0.9rem 0 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 1.15;
}
.host-role {
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
  line-height: 1.43;
  color: var(--text-dim);
}
.host-badge {
  position: absolute;
  top: 24px;
  right: 24px;
  background: var(--accent);
  color: var(--accent-ink);
  border: 1px solid var(--accent);
  border-radius: var(--r-xs);
  padding: 3px 10px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.18;
  transform: rotate(-1.5deg);
}
.host-facts { margin: 1.25rem 0 0; display: grid; gap: 1rem; }
.host-facts dd { margin: 0; }
.host-cta { margin-top: 1.25rem; width: 100%; }

.fact-block { border-top: 1px dashed var(--line-strong); padding-top: 0.85rem; margin: 0; }
.fact-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-bottom: 0.35rem;
  font-family: var(--font-mono);
}
.fact-value { font-size: 0.9375rem; line-height: 1.5; color: var(--text-body); }

/* ---------------- Skills: parts specification ---------------- */
.grp-title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--line-strong);
  margin-bottom: 0.25rem;
  font-family: var(--font-mono);
}
.grp-title::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--accent);
  margin-right: 0.6rem;
  vertical-align: 0.02em;
}

.evi-list { display: flex; flex-direction: column; counter-reset: evi; }
.evi {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px dashed var(--line-soft);
}
.evi dt {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
}
/* row numbers, the way a spec table numbers its lines */
.evi dt::before {
  counter-increment: evi;
  content: counter(evi, decimal-leading-zero) ' ';
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--text-soft);
  margin-right: 0.4rem;
  vertical-align: 0.15em;
}
.evi dd { font-size: 0.9375rem; line-height: 1.55; color: var(--text-dim); margin: 0; }

.dim-group { opacity: 0.78; }
.dim-group .evi dt { color: var(--text-dim); text-decoration: line-through; text-decoration-color: var(--line-strong); }

@media (max-width: 480px) {
  .evi { grid-template-columns: 1fr; gap: 0.2rem; }
}

/* ---------------- Projects: detail views ---------------- */
.proj-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 640px) { .proj-list { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .proj-list { grid-template-columns: repeat(3, 1fr); } }

.proj {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  overflow: hidden;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: border-color 0.2s ease, box-shadow 0.25s ease, transform 0.2s ease;
}
/* corner ticks: every card is a detail view cut from the sheet */
.proj::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background:
    linear-gradient(var(--tick), var(--tick)) left top / 14px 1px,
    linear-gradient(var(--tick), var(--tick)) left top / 1px 14px,
    linear-gradient(var(--tick), var(--tick)) right top / 14px 1px,
    linear-gradient(var(--tick), var(--tick)) right top / 1px 14px,
    linear-gradient(var(--tick), var(--tick)) left bottom / 14px 1px,
    linear-gradient(var(--tick), var(--tick)) left bottom / 1px 14px,
    linear-gradient(var(--tick), var(--tick)) right bottom / 14px 1px,
    linear-gradient(var(--tick), var(--tick)) right bottom / 1px 14px;
  background-repeat: no-repeat;
}
.proj:hover,
.proj:focus-within {
  border-color: var(--tick);
  box-shadow: var(--glow);
  transform: translateY(-2px);
}

.proj-photo {
  position: relative;
  display: block;
  aspect-ratio: 2 / 1;
  overflow: hidden;
  background: var(--surface-strong);
  text-decoration: none;
}
.cover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 14px 16px;
  background:
    linear-gradient(0deg, transparent calc(50% - 0.5px), var(--line-soft) calc(50% - 0.5px), var(--line-soft) calc(50% + 0.5px), transparent calc(50% + 0.5px)),
    linear-gradient(90deg, transparent calc(50% - 0.5px), var(--line-soft) calc(50% - 0.5px), var(--line-soft) calc(50% + 0.5px), transparent calc(50% + 0.5px)),
    var(--surface-strong);
  background-size: 100% 100%, 100% 100%, 100% 100%;
  transition: opacity 0.3s ease;
}
/* registration crosshair, top right of every cover */
.cover::after {
  content: '+';
  position: absolute;
  top: 10px;
  right: 14px;
  font-family: var(--font-mono);
  font-size: 1rem;
  line-height: 1;
  color: var(--tick);
}
.proj-photo.is-featured .cover { background: var(--accent-soft); }
.cover-mono {
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 6vw, 3.75rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--accent);
  opacity: 0.9;
}
.proj-photo:not(.is-featured) .cover-mono { -webkit-text-stroke-color: var(--line-strong); opacity: 0.7; }
.cover-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.cover-slug {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cover-term {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent);
  white-space: nowrap;
}
.cover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.proj-photo.has-img .cover-img { opacity: 1; }
.proj-photo.has-img .cover { opacity: 0; }

.proj-kind {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  background: var(--surface-strong);
  color: var(--text-dim);
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  padding: 3px 10px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 500;
  line-height: 1.18;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.proj-kind.featured {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
  font-weight: 700;
  transform: rotate(-1.5deg);
  box-shadow: 2px 2px 0 rgba(7, 21, 34, 0.45);
}
[data-theme="light"] .proj-kind.featured { box-shadow: 2px 2px 0 rgba(20, 36, 61, 0.4); }

.proj-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  padding: 16px 16px 0;
}
.proj-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.5rem;
}
.proj-num {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  letter-spacing: 0.06em;
}
.proj-num::before { content: 'dwg '; color: var(--text-soft); font-weight: 500; }
.proj-title {
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0.2px;
}
.proj-desc {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text-dim);
}

.ship-log { margin-top: 1.1rem; max-width: 34rem; }
.ship-bars {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 74px;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 2px;
}
.ship-col {
  flex: 1 1 0;
  min-width: 0;
  max-width: 46px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 5px;
  height: 100%;
}
.ship-bar {
  width: 100%;
  min-height: 3px;
  background: var(--line-strong);
  transition: height 0.4s ease, background-color 0.2s ease;
}
.ship-col.is-zero .ship-bar { background: var(--line-soft); }
.ship-col.is-now .ship-bar { background: var(--accent); }
.ship-col:hover .ship-bar { background: var(--accent-2); }
.ship-month {
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
  white-space: nowrap;
}
.ship-col.is-now .ship-month { color: var(--accent); font-weight: 700; }
/* Mobile: the section-head row is a flex line. Twelve nowrap month labels
   set its min-content width, so shrink the ticks to keep the whole strip
   (and the note under it) inside the viewport. */
@media (max-width: 639px) {
  .ship-bars { gap: 3px; }
  .ship-month { font-size: 0.5rem; letter-spacing: 0.02em; }
}
.ship-log-note {
  margin: 0.5rem 0 0;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.03em;
  color: var(--text-dim);
}

.repo-meta {
  font-size: 0.8125rem;
  color: var(--text-dim);
  margin-top: 0.65rem;
}
.repo-meta::before {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  background: var(--accent);
  margin-right: 0.5rem;
  vertical-align: middle;
}

.proj-meta {
  margin-top: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--text-dim);
}
.proj-learn {
  margin-top: 0.7rem;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--hot);
}
.proj-learn span { text-decoration: underline; text-underline-offset: 3px; font-weight: 600; }

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.9rem 0 0;
  padding: 0;
  list-style: none;
}
.tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-dim);
  background: var(--surface-strong);
  border: 1px solid var(--line-soft);
  padding: 0.25rem 0.55rem;
  border-radius: var(--r-xs);
}

.proj-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: auto;
  padding: 1rem 16px 16px;
  font-size: 0.875rem;
  font-weight: 500;
  align-items: center;
}

.proj-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem 1rem;
  margin: 0.15rem 0 1rem;
  padding: 0.85rem 0 0;
  list-style: none;
  border-top: 1px dashed var(--line-strong);
}
.metric { display: flex; flex-direction: column; gap: 0.15rem; }
.metric-v {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.05;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  transition: color 0.2s ease;
}
.metric:hover .metric-v,
.proj:hover .metric-v { color: var(--accent); }
.metric-k {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.proj-more { margin-top: 1.15rem; }
.proj-more-sum {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
  cursor: pointer;
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-xs);
  list-style: none;
  user-select: none;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}
.proj-more-sum::-webkit-details-marker { display: none; }
.proj-more-sum::before { content: '+ '; color: var(--accent); }
.proj-more[open] .proj-more-sum::before { content: '\2212  '; }
.proj-more-sum:hover,
.proj-more-sum:focus-visible {
  border-color: var(--accent);
  background: var(--surface);
}

.arch-block {
  margin: 1rem 0 0;
  padding: 1rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-card);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.6;
  color: var(--text);
}

.case-block { margin-top: 1.1rem; }
.case-h {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--hot);
  margin-bottom: 0.45rem;
  font-family: var(--font-mono);
}
.case-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.5rem;
}
.case-list li {
  position: relative;
  padding-left: 1.1rem;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--text-dim);
}
.case-list li::before {
  content: '\2192';
  position: absolute;
  left: 0;
  color: var(--accent);
}

@media (max-width: 640px) {
  .proj-metrics { gap: 0.65rem 1rem; }
  .metric-v { font-size: 1.4rem; }
  .arch-block { font-size: 0.7rem; padding: 0.85rem; }
}

/* ---------------- Notes: drawing notes with balloons ---------------- */
.notes-list { display: flex; flex-direction: column; }
.note { border-top: 1px solid var(--line); padding: 1.75rem 0; }
.note:last-child { border-bottom: 1px solid var(--line); }
.note-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--text-soft);
  margin-bottom: 0.65rem;
}
.note-num {
  color: var(--accent);
  font-weight: 700;
  border: 1px solid var(--tick);
  border-radius: var(--r-xs);
  padding: 2px 7px;
  background: var(--surface);
}
.note-title {
  margin: 0;
  font-family: var(--font-body);
  font-size: clamp(1.25rem, 2.4vw, 1.5rem);
  font-weight: 700;
  letter-spacing: -0.3px;
  line-height: 1.25;
}
.note-sum {
  margin: 0.5rem 0 0;
  font-size: 0.94rem;
  line-height: 1.6;
  color: var(--text-dim);
  max-width: 72ch;
}
.note-toggle {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-dim);
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
}
.note-toggle::-webkit-details-marker { display: none; }
.note-toggle::after {
  content: '\203A';
  display: inline-block;
  font-size: 1rem;
  line-height: 1;
  transition: transform 0.15s ease;
}
.note-more[open] .note-toggle::after { transform: rotate(90deg); }
.note-toggle:hover { color: var(--accent); border-bottom-color: var(--accent); }
.note-body {
  margin-top: 1rem;
  padding-left: 1rem;
  border-left: 2px solid var(--line-strong);
  max-width: 74ch;
}
.note-more[open] .note-body { border-left-color: var(--accent); }
.note-body p {
  margin: 0 0 0.9rem;
  font-size: 0.97rem;
  line-height: 1.7;
  color: var(--text-body);
}
.note-body p:last-child { margin-bottom: 0; }
.resume-line { margin-top: 1.25rem; font-size: 0.95rem; color: var(--text-dim); }

/* ---------------- now.md + timeline ---------------- */
.md-file {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  overflow: hidden;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.md-file-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-strong);
  background: var(--surface-strong);
}
.md-file-bar span:first-child { font-family: var(--font-mono); font-size: 0.875rem; font-weight: 500; }
.md-file-bar .md-updated {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
}
.md-file-body { padding: 18px 16px; list-style: none; margin: 0; }
.md-file-body li { color: var(--text-dim); padding-left: 1.1rem; position: relative; }
.md-file-body li::before { content: '\2022'; position: absolute; left: 0; color: var(--accent); }
.md-key {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}
/* the datum line: dashed, like a centre line on a drawing */
.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: repeating-linear-gradient(
    180deg,
    var(--line-strong) 0 7px,
    transparent 7px 13px
  );
}
.tl-item { display: grid; grid-template-columns: 64px 1fr; gap: 1rem; padding-bottom: 1.9rem; position: relative; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 6px;
  width: 11px;
  height: 11px;
  border-radius: 1px;
  background: var(--bg);
  border: 2px solid var(--line-strong);
}
.tl-current::before {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: var(--glow);
}
.tl-year {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-dim);
  padding-left: 1.4rem;
}
.tl-title { font-size: 1rem; font-weight: 600; line-height: 1.3; margin-bottom: 0.25rem; }
.tl-desc { font-size: 0.875rem; line-height: 1.55; color: var(--text-dim); }
.tl-current .tl-title { color: var(--accent); }

/* ---------------- Contact: the approval block ---------------- */
.cta-panel {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-card);
  padding: 2.5rem 1.5rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--glow);
  outline: 1px solid var(--line-soft);
  outline-offset: 6px;
}
@media (min-width: 640px) { .cta-panel { padding: 3rem 2.5rem; } }
.cta-panel .email-row { background: var(--bg-raised); }
/* stop the sheet rule before the stamp so the tick doesn't poke out */
@media (min-width: 640px) {
  .cta-panel .sec-head::after { margin-right: 9.5rem; }
}

/* the markup stamp: red pen on the drawing */
.cta-stamp {
  position: absolute;
  top: 15px;
  right: 15px;
  z-index: 2;
  background: var(--bg);
  border: 2px solid var(--hot);
  color: var(--hot);
  border-radius: var(--r-xs);
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transform: rotate(3deg);
  opacity: 0.9;
  pointer-events: none;
}
@media (max-width: 639px) { .cta-stamp { display: none; } }

.email-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  padding: 1.1rem 1.25rem;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: var(--r-btn);
}
.email-addr {
  font-size: clamp(1.05rem, 3.5vw, 1.375rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  word-break: break-all;
  text-decoration: none;
}
.email-addr:hover { color: var(--accent); }
.copy-btn {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.55rem 1.1rem;
  border: 1px solid var(--text);
  border-radius: var(--r-btn);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.copy-btn:hover { background: var(--surface); border-color: var(--accent); color: var(--accent); }
.copy-btn.copied {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}
.contact-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.25rem 0 0;
}

/* ---------------- Footer ---------------- */
.site-footer {
  background: var(--bg);
  border-top: 1px solid var(--line);
  padding: 64px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 20px 40px;
}
@media (min-width: 640px) { .footer-grid { padding: 0 32px 40px; } }
@media (min-width: 768px) { .footer-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .footer-grid { padding: 0 80px 40px; } }
.footer-col { display: flex; flex-direction: column; gap: 0.75rem; }
.footer-head {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.25;
  color: var(--text-soft);
  margin: 0 0 0.25rem;
}
.footer-link {
  font-size: 0.875rem;
  line-height: 1.43;
  color: var(--text-dim);
  text-decoration: none;
  background: none;
  border: none;
  padding: 0;
  text-align: left;
  cursor: pointer;
  font-family: var(--font-body);
  transition: color 0.15s ease;
}
.footer-link:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.footer-note {
  margin: 0.75rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--text-soft);
}

/* Title block: the real thing, bottom right of every engineering drawing */
.title-block {
  max-width: 1440px;
  margin: 0 auto 32px;
  padding: 0 20px;
}
@media (min-width: 640px) { .title-block { padding: 0 32px; } }
@media (min-width: 1024px) { .title-block { padding: 0 80px; } }
.tb-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  background: var(--line-strong);
  border: 1.5px solid var(--line-strong);
}
@media (min-width: 768px) { .tb-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tb-cell {
  background: var(--bg);
  padding: 0.7rem 0.85rem;
  min-width: 0;
}
.tb-cell dt {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-bottom: 0.3rem;
}
.tb-cell dd {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--text-body);
  overflow-wrap: anywhere;
}
.tb-cell.tb-accent dd { color: var(--accent); font-weight: 700; }

.legal-band {
  border-top: 1px dashed var(--line-strong);
  background: transparent;
}
.legal-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  max-width: 1440px;
  margin: 0 auto;
  padding: 16px 20px;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--text-dim);
}
@media (min-width: 640px) { .legal-inner { padding: 16px 32px; } }
@media (min-width: 1024px) { .legal-inner { padding: 16px 80px; } }
.legal-inner p { margin: 0; }

.dare {
  font: inherit;
  color: var(--text-dim);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s ease;
}
.dare:hover { color: var(--accent); }

/* ---------------- Scrollbar ---------------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 0; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ---------------- Scroll reveal ---------------- */
.js-reveal {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.5s ease,
    transform 0.5s ease,
    background-color 0.2s ease,
    border-color 0.2s ease;
  transition-delay: calc(var(--i, 0) * 55ms);
}
.js-reveal.is-in { opacity: 1; transform: none; }

/* ---------------- Command palette ---------------- */
.palette {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 12vh 1rem 2rem;
}
.palette[hidden] { display: none; }
.palette-scrim {
  position: absolute;
  inset: 0;
  background: rgba(4, 10, 20, 0.68);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: palette-in 0.14s ease;
}
.palette-box {
  position: relative;
  width: min(640px, 100%);
  background: var(--bg-raised);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--r-panel);
  overflow: hidden;
  box-shadow: var(--glow-strong);
  animation: palette-pop 0.16s ease;
}
.palette-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.95rem 1.1rem;
  border-bottom: 1px solid var(--line);
}
.palette-caret {
  color: var(--accent);
  font-family: var(--font-mono);
  font-weight: 700;
}
.palette-input {
  flex: 1;
  min-width: 0;
  background: none;
  border: 0;
  outline: none;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
}
.palette-input::placeholder { color: var(--text-dim); }

.palette-key {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  padding: 0.2rem 0.45rem;
}
button.palette-key { cursor: pointer; transition: color 0.15s ease, border-color 0.15s ease; }
button.palette-key:hover,
button.palette-key:focus-visible { color: var(--accent); border-color: var(--accent); }

.palette-list { list-style: none; margin: 0; padding: 0.45rem; max-height: 46vh; overflow-y: auto; }
.palette-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 0.75rem;
  border-radius: var(--r-xs);
  cursor: pointer;
  font-size: 0.9375rem;
  color: var(--text);
}
.palette-item.active {
  background: var(--accent-soft);
  color: var(--text);
}
.palette-item.active .palette-hint { color: var(--text); opacity: 0.75; }
.palette-label { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.palette-hint { font-size: 0.75rem; color: var(--text-dim); text-align: right; white-space: nowrap; }
.palette-empty {
  list-style: none;
  padding: 1rem 0.75rem;
  font-size: 0.875rem;
  color: var(--text-dim);
}
.palette-foot {
  margin: 0;
  padding: 0.55rem 1.1rem;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  color: var(--text-dim);
}
.palette-foot kbd { font: inherit; border: 1px solid var(--line); border-radius: 2px; padding: 0 0.25rem; }

@keyframes palette-in { from { opacity: 0; } }
@keyframes palette-pop { from { opacity: 0; transform: translateY(-8px) scale(0.98); } }

/* ---------------- Mobile menu ---------------- */
#mobileMenu {
  background: var(--bg);
  border-top: 1px solid var(--line);
}
#mobileMenu > div { display: flex; flex-direction: column; gap: 1rem; padding: 1.25rem 1.25rem 1.5rem; }

/* ---------------- Reduced motion ---------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee-track { animation: none; }
  .js .hero-anim { opacity: 1; transform: none; transition: none; }
  .logo-cursor { animation: none; }
  .js-reveal { opacity: 1; transform: none; }
  .palette-scrim, .palette-box { animation: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}

@keyframes blink {
  to { visibility: hidden; }
}
