/* =====================================================================
   FBG Whisker project page — styles
   ---------------------------------------------------------------------
   Plain CSS, no build step. Edit values in :root to retheme.
   Layout is unchanged from the original single-file page; the only
   additions are the "static hero" and "video facade" blocks near the
   bottom, which exist to reduce memory use on iPad / mobile Safari.
   ===================================================================== */

:root {
  --ink:     #363636;
  --ink-2:   #4a4a4a;
  --muted:   #7a7a7a;
  --line:    #e8e8e8;
  --paper:   #ffffff;
  --paper-2: #fafafa;
  --link:    #3273dc;
  --link-h:  #2366d1;
  --sans: "Noto Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --serif: "Castoro", "Source Serif 4", Georgia, serif;
  --max-body: 860px;
  --max-media: 920px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, video { max-width: 100%; display: block; }
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-h); text-decoration: underline; }

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- HERO ---------- */
.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: 0;
  background: #0a0d10;
  min-height: 72vh;
  display: flex;
  align-items: center;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  overflow: hidden;
}
.hero-bg video, .hero-bg img {
  width: 100%; height: 100%; object-fit: cover;
  filter: saturate(1.08) brightness(0.98);
}
.hero::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(8,11,14,0.30) 0%, rgba(8,11,14,0.42) 55%, rgba(8,11,14,0.64) 100%);
}
.hero-content {
  text-align: center;
  padding: 108px 0 72px;
  color: #fff;
  width: 100%;
}
.publication-title {
  font-family: var(--sans);
  font-weight: 600;
  font-size: clamp(32px, 4.4vw, 54px);
  line-height: 1.15;
  color: #fff;
  max-width: 1120px;
  margin: 0 auto 22px;
  letter-spacing: 0;
  text-shadow: 0 1px 2px rgba(0,0,0,0.25);
}
.publication-title .for {
  display: block;
  font-weight: 400;
  font-style: italic;
  font-family: var(--serif);
  font-size: clamp(21px, 2.35vw, 30px);
  line-height: 1.28;
  color: rgba(255,255,255,0.84);
  margin: 12px auto 0;
  max-width: 980px;
}
.publication-venue {
  font-family: var(--sans);
  font-size: 16px;
  color: rgba(255,255,255,0.72);
  margin: 18px 0 20px;
  font-style: italic;
}
.publication-authors {
  font-size: 16.5px;
  line-height: 1.8;
  color: rgba(255,255,255,0.95);
  margin: 0 0 6px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}
.publication-authors .author { white-space: nowrap; }
.publication-authors sup {
  font-size: 12px;
  color: rgba(255,255,255,0.6);
  margin-left: 1px;
}
.author-affil {
  font-size: 14.5px;
  color: rgba(255,255,255,0.78);
  margin: 8px 0 0;
  line-height: 1.7;
}
.author-affil sup { font-size: 10.5px; color: rgba(255,255,255,0.55); }
.author-affil .affil-item { white-space: nowrap; }
.author-affil .affil-sep { color: rgba(255,255,255,0.35); margin: 0 10px; }
.author-affil.corresp-line { font-size: 13px; color: rgba(255,255,255,0.6); margin-top: 4px; }

