/* idappt.org — design system
 * Black & white, airnauts-inspired
 * Dark hero / light body, scroll-reveal motion, WCAG 2.2 AA target
 */

/* ---------- 1. Tokens ---------- */
:root {
  --black: #000000;
  --ink: #0A0A0A;
  --ink-soft: #141414;
  --ink-2: #1E1E1E;
  --white: #FFFFFF;
  --paper: #FFFFFF;
  --paper-soft: #F5F5F5;
  --grey-900: #1A1A1A;
  --grey-700: #4A4A4A;
  --grey-500: #8A8A8A;
  --grey-300: #C9C9C9;
  --grey-200: #E5E5E5;
  --grey-100: #F0F0F0;
  --blood: #8B0000;
  --line: rgba(0, 0, 0, 0.12);
  --line-strong: rgba(0, 0, 0, 0.25);
  --line-on-dark: rgba(255, 255, 255, 0.15);
  --line-on-dark-strong: rgba(255, 255, 255, 0.3);

  --font-display: 'Manrope', 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, Menlo, Consolas, monospace;

  --maxw: 1320px;
  --gutter: clamp(20px, 4vw, 64px);
  --section-y: clamp(72px, 10vw, 160px);

  --radius: 14px;
  --radius-sm: 8px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

/* ---------- 2. Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 3px; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
::selection { background: var(--ink); color: var(--white); }

/* ---------- 3. Layout primitives ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section { padding: var(--section-y) 0; }
.section--paper { background: var(--paper); color: var(--ink); }
.section--soft { background: var(--paper-soft); color: var(--ink); }
.section--dark { background: var(--ink); color: var(--white); }
.section--black { background: var(--black); color: var(--white); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 16px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 24px;
  display: inline-flex;
  align-items: center;
  gap: 16px;
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 72px; height: 72px;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><circle cx='50' cy='50' r='42' fill='none' stroke='black' stroke-width='7'/><circle cx='28' cy='50' r='7' fill='black'/><rect x='40' y='45' width='52' height='10' fill='black'/></svg>") center / contain no-repeat;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><circle cx='50' cy='50' r='42' fill='none' stroke='black' stroke-width='7'/><circle cx='28' cy='50' r='7' fill='black'/><rect x='40' y='45' width='52' height='10' fill='black'/></svg>") center / contain no-repeat;
}
.section--dark .eyebrow,
.section--black .eyebrow,
.hero--dark .eyebrow { color: var(--white); }
/* Brand name keeps the eyebrow styling but stays lowercase, like everywhere else. */
.eyebrow--brand { text-transform: none; letter-spacing: 0.03em; }

/* ---------- 4. Typography ---------- */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.025em; line-height: 1.02; }

.h-display {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(48px, 10vw, 160px);
  line-height: 0.92;
  letter-spacing: -0.045em;
}
.h-1 { font-size: clamp(40px, 6.5vw, 96px); line-height: 0.98; letter-spacing: -0.035em; font-weight: 800; }
.h-2 { font-size: clamp(30px, 4vw, 60px); line-height: 1.04; letter-spacing: -0.028em; font-weight: 700; }
.h-3 { font-size: clamp(22px, 2.4vw, 32px); line-height: 1.18; font-weight: 700; letter-spacing: -0.018em; }

.lede {
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.5;
  color: inherit;
  opacity: 0.82;
  max-width: 64ch;
}
.section--dark .lede,
.section--black .lede { opacity: 0.75; }
.body-l { font-size: 18px; line-height: 1.6; }

.mono { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.04em; }

.outline-text {
  -webkit-text-stroke: 1.5px currentColor;
  color: transparent;
}

