body {
  font-family: 'Noto Sans', sans-serif;
}

.footer .icon-link {
  font-size: 25px;
  color: #000;
}

.link-block a {
  margin-top: 5px;
  margin-bottom: 5px;
}

.dnerf {
  font-variant: small-caps;
}

/* ── Hero / teaser ───────────────────────────────────────────── */
.teaser .hero-body {
  padding-top: 0;
  padding-bottom: 3rem;
}

.section {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.teaser {
  font-family: 'Google Sans', sans-serif;
}

.teaser video {
  width: 100%;
  max-width: 720px;
  display: block;
  margin: 0 auto;
  border-radius: 8px;
}

.teaser .subtitle {
  margin-top: 0.5rem;
}

/* ── Publication header ──────────────────────────────────────── */
.publication-title {
  font-family: 'Google Sans', sans-serif;
}

.publication-authors {
  font-family: 'Google Sans', sans-serif;
}

.publication-authors a {
  color: hsl(204, 86%, 53%) !important;
}

.publication-authors a:hover {
  text-decoration: underline;
}

.author-block {
  display: inline-block;
}

.publication-venue {
  color: #555;
  font-weight: bold;
  margin: 0 auto;
}

.publication-awards {
  color: #ff3860;
  width: fit-content;
  font-weight: bolder;
}

.publication-banner video {
  position: relative;
  left: auto;
  top: auto;
  transform: none;
  object-fit: contain;
}

/* ── Publication links row ───────────────────────────────────── */
.publication-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 4px;
}

/* ── Publication video embed ─────────────────────────────────── */
.publication-video {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%;
  overflow: hidden;
  border-radius: 10px;
}

.publication-video iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* ── Carousel ────────────────────────────────────────────────── */
.results-carousel {
  overflow: hidden;
}

.results-carousel .item {
  margin: 5px;
  overflow: hidden;
  border: 1px solid #bbb;
  border-radius: 10px;
  padding: 0;
  font-size: 0;
}

.results-carousel video {
  margin: 0;
}

/* ── Hardware experiment videos ──────────────────────────────── */
.hardware-video {
  width: 100%;
  border-radius: 8px;
}

/* Segmented control */
.seg-track {
  position: relative;
  display: flex;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 3px;
  width: fit-content;
  margin: 0 auto 1.25rem;
}

.seg-btn {
  position: relative;
  z-index: 1;
  border: none;
  background: transparent;
  color: #6b7280;
  font-family: 'Google Sans', 'Noto Sans', sans-serif;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.4em 1.15em;
  cursor: pointer;
  border-radius: 8px;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.seg-btn:hover {
  color: #374151;
}

.seg-btn.is-active {
  color: #1e293b;
  font-weight: 600;
}

/* Sliding white pill behind active button */
.seg-slider {
  position: absolute;
  z-index: 0;
  top: 3px;
  left: 3px;
  height: calc(100% - 6px);
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
              width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

/* Video panel card */
.hardware-scenario-panel {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.25rem;
}

/* Label above each video */
.hardware-video-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6b7280;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 2px 8px;
  margin-bottom: 0.5rem;
}

/* ── RRAG video ──────────────────────────────────────────────── */
.rrag-video-frame {
  max-width: 980px;
  width: 100%;
  margin: 0 auto 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}

.rrag-video {
  display: block;
  width: 100%;
  border-radius: 0;
  background: #000;
  pointer-events: none;
}

/* ── Navbar centering ────────────────────────────────────────── */
.navbar-menu .navbar-start {
  flex-grow: 1;
  justify-content: center;
}

/* ── MathJax overflow protection ──────────────────────────── */
mjx-container {
  overflow-x: auto;
  overflow-y: hidden;
  max-width: 100%;
}

/* ── BibTeX block ────────────────────────────────────── */
#BibTeX pre {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ── Problem-formulation SVG diagrams ────────────────────────── */
.pf-diagram {
  max-width: 260px;
  width: 100%;
  margin: 0 auto;
  display: block;
}

/* ── Subsection titles ───────────────────────────────────────── */
h3.title.is-4 {
  font-size: 1.45rem;
  margin-top: 1.2rem;
}

/* ── Contribution overview cards ─────────────────────────────── */
.contribution-cards {
  align-items: stretch;
}

.contribution-card-link {
  display: block;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.contribution-card-link:hover {
  color: inherit;
  text-decoration: none;
}

.contribution-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.contribution-card-link:hover .contribution-card {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

/* ── Algorithm pseudocode boxes ──────────────────────────────── */
.algo-box {
  font-size: 0.88em;
  padding: 0 !important;
  border: 1px solid #d1d5db;
  border-radius: 8px !important;
  background: #fff !important;
  box-shadow: none !important;
  overflow: hidden;
}

.algo-header {
  background: #f1f5f9;
  border-bottom: 1.5px solid #cbd5e1;
  padding: 0.55rem 1.1rem;
  font-family: 'Google Sans', sans-serif;
  font-size: 1.05em;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #1e293b;
}

.algo-inputs {
  padding: 0.6rem 1.1rem 0.4rem;
  font-size: 0.97em;
  color: #374151;
  border-bottom: 1px solid #e5e7eb;
  line-height: 1.65;
}

.algo-body {
  padding: 0.65rem 1.1rem 0.75rem;
}

.algo-step {
  line-height: 1.7;
}

.algo-block {
  margin-left: 0.9em;
  padding-left: 1em;
  border-left: 1.5px solid #cbd5e1;
}

.algo-box code {
  font-family: 'Noto Sans', sans-serif;
  font-size: 0.93em;
  font-variant: small-caps;
  color: #1e293b;
  background: none;
  padding: 0;
}

.algo-kw {
  font-weight: 700;
  font-variant: normal;
}

.algo-comment {
  color: #9ca3af;
  font-size: 0.92em;
}

/* ── Figure captions ─────────────────────────────────────────── */
.figure-caption {
  font-size: 0.875em;
  color: #6b7280;
  text-align: center;
  margin-top: 0.5rem;
  margin-bottom: 1rem;
  line-height: 1.5;
}

/* ── Expected Gain interactive demo ──────────────────────────── */
.eg-demo-box {
  background: #fafafa;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: none;
  padding: 1rem 1.25rem;
}

.eg-svg-col {
  display: flex;
  align-items: center;
}

#eg-svg {
  width: 100%;
  height: auto;
  display: block;
}

.eg-slider-label {
  font-size: 13px;
}

#eg-bval {
  font-weight: 800;
  font-size: 1.25em;
  color: #2563eb;
}

#eg-slider {
  width: 100%;
  accent-color: #2563eb;
  cursor: pointer;
}

