 :root {
  --paper-bg: #f6f1e8;
  --paper-bg-alt: #fbf7ef;
  --paper-ink: #1f2937;
  --paper-navy: #14213d;
  --paper-navy-soft: #1f355c;
  --paper-gold: #d9a441;
  --paper-gold-soft: #ebc978;
  --paper-card: #fffaf2;
  --paper-border: #dccfb8;
  --paper-copy: #5b6472;
}

body {
  font-family: 'Noto Sans', sans-serif;
  background: var(--paper-bg);
  color: var(--paper-ink);
}

body.has-scrolled .paper-navbar {
  background: rgba(20, 33, 61, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 16px 42px rgba(10, 19, 37, 0.24);
}

html {
  scroll-behavior: smooth;
}

#paper-home,
#paper-video,
#abstract,
#method,
#bibtex {
  scroll-margin-top: 5.5rem;
}

.paper-hero {
  position: relative;
  background:
    linear-gradient(135deg, rgba(10, 18, 35, 0.68) 0%, rgba(20, 33, 61, 0.56) 42%, rgba(33, 52, 89, 0.42) 100%),
    url('../../media/hero/teaser/teaser.pdf.png') center center / cover no-repeat;
  color: #fff;
  background-color: var(--paper-navy);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(7, 12, 24, 0.52) 0%, rgba(12, 20, 38, 0.74) 100%),
    radial-gradient(circle at center, rgba(217, 164, 65, 0.08) 0%, rgba(10, 16, 28, 0.28) 100%);
}

.paper-hero .hero-head,
.paper-hero .hero-body {
  position: relative;
  z-index: 1;
}

.paper-hero .hero-head {
  z-index: 4;
}

.paper-hero .navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  background: transparent;
  transition: background-color 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.paper-hero .navbar-item,
.paper-hero .navbar-link,
.paper-hero .brand-text {
  color: #fff;
}

.paper-hero .navbar-item {
  position: relative;
  font-weight: 600;
  opacity: 0.86;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.paper-hero .navbar-item:hover,
.paper-hero .navbar-item.is-active {
  opacity: 1;
  color: #fff;
}

.paper-hero a.navbar-item:hover,
.paper-hero a.navbar-item:focus,
.paper-hero .navbar-link:hover,
.paper-hero .navbar-link:focus {
  background-color: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.paper-hero .navbar-item.is-active::after {
  content: "";
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 0.55rem;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--paper-gold-soft) 0%, var(--paper-gold) 100%);
}

.brand-text {
  position: relative;
  display: inline-flex;
  align-items: center;
  font-family: 'Google Sans', sans-serif;
  font-weight: 700;
  letter-spacing: 0.01em;
  margin-left: 0.2rem;
  padding-right: 1.35rem;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.brand-text::after {
  content: "";
  position: absolute;
  top: 0.6rem;
  right: 0.72rem;
  width: 1px;
  height: calc(100% - 1.2rem);
  background: rgba(255, 255, 255, 0.2);
}

.paper-hero a.brand-text:hover,
.paper-hero a.brand-text:focus {
  background: transparent;
  color: #fff;
}

.paper-hero .navbar-burger {
  color: #fff;
}

.hero-copy {
  max-width: 900px;
}

.hero-title-panel {
  display: block;
  max-width: min(100%, 860px);
  margin: 0 auto;
  padding: 2.4rem 2.5rem 2.15rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(15, 24, 45, 0.62) 0%, rgba(15, 24, 45, 0.42) 100%);
  box-shadow: 0 30px 60px rgba(7, 14, 28, 0.3);
  backdrop-filter: blur(10px);
}

.hero-title {
  font-size: clamp(3rem, 6.5vw, 5.6rem);
  line-height: 1.02;
  margin-bottom: 1rem !important;
  color: #fff;
  font-weight: 800;
  text-shadow: 0 6px 22px rgba(0, 0, 0, 0.44), 0 2px 6px rgba(0, 0, 0, 0.32);
}

.hero-subtitle {
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.42;
  color: rgba(255, 255, 255, 0.95);
  max-width: 940px;
  margin: 0.55rem auto 1.2rem;
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.46);
}

.hero-summary {
  max-width: 760px;
  margin: 0 auto;
  font-size: 1.06rem;
  line-height: 1.9;
  color: rgba(255, 255, 255, 0.86);
}

.hero-rainbow-fill {
  display: inline-block;
  font-weight: 800;
  background-image: linear-gradient(90deg, #f7e6b5 0%, var(--paper-gold-soft) 35%, var(--paper-gold) 100%);
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.34);
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.24));
}

