:root {
  --ink: #111111;
  --muted: #3f3f3f;
  --line: #e6dedb;
  --paper: #ffffff;
  --soft: #faf7f5;
  --accent: #8a1f2d;
  --accent-dark: #641722;
  --accent-soft: #faf4f1;
  --accent-line: #d8b8b0;
  --body-copy: #151515;
  --disabled: #9a8e91;
  --code-bg: #ffffff;
  --code-ink: #151515;
  --font-heading: Inter, "Source Sans 3", ui-sans-serif, system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: Inter, "Source Sans 3", ui-sans-serif, system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "Latin Modern Mono", "SFMono-Regular", Consolas, "Liberation Mono",
    monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-body);
  line-height: 1.65;
}

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

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 58px;
  padding: 0 28px;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.reading-progress {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: var(--accent);
  pointer-events: none;
  transform: scaleX(0);
  transform-origin: left center;
}

.brand {
  color: var(--accent-dark);
  font-family: var(--font-heading);
  font-size: 1.18rem;
  font-weight: 650;
  text-decoration: none;
}

nav {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 18px;
  color: var(--muted);
  font-size: 0.93rem;
}

.nav-indicator {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  background: var(--accent-soft);
  opacity: 0;
  pointer-events: none;
  transform: translate3d(0, 0, 0);
  transition: transform 280ms cubic-bezier(0.22, 1, 0.36, 1),
    width 280ms cubic-bezier(0.22, 1, 0.36, 1),
    height 280ms cubic-bezier(0.22, 1, 0.36, 1), opacity 140ms ease;
  will-change: transform, width, height, opacity;
}

nav a,
.site-footer a {
  border-radius: 999px;
  color: inherit;
  text-decoration: none;
}

nav a:hover,
.site-footer a:hover {
  color: var(--accent);
}

nav a {
  position: relative;
  z-index: 1;
  border: 1px solid transparent;
  padding: 4px 9px;
  transition: color 160ms ease;
}

nav a.is-active {
  color: var(--accent-dark);
}

.page {
  width: min(920px, calc(100% - 40px));
  margin: 0 auto;
}

.paper-header {
  padding: 72px 0 34px;
  text-align: center;
}

.venue-note {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.95rem;
}

h1,
h2,
h3,
p,
li {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 920px;
  margin: 0 auto;
  font-family: var(--font-heading);
  font-size: clamp(1.55rem, 2.65vw, 2.15rem);
  font-weight: 540;
  line-height: 1.12;
  letter-spacing: 0;
}

.title-line {
  display: block;
}

.title-highlight {
  color: var(--accent);
  font-weight: 650;
}

.author-block {
  max-width: 820px;
  margin: 20px auto 0;
  color: var(--body-copy);
  font-size: 1rem;
  line-height: 1.45;
}

.author-line {
  margin: 0;
  color: var(--ink);
  font-size: 1.08rem;
  font-weight: 650;
}

.affiliation-list {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.94rem;
}

.affiliation-list p {
  margin: 0;
}

.author-block sup {
  color: var(--accent-dark);
  font-size: 0.72em;
  font-weight: 700;
  line-height: 0;
}

.link-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 22px;
}

.button,
.copy-button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 17px;
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--accent-dark);
  font: inherit;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}

.button.primary,
.copy-button {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--paper);
}

.button.disabled {
  color: var(--disabled);
  cursor: default;
}

.button.primary.disabled {
  border-color: var(--accent-line);
  background: var(--soft);
  color: var(--muted);
}

.teaser-figure,
.paper-figure {
  margin: 0;
}

.teaser-figure {
  padding-bottom: 48px;
  border-bottom: 1px solid var(--line);
}

.teaser-gif-pair {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.paper-figure {
  margin-top: 22px;
}

.teaser-figure img,
.paper-figure img {
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

figcaption {
  max-width: 820px;
  margin: 10px auto 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.5;
  text-align: center;
}

.paper-section {
  padding: 58px 0;
  border-bottom: 1px solid var(--line);
}

.tldr-section {
  padding: 36px 0 28px;
  border-bottom: 0;
}

.tldr-section .tldr-box {
  margin-bottom: 0;
}

.paper-section h2 {
  margin: 0 0 16px;
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 3vw, 2.45rem);
  font-weight: 650;
  line-height: 1.15;
  letter-spacing: 0;
}

.paper-section h3 {
  margin: 0 0 8px;
  font-family: var(--font-heading);
  font-size: clamp(1.24rem, 2vw, 1.46rem);
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: 0;
}

.tldr-box {
  margin: 0 0 34px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--accent);
  border-radius: 8px;
  background: var(--accent-soft);
}

