/* ============================================================
   terminal-editorial v5 — Adejare Adelugba
   Ported from Claude Design: Tokens.dc.html + Home/About/Projects/Contact
   Token names below match the spec sheet exactly (tokens.html).
   ============================================================ */

:root {
  /* color */
  --bg:        #1c1d21;
  --card:      #1e2025;
  --surface:   #22242a;
  --hairline:  #2a2c33;
  --border:    #3a3d47;
  --border-hi: #4a4e5c;
  --border-input: #6b7183;  /* 3.19:1 on --surface — WCAG 1.4.11 */
  --muted:     #8f93a3;
  --text-2:    #a0a4b2;
  --text-1:    #c7cad6;
  --ink:       #f4f4f0;
  --accent:    #a7b5f2;
  --error:     #d98c85;

  /* type */
  --serif: 'Newsreader', Georgia, serif;
  --sans:  'Hanken Grotesk', system-ui, sans-serif;
  --mono:  'JetBrains Mono', ui-monospace, monospace;

  /* radii — depth from layers, not shadows */
  --r-2: 2px;   /* chips, inputs, buttons */
  --r-3: 3px;   /* cards, panels */

  /* hero plane stack — must stay monotonic in BOTH fill and border, or
     the offset sheets read as a flat drop-copy instead of receding.
     The deepest plane is the most transparent so the ambient field
     shows faintly through it. */
  --plane-1: var(--surface);          /* front — the code window */
  --plane-2: #1f2127;                 /* middle */
  --plane-3: rgba(29, 30, 36, 0.72);  /* deepest */
  --plane-edge-2: #31343d;
  --shadow-plane: 0 18px 34px -22px rgba(0, 0, 0, 0.78),
                  0 2px 6px -3px rgba(0, 0, 0, 0.5);

  /* motion — "flows into place": eased in, never flung */
  --t-hover: 150ms;
  --t-flow:  1100ms;
  --t-hero:  1500ms;
  --t-nav:   300ms;
  --t-veil:      560ms;  /* veil holds opaque this long — read back by initFlow */
  --t-veil-fade: 420ms;  /* then dissolves over this */
  --stagger: 120ms;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);            /* hover/nav — quick settle */
  --ease-flow: cubic-bezier(0.4, 0, 0.2, 1);        /* reveals — gentle in, long out */
  /* reduced motion still cross-fades: no travel, no parallax, no drift */
  --t-flow-rm: 520ms;
  --stagger-rm: 70ms;
  --t-veil-rm: 440ms;  /* shorter hold: no lines to read, just a fade */
  --t-veil-return: 200ms;  /* back/forward — nothing here is new to read */

  /* hover depth */
  --lift: -5px;
  --shadow-lift: 0 14px 28px -18px rgba(0, 0, 0, 0.6);

  /* layout */
  --well: 1200px;
  --gutter: clamp(16px, 4vw, 56px);
  --section-gap: clamp(56px, 8vw, 104px);
}

/* ---------- reset / base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--text-1); text-decoration: none; }
a:hover { color: var(--accent); }

::selection { background: var(--accent); color: var(--bg); }

img { max-width: 100%; display: block; }

button { font: inherit; color: inherit; }

h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 500; }

p { margin: 0; }

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

/* Cross-document view transitions are deliberately NOT opted into:
   the page veil owns the between-pages moment, and running both
   would cross-fade two already-veiled screens. */

/* skip link */
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 60; /* above the sticky masthead (40) */
  background: var(--accent);
  color: var(--bg);
  font-family: var(--mono);
  font-size: 12.5px;
  padding: 10px 16px;
}
.skip:focus { left: var(--gutter); top: 8px; color: var(--bg); }

/* ---------- shell ---------- */

.page {
  position: relative;
  z-index: 1; /* keeps all content above the ambient canvas */
  min-height: 100vh;
  padding: 0 var(--gutter);
}

/* ambient 3d layer — canvas injected by assets/ambient-grid.js.
   width/height are required: a canvas is a replaced element, so
   inset:0 alone leaves it at its intrinsic (backing-store) size and
   it renders dpr-times oversized on scaled displays. */
.ambient-grid {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.well {
  max-width: var(--well);
  margin: 0 auto;
}

/* ---------- masthead ---------- */

.masthead {
  view-transition-name: masthead;
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg);
  /* bleed across the .page gutters so content never peeks past the well edge */
  margin: 0 calc(-1 * var(--gutter));
  padding: 0 var(--gutter);
}

.masthead-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 24px;
  padding: 20px 0 16px;
  border-bottom: 1px solid var(--hairline);
  transition: padding var(--t-nav) var(--ease);
}
.masthead.is-condensed .masthead-inner { padding: 10px 0 8px; }

.wordmark {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  transition: font-size var(--t-nav) var(--ease);
}
.masthead.is-condensed .wordmark { font-size: 12.5px; }
.wordmark span { color: var(--accent); }

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(14px, 3vw, 32px);
  font-family: var(--mono);
  font-size: 12.5px;
}
.nav a { color: var(--muted); transition: color var(--t-hover) var(--ease); }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--accent); }

/* ---------- shared type atoms ---------- */

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.eyebrow b { color: var(--accent); font-weight: 400; }

.comment {
  font-family: var(--mono);
  font-size: 11px;
  font-style: italic;
  color: var(--muted);
}

.dot { color: var(--accent); }
.amp { color: var(--accent); font-style: italic; }

/* ---------- sections ---------- */

.section {
  padding-top: var(--section-gap);
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 3vw, 36px);
}
.section:first-of-type { padding-top: 0; }

.section-head {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 18px;
}

.section-head-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.section-title {
  font-size: clamp(30px, 3.6vw, 46px);
  line-height: 1.1;
}

