/* Model Carving overrides on top of the template's index.css */
:root {
  --carve-blue: #0072B2;
  --carve-blue-soft: #e8f2f9;
  --attn: #6A51A3;
  --mlp: #F2C14E;
  --primary-color: var(--carve-blue);
  --primary-hover: #005a8c;
}

.title.is-3::after {
  background: var(--carve-blue);
}

.publication-title.title {
  margin-bottom: 2rem;
}

.publication-subtitle {
  display: block;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 1.6rem;
  line-height: 1.3;
  color: var(--text-secondary);
  margin: 0.75rem auto 0;
  max-width: 40rem;
}

.theme-controls.container {
  display: flex;
  justify-content: flex-end;
  width: 100%;
  padding: 1rem clamp(1rem, 3vw, 2rem) 0;
}

.affiliations {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-top: 0.25rem;
}

.link-block .button.is-soon {
  pointer-events: none;
  box-shadow: none;
}

.link-block .button .soon {
  font-weight: 500;
  font-size: 0.8em;
  margin-left: 0.35em;
}

.tldr {
  max-width: 44rem;
  margin: 2rem auto 0;
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--text-primary);
}

.tldr strong {
  color: var(--carve-blue);
}

/* Keep the title block compact on larger screens. */
@media screen and (min-width: 769px) {
  .masthead .hero-body {
    padding-bottom: 2.5rem;
  }
}

/* Fit the portrait video to the viewport and the article column. */
.teaser .hero-body {
  padding-top: 0.5rem;
}

.teaser-video {
  display: block;
  width: min(100%, 720px, 70vh);
  width: min(100%, 720px, 70svh);
  aspect-ratio: 4 / 5;
  margin: 0 auto;
  border-radius: var(--border-radius);
  background: #0d0f13;
  box-shadow: var(--shadow-lg);
}

/* Sections */
.section-intro {
  max-width: 46rem;
  margin: 0 auto;
}

.prose {
  font-size: 1.08rem;
  line-height: 1.75;
  color: var(--text-primary);
}

.prose p {
  margin-bottom: 1.1rem;
}

.result-title {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--text-primary);
  margin: 3rem 0 0.75rem;
}

.result-title:first-of-type {
  margin-top: 0;
}

figure.paper-figure {
  margin: 1.5rem 0 1rem;
}

figure.paper-figure img {
  display: block;
  width: 100%;
  height: auto;
}

figure.paper-figure.narrow img {
  max-width: 820px;
  margin: 0 auto;
}

figure.paper-figure figcaption {
  margin-top: 0.75rem;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--text-secondary);
}

.math-block {
  overflow-x: auto;
  overflow-y: hidden;
  margin: 1.25rem 0;
  padding: 0.25rem 0;
}

/* Results table */
.table-wrap {
  overflow-x: auto;
  margin: 1.5rem 0 0.5rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
}

.results-table {
  width: 100%;
  font-size: 0.95rem;
  margin: 0 !important;
}

.results-table th,
.results-table td {
  white-space: nowrap;
  text-align: right !important;
  vertical-align: middle !important;
}

.results-table th:first-child,
.results-table td:first-child {
  text-align: left !important;
}

.results-table thead th {
  background: var(--background-secondary);
  color: var(--text-primary);
  font-weight: 600;
}

.results-table .group td {
  background: var(--background-accent);
  font-weight: 600;
  text-align: left !important;
}

.results-table .gain {
  color: var(--carve-blue);
  font-weight: 600;
}

.table-note {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

@media screen and (max-width: 768px) {
  .publication-subtitle {
    font-size: 1.2rem;
  }
  .result-title {
    font-size: 1.15rem;
  }
}

/* Bulma's .hero is a flex column, so a centered container would size to its widest figure
   and overflow on phones; pin it to the viewport instead. */
.hero > .container {
  width: 100%;
}

.hero.is-light .title {
  color: var(--text-primary) !important;
}

.content.has-text-justified {
  text-align: left !important;
}

figure.paper-figure a {
  display: block;
  cursor: zoom-in;
}

/* Match figure surfaces to their surrounding section. */
.cf {
  margin: 2.2rem auto 2.8rem;
}
.hero.is-light .cf {
  --bg: var(--background-secondary);
  --shade: var(--figure-alt-shade);
}
.cf figcaption {
  margin-left: auto;
  margin-right: auto;
}

/* Dark palette: the template's variables, plus the colors Bulma hard-codes */
:root {
  color-scheme: dark;
  --text-primary: #e7e8ea;
  --text-secondary: #a9aeb5;
  --text-light: #7b8088;
  --background-primary: #161719;
  --background-secondary: #1b1c1f;
  --background-accent: #232529;
  --border-color: #2d3034;
  --control-border: #707780;
  --figure-alt-shade: #25272b;
  --carve-blue: #4ba3e0;
  --carve-blue-soft: #1a2a37;
  --primary-color: #4ba3e0;
  --primary-hover: #74b8e8;
  --on-primary: #161719;
  --shadow-lg: none;
}
:root[data-theme="light"] {
  color-scheme: light;
  --text-primary: #1e293b;
  --text-secondary: #475569;
  --text-light: #535b66;
  --background-primary: #ffffff;
  --background-secondary: #f8fafc;
  --background-accent: #edf2f7;
  --border-color: #d7dfe8;
  --control-border: #767d86;
  --figure-alt-shade: #eef1f5;
  --carve-blue: #00659e;
  --carve-blue-soft: #e8f2f9;
  --primary-color: #00659e;
  --primary-hover: #005180;
  --on-primary: #ffffff;
}
html,
body {
  background-color: var(--background-primary);
}
.title,
.subtitle,
strong,
.content h1,
.content h2,
.content h3,
.content strong {
  color: var(--text-primary);
}
.content,
.prose p,
.tldr {
  color: var(--text-primary);
}
a,
.publication-authors a {
  color: var(--carve-blue);
}
.button.is-dark,
.button.is-dark:hover,
.button.is-dark:focus {
  background: var(--background-accent) !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--border-color) !important;
}
.link-block .button.is-dark.is-soon { color: var(--text-secondary) !important; }
.copy-bibtex-btn,
.scroll-to-top {
  color: var(--on-primary);
}
.copy-bibtex-btn {
  font-family: inherit;
}
.copy-bibtex-btn.copied { color: #161719; }
.table {
  background-color: transparent;
  color: var(--text-primary);
}
.table td,
.table th {
  border-color: var(--border-color);
  color: var(--text-primary);
}
.table thead th {
  color: var(--text-secondary);
}
.table.is-hoverable tbody tr:not(.is-selected):hover {
  background-color: var(--background-accent);
}
.results-table .group td {
  background: var(--background-accent);
}
pre,
code {
  background-color: var(--background-accent);
  color: var(--text-primary);
}
.footer {
  background-color: var(--background-secondary);
  color: var(--text-secondary);
}
