/* ==========================================================================
   Shared stylesheet for the standalone project pages.
   A copy is written into each site so every one stands alone.
   ========================================================================== */

:root {
  --paper: #ffffff;
  --band: #f7f6f3;
  --ink: #14120f;
  --body: #3d3831;
  --muted: #6f675d;
  --faint: #9b938a;
  --rule: #e4e0d8;
  --accent: #14635b;
  --accent-deep: #0d443e;

  --display: 'Newsreader', Georgia, 'Times New Roman', serif;
  --sans: 'Instrument Sans', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
}

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

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

.wrap {
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 32px);
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

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

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

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

.hero {
  background: var(--band);
  border-bottom: 1px solid var(--rule);
  padding-block: clamp(44px, 7vw, 76px) clamp(32px, 5vw, 48px);
  text-align: center;
}

/* Two lines at desktop width, with room to spare.
   Measured against real Newsreader metrics for all four titles, then given a
   14% allowance for the wider fallback face (Georgia) that renders before the
   webfont arrives: the longest title needs ~748px per balanced line against
   1056px of content, so it holds either way. */
.hero h1 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(22px, 2.6vw, 28px);
  line-height: 1.26;
  letter-spacing: -0.016em;
  color: var(--ink);
  margin: 0;
  text-wrap: balance;
}

/* Venue sits under the title, spelled out with its acronym.
   Set apart from the title, but held close to the authors below it. */
.venue {
  margin: 30px 0 0;
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
  text-wrap: balance;
}
.venue .tag {
  display: inline-block;
  margin-left: 8px;
  vertical-align: 2px;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-deep);
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 3px 8px;
}

/* One line on desktop: no width cap, and names never break mid-name. */
.authors {
  margin: 12px 0 0;
  font-size: 16px;
  color: var(--body);
}
.authors > span { white-space: nowrap; }
/* No emphasis on the first author: on a project page every author reads the
   same. (The .me hook stays in the markup in case that changes.) */
.authors .me { color: var(--ink); }
.authors sup { font-size: 0.68em; color: var(--faint); }
.authors .sep { color: var(--faint); }

.affil {
  margin-top: 12px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--muted);
}
.affil sup { color: var(--faint); }

/* Link buttons */
.links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--ink);
  color: #fff;
  border-radius: 999px;
  padding: 9px 18px;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.16s ease, transform 0.16s ease;
}
.btn:hover { background: var(--accent-deep); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn svg { width: 15px; height: 15px; flex: none; }

/* ------------------------------------------------------------------ body -- */

main { padding-block: clamp(40px, 6vw, 64px) 24px; }

section { margin-top: clamp(40px, 6vw, 60px); }

h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(24px, 3vw, 30px);
  letter-spacing: -0.018em;
  color: var(--ink);
  margin: 0 0 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule);
}

figure {
  margin: 0 0 30px;
  text-align: center;
}
figure img, figure video {
  margin-inline: auto;
  border-radius: 3px;
}
/* The column is wide so the hero can hold long titles on two lines, but
   running text must not follow it out to ~125 characters. Figures stay full
   width; prose is capped to a readable measure and centred beneath them. */
figcaption {
  margin: 12px auto 0;
  max-width: 92ch;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--muted);
  text-align: left;
  text-wrap: pretty;
}

/* Breathing room between the teaser caption and the first section.
   (Was margin-bottom:0 with a first-of-type rule zeroing the next
   section's margin too, which left the two touching.) */
.teaser { margin-bottom: clamp(34px, 4.5vw, 48px); }

.note {
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--muted);
  margin: 0 auto 22px;
  max-width: 92ch;
  text-wrap: pretty;
}
section > .note:last-child { margin: 8px auto 0; }

/* Contributions */
.contribs {
  margin: 0;
  padding: 0;
  max-width: 88ch;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.contribs li {
  position: relative;
  padding-left: 22px;
  text-wrap: pretty;
}
.contribs li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.66em;
  width: 8px;
  height: 2px;
  background: var(--accent);
}
.contribs strong { color: var(--ink); font-weight: 600; }

/* Video embed. Capped so a 16:9 frame does not tower over the page at the
   wider column width. */
.video {
  position: relative;
  max-width: 960px;
  margin-inline: auto;
  aspect-ratio: 16 / 9;
  background: var(--band);
  border: 1px solid var(--rule);
  border-radius: 3px;
  overflow: hidden;
}
.video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Citation */
.cite { position: relative; }
.cite pre {
  margin: 0;
  background: var(--band);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 20px 20px 20px 22px;
  overflow-x: auto;
}
.cite code {
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink);
  white-space: pre;
}
.copy {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 5px 11px;
  cursor: pointer;
  transition: color 0.16s ease, border-color 0.16s ease;
}
.copy:hover { color: var(--accent); border-color: var(--accent); }

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

footer {
  margin-top: clamp(48px, 7vw, 76px);
  border-top: 1px solid var(--rule);
  background: var(--band);
  padding-block: 28px;
}
footer p {
  margin: 0;
  font-size: 13.5px;
  color: var(--muted);
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