/* ---------- page intro (about/projects/contact) ---------- */

.intro {
  padding: clamp(48px, 7vw, 88px) 0 clamp(40px, 6vw, 64px);
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 720px;
}

.page-title {
  font-size: clamp(38px, 4.8vw, 64px);
  line-height: 1.05;
}

.lede {
  font-size: clamp(16px, 1.4vw, 18px);
  line-height: 1.7;
  color: var(--text-2);
}

/* ---------- home hero ---------- */

.hero {
  padding: clamp(48px, 7vw, 96px) 0 clamp(56px, 8vw, 112px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-width: 0;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  align-self: flex-start;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--text-2);
  border: 1px solid var(--border);
  padding: 8px 14px;
  border-radius: var(--r-2);
}
.status-chip::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.display {
  font-size: clamp(44px, 6.4vw, 84px);
  line-height: 1.02;
  letter-spacing: -0.01em;
}

.role {
  font-family: var(--mono);
  font-size: clamp(13px, 1.3vw, 15px);
  color: var(--text-1);
}

.hero-lede {
  max-width: 460px;
  font-size: clamp(16px, 1.5vw, 18px);
  line-height: 1.65;
  color: var(--text-2);
}

.actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  font-family: var(--mono);
  font-size: 12.5px;
  border-radius: var(--r-2);
  cursor: pointer;
  transition: border-color var(--t-hover) var(--ease),
              box-shadow var(--t-hover) var(--ease),
              color var(--t-hover) var(--ease);
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
  font-weight: 700;
  border: none;
  padding: 14px 24px;
}
.btn-primary:hover {
  color: var(--bg);
  box-shadow: 0 0 0 1px var(--accent), 0 0 24px rgba(167, 181, 242, 0.35);
}

.btn-ghost {
  color: var(--text-1);
  background: none;
  border: 1px solid var(--border);
  padding: 13px 20px;
}
.btn-ghost:hover {
  color: var(--ink);
  border-color: var(--accent);
  box-shadow: 0 0 16px rgba(167, 181, 242, 0.2);
}

/* ---------- hero code block on offset planes ---------- */

.code-figure { min-width: 0; }

.code-cap {
  font-family: var(--mono);
  font-size: 11.5px;
  font-style: italic;
  color: var(--muted);
  padding-bottom: 10px;
}

.code-stack { position: relative; }

.plane {
  position: absolute;
  inset: 0;
  border-radius: var(--r-3);
}
/* Promote only when initHeroPlanes will actually drive these. It bails
   under reduced motion and never writes a transform, so an unconditional
   will-change would hold two permanent compositor layers for nothing. */
@media (prefers-reduced-motion: no-preference) {
  .plane { will-change: transform; }
}
.plane-back {
  background: var(--plane-3);
  border: 1px solid var(--hairline);
  transform: translate(18px, 18px);
}
.plane-mid {
  background: var(--plane-2);
  border: 1px solid var(--plane-edge-2);
  transform: translate(9px, 9px);
}

.code-window {
  position: relative;
  background: var(--plane-1);
  border: 1px solid var(--border);
  border-radius: var(--r-3);
  overflow: hidden;
  box-shadow: var(--shadow-plane); /* the front sheet casts onto the two behind it */
}

.code-chrome {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--hairline);
}
.code-dots { display: flex; gap: 6px; }
.code-dots i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1px solid var(--border);
}
.code-file {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--muted);
}

.code-body {
  margin: 0;
  padding: 18px clamp(14px, 1.6vw, 22px);
  font-family: var(--mono);
  font-size: clamp(10.5px, 1vw, 12.5px);
  line-height: 1.85;
  color: var(--text-1);
  overflow-x: auto;
}
.kw  { color: var(--accent); }
.cmt { font-style: italic; color: var(--muted); }

.cursor {
  display: inline-block;
  width: 7px;
  height: 14px;
  background: var(--accent);
  vertical-align: -2px;
  margin-left: 2px;
  animation: cursorBlink 1.1s step-end infinite;
}
@keyframes cursorBlink {
  0%, 49%   { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* ---------- case-study cards ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(16px, 2vw, 24px);
}

.card {
  border: 1px solid var(--hairline);
  border-radius: var(--r-3);
  background: var(--card);
  padding: clamp(20px, 2.4vw, 30px);
  display: flex;
  flex-direction: column;
  gap: 15px;
  transition: border-color var(--t-hover) var(--ease),
              box-shadow var(--t-hover) var(--ease);
}
.card:hover {
  border-color: var(--border-hi);
  box-shadow: var(--shadow-lift), 0 0 24px rgba(167, 181, 242, 0.12);
}

.card-title {
  font-size: clamp(22px, 2.1vw, 27px);
  line-height: 1.18;
}

.card-desc {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text-2);
}

.card-foot {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  border-top: 1px solid var(--hairline);
  padding-top: 14px;
}

.tech {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--muted);
}

.card-link {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  padding: 6px 0;
}

.note {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--text-1);
}
.note b { color: var(--accent); font-weight: 400; }

/* metric plate */
.metric {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-2);
  padding: 16px 18px;
  display: flex;
  align-items: baseline;
  gap: 18px;
  flex-wrap: wrap;
}
.metric-num {
  font-family: var(--serif);
  font-size: clamp(34px, 3vw, 42px);
  line-height: 1;
}
.metric-num sup { font-size: 0.5em; color: var(--accent); vertical-align: baseline; }
.metric-meta {
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 1.7;
  color: var(--muted);
}
.metric-meta b { color: var(--text-1); font-weight: 400; }

