/* =========================================================================
   Sean Lee — Computational Cancer Biology
   Document-grade editorial site. Sharp corners everywhere (border-radius: 0).
   Structure from hairline rules. No cards, no shadows, no fills (bgAlt aside).
   ========================================================================= */

/* ----- 1. Theme tokens --------------------------------------------------- */

:root {
  /* Dark is the design default. */
  --bg: #0E0E0C;
  --bg-alt: #16160F;
  --fg: #F4F3EC;
  --fg-muted: #9A988C;
  --accent: #C6502B;

  /* Hairline derived from fg at low alpha so it tracks the theme. */
  --rule: rgba(244, 243, 236, 0.16);
  --rule-strong: rgba(244, 243, 236, 0.32);

  --font-serif: "Newsreader", Georgia, "Times New Roman", serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Layout */
  --shell-max: 1180px;       /* full grid incl. rail */
  --content-max: 880px;      /* left-anchored content */
  --measure: 46ch;           /* ~430px prose measure */
  --rail-w: 4.5rem;          /* numbered spine column */
  --bar-h: 56px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* Light mode — for printing / sharing on white. Same accent. */
:root[data-theme="light"] {
  --bg: #F4F3EC;
  --bg-alt: #ECEAE0;
  --fg: #0E0E0C;
  --fg-muted: #6A685E;
  --accent: #C6502B;
  --rule: rgba(14, 14, 12, 0.18);
  --rule-strong: rgba(14, 14, 12, 0.34);
}

/* Honor OS preference when the user hasn't chosen explicitly. */
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --bg: #F4F3EC;
    --bg-alt: #ECEAE0;
    --fg: #0E0E0C;
    --fg-muted: #6A685E;
    --accent: #C6502B;
    --rule: rgba(14, 14, 12, 0.18);
    --rule-strong: rgba(14, 14, 12, 0.34);
  }
}

/* ----- 2. Reset ---------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
  border-radius: 0; /* hard global rule */
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--bar-h) + 1.5rem);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p, dl, dd, figure, ol, ul { margin: 0; }
ul, ol { list-style: none; padding: 0; }

a {
  color: inherit;
  text-decoration: none;
}

strong { font-weight: 600; }

/* ----- 3. Accessibility helpers ----------------------------------------- */

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 200;
  transform: translateY(-150%);
  background: var(--accent);
  color: #F4F3EC;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.6rem 1rem;
  transition: transform 0.18s var(--ease);
}
.skip-link:focus { transform: translateY(0); }

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

/* ----- 4. Top bar -------------------------------------------------------- */

.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--bar-h);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--rule);
}

.topbar__inner {
  max-width: var(--shell-max);
  height: 100%;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* Boxed mono monogram, square, sharp */
.monogram {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--rule-strong);
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--fg);
  transition: border-color 0.18s var(--ease);
}
.monogram:hover { border-color: var(--accent); }

/* Nav */
.nav__list {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav__link {
  position: relative;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg-muted);
  padding: 0.25rem 0;
  transition: color 0.18s var(--ease);
}
.nav__num { color: var(--accent); }

/* underline wipe, left-to-right */
.nav__link::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  height: 1px;
  width: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.22s var(--ease);
}
.nav__link:hover { color: var(--fg); }
.nav__link:hover::after,
.nav__link.is-active::after { transform: scaleX(1); }
.nav__link.is-active { color: var(--fg); }

/* Theme toggle */
.theme-toggle {
  background: none;
  border: 1px solid var(--rule-strong);
  color: var(--fg-muted);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.4rem 0.7rem;
  cursor: pointer;
  transition: border-color 0.18s var(--ease), color 0.18s var(--ease);
}
.theme-toggle:hover { border-color: var(--accent); color: var(--fg); }
.theme-toggle:active { transform: scale(0.98); }

/* Hamburger (mobile only) */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 36px; height: 36px;
  background: none;
  border: 1px solid var(--rule-strong);
  cursor: pointer;
}
.nav-toggle__bar {
  display: block;
  width: 16px; height: 1.5px;
  margin: 0 auto;
  background: var(--fg);
  transition: transform 0.2s var(--ease), opacity 0.2s var(--ease);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

/* ----- 5. Shell & numbered spine ---------------------------------------- */

.shell {
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: var(--rail-w) minmax(0, 1fr);
  gap: 0;
}

.rail {
  position: relative;
}
.rail__num {
  position: sticky;
  top: calc(var(--bar-h) + 2rem);
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--accent);
}

