/* ==========================================================
   Theme: BUCKEYE BOLD — flat scarlet blocks, heavyweight
   grotesque type, hard edges, offset shadows. Unmistakably
   OSU; loud on the surface, disciplined underneath.
   Type: Archivo (900 display, 400/500 body) · IBM Plex Mono
   ========================================================== */

:root {
  --paper: #ffffff;
  --card: #ffffff;
  --ink: #111111;
  --scarlet: #ba0c2f;
  --scarlet-bright: #93001f;
  --steel: #56606a;
  --mist: #e8e8e8;
  --gray: #a7b1b7;

  --font-display: "Archivo", system-ui, sans-serif;
  --font-body: "Archivo", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  --maxw: 1120px;
  --radius: 0px;
  --border: 2px solid var(--ink);
  --shadow: 5px 5px 0 var(--ink);

  --research-ground: #ba0c2f;
  --accent: #ba0c2f;

  /* hero animation: crucible cross-section (see tools/bake-hero-scenes.py) */
  --hero-outline: #111111;
  --hero-metal-light: #f4f6f7;
  --hero-metal-mid: #b9c1c7;
  --hero-metal-dark: #5d666e;
  --hero-metal-deep: #1b1f24;
  --hero-crystal-face: #3c434b;
  --hero-crystal-face2: #242a31;
  --hero-crystal-face3: #12161a;
  --hero-crystal-edge: #06080a;
  --hero-crystal-cap: #5b656f;
  --hero-crucible: #8e0620;
  --hero-scrim-rgb: 186, 12, 47;
  --hero-scrim: #ba0c2f;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font-body); font-size: 1.03rem; line-height: 1.6; }

a { color: var(--scarlet); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--scarlet-bright); }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--scarlet); outline-offset: 2px; }
img { max-width: 100%; display: block; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }


/* ---------- text flow ---------- */
sub, sup { font-size: 0.72em; line-height: 0; position: relative; vertical-align: baseline; }
sup { top: -0.5em; }
sub { bottom: -0.22em; }
h1, h2, h3 { text-wrap: balance; }
/* prose blocks hold real <p> children so JSON content can use blank lines */
.prose p { margin: 0 0 0.85em; }
.prose p:last-child { margin-bottom: 0; }
p, li, .lede { text-wrap: pretty; }
/* mono/letter-spaced lines must not inherit a prose measure — a ch-based
   max-width under-counts letter-spacing and wraps them absurdly early */
.eyebrow, .hero-inst, .person-meta, .pub-venue, .brand, .site-footer { max-width: none; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--paper); border-bottom: var(--border); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; flex-wrap: wrap; padding-block: 0.4rem; }
.brand { font-family: var(--font-display); font-weight: 900; font-size: 0.98rem; letter-spacing: 0.01em; text-transform: uppercase; color: var(--ink); text-decoration: none; }
.brand .brand-mark { color: var(--scarlet); }
/* match the diamond exactly on hover: the generic a:hover would darken the
   wordmark to --scarlet-bright while the mark kept its own colour */
