/* =========================================================
   SurgBioMech — Pocivavsek Lab
   Editorial / scientific-journal aesthetic.
   Fraunces (display) · Newsreader (body) · JetBrains Mono.
   ========================================================= */

:root {
  --paper:        #F2EDE3;
  --paper-deep:   #EAE3D2;
  --ink:          #14110D;
  --ink-soft:     #4F4A40;
  --ink-mute:     #847C6C;
  --rule:         #C8BFAA;
  --rule-soft:    #DCD3BE;
  --arterial:     #8E2A2A;
  --arterial-dk:  #5C1818;
  --basin:        #2C3C4B;
  --gold:         #A77A2A;

  --serif-d: "Fraunces", "Newsreader", "Iowan Old Style", Georgia, serif;
  --serif-b: "Newsreader", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --mono:    "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --maxw: 1320px;
  --gutter: clamp(16px, 4.4vw, 64px);
}

/* ----- reset-ish ----- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif-b);
  font-optical-sizing: auto;
  font-weight: 400;
  font-size: 17.5px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--arterial); }

::selection { background: var(--arterial); color: var(--paper); }

/* paper texture (subtle, CSS only) */
body::before {
  content: "";
  position: fixed; inset: 0;
  background:
    radial-gradient(1200px 800px at 12% -10%, #F8F3E8 0%, transparent 60%),
    radial-gradient(900px 700px at 110% 110%, #ECE3D0 0%, transparent 55%),
    var(--paper);
  z-index: -2;
  pointer-events: none;
}

/* fine grain */
.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 9999;
  opacity: .045; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.85'/></svg>");
}

/* ============ TOPBAR ============ */
.topbar {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(8px) saturate(115%);
  -webkit-backdrop-filter: blur(8px) saturate(115%);
  background: color-mix(in srgb, var(--paper) 82%, transparent);
}
.topbar__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px var(--gutter) 12px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
}
.topbar__rule { height: 1px; background: var(--rule); margin: 0 var(--gutter); }
.topbar__brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--serif-d);
  font-size: 18px;
  letter-spacing: -0.005em;
}
.brand__mark { color: var(--arterial-dk); display: inline-flex; }
.brand__word { font-weight: 600; }
.brand__sep  { color: var(--rule); margin: 0 2px; }
.brand__sub  { font-style: italic; color: var(--ink-soft); }

.topbar__nav {
  display: flex; align-items: center; gap: 22px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.topbar__nav a { color: var(--ink-soft); transition: color .25s ease; }
.topbar__nav a:hover { color: var(--ink); }
.nav__github {
  border: 1px solid var(--rule);
  padding: 6px 10px;
  border-radius: 999px;
}
.nav__github:hover { border-color: var(--ink); background: var(--ink); color: var(--paper) !important; }

@media (max-width: 880px) {
  .topbar__nav a:not(.nav__github) { display: none; }
}

/* ============ MARGIN ANNOTS ============ */
.margin {
  position: fixed; top: 38vh; z-index: 5;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-mute);
  line-height: 1.4;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  display: flex; gap: 16px; align-items: center;
}
.margin--left { left: 14px; }
.margin--right { right: 14px; }
.margin__rule { width: 24px; height: 1px; background: var(--rule); }
@media (max-width: 1180px) { .margin { display: none; } }

/* ============ SECTION COMMON ============ */
section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 96px var(--gutter) 80px;
  position: relative;
}
.section__head {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 18px;
  margin-bottom: 36px;
}
.section__num {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--arterial);
  padding: 4px 9px;
  border: 1px solid var(--rule);
  border-radius: 2px;
  background: var(--paper);
}
.section__title {
  font-family: var(--serif-d);
  font-weight: 380;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -0.015em;
  line-height: 1.05;
  margin: 0;
  font-variation-settings: "opsz" 96, "SOFT" 30;
}
.section__rule {
  height: 1px;
  background: linear-gradient(to right, var(--rule), transparent);
}

