:root {
  color-scheme: light;
  --ink: #111;
  --muted: #777;
  --line: #d9d9d9;
  --link: #0066cc;
  --green: #76b900;
  --blue: #3b76c5;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: Lato, Arial, Helvetica, sans-serif;
  font-size: 17px;
  line-height: 1.45;
  overflow-x: hidden;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.topnav {
  overflow: hidden;
  width: min(900px, 100%);
  margin: 0 auto;
}

.topnav::after {
  content: "";
  display: table;
  clear: both;
}

.topnav a {
  float: left;
  color: black;
  text-align: center;
  padding: 14px 16px;
  text-decoration: none;
  font-size: 18px;
}

.topnav a:hover {
  color: #f09228;
  text-decoration: none;
}

.topnav .nav-disabled {
  cursor: default;
}

.topnav .nav-disabled:hover {
  color: black;
}

main {
  width: min(865px, calc(100% - 36px));
  margin: 0 auto 64px;
}

.paper-header {
  text-align: center;
}

h1,
h2,
p,
figure {
  margin-top: 0;
}

h1 {
  max-width: 1000px;
  margin: 0 auto 18px;
  font-size: clamp(30px, 3.2vw, 42px);
  font-weight: 400;
  line-height: 1.12;
  overflow-wrap: break-word;
}

.title-line {
  display: block;
}

.paper-name {
  background: linear-gradient(90deg, var(--blue), var(--green));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-style: italic;
  font-weight: 700;
}

.authors {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px 14px;
  max-width: 820px;
  margin: 0 auto 12px;
  color: #075fb8;
  font-size: 16px;
  line-height: 1.35;
}

.authors span,
.affiliations span {
  flex: 0 0 auto;
}

.authors sup,
.affiliations sup {
  font-size: 0.72em;
}

.affiliations {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 18px;
  margin-bottom: 14px;
  font-size: 16px;
  line-height: 1.35;
}

.venue {
  margin-bottom: 20px;
  font-size: 20px;
  font-weight: 700;
}

.material-icons {
  display: inline-block;
  direction: ltr;
  font-family: "Material Icons";
  font-size: 21px;
  font-style: normal;
  font-feature-settings: "liga";
  font-weight: normal;
  letter-spacing: normal;
  line-height: 1;
  margin-right: 4px;
  text-transform: none;
  vertical-align: -5px;
  white-space: nowrap;
  word-wrap: normal;
  -webkit-font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
}

.paper-btn-parent {
  display: flex;
  flex-flow: row wrap;
  flex-wrap: wrap;
  justify-content: center;
  margin: 16px 0 42px;
}

.supp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1.5px solid #000;
  border-radius: 50px;
  color: #000 !important;
  cursor: pointer;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 1px;
  margin: 8px;
  padding: 8px;
  text-align: center;
  text-decoration: none;
  transition-duration: 0.2s;
  width: fit-content;
}

.supp-btn:hover {
  background-color: #000;
  color: #fff !important;
  text-decoration: none;
}

.supp-btn.is-disabled {
  cursor: default;
}

.supp-btn.is-disabled:hover {
  background: #fff;
  color: #000 !important;
}

.teaser figure {
  margin: 0 0 34px;
}

.teaser-frame,
.paper-figure img,
.project-video video {
  display: block;
  width: 100%;
}

.teaser-frame {
  overflow: hidden;
  border: 1px solid var(--line);
  background: #fff;
}

.teaser-frame img {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: -29%;
}

figcaption {
  margin-top: 14px;
  color: #8a8a8a;
  font-size: 16px;
  font-weight: 300;
  line-height: 1.35;
}

.section {
  padding: 22px 0 26px;
}

h2 {
  margin-bottom: 12px;
  padding-top: 2px;
  border-bottom: 1px solid var(--line);
  font-size: 28px;
  font-weight: 400;
  line-height: 1.25;
  text-align: center;
}

.project-video video {
  height: auto;
  background: #000;
  border: 1px solid var(--line);
}

.abstract p,
.paper-figure p,
.sample-gallery p {
  color: #333;
  text-align: justify;
}

.paper-figure img {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 16px;
  border: 1px solid var(--line);
}

.sample-gallery {
  width: min(1120px, calc(100vw - 36px));
  margin-left: 50%;
  transform: translateX(-50%);
}