.eg-slider-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #94a3b8;
  margin-top: 1px;
}

.eg-crit-label {
  font-size: 11px;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.eg-crit-row {
  display: flex;
  gap: 4px;
}

.eg-crit-btn {
  flex: 1;
  padding: 5px 0;
  font-size: 11px;
  border-radius: 4px;
  border: 1.5px solid #d1d5db;
  cursor: pointer;
  background: #f9fafb;
  color: #374151;
  font-weight: 400;
}

.eg-crit-btn.is-active {
  background: #eff6ff;
  border-color: #2563eb;
  color: #2563eb;
  font-weight: 700;
}

.eg-score-table {
  width: 100%;
  font-size: 11.5px;
  margin-bottom: 8px;
  table-layout: fixed;
}

.eg-score-table thead tr {
  background: #f8fafc;
}

.eg-score-table th {
  padding: 4px 7px;
}

.eg-score-table th:nth-child(1) { width: 36%; }
.eg-score-table th:nth-child(2) { text-align: center !important; width: 12%; }
.eg-score-table th:nth-child(3) { text-align: center !important; width: 12%; }
.eg-score-table th:nth-child(4) { text-align: center !important; width: 40%; }

.eg-score-table td {
  padding: 4px 7px;
}

.eg-score-table td:not(:first-child) {
  text-align: center !important;
}

.eg-score-table tr.eg-best-row {
  background: #2563eb18;
  font-weight: 600;
}

.eg-over-budget {
  color: #9ca3af;
  font-style: italic;
}

#eg-fbox {
  background: #f8fafc;
  border: 1px solid #2563eb;
  border-radius: 6px;
  padding: 9px 12px;
  font-size: 11.5px;
  line-height: 1.6;
}

.eg-path-hl {
  transition: stroke 0.22s ease;
}

/* ── Benchmarking results table ──────────────────────────────── */
.benchmark-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.benchmark-table {
  font-size: 0.93em;
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
}

.benchmark-table thead th {
  background: #f8fafc;
  font-weight: 700;
  padding: 10px 12px;
  border-bottom: 2px solid #cbd5e1;
  text-align: center !important;
  white-space: nowrap;
}

.benchmark-table thead th:first-child {
  text-align: left !important;
}

.benchmark-table tbody td {
  padding: 8px 12px;
  text-align: center;
  border-bottom: 1px solid #e2e8f0;
}

.benchmark-table tbody td:first-child {
  text-align: left;
  font-weight: 600;
  color: #374151;
}

.benchmark-table tbody tr:last-child td {
  border-bottom: none;
}

.benchmark-table tbody tr:hover {
  background: #f8fafc;
}

.benchmark-table .cell-best {
  background: #dcfce7;
  color: #166534;
  font-weight: 700;
  border-radius: 4px;
}

.benchmark-table .cell-good {
  background: #fef9c3;
  color: #854d0e;
  font-weight: 600;
}