/* ============ HERO ============ */
.hero {
  padding-top: 52px;
  padding-bottom: 56px;
  display: grid;
  grid-template-columns: minmax(0, 1.16fr) minmax(230px, 0.84fr);
  grid-template-rows: auto auto auto 1fr auto;
  column-gap: clamp(30px, 3.6vw, 60px);
  row-gap: clamp(14px, 1.8vw, 24px);
  align-items: start;
}
.hero__meta {
  grid-column: 1 / 2;
  grid-row: 1 / 2;
  display: flex; flex-direction: column; gap: 4px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border-top: 1px solid var(--ink);
  padding-top: 14px;
}
.meta__row { display: flex; align-items: baseline; gap: 8px; white-space: nowrap; }
.meta__k { color: var(--ink-mute); }
.meta__dots {
  flex: 1;
  border-bottom: 1px dotted var(--rule);
  transform: translateY(-3px);
}
.meta__v { color: var(--ink); }
.meta__row .meta__v em { font-style: italic; }

.hero__title {
  grid-column: 1 / 2;
  grid-row: 2 / 3;
  margin: 6px 0 0;
  font-family: var(--serif-d);
  font-weight: 320;
  letter-spacing: -0.025em;
  line-height: 0.95;
  font-variation-settings: "opsz" 144, "SOFT" 40, "WONK" 1;
  display: flex; flex-direction: column;
  gap: clamp(2px, 0.4vw, 5px);
}
.word { display: block; opacity: 0; transform: translateY(18px); animation: word-rise .9s cubic-bezier(.2,.7,.2,1) forwards; overflow-wrap: break-word; }
.hero__title .word:nth-child(1) { animation-delay: .05s; }
.hero__title .word:nth-child(2) { animation-delay: .15s; }
.hero__title .word:nth-child(3) { animation-delay: .25s; }
.hero__title .word:nth-child(4) { animation-delay: .35s; }
.hero__title .word:nth-child(5) { animation-delay: .45s; }
.hero__title .word:nth-child(6) { animation-delay: .55s; }
@keyframes word-rise { to { opacity: 1; transform: translateY(0); } }

.word--small { font-size: clamp(15px, 1.6vw, 21px); font-family: var(--serif-b); font-style: italic; color: var(--ink-soft); letter-spacing: 0; line-height: 1.05; padding-left: 4px; }
.word--med   { font-size: clamp(20px, 2.5vw, 38px); font-weight: 360; line-height: 1.04; }
.word--xl    { font-size: clamp(54px, 7vw, 104px); font-weight: 280; line-height: .92; }
.word--xl em { font-style: italic; font-weight: 320; color: var(--arterial-dk); font-variation-settings: "opsz" 144, "SOFT" 80; }
.word--xl::first-letter { font-feature-settings: "salt" 1; }