.hero-rainbow-fill-alt {
  background-image: linear-gradient(90deg, #fff1c8 0%, #e7c46f 45%, #c8942f 100%);
}

.hero-scroll {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  padding: 0.75rem 1.1rem;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.paper-links {
  margin-top: 1.35rem;
}

.publication-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
}

.paper-link-primary,
.paper-link-muted {
  min-width: 196px;
  border-width: 1px;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.paper-link-primary {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--paper-navy-soft) 0%, var(--paper-navy) 100%);
  box-shadow: 0 14px 28px rgba(20, 33, 61, 0.22);
}

.paper-link-primary:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(20, 33, 61, 0.28);
}

.paper-link-muted {
  color: var(--paper-navy);
  border-color: var(--paper-border);
  background: rgba(255, 250, 242, 0.96);
}

.paper-link-muted:hover {
  color: var(--paper-navy);
  border-color: var(--paper-gold-soft);
  background: #fff;
}

.hero-scroll:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.7);
}

.section-alt {
  background: var(--paper-bg-alt);
}

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

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

.placeholder-note {
  margin-top: 1rem;
  color: #6b7280;
}

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

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

.paper-author-list,
.publication-affiliations {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem 0.65rem;
}

.contribution-note {
  margin-top: 0.75rem;
  color: #6b7280;
}

.publication-authors a {
  color: hsl(121, 100%, 36%) !important;
}

.conference-authors a {
  color: hsl(0, 0%, 16%) !important;
}

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

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

.video-card,
.figure-card,
.pdf-card {
  background: rgba(255, 250, 242, 0.94);
  border: 1px solid var(--paper-border);
  border-radius: 18px;
  padding: 1rem;
  box-shadow: 0 14px 36px rgba(20, 33, 61, 0.08);
}

.large-video-card {
  padding: 1rem;
}

.paper-video-element {
  display: block;
  width: 100%;
  border-radius: 12px;
  background: #000;
}

.paper-video-element-portrait {
  aspect-ratio: 9 / 16;
  object-fit: cover;
}

.paper-figure {
  display: block;
  width: 100%;
  border-radius: 12px;
}

.video-label {
  margin-top: 0.9rem;
  margin-bottom: 0;
  font-weight: 600;
  color: #374151;
}

.media-grid {
  margin-top: 1rem;
}

.pending-video-grid {
  margin-top: 1.5rem;
}

.pending-video-card {
  height: 100%;
}

.video-placeholder-panel {
  min-height: 180px;
}

.video-section-note {
  margin-top: 1.1rem;
  color: #5f6775;
}

.visualization-lead {
  max-width: 820px;
  margin: 0 auto 2rem;
  color: #5f6775;
  line-height: 1.8;
}

.media-group-block {
  margin-top: 3rem;
  padding-top: 2.2rem;
  border-top: 1px solid rgba(220, 207, 184, 0.72);
}

.media-group-block-featured {
  margin-top: 2.4rem;
  padding: 2rem 1.5rem 0;
  border-top: 0;
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(255, 252, 246, 0.94) 0%, rgba(246, 241, 232, 0.82) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.media-group-block:first-of-type {
  margin-top: 2rem;
}

.media-group-head {
  max-width: 860px;
  margin: 0 auto 1.25rem;
}

.media-group-head-compact,
.media-group-head-split {
  margin-bottom: 1.2rem;
}

.media-group-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  margin-bottom: 0.9rem;
  border-radius: 999px;
  background: var(--paper-navy);
  color: #fff;
  font-family: 'Google Sans', sans-serif;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.media-group-kicker {
  margin-bottom: 0.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--paper-gold);
}

.media-group-title {
  margin-bottom: 0.65rem !important;
}

.media-group-copy {
  color: var(--paper-copy);
  line-height: 1.8;
}

.visual-media-grid {
  margin-top: 1.5rem;
}

.visual-media-grid-five {
  flex-wrap: nowrap;
}

.visual-media-grid-four {
  flex-wrap: nowrap;
  align-items: flex-start;
}

.visual-media-grid-four-compact {
  flex-wrap: nowrap;
}

.media-slot-card {
  height: 100%;
  padding: 1rem;
  text-align: left;
}

.media-slot-card-compact {
  padding: 0.55rem;
}

.media-slot-card-wide {
  padding: 1.1rem;
}

.spatial-task-card {
  padding: 0.95rem 0.95rem 0.45rem;
}