/* ---------- 5. Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  color: var(--white);
  border-bottom: 1px solid var(--line-on-dark);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px var(--gutter);
  max-width: var(--maxw);
  margin: 0 auto;
}
.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 28px;
  letter-spacing: -0.025em;
}
.nav__mark { width: 44px; height: 44px; }
.nav__links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}
.nav__links a {
  text-decoration: none;
  font-size: 20px;
  color: rgba(255, 255, 255, 0.78);
  transition: color 0.2s var(--ease-out);
}
.nav__links a:hover,
.nav__links a[aria-current="page"] { color: var(--white); }
.nav__links a[aria-current="page"] {
  border-bottom: 1px solid var(--white);
  padding-bottom: 4px;
}
.nav__cta { padding: 10px 18px; }
.nav__toggle { display: none; }

@media (max-width: 860px) {
  .nav__toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px; height: 40px;
    border: 1px solid var(--line-on-dark);
    border-radius: 8px;
  }
  .nav__toggle span {
    display: block; width: 18px; height: 2px; background: var(--white);
    position: relative;
  }
  .nav__toggle span::before, .nav__toggle span::after {
    content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: var(--white);
    transition: transform 0.25s var(--ease-out);
  }
  .nav__toggle span::before { top: -6px; }
  .nav__toggle span::after { top: 6px; }
  .nav__links {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--black);
    padding: 8px var(--gutter) 24px;
    border-bottom: 1px solid var(--line-on-dark);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s var(--ease-out), opacity 0.25s var(--ease-out);
  }
  .nav__links li { width: 100%; }
  .nav__links a { display: block; padding: 14px 0; font-size: 18px; width: 100%; }
  .nav__links .nav__cta { display: inline-flex; margin-top: 8px; }
  .nav[data-open="true"] .nav__links { transform: translateY(0); opacity: 1; pointer-events: auto; }
}

@media (max-width: 640px) {
  .nav__brand { font-size: 22px; gap: 10px; }
  .nav__mark { width: 34px; height: 34px; }
  .eyebrow { gap: 12px; }
  .eyebrow::before { width: 44px; height: 44px; }
}

/* ---------- 6. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.005em;
  text-decoration: none;
  transition: transform 0.2s var(--ease-out), background 0.25s var(--ease-out), color 0.25s var(--ease-out), border-color 0.25s var(--ease-out);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }

/* On dark sections */
.btn--primary { background: var(--white); color: var(--ink); }
.btn--primary:hover { background: var(--grey-200); color: var(--ink); }
.btn--ghost { background: transparent; color: var(--white); border: 1px solid var(--line-on-dark-strong); }
.btn--ghost:hover { background: var(--white); color: var(--ink); border-color: var(--white); }

/* On light sections */
.section--paper .btn--primary,
.section--soft .btn--primary { background: var(--ink); color: var(--white); }
.section--paper .btn--primary:hover,
.section--soft .btn--primary:hover { background: var(--black); }
.section--paper .btn--ghost,
.section--soft .btn--ghost { border-color: var(--line-strong); color: var(--ink); }
.section--paper .btn--ghost:hover,
.section--soft .btn--ghost:hover { background: var(--ink); color: var(--white); border-color: var(--ink); }

.arrow { display: inline-block; transition: transform 0.2s var(--ease-out); }
.btn:hover .arrow { transform: translateX(4px); }

/* ---------- 7. Hero ---------- */
.hero {
  position: relative;
  min-height: clamp(560px, 94svh, 920px);
  display: flex;
  align-items: flex-end;
  padding: clamp(120px, 18vh, 220px) 0 clamp(48px, 8vh, 96px);
  overflow: hidden;
}
.hero--dark { background: var(--black); color: var(--white); }
.hero__inner { position: relative; z-index: 2; width: 100%; }
.hero__title { max-width: 18ch; }
.hero__sub {
  margin-top: 28px;
  max-width: 56ch;
  font-size: clamp(17px, 1.5vw, 22px);
  line-height: 1.5;
  opacity: 0.78;
}
.hero__ctas { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 14px; }
.hero__meta {
  position: absolute;
  bottom: 32px; right: var(--gutter);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.55;
  text-align: right;
  line-height: 1.8;
  z-index: 2;
}
.hero__index {
  position: absolute;
  top: 32px; right: var(--gutter);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.55;
  z-index: 2;
}