.hero__axiom {
  grid-column: 1 / 2;
  grid-row: 3 / 4;
  margin: clamp(14px, 2vw, 26px) 0 0;
  font-family: var(--serif-d);
  font-style: italic;
  font-weight: 340;
  font-size: clamp(17px, 1.45vw, 21px);
  line-height: 1.32;
  letter-spacing: -0.004em;
  color: var(--arterial-dk);
  font-variation-settings: "opsz" 72, "SOFT" 60;
}
.hero__axiom-src {
  display: block;
  margin-top: 9px;
  font-family: var(--mono);
  font-style: normal;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

.hero__figure {
  grid-column: 2 / 3;
  grid-row: 1 / 6;
  align-self: start;
  padding-top: 4px;
}
.hero__figure figure { margin: 0; }
.curve-svg {
  width: 100%; height: auto;
  color: var(--ink);
}
.curve-family path { stroke-dasharray: 1200; stroke-dashoffset: 1200; animation: draw 2.4s ease forwards; }
.curve-family .c1 { animation-delay: .25s; }
.curve-family .c2 { animation-delay: .35s; }
.curve-family .c3 { animation-delay: .45s; }
.curve-family .c4 { animation-delay: .55s; }
.curve-family .c5 { animation-delay: .65s; }
.curve-family .c6 { animation-delay: .75s; }
.curve-family .c7 { animation-delay: .85s; }
.curve-spine { stroke-dasharray: 1200; stroke-dashoffset: 1200; animation: draw 2.6s ease .4s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.annots .annot { opacity: 0; animation: fade .8s ease 2.4s forwards; }
.annots .annot:nth-child(2) { animation-delay: 2.7s; }
.annots .annot:nth-child(3) { animation-delay: 3.0s; }
@keyframes fade { to { opacity: 1; } }

.figcap {
  font-family: var(--serif-b);
  font-style: italic;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--ink-soft);
  margin-top: 10px;
  padding-left: 22px;
  border-left: 1px solid var(--rule);
  max-width: 50ch;
}
.figcap__tag {
  display: inline-block;
  font-family: var(--mono);
  font-style: normal;
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--arterial);
  margin-right: 8px;
}

.hero__lede {
  grid-column: 1 / 2;
  grid-row: 4 / 5;
  max-width: 56ch;
  font-size: clamp(16px, 1.2vw, 18.5px);
  line-height: 1.65;
  font-family: var(--serif-b);
  font-style: normal;
  color: var(--ink);
  margin: clamp(16px, 2.4vw, 30px) 0 0;
  font-feature-settings: "liga" 1, "kern" 1;
}
.hero__lede em { font-style: italic; color: var(--arterial-dk); }
.dropcap {
  float: left;
  font-family: var(--serif-d);
  font-style: italic;
  font-weight: 320;
  font-size: 72px;
  line-height: 0.85;
  padding: 6px 10px 0 0;
  color: var(--arterial-dk);
  font-variation-settings: "opsz" 144, "SOFT" 80;
}

.hero__scroll {
  grid-column: 1 / 2;
  grid-row: 5 / 6;
  justify-self: start;
  align-self: start;
  display: inline-flex; flex-direction: column; align-items: center; gap: 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding: 14px 0;
}
.hero__scroll svg line { animation: pulse-line 2s ease-in-out infinite; }
@keyframes pulse-line { 50% { opacity: .35; } }

@media (max-width: 1040px) {
  .hero {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    column-gap: 0;
    row-gap: clamp(16px, 3vw, 26px);
  }
  .hero > * { grid-column: 1 !important; grid-row: auto !important; }
  .hero__title { margin-top: 4px; }
  .word--small { font-size: clamp(15px, 3.4vw, 22px); }
  .word--med   { font-size: clamp(19px, 5.4vw, 38px); }
  .word--xl    { font-size: clamp(2.4rem, 13vw, 116px); }
  .hero__axiom { margin-top: clamp(12px, 3vw, 22px); }
  .hero__figure { padding-top: 0; max-width: 520px; align-self: start; }
  .hero__lede { margin-top: clamp(12px, 3vw, 22px); }
  .hero__scroll { align-self: start; padding-top: 2px; }
}

@media (max-width: 720px) {
  section { padding-top: 60px; padding-bottom: 52px; }
  .hero { padding-top: 32px; padding-bottom: 40px; }
  .section__head {
    grid-template-columns: auto 1fr;
    column-gap: 14px;
    row-gap: 10px;
    margin-bottom: 26px;
  }
  .section__title { grid-column: 1 / -1; grid-row: 2; }
  .section__rule { display: none; }
  .hero__meta {
    border-top-width: 1px;
    font-size: 10.5px;
    letter-spacing: 0.04em;
  }
  .meta__row { flex-wrap: wrap; gap: 4px 8px; white-space: normal; }
  .meta__k { flex: 0 0 100%; color: var(--ink-mute); }
  .meta__dots { display: none; }
  .meta__v { color: var(--ink); font-family: var(--serif-b); font-size: 14px; text-transform: none; letter-spacing: 0; }
  .dropcap { font-size: 56px; padding-right: 8px; }
  .figcap { padding-left: 14px; }
}

