:root {
  --ink: #111719;
  --ink-soft: #263033;
  --paper: #f4f6f5;
  --surface: #ffffff;
  --muted: #5b6769;
  --line: #d6dddc;
  --line-dark: #3a4648;
  --red: #b5353c;
  --red-dark: #84272d;
  --teal: #2b7479;
  --gold: #b38738;
  --focus: #f2be5c;
  --header-height: 68px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 20px);
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  letter-spacing: 0;
  text-rendering: optimizeLegibility;
}

body.menu-open {
  overflow: hidden;
}

img,
video {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-underline-offset: 0.18em;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
  letter-spacing: 0;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 1000;
  padding: 10px 14px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--ink);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.container {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  width: 100%;
  color: #ffffff;
  background: rgba(11, 16, 18, 0.42);
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  transition: background-color 180ms ease, border-color 180ms ease;
}

.site-header.is-scrolled,
.site-header.menu-visible {
  background: rgba(17, 23, 25, 0.96);
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1320px, calc(100% - 48px));
  min-height: var(--header-height);
  margin-inline: auto;
}

.wordmark {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  color: #ffffff;
  font-weight: 750;
  text-decoration: none;
}

.wordmark-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #ffffff;
  background: var(--red);
  border-radius: 4px;
  font-size: 13px;
}

.site-nav {
  display: flex;
  gap: 26px;
  align-items: center;
}

.site-nav a {
  color: rgba(255, 255, 255, 0.84);
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
}

.site-nav a:hover {
  color: #ffffff;
}

.site-nav .nav-code {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  padding: 8px 11px;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 4px;
}

.site-nav svg,
.button svg,
.icon-button svg,
.scroll-cue svg {
  width: 18px;
  height: 18px;
  stroke-width: 1.8;
}

.icon-button {
  display: inline-grid;
  width: 42px;
  height: 42px;
  padding: 0;
  place-items: center;
  color: currentColor;
  background: transparent;
  border: 1px solid currentColor;
  border-radius: 4px;
  cursor: pointer;
}

.menu-toggle {
  display: none;
  color: #ffffff;
}

.hero {
  position: relative;
  display: flex;
  min-height: 760px;
  max-height: 900px;
  align-items: center;
  overflow: hidden;
  color: #ffffff;
  background: var(--ink);
}

.hero-media,
.hero-scrim {
  position: absolute;
  inset: 0;
}

.hero-media {
  background-image: url("assets/hero.webp");
  background-position: center;
  background-size: cover;
}

.hero-scrim {
  background: rgba(9, 13, 15, 0.76);
}

.hero-content {
  position: relative;
  z-index: 1;
  padding-top: 88px;
}

.venue,
.section-kicker,
.result-label,
.tldr-label {
  margin: 0 0 14px;
  color: var(--red);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero .venue {
  color: #f0c6c8;
}

.hero h1 {
  max-width: 1050px;
  margin: 0;
  font-size: 64px;
  font-weight: 760;
  line-height: 1.04;
  letter-spacing: 0;
}

.paper-name,
.paper-title-rest {
  display: block;
}

.paper-name {
  margin-bottom: 18px;
  color: #ffffff;
  font-size: 0.58em;
}

.hero-summary {
  max-width: 800px;
  margin: 28px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 20px;
  line-height: 1.55;
}

.author-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
  font-weight: 680;
}

.author-list li:not(:last-child)::after {
  margin-left: 22px;
  color: rgba(255, 255, 255, 0.34);
  content: "/";
}

.affiliation {
  margin: 7px 0 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 14px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  min-height: 46px;
  gap: 9px;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 750;
  text-decoration: none;
}

.button-primary {
  color: #ffffff;
  background: var(--red);
  border-color: var(--red);
}

.button-primary:hover {
  background: var(--red-dark);
  border-color: var(--red-dark);
}

.button-secondary {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.45);
}

.button-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
}

.scroll-cue {
  position: absolute;
  right: 32px;
  bottom: 26px;
  z-index: 2;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.44);
  border-radius: 50%;
}

.metrics-band {
  color: #ffffff;
  background: var(--ink);
  border-top: 1px solid var(--line-dark);
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-block: 0;
  padding-block: 24px;
}

.metric {
  padding: 0 28px;
  border-right: 1px solid var(--line-dark);
}

.metric:first-child {
  padding-left: 0;
}

.metric:last-child {
  padding-right: 0;
  border-right: 0;
}

.metric dt {
  color: #aebbbc;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.metric dd {
  margin: 4px 0 0;
  font-size: 30px;
  font-weight: 760;
  line-height: 1.2;
}

.metric dd span {
  color: #bfcaca;
  font-size: 13px;
  font-weight: 650;
}