.section__content,
.hero__content {
  max-width: var(--content-max);
  padding-top: 5.5rem;
  padding-bottom: 5.5rem;
}

/* Section dividers: full-width 1px hairline above each section's content */
.section {
  border-top: 1px solid var(--rule);
}
.section--alt { background: var(--bg-alt); }

/* ----- 6. Shared type units --------------------------------------------- */

.eyebrow,
.section__kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.section__kicker {
  margin-bottom: 1.75rem;
}
.section__kicker-num { color: var(--accent); margin-right: 0.5rem; }

.section__title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(1.75rem, 1.2rem + 2vw, 2.6rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin-bottom: 1.75rem;
}

.prose p {
  max-width: var(--measure);
  margin-bottom: 1.1rem;
}
.prose p:last-child { margin-bottom: 0; }

.stat-accent {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.92em;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

/* Mono focus tags */
.tagrow {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 2.25rem;
}
.tag {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--fg-muted);
  border: 1px solid var(--rule);
  padding: 0.4rem 0.7rem;
  transition: border-color 0.18s var(--ease), color 0.18s var(--ease);
}
.tag:hover { border-color: var(--accent); color: var(--fg); }

/* ----- 7. Hero ----------------------------------------------------------- */

.hero { padding-top: var(--bar-h); }

.hero__content { padding-top: 6.5rem; }

.eyebrow { margin-bottom: 1.5rem; }

.hero__name {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(3.5rem, 2rem + 7vw, 6rem);
  line-height: 0.96;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

.hero__sub {
  font-family: var(--font-sans);
  font-size: 1.15rem;
  line-height: 1.55;
  color: var(--fg);
  max-width: 36ch;
  margin-bottom: 2.5rem;
}

/* Metadata row */
.metarow {
  display: flex;
  flex-wrap: wrap;
  gap: 2.25rem;
  padding: 1.1rem 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  margin-bottom: 2.75rem;
}
.metarow__cell dt {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 0.3rem;
}
.metarow__cell dd {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--fg);
}

/* 3-cell stat strip with vertical hairlines */
.statstrip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--rule);
  margin-bottom: 2.5rem;
  max-width: 620px;
}
.statstrip__cell {
  padding: 1.25rem 1.4rem;
  border-left: 1px solid var(--rule);
}
.statstrip__cell:first-child { border-left: 0; }
.statstrip__num {
  display: block;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.6rem;
  line-height: 1;
  margin-bottom: 0.45rem;
}
.statstrip__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.readlink {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--fg-muted);
  position: relative;
  transition: color 0.18s var(--ease);
}
.readlink::after {
  content: "";
  position: absolute;
  left: 0; bottom: -3px;
  width: 100%; height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.22s var(--ease);
}
.readlink:hover { color: var(--fg); }
.readlink:hover::after { transform: scaleX(1); }

/* ----- 8. Research ------------------------------------------------------- */

.poster-title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(1.6rem, 1.1rem + 2vw, 2.4rem);
  line-height: 1.18;
  letter-spacing: -0.01em;
  margin-bottom: 1.5rem;
}

.venue {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.authors {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.8;
  color: var(--fg);
  max-width: 60ch;
  margin-bottom: 2.5rem;
}
.authors strong { color: var(--fg); font-weight: 500; }
.authors__aff { color: var(--fg-muted); }

.abstract {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 1.18rem;
  line-height: 1.6;
  max-width: 60ch;
  margin-bottom: 3rem;
}

/* GRAFT 1 — builder pipeline */
.pipeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-bottom: 2.5rem;
}
.pipeline__cell {
  position: relative;
  border: 1px solid var(--rule);
  border-left: 0;
  padding: 1.1rem 1.15rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.pipeline__cell:first-child { border-left: 1px solid var(--rule); }

/* accent connector tick between cells */
.pipeline__cell:not(:first-child)::before {
  content: "";
  position: absolute;
  left: -1px; top: 50%;
  width: 1px; height: 14px;
  background: var(--accent);
  transform: translateY(-50%);
}
.pipeline__idx {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--accent);
}
.pipeline__step {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.95rem;
  line-height: 1.3;
}
.pipeline__data {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: 0.01em;
  color: var(--fg-muted);
  margin-top: auto;
}