@media (max-width: 480px) {
  .brand__sep, .brand__sub { display: none; }
  .topbar__brand { font-size: 16px; }
  .nav__github { padding: 5px 9px; font-size: 10.5px; }
  .topbar__inner { gap: 12px; padding-left: 16px; padding-right: 16px; }
  .word--xl { font-size: clamp(2.1rem, 12.8vw, 88px); }
  .hero__axiom br { display: none; }
}

/* ============ PI ============ */
.pi__grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 56px;
  align-items: start;
}
.portrait__frame {
  position: relative;
  background: var(--paper-deep);
  border: 1px solid var(--rule);
  padding: 18px 18px 14px;
}
.portrait__svg { width: 100%; height: auto; color: var(--ink); }
.portrait__photo {
  display: block;
  width: 100%;
  height: auto;
  filter: grayscale(1) contrast(1.06) brightness(1.02);
  background: var(--ink);
}
.portrait__caption {
  font-family: var(--serif-b);
  font-style: italic;
  font-size: 12.5px;
  color: var(--ink-soft);
  margin-top: 10px;
  border-top: 1px solid var(--rule);
  padding-top: 8px;
}
.pi__name {
  font-family: var(--serif-d);
  font-weight: 320;
  font-size: clamp(36px, 4.5vw, 52px);
  line-height: 1;
  margin: 0 0 4px;
  letter-spacing: -0.02em;
  font-variation-settings: "opsz" 144;
}
.pi__post { font-style: italic; color: var(--arterial-dk); font-size: 0.65em; vertical-align: 0.18em; margin-left: 4px; }
.pi__title {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 24px;
}
.pi__bio {
  font-size: 17.5px;
  line-height: 1.65;
  margin: 0 0 14px;
  max-width: 62ch;
}
.pi__bio em { font-style: italic; color: var(--arterial-dk); }

.cv-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  margin-top: 28px;
  border-top: 1px solid var(--rule);
  padding-top: 24px;
}
.cv-h {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--arterial);
  margin-bottom: 10px;
}
.cv-h--tight { margin-top: 22px; }
.cv-col ul {
  list-style: none;
  margin: 0; padding: 0;
  font-family: var(--serif-b);
  font-size: 15px;
  line-height: 1.7;
}
.cv-year {
  display: inline-block;
  width: 64px;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--ink-mute);
}
.cv-stats { display: flex; gap: 22px; margin-bottom: 6px; }
.cv-stats li { display: flex; flex-direction: column; align-items: flex-start; }
.stat__n {
  font-family: var(--serif-d);
  font-weight: 320;
  font-size: 38px;
  line-height: 1;
  color: var(--arterial-dk);
  font-variation-settings: "opsz" 144;
}
.stat__l {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-top: 2px;
}

@media (max-width: 880px) {
  .pi__grid { grid-template-columns: 1fr; gap: 32px; }
  .portrait__frame { max-width: 240px; }
  .cv-grid { grid-template-columns: 1fr; gap: 24px; }
}

/* ============ RESEARCH ============ */
.research__lede {
  max-width: 70ch;
  font-size: 19px;
  line-height: 1.55;
  font-family: var(--serif-b);
  color: var(--ink);
  margin: -8px 0 40px;
}
.research__lede em { font-style: italic; color: var(--arterial-dk); }