/* ascii diagram */
.ascii {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-2);
  padding: 14px 16px;
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 1.8;
  color: var(--text-2);
  overflow-x: auto;
}
.ascii b { color: var(--accent); font-weight: 400; }

/* comparison bars */
.bars {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-2);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.bar {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 10.5px;
}
.bar-name { width: 56px; color: var(--muted); }
.bar-track { flex: 1; height: 5px; background: var(--hairline); }
.bar-fill { display: block; height: 5px; background: var(--border-hi); }
.bar-val { color: var(--muted); }
.bar.is-win .bar-name,
.bar.is-win .bar-val { color: var(--accent); }
.bar.is-win .bar-name { color: var(--ink); }
.bar.is-win .bar-fill { background: var(--accent); }

/* ---------- capabilities ---------- */

.caps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: clamp(20px, 2.6vw, 32px);
}
.cap { display: flex; flex-direction: column; gap: 14px; }
.cap-label {
  font-family: var(--mono);
  font-size: 11.5px;
  font-style: italic;
  color: var(--accent);
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-1);
  border: 1px solid var(--border);
  border-radius: var(--r-2);
  padding: 7px 11px;
}

/* ---------- about: portrait + bio ---------- */

.about-hero {
  padding: clamp(48px, 7vw, 88px) 0 clamp(48px, 7vw, 80px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}

.portrait-fig {
  max-width: 420px;
  width: 100%;
  justify-self: center;
  margin: 0;
}
.portrait-frame {
  width: 100%;
  aspect-ratio: 4 / 5;
  border: 1px solid var(--border);
  border-radius: var(--r-3);
  overflow: hidden;
  background: var(--surface);
}
.portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.portrait-cap {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  padding-top: 8px;
}
.portrait-cap i { font-style: italic; }

.bio {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}
.bio p {
  font-size: clamp(16px, 1.4vw, 18px);
  line-height: 1.7;
  color: var(--text-2);
  max-width: 520px;
}

/* ---------- disclosures (experience + honest section) ---------- */

.disclosure {
  border: 1px solid var(--hairline);
  border-radius: var(--r-3);
  background: var(--card);
  transition: border-color var(--t-hover) var(--ease);
}
.disclosure:hover { border-color: var(--border-hi); }

.disclosure + .disclosure { margin-top: 12px; }

.disclosure-btn {
  display: grid;
  grid-template-columns: minmax(110px, 150px) 1fr auto;
  gap: 10px 18px;
  align-items: baseline;
  width: 100%;
  padding: 20px clamp(16px, 2vw, 26px);
  background: none;
  border: 0;
  text-align: left;
  cursor: pointer;
}

.disclosure-date {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}
.disclosure-id { display: flex; flex-direction: column; gap: 4px; }
.disclosure-role {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(19px, 1.9vw, 23px);
  line-height: 1.2;
  color: var(--ink);
}
.disclosure-org {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}
.disclosure-toggle {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  padding: 8px 0;
  white-space: nowrap;
}

.disclosure-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 520ms var(--ease-flow);
}
/* .deadend items on projects.html share this panel markup */
.is-open > .disclosure-panel { grid-template-rows: 1fr; }
/* A 0fr grid row clips the panel visually but leaves it in the
   accessibility tree, so a screen reader announces the button as
   "collapsed" and then reads the hidden content anyway. visibility
   takes it out of the tree — delayed on close so the 520ms collapse
   still plays, immediate on open. Keep the delay in step with the
   grid-template-rows duration above. */
.disclosure-panel > div {
  overflow: hidden;
  visibility: hidden;
  transition: visibility 0s linear 520ms;
}
.is-open > .disclosure-panel > div {
  visibility: visible;
  transition-delay: 0s;
}

.bullets {
  padding: 0 clamp(16px, 2vw, 26px) 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 640px;
}
.bullets li {
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--text-1);
  list-style: none;
}
.bullets { margin: 0; }
.bullets li::before { content: "\2192  "; color: var(--accent); }

/* ---------- at a glance ---------- */

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0 clamp(24px, 4vw, 64px);
}
.fact {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
  border-bottom: 1px solid var(--hairline);
  padding: 15px 2px;
}
.fact dt {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--muted);
}
.fact dd {
  margin: 0;
  font-size: 14.5px;
  color: var(--ink);
  text-align: right;
}
.fact dd.is-accent { color: var(--accent); }

.certs {
  font-family: var(--mono);
  font-size: 11px;
  font-style: italic;
  line-height: 1.8;
  color: var(--muted);
}

/* ---------- projects: featured case ---------- */

.panels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(16px, 2vw, 24px);
}
.panel {
  border: 1px solid var(--hairline);
  border-radius: var(--r-3);
  background: var(--card);
  padding: clamp(20px, 2.4vw, 30px);
  display: flex;
  flex-direction: column;
  gap: 13px;
}
.panel p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-1);
}
.panel .tech { margin-top: auto; }

.result-line {
  font-family: var(--serif);
  font-size: clamp(19px, 1.9vw, 24px);
  line-height: 1.35;
}
.result-line i { color: var(--accent); }

