:root {
  --ink: #202428;
  --muted: #666d73;
  --line: #dedfdf;
  --soft: #f4f5f3;
  --accent: #d94d35;
  --page: min(1040px, calc(100vw - 40px));
  --sans: Arial, Helvetica, sans-serif;
}

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

html {
  scroll-behavior: auto;
}

body {
  margin: 0;
  color: var(--ink);
  background: #fff;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
}

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

a {
  color: inherit;
}

.project-header {
  width: var(--page);
  margin: 0 auto;
  padding: 64px 0 42px;
  text-align: center;
}

h1 {
  margin: 0;
  font-size: clamp(2.5rem, 5vw, 3.4rem);
  line-height: 1.08;
}

.subtitle {
  max-width: 820px;
  margin: 14px auto 10px;
  font-size: clamp(1.15rem, 2.4vw, 1.45rem);
  line-height: 1.3;
}

.venue {
  margin: 0 0 22px;
  color: var(--accent);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
}

.authors {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
}

.authors sup {
  margin-left: 1px;
  font-size: 0.68em;
}

.affiliations {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.affiliations sup,
.author-notes sup {
  color: var(--ink);
  font-size: 0.72em;
  font-weight: 700;
}

.author-notes {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.76rem;
}

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

.project-links a {
  padding: 7px 16px;
  border: 1px solid #aeb2b4;
  border-radius: 5px;
  background: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
}

.project-links a:hover {
  border-color: var(--ink);
}

.page {
  width: var(--page);
  margin: 0 auto;
}

.teaser {
  margin: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.teaser img {
  width: 100%;
  height: auto;
}

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

.page > #visualization:first-child {
  padding-top: 0;
}

h2 {
  margin: 0 0 12px;
  font-size: 1.55rem;
  line-height: 1.25;
  text-align: center;
}

.section-intro {
  max-width: 760px;
  margin: 0 auto 26px;
  color: var(--muted);
  text-align: center;
}

.abstract-text {
  max-width: 880px;
  margin: 0 auto;
  color: #3f454a;
  text-align: justify;
}

.paper-figure {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  overflow: hidden;
}

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

.paper-figure figcaption {
  padding: 9px 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.78rem;
}

.method-figures {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.method-list {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.method-list p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.method-list b {
  color: var(--ink);
}

.video-frame {
  aspect-ratio: 1914 / 1080;
  border-radius: 7px;
  background: #fff;
  overflow: hidden;
}

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

.metrics {
  margin-bottom: 24px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
}

.metrics div {
  padding: 20px;
  text-align: center;
}

.metrics div + div {
  border-left: 1px solid var(--line);
}

.metrics b {
  display: block;
  font-size: 1.55rem;
}

.metrics span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.76rem;
}

.result-figures {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.view-note {
  margin-bottom: 22px;
}

.visualization-heading {
  position: relative;
  margin-bottom: 12px;
  padding: 0 140px;
}

.visualization-heading h2 {
  margin: 0;
}

.rotation-toggle {
  position: absolute;
  top: 0;
  right: 0;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  color: var(--muted);
  font: 12px/1.4 var(--sans);
  cursor: pointer;
}

.rotation-toggle:hover {
  border-color: #aeb2b4;
  color: var(--ink);
}

.rotation-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.grasp-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.grasp-card {
  min-width: 0;
}

.grasp-card > p {
  display: none;
}

.grasp-view {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 7px;
  background: #f2f5f5;
  overflow: hidden;
}

.grasp-view > img,
.grasp-view > .grasp-turntable,
.grasp-view > model-viewer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.grasp-view > img {
  z-index: 1;
  object-fit: contain;
}

.grasp-view > .grasp-turntable {
  z-index: 2;
  object-fit: contain;
  visibility: hidden;
}

.grasp-view > model-viewer {
  z-index: 3;
  background: transparent;
  cursor: grab;
  touch-action: pan-y;
  --progress-bar-height: 0;
}

.grasp-view > model-viewer:active {
  cursor: grabbing;
}

.grasp-view.has-video > img,
.grasp-view.is-loaded > img,
.grasp-view.is-loaded > .grasp-turntable {
  visibility: hidden;
}

.grasp-view.has-video > .grasp-turntable {
  visibility: visible;
}

.grasp-view.is-loaded > .grasp-turntable {
  visibility: hidden;
}

.is-local .grasp-view > model-viewer,
.grasp-view.video-fallback > model-viewer {
  display: none;
}

footer {
  width: var(--page);
  margin: 0 auto;
  padding: 28px 0 38px;
  color: var(--muted);
  font-size: 0.78rem;
  text-align: center;
}

@media (max-width: 800px) {
  .method-list {
    grid-template-columns: 1fr;
    gap: 12px;
  }

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

  .metrics div:nth-child(3) {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .metrics div:nth-child(4) {
    border-top: 1px solid var(--line);
  }

  .result-figures {
    grid-template-columns: 1fr;
  }

  .grasp-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  :root {
    --page: calc(100vw - 24px);
  }

  .project-header {
    padding-top: 40px;
  }

  h1 {
    font-size: 2.8rem;
  }

  .subtitle {
    font-size: 1.2rem;
  }

  .authors br {
    display: none;
  }

  section {
    padding: 42px 0;
  }

  .metrics div {
    padding: 15px 10px;
  }

  .metrics b {
    font-size: 1.25rem;
  }

  .grasp-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .visualization-heading {
    padding: 0;
    text-align: center;
  }

  .rotation-toggle {
    position: static;
    margin-top: 12px;
  }
}
