/* Project page extensions on top of style.css */

:root {
  --bg: #ffffff;
  --bg-alt: #f3f4f6;
  --border: #d8dde3;
  --text: #111;
  --text-muted: #5b6470;
  --accent: #1367a7;
  --accent-strong: #0e5187;
}

/* Template-inspired styling */
html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  font-weight: 300;
  font-size: 18px;
  color: var(--text);
  background: var(--bg);
}

main {
  display: block;
  margin: 0;
  padding: 0;
}

/* ============================================================
   BUTTONS (Paper / Supplementary / Code)
============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.4rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1;
  color: #fff;
  background: #1f242c;
  border: 1px solid #1f242c;
  border-radius: 999px;
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
}

.btn:link,
.btn:visited {
  color: #fff;
  text-decoration: none;
}

.btn:hover,
.btn:focus-visible {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(19, 103, 167, 0.18);
  text-decoration: none;
}

.btn:active {
  transform: translateY(0);
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  box-shadow: none;
}

/* Section spacing */
.section {
  padding: 2.5rem 1.5rem 0;
}

/* Section title styling */
.section h1 {
  text-align: center;
  border-bottom: none;
  padding-bottom: 0;
  font-family: "Inter", sans-serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: #111;
  margin: 0 auto 0.7rem;
  max-width: 1100px;
  line-height: 1.3;
}

.section h2 {
  text-align: left;
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 1.5rem;
  font-weight: 300;
  margin: 0.4em auto 0.4em;
  font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  font-size: 1.4rem;
}

.subsection {
  text-align: left;
  font-weight: 300;
  font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  font-size: 1.15rem;
  margin: 2rem auto 0.5rem;
  max-width: 1100px;
  color: #000;
}
============================================================ */
a:link, a:visited {
  color: #1367a7;
  text-decoration: none;
}

a:hover {
  color: #208799;
}

/* Disclaimer box */
.disclaimerbox {
  background-color: #eee;
  border: 1px solid #eeeeee;
  border-radius: 10px;
  -moz-border-radius: 10px;
  -webkit-border-radius: 10px;
  padding: 20px;
}

/* Rounded images and videos */
video.header-vid {
  height: 140px;
}

img.header-img {
  height: 140px;
}

img.rounded {
}

/* Layered paper effect (big version) */
.layered-paper-big {
  box-shadow:
    0px 0px 1px 1px rgba(0, 0, 0, 0.35),
    5px 5px 0 0px #fff,
    5px 5px 1px 1px rgba(0, 0, 0, 0.35),
    10px 10px 0 0px #fff,
    10px 10px 1px 1px rgba(0, 0, 0, 0.35),
    15px 15px 0 0px #fff,
    15px 15px 1px 1px rgba(0, 0, 0, 0.35),
    20px 20px 0 0px #fff,
    20px 20px 1px 1px rgba(0, 0, 0, 0.35),
    25px 25px 0 0px #fff,
    25px 25px 1px 1px rgba(0, 0, 0, 0.35);
  margin-left: 10px;
  margin-right: 45px;
}

/* Layered paper effect */
.layered-paper {
  box-shadow:
    0px 0px 1px 1px rgba(0, 0, 0, 0.35),
    5px 5px 0 0px #fff,
    5px 5px 1px 1px rgba(0, 0, 0, 0.35),
    10px 10px 0 0px #fff,
    10px 10px 1px 1px rgba(0, 0, 0, 0.35);
  margin-top: 5px;
  margin-left: 10px;
  margin-right: 30px;
  margin-bottom: 5px;
}

/* Vertical center helper */
.vert-cent {
  position: relative;
  top: 50%;
  transform: translateY(-50%);
}

/* HR styling */
hr {
  margin: 0;
  border: 0;
  height: 1.5px;
  background-image: linear-gradient(to right, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0));
}

/* Rotate utility */
.rotate {
  -moz-transform: rotate(-90.0deg);
  -o-transform: rotate(-90.0deg);
  -webkit-transform: rotate(-90.0deg);
  filter: progid: DXImageTransform.Microsoft.BasicImage(rotation=0.083);
  -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=0.083)";
  transform: rotate(-90.0deg);
}

c {
  white-space: nowrap;
  writing-mode: tb-rl;
  transform: rotate(-180.0deg);
}