/* the honest section */
.honest {
  border: 1px solid var(--border);
  border-radius: var(--r-3);
  background: var(--card);
  overflow: hidden;
}
.honest-rule { height: 2px; background: var(--accent); }
.honest-head {
  padding: clamp(22px, 3vw, 36px) clamp(18px, 3vw, 36px) 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.honest-title {
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.12;
}
.honest-note {
  font-family: var(--mono);
  font-size: 11.5px;
  font-style: italic;
  line-height: 1.7;
  color: var(--muted);
}
.honest-list {
  padding: clamp(14px, 2vw, 22px) clamp(18px, 3vw, 36px) clamp(22px, 3vw, 36px);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.deadend {
  border: 1px solid var(--hairline);
  border-radius: var(--r-2);
  background: var(--bg);
  transition: border-color var(--t-hover) var(--ease);
}
.deadend:hover { border-color: var(--border-hi); }

.deadend-btn {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px 16px;
  align-items: baseline;
  width: 100%;
  padding: 17px clamp(14px, 1.8vw, 22px);
  background: none;
  border: 0;
  text-align: left;
  cursor: pointer;
}
.deadend-num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}
.deadend-id { display: flex; flex-direction: column; gap: 4px; }
.deadend-title {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(17px, 1.7vw, 21px);
  line-height: 1.25;
  color: var(--ink);
}
.deadend-sub {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--muted);
}
.deadend-toggle {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  padding: 6px 0;
  white-space: nowrap;
}
.deadend-body {
  padding: 0 clamp(14px, 1.8vw, 22px) 20px 42px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 620px;
}
.deadend-body p {
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--text-1);
}
.shipped {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
}

/* ---------- work history + more projects ---------- */

.history {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(16px, 2vw, 24px);
}
.job {
  border: 1px solid var(--hairline);
  border-radius: var(--r-3);
  background: var(--card);
  padding: clamp(20px, 2.4vw, 28px);
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.job-date { font-family: var(--mono); font-size: 10.5px; color: var(--muted); }
.job h3 { font-size: clamp(19px, 1.9vw, 23px); line-height: 1.25; }
.job ul { margin: 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.job li {
  list-style: none;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--text-1);
}
.job li::before { content: "\2192  "; color: var(--accent); }

.minis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(14px, 1.8vw, 20px);
}
.mini {
  border: 1px solid var(--hairline);
  border-radius: var(--r-3);
  background: var(--card);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: var(--ink);
  transition: border-color var(--t-hover) var(--ease),
              box-shadow var(--t-hover) var(--ease);
}
.mini:hover {
  color: var(--ink);
  border-color: var(--border-hi);
  box-shadow: var(--shadow-lift), 0 0 20px rgba(167, 181, 242, 0.12);
}
.mini-cat {
  font-family: var(--mono);
  font-size: 10.5px;
  font-style: italic;
  color: var(--muted);
}
.mini-title { font-family: var(--serif); font-weight: 500; font-size: 20px; line-height: 1.2; }
.mini-desc { font-size: 13.5px; line-height: 1.6; color: var(--text-2); }
.mini-foot {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  border-top: 1px solid var(--hairline);
  padding-top: 12px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-1);
}
.mini-foot b { color: var(--accent); font-weight: 400; }

.gh-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 20px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-3);
  background: var(--card);
  padding: clamp(18px, 2.4vw, 26px) clamp(18px, 2.4vw, 30px);
  color: var(--ink);
  transition: border-color var(--t-hover) var(--ease),
              box-shadow var(--t-hover) var(--ease);
}
.gh-banner:hover {
  color: var(--ink);
  border-color: var(--accent);
  box-shadow: var(--shadow-lift), 0 0 24px rgba(167, 181, 242, 0.18);
}
.gh-banner-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(19px, 2vw, 24px);
}
.gh-banner-title i { color: var(--accent); }
.gh-banner-url { font-family: var(--mono); font-size: 12px; color: var(--accent); }

/* ---------- contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}

.pane-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 14px;
}
.pane-title { font-size: clamp(23px, 2.4vw, 30px); }

.form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-top: 22px;
}
/* `display: flex` above is author-origin, so it beats the UA stylesheet's
   [hidden] rule: without this, form.hidden = true on a successful send
   leaves the whole form on screen and tabbable under the confirmation. */
.form[hidden] { display: none; }

.error-banner {
  border: 1px solid var(--error);
  border-radius: var(--r-2);
  padding: 12px 16px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--error);
}

.field-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 18px;
}

.field { display: flex; flex-direction: column; gap: 8px; }
.field-label {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--muted);
}
.field-flag { color: var(--error); }

/* honeypot — off-screen rather than display:none, which some bots skip */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.input, .textarea {
  width: 100%;
  background: var(--surface);
  /* not --border: WCAG 1.4.11 wants 3:1 for the visible boundary of a
     UI component, and --border on --surface is only 1.43:1. Decorative
     card hairlines are exempt and stay faint; form fields are not. */
  border: 1px solid var(--border-input);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 14px;
  padding: 13px 14px;
  border-radius: var(--r-2);
  outline: none;
  transition: border-color var(--t-hover) var(--ease),
              box-shadow var(--t-hover) var(--ease);
}
.textarea { line-height: 1.65; resize: vertical; }

.input:focus, .textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(167, 181, 242, 0.16);
}
.input::placeholder, .textarea::placeholder { color: #5c6070; }

.field.is-invalid .field-label { color: var(--error); }
.field.is-invalid .input,
.field.is-invalid .textarea { border-color: var(--error); }

.counter-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
}
.counter-row i { font-style: italic; }

.form-foot {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.form-foot .comment { font-size: 10.5px; }

/* sent confirmation */
.sent {
  margin-top: 22px;
  border: 1px solid var(--border);
  border-radius: var(--r-3);
  background: var(--card);
  overflow: hidden;
}
.sent-rule { height: 2px; background: var(--accent); }
.sent-body {
  padding: clamp(26px, 3.4vw, 40px);
  display: flex;
  flex-direction: column;
  gap: 13px;
}
.sent-status { font-family: var(--mono); font-size: 10.5px; color: var(--muted); }
.sent-status b { color: var(--accent); font-weight: 400; }
.sent-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(25px, 2.8vw, 34px);
  line-height: 1.15;
}
.sent-title i { font-style: italic; }
.sent-body p { font-size: 15px; line-height: 1.7; color: var(--text-2); max-width: 440px; }