.section {
  padding: 104px 0;
}

.section-heading {
  max-width: 820px;
  margin: 0 auto 54px;
  text-align: center;
}

.section-heading-left {
  margin-left: 0;
  text-align: left;
}

.section-heading h2,
.abstract-layout h2,
.citation-layout h2 {
  margin: 0;
  color: var(--ink);
  font-size: 44px;
  line-height: 1.12;
  letter-spacing: 0;
}

.section-heading > p:last-child {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 18px;
}

.feature-figure {
  margin: 0;
}

.image-frame {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.image-frame img {
  width: 100%;
  height: auto;
}

.feature-figure figcaption {
  max-width: 880px;
  margin: 16px auto 0;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.zoom-button,
.result-zoom {
  position: absolute;
  right: 14px;
  bottom: 14px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(17, 23, 25, 0.3);
}

.zoom-button:hover,
.result-zoom:hover {
  background: #ffffff;
  border-color: var(--ink);
}

.tldr {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 28px;
  align-items: start;
  max-width: 980px;
  margin: 56px auto 0;
  padding: 30px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.tldr p {
  margin: 0;
}

.tldr > p:last-child {
  color: var(--ink-soft);
  font-size: 21px;
  font-weight: 560;
  line-height: 1.55;
}

.section-method {
  background: var(--surface);
}

.method-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.method-tabs button {
  display: flex;
  min-height: 88px;
  gap: 12px;
  align-items: center;
  padding: 18px 20px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-right: 1px solid var(--line);
  cursor: pointer;
  text-align: left;
}

.method-tabs button:last-child {
  border-right: 0;
}

.method-tabs button[aria-selected="true"] {
  color: var(--ink);
  box-shadow: inset 0 -4px 0 var(--red);
}

.step-number {
  color: var(--red);
  font-size: 12px;
  font-weight: 800;
}

.method-description {
  min-height: 64px;
  max-width: 820px;
  margin: 24px 0 34px;
  color: var(--ink-soft);
  font-size: 18px;
}

.section-results {
  color: #ffffff;
  background: var(--ink);
}

.section-heading-on-dark h2,
.section-results h3 {
  color: #ffffff;
}

.section-heading-on-dark > p:last-child,
.section-results .quantitative-block > div:first-child > p:last-child,
.demo-copy p {
  color: #acb8b9;
}

.result-explorer {
  overflow: hidden;
  color: var(--ink);
  background: #e9edec;
  border: 1px solid var(--line-dark);
  border-radius: 8px;
}

.result-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: #dfe5e3;
  border-bottom: 1px solid #c5cecc;
}

.result-tabs button {
  min-height: 52px;
  padding: 10px 14px;
  color: #4b5759;
  background: transparent;
  border: 0;
  border-right: 1px solid #c5cecc;
  cursor: pointer;
  font-size: 14px;
  font-weight: 720;
}

.result-tabs button:last-child {
  border-right: 0;
}

.result-tabs button[aria-selected="true"] {
  color: #ffffff;
  background: var(--red);
}

.result-stage {
  position: relative;
  display: grid;
  aspect-ratio: 16 / 9;
  place-items: center;
  padding: 22px;
  background: #f7f8f7;
}

.result-stage img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.result-caption {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 24px;
  padding: 22px 26px;
  background: #ffffff;
  border-top: 1px solid var(--line);
}

.result-caption p {
  margin: 0;
}

.result-caption > p:last-child {
  color: var(--muted);
}

.quantitative-block {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 72px;
  align-items: end;
  margin-top: 84px;
}

.quantitative-block > *,
.demo-layout > *,
.abstract-layout > *,
.citation-layout > *,
.acknowledgments-grid > * {
  min-width: 0;
}

.quantitative-block h3,
.demo-layout h3 {
  margin: 0 0 14px;
  font-size: 30px;
  line-height: 1.2;
}

.table-scroll {
  overflow-x: auto;
  border-top: 1px solid var(--line-dark);
  border-bottom: 1px solid var(--line-dark);
}

table {
  width: 100%;
  border-collapse: collapse;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
}

th,
td {
  padding: 15px 14px;
  border-bottom: 1px solid #303b3d;
  text-align: right;
  white-space: nowrap;
}

tr:last-child th,
tr:last-child td {
  border-bottom: 0;
}

th:first-child,
td:first-child {
  padding-left: 0;
  text-align: left;
}

thead th {
  color: #9fadae;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

tbody th {
  font-weight: 700;
}

.demo-layout {
  display: grid;
  grid-template-columns: 0.72fr 1.28fr;
  gap: 72px;
  align-items: center;
  margin-top: 96px;
  padding-top: 72px;
  border-top: 1px solid var(--line-dark);
}

.demo-layout video {
  width: 100%;
  aspect-ratio: 868 / 480;
  background: #ffffff;
  border: 1px solid var(--line-dark);
  border-radius: 8px;
}

.abstract-layout,
.citation-layout {
  display: grid;
  grid-template-columns: 0.62fr 1.38fr;
  gap: 80px;
  align-items: start;
}

.abstract-copy {
  max-width: 790px;
  color: var(--ink-soft);
  font-size: 18px;
}

.abstract-copy p:first-child {
  margin-top: 0;
}

.keyword-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 34px 0 0;
  padding: 22px 0 0;
  border-top: 1px solid var(--line);
  color: var(--teal);
  font-size: 13px;
  font-weight: 700;
  list-style: none;
}

.keyword-list li:not(:last-child)::after {
  margin-left: 18px;
  color: #aab4b3;
  content: "/";
}

.section-citation {
  background: #e7ecea;
  border-top: 1px solid var(--line);
}

.citation-layout > div:first-child > p:last-child {
  color: var(--muted);
}

.bibtex-wrap {
  position: relative;
  min-width: 0;
}

.bibtex-wrap pre {
  overflow-x: auto;
  margin: 0;
  padding: 28px 64px 28px 28px;
  color: #dce6e5;
  background: var(--ink);
  border: 1px solid #334043;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.65;
  tab-size: 2;
}

.copy-button {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 1;
  color: #dce6e5;
  border-color: #6e7c7e;
}

.copy-button:hover {
  color: #ffffff;
  border-color: #ffffff;
}

.copy-status {
  min-height: 24px;
  margin: 8px 0 0;
  color: var(--teal);
  font-size: 13px;
  font-weight: 700;
}

.acknowledgments {
  padding: 50px 0;
  color: #d4dddd;
  background: #20292b;
  border-bottom: 1px solid #354042;
}

.acknowledgments-grid {
  display: grid;
  grid-template-columns: 0.62fr 1.38fr;
  gap: 80px;
}

.acknowledgments h2 {
  margin: 0;
  color: #ffffff;
  font-size: 20px;
}

.acknowledgments p {
  margin: 0;
}

.site-footer {
  padding: 56px 0 32px;
  color: #aebabb;
  background: var(--ink);
}

.error-page {
  display: grid;
  min-height: 100svh;
  padding: 32px;
  place-items: center;
  color: #ffffff;
  background: var(--ink);
  text-align: center;
}

.error-page > div {
  max-width: 620px;
}

.error-page h1 {
  margin: 0;
  font-size: 48px;
  line-height: 1.1;
}

.error-page p:not(.section-kicker) {
  margin: 18px 0 28px;
  color: #b9c4c5;
}

.footer-grid {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  justify-content: space-between;
}

.footer-grid p {
  margin: 0;
}

.footer-title {
  color: #ffffff;
  font-size: 20px;
  font-weight: 750;
}

.footer-links {
  display: flex;
  gap: 26px;
}

.footer-links a {
  color: #ffffff;
  font-size: 14px;
}

.footer-note {
  margin-top: 42px;
  padding-top: 22px;
  border-top: 1px solid #303b3d;
  font-size: 12px;
}

.lightbox {
  width: min(94vw, 1400px);
  max-width: none;
  max-height: 92vh;
  padding: 54px 18px 18px;
  color: var(--ink);
  background: #ffffff;
  border: 0;
  border-radius: 8px;
}

.lightbox::backdrop {
  background: rgba(4, 7, 8, 0.88);
}

.lightbox img {
  width: 100%;
  max-height: calc(92vh - 110px);
  object-fit: contain;
}

.lightbox p {
  margin: 12px 6px 0;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.lightbox-close {
  position: absolute;
  top: 8px;
  right: 8px;
  color: var(--ink);
}

@media (max-width: 980px) {
  .site-nav {
    position: fixed;
    top: var(--header-height);
    right: 0;
    left: 0;
    display: none;
    flex-direction: column;
    gap: 0;
    align-items: stretch;
    max-height: calc(100svh - var(--header-height));
    padding: 12px 24px 24px;
    overflow-y: auto;
    background: rgba(17, 23, 25, 0.98);
    border-top: 1px solid #354042;
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a,
  .site-nav .nav-code {
    min-height: 48px;
    padding: 12px 0;
    border: 0;
    border-bottom: 1px solid #303b3d;
    border-radius: 0;
  }

  .menu-toggle {
    display: inline-grid;
  }

  .hero {
    min-height: 720px;
  }

  .hero h1 {
    font-size: 48px;
  }

  .method-tabs {
    grid-template-columns: repeat(2, 1fr);
  }

  .method-tabs button:nth-child(2) {
    border-right: 0;
  }

  .method-tabs button:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .quantitative-block,
  .demo-layout,
  .abstract-layout,
  .citation-layout,
  .acknowledgments-grid {
    grid-template-columns: 1fr;
    gap: 38px;
  }

  .demo-layout {
    margin-top: 72px;
  }
}

@media (max-width: 720px) {
  :root {
    --header-height: 62px;
  }

  .container,
  .header-inner {
    width: min(100% - 30px, 1180px);
  }

  .hero {
    min-height: 700px;
    align-items: flex-end;
  }

  .hero-media {
    background-position: 57% center;
  }

  .hero-scrim {
    background: rgba(9, 13, 15, 0.8);
  }

  .hero-content {
    padding-top: 84px;
    padding-bottom: 34px;
  }

  .hero h1 {
    font-size: 32px;
    line-height: 1.06;
  }

  .paper-name {
    font-size: 0.72em;
  }

  .hero-summary {
    margin-top: 17px;
    font-size: 15px;
    line-height: 1.48;
  }

  .author-list {
    display: block;
    margin-top: 17px;
    font-size: 14px;
    line-height: 1.5;
  }

  .author-list li {
    display: inline;
  }

  .author-list li:not(:last-child)::after {
    margin: 0 7px;
    content: ",";
  }

  .affiliation {
    margin-top: 7px;
    font-size: 12px;
    line-height: 1.45;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 20px;
  }

  .hero-actions .button {
    min-height: 42px;
    padding: 8px 6px;
    font-size: 13px;
  }

  .scroll-cue {
    display: none;
  }

  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
    padding-block: 12px;
  }

  .metric {
    padding: 16px;
  }

  .metric:nth-child(2) {
    border-right: 0;
  }

  .metric:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line-dark);
  }

  .metric:first-child,
  .metric:last-child {
    padding: 16px;
  }

  .metric dd {
    font-size: 25px;
  }

  .section {
    padding: 74px 0;
  }

  .section-heading {
    margin-bottom: 36px;
    text-align: left;
  }

  .section-heading h2,
  .abstract-layout h2,
  .citation-layout h2 {
    font-size: 34px;
  }

  .section-heading > p:last-child,
  .abstract-copy {
    font-size: 16px;
  }

  .feature-figure figcaption {
    text-align: left;
  }

  .tldr {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 40px;
  }

  .tldr > p:last-child {
    font-size: 18px;
  }

  .method-tabs {
    display: flex;
    padding-bottom: 2px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
  }

  .method-tabs button,
  .method-tabs button:nth-child(2),
  .method-tabs button:nth-child(-n + 2) {
    min-width: 190px;
    border-right: 1px solid var(--line);
    border-bottom: 0;
    scroll-snap-align: start;
  }

  .method-description {
    font-size: 16px;
  }

  .result-tabs {
    grid-template-columns: repeat(2, 1fr);
  }

  .result-tabs button:nth-child(-n + 2) {
    border-bottom: 1px solid #c5cecc;
  }

  .result-tabs button:nth-child(2) {
    border-right: 0;
  }

  .result-stage {
    padding: 8px;
  }

  .result-caption {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 18px;
  }

  .quantitative-block {
    margin-top: 64px;
  }

  .quantitative-block h3,
  .demo-layout h3 {
    font-size: 26px;
  }

  th,
  td {
    padding: 13px 12px;
  }

  .demo-layout {
    padding-top: 52px;
  }

  .keyword-list {
    display: block;
  }

  .keyword-list li + li {
    margin-top: 8px;
  }

  .keyword-list li::after {
    display: none;
  }

  .bibtex-wrap pre {
    overflow-wrap: anywhere;
    font-size: 11px;
    white-space: pre-wrap;
  }

  .footer-grid {
    display: block;
  }

  .footer-links {
    margin-top: 28px;
  }
}

@media (max-width: 390px) {
  .venue {
    max-width: 310px;
  }

  .hero h1 {
    font-size: 30px;
  }

  .metric dt {
    font-size: 10px;
  }

  .footer-links {
    flex-wrap: wrap;
  }
}

@media (max-width: 720px) and (max-height: 650px) {
  .hero {
    min-height: 500px;
  }

  .hero-content {
    padding-top: 72px;
    padding-bottom: 18px;
  }

  .hero .venue {
    margin-bottom: 7px;
    font-size: 9px;
  }

  .hero h1 {
    font-size: 24px;
  }

  .paper-name {
    margin-bottom: 9px;
  }

  .hero-summary,
  .affiliation {
    display: none;
  }

  .author-list {
    margin-top: 13px;
    font-size: 12px;
  }

  .hero-actions {
    margin-top: 13px;
  }

  .hero-actions .button {
    min-height: 36px;
    font-size: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