/* ============================================================
   HERO
============================================================ */
.project-hero {
  background: #080d1a;
  padding: 0;
  margin: 0;
  text-align: left;
  position: relative;
  display: flow-root;
}

.hero-inner {
  position: relative;
  z-index: 1;
}

.hero-wave {
  line-height: 0;
  margin-top: -10px;
  position: relative;
  z-index: 2;
}

.hero-wave svg {
  display: block;
  width: 100%;
  height: 60px;
}

.project-title {
  font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  font-size: 2.625rem;
  font-weight: 300;
  line-height: 1.25;
  margin: 0.4em auto 0.6em;
  max-width: 980px;
  color: #000;
}

.project-authors {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 0.4rem 1.4rem;
  font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  font-size: 1.25rem;
  font-weight: 300;
  line-height: 1.5;
  color: #000;
  max-width: 980px;
  margin: 0 auto 0.5rem;
}

.project-authors .author {
  white-space: nowrap;
}

.project-authors sup {
  vertical-align: baseline;
  position: relative;
  top: -0.45em;
  font-size: 0.75em;
  line-height: 0;
}

.project-authors a {
  color: #000;
  text-decoration: none;
}

.project-authors a:hover { 
  color: #208799; 
  text-decoration: none; 
}

.equal-note {
  font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  font-size: 0.95rem;
  font-weight: 300;
  font-style: italic;
  color: var(--text-muted);
  text-align: center;
  margin: 0.15rem auto 0.8rem;
  text-decoration: none;
}

.project-affiliations {
  font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--text-muted);
  text-align: center;
  margin: 0 auto 0.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.2rem 1.5rem;
}

.project-affiliations span {
  white-space: nowrap;
}

.project-venue {
  font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  font-size: 1.25rem;
  font-weight: 300;
  text-align: center;
  color: #000;
  margin: 0.4rem auto 0.6rem;
}

/* Inline anchor link row (jump nav) */
.anchor-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
  margin: 1rem auto 1.4rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #eee;
  max-width: 1100px;
}

.anchor-nav a {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
}

.anchor-nav a:hover { color: var(--accent); text-decoration: none; }

/* Button row */
.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: center;
  margin-top: 0.4rem;
  margin-bottom: 2rem;
  font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
}

/* ============================================================
   FIGURES
============================================================ */
.teaser,
.full-figure {
  max-width: 1100px;
  margin: 1.25rem auto 0;
}

.teaser img,
.full-figure img,
.full-figure video {
  width: 100%;
  height: auto;
  max-height: 75vh;
  object-fit: contain;
  display: block;
  background: var(--bg-alt);
  min-height: 220px; /* keeps layout stable while images are blank */
}

@media (max-width: 700px) {
  .teaser img,
  .full-figure img,
  .full-figure video { min-height: 0; }
}

.teaser figcaption,
.full-figure figcaption {
  font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  font-size: 0.85rem;
  color: #333;
  margin-top: 0.7rem;
  line-height: 1.55;
  text-align: center;
}

figcaption strong,
p strong {
  font-family: "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  font-weight: 600;
}

.figure-row {
  display: flex;
  gap: 1rem;
  margin-top: 1.25rem;
}

.figure-row figure {
  flex: 1;
  margin: 0;
}

.figure-row img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
  background: var(--bg-alt);
  min-height: 180px;
}

/* Two-column row: text on the left, figure/video on the right.
   Used by the Experimental Prototype section. */
.prototype-row {
  max-width: 1100px;
  margin: 1.25rem auto 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.75rem;
  align-items: center;
}

.prototype-row .prototype-text {
  min-width: 0;
}

.prototype-row .prototype-text .project-text {
  max-width: none;
  margin: 0;
}

.prototype-row .prototype-figure {
  margin: 0;
  min-width: 0;
}

.prototype-row .prototype-figure video,
.prototype-row .prototype-figure img {
  width: 100%;
  height: auto;
  max-height: 75vh;
  object-fit: contain;
  display: block;
  background: var(--bg-alt);
}

.prototype-row .prototype-figure figcaption {
  font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  font-size: 0.85rem;
  color: #333;
  margin-top: 0.7rem;
  line-height: 1.55;
  text-align: center;
}

