html,
body {
  overflow-x: hidden;
}

body {
  color: #1f2933;
  font-family: "Times New Roman", Times, serif;
}

a {
  color: hsl(204, 86%, 53%);
}

.hero-banner {
  position: relative;
  min-height: 620px;
  aspect-ratio: 5 / 3;
  overflow: hidden;
  background: #121a22;
}

.hero-bg-video,
.hero-overlay,
.hero-head,
.hero-body {
  position: absolute;
  left: 0;
  right: 0;
}

.hero-bg-video {
  inset: 0;
  z-index: 1;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(18, 26, 34, 0.92), rgba(17, 48, 61, 0.78)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 84px);
}

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

.hero-overlay {
  inset: 0;
  z-index: 2;
  background: rgba(0, 0, 0, 0.32);
  pointer-events: none;
}

.hero-head {
  top: 0;
  z-index: 3;
}

.hero-body {
  top: 50%;
  z-index: 3;
  transform: translateY(-55%);
}

.hero-link {
  color: #fff;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.hero-link .icon {
  margin-right: 5px;
}

.hero-code-button {
  font-weight: 400 !important;
}

.publication-title {
  font-family: "Times New Roman", Times, serif;
}

.hero-title {
  width: min(1120px, calc(100vw - 2rem));
  max-width: calc(100vw - 2rem);
  margin: 0 auto;
  color: #fff;
  font-size: 6rem;
  line-height: 0.96;
  text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.85);
}

.hero-title span {
  display: inline-block;
  width: min(980px, calc(100vw - 2rem));
  max-width: calc(100vw - 2rem);
  margin-top: 0.35rem;
  font-size: 3rem;
  font-weight: 400 !important;
  line-height: 1.07;
  white-space: normal;
}

.publication-authors,
.hero-authors,
.hero-affiliation,
.hero-notes,
.hero-venue {
  font-family: "Times New Roman", Times, serif;
}

.video-speed-note {
  margin-top: 0.8rem;
  color: #777;
  text-align: center;
}

.section {
  padding-top: 3rem;
  padding-bottom: 2.5rem;
}

.section-copy,
.method-copy {
  max-width: 820px;
  margin: 0 auto 1.5rem;
  color: #5c6670;
  line-height: 1.55;
}

.method-copy {
  text-align: justify;
  text-align-last: left;
}

.challenge-section {
  padding-top: 2.5rem;
}

.annotated-video-container,
.showcase-video,
.assembly-video-container,
.method-video-container,
.recovery-video-container {
  position: relative;
  max-width: 85%;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.1);
  background: #101820;
}

.annotated-video-container video,
.showcase-video video,
.assembly-video-container video,
.method-video-container video,
.recovery-video-container video {
  width: 100%;
  height: auto;
  min-height: 220px;
  display: block;
  border-radius: 10px;
}

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

.showcase-video {
  max-width: 64%;
  cursor: pointer;
}

.sound-video {
  cursor: pointer;
}

.sound-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.58);
  border-radius: 10px;
  cursor: pointer;
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.8s ease;
}

.sound-overlay.fade-out {
  opacity: 0;
  pointer-events: none;
}

.sound-overlay-text {
  color: #fff;
  font-size: 1.2rem;
  letter-spacing: 0;
  pointer-events: none;
}

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

.assembly-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
  margin-bottom: 1.25rem;
}

.assembly-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.58rem 1.25rem;
  border: 2px solid #d2d8dd;
  border-radius: 24px;
  background: #fff;
  color: #36414c;
  cursor: pointer;
  font-family: "Times New Roman", Times, serif;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, color 0.25s ease, background 0.25s ease;
}

.assembly-icon {
  width: 1.8rem;
  height: 1.8rem;
  flex: 0 0 1.8rem;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 1px 1px rgba(15, 23, 42, 0.16));
}

.assembly-icon-tall {
  width: 1.35rem;
  flex-basis: 1.35rem;
}

.assembly-btn:hover {
  border-color: #1f8f9a;
  color: #1f8f9a;
  box-shadow: 0 2px 8px rgba(31, 143, 154, 0.16);
}

.assembly-btn.active {
  border-color: #1f8f9a;
  background: #1f8f9a;
  color: #fff;
  box-shadow: 0 2px 12px rgba(31, 143, 154, 0.28);
}

.assembly-video-container video.switching {
  opacity: 0.4;
}

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

.method-overview-section {
  padding-top: 2.25rem;
  padding-bottom: 0.25rem;
}

.recovery-video-container {
  margin-top: 1.5rem;
}

.footer {
  padding: 2rem 1.5rem;
}

.link-block a {
  margin-top: 5px;
  margin-bottom: 5px;
}

.publication-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
  max-width: calc(100vw - 2rem);
  margin: 0 auto;
}

.publication-links .link-block {
  display: inline-flex;
}

.publication-links .button {
  font-weight: 400 !important;
}

@media screen and (max-width: 1200px) {
  .hero-title {
    font-size: 5rem;
  }

  .hero-title span {
    font-size: 2.5rem;
  }
}

@media screen and (max-width: 900px) {
  .hero-banner {
    aspect-ratio: auto;
    min-height: 100vh;
  }

  .hero-body {
    transform: translateY(-50%);
  }

  .hero-title {
    margin-bottom: 0.9rem !important;
    font-size: 2.6rem;
    line-height: 1.02;
  }

  .hero-title span {
    width: min(22rem, calc(100vw - 2rem));
    max-width: calc(100vw - 2rem);
    font-size: 1.42rem;
    line-height: 1.08;
  }

  .publication-links .button {
    margin: 0;
    padding-right: 0.9rem;
    padding-left: 0.9rem;
  }

  .annotated-video-container,
  .showcase-video,
  .assembly-video-container,
  .method-video-container,
  .recovery-video-container {
    max-width: 100%;
  }

  .showcase-video {
    max-width: 92%;
  }

}

@media screen and (max-width: 600px) {
  .section {
    padding-right: 1rem;
    padding-left: 1rem;
  }

  .assembly-btn {
    width: 100%;
    justify-content: center;
    white-space: normal;
  }

  .publication-links {
    max-width: 17.5rem;
  }

  .publication-links .button {
    min-width: 7.25rem;
    justify-content: center;
  }

  .content.has-text-justified,
  .method-copy {
    text-align: left !important;
    text-align-last: auto;
  }
}

@media screen and (max-width: 420px) {
  .hero-title {
    font-size: 2.35rem;
  }

  .hero-title span {
    width: min(18.5rem, calc(100vw - 2rem));
    font-size: 1.08rem;
  }
}
