/* Adapted from Academic Project Page Template, CC BY-SA 4.0. */
@font-face { font-family: Inter; font-style: normal; font-weight: 100 900; font-display: swap; src: url('../fonts/inter-latin.woff2') format('woff2'); }
:root {
  --primary: #bb0819;
  --primary-hover: #941100;
  --ink: #2d2424;
  --muted: #786a68;
  --line: #e9dfdc;
  --tint: #fcf8f6;
  --accent-soft: #f9e8e2;
  --accent-line: #deb6ab;
}
html { scroll-behavior: smooth; scroll-padding-top: 32px; }
body { color: var(--ink); font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; font-size: 16px; line-height: 1.75; -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
a { color: var(--primary); transition: color .18s; }
a:hover { color: var(--primary-hover); }
button, input { font: inherit; }
button { cursor: pointer; }
a:focus-visible, button:focus-visible, input:focus-visible, [tabindex]:focus-visible { outline: 3px solid #d97757; outline-offset: 4px; }
sup { font-size: .62em; margin-left: 3px; }
::selection { background: #f2d1c5; color: var(--ink); }
.skip-link { position: absolute; top: -60px; left: 16px; z-index: 10; background: white; padding: 10px 16px; }
.skip-link:focus { top: 12px; }
.section > .container.page-width { max-width: 1160px; }
.section > .container.text-width { max-width: 850px; }
.section > .container.results-width { max-width: 1000px; }

/* Centered publication header. */
.hero-body { padding: 60px 24px 0; }
.hero .container { max-width: 1100px !important; }
.eyebrow { display: flex; justify-content: center; align-items: center; gap: 11px; margin-bottom: 20px; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.block-mark { display: grid; grid-template-columns: repeat(3, 4px); gap: 2px; transform: rotate(-8deg); }
.block-mark i { height: 4px; background: var(--primary); border-radius: 1px; }
.block-mark i:nth-child(3n) { opacity: .25; }
.block-mark i:nth-child(4) { opacity: .5; }
.publication-title { color: var(--ink); line-height: 1.25; margin-bottom: 30px !important; }
.project-name { display: block; font-size: clamp(48px, 5vw, 68px); font-weight: 800; color: var(--primary); margin-bottom: 15px; letter-spacing: -.055em; }
.paper-subtitle { display: block; font-size: clamp(27px, 2.6vw, 36px); font-weight: 700; letter-spacing: -.035em; }
.publication-authors { margin: 0 auto 20px; font-size: 18px; line-height: 1.9; }
.author-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 24px; }
.author-row + .author-row { margin-top: 5px; }
.author-block { white-space: nowrap; font-weight: 500; color: var(--primary); }
.author-block a { color: inherit; text-decoration: underline; text-decoration-color: transparent; text-decoration-thickness: 1px; text-underline-offset: 5px; }
.author-block a:hover { color: var(--primary-hover); text-decoration-color: currentColor; }
.author-block sup { font-weight: 400; }
.publication-affiliations { margin: 0 auto; color: #685b58; font-size: 13px; line-height: 2; }
.affiliation-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 20px; }
.publication-affiliations span { display: inline-block; }
.publication-affiliations a { color: inherit; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 4px; }
.publication-affiliations a:hover { color: var(--primary); text-decoration-color: var(--accent-line); }
.publication-affiliations sup { color: var(--primary); font-weight: 600; margin-right: 4px; }
.corresponding { margin: 10px 0 27px; font-size: 12px; color: var(--muted); }
.publication-links { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.button { border-radius: 12px; font-weight: 600; box-shadow: none; transition: background .18s, border-color .18s, color .18s, transform .18s, box-shadow .18s; }
.button:focus:not(:active) { box-shadow: none; }
.publication-links .button { padding: 0 24px; height: 46px; font-size: 14px; border: 1px solid var(--line); background: white; color: var(--ink); }
.publication-links .button:hover { background: var(--tint); border-color: var(--accent-line); transform: translateY(-2px); box-shadow: 0 4px 12px #2d24240d; }
.publication-links .paper-button { background: var(--primary); border-color: var(--primary); color: white; box-shadow: 0 3px 8px #bb08191a; }
.publication-links .paper-button:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.publication-links .code-button { background: var(--ink); border-color: var(--ink); color: white; }
.publication-links .code-button:hover { background: #493c3b; border-color: #493c3b; }
.publication-links svg { width: 18px; height: 18px; margin-right: 9px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round; }
.publication-links svg.github-icon { fill: currentColor; stroke: none; }
.section-nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 30px; width: fit-content; max-width: calc(100% - 40px); margin: 30px auto 0; font-size: 12px; }
.section-nav a { color: var(--muted); padding-block: 5px; border-bottom: 1px solid transparent; }
.section-nav a:hover { color: var(--primary); border-color: var(--accent-line); }

/* The teaser leads directly into the paper's key results. */
.section { padding: 88px 24px; }
.section-tinted { background: var(--tint); border-block: 1px solid var(--line); }
.teaser.section { padding-top: 34px; padding-bottom: 56px; }
.teaser-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.teaser-grid figure { overflow: hidden; background: white; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 5px 20px #2d242407; }
video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #f0e9e6; object-fit: contain; }
.teaser-grid figcaption { padding: 10px 16px; color: var(--ink); font-size: 12px; font-weight: 500; }
.gallery-caption { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 4px 14px; margin-top: 16px; font-size: 12px; color: var(--muted); }
.text-button { border: 0; background: none; color: var(--primary); padding: 3px 5px; font-size: inherit; }
.text-button:hover { text-decoration: underline; }
.teaser-summary { text-align: center; font-size: 15px; line-height: 1.9; color: var(--muted); margin: 40px 0 30px; }
.teaser-summary strong { color: var(--ink); font-size: 25px; font-weight: 700; letter-spacing: -.03em; }
.highlights { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0 auto 20px; max-width: 1000px; text-align: center; }
.highlights > div { padding: 5px 16px; }
.highlights > div + div { border-left: 1px solid var(--line); }
.stat-label { display: block; color: var(--muted); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; font-weight: 500; margin-bottom: 10px; }
.highlights strong { display: block; color: var(--primary); font-size: 46px; line-height: 1.2; font-weight: 800; letter-spacing: -.05em; }
.highlights strong span { font-size: .7em; }
.highlights p { font-size: 12px; margin-top: 9px; color: var(--muted); }
.fine-print { font-size: 12px; line-height: 1.85; color: var(--muted); }
.teaser .fine-print { max-width: 850px; margin-inline: auto; }

/* Reading sections follow the original template's centered headings. */
.section-kicker { text-align: center; text-transform: uppercase; letter-spacing: .15em; color: var(--primary); font-size: 11px; font-weight: 600; margin-bottom: 10px; }
.section-title { text-align: center; color: var(--ink); letter-spacing: -.035em; font-weight: 750; font-size: 34px !important; margin-bottom: 22px !important; }
.section-title::after { content: ''; display: block; width: 42px; height: 3px; border-radius: 2px; background: var(--primary); margin: 18px auto 0; }
.section-intro { max-width: 760px; margin: 0 auto 38px; color: var(--muted); text-align: center; font-size: 15px; }
.abstract-copy { font-size: 16px; line-height: 1.95; color: #5f504e; margin-top: 32px; }
.abstract-copy strong { color: var(--ink); }
.method-figure { margin: 40px 0 34px; }
.method-figure a { display: block; padding: 16px 0; }
.method-figure img { display: block; width: 100%; height: auto; }
.method-figure figcaption { text-align: center; color: var(--muted); font-size: 13px; margin-top: 16px; }
.method-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px; margin-top: 38px; }
.method-grid > div { border-top: 1px solid var(--line); padding-top: 22px; }
.method-grid h3 { font-size: 17px; font-weight: 700; margin-bottom: 12px; letter-spacing: -.025em; }
.method-grid h3 span { color: var(--primary); font-size: 12px; margin-right: 10px; }
.method-grid p { color: var(--muted); font-size: 14px; line-height: 1.85; }

/* Thumbnail selection and one shared transport for paired comparisons. */
.sample-selector { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; max-width: 530px; margin: 0 auto; }
.sample-selector button { overflow: hidden; padding: 4px; border: 1px solid var(--line); border-radius: 11px; background: white; color: var(--muted); font-size: 12px; font-weight: 500; transition: background .18s, border-color .18s, box-shadow .18s; }
.sample-selector img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 7px; }
.sample-selector span { display: block; padding: 7px 2px 4px; }
.sample-selector button[aria-pressed="true"] { color: var(--primary); border-color: var(--primary); background: #fff6f3; box-shadow: 0 0 0 1px var(--primary); }
.sample-selector button:hover { border-color: var(--primary); }
.prompt-text { text-align: center; max-width: 850px; margin: 25px auto 30px; font-size: 14px; color: var(--muted); min-height: 50px; display: flex; align-items: center; justify-content: center; text-wrap: pretty; }
.comparison-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.comparison-grid figure { min-width: 0; overflow: hidden; background: white; border: 1px solid var(--line); border-radius: 12px; }
.comparison-grid figcaption { min-height: 48px; font-size: 13px; font-weight: 600; display: flex; align-items: center; justify-content: space-between; gap: 4px; padding: 12px; }
.comparison-grid figcaption span { color: var(--muted); font-size: 10px; font-weight: 500; }
.comparison-grid .ours { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.comparison-grid .ours figcaption { color: var(--primary); background: #fff6f3; }
.comparison-grid .ours figcaption span { background: var(--accent-soft); padding: 2px 7px; border-radius: 4px; color: var(--primary); }
.video-metric { text-align: center; font-size: 12px; color: var(--muted); padding: 10px; font-variant-numeric: tabular-nums; }
.ours .video-metric { color: var(--primary); font-weight: 600; }
.comparison-controls { display: flex; align-items: center; gap: 12px; max-width: 720px; margin: 28px auto 20px; padding: 12px 16px; background: white; border: 1px solid var(--line); border-radius: 12px; }
.comparison-controls .button { height: 36px; font-size: 12px; border-radius: 8px; }
.comparison-play { background: var(--primary); color: white; border-color: var(--primary); min-width: 88px; }
.comparison-play:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: white; }
.timeline-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
#comparison-seek { flex: 1; min-width: 50px; accent-color: var(--primary); cursor: pointer; }
.video-time { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

.table-container { border: 1px solid var(--line); border-radius: 12px; }
.results-table { font-size: 14px; background: white; white-space: nowrap; }
.results-table caption { text-align: left; color: var(--muted); font-size: 12px; padding: 16px 20px; background: var(--tint); border-bottom: 1px solid var(--line); }
.results-table th, .results-table td { padding: 20px; border-color: var(--line); vertical-align: middle; }
.results-table thead th { color: var(--muted); font-size: 12px; font-weight: 500; border-bottom-width: 1px; }
.results-table tbody th { color: var(--ink); font-weight: 500; }
.results-table tr > *:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
.results-table tr > *:last-child { background: #fff6f3; }
.result-highlight { color: var(--primary); font-weight: 700; }
.paper-link { text-align: center; font-size: 14px; margin-top: 26px; }
.paper-link span { margin-left: 6px; }
.citation-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.citation-heading .title { margin: 0; color: var(--ink); letter-spacing: -.035em; font-size: 30px; font-weight: 700; }
.citation-heading .button { height: 36px; font-size: 12px; background: white; border-color: var(--line); border-radius: 8px; }
pre { background: white; border: 1px solid var(--line); border-radius: 12px; padding: 28px; overflow: auto; font-size: 12px; line-height: 1.95; }
pre code { color: #5f504e; font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace; }
.copy-status { min-height: 22px; font-size: 12px; color: var(--muted); margin-top: 8px; }
.footer { padding: 36px 24px; background: white; font-size: 11px; color: var(--muted); line-height: 2; }
.footer a { color: var(--primary-hover); }
.back-to-top { position: fixed; bottom: 24px; right: 24px; z-index: 5; display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 12px; background: white; color: var(--primary); box-shadow: 0 3px 12px #2d242412; }
.back-to-top:hover { background: var(--accent-soft); border-color: var(--accent-line); }
.back-to-top svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 1000px) {
  .comparison-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
  .method-grid { gap: 24px; }
  .publication-authors { font-size: 17px; }
  .author-row { column-gap: 18px; }
  .affiliation-row { column-gap: 16px; }
  .results-table th, .results-table td { padding: 17px 14px; }
}
@media (max-width: 600px) {
  html { scroll-padding-top: 22px; }
  .hero-body { padding: 38px 20px 0; }
  .eyebrow { font-size: 9px; letter-spacing: .1em; margin-bottom: 16px; }
  .publication-title { margin-bottom: 24px !important; }
  .project-name { font-size: clamp(39px, 10.5vw, 54px); margin-bottom: 15px; }
  .paper-subtitle { font-size: 24px; line-height: 1.35; text-wrap: balance; }
  .desktop-break { display: none; }
  .publication-authors { font-size: 14px; line-height: 2.1; margin-bottom: 16px; }
  .author-row { display: contents; }
  .author-block { display: inline-block; margin-inline: 5px; }
  .publication-affiliations { font-size: 11px; line-height: 1.95; }
  .affiliation-row { display: contents; }
  .publication-affiliations span { margin-inline: 5px; }
  .corresponding { font-size: 11px; margin-block: 10px 23px; }
  .publication-links { gap: 8px; }
  .publication-links .button { height: 42px; padding-inline: 14px; font-size: 12px; border-radius: 10px; }
  .publication-links svg { width: 16px; margin-right: 7px; }
  .section-nav { gap: 7px 18px; font-size: 11px; margin-top: 23px; }
  .section { padding: 58px 20px; }
  .teaser.section { padding-top: 28px; padding-bottom: 40px; }
  .teaser-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .teaser-grid figure { border-radius: 10px; }
  .teaser-grid figure:first-child { grid-column: 1 / -1; }
  .teaser-grid figcaption { padding: 7px 10px; font-size: 10px; }
  .gallery-caption { text-align: center; font-size: 11px; gap: 3px 10px; }
  .teaser-summary { font-size: 13px; margin: 30px 0 26px; }
  .teaser-summary strong { font-size: 19px; }
  .highlights { margin-bottom: 20px; }
  .highlights > div { padding-inline: 6px; }
  .stat-label { font-size: 9px; letter-spacing: .03em; }
  .highlights strong { font-size: 29px; }
  .highlights p { font-size: 10px; line-height: 1.65; }
  .fine-print { font-size: 11px; }
  .section-kicker { font-size: 10px; }
  .section-title, .citation-heading .title { font-size: 28px !important; }
  .section-intro { font-size: 13px; margin-bottom: 28px; }
  .abstract-copy { font-size: 15px; line-height: 1.95; margin-top: 28px; }
  .method-figure { margin: 26px 0; }
  .method-figure a { padding: 8px 0; }
  .method-figure figcaption { font-size: 11px; }
  .method-grid { grid-template-columns: 1fr; gap: 24px; margin-top: 30px; }
  .method-grid > div { padding-top: 18px; }
  .method-grid h3 { font-size: 16px; margin-bottom: 8px; }
  .method-grid p { font-size: 13px; }
  .sample-selector { gap: 9px; }
  .sample-selector button { font-size: 10px; padding: 3px; border-radius: 9px; }
  .sample-selector span { padding: 6px 0 3px; }
  .prompt-text { font-size: 12px; margin-block: 22px 26px; }
  .comparison-grid { gap: 14px; }
  .comparison-grid figcaption { min-height: 44px; font-size: 11px; padding: 10px 8px; }
  .comparison-grid figcaption span { font-size: 9px; }
  .comparison-grid .ours figcaption span { padding-inline: 5px; }
  .video-metric { font-size: 11px; padding: 8px; }
  .comparison-controls { flex-wrap: wrap; gap: 10px; padding: 12px; }
  .comparison-controls .button { padding-inline: 10px; font-size: 11px; }
  #comparison-seek { order: 1; flex-basis: 100%; }
  .video-time { margin-left: auto; font-size: 11px; }
  .results-table { font-size: 12px; }
  .results-table caption { font-size: 11px; padding: 14px; }
  pre { padding: 18px; font-size: 11px; }
  .footer { font-size: 10px; }
  .back-to-top { width: 36px; height: 36px; right: 14px; bottom: 14px; border-radius: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