@media (max-width: 820px) {
  .prototype-row {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

@media (max-width: 700px) {
  .figure-row img { min-height: 0; }
}

.figure-row figcaption {
  font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  font-size: 0.82rem;
  color: #333;
  margin-top: 0.5rem;
  line-height: 1.5;
  text-align: center;
}

@media (max-width: 700px) {
  .figure-row { flex-direction: column; }
}

/* TL;DR bullet list */
.tldr-list {
  list-style: disc;
  padding-left: 1.4rem;
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.tldr-list li {
  font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  font-size: 18px;
  font-weight: 300;
  line-height: 1.7;
  color: #000;
  text-align: justify;
  text-align-last: left;
  hyphens: auto;
}

/* Intro video in hero, right under the button row */
.intro-video {
  max-width: 1100px;
  margin: 1.5rem auto 0;
  text-align: center;
}

.intro-video video {
  max-width: 100%;
  height: auto;
  display: inline-block;
  background: var(--bg-alt);
}

/* Pose explorer: scene tabs + per-scene pose thumbnails */
.pose-explorer {
  max-width: 1100px;
  margin: 1.5rem auto 0;
  padding: 1.25rem 1.25rem 1.5rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.pose-scene-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.pose-scene-tab {
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.5rem 1.15rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.pose-scene-tab:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.pose-scene-tab.is-active {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 2px 6px rgba(19, 103, 167, 0.25);
}

.pose-viewer {
  margin: 0 auto;
  text-align: center;
}

.pose-viewer-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  align-items: start;
}

.pose-viewer-row figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.pose-viewer-row img {
  width: 100%;
  aspect-ratio: 16 / 10;
  height: auto;
  background: var(--bg);
  display: block;
}

.pose-viewer-row figure:nth-child(-n+2) img {
  object-fit: contain;
  padding: 0.35rem;
}

.pose-viewer-row figure:nth-child(3) img {
  object-fit: cover;
  object-position: center;
}

.pose-viewer-row figcaption {
  font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  padding: 0.55rem 0.5rem 0.35rem;
  text-align: center;
  border-top: 1px solid var(--border);
  background: #fafbfc;
  order: 2;
}

.pose-viewer-row img.pose-legend {
  width: auto;
  height: auto;
  max-width: 92%;
  max-height: 56px;
  aspect-ratio: auto;
  margin: 0.5rem auto 0.7rem;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  display: block;
  object-fit: contain;
  order: 3;
}

@media (max-width: 700px) {
  .pose-viewer-row img.pose-legend { max-height: 44px; }
}

.pose-viewer-cap {
  font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text);
  margin: 1rem 0 0;
  text-align: center;
}

@media (max-width: 700px) {
  .pose-viewer-row { grid-template-columns: 1fr; gap: 0.75rem; }
}

.pose-thumbs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
  margin-top: 1.1rem;
}

.pose-dot {
  padding: 0;
  width: 11px;
  height: 11px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--bg);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.pose-dot:hover {
  border-color: var(--accent);
  background: #eaf2f9;
}

.pose-dot.is-active {
  background: var(--accent);
  border-color: var(--accent);
  transform: scale(1.2);
}

/* ============================================================
   BODY TEXT
============================================================ */
.project-text {
  font-family: "Inter", sans-serif;
  font-size: 0.98rem;
  font-weight: 300;
  color: #555;
  line-height: 1.65;
  max-width: 1100px;
  margin: 0 auto;
}

.subsection {
  font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  font-size: 1.15rem;
  font-weight: 300;
  margin: 2rem auto 0.5rem;
  max-width: 1100px;
  color: #000;
}

/* ============================================================
   RESULTS PLOTS (4-up F1 vs CD)
============================================================ */
.results-plots {
  max-width: 1100px;
  margin: 1.25rem auto 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  align-items: stretch;
}

.results-plots figure {
  margin: 0;
}

.results-plots img {
  width: 100%;
  height: auto;
  display: block;
  background: var(--bg);
}

/* ── Quantitative results table ── */
.quant-table-wrap {
  overflow-x: auto;
  margin: 1.5rem auto 0;
  max-width: 1100px;
}

.quant-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  text-align: center;
}

.quant-table th,
.quant-table td {
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--border);
  white-space: nowrap;
}

.quant-table thead th {
  background: var(--bg-alt);
  color: var(--text);
  font-weight: 600;
}

