:root {
  color-scheme: light;
  --white: #ffffff;
  --off-white: #f6f7f8;
  --ink: #20252b;
  --muted: #616a74;
  --line: #d9dde2;
  --blue: #2c5aa0;
  --blue-dark: #214474;
  --blue-soft: #e9eff8;
  --coral: #c65746;
  --serif: "Noto Serif", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Noto Sans", Inter, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --page-width: 980px;
  --header-height: 58px;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

body.nav-open {
  overflow: hidden;
}

a {
  color: var(--blue);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

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

button {
  font: inherit;
}

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

.site-header {
  position: fixed;
  z-index: 20;
  top: 0;
  right: 0;
  left: 0;
  height: var(--header-height);
  border-bottom: 1px solid rgba(217, 221, 226, 0.9);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
}

.nav-shell {
  display: flex;
  width: min(1180px, calc(100% - 40px));
  height: 100%;
  align-items: center;
  justify-content: space-between;
  margin: 0 auto;
}

.brand {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 700;
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 23px;
  font-size: 13px;
  font-weight: 600;
}

.nav-links a {
  color: #48515a;
  text-decoration: none;
}

.nav-links a:hover {
  color: var(--blue);
}

.nav-github {
  padding: 5px 13px;
  border: 1px solid var(--ink);
  border-radius: 6px;
}

.nav-github:hover {
  border-color: var(--blue);
  background: var(--blue);
  color: var(--white) !important;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 10px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  margin: 5px 0;
  background: var(--ink);
  transition: transform 180ms ease, opacity 180ms ease;
}

.reading-progress {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--blue);
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 118px 0 66px;
  background: var(--white);
  text-align: center;
}

.hero-motions {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  background: #f2f1ec;
}

.hero-motions video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.82);
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: min(1280px, calc(100% - 40px));
  max-width: 1280px;
}

.venue {
  margin: 0 0 16px;
  color: var(--coral);
  font-size: 13px;
  font-weight: 750;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: 40px;
  font-weight: 500;
  line-height: 1.22;
  letter-spacing: 0;
}

.hero h1 strong {
  color: var(--blue);
  font-weight: 700;
}

.authors {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px 25px;
  margin-top: 26px;
  font-size: 18px;
  font-weight: 600;
}

.authors a {
  text-decoration: none;
}

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

.authors sup,
.author-note sup {
  color: var(--coral);
}

.affiliation {
  margin: 6px 0 0;
  color: #3e464e;
}

.author-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 27px;
}

.project-button {
  display: inline-flex;
  min-height: 39px;
  align-items: center;
  justify-content: center;
  padding: 7px 17px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.project-button:hover {
  color: var(--white);
  box-shadow: 0 5px 13px rgba(32, 37, 43, 0.15);
  transform: translateY(-1px);
}

.paper-button {
  background: #3d4854;
}

.arxiv-button {
  background: #a83a35;
}

.venue-button {
  background: var(--blue);
}

.venue-label {
  cursor: default;
}

.venue-label:hover {
  box-shadow: none;
  transform: none;
}

.code-button {
  background: #20252b;
}

.tldr {
  display: grid;
  max-width: 860px;
  margin: 35px auto 0;
  padding: 18px 22px;
  border-left: 4px solid var(--blue);
  border-radius: 0 7px 7px 0;
  background: var(--blue-soft);
  grid-template-columns: auto 1fr;
  gap: 17px;
  text-align: left;
}

.tldr > strong {
  color: var(--blue-dark);
  font-size: 14px;
}

.tldr p {
  margin: 0;
  color: #354252;
  font-family: var(--serif);
  line-height: 1.6;
}

.section {
  padding: 76px 0;
}

.white-band {
  background: var(--white);
}

.gray-band {
  border-top: 1px solid #eceef0;
  border-bottom: 1px solid #eceef0;
  background: var(--off-white);
}

.content-block > h2 {
  margin: 0 0 30px;
  color: #18202a;
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
}

.content-block > h2::after {
  display: block;
  width: 44px;
  height: 3px;
  margin: 12px auto 0;
  background: var(--blue);
  content: "";
}

.abstract-text {
  max-width: 900px;
  margin: 0 auto;
  color: #30373f;
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.85;
  text-align: justify;
}

.abstract-text strong {
  color: var(--blue-dark);
}

.section-intro {
  max-width: 790px;
  margin: -10px auto 43px;
  color: var(--muted);
  text-align: center;
}

.paper-figure {
  margin: 0;
}

.motivation-figure {
  width: 100%;
  max-width: 800px;
  margin: 68px auto 0;
}

.motivation-figure figcaption {
  max-width: 760px;
  text-align: center;
}

.paper-figure > a {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 3px 12px rgba(32, 37, 43, 0.05);
}

.paper-figure img {
  width: 100%;
  height: auto;
}

.paper-figure figcaption {
  max-width: 890px;
  margin: 13px auto 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.paper-figure figcaption strong {
  color: #414950;
}

.experiment-block + .experiment-block {
  margin-top: 58px;
}

.subsection-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}

.subsection-heading h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 700;
}

