/* Project pages.
   Newsreader + Public Sans on a white ground, everything on a centred axis.
   Kept out of style.css so the homepage is untouched. */

:root {
  --ink:      #2E2A25;  /* paper title */
  --ink-head: #3A342E;  /* section headings */
  --ink-body: #4A443D;  /* running text */
  --muted:    #8E867C;  /* affiliation, venue, captions */
  --rule:     #E7E2DC;
  --accent:   #8A4B1F;
  --measure:  760px;    /* text column */
  --content: 1040px;    /* figures, grids */
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: #fff;
  font-family: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 17px;
  line-height: 1.62;
  color: var(--ink-body);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: #5E3214; text-decoration: underline; }

.wrap { max-width: var(--content); margin: 0 auto; padding: 0 24px; }

/* ── header ───────────────────────────────────────────── */

.proj-head { padding-top: 88px; text-align: center; }

.proj-head h1 {
  margin: 0 auto;
  max-width: 880px;
  font-family: 'Newsreader', Georgia, serif;
  font-weight: 400;            /* never the heaviest weight available */
  font-size: clamp(32px, 4.6vw, 54px);
  line-height: 1.12;
  letter-spacing: -0.012em;
  color: var(--ink);           /* not pure black */
}

.proj-meta    { margin-top: 22px; font-size: 17px; line-height: 1.55; }
.proj-authors { color: var(--ink-body); }
.proj-affil   { color: var(--muted); margin-top: 2px; }

/* Affiliation markers, for papers spanning more than one institution.
   line-height: 0 keeps the superscript from stretching the line. */
.proj-authors sup,
.proj-affil sup {
  font-size: 0.62em;
  vertical-align: super;
  line-height: 0;
  color: var(--muted);
  padding-left: 1px;
}

/* My own name is the only link in the author line, and the way home. */
.proj-me { color: inherit; border-bottom: 1px solid #C9C1B7; }
.proj-me:hover { color: var(--accent); border-bottom-color: var(--accent); text-decoration: none; }
.proj-venue   { color: var(--muted); margin-top: 10px; }

.proj-links {
  margin-top: 28px;
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

/* One treatment for every link — no primary/secondary tiering. */
.proj-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 24px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1;
  background: var(--ink);
  color: #fff;
  border: 1px solid var(--ink);
}
.proj-links a:hover { background: #1C1915; border-color: #1C1915; color: #fff; text-decoration: none; }
.proj-links svg { width: 15px; height: 15px; flex-shrink: 0; }

/* Same pill, but nothing to click yet — keeps the row's rhythm while
   reading as unavailable rather than disabled. */
.proj-pending {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 24px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1;
  background: #fff;
  color: var(--muted);
  border: 1px dashed #CFC8BF;
  cursor: default;
}

/* Hairline variant: add is-outline to .proj-links in the layout. */
.proj-links.is-outline a { background: #fff; color: var(--ink-head); border-color: #D8D2CB; }
.proj-links.is-outline a:hover { background: #FAF9F7; color: var(--ink); border-color: var(--ink); }

/* ── teaser ───────────────────────────────────────────── */

.proj-teaser { margin-top: 52px; }
.proj-teaser img,
.proj-teaser video { width: 100%; display: block; border: 1px solid var(--rule); }

/* ── sections ─────────────────────────────────────────── */

.sec { margin-top: 68px; }

.sec h2 {
  margin: 0 0 20px;
  font-family: 'Newsreader', Georgia, serif;
  font-weight: 400;
  font-size: clamp(24px, 2.9vw, 29px);
  letter-spacing: -0.006em;
  color: var(--ink-head);
  text-align: center;
}

.prose { max-width: var(--measure); margin: 0 auto; }
.prose p { margin: 0 0 1em; }
.prose p:last-child { margin-bottom: 0; }

/* Figures run the full content width; captions stay narrow. */
.fig { margin: 30px 0 0; }
.fig:first-child { margin-top: 0; }
.fig img,
.fig video { width: 100%; display: block; border: 1px solid var(--rule); }
.fig figcaption { margin-top: 12px; max-width: 620px; font-size: 14px; line-height: 1.5; color: var(--muted); }

/* Grid for short loops or side-by-side stills. */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.grid figure { margin: 0; }
.grid img,
.grid video { width: 100%; display: block; border: 1px solid var(--rule); }
.grid figcaption { margin-top: 11px; font-size: 14px; line-height: 1.5; color: var(--muted); }

/* ── citation ─────────────────────────────────────────── */

.bib { background: #FAF9F7; border: 1px solid var(--rule); padding: 22px 24px; overflow-x: auto; }
.bib pre {
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;
  font-size: 13.5px;
  line-height: 1.75;
  color: #3A332C;
}

/* Shown while a page has no content yet. */
.soon { text-align: center; color: var(--muted); padding: 76px 0; }

.proj-end { height: 88px; }

@media (max-width: 720px) {
  body { font-size: 16px; }
  .proj-head { padding-top: 56px; }
  .proj-teaser { margin-top: 36px; }
  .sec { margin-top: 52px; }
  .proj-links a { padding: 10px 20px; }
}