.quant-table .col-group-header {
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  border-color: var(--accent-strong);
}

.quant-table .col-method {
  text-align: left;
  background: var(--bg-alt);
  min-width: 160px;
}

.quant-table td.col-method,
.quant-table tbody td:first-child {
  text-align: left;
}

.quant-table .section-divider td {
  background: var(--bg-alt);
  font-weight: 600;
  color: var(--text-muted);
  text-align: left;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.3rem 0.6rem;
  border-top: 2px solid var(--border);
}

.quant-table .row-ours td {
  background: #eef4fb;
  font-weight: 500;
}

.quant-table .row-ours td:first-child {
  color: var(--accent-strong);
  font-weight: 600;
}

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

.quant-table .row-ours:hover td {
  background: #ddeaf7;
}

.results-plots-cap {
  font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  font-size: 0.85rem;
  color: #333;
  margin: 0.75rem auto 0;
  max-width: 1100px;
  line-height: 1.55;
  text-align: center;
}

/* ============================================================
   BIBTEX BLOCK
============================================================ */
pre.bibtex {
  background: #f0f3f8;
  color: #1a2535;
  border: 1px solid #dde3ec;
  padding: 1.2rem 1.4rem;
  border-radius: 12px;
  overflow-x: auto;
  font-size: 0.82rem;
  line-height: 1.6;
  font-family: 'SFMono-Regular', Menlo, Consolas, monospace;
  max-width: 1100px;
  margin: 0 auto;
}

pre.bibtex code { font-family: inherit; }

/* Make the nav-name clickable like a link without underline */
a.nav-name { color: var(--text); }
a.nav-name:hover { color: var(--accent); text-decoration: none; }

/* Additional heading and paragraph styling for template */
.container p {
  font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  font-weight: 300;
}

.container h3 {
  font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  font-weight: 300;
}