.linkish {
  align-self: flex-start;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--border-hi);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-1);
  padding: 8px 2px;
  transition: color var(--t-hover) var(--ease), border-color var(--t-hover) var(--ease);
}
.linkish:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* direct channels */
.channels { display: flex; flex-direction: column; padding-top: 8px; }
.channel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--hairline);
  padding: 16px 2px;
  color: var(--ink);
}
a.channel:hover { color: var(--accent); }
.channel-id { display: flex; flex-direction: column; gap: 3px; }
.channel-key { font-family: var(--mono); font-size: 10px; color: var(--muted); }
.channel-val { font-family: var(--mono); font-size: 14px; }
.channel-arrow { font-family: var(--mono); font-size: 12px; color: var(--accent); }

.copy-btn {
  background: none;
  border: 1px solid var(--border);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--text-1);
  padding: 10px 16px;
  border-radius: var(--r-2);
  transition: border-color var(--t-hover) var(--ease),
              box-shadow var(--t-hover) var(--ease),
              color var(--t-hover) var(--ease);
}
.copy-btn:hover {
  border-color: var(--accent);
  box-shadow: 0 0 14px rgba(167, 181, 242, 0.22);
}
.copy-btn.is-copied { color: var(--accent); }

.tz {
  padding-top: 14px;
  font-family: var(--mono);
  font-size: 10.5px;
  font-style: italic;
  line-height: 1.8;
  color: var(--muted);
}

/* ---------- footer ---------- */

.site-footer {
  margin-top: clamp(64px, 9vw, 120px);
  padding-bottom: clamp(28px, 4vw, 48px);
}

.cta {
  border: 1px solid var(--hairline);
  border-radius: var(--r-3);
  background: var(--card);
  padding: clamp(28px, 4vw, 48px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(24px, 4vw, 56px);
}
.cta-copy { display: flex; flex-direction: column; gap: 16px; }
.cta-title {
  font-size: clamp(26px, 3.2vw, 40px);
  line-height: 1.15;
  max-width: 460px;
}
.cta-links {
  display: flex;
  flex-direction: column;
  justify-content: center;
  font-family: var(--mono);
  font-size: 13px;
}
.cta-link {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  border-bottom: 1px solid var(--hairline);
  padding: 14px 2px;
  color: var(--ink);
}
.cta-link:last-child { border-bottom: 0; }
.cta-link:hover { color: var(--accent); }
.cta-link-key { font-size: 10.5px; color: var(--muted); }
.cta-link-val { text-align: right; word-break: break-word; }

.folio {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 20px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  padding: 16px 2px 0;
}
.folio a { color: var(--muted); }
.folio a:hover { color: var(--accent); }

/* ---------- token sheet ---------- */

.spec-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 24px;
  padding: 20px 0 16px;
  border-bottom: 1px solid var(--hairline);
}
.spec-meta { font-family: var(--mono); font-size: 11px; color: var(--muted); }

.spec-grid {
  padding: clamp(28px, 4vw, 44px) 0 clamp(40px, 6vw, 64px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: clamp(24px, 3vw, 40px);
}
.spec-block { display: flex; flex-direction: column; gap: 14px; }
.spec-block.is-full { grid-column: 1 / -1; }
.spec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 12px;
}
.spec-head h2 { font-size: 26px; }
.spec-note { font-family: var(--mono); font-size: 10.5px; font-style: italic; color: var(--muted); }

.swatches {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}
.swatch { display: flex; flex-direction: column; gap: 6px; }
/* the border keeps the light chips (--ink, --text-1) legible against a
   white Canvas in forced-colors; the three chips that set it inline win */
.swatch-chip { height: 52px; border-radius: var(--r-2); border: 1px solid var(--hairline); }
.swatch-name { font-family: var(--mono); font-size: 10px; color: var(--muted); }
.swatch-name.is-accent {
  color: var(--bg);
  background: var(--accent);
  padding: 2px 5px;
  align-self: flex-start;
}
.swatch-use { font-size: 12px; color: var(--text-2); }

.spec-rows { display: flex; flex-direction: column; }
.spec-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--hairline);
  padding: 12px 0;
}
.spec-row:last-child { border-bottom: 0; }
.spec-spec {
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--muted);
  text-align: right;
}
.spec-key { font-family: var(--mono); font-size: 10.5px; color: var(--accent); }
.spec-val { font-size: 13px; color: var(--text-2); }

.scale { display: flex; flex-direction: column; gap: 7px; }
.scale-row { display: flex; align-items: center; gap: 12px; }
.scale-num { width: 44px; font-family: var(--mono); font-size: 10px; color: var(--muted); }
.scale-bar { height: 12px; background: var(--accent); }

.elevations { display: flex; gap: 14px; flex-wrap: wrap; }
.elev { display: flex; flex-direction: column; gap: 6px; align-items: center; }
.elev-box { width: 76px; height: 52px; }
.elev-label { font-family: var(--mono); font-size: 9px; color: var(--muted); }
.elev-stack { position: relative; width: 76px; height: 52px; }
.elev-stack span { position: absolute; inset: 0; border-radius: var(--r-3); }

.spec-foot {
  font-family: var(--mono);
  font-size: 9.5px;
  line-height: 1.8;
  color: var(--muted);
}

/* ---------- responsive ---------- */

