:root {
  --ink: #202124;
  --muted: #5f6368;
  --link: #2468b4;
  --line: #dedede;
  --soft: #f6f6f6;
  --white: #ffffff;
  --serif: "Palatino Linotype", "Book Antiqua", Palatino, serif;
  --sans: "Avenir Next", Avenir, "Helvetica Neue", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container,
.container-wide {
  width: min(900px, calc(100% - 40px));
  margin-right: auto;
  margin-left: auto;
}

.container-wide {
  width: min(1120px, calc(100% - 40px));
}

.hero {
  padding: 58px 0 28px;
  text-align: center;
}

h1,
h2,
h3,
p,
figure {
  margin-top: 0;
}

h1 {
  max-width: 1080px;
  margin: 0 auto 24px;
  font-family: var(--serif);
  font-size: clamp(2rem, 4.2vw, 3.35rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.17;
}

.authors,
.affiliations {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.authors {
  gap: 4px 20px;
  margin-bottom: 8px;
  color: var(--link);
  font-size: 1.08rem;
}

.affiliations {
  gap: 2px 18px;
  color: #3f4144;
  font-size: 0.88rem;
}

sup {
  color: inherit;
  font-size: 0.67em;
}

.corresponding {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.venue {
  margin: 13px 0 15px;
  font-size: 1.05rem;
  font-weight: 600;
}

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

.project-links a {
  min-width: 84px;
  padding: 7px 17px;
  border-radius: 999px;
  color: #fff;
  background: #363636;
  font-size: 0.9rem;
  font-weight: 500;
  text-align: center;
}

.project-links a:hover {
  background: #111;
  text-decoration: none;
}

.teaser {
  padding-top: 18px;
  text-align: center;
}

.teaser img {
  width: 100%;
}

.tldr {
  max-width: 920px;
  margin: 18px auto 0;
  font-size: 1.02rem;
}

.section {
  padding-top: 56px;
}

.section h2 {
  margin-bottom: 24px;
  font-family: var(--serif);
  font-size: 1.85rem;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
}

.section > p {
  margin-bottom: 16px;
  text-align: justify;
}

.section-intro {
  max-width: 820px;
  margin: -8px auto 28px;
  color: var(--muted);
  text-align: center !important;
}

.demo-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 24px 18px;
}

.demo-card {
  min-width: 0;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.demo-card h3 {
  margin-bottom: 7px;
  color: #444;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-align: center;
  text-transform: uppercase;
}

.video-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
}

.video-pair figure {
  min-width: 0;
  margin: 0;
}

.video-pair video {
  width: 100%;
  aspect-ratio: 1;
  background: #ececec;
  object-fit: cover;
}

.video-pair figcaption {
  padding-top: 5px;
  color: var(--muted);
  font-size: 0.62rem;
  line-height: 1.3;
  text-align: center;
}

.takeaway-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}

.takeaway-grid article {
  padding-top: 14px;
  border-top: 2px solid #333;
}

.takeaway-grid h3 {
  margin-bottom: 8px;
  font-size: 1rem;
}

.takeaway-grid p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.main-figure {
  margin-bottom: 0;
}

.main-figure img {
  width: 100%;
}

.main-figure figcaption {
  max-width: 960px;
  margin: 10px auto 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.5;
  text-align: center;
}

.result-title {
  margin: 2px 0 16px;
  font-size: 1.08rem;
  font-weight: 600;
  text-align: center;
}

.table-scroll {
  overflow-x: auto;
  margin: 0 auto 38px;
}

table {
  width: min(670px, 100%);
  margin: 0 auto;
  border-collapse: collapse;
  font-size: 0.92rem;
  text-align: center;
}

th,
td {
  padding: 9px 18px;
  border: 1px solid #d3d3d3;
}

th {
  background: #efefef;
  font-weight: 600;
}

.qualitative {
  margin-top: 38px;
}

.bibtex {
  position: relative;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--soft);
}

.bibtex pre {
  margin: 0;
  padding: 22px 78px 22px 22px;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.78rem;
  line-height: 1.55;
}

.bibtex button {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 10px;
  border: 1px solid #c6c6c6;
  border-radius: 3px;
  color: #333;
  background: #fff;
  font: inherit;
  font-size: 0.76rem;
  cursor: pointer;
}

.bibtex button:hover {
  background: #ededed;
}

.acknowledgements {
  padding-bottom: 52px;
}

.acknowledgements p {
  text-align: center;
}

footer {
  padding: 22px 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: var(--soft);
  font-size: 0.76rem;
  text-align: center;
}

footer p {
  margin: 0;
}

@media (max-width: 980px) {
  .demo-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .hero {
    padding-top: 38px;
  }

  h1 {
    font-size: clamp(1.75rem, 7.7vw, 2.35rem);
  }

  .authors {
    column-gap: 14px;
    font-size: 0.98rem;
  }

  .affiliations {
    display: block;
    font-size: 0.8rem;
  }

  .affiliations span {
    display: block;
  }

  .section {
    padding-top: 44px;
  }

  .demo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px 12px;
  }
}

@media (max-width: 430px) {
  .container,
  .container-wide {
    width: min(100% - 24px, 1120px);
  }

  body {
    font-size: 15px;
  }

  .hero {
    padding-top: 30px;
  }

  .project-links {
    gap: 7px;
  }

  .project-links a {
    min-width: 76px;
    padding: 6px 13px;
    font-size: 0.83rem;
  }

  .section h2 {
    font-size: 1.6rem;
  }

  .video-pair {
    gap: 5px;
  }

  .video-pair figcaption {
    font-size: 0.68rem;
  }

  .demo-grid,
  .takeaway-grid {
    grid-template-columns: 1fr;
  }

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

  .bibtex pre {
    padding: 50px 16px 18px;
    font-size: 0.7rem;
  }
}

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