/* ============================================================
   InvSplat — academic project page template (Bulma-based)
   ============================================================ */

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;
}

.teaser .hero-body {
  padding-top: 0;
  padding-bottom: 3rem;
}
.teaser {
  font-family: 'Google Sans', sans-serif;
}

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

.moon-mark {
  font-size: 0.85em;
  vertical-align: -0.02em;
  margin-right: 0.1em;
}

.publication-banner {
  max-height: parent;
}
.publication-banner video {
  position: relative;
  left: auto;
  top: auto;
  transform: none;
}
.publication-header .hero-body {
}

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

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

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

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

.publication-banner img {
}

.publication-authors {
  /* Override color of links from spans */
}

.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%;
}

.publication-body img {
}

.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;
}

/* NVS results: one section, a captioned row per dataset */
.nvs-row { margin-bottom: 2.25rem; }
.nvs-row:last-child { margin-bottom: 0; }
.nvs-rowhead {
  font-family: 'Google Sans', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: #333;
  margin-bottom: .6rem;
  padding-bottom: .4rem;
  border-bottom: 1px solid #ececec;
}
.nvs-rowhead span { color: #999; font-weight: 400; font-size: .9rem; }

.nvs-panel {
  position: relative;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.nvs-viewport {
  flex: 1 1 auto;
  overflow: hidden;
  border-radius: 12px;
}
.nvs-viewport.is-empty {
  min-height: 220px;
  border: 1px dashed #d5d5d5;
  background: #fafafa;
}
.nvs-track {
  display: flex;
  transition: transform .4s cubic-bezier(.22,.61,.36,1);
  will-change: transform;
}
.nvs-slide {
  flex: 0 0 50%;
  max-width: 50%;
  padding: 0 6px;
  box-sizing: border-box;
}
.nvs-slide video {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid #ddd;
  border-radius: 12px;
  background: #000;
}
.nvs-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 220px;
  color: #999;
  font-family: 'Google Sans', sans-serif;
}

/* nav arrows */
.nvs-nav {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border: 1px solid #e0e0e0;
  border-radius: 50%;
  background: #fff;
  color: #333;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
  box-shadow: 0 2px 8px rgba(0,0,0,.1);
  transition: background .15s, transform .15s, opacity .15s;
  z-index: 3;
}
.nvs-nav:hover:not(:disabled) { background: #2b2b2b; color: #fff; transform: scale(1.08); }
.nvs-nav:disabled { opacity: .35; cursor: default; }

/* pagination dots */
.nvs-dots {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin-top: 1rem;
}
.nvs-dot {
  width: 9px;
  height: 9px;
  border: none;
  border-radius: 50%;
  background: #d2d2d2;
  cursor: pointer;
  padding: 0;
  transition: background .15s, transform .15s;
}
.nvs-dot:hover { background: #aaa; }
.nvs-dot.is-active { background: #6b5bd2; transform: scale(1.25); }

@media (max-width: 640px) {
  .nvs-slide { flex: 0 0 100%; max-width: 100%; }
}

.interpolation-panel {
  background: #f5f5f5;
  border-radius: 10px;
}
.interpolation-panel .interpolation-image {
  width: 100%;
  border-radius: 5px;
}
.interpolation-video-column {
}
.interpolation-panel .slider {
  margin: 0 !important;
}
.interpolation-panel .slider {
  width: 100%;
}
#interpolation-image-wrapper {
  width: 100%;
}
#interpolation-image-wrapper img {
  border-radius: 5px;
}

/* ------------------------------------------------------------
   Light touch-ups (kept subtle to preserve the template look)
   ------------------------------------------------------------ */
.hero.is-light .hero-body { padding-top: 3rem; padding-bottom: 3rem; }

.summary-box {
  background: #fafafa;
  border: 1px solid #eaeaea;
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
}
.summary-box ul { margin-top: 0; }
.summary-box li { margin-bottom: .5rem; }

.method-fig {
  background: #fff;
  border: 1px solid #eaeaea;
  border-radius: 10px;
  overflow: hidden;
}

/* before/after image-compare slider (vanilla) */
.bal-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 10px;
  user-select: none;
  border: 1px solid #ddd;
}
.bal-before, .bal-after { position: absolute; inset: 0; }
.bal-before { overflow: hidden; width: 50%; z-index: 2; }
.bal-before-inset { position: absolute; top: 0; left: 0; height: 100%; }
.bal-before img, .bal-after img,
.bal-before .ph, .bal-after .ph { display: block; height: 100%; object-fit: cover; }
.bal-after .ph, .bal-before .ph {
  display: flex; align-items: center; justify-content: center;
  font-family: 'Google Sans', sans-serif; color: #888;
  background:
    repeating-linear-gradient(45deg,#f3f3f3 0 12px,#fafafa 12px 24px);
}
.bal-handle {
  position: absolute; top: 0; bottom: 0; left: 50%; width: 2px;
  background: #fff; z-index: 3; transform: translateX(-50%);
  box-shadow: 0 0 0 1px rgba(0,0,0,.15);
}
.bal-handle-circle {
  position: absolute; top: 50%; left: 50%; width: 40px; height: 40px;
  transform: translate(-50%,-50%); border-radius: 50%;
  background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.3);
  display: flex; align-items: center; justify-content: center; color: #333;
}
.bal-range {
  position: absolute; inset: 0; width: 100%; height: 100%;
  margin: 0; opacity: 0; cursor: ew-resize; z-index: 4;
}
.bal-label {
  position: absolute; top: 10px; z-index: 3;
  font-family: 'Google Sans', sans-serif; font-size: .8rem;
  background: rgba(0,0,0,.55); color: #fff; padding: 3px 10px; border-radius: 20px;
}
.bal-label-before { left: 10px; } .bal-label-after { right: 10px; }

/* generic media placeholder */
.ph {
  display: flex; align-items: center; justify-content: center; text-align: center;
  width: 100%; min-height: 180px;
  font-family: 'Google Sans', sans-serif; color: #999; font-size: .9rem;
  background: repeating-linear-gradient(45deg,#f3f3f3 0 12px,#fafafa 12px 24px);
  border-radius: 8px; padding: 12px;
}
.ph-video::before { content: "▶  "; }

.cmp-table-head {
  font-family: 'Google Sans', sans-serif; font-size: .8rem; color: #777;
  text-align: center; margin-bottom: 6px;
}

/* ============================================================
   Interactive comparison demo
   ============================================================ */
.cmp-demo {
  background: #fafafa;
  border: 1px solid #ececec;
  border-radius: 14px;
  padding: 1.25rem 1.25rem 1rem;
}

.cmp-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1.25rem;
}
.cmp-control-group {
  display: flex;
  align-items: center;
  gap: .6rem;
}
.cmp-control-label {
  font-family: 'Google Sans', sans-serif;
  font-size: .75rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #999;
}
.cmp-btns {
  display: inline-flex;
  flex-wrap: wrap;
  gap: .4rem;
}
/* match the Bulma buttons used in the Intrinsic decomposition section */
.cmp-btns .button { margin: 0; }

.cmp-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.cmp-cell { margin: 0; }
.cmp-cap {
  font-family: 'Google Sans', sans-serif;
  font-size: .85rem;
  font-weight: 600;
  color: #333;
  text-align: center;
  margin-bottom: 6px;
}
.cmp-cap span {
  display: inline-block;
  font-size: .68rem;
  font-weight: 500;
  color: #fff;
  background: #6b5bd2;
  border-radius: 999px;
  padding: 1px 8px;
  margin-left: 4px;
  vertical-align: middle;
}
.cmp-cap--input { color: #777; }
.cmp-cap--ours { color: #4536a8; }

.cmp-video-wrap {
  position: relative;
  aspect-ratio: 512 / 384;
  background: #111;
  border-radius: 8px;
  overflow: hidden;
}
.cmp-cell--ours .cmp-video-wrap {
  box-shadow: 0 0 0 2px #6b5bd2;
}
/* stacked modality clips — only the active one is shown (instant switch) */
.cmp-video-wrap video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  pointer-events: none;
}
.cmp-video-wrap video.is-active {
  opacity: 1;
  pointer-events: auto;
}
.cmp-missing {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Google Sans', sans-serif;
  font-size: .8rem;
  color: #aaa;
  background: repeating-linear-gradient(45deg,#1a1a1a 0 12px,#222 12px 24px);
}
.cmp-missing[hidden] { display: none; }

/* stage wraps the video row + overlay controls */
.cmp-stage { position: relative; }

/* shared transport bar (play/pause + scrubber for all videos) —
   sits below the videos, revealed when the user hovers / focuses the area */
.cmp-transport {
  display: flex;
  align-items: center;
  gap: .5rem;
  width: min(360px, 88%);
  margin: .6rem auto 0;
  padding: .25rem .45rem;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  transform: translateY(4px);
}
.cmp-stage:hover .cmp-transport,
.cmp-stage:focus-within .cmp-transport {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.cmp-play-all {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 50%;
  background: #2b2b2b;
  color: #fff;
  font-size: .62rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, transform .15s;
}
.cmp-play-all:hover { background: #000; transform: scale(1.06); }

.cmp-seek {
  flex: 1 1 auto;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 999px;
  background: #e6e6e6;
  cursor: pointer;
  outline: none;
}
/* filled track via gradient set from JS (--p = 0..100%) */
.cmp-seek {
  background: linear-gradient(to right, #6b5bd2 0%, #6b5bd2 var(--p, 0%), #e6e6e6 var(--p, 0%), #e6e6e6 100%);
}
.cmp-seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #6b5bd2;
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.3);
  cursor: pointer;
}
.cmp-seek::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #6b5bd2;
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.3);
  cursor: pointer;
}
.cmp-time {
  flex: 0 0 auto;
  font-family: 'Google Sans', sans-serif;
  font-size: .68rem;
  color: #777;
  min-width: 30px;
  text-align: right;
}
.cmp-fs {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #555;
  font-size: .72rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, color .15s;
}
.cmp-fs:hover { background: #ececec; color: #111; }

/* fullscreen layout: center the four videos on a dark backdrop */
.cmp-stage:fullscreen {
  background: #0b0b0b;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2vh 2vw;
}
.cmp-stage:fullscreen .cmp-grid { width: 100%; align-items: center; }
.cmp-stage:fullscreen .cmp-cap { color: #eee; }
.cmp-stage:-webkit-full-screen { background: #0b0b0b; display: flex; align-items: center; justify-content: center; }
.cmp-stage:fullscreen .cmp-transport { bottom: 16px; }

.cmp-hint {
  text-align: center;
  font-size: .85rem;
  color: #888;
  margin-top: 1rem;
}
.cmp-hint i { margin-right: .3rem; color: #aaa; }

@media (max-width: 768px) {
  .cmp-grid { grid-template-columns: repeat(2, 1fr); }
  .cmp-controls { gap: 1rem; }
}

/* ---- Interactive 3D Gaussian viewer (SuperSplat iframe) ---- */
.splat-viewer-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  margin: 1.25rem auto 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e3e3e3;
  background: #0b0b0b;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.12);
}
.splat-viewer-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
@media (max-width: 768px) {
  .splat-viewer-wrap { aspect-ratio: 4 / 3; }
}

/* ---- Input views preview strip ---- */
.input-views-cap {
  text-align: center;
  font-size: .8rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #888;
  margin: .9rem 0 .4rem;
}
.input-views {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}
.input-views img {
  flex: 1 1 0;          /* equal width regardless of count/aspect */
  min-width: 0;
  max-width: 210px;     /* so 2 views don't blow up */
  height: auto;
  border-radius: 5px;
  border: 1px solid #e0e0e0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.10);
  display: block;
}

/* ============================================================
   Relighting section
   ============================================================ */
.rl-scenes {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem;
  margin-bottom: 1.25rem;
}
.rl-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.rl-panel { margin: 0; }
.rl-cap {
  font-family: 'Google Sans', sans-serif;
  font-size: .9rem;
  font-weight: 600;
  color: #333;
  text-align: center;
  margin-bottom: 6px;
}
.rl-cap i { color: #6b5bd2; margin-right: .35rem; }
.rl-video-wrap {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #111;
  border-radius: 10px;
  overflow: hidden;
}
.rl-video-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.rl-missing {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Google Sans', sans-serif;
  font-size: .85rem;
  color: #aaa;
  background: repeating-linear-gradient(45deg,#1a1a1a 0 12px,#222 12px 24px);
}
.rl-missing[hidden] { display: none; }

@media (max-width: 640px) {
  .rl-grid { grid-template-columns: 1fr; }
}