.benchmark-table .cell-poor {
  background: #fee2e2;
  color: #991b1b;
}

.benchmark-table .cell-neutral {
  color: #6b7280;
}

.benchmark-table .param-row td {
  font-size: 0.88em;
  color: #6b7280;
  padding-top: 4px;
  padding-bottom: 4px;
  border-bottom: 1px dashed #e2e8f0;
}

.benchmark-legend {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 0.8em;
  color: #6b7280;
  flex-wrap: wrap;
}

.benchmark-legend .legend-label {
  margin-right: 4px;
}

.benchmark-legend .legend-item {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.95em;
}

.benchmark-legend .legend-item.cell-best {
  background: #dcfce7;
  color: #166534;
}

.benchmark-legend .legend-item.cell-good {
  background: #fef9c3;
  color: #854d0e;
}

.benchmark-legend .legend-item.cell-poor {
  background: #fee2e2;
  color: #991b1b;
}

/* ── Active perception bar plot ──────────────────────────────── */
.barplot-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.barplot-frame {
  position: relative;
  width: 100%;
  height: 320px;
}

.barplot-frame canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

/* ── Interpolation (inherited from nerfies, unused but kept) ── */
.interpolation-panel {
  background: #f5f5f5;
  border-radius: 10px;
}

.interpolation-panel .interpolation-image {
  width: 100%;
  border-radius: 5px;
}

.interpolation-panel .slider {
  margin: 0 !important;
}

#interpolation-image-wrapper {
  width: 100%;
}

#interpolation-image-wrapper img {
  border-radius: 5px;
}

/* ═══════════════════════════════════════════════════════════════
   Mobile / responsive
   ═══════════════════════════════════════════════════════════════ */
@media screen and (max-width: 768px) {

  /* Smaller hero title */
  .hero .publication-title {
    font-size: 1.6rem !important;
    line-height: 1.3;
  }

  /* Author names: allow wrapping per name */
  .author-block {
    display: inline;
  }

  /* Venue text */
  .publication-venue {
    font-size: 0.95rem;
  }

  /* Smaller publication link buttons */
  .publication-links .button {
    font-size: 0.8rem;
    padding-left: 0.75em;
    padding-right: 0.75em;
  }

  /* Segmented control: allow horizontal scroll on mobile */
  .seg-track {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .seg-btn {
    font-size: 0.78rem;
    padding: 0.35em 0.8em;
  }

  /* Hardware panel card: tighter on mobile */
  .hardware-scenario-panel {
    padding: 0.75rem;
    border-radius: 8px;
  }

  /* Hardware videos: stack vertically on mobile */
  #hardware-videos .columns.is-variable {
    display: flex;
    flex-direction: column;
  }

  .hardware-video-label {
    font-size: 0.7rem;
  }

  /* Expected Gain demo: stack SVG above controls */
  .eg-demo-box > .columns {
    display: flex;
    flex-direction: column;
  }

  .eg-demo-box > .columns > .column.is-half {
    width: 100%;
  }

  .eg-svg-col {
    margin-bottom: 1rem;
  }

  .eg-crit-btn {
    font-size: 10px;
    padding: 4px 0;
  }

  .eg-score-table {
    font-size: 10.5px;
  }

  #eg-fbox {
    font-size: 10.5px;
  }

  /* Algorithm pseudocode: horizontal scroll on overflow */
  .algo-box {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .algo-body {
    min-width: 480px;
  }

  /* Problem formulation diagrams: add spacing when stacked */
  .pf-diagram {
    max-width: 200px;
    margin-bottom: 0.5rem;
  }

  /* Contribution cards: add gap between stacked cards */
  .contribution-cards > .column {
    margin-bottom: 0.5rem;
  }

  /* Benchmark table */
  .benchmark-table {
    font-size: 0.84em;
    min-width: 520px;
  }

  .benchmark-table thead th,
  .benchmark-table tbody td {
    padding: 7px 9px;
  }

  .benchmark-legend {
    justify-content: flex-start;
  }

  .benchmark-legend .legend-label {
    width: 100%;
  }

  /* Bar plot */
  .barplot-frame {
    min-width: 620px;
    height: 360px;
  }

  /* RRAG video */
  .rrag-video-frame {
    border-radius: 8px;
    margin-bottom: 1rem;
  }

  /* Surface reconstruction comparison image: scrollable on mobile */
  .comparison-img-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .comparison-img-wrap img {
    min-width: 600px;
    border-radius: 6px;
  }

  /* Teaser */
  .teaser .hero-body {
    padding-bottom: 1.5rem;
  }

  .teaser .subtitle {
    font-size: 0.95rem;
  }

  /* General sections: tighter padding */
  .section {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
  }

  /* Footer */
  .footer {
    padding: 2rem 1rem;
  }
}