.subsection-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.result-figure {
  margin-right: auto;
  margin-left: auto;
}

.result-figure > a {
  overflow-x: auto;
  padding: 15px;
}

.result-figure img {
  min-width: 680px;
}

.result-figure figcaption {
  text-align: center;
}

.tall-result {
  max-width: 750px;
}

.medium-result {
  max-width: 820px;
}

.wide-result img {
  min-width: 900px;
}

.generated-sequences-figure {
  margin-top: 0;
}

.motion-viewer {
  margin-top: 38px;
}

.motion-selector {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px;
}

.motion-choice {
  display: flex;
  min-height: 48px;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.motion-choice:hover,
.motion-choice:focus-visible {
  border-color: var(--blue);
}

.motion-choice[aria-pressed="true"] {
  border-color: var(--blue);
  background: var(--blue);
  color: var(--white);
}

.play-icon {
  width: 0;
  height: 0;
  flex: 0 0 auto;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 8px solid currentColor;
}

.motion-player {
  max-width: 640px;
  margin: 26px auto 0;
}

.motion-player-frame {
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f2f1ec;
  box-shadow: 0 3px 12px rgba(32, 37, 43, 0.05);
}

.motion-player video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.motion-player figcaption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  margin-top: 11px;
  color: var(--muted);
  font-size: 13px;
}

.motion-player figcaption strong {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 16px;
}

.bibtex-shell {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f3f5f7;
}

.bibtex-shell pre {
  margin: 0;
  padding: 26px 85px 26px 26px;
  overflow-x: auto;
  color: #27323c;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.copy-button {
  position: absolute;
  z-index: 2;
  top: 14px;
  right: 14px;
  min-width: 58px;
  padding: 5px 10px;
  border: 1px solid #b8bec5;
  border-radius: 5px;
  background: var(--white);
  color: #3c4650;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.copy-button:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.copy-status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.site-footer {
  padding: 25px 0;
  border-top: 1px solid var(--line);
  background: var(--off-white);
  color: var(--muted);
  font-size: 12px;
}

.site-footer .page-width {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

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

@media (max-width: 1300px) {
  .desktop-title-break {
    display: none;
  }
}

@media (max-width: 850px) {
  .nav-toggle {
    display: block;
  }

  .nav-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .nav-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .nav-links {
    position: fixed;
    inset: var(--header-height) 0 0;
    display: flex;
    visibility: hidden;
    flex-direction: column;
    align-items: flex-start;
    padding: 38px 20px;
    background: var(--white);
    font-family: var(--serif);
    font-size: 24px;
    opacity: 0;
    transition: opacity 180ms ease, visibility 180ms ease;
  }

  .nav-links.is-open {
    visibility: visible;
    opacity: 1;
  }

  .nav-github {
    padding: 0;
    border: 0;
  }

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

@media (max-width: 650px) {
  .page-width,
  .nav-shell {
    width: min(100% - 30px, var(--page-width));
  }

  .hero {
    padding: 96px 0 52px;
  }

  .hero-motions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-motions video:nth-child(n + 3) {
    display: none;
  }

  .hero-overlay {
    background: rgba(255, 255, 255, 0.88);
  }

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

  .authors {
    gap: 4px 16px;
    font-size: 16px;
  }

  .tldr {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 17px;
  }

  .section {
    padding: 58px 0;
  }

  .content-block > h2 {
    margin-bottom: 26px;
    font-size: 28px;
  }

  .abstract-text {
    font-size: 16px;
    line-height: 1.75;
    text-align: left;
  }

  .motivation-figure {
    margin-top: 44px;
  }

  .section-intro {
    margin-bottom: 34px;
    text-align: left;
  }

  .subsection-heading {
    display: block;
  }

  .subsection-heading p {
    margin-top: 4px;
    text-align: left;
  }

  .result-figure {
    margin-right: -15px;
    margin-left: 0;
  }

  .motion-selector {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .motion-player figcaption {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .bibtex-shell pre {
    padding: 58px 17px 20px;
    font-size: 11px;
  }

  .site-footer .page-width {
    flex-direction: column;
    gap: 2px;
  }
}

@media (max-width: 390px) {
  .hero h1 {
    font-size: 27px;
  }

  .project-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