/* GRAFT 2 — gene chips */
.genepanel {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 2.5rem;
}
.genepanel__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-right: 0.35rem;
}
.genechips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.genechip {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--fg);
  border: 1px solid var(--accent);
  padding: 0.3rem 0.6rem;
}

/* Collapsible */
.brief {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  margin-bottom: 1.5rem;
}
.brief__summary {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg-muted);
  padding: 1rem 0;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  transition: color 0.18s var(--ease);
}
.brief__summary:hover { color: var(--fg); }
.brief__summary::-webkit-details-marker { display: none; }
.brief__summary::before {
  content: "+";
  color: var(--accent);
  font-size: 14px;
  line-height: 1;
}
.brief[open] .brief__summary::before { content: "\2212"; }
.brief__list {
  padding: 0 0 1.25rem;
  display: grid;
  gap: 0.9rem;
}
.brief__list li {
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 60ch;
  color: var(--fg);
}
.brief__k {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.2rem;
}

/* ----- 9. The record (reveal) ------------------------------------------- */

.record__claim {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(2.35rem, 1.5rem + 3.4vw, 3.9rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  max-width: 17ch;
  margin-bottom: 1.75rem;
}
.record__claim em { font-style: italic; color: var(--accent); }

.record__body {
  font-family: var(--font-sans);
  font-size: 1.1rem;
  line-height: 1.6;
  max-width: 48ch;
  margin-bottom: 1.5rem;
}

.record__caption {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 3rem;
}

/* GRAFT 6 — specimen block */
.specimen {
  border: 1px solid var(--rule-strong);
  padding: 1.5rem 1.6rem;
  max-width: 640px;
}
.specimen__cap {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.85rem;
}
.specimen__title {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  color: var(--fg);
}

/* ----- 10. Findings table ----------------------------------------------- */

.findings {
  border-top: 1px solid var(--rule);
  margin-bottom: 2rem;
}
.findings__row {
  display: grid;
  grid-template-columns: 9.5rem minmax(0, 1fr);
  gap: 1.5rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--rule);
}
.findings__k {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  padding-top: 0.15rem;
}
.findings__v {
  font-size: 0.97rem;
  line-height: 1.65;
  color: var(--fg);
  max-width: 58ch;
}

.methods-foot {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.7;
  letter-spacing: 0.02em;
  color: var(--fg-muted);
  max-width: 60ch;
}

/* ----- 11. Trajectory ledger -------------------------------------------- */

.ledger {
  border-top: 1px solid var(--rule);
}
.ledger__row {
  position: relative;
  display: grid;
  grid-template-columns: 10rem minmax(0, 1fr);
  gap: 1.5rem;
  padding: 1.1rem 0 1.1rem 1.25rem;
  border-bottom: 1px solid var(--rule);
}
/* sharp accent tick */
.ledger__row::before {
  content: "";
  position: absolute;
  left: 0; top: 1.55rem;
  width: 7px; height: 1px;
  background: var(--accent);
}
.ledger__date {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.ledger__event {
  font-size: 0.97rem;
  line-height: 1.55;
  max-width: 52ch;
}

/* ----- 12. Contact / colophon ------------------------------------------- */

.contact__lede {
  font-family: var(--font-sans);
  font-size: 1.1rem;
  line-height: 1.6;
  max-width: 44ch;
  color: var(--fg);
  margin-bottom: 2rem;
}

.contact__email {
  display: inline-block;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(1.75rem, 1.2rem + 2.5vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  position: relative;
  margin-bottom: 2.5rem;
  word-break: break-word;
}
.contact__email::after {
  content: "";
  position: absolute;
  left: 0; bottom: -4px;
  width: 100%; height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease);
}
.contact__email:hover::after { transform: scaleX(1); }

.contact__links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.75rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  margin-bottom: 3rem;
}
.contact__links a {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg-muted);
  position: relative;
  transition: color 0.18s var(--ease);
}
.contact__links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -3px;
  width: 100%; height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.22s var(--ease);
}
.contact__links a:hover { color: var(--fg); }
.contact__links a:hover::after { transform: scaleX(1); }