.theme-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--rule);
}
.theme {
  padding: 28px 28px 30px;
  border-bottom: 1px solid var(--rule);
  border-right: 1px solid var(--rule);
  transition: background .35s ease;
  position: relative;
}
.theme:nth-child(3n) { border-right: none; }
.theme:hover { background: var(--paper-deep); }
.theme__head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 14px;
}
.theme__num {
  font-family: var(--serif-d);
  font-style: italic;
  font-size: 22px;
  color: var(--arterial-dk);
  font-variation-settings: "opsz" 144;
}
.theme__kw {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.theme__illus {
  margin: 8px 0 14px;
  padding: 10px 0;
  border-top: 1px dotted var(--rule);
  border-bottom: 1px dotted var(--rule);
  color: var(--ink-soft);
}
.theme__illus svg { width: 100%; height: 110px; }
.theme:hover .theme__illus { color: var(--arterial-dk); transition: color .35s ease; }
.theme__title {
  font-family: var(--serif-d);
  font-weight: 380;
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 10px;
  font-variation-settings: "opsz" 96;
}
.theme__body {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 0;
}
.theme__body em { font-style: italic; color: var(--ink); }
.theme__body a { color: var(--arterial-dk); border-bottom: 1px solid var(--rule); }
.theme__body a:hover { color: var(--arterial); border-bottom-color: var(--arterial); }

@media (max-width: 980px) { .theme-grid { grid-template-columns: 1fr 1fr; } .theme:nth-child(3n) { border-right: 1px solid var(--rule); } .theme:nth-child(2n) { border-right: none; } }
@media (max-width: 640px) { .theme-grid { grid-template-columns: 1fr; } .theme { border-right: none !important; } }

/* ============ PUBLICATIONS ============ */
.pubs__lede {
  max-width: 70ch;
  font-size: 18px;
  font-family: var(--serif-b);
  margin: -8px 0 36px;
  color: var(--ink-soft);
}
.pubs__lede a { color: var(--arterial-dk); border-bottom: 1px solid var(--rule); }
.pubs__lede a:hover { border-bottom-color: var(--arterial); }

.pubs__list {
  list-style: none;
  padding: 0; margin: 0;
  border-top: 1px solid var(--rule);
}
.pub {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 28px;
  padding: 22px 0 20px;
  border-bottom: 1px solid var(--rule);
  align-items: baseline;
  transition: padding .35s ease;
}
.pub:hover { padding-left: 6px; }
.pub__cites {
  display: flex; flex-direction: column; align-items: flex-end;
  font-family: var(--mono);
  text-align: right;
}
.pub__cites em {
  font-style: normal;
  font-family: var(--serif-d);
  font-weight: 320;
  font-size: 30px;
  line-height: 1;
  color: var(--arterial-dk);
  font-variation-settings: "opsz" 144;
}
.pub__cites span {
  font-size: 9.5px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-top: 4px;
}
.pub__title {
  font-family: var(--serif-d);
  font-weight: 380;
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
  max-width: 70ch;
  font-variation-settings: "opsz" 72;
}
.pub__meta {
  font-family: var(--serif-b);
  font-size: 14.5px;
  color: var(--ink-soft);
  margin: 0;
}
.pub__meta em { font-style: italic; }
.pub__sep { color: var(--rule); margin: 0 4px; }
.pub__title a {
  color: inherit;
  background-image: linear-gradient(var(--rule), var(--rule));
  background-size: 100% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: color .25s ease, background-size .25s ease;
}
.pub__title a:hover {
  color: var(--arterial-dk);
  background-image: linear-gradient(var(--arterial), var(--arterial));
}
.pub__doi {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.01em;
  color: var(--ink-mute);
  white-space: nowrap;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 1px;
}
.pub__doi:hover { color: var(--arterial); border-bottom-color: var(--arterial); }

@media (max-width: 640px) {
  .pub { grid-template-columns: 1fr; gap: 6px; }
  .pub__cites { flex-direction: row; align-items: baseline; gap: 8px; }
  .pub__cites em { font-size: 22px; }
}

/* ============ CODE ============ */
.code__lede {
  max-width: 70ch;
  font-size: 18px;
  font-family: var(--serif-b);
  margin: -8px 0 32px;
  color: var(--ink-soft);
}
.code__lede a { color: var(--arterial-dk); border-bottom: 1px solid var(--rule); }

.repo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
.repo {
  display: block;
  padding: 22px 24px 24px;
  background: var(--paper-deep);
  border: 1px solid var(--rule);
  border-radius: 3px;
  position: relative;
  transition: transform .35s ease, border-color .35s ease, background .35s ease;
}
.repo:hover {
  transform: translateY(-3px);
  border-color: var(--ink);
  background: var(--paper);
  color: var(--ink);
}
.repo__head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.repo__lang { display: inline-flex; align-items: center; gap: 8px; }
.lang-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--basin); display: inline-block; }
.lang-dot--py { background: var(--arterial-dk); }
.repo__arrow {
  font-family: var(--serif-d);
  font-size: 18px;
  color: var(--arterial-dk);
  transition: transform .35s ease;
}
.repo:hover .repo__arrow { transform: translate(2px, -2px); }
.repo__name {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.005em;
  margin: 0 0 6px;
  color: var(--ink);
}
.repo__desc {
  font-family: var(--serif-b);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0;
}
@media (max-width: 720px) { .repo-grid { grid-template-columns: 1fr; } }