/* The corner labels are decorative framing that only works when the hero is
   wide. Below this the hero's paragraph and CTA row grow tall enough to reach
   the bottom-right corner and sit on top of .hero__meta — overlapping on
   Android, merely crowded on iOS. Nothing is lost by dropping them: the
   pre-incubation status is already in the status banner and the footer, and
   .hero__index is ornament. */
@media (max-width: 860px) {
  .hero__meta, .hero__index { display: none; }
}

/* Subtle grid background + vignette for dark hero */
.hero--dark::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse at 50% 60%, #000 25%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 60%, #000 25%, transparent 75%);
  z-index: 0;
}
.hero--dark::after {
  content: "";
  position: absolute;
  width: 55vmax; height: 55vmax;
  left: -8vmax; bottom: -18vmax;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.08), transparent 65%);
  filter: blur(40px);
  z-index: 0;
  pointer-events: none;
}

/* ---------- 8. Cards / grids ---------- */
.grid {
  display: grid;
  gap: clamp(20px, 2.4vw, 36px);
}
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
/* minmax(0, 1fr) everywhere, not plain 1fr: a bare 1fr track has an automatic
   minimum of min-content, so one un-wrappable child (the breach ticker's
   white-space: nowrap row, or the 13-character record count) widens the column
   past the viewport and drags the whole page sideways with it. */
@media (max-width: 900px) {
  .grid--3, .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: minmax(0, 1fr); }
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(24px, 2.4vw, 36px);
  transition: transform 0.3s var(--ease-out), border-color 0.3s var(--ease-out), background 0.3s var(--ease-out);
  display: flex; flex-direction: column;
  gap: 14px;
  height: 100%;
}
.card:hover { transform: translateY(-4px); border-color: var(--ink); }
.section--soft .card { background: var(--paper); }
.section--dark .card,
.section--black .card {
  background: var(--ink-soft);
  border-color: var(--line-on-dark);
  color: var(--white);
}
.section--dark .card:hover,
.section--black .card:hover { border-color: var(--white); background: var(--ink-2); }

.card__num {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink);
  opacity: 0.6;
}
.section--dark .card__num,
.section--black .card__num { color: var(--white); opacity: 0.6; }
.card__title { font-size: 22px; line-height: 1.18; font-weight: 700; letter-spacing: -0.015em; }
.card__body { font-size: 16px; line-height: 1.55; opacity: 0.78; }
/* Project cards carry labelled fields (Headache / Experiment / Status). The <h4> labels
   have to sit outside a <p> to be valid, so the body stacks them with the same 14px
   rhythm .card uses on its own children. */
.card__body--fields { display: flex; flex-direction: column; gap: 0; }
/* A label belongs to the text under it, so the space below a label is much
   tighter than the space above it. A uniform gap made every label float
   equidistant between two paragraphs and the fields read as one grey block. */
.card__body--fields > h4 { margin-top: 17px; }
.card__body--fields > h4:first-child { margin-top: 0; }
.card__body--fields > p { margin-top: 4px; }
/* A field can run to two paragraphs. They need air between them, but less than
   the 17px that separates one field from the next, or the split reads as a
   missing label. */
.card__body--fields > p + p { margin-top: 10px; }
/* Founder / co-founder person cards */
.card__person {
  display: flex;
  align-items: center;
  gap: 16px;
  align-self: flex-start;
  margin: 2px 0;
}
.card__avatar {
  width: 72px;
  height: 72px;
  flex: 0 0 auto;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: var(--ink-2);
  border: 1px solid var(--line-on-dark);
}
.card__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1);
}
.card__avatar--color img { filter: none; }
.card__avatar--placeholder svg {
  width: 34px;
  height: 34px;
  color: var(--white);
  opacity: 0.5;
}
/* The processor fills the whole avatar (dense die + traces, circle-cropped
   like the reference photo), so override the small centred placeholder sizing. */