@media (max-width: 560px) {
  .disclosure-btn { grid-template-columns: 1fr auto; }
  .disclosure-date { grid-column: 1 / -1; }
  .deadend-body { padding-left: clamp(14px, 1.8vw, 22px); }
  .fact { flex-direction: column; gap: 4px; align-items: flex-start; }
  .fact dd { text-align: left; }
  .cta-link { flex-direction: column; align-items: flex-start; gap: 4px; }
  .cta-link-val { text-align: left; }
  /* Nav: full-width row with 44px tap targets (base links are ~13px tall) */
  .nav { width: 100%; justify-content: space-between; gap: 2px 10px; }
  .nav a { min-height: 44px; padding: 0 4px; display: inline-flex; align-items: center; }
}

/* ---------- forced colors (Windows High Contrast) ---------- */

@media (forced-colors: active) {
  /* on the spec sheet the swatches ARE the content, so they must keep
     their real colours rather than collapse to the forced palette */
  .swatch-chip,
  .scale-bar,
  .elev-box,
  .elev-stack span { forced-color-adjust: none; }
  /* a decorative depth layer has no business over a chosen palette */
  .ambient-grid { display: none; }
}

/* ---------- print ----------
   Reveals commit opacity from an IntersectionObserver callback, which
   never fires for content the visitor has not scrolled past. Printing
   paginates the whole document, so anything still un-revealed would emit
   a full-height blank band. An author !important declaration outranks the
   normal-priority inline style initFlow writes. */

@media print {
  [data-flow] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .veil, .ambient-grid, .top-loader { display: none !important; }
}

/* ---------- reduced motion ----------
   "Reduce", not "remove". Everything that travels, parallaxes,
   loops or scales is killed outright; plain cross-fades stay,
   because they carry no movement and are the one cue that tells a
   visitor the page is assembling. Reveals therefore still sequence
   in — they just don't slide.
   ------------------------------------ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  /* opacity-only, no transform — duration/delay come from the
     custom properties JS writes (untouched by `transition: none`) */
  .flow-armed {
    transition-property: opacity !important;
    transition-duration: var(--flow-dur, 520ms) !important;
    transition-delay: var(--flow-delay, 0ms) !important;
    transition-timing-function: var(--ease-flow) !important;
  }
  /* The veil still runs for these visitors, as a pure cross-fade.
     veil-dissolve only ever animates opacity/visibility, so it is safe to
     re-enable verbatim; the inner lines swap their rising keyframe for
     a plain fade, and the drawn rule (a width animation) sits out.
     initVeil's animationend + 1600ms backstop still force it open, so
     a throttled animation can't leave the page covered. */
  .veil {
    animation: veil-dissolve var(--t-veil-fade) linear var(--t-veil-rm) forwards !important;
  }
  .veil-cmd, .veil-roles {
    animation: veil-fade 260ms linear both !important;
  }
  .veil-roles { animation-delay: 130ms !important; }
  .veil-rule { display: none; }
  .veil.is-leaving { transition: opacity 200ms linear !important; }
}

/* ============================================================
   motion enhancements — loader, bars, micro-interactions
   Auto-motion is JS-guarded (reduced() bails) AND neutralised by
   the reduced-motion block above, so this only runs when allowed.
   ============================================================ */

/* top progress loader */
.top-loader {
  position: fixed;
  top: 0; left: 0;
  height: 2px; width: 0;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(167, 181, 242, 0.6);
  z-index: 9999;
  opacity: 0;
  pointer-events: none; /* decorative and aria-hidden — never absorb clicks */
  transition: width 0.2s linear, opacity 0.3s ease;
}
.top-loader.is-active { opacity: 1; }

/* buttons — lift on hover, press on active */
.btn {
  transition: border-color var(--t-hover) var(--ease),
              color var(--t-hover) var(--ease),
              box-shadow var(--t-hover) var(--ease),
              transform var(--t-hover) var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(0.98); }

/* cards / panels / jobs / minis / banner — lift with depth shadow on hover */
.card, .panel, .job, .mini, .gh-banner {
  transition: border-color var(--t-hover) var(--ease),
              color var(--t-hover) var(--ease),
              box-shadow var(--t-hover) var(--ease),
              transform var(--t-hover) var(--ease);
}
.card:hover, .panel:hover, .job:hover, .mini:hover, .gh-banner:hover {
  transform: translateY(var(--lift));
}
.panel:hover, .job:hover {
  border-color: var(--border-hi);
  box-shadow: var(--shadow-lift);
}
.card:hover .card-link { color: var(--ink); }

/* content links — underline draws in, same technique as the nav */
.card-link, .folio a, .certs a { position: relative; }
.card-link::after, .folio a::after, .certs a::after {
  content: '';
  position: absolute;
  left: 0; right: 100%; bottom: 1px;
  height: 1px;
  background: currentColor;
  transition: right 0.25s var(--ease);
}
.card-link:hover::after,
.card:hover .card-link::after,
.folio a:hover::after,
.certs a:hover::after { right: 0; }

/* cta rows — underline the value span when the row is hovered */
.cta-link-val { position: relative; }
.cta-link-val::after {
  content: '';
  position: absolute;
  left: 0; right: 100%; bottom: -2px;
  height: 1px;
  background: currentColor;
  transition: right 0.25s var(--ease);
}
.cta-link:hover .cta-link-val::after { right: 0; }

/* nav — underline slides in on hover / current */
.nav a { position: relative; }
.nav a::after {
  content: '';
  position: absolute;
  left: 0; right: 100%; bottom: -2px;
  height: 1px;
  background: currentColor;
  transition: right 0.25s var(--ease);
}
.nav a:hover::after,
.nav a[aria-current="page"]::after { right: 0; }

/* benchmark bars grow to their target width */
.bar-fill { transition: width 0.9s cubic-bezier(0.16, 1, 0.3, 1); }

/* portrait fades in once the image decodes (class added by JS) */
.portrait-frame img.reveal-img { opacity: 0; transform: scale(1.02); }
.portrait-frame img.reveal-img.is-loaded {
  opacity: 1;
  transform: none;
  transition: opacity 0.9s var(--ease-flow), transform 0.9s var(--ease-flow);
}

