:root {
  --accent: #3273dc;
  --text: #242424;
  --muted: #686868;
  --surface: #f5f7fa;
  --border: #e4e8ee;
}

html {
  scroll-behavior: smooth;
}

html.reveal-ready [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  will-change: opacity, transform;
}

html.reveal-ready.reveal-active [data-reveal] {
  transition:
    opacity 700ms cubic-bezier(0.25, 0.1, 0.25, 1),
    transform 700ms cubic-bezier(0.25, 0.1, 0.25, 1);
  transition-delay: var(--reveal-delay, 0ms);
}

html.reveal-ready [data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
  will-change: auto;
}

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

  html.reveal-ready [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

body {
  color: var(--text);
  font-family: 'Noto Sans', sans-serif;
}

.publication-header .hero-body {
  padding-top: 5rem;
  padding-bottom: 2.5rem;
}

.publication-title,
.publication-venue,
.publication-authors,
.publication-affiliations,
.contribution-note {
  font-family: 'Google Sans', sans-serif;
}

.publication-title {
  line-height: 1.12;
  margin: 0 auto 1rem;
  max-width: 1050px;
}

.project-name {
  color: var(--accent);
  font-variant: small-caps;
  font-weight: 700;
  letter-spacing: 0.015em;
}

.publication-venue {
  color: #414141;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.035em;
  margin: 0 auto 1.15rem;
}

.publication-authors {
  line-height: 1.85;
  margin: 0 auto 0.65rem;
  max-width: 930px;
}

.publication-affiliations {
  color: var(--muted);
  line-height: 1.8;
  margin: 0 auto;
  max-width: 900px;
}

.author-block {
  display: inline-block;
  margin: 0 0.14rem;
}

.contribution-note {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 0.7rem;
}

.publication-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
  margin-top: 1.45rem;
}

.publication-links .button {
  border: 0;
  box-shadow: 0 5px 14px rgba(10, 10, 10, 0.14);
  font-family: "Google Sans", sans-serif;
  font-size: 1.02rem;
  font-weight: 600;
  height: 2.85rem;
  margin: 0;
  padding-left: 1.15rem;
  padding-right: 1.2rem;
  transition: box-shadow 160ms ease, transform 160ms ease;
}

.publication-links .button:hover,
.publication-links .button:focus-visible {
  box-shadow: 0 7px 18px rgba(10, 10, 10, 0.2);
  transform: translateY(-1px);
}

.publication-links .button .icon {
  font-size: 1.05em;
  margin-right: 0.45rem !important;
}

.reserved-link {
  cursor: pointer;
  min-width: 7.3rem;
}

.demo-section {
  padding-bottom: 1.5rem;
  padding-top: 1.5rem;
}

.demo-frame {
  aspect-ratio: 16 / 9;
  background: #111923;
  border: 1px solid #273447;
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(28, 39, 55, 0.16);
  margin: 0 auto;
  max-width: 920px;
  overflow: hidden;
  position: relative;
}

.demo-video {
  display: block;
  height: 100%;
  inset: 0;
  object-fit: contain;
  position: absolute;
  width: 100%;
}

.model-section {
  padding-top: 1.5rem;
}

.model-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.model-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(28, 39, 55, 0.1);
  min-width: 0;
  overflow: hidden;
}

.model-card-header {
  align-items: center;
  background: #fff;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
  padding: 0.75rem 1rem;
}

.model-card-header h3 {
  color: var(--text);
  font-family: "Google Sans", sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0;
  text-align: left;
}