.card__avatar--placeholder svg.icon--cpu {
  width: 100%;
  height: 100%;
  opacity: 0.72;
}
/* Human marker: pipette matches the AI DNA icons (white stroke @ 50%),
   the drop is the site's one spot of colour — deep blood-red. */
.card__avatar--human svg {
  width: 34px;
  height: 34px;
  color: var(--white);
}
.card__avatar--human .pip-body { opacity: 0.5; }
.card__avatar--human .pip-drop {
  fill: var(--blood);
  stroke: var(--blood);
}
.card__species {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: var(--font-mono);
}
.card__species-value {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  letter-spacing: 0.01em;
}
.card__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex: 0 0 auto;
}
.card__dot--solid { background: currentColor; }
.card__dot--ring { border: 1.5px solid currentColor; background: transparent; }
.section--dark .card__species,
.section--black .card__species { color: var(--white); }
.card__link {
  margin-top: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.card__link::after {
  content: "→";
  transition: transform 0.2s var(--ease-out);
}
.card:hover .card__link::after { transform: translateX(4px); }
.section--dark .card__link,
.section--black .card__link { color: var(--white); }

.card__link--brand {
  font-family: var(--font-display);
  font-size: 32px;
  letter-spacing: -0.02em;
  text-transform: none;
  font-weight: 800;
  gap: 14px;
}
.card__link--brand::after { content: none; }
.card__mark {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}

.stage {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--grey-100);
  color: var(--ink);
  align-self: flex-start;
}
.stage::before {
  content: "";
  width: 6px; height: 6px;
  background: currentColor;
  border-radius: 50%;
}
.section--dark .stage,
.section--black .stage { background: rgba(255,255,255,0.1); color: var(--white); }

/* ---------- 9. Method / step blocks (used on Lab page) ---------- */
.step {
  display: grid;
  grid-template-columns: minmax(160px, 220px) 1fr;
  gap: clamp(24px, 4vw, 72px);
  padding: clamp(48px, 7vw, 96px) 0;
  border-top: 1px solid var(--line);
  align-items: start;
}
.section--dark .step,
.section--black .step { border-top-color: var(--line-on-dark); }
.step__num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(72px, 11vw, 180px);
  line-height: 0.85;
  letter-spacing: -0.05em;
  color: var(--ink);
}
.section--dark .step__num,
.section--black .step__num { color: var(--white); }
.step__num--outline {
  -webkit-text-stroke: 2px currentColor;
  color: transparent;
}
.step__title { font-size: clamp(28px, 3.2vw, 44px); font-weight: 700; letter-spacing: -0.022em; line-height: 1.06; margin-bottom: 18px; }
.step__body { font-size: 17px; line-height: 1.6; max-width: 62ch; opacity: 0.82; }
@media (max-width: 720px) {
  .step { grid-template-columns: 1fr; gap: 16px; padding: 56px 0; }
}

/* ---------- 10. Split / two-column ---------- */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 96px);
  align-items: start;
}
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

.section-head { margin-bottom: clamp(40px, 5vw, 72px); max-width: 60ch; }
.section-head h2 { margin-top: 8px; }

/* ---------- 11. Footer ---------- */
.footer {
  background: var(--black);
  color: var(--white);
  padding: clamp(64px, 8vw, 112px) 0 32px;
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: clamp(32px, 4vw, 72px);
  margin-bottom: 64px;
}
@media (max-width: 800px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer__grid { grid-template-columns: 1fr; } }
.footer__mission { max-width: 36ch; opacity: 0.72; }
.footer h3 { font-size: 12px; font-family: var(--font-mono); letter-spacing: 0.22em; text-transform: uppercase; color: var(--white); margin-bottom: 18px; font-weight: 500; opacity: 0.55; }
.footer ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer a { color: rgba(255,255,255,0.82); text-decoration: none; transition: color 0.2s var(--ease-out); }
.footer a:hover { color: var(--white); text-decoration: underline; }