.media-slot-card-portrait {
  height: 100%;
}

.media-five-column {
  flex: none;
  width: 20%;
}

.media-four-column {
  flex: none;
  width: 25%;
}

.media-slot-frame {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  border: 1px dashed rgba(217, 164, 65, 0.4);
  background:
    radial-gradient(circle at top left, rgba(217, 164, 65, 0.16), transparent 30%),
    linear-gradient(135deg, rgba(255, 252, 246, 0.98) 0%, rgba(244, 238, 226, 0.98) 100%);
  overflow: hidden;
}

.media-slot-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(217, 164, 65, 0.08) 1px, transparent 1px), linear-gradient(90deg, rgba(217, 164, 65, 0.08) 1px, transparent 1px);
  background-size: 24px 24px;
}

.media-slot-frame-heatmap {
  background:
    radial-gradient(circle at 20% 18%, rgba(232, 97, 80, 0.22), transparent 20%),
    radial-gradient(circle at 78% 30%, rgba(242, 173, 48, 0.2), transparent 18%),
    radial-gradient(circle at 52% 68%, rgba(49, 114, 176, 0.2), transparent 22%),
    linear-gradient(135deg, rgba(251, 248, 242, 0.98) 0%, rgba(239, 232, 220, 0.98) 100%);
}

.media-slot-frame-portrait {
  aspect-ratio: 9 / 16;
  background:
    radial-gradient(circle at top left, rgba(63, 98, 156, 0.2), transparent 28%),
    linear-gradient(180deg, rgba(247, 242, 233, 0.98) 0%, rgba(233, 227, 216, 0.98) 100%);
}

.media-slot-chip {
  position: relative;
  z-index: 1;
  padding: 0.6rem 0.9rem;
  border-radius: 999px;
  background: rgba(20, 33, 61, 0.88);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.media-slot-title {
  margin: 0.95rem 0 0.35rem;
  font-family: 'Google Sans', sans-serif;
  font-size: 1.02rem;
  font-weight: 700;
  color: #24324c;
}

.media-slot-copy {
  margin: 0;
  color: #5f6775;
  line-height: 1.7;
}

.primitive-figure {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: inherit;
  object-fit: cover;
  background: #fff;
}

.primitive-item {
  text-align: center;
}

.primitive-card {
  padding: 0;
  overflow: hidden;
}

.primitive-label {
  margin: 0.75rem 0 0;
  font-family: 'Castoro', serif;
  font-size: 1.05rem;
  line-height: 1.3;
  color: #24324c;
  text-align: center;
}

.heatmap-slot-card {
  background: rgba(255, 252, 246, 0.96);
}

.media-heatmap-image {
  display: block;
  width: 100%;
  border-radius: 12px;
}

.mixed-media-row {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 0.72fr);
  width: 100%;
  max-width: 100%;
  gap: 1.1rem;
  align-items: stretch;
  overflow: hidden;
}

.mixed-media-primary,
.mixed-media-secondary {
  min-width: 0;
}

.long-horizon-card {
  max-width: 880px;
  margin: 0 auto;
}

.critic-primitives-row {
  display: grid;
  grid-template-columns: minmax(190px, 0.56fr) minmax(0, 1.44fr);
  gap: 1.4rem;
  align-items: stretch;
}

.critic-column,
.primitives-column {
  min-width: 0;
  display: flex;
}

.critic-column {
  justify-content: center;
}

.primitives-column {
  padding-left: 1.4rem;
  border-left: 1px solid rgba(220, 207, 184, 0.95);
}

.primitive-grid-inline {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem 0.9rem;
  align-content: stretch;
  grid-auto-rows: 1fr;
  height: 100%;
  margin-top: 0;
}

.primitive-grid-cell {
  min-width: 0;
  display: flex;
}

.bibtex-empty-card {
  min-height: 180px;
}

.bibtex-card {
  padding: 0;
  overflow: hidden;
}

.bibtex-block {
  margin: 0;
  padding: 1.4rem 1.5rem;
  border: 0;
  border-radius: 18px;
  background: transparent;
  color: #24324c;
  font-size: 0.96rem;
  line-height: 1.7;
  text-align: left;
  white-space: pre-wrap;
  word-break: break-word;
}

.mixed-media-column {
  display: flex;
  height: 100%;
  flex-direction: column;
  width: 100%;
}

.mixed-media-title {
  margin: 0 0 0.75rem;
  font-family: 'Castoro', serif;
  font-size: 1.08rem;
  line-height: 1.3;
  color: #24324c;
  text-align: center;
}