/* ============================================================
   RESULTS EXPLORER — 3-column layout with interactive zoom
============================================================ */
.res-explorer {
  max-width: 1100px;
  margin: 1.5rem auto 0;
  padding: 1.25rem 1.25rem 1.5rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.res-scene-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.res-scene-tab {
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.5rem 1.15rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.15s, background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.res-scene-tab:hover  { color: var(--accent); border-color: var(--accent); }
.res-scene-tab.is-active {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 2px 6px rgba(19,103,167,0.25);
}

/* All 3 columns stretch to the same height */
.res-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  align-items: stretch;
}

/* Left column: Camera + RA stacked, each taking equal height */
.res-col {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.res-col > .res-cell {
  flex: 1;
  min-height: 0;
}

/* Image in left-column cells fills the available cell height */
.res-col > .res-cell > .res-img {
  flex: 1 1 0%;
  min-height: 0;
  height: 0;          /* flex controls height, not natural size */
  aspect-ratio: unset;
  object-fit: contain;
}

/* Pair column: one card, label → fan image → zoom ring */
.res-pair {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.res-cell {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.res-label {
  font-family: "HelveticaNeue-Light","Helvetica Neue Light","Helvetica Neue",Helvetica,Arial,sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  color: #3066a2;
  text-align: center;
  padding: 0.4rem 0.5rem;
  border-bottom: 1px solid var(--border);
  background: #fafbfc;
  white-space: nowrap;
  flex-shrink: 0;
}

.res-img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #fff;
}

/* Fan image + draggable circle overlay */
.res-panel-wrap {
  position: relative;
  width: 100%;
  flex-shrink: 0;    /* keep natural 16:9 height; don't stretch */
  z-index: 1;        /* stay above the zoom-area flex sibling below */
}

.res-panel-wrap .res-img {
  display: block;
  width: 100%;
  height: auto;
}

.res-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  cursor: crosshair;
  touch-action: none;
}

/* Zoom area fills remaining vertical space in the pair card */
.res-zoom-area {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 0.5rem;
}

.res-zoom-ring {
  width: 54%;
  max-width: 170px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid #377E22;
  background: #fff;
}

.res-zoom-ring canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Connector SVG overlay (absolute, spans full card) */
.res-connector {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  overflow: visible;
  z-index: 5;
}

.res-conn-line {
  stroke: #377E22;
  stroke-width: 1.8;
  stroke-dasharray: 6 4;
  stroke-opacity: 0.65;
  fill: none;
}

.res-conn-ring {
  fill: none;
  stroke: #377E22;
}

.fan-annot-svg {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}

.res-img-box {
  position: relative;
  flex: 1 1 0%;
  min-height: 0;
}

.res-col > .res-cell > .res-img-box > .res-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ── Legend: one centred row matching the video colours ── */
.res-legend-box {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.3rem 0.85rem;
  margin-top: 1rem;
  padding: 0.5rem 1.1rem;
  background: #ECECEC;
  border: 1px solid #b9c0cf;
  border-radius: 8px;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

.leg-item {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  white-space: nowrap;
}

.leg-mark {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  overflow: visible;
}

.leg-mark-wide {
  width: 24px;
  height: 15px;
  flex-shrink: 0;
  overflow: visible;
}

.leg-txt {
  font-family: "HelveticaNeue-Light","Helvetica Neue Light","Helvetica Neue",Helvetica,Arial,sans-serif;
  font-size: 0.76rem;
  color: #333;
}

.leg-sep {
  width: 1px;
  height: 1.1em;
  background: #b9c0cf;
  margin: 0 0.1rem;
  flex-shrink: 0;
}

.leg-cbar-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
}

.leg-cbar {
  width: 70px;
  height: 9px;
  background: linear-gradient(to right, #0a0000, #cc1100, #ff6a00, #ffd400, #ffffff);
  border: 1px solid #999;
  border-radius: 1px;
  display: inline-block;
  flex-shrink: 0;
}

.leg-cbar-label {
  font-family: "HelveticaNeue-Light","Helvetica Neue Light","Helvetica Neue",Helvetica,Arial,sans-serif;
  font-size: 0.68rem;
  color: #5F5F5F;
}

/* Pose dots */
.res-dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
  margin-top: 1rem;
}

.res-dot {
  padding: 0;
  width: 11px;
  height: 11px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--bg);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

.res-dot:hover     { border-color: var(--accent); background: #eaf2f9; }
.res-dot.is-active { background: var(--accent); border-color: var(--accent); transform: scale(1.2); }

.res-cap {
  display: none;
}

@media (max-width: 700px) {
  .res-grid { grid-template-columns: 1fr; }
  .res-zoom-ring { width: 50%; max-width: 140px; }
}

/* ============================================================
   DARK HERO LAYOUT
============================================================ */

.hero-inner {
  display: grid;
  grid-template-columns: 4fr 6fr;
  width: 100%;
  min-height: calc(60vw * 948 / 2368);
  align-items: stretch;
}

.hero-text {
  padding: 2rem 2.5rem 2rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.25rem;
}

.hero-label {
  font-family: "Inter", sans-serif;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #4dc8d8;
  margin: 0;
}

.hero-tagline {
  font-family: "Inter", sans-serif;
  font-size: 2.6rem;
  font-weight: 700;
  line-height: 1.15;
  color: #fff;
  margin: 0;
  letter-spacing: -0.02em;
}

.hero-desc {
  font-family: "Inter", sans-serif;
  font-size: 0.98rem;
  font-weight: 300;
  line-height: 1.65;
  color: #9aafc8;
  margin: 0;
  max-width: 460px;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 0.3rem;
}

.btn-hero {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.35rem;
  border-radius: 50px;
  font-family: "Inter", sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  line-height: 1;
  cursor: pointer;
}

.btn-hero-primary {
  background: #2563eb;
  color: #fff;
  border: 2px solid #2563eb;
}

.btn-hero-primary:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #fff;
  text-decoration: none;
}

.btn-hero-secondary {
  background: rgba(255,255,255,0.07);
  color: #d8e3f0;
  border: 1.5px solid rgba(255,255,255,0.22);
}

.btn-hero-secondary:hover {
  background: rgba(255,255,255,0.14);
  color: #fff;
  text-decoration: none;
}

.hero-image {
  overflow: hidden;
  position: relative;
}

.hero-image::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, #080d1a 0%, transparent 15%);
  z-index: 1;
  pointer-events: none;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: right center;
  display: block;
}

.hero-text .project-authors {
  font-size: 1rem;
  color: #b8c9df;
  margin: 0;
  justify-content: flex-start;
  gap: 0.25rem 0.9rem;
  max-width: none;
}

.hero-text .project-authors a { color: #b8c9df; }
.hero-text .project-authors a:hover { color: #6dd5ef; }
.hero-text .project-authors sup { color: #4dc8d8; }

.hero-text .project-affiliations {
  font-size: 0.9rem;
  color: #637a92;
  margin: 0;
  justify-content: flex-start;
  gap: 0.15rem 1rem;
}

.hero-text .project-affiliations sup { color: #4dc8d8; }

.paper-meta-section {
  background: #fff;
  padding: 1.6rem 1.5rem 0.8rem;
  text-align: center;
  border-bottom: 1px solid #f0f3f7;
}

/* Divider after methods sections */
#reconstruction {
  border-bottom: 1px solid #e8edf2;
  padding-bottom: 1.5rem;
}

#bibtex {
  padding-bottom: 2.5rem;
}

/* Speckle overview figure (same width/alignment as the switcher below it) */
.speckle-overview {
  max-width: 1100px;
  margin: 0 auto 1.5rem;
}

.speckle-overview img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
}

/* Speckle panel: extra top padding to contain scale(1.083) overflow (~26px upward) */
#speckle .scatter-panel {
  padding-top: 36px;
}

/* Speckle panel images: 1100px wide (ambient light width), centered, scaled 1/12 larger, bottom-aligned */
#speckle .scatter-panel img {
  max-width: 1100px;
  width: 100%;
  aspect-ratio: 1495 / 425;
  object-fit: contain;
  object-position: bottom center;
  margin-top: 0;
  margin-left: auto;
  margin-right: auto;
  transform: scale(1.083);
  transform-origin: bottom center;
}