/* Light footer variant (scoped, e.g. about.html) */
.footer--light { background: var(--paper); color: var(--ink); }
.footer--light h3 { color: var(--ink); }
.footer--light a { color: rgba(0, 0, 0, 0.72); }
.footer--light a:hover { color: var(--black); }
.footer--light .footer__bottom { border-top-color: var(--line); }

.newsletter {
  display: flex; gap: 8px; max-width: 420px;
  border: 1px solid var(--line-on-dark-strong);
  border-radius: 999px;
  padding: 6px 6px 6px 18px;
  align-items: center;
  transition: border-color 0.2s var(--ease-out);
}
.newsletter:focus-within { border-color: var(--white); }
.newsletter input {
  flex: 1; min-width: 0;
  background: transparent;
  border: 0; outline: 0;
  color: var(--white);
  font: inherit;
  padding: 10px 0;
}
.newsletter input::placeholder { color: rgba(255,255,255,0.45); }
.newsletter button {
  background: var(--white); color: var(--ink);
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 600;
  font-size: 14px;
  transition: background 0.2s var(--ease-out), color 0.2s var(--ease-out);
}
.newsletter button:hover { background: var(--grey-200); }
.newsletter__status {
  font-family: var(--font-mono);
  font-size: 12px;
  margin-top: 10px;
  opacity: 0.7;
  min-height: 16px;
}

.footer__bottom {
  display: flex; flex-wrap: wrap; gap: 16px;
  justify-content: space-between; align-items: center;
  padding-top: 32px;
  border-top: 1px solid var(--line-on-dark);
  font-size: 12px;
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
}
/* The 0.6 dimming used to sit on the row. It now sits on the copyright line
   alone, because a parent's opacity caps every child's: the legal links
   inherited it and landed near 3:1 against the light footer, under the 4.5:1
   AA floor for 12px text. Same look for the copyright, legible links. */
.footer__copy { opacity: 0.6; }
/* Separated by a middot rather than spacing alone, matching the copyright line
   opposite it. The dot is decorative — aria-hidden in the markup — so the two
   links stay two links to a screen reader. */
.footer__legal { display: flex; flex-wrap: wrap; gap: 10px; }
.footer__legal a { text-decoration: none; opacity: 0.85; }
.footer__legal a:hover { opacity: 1; text-decoration: underline; }
.footer__legal span { opacity: 0.45; }

/* ---------- 12. Banner: pre-incubation status ---------- */
.status-banner {
  background: var(--ink);
  color: var(--white);
  text-align: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line-on-dark);
}
.status-banner strong { font-weight: 600; opacity: 1; }
.status-banner span { opacity: 0.7; }

/* ---------- 13. Marquee (used on Lab/Home) ---------- */
.marquee {
  overflow: hidden;
  border-top: 1px solid var(--line-on-dark);
  border-bottom: 1px solid var(--line-on-dark);
  padding: 32px 0;
  background: var(--black);
  color: var(--white);
}
.marquee__track {
  display: inline-flex;
  gap: 56px;
  white-space: nowrap;
  animation: marquee 40s linear infinite;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(36px, 6vw, 80px);
  letter-spacing: -0.03em;
  line-height: 1;
}
.marquee__track > span { display: inline-flex; align-items: center; gap: 56px; }
.marquee__track > span::after {
  content: "●";
  font-size: 0.45em;
  vertical-align: middle;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .marquee__track { animation: none; }
}

/* ---------- 14. Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- 15. Logo mark (inline SVG sizing) ---------- */
.mark { display: inline-block; }
.mark--lg { width: 96px; height: 96px; }