/* ------------------------------------------------------------
   scroll reveals — the transition lives here rather than inline
   so it can be re-declared under reduced motion. JS writes the
   two custom properties and toggles .flow-armed for the duration
   of the reveal only, leaving hover transitions untouched after.
   Declared last so it wins over the .card/.panel hover rule.
   ------------------------------------------------------------ */
.flow-armed {
  transition:
    opacity   var(--flow-dur, 1100ms) var(--ease-flow) var(--flow-delay, 0ms),
    transform var(--flow-dur, 1100ms) var(--ease-flow) var(--flow-delay, 0ms);
}

/* ------------------------------------------------------------
   page veil — the between-pages moment. Static markup so it
   covers from first paint (no flash), and it lifts on a pure CSS
   animation so it self-clears even if JS never runs.
   ------------------------------------------------------------ */
.veil {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: var(--bg);
  display: grid;
  place-items: center;
  padding: var(--gutter);
  /* Hold opaque for --t-veil, then dissolve over --t-veil-fade. The hold
     is an animation-delay rather than a percentage buried in the
     keyframes, so it is a real number initFlow can read back off the
     running animation (see veilRemaining) — the reveal hand-off and the
     cover can never drift apart. During the delay there is no fill, so
     the element simply sits at its base opaque state. */
  animation: veil-dissolve var(--t-veil-fade) var(--ease-flow) var(--t-veil) forwards;
}
/* a return skips the composed splash — just a brief cover and away */
.veil[data-nav="return"] { animation-delay: var(--t-veil-return); }
.veil[data-nav="return"] .veil-roles,
.veil[data-nav="return"] .veil-rule { display: none; }

.veil-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}
.veil-cmd {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  opacity: 0;
  /* the three lines land inside --t-veil (560ms), so the splash has
     finished reading before the cover starts dissolving */
  animation: veil-line 320ms var(--ease-flow) 40ms forwards;
}
.veil-roles {
  font-family: var(--serif);
  font-size: clamp(20px, 3.4vw, 34px);
  line-height: 1.25;
  color: var(--ink);
  max-width: 16ch;
  opacity: 0;
  animation: veil-line 360ms var(--ease-flow) 150ms forwards;
}
.veil-roles i { color: var(--accent); font-style: normal; }
.veil-rule {
  width: 0;
  height: 1px;
  background: var(--border);
  animation: veil-rule 300ms var(--ease-flow) 280ms forwards;
}

@keyframes veil-line {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}
/* the same reveal minus the travel — used under reduced motion */
@keyframes veil-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes veil-rule {
  from { width: 0; }
  to   { width: 190px; }
}
/* the dissolve itself; the opaque hold is the animation-delay */
@keyframes veil-dissolve {
  from { opacity: 1; visibility: visible; }
  to   { opacity: 0; visibility: hidden; }
}

/* JS backstop: the page must never stay covered, even if the
   animation is throttled, unsupported, or never runs */
.veil.is-lifted {
  /* !important throughout: this is the last line of defence against a
     sealed page, so it must outrank both the running animation (CSS
     animations sort above author-normal) and the reduced-motion block's
     own !important veil-dissolve declaration. */
  animation: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* JS re-covers the page on internal navigation */
.veil.is-leaving {
  animation: none;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 300ms var(--ease-flow);
}

/* ============================================================
   PORTFOLIO EVOLUTION EXTENSIONS — Research Notebook & Visual System
   ============================================================ */

/* Top Scroll Progress Line */
.scroll-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  background: var(--accent);
  width: 0%;
  z-index: 100;
  transition: width 100ms ease-out;
  pointer-events: none;
}

/* Live Pulsing Status Dot */
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.status-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #6ee7b7;
  box-shadow: 0 0 0 0 rgba(110, 231, 183, 0.7);
  animation: pulse-ring 2s infinite cubic-bezier(0.4, 0, 0.6, 1);
}
@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(110, 231, 183, 0.7); }
  70% { box-shadow: 0 0 0 8px rgba(110, 231, 183, 0); }
  100% { box-shadow: 0 0 0 0 rgba(110, 231, 183, 0); }
}

/* Interactive Hero Data Flow Visual */
.hero-viz-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-3);
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--text-2);
  margin-top: 1.5rem;
}
.hero-viz-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 8px;
}
.hero-viz-pipeline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.viz-node {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--r-2);
  color: var(--ink);
  transition: all var(--t-hover) var(--ease);
  cursor: default;
}
.viz-node:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}
.viz-node .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}
.viz-arrow {
  color: var(--border-hi);
  font-weight: 700;
}

/* Custom Cursor (Desktop only) */
.custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 8px;
  height: 8px;
  background-color: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 200ms ease, height 200ms ease, background-color 200ms ease, opacity 200ms ease;
  opacity: 0;
}
body.cursor-active .custom-cursor {
  opacity: 0.8;
}
.custom-cursor.is-hovering {
  width: 28px;
  height: 28px;
  background-color: rgba(167, 181, 242, 0.15);
  border: 1px solid var(--accent);
}
.custom-cursor-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.05em;
  color: var(--accent);
  pointer-events: none;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 150ms ease;
}
.custom-cursor.is-hovering .custom-cursor-badge {
  opacity: 1;
}