/* Scattering section scene switcher */
.scatter-switcher-wrap {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: min(100%, calc(1100px * 10 / 9));
  margin-left: auto;
  margin-right: max(0px, calc((100% - 1100px) / 2));
}

.scatter-scene-container {
  flex: 1;
  min-width: 0;
  display: grid;
  align-items: stretch;
}

.scatter-scene,
.speckle-scene {
  grid-area: 1 / 1;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  display: flex;
  flex-direction: column;
}

.scatter-scene.scatter-scene-active,
.speckle-scene.speckle-scene-active {
  opacity: 1;
  pointer-events: auto;
}

.scatter-panel {
  box-sizing: border-box;
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 18px;
  padding: 12px;
  box-shadow: 0 1px 8px rgba(0,0,0,0.06);
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.scatter-panel img {
  width: 100%;
  aspect-ratio: 1579 / 727;
  object-fit: contain;
  object-position: bottom center;
  display: block;
  border-radius: 6px;
  flex-shrink: 0;
  transform: scale(0.970);
  transform-origin: bottom center;
}

.scatter-panel figcaption {
  font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  font-size: 0.85rem;
  color: #333;
  margin-top: 0.7rem;
  line-height: 1.55;
}

.results-subtitle {
  font-family: "Inter", sans-serif;
  font-size: 0.98rem;
  font-weight: 300;
  color: #555;
  max-width: none;
  margin: 0 auto 2rem;
  line-height: 1.65;
  white-space: nowrap;
  text-align: center;
}

/* ============================================================
   TEASER SECTION
============================================================ */

.teaser-section {
  background: #fff;
  padding: 0.5rem 1.5rem 1.5rem;
  text-align: center;
  border-bottom: 1px solid #e8edf2;
}

.teaser-section > .container {
  max-width: 100%;
  padding: 0;
}

.teaser-title {
  font-family: "Inter", sans-serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: #111;
  margin: 0 auto 0.7rem;
  max-width: 700px;
  line-height: 1.3;
}

.teaser-subtitle {
  font-family: "Inter", sans-serif;
  font-size: 0.98rem;
  font-weight: 300;
  color: #555;
  max-width: none;
  margin: 0 auto 2rem;
  line-height: 1.65;
  white-space: nowrap;
}

.teaser-img {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto 2.5rem;
  display: block;
  border-radius: 10px;
  box-shadow: 0 2px 24px rgba(0,0,0,0.08);
}

/* Scene switcher */
.teaser-switcher-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(100%, calc(1100px * 10 / 9));
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 2.5rem;
}

.scene-selector {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
  align-self: center;
}