/* ---------- 16. Accessibility helpers ---------- */
:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 3px;
  border-radius: 4px;
}
.section--paper :focus-visible,
.section--soft :focus-visible { outline-color: var(--ink); }
.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;
}

/* ---------- 17. Utility ---------- */
.center { text-align: center; }
.muted { opacity: 0.7; }
.mt-s { margin-top: 16px; }
.mt-m { margin-top: 32px; }
.mt-l { margin-top: 56px; }

/* ---------- 18. Project detail pages ---------- */

/* Facts strip — labelled key/value cells, hairline-divided */
.proj-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.section--dark .proj-facts,
.section--black .proj-facts { background: var(--line-on-dark); border-color: var(--line-on-dark); }
.proj-fact { background: var(--paper); padding: clamp(20px, 2vw, 28px); }
.section--soft .proj-fact { background: var(--paper); }
.section--dark .proj-fact,
.section--black .proj-fact { background: var(--ink-soft); }
.proj-fact__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.55;
  margin-bottom: 10px;
}
.proj-fact__value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(17px, 1.4vw, 21px);
  letter-spacing: -0.012em;
  line-height: 1.2;
}
@media (max-width: 760px) { .proj-facts { grid-template-columns: 1fr 1fr; } }

/* Tag list — mono pills for tech stacks */
.tag-list { display: flex; flex-wrap: wrap; gap: 10px; }
.tag {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  padding: 8px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  white-space: nowrap;
}
.section--dark .tag,
.section--black .tag { border-color: var(--line-on-dark-strong); }

/* Data tables — breaches, contracts, specs */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.section--dark .table-wrap,
.section--black .table-wrap { border-color: var(--line-on-dark); }
.data-table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 560px; }
.data-table th,
.data-table td {
  text-align: left;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.section--dark .data-table th, .section--dark .data-table td,
.section--black .data-table th, .section--black .data-table td { border-bottom-color: var(--line-on-dark); }
.data-table thead th {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.6;
  font-weight: 500;
  white-space: nowrap;
}
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr { transition: background 0.2s var(--ease-out); }
.data-table tbody tr:hover { background: var(--paper-soft); }
.section--dark .data-table tbody tr:hover,
.section--black .data-table tbody tr:hover { background: var(--ink-2); }
.data-table .num { font-family: var(--font-mono); white-space: nowrap; }
.data-table .addr { font-family: var(--font-mono); font-size: 13px; word-break: break-all; }

/* Stat band — oversized figures + mono labels */
.stat-band {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(24px, 3vw, 48px);
}
@media (max-width: 760px) { .stat-band { grid-template-columns: 1fr 1fr; } }
.stat__num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(40px, 5vw, 72px);
  letter-spacing: -0.04em;
  line-height: 0.95;
}
.stat__label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.6;
  margin-top: 14px;
}

/* Flow / lifecycle — numbered, hairline-divided rows */
.flow { list-style: none; counter-reset: flow; }
.flow__item {
  position: relative;
  padding: 24px 0 24px 76px;
  border-top: 1px solid var(--line);
}
.flow__item:first-child { border-top: 0; }
.section--dark .flow__item,
.section--black .flow__item { border-top-color: var(--line-on-dark); }
.flow__item::before {
  counter-increment: flow;
  content: counter(flow, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 26px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  opacity: 0.45;
}
.flow__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.012em;
  margin-bottom: 6px;
}
.flow__body { font-size: 15px; line-height: 1.55; opacity: 0.78; max-width: 72ch; }

/* Callout — large pulled statement with a rule */
.callout {
  border-left: 3px solid currentColor;
  padding: 6px 0 6px 28px;
  margin: clamp(28px, 3vw, 44px) 0 0;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: clamp(24px, 3vw, 40px);
  line-height: 1.12;
  max-width: 20ch;
}