/* Command Palette Modal (`Ctrl + K`) */
.cmd-palette-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(12, 13, 15, 0.75);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: clamp(40px, 12vh, 120px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms var(--ease);
}
.cmd-palette-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}
.cmd-palette-dialog {
  width: calc(100% - 32px);
  max-width: 580px;
  background: var(--card);
  border: 1px solid var(--border-hi);
  border-radius: var(--r-3);
  box-shadow: 0 24px 48px -12px rgba(0,0,0,0.8);
  overflow: hidden;
  transform: translateY(-12px) scale(0.98);
  transition: transform 200ms var(--ease);
}
.cmd-palette-backdrop.is-open .cmd-palette-dialog {
  transform: translateY(0) scale(1);
}
.cmd-palette-header {
  display: flex;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--hairline);
  gap: 12px;
}
.cmd-palette-search-icon {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 14px;
}
.cmd-palette-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 14px;
  outline: none;
}
.cmd-palette-input::placeholder {
  color: var(--muted);
}
.cmd-palette-esc {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--text-2);
  background: var(--surface);
  border: 1px solid var(--hairline);
  padding: 2px 6px;
  border-radius: var(--r-2);
}
.cmd-palette-list {
  max-height: 320px;
  overflow-y: auto;
  padding: 8px 0;
}
.cmd-palette-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  color: var(--text-1);
  font-family: var(--mono);
  font-size: 12.5px;
  cursor: pointer;
  transition: background var(--t-hover) var(--ease), color var(--t-hover) var(--ease);
}
.cmd-palette-item:hover,
.cmd-palette-item.is-selected {
  background: var(--surface);
  color: var(--accent);
}
.cmd-palette-item-tag {
  font-size: 10.5px;
  color: var(--muted);
}

/* Interactive Pipeline & Architecture Case Studies */
.pipeline-flow {
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-3);
  padding: 24px;
  margin-top: 16px;
}
.pipeline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 12px;
}
.pipeline-nodes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  align-items: center;
}
.pipeline-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-2);
  padding: 12px;
  font-family: var(--mono);
  transition: all var(--t-hover) var(--ease);
  cursor: pointer;
}
.pipeline-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.pipeline-card-type {
  font-size: 9.5px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
  display: block;
}
.pipeline-card-title {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink);
  display: block;
}
.pipeline-card-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  width: 200px;
  background: #151619;
  border: 1px solid var(--border-hi);
  border-radius: var(--r-2);
  padding: 8px 10px;
  font-size: 11px;
  color: var(--text-1);
  line-height: 1.4;
  opacity: 0;
  pointer-events: none;
  transition: opacity 150ms ease, transform 150ms ease;
  z-index: 30;
  box-shadow: 0 8px 16px rgba(0,0,0,0.5);
}
.pipeline-card:hover .pipeline-card-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Model Comparison Dashboard */
.benchmark-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-3);
  padding: 20px;
  margin-top: 16px;
}
.benchmark-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.benchmark-info {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 12px;
}
.benchmark-model-name {
  color: var(--ink);
  font-weight: 500;
}
.benchmark-score {
  color: var(--accent);
  font-weight: 700;
}
.benchmark-track {
  height: 8px;
  background: var(--surface);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}
.benchmark-fill {
  height: 100%;
  background: var(--border-hi);
  width: 0%;
  transition: width 1200ms var(--ease-flow);
}
.benchmark-fill.is-winner {
  background: var(--accent);
}

/* Grad-CAM Interpretability Preview Box */
.gradcam-box {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--surface);
  border: 1px dashed var(--border-hi);
  border-radius: var(--r-2);
  padding: 14px;
  margin-top: 12px;
}
.gradcam-badge {
  font-family: var(--mono);
  font-size: 10px;
  background: rgba(167, 181, 242, 0.12);
  color: var(--accent);
  padding: 4px 8px;
  border-radius: var(--r-2);
  border: 1px solid var(--accent);
  white-space: nowrap;
}
.gradcam-desc {
  font-size: 12.5px;
  color: var(--text-2);
}

/* Project Filter Tabs */
.project-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}
.filter-btn {
  background: var(--card);
  border: 1px solid var(--hairline);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11.5px;
  padding: 6px 14px;
  border-radius: var(--r-2);
  cursor: pointer;
  transition: all var(--t-hover) var(--ease);
}
.filter-btn:hover {
  border-color: var(--border-hi);
  color: var(--ink);
}
.filter-btn.is-active {
  background: var(--surface);
  border-color: var(--accent);
  color: var(--accent);
}

/* Experiment Lab / Notebook Section */
.lab-log-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-3);
  padding: 18px 22px;
  margin-bottom: 14px;
  transition: border-color var(--t-hover) var(--ease);
}
.lab-log-card:hover {
  border-color: var(--border-hi);
}
.lab-log-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 8px;
}
.lab-log-status {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 2px;
}
.lab-log-status.failed {
  background: rgba(217, 140, 133, 0.15);
  color: var(--error);
  border: 1px solid var(--error);
}
.lab-log-status.shipped {
  background: rgba(110, 231, 183, 0.15);
  color: #6ee7b7;
  border: 1px solid #6ee7b7;
}

/* Tech Stack Tree View */
.tech-tree {
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.8;
  color: var(--text-2);
  background: var(--card);
  border: 1px solid var(--border);
  padding: 18px;
  border-radius: var(--r-3);
  margin-top: 16px;
}
.tech-tree span.root { color: var(--accent); font-weight: 700; }
.tech-tree span.branch { color: var(--border-hi); }
.tech-tree span.leaf { color: var(--ink); }

/* Responsive Adjustments for New Components */
@media (max-width: 767px) {
  .hero-viz-pipeline {
    flex-direction: column;
    align-items: stretch;
  }
  .viz-arrow {
    text-align: center;
    transform: rotate(90deg);
  }
  .pipeline-nodes-grid {
    grid-template-columns: 1fr;
  }
  .gradcam-box {
    flex-direction: column;
    align-items: flex-start;
  }
}