/* ============ METHODS ============ */
.methods__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--rule);
}
.method {
  display: flex; gap: 18px;
  padding: 22px 24px 22px 0;
  border-bottom: 1px solid var(--rule);
  border-right: 1px solid var(--rule);
  padding-left: 22px;
}
.method:nth-child(3n) { border-right: none; }
.method__n {
  font-family: var(--serif-d);
  font-style: italic;
  font-size: 26px;
  line-height: 1;
  color: var(--arterial-dk);
  flex-shrink: 0;
  width: 36px;
  font-variation-settings: "opsz" 144;
}
.method h4 {
  font-family: var(--serif-d);
  font-weight: 380;
  font-size: 18px;
  line-height: 1.2;
  margin: 0 0 4px;
  letter-spacing: -0.005em;
}
.method p {
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--ink-soft);
  margin: 0;
}
@media (max-width: 880px) {
  .methods__grid { grid-template-columns: 1fr 1fr; }
  .method:nth-child(3n) { border-right: 1px solid var(--rule); }
  .method:nth-child(2n) { border-right: none; }
}
@media (max-width: 560px) { .methods__grid { grid-template-columns: 1fr; } .method { border-right: none !important; } }

/* ============ PEOPLE ============ */
.people__pi {
  padding: 24px 28px;
  background: var(--paper-deep);
  border: 1px solid var(--rule);
  margin-bottom: 24px;
}
.people__role {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--arterial);
  margin-bottom: 8px;
}
.people__name {
  font-family: var(--serif-d);
  font-weight: 320;
  font-size: 32px;
  line-height: 1;
  margin-bottom: 6px;
  letter-spacing: -0.015em;
  font-variation-settings: "opsz" 144;
}
.people__line {
  font-family: var(--serif-b);
  font-size: 15.5px;
  color: var(--ink-soft);
  margin-bottom: 12px;
}
.people__links {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
}
.people__links a { color: var(--ink); border-bottom: 1px solid var(--rule); padding-bottom: 1px; }
.people__links a:hover { color: var(--arterial); border-bottom-color: var(--arterial); }
.people__links span { color: var(--rule); }
.people__open {
  padding: 24px 28px 26px;
  border: 1px solid var(--rule);
}
.people__src {
  text-transform: none;
  letter-spacing: 0.02em;
  color: var(--ink-mute);
  font-size: 10.5px;
}
.roster {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 26px 44px;
  margin-top: 18px;
}
.roster__group--wide { grid-column: 1 / -1; }
.roster__group--wide .roster__list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: 44px;
}
.roster__cat {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--arterial);
  margin: 0 0 8px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--rule);
}
.roster__list { list-style: none; margin: 0; padding: 0; }
.roster__list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
  padding: 5.5px 0;
  border-bottom: 1px dotted var(--rule);
}
.roster__group--wide .roster__list li:nth-last-child(2) { border-bottom: none; }
.roster__list li:last-child { border-bottom: none; }
.rm__name { font-family: var(--serif-b); font-size: 16px; line-height: 1.3; color: var(--ink); }
.rm__role {
  flex: none;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-mute);
  text-align: right;
}
.people__note {
  margin: 24px 0 0;
  font-family: var(--serif-b);
  font-style: italic;
  font-size: 15.5px;
  color: var(--ink-soft);
}
.people__note a { color: var(--arterial-dk); border-bottom: 1px solid var(--rule); }
@media (max-width: 700px) {
  .roster { grid-template-columns: 1fr; }
  .roster__group--wide .roster__list { grid-template-columns: 1fr; }
  .roster__group--wide .roster__list li:nth-last-child(2) { border-bottom: 1px dotted var(--rule); }
}