/* Chain bar — dual-chain bridge schematic */
.chain-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 2vw, 28px);
  margin-top: clamp(28px, 3vw, 44px);
  padding: clamp(18px, 2.2vw, 28px);
  border: 1px dashed var(--line-on-dark-strong);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: clamp(12px, 1.2vw, 14px);
  letter-spacing: 0.04em;
  text-align: center;
}
.chain-bar__node { display: flex; flex-direction: column; gap: 4px; }
.chain-bar__node strong { font-weight: 600; }
.chain-bar__node span { opacity: 0.55; font-size: 11px; }
.chain-bar__link { opacity: 0.7; white-space: nowrap; }
@media (max-width: 600px) { .chain-bar__link { transform: rotate(90deg); padding: 14px 0; } }

/* Standalone mono code/address chip */
.addr {
  font-family: var(--font-mono);
  font-size: 13px;
  word-break: break-all;
}

/* ---------- 19. Bio / person pages ---------- */

/* Header: logo mark beside the bio title */
.bio-head {
  display: flex;
  align-items: center;
  gap: clamp(14px, 1.8vw, 26px);
}
.bio-head__mark {
  width: clamp(46px, 5vw, 64px);
  height: clamp(46px, 5vw, 64px);
  flex: none;
  color: var(--ink);
}
.bio-head__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(32px, 5vw, 64px);
  letter-spacing: -0.035em;
  line-height: 1;
  margin: 0;
}

/* Intro: portrait beside bio copy */
.bio-intro {
  display: grid;
  grid-template-columns: minmax(0, 380px) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
}
@media (max-width: 860px) { .bio-intro { grid-template-columns: 1fr; } }

.bio-portrait {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--paper-soft);
  aspect-ratio: 4 / 5;
}
.section--dark .bio-portrait,
.section--black .bio-portrait { border-color: var(--line-on-dark); background: var(--ink-soft); }
.bio-portrait img { width: 100%; height: 100%; object-fit: cover; }
.bio-portrait__tag {
  position: absolute;
  left: 14px; bottom: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.7);
  color: var(--white);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* Mono link pills — contact / elsewhere */
.bio-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.bio-link {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  padding: 8px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s var(--ease-out), color 0.2s var(--ease-out), border-color 0.2s var(--ease-out);
}
.bio-link:hover { background: var(--ink); color: var(--white); border-color: var(--ink); }
.section--dark .bio-link,
.section--black .bio-link { border-color: var(--line-on-dark-strong); }
.section--dark .bio-link:hover,
.section--black .bio-link:hover { background: var(--white); color: var(--ink); border-color: var(--white); }

/* ---------- 20. Breach band (live HIBP figures) ----------
   Base styles below are the full-bleed band (see partials/breach-band.html).
   In use on index.html as .breach--card: a compact inset panel at the top of
   the Project 01 card. */
.breach {
  background: var(--black);
  color: var(--white);
  border-bottom: 1px solid var(--line-on-dark);
  padding: clamp(26px, 4vw, 44px) 0 0;
  overflow: hidden;
}
.breach__inner { display: flex; flex-direction: column; gap: 14px; }
.breach__kicker {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  opacity: 0.55;
}
.breach__stat {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.0;
  font-size: clamp(30px, 5.4vw, 68px);
}
.breach__unit {
  font-weight: 600;
  font-size: clamp(15px, 1.5vw, 21px);
  letter-spacing: -0.01em;
  opacity: 0.82;
}
.breach__framing {
  margin: 0;
  max-width: 62ch;
  font-size: clamp(15px, 1.4vw, 19px);
  line-height: 1.45;
  opacity: 0.8;
}
.breach__source {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.07em;
  opacity: 0.5;
}

/* Scrolling ticker of recent breaches */
.breach__ticker {
  position: relative;
  margin-top: 8px;
  border-top: 1px solid var(--line-on-dark);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent);
}
.breach__track {
  display: inline-flex;
  align-items: center;
  gap: 36px;
  white-space: nowrap;
  padding: 14px 0;
  will-change: transform;
  animation: breach-scroll 45s linear infinite;
}
.breach__item {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  opacity: 0.78;
}
.breach__item b { font-weight: 600; opacity: 1; }
.breach__sep { opacity: 0.3; }
@keyframes breach-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .breach__track { animation: none; }
}