.colophon {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.colophon__mono {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  border: 1px solid var(--rule-strong);
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.04em;
}
.colophon__line {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.03em;
  color: var(--fg-muted);
}

/* ----- 13. Reveal animation --------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* If JS never runs or motion is reduced, content must be visible. */
.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ----- 14. Responsive ---------------------------------------------------- */

@media (max-width: 860px) {
  /* Pipeline collapses to a vertical stack */
  .pipeline {
    grid-template-columns: 1fr;
  }
  .pipeline__cell {
    border-left: 1px solid var(--rule);
    border-top: 0;
  }
  .pipeline__cell:first-child { border-top: 1px solid var(--rule); }
  .pipeline__cell:not(:first-child)::before {
    left: 50%; top: -1px;
    width: 14px; height: 1px;
    transform: translateX(-50%);
  }
}

@media (max-width: 720px) {
  :root { --rail-w: 0px; }

  .shell {
    grid-template-columns: 1fr;
    padding: 0 1.25rem;
  }
  .rail { display: none; }

  .section__content,
  .hero__content {
    padding-top: 4rem;
    padding-bottom: 4rem;
  }

  /* Mobile nav: slide-down panel */
  .nav-toggle { display: flex; }

  .nav {
    position: fixed;
    inset: var(--bar-h) 0 auto 0;
    background: var(--bg);
    border-bottom: 1px solid var(--rule);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
  }
  .nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem 1.25rem 1.25rem;
  }
  .nav__list li { border-top: 1px solid var(--rule); }
  .nav__list li:first-child { border-top: 0; }
  .nav__link {
    display: block;
    padding: 0.95rem 0;
    font-size: 13px;
  }
  .nav__link::after { display: none; }
  .nav__link.is-active { color: var(--accent); }
  .theme-toggle {
    width: 100%;
    margin-top: 0.85rem;
    padding: 0.75rem;
    text-align: center;
  }

  .findings__row,
  .ledger__row {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  .ledger__row { padding-left: 1rem; }

  .metarow { gap: 1.5rem 2rem; }
  .statstrip { grid-template-columns: 1fr; }
  .statstrip__cell { border-left: 0; border-top: 1px solid var(--rule); }
  .statstrip__cell:first-child { border-top: 0; }
}

@media (max-width: 400px) {
  .contact__links { gap: 0.9rem 1.25rem; }
}

/* ----- 15. Print --------------------------------------------------------- */

@media print {
  :root {
    --bg: #fff; --bg-alt: #fff; --fg: #000;
    --fg-muted: #444; --rule: #ccc; --rule-strong: #999;
  }
  .topbar, .skip-link, .readlink, .theme-toggle, .nav-toggle { display: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .section { border-top: 1px solid #ccc; }
  body { font-size: 12pt; }
  .papers, .entries, .principles, .skillgrid { break-inside: avoid; }
}

/* ========================================================================= */
/* ----- 16. Expansion components ----------------------------------------- */
/* Papers, ventures/record/community entries, skills grid, research brain.   */
/* Uses the same tokens + hairline language as the base sheet.               */
/* ========================================================================= */

/* Section intro paragraph */
.section__lede {
  font-family: var(--font-sans);
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--fg);
  max-width: 54ch;
  margin-bottom: 2.25rem;
}
.section__lede strong { font-weight: 600; }

/* 4-up stat strip variant (research + brain) */
.statstrip--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  max-width: none;
}
.statstrip--4 .statstrip__num { font-size: 1.45rem; }

/* ----- Research: paper blocks ------------------------------------------- */
.papers {
  border-top: 1px solid var(--rule-strong);
  margin: 2.5rem 0;
}
.paper {
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--rule);
}
.paper__status {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 1.2rem;
}
.paper__status::before {
  content: "";
  width: 7px;
  height: 7px;
  background: var(--accent);
  flex-shrink: 0;
}
.paper__title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(1.3rem, 1rem + 1.6vw, 1.85rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-bottom: 1rem;
  text-wrap: balance;
}
.paper--lead .paper__title {
  font-size: clamp(1.6rem, 1.1rem + 2.4vw, 2.5rem);
}
.paper__title--sm {
  font-size: clamp(1.2rem, 1rem + 1vw, 1.5rem);
}
.paper .venue { margin-bottom: 0.75rem; }
.paper .authors { margin-bottom: 1.25rem; }
.paper__body {
  font-family: var(--font-sans);
  font-size: 1.02rem;
  line-height: 1.72;
  color: var(--fg-muted);
  max-width: 66ch;
  margin-bottom: 1.25rem;
}
.paper__body strong { color: var(--fg); }
.paper__body em { font-style: italic; color: var(--fg); }
.paper .genepanel { margin: 0 0 1.25rem; }