.comparison-groups {
  display: grid;
  gap: 26px;
  margin-top: 18px;
}

.gallery-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 14px 0 18px;
}

.gallery-control-label {
  color: #333;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.gallery-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid #bdbdbd;
  border-radius: 50%;
  background: #fff;
  color: #333;
  font-size: 21px;
  line-height: 1;
  cursor: pointer;
}

.gallery-nav:hover,
.gallery-nav:focus-visible {
  border-color: #777;
  background: #f7f7f7;
  outline: none;
}

.gallery-position {
  min-width: 44px;
  color: #666;
  font-size: 14px;
  line-height: 1;
  text-align: center;
}

.gallery-dots {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.gallery-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #c9c9c9;
  cursor: pointer;
}

.gallery-dot[aria-current="true"] {
  background: var(--green);
}

.gallery-dot:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

.temporal-scenes,
.relighting-scenes,
.editing-scenes,
.ablation-scenes {
  margin-top: 14px;
}

.scene-controls {
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 10px;
  margin: 22px 0 0;
  padding: 14px 16px;
  border: 1px solid #222833;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(180deg, #20252c 0%, #15191f 100%);
  box-shadow: 0 14px 32px rgba(17, 24, 32, 0.12);
}

.scene-controls .gallery-control-label {
  margin-right: 4px;
  color: #b9ec67;
}

.scene-controls .gallery-nav {
  order: 3;
  width: 30px;
  height: 30px;
  margin-left: auto;
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 19px;
}

.scene-controls .gallery-nav:hover,
.scene-controls .gallery-nav:focus-visible {
  border-color: rgba(255, 255, 255, 0.68);
  background: rgba(255, 255, 255, 0.16);
}

.scene-controls .gallery-nav + .gallery-position + .gallery-nav {
  margin-left: 0;
}

.scene-controls .gallery-position {
  order: 4;
  min-width: 96px;
  color: #d5dbe2;
  font-size: 13px;
  text-align: left;
}

.scene-controls .gallery-dots {
  order: 2;
  gap: 8px;
}

.scene-controls .gallery-tab {
  width: auto;
  height: 32px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: #eef2f4;
  font-size: 14px;
  line-height: 1;
}

.scene-controls .gallery-tab[aria-current="true"] {
  border-color: var(--green);
  background: var(--green);
  color: #102000;
  font-weight: 700;
}

.temporal-scene {
  padding: 22px 18px 20px;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 8px 8px;
  background:
    linear-gradient(180deg, rgba(118, 185, 0, 0.035), rgba(255, 255, 255, 0) 160px),
    #fff;
  box-shadow: 0 10px 26px rgba(17, 24, 32, 0.08);
}

.temporal-scene-title {
  margin: 0 0 20px;
  padding-bottom: 13px;
  border-bottom: 1px solid #e3e3e3;
  color: #333;
  font-size: 23px;
  font-weight: 700;
  line-height: 1.25;
}

.temporal-models {
  display: grid;
  gap: 24px;
}

.temporal-model {
  min-width: 0;
  padding: 2px 0 0 14px;
  border-top: 1px solid #e8e8e8;
  border-left: 4px solid #cfcfcf;
}

.temporal-model h3 {
  margin: 0;
  color: #333;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.25;
}

.temporal-model-inverse {
  border-left-color: var(--blue);
}

.temporal-model-forward {
  border-left-color: var(--green);
}

.component-controls {
  width: 100%;
  max-width: 100%;
  justify-content: center;
  gap: 9px;
  margin: 12px 0 16px;
  padding: 7px 9px;
  border: 1px solid #dedede;
  border-radius: 7px;
  background: #f8f9fa;
}

.component-controls .gallery-control-label {
  min-width: auto;
  color: #5b6470;
  font-size: 11px;
  text-align: center;
}

.component-controls .gallery-nav {
  width: 28px;
  height: 28px;
  border-color: #c9c9c9;
  background: #fff;
  font-size: 19px;
}

.component-controls .gallery-position {
  min-width: 132px;
  text-align: center;
}

.component-controls .gallery-dots {
  gap: 6px;
  justify-content: center;
}

.component-controls .gallery-dot {
  width: 7px;
  height: 7px;
}

.component-controls-forward {
  width: 100%;
}