/* Card variant — the band inset at the top of a project card. Same markup and
   the same [data-breach] hooks, scaled for a one-third grid column. */
.breach--card {
  --breach-pad: 16px;
  border-bottom: none;
  border-radius: var(--radius-sm);
  padding: 18px var(--breach-pad) 12px;
  /* Size the panel's contents against the panel, not the viewport. */
  container-type: inline-size;
}
.breach--card .breach__inner { gap: 10px; }
.breach--card .breach__kicker { font-size: 11px; letter-spacing: 0.2em; }
.breach--card .breach__stat {
  display: flex;
  flex-direction: column;
  gap: 5px;
  /* The count is 13 unbreakable characters (~6.8em in this face), and it has to
     fit a grid column, not the window — 3vw barely moves while the column width
     halves at each breakpoint, which is why the number was being clipped.
     13cqi keeps it at ~89% of the panel width at every size. vw line first as a
     fallback for engines without container units. */
  font-size: clamp(22px, 3vw, 34px);
  font-size: clamp(20px, 13cqi, 34px);
  font-variant-numeric: tabular-nums;
}
.breach--card .breach__unit { font-size: 14px; line-height: 1.3; }
.breach--card .breach__framing {
  max-width: none;
  font-size: 14px;
  line-height: 1.45;
}
.breach--card .breach__source { font-size: 10px; line-height: 1.5; letter-spacing: 0.05em; }
/* Bleed the ticker to the panel edges so its fade-out mask reads correctly. */
.breach--card .breach__ticker {
  margin: 4px calc(var(--breach-pad) * -1) 0;
}
.breach--card .breach__track { gap: 24px; padding: 10px 0; }
.breach--card .breach__item { gap: 10px; font-size: 11px; }

/* ---------- 21. Project card screenshot ----------
   Sits in the trailing white space of a short card (Project 03). Capped by
   height, not width, so a tall mobile screenshot cannot stretch the grid row
   and drag its neighbours' height with it. */
.card__shot {
  margin: 4px 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.card__shot img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 460px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.card__shot figcaption {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  text-align: center;
  opacity: 0.55;
}
.section--dark .card__shot img,
.section--black .card__shot img { border-color: var(--line-on-dark); }

/* ---------- 22. Long-form documents (privacy, transparency) ----------
 * Legal text gets read, not skimmed, so this is the one place on the site that
 * drops the display type: a single narrow column, generous leading, and
 * numbered headings sized to guide rather than to shout. The rule above each
 * heading does the section-break work that whitespace alone cannot at this
 * length.
 */
/* The standard hero is a full viewport of black. That earns its keep on the
   homepage; ahead of a privacy notice it is just a wall to scroll past before
   the text starts. Same family, a third of the height. */
.hero--doc {
  min-height: 0;
  padding: clamp(88px, 14vh, 148px) 0 clamp(44px, 7vh, 76px);
}

.doc { max-width: 72ch; }
.doc > * + * { margin-top: 20px; }
.doc h2 {
  font-size: clamp(20px, 2vw, 26px);
  line-height: 1.25;
  letter-spacing: -0.015em;
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.doc h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.doc p, .doc li { font-size: 17px; line-height: 1.7; }
.doc ul { padding-left: 22px; }
.doc ul > li + li { margin-top: 8px; }
.doc a { text-decoration: underline; }
.doc strong { font-weight: 600; }

.doc__updated {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.62;
}

/* Postal-style block for the data controller. Kept as a block rather than a
   run-on sentence so the address reads as an address. */
.doc__entity {
  border-left: 2px solid var(--line-strong);
  padding-left: 18px;
  line-height: 1.6;
}