.paper-section .tldr-label {
  margin: 0 0 8px;
  color: var(--accent-dark);
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tldr-box p {
  margin-bottom: 10px;
}

.challenge-list {
  margin: 4px 0 0;
  padding-left: 22px;
  color: var(--body-copy);
  font-size: 1.18rem;
  line-height: 1.66;
}

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

.paper-section p {
  margin: 0 0 18px;
  color: var(--body-copy);
  font-size: 1.18rem;
  line-height: 1.66;
}

.paper-section strong {
  color: var(--accent-dark);
  font-weight: 700;
}

.paper-section p:last-child {
  margin-bottom: 0;
}

.result-list {
  margin: 0 0 24px;
  padding-left: 22px;
  color: var(--body-copy);
  font-size: 1.18rem;
  line-height: 1.66;
}

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

.result-subsection {
  margin-top: 28px;
}

.result-subsection h3 {
  position: relative;
  padding-left: 24px;
}

.result-subsection h3::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 0.58em;
  height: 0.58em;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 5px var(--accent-soft);
  transform: translateY(-50%);
}

.result-subsection .paper-figure {
  margin-top: 18px;
}

.video-mount {
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin-top: 18px;
}

.video-card {
  flex: none;
  width: 100%;
  margin: 0;
}

.video-card video {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.video-card figcaption {
  max-width: none;
  margin: 8px 2px 0;
  text-align: left;
}

.figure-stack {
  display: flex;
  flex-direction: column;
  gap: 30px;
  margin-top: 22px;
}

.figure-stack .paper-figure {
  margin-top: 0;
}

.table-figure {
  margin: 28px 0 0;
}

.table-figure figcaption {
  max-width: none;
  margin: 0 0 12px;
  color: var(--body-copy);
  font-family: var(--font-heading);
  font-size: 1.08rem;
  font-weight: 650;
  text-align: left;
}

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.paper-table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
  color: var(--body-copy);
  font-size: 0.92rem;
  line-height: 1.35;
}

.paper-table th,
.paper-table td {
  padding: 8px 9px;
  border-bottom: 1px solid var(--line);
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
}

.paper-table thead th {
  border-bottom: 1px solid var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-weight: 700;
}

.paper-table tbody th {
  min-width: 150px;
  text-align: left;
  font-weight: 650;
}

.paper-table .ablation-group {
  vertical-align: middle;
  line-height: 1.25;
}

.paper-table tbody tr:last-child th,
.paper-table tbody tr:last-child td {
  border-bottom: 0;
}

.paper-table .table-divider th,
.paper-table .table-divider td {
  border-top: 2px solid var(--accent-dark);
}

.paper-table strong {
  color: var(--accent-dark);
  font-weight: 750;
}

.second-best {
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 2px;
}

.table-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.5;
}

.bibtex-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.copy-status {
  min-height: 1.4em;
  color: var(--accent);
  font-size: 0.95rem;
}

pre {
  margin: 0;
  padding: 20px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--code-bg);
  color: var(--code-ink);
  font-family: var(--font-mono);
  font-size: 0.92rem;
  line-height: 1.55;
}

code {
  font-family: var(--font-mono);
}

.site-footer {
  width: min(920px, calc(100% - 40px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 0 auto;
  padding: 28px 0 40px;
  color: var(--muted);
}

.site-footer a {
  font-weight: 750;
}

@media (max-width: 680px) {
  .site-header {
    align-items: center;
    gap: 16px;
    padding: 0 16px;
  }

  nav {
    flex: 1;
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    padding: 16px 0;
    white-space: nowrap;
  }

  .page,
  .site-footer {
    width: min(100% - 28px, 920px);
  }

  .paper-header {
    padding: 48px 0 28px;
  }

  .title-line {
    display: inline;
  }

  .paper-section {
    padding: 44px 0;
  }

  .link-row {
    align-items: stretch;
  }

  .button {
    flex: 1 1 140px;
  }

  .teaser-gif-pair {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}