/* Key findings: hairline list with accent tick */
.keyfindings {
  border-top: 1px solid var(--rule);
  margin-top: 1.25rem;
}
.keyfinding {
  position: relative;
  padding: 0.7rem 0 0.7rem 1.4rem;
  border-bottom: 1px solid var(--rule);
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--fg);
  max-width: 64ch;
}
.keyfinding::before {
  content: "";
  position: absolute;
  left: 0; top: 0.95rem;
  width: 7px; height: 1px;
  background: var(--accent);
}

/* ----- Generic entry list (ventures, record roles, community) ----------- */
.entries { border-top: 1px solid var(--rule-strong); }
.entry {
  padding: 1.65rem 0;
  border-bottom: 1px solid var(--rule);
}
.entry__top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.4rem 1.5rem;
  flex-wrap: wrap;
}
.entry__title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(1.15rem, 1rem + 0.8vw, 1.45rem);
  line-height: 1.25;
  letter-spacing: -0.005em;
}
.entry__period {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg-muted);
  white-space: nowrap;
  flex-shrink: 0;
}
.entry__role {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--accent);
  margin: 0.4rem 0 0.7rem;
}
.entry__body {
  font-size: 0.97rem;
  line-height: 1.6;
  color: var(--fg-muted);
  max-width: 64ch;
}
.entry__body strong { color: var(--fg); }
.entry__stat {
  display: inline-block;
  margin-top: 0.9rem;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.02em;
  color: var(--fg);
  border: 1px solid var(--rule-strong);
  padding: 0.35rem 0.65rem;
}
.entry__titlelink {
  color: inherit;
  border-bottom: 1px solid transparent;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease);
}
.entry__titlelink:hover { color: var(--accent); border-bottom-color: var(--accent); }
.entry__ext { color: var(--accent); font-size: 0.65em; vertical-align: super; }
.entry__link {
  display: block;
  width: fit-content;
  margin-top: 0.9rem;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--accent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.18s var(--ease);
}
.entry__link:hover { border-bottom-color: var(--accent); }

/* ----- Skills grid ------------------------------------------------------ */
.skillgrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--rule);
}
.skillgroup {
  padding: 1.4rem 1.5rem 1.6rem;
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
}
.skillgroup:nth-child(-n + 2) { border-top: 0; }
.skillgroup:nth-child(odd) { border-left: 0; }
.skillgroup__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.95rem;
}
.skillgroup__items {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.skillgroup__items li {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.01em;
  color: var(--fg-muted);
  border: 1px solid var(--rule);
  padding: 0.3rem 0.6rem;
}

/* ----- Research brain --------------------------------------------------- */
.thesis {
  font-family: var(--font-serif);
  font-weight: 500;
  font-style: italic;
  font-size: clamp(1.3rem, 1.1rem + 1.2vw, 1.85rem);
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: var(--fg);
  border-left: 2px solid var(--accent);
  padding-left: 1.4rem;
  margin: 2.5rem 0;
  max-width: 60ch;
}
.brain-prose { margin-bottom: 2.25rem; }
.brain-prose p {
  max-width: 64ch;
  margin-bottom: 1.1rem;
  color: var(--fg-muted);
}
.brain-prose strong { color: var(--fg); font-weight: 500; }
.principles {
  border-top: 1px solid var(--rule-strong);
  margin-bottom: 2.25rem;
}
.principle {
  padding: 1.2rem 0;
  border-bottom: 1px solid var(--rule);
}
.principle__k {
  display: flex;
  gap: 0.6rem;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1rem;
  color: var(--fg);
  margin-bottom: 0.35rem;
}
.principle__k::before { content: "\2192"; color: var(--accent); }
.principle__v {
  color: var(--fg-muted);
  font-size: 0.97rem;
  line-height: 1.6;
  max-width: 64ch;
  padding-left: 1.4rem;
}
.brain-close {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.15rem;
  line-height: 1.55;
  color: var(--fg);
  border-top: 1px solid var(--rule);
  padding-top: 1.5rem;
  margin-bottom: 1.5rem;
  max-width: 58ch;
}

/* ----- Figures / screenshots ------------------------------------------- */
.shot {
  margin: 2rem 0;
  border: 1px solid var(--rule);
  background: var(--bg-alt);
}
.shot img {
  display: block;
  width: 100%;
  height: auto;
  border-bottom: 1px solid var(--rule);
}
.shot--narrow { max-width: 440px; }
.shotrow {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 1rem;
  align-items: start;
  margin: 2rem 0;
}
.shotrow .shot { margin: 0; }
@media (max-width: 680px) {
  .shotrow { grid-template-columns: 1fr; }
}
.shot__cap {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg-muted);
  padding: 0.75rem 1rem;
}
/* If the image file isn't present yet, hide the broken <img> and show a clean
   captioned placeholder instead of a broken-image icon. */
