/* ============================================================
   Base styles (adapted from nerfies template)
   ============================================================ */
body {
  font-family: 'Noto Sans', sans-serif;
  margin: 0;
}

/* Top hero gradient: light blue -> white */
section.hero:first-of-type {
  background: linear-gradient(to bottom, #c4e2ff 0%, #e4f2ff 45%, #ffffff 100%);
}

/* Remove empty navbar strip at top */
.navbar {
  min-height: 0 !important;
  height: 0 !important;
  padding: 0 !important;
  background: transparent !important;
}

.navbar .navbar-brand {
  display: none !important;
}

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

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

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

.teaser .hero-body {
  padding-top: 0;
  padding-bottom: 3rem;
}

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

.publication-title {
  font-family: 'Google Sans', sans-serif;
  line-height: 1.15;
}

.publication-title-main {
  display: block;
  font-size: 1.22em;
  font-weight: 700;
  color: #2a3242;
  -webkit-text-fill-color: #2a3242;
  -webkit-text-stroke: 0;
  text-shadow:
    0 0 2px rgba(255, 255, 255, 0.95),
    0 0 8px rgba(255, 255, 255, 0.85),
    0 0 18px rgba(255, 255, 255, 0.65);
}

.publication-title-sub {
  display: block;
  margin-top: 0.2em;
  font-size: 0.82em;
  font-weight: 600;
  color: #0b1a3a;
  text-shadow:
    0 1px 1px rgba(255, 255, 255, 0.55),
    0 0 16px rgba(140, 160, 255, 0.22);
}

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

.hero .publication-venue {
  color: #B02C1C !important;
  font-weight: bold;
  text-align: center;
  width: 100%;
}

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

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

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

.publication-affiliation small {
  color: #000 !important;
}

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

.publication-video {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%;
  overflow: hidden;
  border-radius: 10px !important;
}

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

.results-carousel {
  overflow: hidden;
}

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

/* ============================================================
   Abstract figure
   ============================================================ */
.abstract-figure {
  margin-top: 2rem;
  text-align: center;
}

.abstract-figure img {
  width: 80%;
  margin: 0 auto;
  border-radius: 8px;
}

.abstract-figure-caption {
  margin-top: .75rem;
  font-size: .9rem;
  color: #555;
  text-align: left;
}

/* ============================================================
   Results Custom Carousel (variable-width, loop, arrows)
   ============================================================ */
.rsc-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0;
}

.rsc-viewport {
  overflow: hidden;
  flex: 1;
}

.rsc-track {
  display: flex;
  gap: 8px;
  /* no scroll-snap here — JS handles stepping */
}

.rsc-item,
.rsc-item-clone {
  flex: 0 0 auto;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #bbb;
}

.rsc-item video,
.rsc-item-clone video {
  display: block;
  height: 280px;
  width: auto;
}

.rsc-btn {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid #ccc;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  flex-shrink: 0;
}

.rsc-btn:hover {
  background: #f0f0f0;
}

.rsc-prev { margin-right: 8px; }
.rsc-next { margin-left:  8px; }

/* ============================================================
   Video Comparison Carousel
   ============================================================ */
.comparison-video-grid {
  padding: 10px;
}

.comparison-video-grid .comparison-col {
  padding: 4px;
}

.comparison-video-grid video {
  width: 100%;
  border-radius: 6px;
  border: 2px solid #ddd;
  display: block;
}

.comparison-method-label {
  font-size: .8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #555;
  margin-bottom: 4px;
  text-align: center;
}

.comparison-scene-label {
  font-size: .9rem;
  font-weight: 600;
  color: #333;
  text-align: center;
  padding: 6px 0 10px;
}

.comparison-ours video {
  border-color: #3273dc;
  border-width: 3px;
}

.comparison-ours .comparison-method-label {
  color: #3273dc;
}

/* ============================================================
   Media Comparison Slider
   ============================================================ */
.media-compare-wrapper {
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: 0;
  overflow: hidden;
  border-radius: 10px;
  aspect-ratio: 16 / 9;
  cursor: col-resize;
  user-select: none;
  background: #000;
}

.media-compare-shell {
  width: 100%;
  max-width: 1020px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.compare-media {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  display: block;
}

.compare-media-before {
  z-index: 1;
}

.compare-media-after {
  z-index: 2;
  clip-path: inset(0 0 0 50%);
}

.compare-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  background: white;
  z-index: 3;
  transform: translateX(-50%);
  pointer-events: none;
}

.compare-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .4);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: col-resize;
  pointer-events: all;
}

.compare-arrow {
  font-size: 14px;
  color: #333;
  line-height: 1;
}

.compare-label {
  position: absolute;
  top: 12px;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  font-size: 1rem;
  font-weight: bold;
  padding: 5px 12px;
  border-radius: 4px;
  z-index: 4;
  pointer-events: none;
}

.compare-label-left {
  left: 12px;
}

.compare-label-right {
  right: 12px;
}

.compare-nav-btn {
  position: static;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid #ccc;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .22);
  cursor: pointer;
  z-index: 1;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #222;
  flex: 0 0 auto;
}

.compare-nav-btn:hover {
  background: #fff;
}

.compare-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 16px;
}

.media-compare-caption {
  margin-top: 0.85rem;
}

.compare-switcher .button {
  font-size: .8rem;
}

.compare-switcher .button.is-active {
  background-color: #3273dc;
  color: #fff;
  border-color: #3273dc;
}

/* ============================================================
   Results Tables
   ============================================================ */
.results-table th {
  background: #f5f5f5;
  font-weight: bold;
  text-align: center;
}

.results-table td {
  text-align: center;
  vertical-align: middle;
}

.results-table td:first-child {
  text-align: left;
}

.results-table-ours {
  background-color: #fffbdd !important;
}

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

/* ============================================================
   BibTeX
   ============================================================ */
.bibtex-block pre {
  background: #f8f8f8;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 1.25rem;
  font-size: .85rem;
  text-align: left;
  white-space: pre;
  overflow-x: auto;
}

/* ============================================================
   Disabled link buttons
   ============================================================ */
.button[disabled],
.button.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}