.brand:hover { color: var(--scarlet); }
.site-nav { display: flex; gap: 0; flex-wrap: wrap; }
.site-nav a { font-family: var(--font-display); font-weight: 700; font-size: 0.88rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink); text-decoration: none; padding: 0.5rem 0.85rem; }
.site-nav a:hover { background: var(--ink); color: #fff; }
.site-nav a[aria-current="page"] { background: var(--scarlet); color: #fff; }

/* ---------- footer ---------- */
.site-footer { margin-top: 4.5rem; padding: 1.8rem 0 2.4rem; background: var(--ink); color: var(--gray); font-family: var(--font-mono); font-size: 0.8rem; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.site-footer a { color: #fff; }

/* ---------- typography ---------- */
h1, h2, h3 { font-family: var(--font-display); font-weight: 900; line-height: 1.04; letter-spacing: -0.02em; text-transform: uppercase; }
h1 { font-size: clamp(2.3rem, 5.5vw, 3.9rem); margin: 0 0 1rem; }
h2 { font-size: clamp(1.4rem, 2.8vw, 2rem); margin: 0 0 0.9rem; }
h3 { font-size: 1.12rem; margin: 0 0 0.5rem; letter-spacing: 0; }

.eyebrow { font-family: var(--font-mono); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.16em; color: var(--scarlet); margin: 0 0 0.6rem; font-weight: 600; }
.section { padding: 3.25rem 0 0.5rem; }
.muted { color: var(--steel); }
.mono { font-family: var(--font-mono); }

/* ---------- hero: scarlet block ---------- */
.hero { position: relative; overflow: hidden; background: var(--scarlet); color: #fff; border-bottom: var(--border); }
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg,
    rgba(var(--hero-scrim-rgb), 0.93) 0%,
    rgba(var(--hero-scrim-rgb), 0.84) 50%,
    rgba(var(--hero-scrim-rgb), 0.42) 63%,
    rgba(var(--hero-scrim-rgb), 0.06) 76%,
    rgba(var(--hero-scrim-rgb), 0) 100%);
}
@media (max-width: 899px) {
  .hero::after {
    background: linear-gradient(180deg,
      rgba(var(--hero-scrim-rgb), 0.9) 0%,
      rgba(var(--hero-scrim-rgb), 0.55) 55%,
      rgba(var(--hero-scrim-rgb), 0) 100%);
  }
}
.hero .wrap { z-index: 2; }
.hero .wrap { position: relative; padding-top: 5rem; padding-bottom: 5rem; }
.hero .eyebrow { color: #fff; }
.hero h1 { max-width: 23ch; text-shadow: 4px 4px 0 rgba(17, 17, 17, 0.35); }
.hero #hero-text { max-width: 60ch; font-size: 1.1rem; font-weight: 500; color: #ffe3e9; }
.hero .hero-inst { max-width: none; font-family: var(--font-mono); font-size: 0.82rem; color: #f4b8c4; margin-top: 1.6rem; }

/* ---------- cards & grids ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
@media (max-width: 840px) { .grid-3 { grid-template-columns: 1fr; } }
.card { background: var(--card); border: var(--border); padding: 1.3rem 1.35rem; }
a.card { display: block; color: inherit; text-decoration: none; box-shadow: var(--shadow); transition: transform 0.1s ease, box-shadow 0.1s ease; }
a.card:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--scarlet); }
.card .card-num { font-family: var(--font-mono); font-size: 0.8rem; font-weight: 600; color: #fff; background: var(--scarlet); padding: 0.1rem 0.45rem; display: inline-block; }
.card h3 { margin-top: 0.6rem; }
.card p { margin-bottom: 0; color: var(--steel); font-size: 0.96rem; }

/* ---------- PI bio strip ---------- */
.bio-strip { display: grid; grid-template-columns: 190px 1fr; gap: 1.7rem; align-items: start; }
.bio-strip img {
  width: 190px; height: 240px;
  object-fit: cover; object-position: 50% 35%;
  background: var(--hero-outline);
  border: var(--border); box-shadow: var(--shadow);
}
@media (max-width: 700px) { .bio-strip { grid-template-columns: 1fr; } .bio-strip img { width: 200px; height: 250px; } }

/* ---------- research page ---------- */
.research-section { display: grid; grid-template-columns: 1fr 1fr; gap: 2.2rem; align-items: center; padding: 2.8rem 0; border-bottom: var(--border); }
.research-section:last-of-type { border-bottom: 0; }
.research-section:nth-of-type(even) .research-fig { order: 2; }
.research-fig img { border: var(--border); box-shadow: var(--shadow); }
.research-fig canvas { display: block; width: 100%; aspect-ratio: 4 / 3; border: var(--border); box-shadow: var(--shadow); }
.research-num { font-family: var(--font-mono); font-weight: 600; color: #fff; background: var(--scarlet); display: inline-block; padding: 0.15rem 0.5rem; font-size: 0.82rem; letter-spacing: 0.1em; }
@media (max-width: 840px) { .research-section { grid-template-columns: 1fr; } .research-section:nth-of-type(even) .research-fig { order: 0; } }

/* ---------- group page ---------- */
.person { display: grid; grid-template-columns: 160px 1fr; gap: 1.4rem; background: var(--card); border: var(--border); box-shadow: var(--shadow); padding: 1.35rem; margin-bottom: 1.4rem; }
.person img { width: 160px; height: 160px; object-fit: cover; border: var(--border); }
.person h3 { margin-bottom: 0.15rem; font-size: 1.35rem; }
.person .person-title { font-family: var(--font-mono); font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--scarlet); margin: 0 0 0.7rem; }
.person ul.person-edu { margin: 0 0 0.6rem; padding-left: 1.1rem; }
.person ul.person-edu li { margin-bottom: 0.15rem; }
.person .person-meta { font-family: var(--font-mono); font-size: 0.84rem; color: var(--steel); margin: 0.15rem 0; }
.person .person-links { margin-top: 0.55rem; display: flex; gap: 0.9rem; flex-wrap: wrap; font-weight: 700; font-size: 0.95rem; }
@media (max-width: 640px) { .person { grid-template-columns: 1fr; } }

details.unfold { margin-top: 0.85rem; }
details.unfold > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 0.5rem; font-family: var(--font-display); font-weight: 700; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; color: #fff; background: var(--ink); border: var(--border); padding: 0.45rem 1rem; }
details.unfold > summary::-webkit-details-marker { display: none; }
details.unfold > summary::after { content: "+"; font-family: var(--font-mono); color: #fff; }
details.unfold[open] > summary::after { content: "–"; }
details.unfold > summary:hover { background: var(--scarlet); border-color: var(--scarlet); }
details.unfold .unfold-body { padding-top: 1rem; }
.unfold-body h4 { font-family: var(--font-mono); font-size: 0.76rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.16em; color: var(--scarlet); margin: 1.2rem 0 0.4rem; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 130px 1fr; gap: 0.8rem; padding: 0.32rem 0; border-bottom: 1px solid var(--mist); }
.timeline li:last-child { border-bottom: 0; }
.timeline .tl-years { font-family: var(--font-mono); font-size: 0.84rem; color: var(--steel); }
.awards { margin: 0; padding-left: 1.1rem; }

.notice { background: var(--scarlet); color: #fff; border: var(--border); box-shadow: var(--shadow); padding: 1.15rem 1.3rem; margin: 0.4rem 0 1.6rem; }
.notice .eyebrow { color: #fff; margin-bottom: 0.35rem; }
.notice p { margin: 0; font-weight: 500; }

/* ---------- publications ---------- */
.pub { display: grid; grid-template-columns: 72px 1fr; gap: 1rem; padding: 1.2rem 0; border-bottom: 2px solid var(--ink); }
.pub-num { font-family: var(--font-mono); font-weight: 600; color: #fff; background: var(--ink); align-self: start; justify-self: start; padding: 0.15rem 0.45rem; font-size: 0.88rem; margin-top: 0.2rem; }
.pub-title { font-family: var(--font-display); font-weight: 700; font-size: 1.12rem; margin: 0 0 0.3rem; text-transform: none; }
.pub-authors { margin: 0 0 0.25rem; font-size: 0.97rem; }
.pub-authors .self { font-weight: 800; color: var(--accent); }
.pub-venue { font-family: var(--font-mono); font-size: 0.84rem; color: var(--steel); margin: 0; }
.pub-venue a { color: var(--scarlet); }
.pub details.unfold { margin-top: 0.6rem; }
.pub details.unfold > summary { padding: 0.25rem 0.7rem; font-size: 0.78rem; }
.pub .unfold-body { color: var(--steel); font-size: 0.96rem; }
@media (max-width: 560px) { .pub { grid-template-columns: 1fr; gap: 0.35rem; } }

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 1.7rem; align-items: start; }
@media (max-width: 840px) { .contact-grid { grid-template-columns: 1fr; } }
.map-frame { width: 100%; aspect-ratio: 4 / 3; border: var(--border); box-shadow: var(--shadow); overflow: hidden; }
.map-frame iframe { width: 100%; height: 100%; border: 0; }
.contact-list { list-style: none; margin: 0.5rem 0 0; padding: 0; }
.contact-list li { display: grid; grid-template-columns: 92px 1fr; gap: 0.7rem; padding: 0.35rem 0; }
.contact-list .k { font-family: var(--font-mono); font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--scarlet); padding-top: 0.15rem; }

/* ---------- page head ---------- */
.page-head { padding: 3rem 0 1.2rem; border-bottom: var(--border); margin-bottom: 0.5rem; }
.page-head .lede { max-width: 70ch; color: var(--steel); }

/* ---------- admin ---------- */
.admin-file { margin-bottom: 2.2rem; }
.admin-file textarea { width: 100%; min-height: 320px; font-family: var(--font-mono); font-size: 0.85rem; border: var(--border); padding: 0.9rem; background: var(--card); color: var(--ink); }
.admin-file textarea:focus { outline: 3px solid var(--scarlet); outline-offset: 1px; }
.admin-bar { display: flex; align-items: center; gap: 0.8rem; margin-top: 0.6rem; flex-wrap: wrap; }
.btn { font-family: var(--font-display); font-weight: 700; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; background: var(--ink); color: #fff; border: var(--border); padding: 0.55rem 1.15rem; cursor: pointer; }
.btn:hover { background: var(--scarlet); border-color: var(--scarlet); }
.btn.secondary { background: #fff; color: var(--ink); }
.btn.secondary:hover { background: var(--scarlet); border-color: var(--scarlet); color: #fff; }
.status-ok { font-family: var(--font-mono); font-size: 0.8rem; color: #1a7f37; }
.status-err { font-family: var(--font-mono); font-size: 0.8rem; color: var(--scarlet); }
.loading, .load-error { font-family: var(--font-mono); color: var(--steel); padding: 2rem 0; }