.viewer-stage {
  background: linear-gradient(145deg, #f8fafc 0%, #eef2f7 100%);
  height: 360px;
  position: relative;
}

.animation-section {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding-top: 3rem;
}


.animation-grid {
  gap: 0.7rem;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 0 auto;
  min-width: 1050px;
}

.animation-panel[hidden] {
  display: none;
}

.animation-selector {
  display: flex;
  justify-content: center;
  margin: 0 auto 1.4rem;
}

.animation-tabs {
  background: #e9edf3;
  border: 1px solid #dee4ed;
  border-radius: 999px;
  display: flex;
  gap: 0.3rem;
  max-width: 100%;
  overflow-x: auto;
  padding: 0.35rem;
  scrollbar-width: thin;
}

.animation-tab {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  color: #657185;
  cursor: pointer;
  display: inline-flex;
  flex: 1 0 auto;
  font: 600 0.88rem "Google Sans", sans-serif;
  gap: 0.6rem;
  justify-content: center;
  padding: 0.7rem 1.15rem;
  transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease;
  white-space: nowrap;
}

.animation-tab:hover {
  background: rgba(255, 255, 255, 0.65);
  color: var(--text);
}

.animation-tab[aria-selected="true"] {
  background: #fff;
  border-color: #d8e3f4;
  box-shadow: 0 2px 8px rgba(33, 60, 102, 0.09);
  color: #2563b9;
}

.animation-tab:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.animation-unavailable {
  color: #8993a2;
  font-size: 0.8rem;
  left: 0;
  margin: 0;
  position: absolute;
  right: 0;
  text-align: center;
  top: 50%;
  transform: translateY(-50%);
}

.animation-card--empty {
  box-shadow: none;
}

.animation-card--empty .animation-stage {
  background: #f7f8fa;
}

.animation-card.is-loading .animation-stage {
  background:
    radial-gradient(circle at 50% 43%, rgba(50, 115, 220, 0.08), transparent 34%),
    linear-gradient(145deg, #f8fafc 0%, #edf1f6 100%);
}

.animation-stage {
  height: 300px;
}

.animation-strip {
  overflow-x: auto;
  padding: 0.15rem 0.1rem 0.75rem;
  scrollbar-color: #aeb6c2 transparent;
  scrollbar-width: thin;
}

.animation-card .model-card-header {
  justify-content: center;
  padding: 0.65rem 0.55rem;
}

.animation-card .model-card-header h3 {
  font-size: 0.9rem;
  text-align: center;
}

.animation-card .viewer-controls {
  gap: 0.28rem;
  min-height: 3.05rem;
  padding: 0.5rem 0.35rem;
}

.animation-card .viewer-mode {
  font-size: 0.68rem;
  padding: 0.4rem 0.52rem;
}


.rig-canvas {
  display: block;
  height: 100%;
  outline: none;
  touch-action: none;
  width: 100%;
}

.viewer-status {
  align-items: center;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  font-size: 0.78rem;
  gap: 0.72rem;
  font-family: "Google Sans", sans-serif;
  inset: 0;
  justify-content: center;
  pointer-events: none;
  position: absolute;
}

.viewer-status::before {
  animation: viewer-loading-spin 820ms linear infinite;
  border: 3px solid rgba(50, 115, 220, 0.16);
  border-radius: 50%;
  border-top-color: var(--accent);
  content: "";
  height: 2rem;
  width: 2rem;
}

.viewer-status[hidden] {
  display: none;
}

.viewer-status.is-error {
  color: #b42318;
}

.viewer-status.is-error::before {
  display: none;
}

@keyframes viewer-loading-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .viewer-status::before {
    animation-duration: 1.8s;
  }
}

.viewer-controls {
  align-items: center;
  background: #fff;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 0.38rem;
  justify-content: center;
  min-height: 3.55rem;
  padding: 0.65rem 0.7rem;
}

.bone-mode-buttons {
  display: contents;
}

.viewer-mode {
  background: #fff;
  border: 1px solid #cfd5de;
  border-radius: 999px;
  color: #3f4855;
  cursor: pointer;
  font-family: "Google Sans", sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1;
  padding: 0.48rem 0.7rem;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

.viewer-mode:hover:not(:disabled),
.viewer-mode:focus-visible {
  border-color: #7f8a98;
}

.viewer-mode.is-active {
  background: #363636;
  border-color: #363636;
  color: #fff;
}

.viewer-mode:disabled {
  cursor: wait;
  opacity: 0.5;
}



.abstract-copy {
  color: #353535;
  font-size: 1.05rem;
  line-height: 1.72;
}

.abstract-section {
  padding-bottom: 2.25rem;
}

.method-section {
  padding-top: 3.25rem;
}

.method-copy {
  color: #353535;
  font-size: 1.05rem;
  line-height: 1.72;
  margin: 1.75rem auto 0;
  max-width: 920px;
}

.method-figure {
  margin: 0;
}

.method-figure img {
  display: block;
  height: auto;
  width: 100%;
}

.pipeline-figure {
  margin-top: 0.5rem;
  margin-left: auto;
  margin-right: auto;
  max-width: 1000px;
}

.pipeline-figure figcaption {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
  padding: 0.8rem 1rem 0;
  text-align: center;
}

.bibtex-section {
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.bibtex-note {
  color: var(--muted);
}

.bibtex-section pre {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow-x: auto;
}

.footer {
  background: #fff;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
  padding-bottom: 2.5rem;
  padding-top: 2.5rem;
}

.footer a {
  color: var(--accent);
}

@media screen and (max-width: 768px) {
  .publication-header .hero-body {
    padding-top: 3.25rem;
  }

  .publication-title {
    font-size: 2.15rem !important;
  }

  .section {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .publication-links {
    gap: 0.5rem;
  }

  .publication-links .link-block {
    display: flex;
    flex: 1 1 calc(50% - 0.5rem);
  }

  .publication-links .button {
    justify-content: center;
    min-width: 0;
    width: 100%;
  }

  .viewer-stage {
    height: 420px;
  }

}

@media screen and (max-width: 1100px) {
  .model-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .viewer-stage {
    height: 410px;
  }

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

  .animation-stage {
    height: 300px;
  }
}

@media screen and (max-width: 640px) {
  .animation-tabs {
    border-radius: 999px;
    gap: 0.1rem;
    padding: 0.25rem;
    width: 100%;
  }

  .animation-tab {
    flex: 1 1 0;
    font-size: 0.75rem;
    gap: 0;
    padding: 0.7rem 0.45rem;
  }

  .model-grid {
    grid-template-columns: 1fr;
  }

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

  .viewer-stage {
    height: 430px;
  }

  .animation-stage {
    height: 300px;
  }
}
