/* Project page styling on top of Bulma. Class names follow the Nerfies
   academic template (publication-title / publication-authors / publication-links). */

:root {
  --accent: #3b5c8f;
  --accent-soft: #eef2f8;
  --rule: #e3e6ea;
  --muted: #5f6b7a;
}

body {
  font-family: 'Noto Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI',
               Helvetica, Arial, sans-serif;
  color: #1f2733;
  -webkit-font-smoothing: antialiased;
}

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

/* The hero is a dark band so the title and author names can be white. It keeps
   its own colours in dark mode too, so only the body below it switches. */
.hero.hero-dark {
  background: linear-gradient(180deg, #1c2637 0%, #141c29 100%);
  border-bottom: 1px solid #0e1520;
}

.publication-title {
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.18;
  max-width: 44rem;
  margin: 0 auto 1.25rem auto;
}

/* Bulma's `.title` sets a dark colour at specificity (0,1,0); scoping through
   the hero beats it without !important. */
.hero-dark .publication-title {
  color: #ffffff;
}

.publication-venue {
  display: inline-block;
  margin-bottom: 1.1rem;
  padding: 0.2rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.publication-authors {
  margin-bottom: 0.4rem;
  color: #ffffff;
}

.hero-dark .publication-authors a {
  color: #ffffff;
  border-bottom: 1px solid transparent;
}

.hero-dark .publication-authors a:hover {
  border-bottom-color: #ffffff;
}

/* Corresponding-author envelope: no underline, so it reads as a marker. */
.hero-dark .publication-authors a.corresponding {
  border-bottom: none;
  margin-left: 0.1em;
}

.publication-affiliation {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.95rem;
}

.corresponding-note {
  display: inline-block;
  margin-top: 0.35rem;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.85rem;
}

/* Solid dark buttons would vanish against the dark hero. */
.hero-dark .button.is-dark {
  background-color: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.38);
  color: #ffffff;
}

.hero-dark .button.is-dark:hover {
  background-color: rgba(255, 255, 255, 0.24);
  border-color: #ffffff;
  color: #ffffff;
}

.publication-links {
  margin-top: 1.6rem;
}

.publication-links .button {
  margin: 0.25rem 0.2rem;
}

/* Inline SVG icons rather than a webfont: a few icons do not justify shipping
   an icon font, and the page stays free of external requests. */
.button .icon svg {
  width: 1.05em;
  height: 1.05em;
  fill: currentColor;
}

/* ---------------------------------------------------------------- content */

.section-rule {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 0;
}

.title.is-3 {
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 1.1rem !important;
}

.figure {
  margin: 0 0 0.5rem 0;
  text-align: center;
}

.figure img {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--rule);
  border-radius: 6px;
}

.figure.is-wide img {
  border: none;
}

.figure-caption {
  margin-top: 0.7rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
  text-align: left;
}

.takeaway {
  margin: 1.4rem 0;
  padding: 1rem 1.15rem;
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: 0 5px 5px 0;
  font-size: 0.97rem;
}

.takeaway strong {
  color: var(--accent);
}

.caveat {
  margin: 1.4rem 0;
  padding: 1rem 1.15rem;
  background: #fdf7ec;
  border-left: 3px solid #c98a1e;
  border-radius: 0 5px 5px 0;
  font-size: 0.94rem;
}

/* ---------------------------------------------------------------- tables */

/* Wide tables scroll inside their own container, never the page body. */
.table-scroll {
  overflow-x: auto;
  margin-bottom: 1rem;
  -webkit-overflow-scrolling: touch;
}

table.results {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  /* Fixed-width digits, so columns of numbers line up down the page. */
  font-variant-numeric: tabular-nums;
}

table.results th,
table.results td {
  padding: 0.5rem 0.7rem;
  font-size: inherit;
  letter-spacing: normal;
  border-bottom: 1px solid var(--rule);
  white-space: nowrap;
}

/* Alignment needs the `:not([align])` form. Bulma ships
     .content table th:not([align]) { text-align: inherit }
   at specificity (0,2,2), which outranks a plain `table.results th` (0,1,2) and
   silently left-aligns every numeric header while the cells below stay right-
   aligned. Matching Bulma's shape ties the specificity, so ours wins on source
   order. Header and body must also share font-size and padding, or the columns
   agree while the text in them does not. */
table.results th:not([align]),
table.results td:not([align]) {
  text-align: right;
}

table.results th:first-child:not([align]),
table.results td:first-child:not([align]) {
  text-align: left;
  white-space: normal;
}

table.results thead th {
  border-bottom: 2px solid #c8cdd4;
  font-weight: 600;
  color: var(--muted);
}

table.results tr.ours {
  background: var(--accent-soft);
}

table.results tr.ours td {
  font-weight: 600;
}

table.results td.ci {
  color: var(--muted);
}

table.results caption {
  caption-side: bottom;
  padding-top: 0.6rem;
  color: var(--muted);
  font-size: 0.86rem;
  text-align: left;
}

/* ---------------------------------------------------------------- bibtex */

#BibTeX pre {
  background: #f7f8fa;
  border: 1px solid var(--rule);
  border-radius: 6px;
  font-size: 0.85rem;
  overflow-x: auto;
}

.footer {
  background: #fbfcfd;
  border-top: 1px solid var(--rule);
  padding: 2.5rem 1.5rem;
  font-size: 0.87rem;
  color: var(--muted);
}

.footer a {
  color: var(--accent);
}

/* ---------------------------------------------------------------- dark mode */

/* Figures keep white plates: their content is drawn on white and inverting
   them would misrepresent the plots. */
@media (prefers-color-scheme: dark) {
  :root {
    --accent: #8fb2e8;
    --accent-soft: #1c2432;
    --rule: #2c333d;
    --muted: #9aa6b4;
  }

  body,
  .footer {
    background: #12161c !important;
    color: #e5e9ee;
  }

  /* The hero keeps its own dark palette; only the body below switches. */

  .title,
  .subtitle,
  .content,
  .content strong,
  h1, h2, h3, h4 {
    color: #e5e9ee !important;
  }

  /* Keep the hero pure white; the generic .title rule above uses !important. */
  .hero-dark .publication-title,
  .hero-dark .publication-authors,
  .hero-dark .publication-authors a {
    color: #ffffff !important;
  }

  .figure img {
    background: #ffffff;
  }

  table.results thead th {
    border-bottom-color: #3a424d;
  }

  .caveat {
    background: #251f14;
  }

  #BibTeX pre {
    background: #171c23;
    color: #cfd6de;
  }

  .button.is-dark {
    background-color: #2a3340;
    color: #e5e9ee;
  }

  .button.is-dark:hover {
    background-color: #35404f;
  }
}