.component-controls-forward .gallery-dots {
  flex-wrap: wrap;
  justify-content: center;
  margin-left: 0;
}

.temporal-gallery .component-controls .gallery-position {
  min-width: 132px;
}

.temporal-gallery .scene-controls .gallery-position {
  min-width: 96px;
}

.editing-gallery .component-controls .gallery-position {
  min-width: 180px;
}

.ablation-gallery .component-controls .gallery-position {
  min-width: 118px;
}

.ablation-disable figcaption {
  color: #5f9f00;
  font-weight: 700;
}

.ablation-enable figcaption {
  color: #d71920;
  font-weight: 700;
}

.comparison-set {
  min-width: 0;
}

.comparison-set h3 {
  margin: 0 0 10px;
  color: #333;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
}

.comparison-grid {
  display: grid;
  gap: 10px;
}

.comparison-grid-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.comparison-grid-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.comparison-grid-four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.comparison-grid-five {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.sample-card {
  min-width: 0;
  margin: 0;
}

.sample-media {
  position: relative;
  overflow: hidden;
  line-height: 0;
}

.sample-card video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  background: #000;
  object-fit: cover;
}

.source-original video {
  object-position: left center;
}

.source-output video {
  object-position: right center;
}

.lighting-ball-overlay {
  position: absolute;
  right: 1px;
  bottom: 1px;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  width: clamp(40px, 25%, 96px);
  pointer-events: none;
}

.lighting-ball {
  display: block;
  width: 53%;
  height: auto;
  transform-origin: center;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35));
}

.lighting-ball-chrome {
  margin-left: -6%;
}

.sample-card figcaption {
  margin-top: 8px;
  color: #666;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.3;
  text-align: center;
}

pre {
  overflow-x: auto;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #f7f7f7;
  color: #111;
  font-size: 14px;
  line-height: 1.45;
}

code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

@media (max-width: 760px) {
  .topnav {
    display: grid;
    grid-template-columns: repeat(2, max-content);
    justify-content: center;
    align-items: center;
    gap: 0 10px;
    overflow: visible;
  }

  .topnav a {
    float: none;
    padding: 8px 6px;
    font-size: 14px;
  }

  .topnav a:first-child {
    grid-column: 1 / -1;
    justify-self: center;
    width: 116px;
  }

  .topnav a:first-child img {
    display: block;
    width: 100%;
  }

  main {
    width: min(362px, calc(100vw - 28px));
    max-width: calc(100vw - 28px);
    margin-left: 14px;
    margin-right: 14px;
  }

  h1 {
    max-width: 330px;
    font-size: clamp(24px, 6.4vw, 29px);
  }

  .authors {
    max-width: 320px;
    font-size: 15px;
    gap: 2px 12px;
  }

  .affiliations {
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
    font-size: 15px;
    gap: 4px 14px;
  }

  .paper-btn-parent {
    margin-bottom: 30px;
  }

  .abstract p,
  .paper-figure p,
  .sample-gallery p {
    text-align: left;
  }

  .sample-gallery {
    width: 100%;
    margin-left: 0;
    transform: none;
  }

  .comparison-groups {
    gap: 16px;
  }

  .gallery-controls {
    gap: 10px;
    margin: 12px 0 14px;
  }

  .scene-controls {
    gap: 9px;
    padding: 12px;
  }

  .scene-controls .gallery-control-label {
    width: 100%;
  }

  .scene-controls .gallery-dots {
    width: 100%;
  }

  .scene-controls .gallery-tab {
    flex: 1 1 110px;
    padding: 0 10px;
  }

  .scene-controls .gallery-nav {
    margin-left: 0;
  }

  .scene-controls .gallery-position {
    min-width: auto;
  }

  .temporal-scene {
    padding: 16px 12px 14px;
  }

  .temporal-scene-title {
    font-size: 18px;
  }

  .temporal-model {
    padding-left: 10px;
  }

  .component-controls {
    flex-wrap: wrap;
  }

  .component-controls .gallery-control-label {
    width: 100%;
    min-width: 0;
  }

  .temporal-gallery .component-controls .gallery-position {
    min-width: 118px;
    font-size: 13px;
  }

  .comparison-grid,
  .comparison-grid-two,
  .comparison-grid-three,
  .comparison-grid-four,
  .comparison-grid-five {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .comparison-set h3 {
    font-size: 17px;
  }
}