/* ============ CONTACT ============ */
.contact__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
  border-top: 1px solid var(--rule);
  padding-top: 32px;
}
.contact__h {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--arterial);
  margin-bottom: 14px;
}
.contact__big {
  display: block;
  font-family: var(--serif-d);
  font-weight: 320;
  font-size: clamp(22px, 2.6vw, 30px);
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin-bottom: 6px;
  word-break: break-word;
  font-variation-settings: "opsz" 96;
  color: var(--ink);
  position: relative;
}
.contact__big::after {
  content: "";
  display: block;
  width: 28px; height: 1px;
  background: var(--arterial);
  margin-top: 10px;
  transition: width .35s ease;
}
.contact__big:hover { color: var(--arterial-dk); }
.contact__big:hover::after { width: 80px; }
.contact__alt {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-mute);
}
.contact__addr {
  font-style: normal;
  font-family: var(--serif-b);
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--ink);
}
.contact__links { list-style: none; padding: 0; margin: 0; }
.contact__links li { font-family: var(--mono); font-size: 13px; line-height: 1.9; }
.contact__links a { border-bottom: 1px solid var(--rule); padding-bottom: 1px; }
.contact__links a:hover { color: var(--arterial); border-bottom-color: var(--arterial); }
@media (max-width: 780px) { .contact__grid { grid-template-columns: 1fr; gap: 28px; } }

/* ============ FOOT ============ */
.foot { margin-top: 24px; padding-bottom: 60px; }
.foot__rule {
  height: 1px;
  background: var(--ink);
  margin: 0 var(--gutter);
}
.foot__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 28px var(--gutter) 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}
.foot__brand { display: flex; align-items: center; gap: 10px; font-family: var(--serif-d); font-size: 17px; }
.foot__brand svg { color: var(--arterial-dk); }
.foot__fine {
  font-family: var(--serif-b);
  font-size: 13px;
  color: var(--ink-mute);
  margin: 10px 0 0;
  max-width: 50ch;
}
.foot__col--right { text-align: right; }
.foot__line {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-soft);
  line-height: 1.8;
}
.foot__line span {
  display: inline-block;
  color: var(--arterial);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-right: 8px;
  font-size: 10.5px;
}
.foot__line a { border-bottom: 1px solid var(--rule); padding-bottom: 1px; }
@media (max-width: 720px) {
  .foot__inner { grid-template-columns: 1fr; }
  .foot__col--right { text-align: left; }
}

/* ============ SCROLL REVEAL ============ */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1);
}
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.001ms !important;
  }
  .word { opacity: 1; transform: none; }
  .reveal { opacity: 1; transform: none; }
  .curve-family path, .curve-spine { stroke-dashoffset: 0 !important; }
  .annot { opacity: 1 !important; }
}
