:root {
  --text: #242424;
  --muted: #666666;
  --link: #3273dc;
  --line: #dddddd;
  --code: #f5f5f5;
  --band-gray: #f6f7f9;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: #ffffff;
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.55;
}

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

a:hover {
  text-decoration: underline;
}

.container {
  width: min(100% - 36px, 1040px);
  margin: 0 auto;
}

.narrow,
.text-column {
  max-width: 900px;
}

.hero {
  padding: 54px 0 24px;
  text-align: center;
}

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

h1 {
  margin-bottom: 14px;
  font-size: 32px;
  line-height: 1.12;
  font-weight: 500;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 22px;
  font-size: 30px;
  line-height: 1.2;
  font-weight: 700;
  text-align: center;
}

.authors {
  margin: 0 auto 12px;
  max-width: 960px;
  font-size: 20px;
  line-height: 1.6;
}

.authors-secondary {
  margin-top: -8px;
  margin-bottom: 12px;
}

.authors sup,
.affiliations sup {
  margin-left: 1px;
  font-size: 0.68em;
  line-height: 0;
}

.affiliations {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 18px;
  margin: 0 auto 10px;
  color: var(--text);
  font-size: 18px;
  line-height: 1.5;
}

.venue {
  margin-bottom: 0;
  color: var(--text);
  font-size: 22px;
  font-weight: 700;
}

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

.hero-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 12px 22px;
  border: 1px solid #333333;
  border-radius: 999px;
  background: #333333;
  color: #ffffff;
  box-shadow: none;
  font-size: 20px;
  font-weight: 500;
  line-height: 1;
}

.hero-link:hover {
  background: #222222;
  border-color: #222222;
  text-decoration: none;
}

.hero-link.is-tbd {
  border-color: #d1d5db;
  background: #e5e7eb;
  color: #8b929c;
  cursor: default;
  pointer-events: none;
}

.hero-link svg {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hero-link svg text {
  fill: currentColor;
  stroke: none;
  font-size: 5px;
  font-weight: 800;
}

.hero-link:nth-child(3) svg path {
  fill: currentColor;
  stroke: none;
}

.showcase {
  padding: 28px 0 32px;
}

.teaser {
  margin: 0 auto;
  max-width: 860px;
  text-align: center;
}

.teaser iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  background: transparent;
}

.section {
  padding: 44px 0;
}

.section-hero,
.section-abstract,
.section-meshes,
.section-bibtex {
  background: var(--band-gray);
}

.section-video,
.section-example,
.section-design {
  background: #ffffff;
}

.mesh-section {
  padding-top: 18px;
}

.mesh-carousel {
  position: relative;
  max-width: 980px;
  margin: 0 auto;
}

.mesh-carousel + .mesh-carousel {
  margin-top: 24px;
}

.mesh-grid {
  display: grid;
  grid-auto-columns: clamp(132px, 15vw, 165px);
  grid-auto-flow: column;
  grid-template-rows: repeat(3, auto);
  gap: 12px;
  overflow-x: auto;
  padding: 0 46px 10px;
  scroll-behavior: smooth;
  scroll-snap-type: none;
  scrollbar-color: #c5cbd3 transparent;
  scrollbar-width: thin;
}

.mesh-grid::-webkit-scrollbar {
  height: 6px;
}

.mesh-grid::-webkit-scrollbar-thumb {
  background: #c5cbd3;
  border-radius: 999px;
}

.mesh-grid::-webkit-scrollbar-track {
  background: transparent;
}

.mesh-card {
  margin: 0;
  width: clamp(132px, 15vw, 165px);
  scroll-snap-align: start;
}

.mesh-card figcaption {
  display: none;
}

.mesh-viewer {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border: 0;
  background: transparent;
}

.gallery-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  padding: 0;
  border: 1px solid #cfd5dd;
  border-radius: 50%;
  background: #ffffff;
  color: #333333;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.12);
  cursor: pointer;
  transform: translateY(-50%);
}

.gallery-nav:hover {
  border-color: #9aa3af;
}

.gallery-nav svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.gallery-prev {
  left: 2px;
}

.gallery-next {
  right: 2px;
}

.gallery-dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  max-width: 780px;
  margin-top: 12px;
  margin-right: auto;
  margin-left: auto;
}

.gallery-dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #c6ccd3;
  cursor: pointer;
}

.gallery-dot.is-active {
  background: #333333;
}

.mesh-viewer canvas,
.mesh-viewer video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mesh-viewer p {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

figcaption {
  margin-top: 12px;
  color: var(--text);
  font-size: 16px;
  line-height: 1.55;
  text-align: center;
}

.gif-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 22px;
  max-width: 820px;
  margin-right: auto;
  margin-left: auto;
}

.gif-card {
  margin: 0;
}

.gif-card img {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
}

.method-block {
  margin-top: 28px;
}

.method-block:first-of-type {
  margin-top: 0;
}

.method-copy {
  margin: 0 auto 18px;
}

.method-copy h3 {
  margin-bottom: 8px;
  font-size: 20px;
  font-weight: 500;
  text-align: center;
}

.method-figures {
  display: grid;
  gap: 18px;
  max-width: 900px;
  margin-right: auto;
  margin-left: auto;
}

.method-figures.two-up {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.method-figures figure,
.wide-figure,
.result-figure {
  margin: 0;
}

.method-figures img,
.wide-figure img,
.result-figure img {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
}

.wide-figure {
  max-width: 860px;
  margin: 0 auto;
}

.equidit-figure {
  max-width: 560px;
}

.result-figure {
  max-width: 520px;
  margin: 22px auto 0;
}

.section p {
  color: #333333;
  font-size: 16px;
}

pre {
  overflow-x: auto;
  margin: 0;
  padding: 18px;
  border-radius: 4px;
  background: var(--code);
  color: #222222;
  font-size: 14px;
  line-height: 1.5;
}

code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

footer {
  padding: 26px 0 42px;
  color: var(--muted);
  text-align: center;
}

footer p {
  margin: 0;
  font-size: 14px;
}

@media (max-width: 860px) {
  .mesh-grid {
    grid-template-columns: repeat(3, 1fr);
    padding: 0 40px;
  }

  .method-figures.two-up {
    grid-template-columns: 1fr;
  }
}

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

  h1 {
    font-size: 22px;
  }

  h2 {
    font-size: 24px;
  }

  .authors {
    font-size: 14px;
  }

  .hero-links {
    gap: 8px;
    margin-top: 16px;
  }

  .hero-link {
    min-height: 38px;
    padding: 8px 13px;
    font-size: 14px;
  }

  .hero-link svg {
    width: 18px;
    height: 18px;
  }

  .mesh-grid {
    grid-auto-columns: 132px;
  }
}

@media (max-width: 520px) {
  .gif-row {
    grid-template-columns: 1fr;
  }

  .mesh-grid {
    padding-right: 40px;
    padding-left: 40px;
  }
}

@media (max-width: 360px) {
  .mesh-grid {
    grid-auto-columns: 150px;
  }
}