.teaser-btn-spacer {
  visibility: hidden;
  pointer-events: none;
}

/* Shift teaser buttons left to align with scatter/speckle buttons.
   The offset = switcher_width/2 - 550px = (1100*10/9)/2 - 550 = 550/9 ≈ 61px,
   which is constant regardless of viewport width (when viewport > 1392px).    */
.teaser-switcher-wrap > .scene-selector:first-child {
  transform: translateX(calc(-550px / 9));
}

.scene-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 0.6rem;
  border-radius: 50px;
  font-family: "Inter", sans-serif;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  border: 1.5px solid #e2e8f0;
  background: #fff;
  color: #1a2a40;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  line-height: 1.3;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  letter-spacing: 0.03em;
}

.scene-btn.scene-btn-active {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}

.scene-btn:hover:not(.scene-btn-active) {
  background: #f8fafc;
}

.teaser-scene-container {
  flex: 1;
  min-width: 0;
  display: grid;
}

.teaser-scene {
  grid-area: 1 / 1;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.teaser-scene.teaser-scene-active {
  opacity: 1;
  pointer-events: auto;
}

/* Teaser panel layout */
.teaser-panels {
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  gap: 10px;
  width: 100%;
  margin: 0 auto;
}

.teaser-panel {
  box-sizing: border-box;
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 1px 8px rgba(0,0,0,0.06);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.panel-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #1e3a6e;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  font-family: "Inter", sans-serif;
  flex-shrink: 0;
}

.panel-label {
  font-family: "Inter", sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  color: #1a2a40;
}

.panel-img-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
}

.panel-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* System panel: portrait, fixed width */
.teaser-panels > .teaser-panel:nth-child(1) {
  flex: 0 0 250px;
}

/* Scene panel: roughly square */
.teaser-panels > .teaser-panel:nth-child(2) {
  flex: 0 0 300px;
}

/* Setup & scene: img-wrap fills remaining space, image capped and centered */
.teaser-panels > .teaser-panel:nth-child(1) .panel-img-wrap,
.teaser-panels > .teaser-panel:nth-child(2) .panel-img-wrap {
  flex: 1;
}

.teaser-panels > .teaser-panel:nth-child(1) .panel-img-wrap img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 366px;
  object-fit: unset;
}

.teaser-panels > .teaser-panel:nth-child(2) .panel-img-wrap img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 293px;
  object-fit: unset;
}

/* 2×2 reconstruction grid */
.teaser-recon-grid {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 10px;
}

.teaser-recon-grid .teaser-panel {
  min-width: 0;
}

/* Scene 2: 4 panels equal width, total = scene 1 (1170px) */
#teaser-scene-2 {
  display: flex;
  flex-direction: column;
}

.teaser-panels-s2 {
  flex: 1;
  align-items: stretch;
}

/* ID selector beats nth-child specificity for all 4 scene-2 panels */
#teaser-scene-2 .teaser-panel {
  flex: 1;
  min-width: 0;
}

#teaser-scene-2 .panel-img-wrap {
  flex: 1;
  /* depth/pol/velocity default to align-items: center (from base rule) */
}

/* Scene image: centered like depth, but shifted up so its top aligns with depth's top.
   scene height ≈ 262px, depth height ≈ 315px → shift = (262−315)/2 = −26.5px */
#teaser-scene-2 .teaser-panel:nth-child(1) .panel-img-wrap img {
  transform: translateY(calc((262px - 315px) / 2));
}

#teaser-scene-2 .panel-img-wrap img {
  width: 100%;
  height: auto;
  object-fit: unset;
  max-height: none;
  max-width: none;
}


.feature-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.2rem 2.8rem;
}

.feature-badge {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: "Inter", sans-serif;
  font-size: 0.88rem;
  font-weight: 500;
  color: #1a2335;
}

.badge-icon {
  width: 38px;
  height: 38px;
  border: 2px solid #1a7fb5;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #1a7fb5;
}

/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-text { padding: 2.5rem 1.5rem 2rem; }
  .hero-tagline { font-size: 2rem; }
}

@media (max-width: 600px) {
  .project-title { font-size: 1.95rem; }
  .project-authors { font-size: 1.05rem; }
  .anchor-nav { gap: 0.8rem; }
  .anchor-nav a { font-size: 0.83rem; }
}