.shot.is-missing { border-style: dashed; }
.shot.is-missing img { display: none; }
.shot.is-missing .shot__cap { border-top: 0; }
.shot.is-missing .shot__cap::before { content: "▢  "; color: var(--accent); }

/* ----- Expansion responsive (ordered after base + base media queries) --- */
@media (max-width: 860px) {
  .statstrip--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .statstrip--4 .statstrip__cell:nth-child(3) { border-left: 0; }
  .statstrip--4 .statstrip__cell:nth-child(n + 3) { border-top: 1px solid var(--rule); }
}
@media (max-width: 720px) {
  .statstrip--4 { grid-template-columns: 1fr; }
  .statstrip--4 .statstrip__cell {
    border-left: 0;
    border-top: 1px solid var(--rule);
  }
  .statstrip--4 .statstrip__cell:first-child { border-top: 0; }

  .skillgrid { grid-template-columns: 1fr; }
  .skillgroup { border-left: 0; }
  .skillgroup:nth-child(2) { border-top: 1px solid var(--rule); }

  .entry__period { white-space: normal; }

  .paper__title,
  .paper__body,
  .entry__title,
  .contact__email { overflow-wrap: break-word; }
}

/* ========================================================================= */
/* ----- 17. Sutura Genomics flagship section ----------------------------- */
/* ========================================================================= */

/* Filled accent badge — used in the hero for the YC signal */
.hero__badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--accent);
  color: var(--accent-fg);
  padding: 0.45rem 0.8rem;
  margin-bottom: 1.5rem;
}

/* Bordered accent badge — used inside the Sutura section */
.sutura-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 0.45rem 0.8rem;
  margin-bottom: 1.4rem;
}

/* In-section subheading divider */
.sutura-h {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 2.75rem 0 1.1rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
}

/* Result punch line */
.sutura-claim {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(1.5rem, 1.1rem + 2vw, 2.4rem);
  line-height: 1.18;
  letter-spacing: -0.015em;
  margin: 0.25rem 0 1.25rem;
  max-width: 26ch;
  text-wrap: balance;
}
.sutura-claim em { font-style: italic; color: var(--accent); }

/* Head-to-head comparison (Sutura vs PASTE2) */
.versus { border-top: 1px solid var(--rule-strong); margin: 1.75rem 0 0; }
.versus__head,
.versus__row {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--rule);
  align-items: baseline;
}
.versus__head {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.versus__metric {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--fg-muted);
}
.versus__a { color: var(--fg); font-weight: 500; }
.versus__b { color: var(--fg-muted); }
.versus__tag { display: none; }

/* Honest caveats — quieter, no accent */
.caveats { border-top: 1px solid var(--rule); margin-top: 1.5rem; padding-top: 1.1rem; }
.caveats__cap {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 0.85rem;
}
.caveats__list li {
  position: relative;
  padding: 0.4rem 0 0.4rem 1.3rem;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--fg-muted);
  max-width: 66ch;
}
.caveats__list li::before { content: "—"; position: absolute; left: 0; }

/* Team credits */
.credits { border-top: 1px solid var(--rule-strong); margin-top: 0.5rem; }
.credit {
  display: flex;
  gap: 0.5rem 1.25rem;
  align-items: baseline;
  flex-wrap: wrap;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--rule);
}
.credit__name { font-family: var(--font-serif); font-weight: 600; font-size: 1.05rem; }
.credit__role { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.02em; color: var(--fg-muted); }

/* YC fine print */
.finehint {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.65;
  color: var(--fg-muted);
  margin-top: 1.25rem;
  max-width: 70ch;
}

@media (max-width: 680px) {
  .versus__head { display: none; }
  .versus__row { grid-template-columns: 1fr; gap: 0.25rem; }
  .versus__tag {
    display: inline;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
    margin-right: 0.45rem;
  }
}