.publication-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0 0;
}
.pub-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(255,255,255,0.92);
  color: #111;
  border-radius: 32px;
  font-size: 14px;
  font-weight: 500;
  transition: background .15s, transform .15s;
}
.pub-link:hover { background: #fff; color: #111; text-decoration: none; transform: translateY(-1px); }
.pub-link svg { width: 14px; height: 14px; fill: currentColor; }

/* ---------- anchor nav ---------- */
.anchor-nav {
  list-style: none;
  padding: 16px 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 18px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.anchor-nav li { margin: 0; }
.anchor-nav a {
  color: var(--ink-2);
  font-size: 14.5px;
  text-decoration: none;
  border-bottom: 1px dotted transparent;
  padding-bottom: 1px;
}
.anchor-nav a:hover { color: var(--link); border-bottom-color: var(--link); }
.anchor-nav .sep { color: #c8c8c8; }

/* ---------- sections ---------- */
section.s { padding: 46px 0; }
section.s.tight { padding: 18px 0; }
h2.section-title {
  font-family: var(--sans);
  font-weight: 600;
  font-size: clamp(27px, 3vw, 34px);
  line-height: 1.22;
  color: var(--ink);
  margin: 0 auto 16px;
  letter-spacing: 0;
  max-width: var(--max-body);
  text-align: center;
}

.thesis {
  max-width: var(--max-body);
  margin: 4px auto 14px;
  text-align: center;
}
.thesis p {
  font-family: var(--sans);
  font-size: 21px;
  line-height: 1.45;
  color: var(--ink);
  margin: 0 0 16px;
  font-weight: 500;
}
.thesis p:last-child { margin-bottom: 0; }
.thesis .key { font-weight: 700; }
.thesis em { font-style: italic; }

.question {
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.4;
  color: var(--ink);
  margin: 0 auto 18px;
  font-weight: 400;
  font-style: italic;
  max-width: var(--max-body);
  text-align: center;
}

p.body {
  font-size: 16.5px;
  line-height: 1.7;
  color: var(--ink);
  margin: 0 auto 15px;
  max-width: var(--max-body);
}
p.body strong { font-weight: 600; }

/* one media block per section */
.media {
  max-width: 920px;
  margin: 24px auto 10px;
}
.media video, .media img {
  width: 100%;
  border-radius: 2px;
  background: #f0f0f0;
}
.media .caption {
  max-width: var(--max-body);
  margin: 10px auto 0;
  font-size: 13.5px;
  color: var(--muted);
  font-style: italic;
  line-height: 1.55;
  text-align: center;
}
.caption-text {
  max-width: var(--max-body);
  margin: 12px auto 0;
  font-size: 14.5px;
  color: var(--muted);
  font-style: italic;
  line-height: 1.6;
  text-align: center;
}
.media-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 720px) { .media-row { grid-template-columns: 1fr; } }

.figure-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: center;
  min-width: 0;
}
.figure-stack {
  display: grid;
  gap: 20px;
  min-width: 0;
}
.figure-panel {
  margin: 0;
  min-width: 0;
  overflow: hidden;
}
.figure-panel img,
.figure-panel video {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
}
.figure-panel.compact {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}
@media (max-width: 720px) {
  .figure-grid { grid-template-columns: 1fr; }
}

/* asset-needed placeholder */
.asset-needed {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--paper-2);
  border: 1px dashed #cfcfcf;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--muted);
  padding: 24px;
}
.asset-needed.tall { aspect-ratio: 4/3; }
.asset-needed.square { aspect-ratio: 1/1; }
.asset-needed .ap-inner { max-width: 460px; }
.asset-needed .ap-title { font-size: 15px; color: var(--ink-2); margin: 6px 0 6px; font-weight: 600; }
.asset-needed .ap-sub { font-size: 13px; color: var(--muted); margin: 0; line-height: 1.55; }
.asset-needed code {
  font-family: ui-monospace, "SF Mono", "IBM Plex Mono", Menlo, monospace;
  font-size: 12px;
  background: #f0f0f0;
  padding: 1px 6px;
  border-radius: 3px;
  color: var(--ink-2);
}

/* compact spec list */
ul.spec {
  list-style: disc;
  padding-left: 22px;
  margin: 6px 0 0;
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.8;
}
ul.spec li { margin-bottom: 2px; }

/* compact result row (text-only) */
.result-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 22px;
  max-width: var(--max-body);
  margin: 16px auto 6px;
  font-size: 15px;
  color: var(--ink-2);
}
.result-row .item { display: inline-flex; gap: 8px; align-items: baseline; }
.result-row .item .k { color: var(--muted); }
.result-row .item .v { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }

/* main result panel */
.result-list {
  list-style: none;
  padding: 0;
  margin: 14px auto 8px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px 24px;
  max-width: 620px;
}
.result-list li {
  font-size: 16px;
  color: var(--ink);
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.result-list li .k { color: var(--muted); }
.result-list li .v { font-weight: 600; font-variant-numeric: tabular-nums; }
@media (max-width: 600px) { .result-list { grid-template-columns: 1fr; } }

/* Q&A */
.qa h3 {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 19px;
  color: var(--ink);
  margin: 24px 0 8px;
  line-height: 1.4;
}
.qa h3:first-of-type { margin-top: 8px; }
.qa p {
  margin: 0 0 8px;
  color: var(--ink-2);
  font-size: 17px;
  line-height: 1.7;
}

/* ---------- authors ---------- */
.authors-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 22px 18px;
  max-width: var(--max-media);
  margin: 24px auto 0;
}
.person-card {
  margin: 0;
  text-align: center;
  min-width: 0;
}
.person-card img {
  width: 112px;
  height: 112px;
  object-fit: cover;
  object-position: center;
  border-radius: 50%;
  margin: 0 auto 10px;
  border: 1px solid var(--line);
  background: var(--paper-2);
}
/* For portraits where the head sits high in the frame, crop from the top so
   the hairline isn't cut off by the circular mask. Add class="crop-top". */
.person-card img.crop-top { object-position: top; }
.person-card .avatar-fallback {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  margin: 0 auto 10px;
  border: 1px solid var(--line);
  background: #f2f4f7;
  color: var(--ink-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 600;
}
.person-card figcaption {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.35;
}
.person-card figcaption a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.person-card figcaption a:hover {
  color: var(--link);
  border-bottom-color: currentColor;
}
.person-card .affil {
  display: block;
  margin-top: 3px;
  font-size: 12.5px;
  font-weight: 400;
  color: var(--muted);
}
@media (max-width: 820px) { .authors-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 520px) { .authors-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- contact / footer ---------- */
.contact-block {
  text-align: center;
  padding: 12px 0 28px;
  font-size: 15px;
  color: var(--ink-2);
}
.contact-block a { font-weight: 500; }

footer.foot {
  border-top: 1px solid var(--line);
  padding: 28px 0 36px;
  text-align: center;
  background: var(--paper-2);
  margin-top: 24px;
}
footer.foot p {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
  line-height: 1.7;
}
footer.foot .credit { margin-top: 8px; font-size: 13px; }

hr.sep { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* ---------- responsive ---------- */
@media (max-width: 720px) {
  body { overflow-x: hidden; }
  .container { padding: 0 18px; }
  .hero {
    min-height: auto;
    display: block;
  }
  .hero-content { padding: 84px 0 58px; }
  .publication-title { font-size: clamp(30px, 9vw, 42px); line-height: 1.16; }
  .publication-title .for {
    max-width: 100%;
    font-size: 20px;
    line-height: 1.35;
  }
  .publication-authors { font-size: 15.5px; line-height: 1.7; }
  .publication-authors .author { white-space: normal; }
  .author-affil {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2px 14px;
    max-width: 100%;
  }
  .author-affil .affil-item { white-space: normal; }
  .author-affil .affil-sep { display: none; }
  .author-affil.corresp-line { display: block; }
  .publication-links { margin-top: 20px; }
  .anchor-nav {
    justify-content: flex-start;
    gap: 6px 12px;
  }
  .anchor-nav .sep { display: none; }
  section.s { padding: 38px 0; }
  section.s.tight { padding: 16px 0; }
  h2.section-title { font-size: 25px; }
  .question { font-size: 20px; }
  .thesis p { font-size: 19px; }
  .media { margin-top: 20px; }
}

/* Respect users who prefer reduced motion: never auto-play the hero video. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