.media-group-head-split + .mixed-media-title {
  display: none;
}

.mixed-media-copy {
  margin: 0 0 0.85rem;
  text-align: center;
}

.mixed-media-card {
  flex: 1;
}

.mixed-media-card-horizontal,
.mixed-media-card-portrait {
  display: flex;
  align-items: center;
  justify-content: center;
}

.mixed-media-card-portrait {
  height: 100%;
  max-width: 220px;
  margin: 0 auto;
}

.critic-column .mixed-media-card-portrait {
  padding: 0.35rem;
}

.mixed-media-video-horizontal {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.mixed-media-primary .paper-video-element,
.mixed-media-secondary .paper-video-element-portrait {
  width: 100%;
}

.critic-column .paper-video-element-portrait {
  display: block;
  width: auto;
  max-width: 100%;
  height: 100%;
  margin: 0 auto;
  aspect-ratio: 9 / 16;
  object-fit: cover;
}

.primitives-column .primitive-item {
  display: flex;
  width: 100%;
  height: 100%;
  flex-direction: column;
}

.primitives-column .primitive-card {
  flex: 1;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.primitives-column .media-slot-card,
.primitives-column .media-slot-card-compact {
  padding: 0;
}

.primitives-column .primitive-figure {
  border-radius: 0;
}

.primitives-column .primitive-label {
  margin-top: 0.5rem;
}

.heatmap-row {
  margin-top: 0.6rem;
}

.abstract-copy p {
  font-size: 1.05rem;
  line-height: 1.9;
}

.placeholder-panel {
  display: flex;
  min-height: 240px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.5rem;
  border: 1px dashed #c9bea9;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 252, 245, 0.98) 0%, rgba(248, 244, 235, 0.98) 100%);
}

.placeholder-title {
  margin-bottom: 0.65rem;
  font-family: 'Google Sans', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: #24324c;
}

.pdf-frame {
  width: 100%;
  min-height: 780px;
  border: 0;
  border-radius: 12px;
  background: #fff;
}

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

.interpolation-panel {
  background: #f5f5f5;
  border-radius: 10px;
}

.interpolation-panel .interpolation-image {
  width: 100vh;
  background-size: cover;
  border-radius: 5px;
}

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

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

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

#interpolation-image img {
  padding: 0;
  display: block;
  margin: 0 auto;
  max-height: 100%;
  max-width: 100%;
}

.dropdown-item {
  white-space: pre-wrap;
}

.justify {
  text-align: justify;
}

@media screen and (max-width: 1023px) {
  .paper-hero .navbar-menu {
    background: rgba(7, 13, 24, 0.9);
  }
}

@media screen and (max-width: 768px) {
  .hero-title {
    font-size: 2.75rem;
  }

  .hero-subtitle {
    font-size: 1.2rem;
  }

  .hero-summary {
    font-size: 0.94rem;
  }

  .paper-hero .navbar-item.is-active::after {
    display: none;
  }

  .pdf-frame {
    min-height: 480px;
  }

  .video-card,
  .pdf-card {
    padding: 0.75rem;
  }

  .media-group-block {
    margin-top: 2.25rem;
    padding-top: 1.6rem;
  }

  .hero-title-panel {
    width: 100%;
    padding: 1.5rem 1.1rem;
    border-radius: 20px;
  }

  .publication-links {
    gap: 0.7rem;
  }

  .paper-link-primary,
  .paper-link-muted {
    min-width: min(100%, 240px);
  }

  .media-group-block-featured {
    padding: 1.45rem 0.9rem 0;
  }

  .visual-media-grid-five,
  .visual-media-grid-four,
  .visual-media-grid-four-compact {
    flex-wrap: wrap;
  }

  .media-five-column {
    width: 50%;
  }

  .media-four-column {
    width: 50%;
  }

  .media-slot-card,
  .media-slot-card-wide {
    padding: 0.8rem;
  }

  .media-slot-card-compact {
    padding: 0.55rem;
  }

  .media-slot-frame-portrait {
    aspect-ratio: 16 / 9;
  }

  .mixed-media-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .mixed-media-secondary {
    margin-top: 1rem;
  }

  .critic-primitives-row {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .primitives-column {
    display: block;
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid rgba(201, 190, 169, 0.9);
    padding-top: 1rem;
  }

  .primitive-grid-inline {
    gap: 0.8rem;
  }

  .mixed-media-card-portrait {
    max-width: 240px;
  }

  .media-slot-chip {
    font-size: 0.72rem;
  }
}
