:root {
  --primary-color: #456b9a;
  --primary-hover: #3c5f89;
  --accent-color: #a9bfdc;
  --text-primary: #363636;
  --text-secondary: #4a4a4a;
  --text-light: #7a7a7a;
  --background-primary: #ffffff;
  --background-secondary: #fafafa;
  --surface-color: #ffffff;
  --border-color: #ececec;
  --shadow-sm: 0 1px 2px 0 rgb(10 10 10 / 0.04);
  --shadow-md: 0 6px 20px -18px rgb(10 10 10 / 0.08);
  --shadow-lg: 0 12px 28px -22px rgb(10 10 10 / 0.14);
  --border-radius: 14px;
  --transition: all 0.25s ease;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-primary);
  background: var(--background-primary);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--primary-color);
}

.hero-paper {
  position: relative;
  border-bottom: 1px solid var(--border-color);
}

.hero-paper .hero-body {
  padding: 5rem 1.5rem 4rem;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0.38rem 0.9rem;
  border-radius: 999px;
  background: #f3f7fc;
  border: 1px solid #dde7f4;
  color: var(--primary-color);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.publication-title {
  margin-bottom: 1.5rem !important;
  color: var(--text-primary) !important;
  font-weight: 800 !important;
  line-height: 1.08 !important;
  letter-spacing: -0.03em;
}

.publication-authors {
  margin-bottom: 1rem;
  color: var(--text-primary);
}

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

.publication-affiliations {
  color: var(--text-secondary);
  font-size: 1rem;
}

.publication-affiliations p {
  margin: 0.3rem 0;
}

.author-note {
  color: var(--text-light);
}

.publication-links {
  margin-top: 1.75rem;
}

.hero-figure {
  margin-top: 2.5rem;
}

.link-block {
  display: inline-block;
  margin: 0.35rem;
}

.button {
  border-radius: 999px !important;
  font-weight: 700 !important;
  border: 1px solid transparent !important;
  transition: var(--transition) !important;
}

.button.is-dark {
  background: var(--primary-color) !important;
  color: #fff !important;
  box-shadow: var(--shadow-sm);
}

.button.is-disabled,
.button.is-disabled:hover {
  background: #f3f4f6 !important;
  border-color: #d7dbe0 !important;
  color: #808891 !important;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.button.is-dark:hover {
  background: var(--primary-hover) !important;
  transform: translateY(-1px);
}

.paper-section {
  padding: 4rem 1.5rem;
}

.section-alt {
  background: var(--background-secondary);
  border-top: 1px solid #f0f0f0;
  border-bottom: 1px solid #f0f0f0;
}

.section-heading {
  margin-bottom: 2rem;
  text-align: center;
}

.title.is-3 {
  margin-bottom: 0.75rem !important;
  color: var(--text-primary);
  font-weight: 800 !important;
}

.section-subtitle {
  max-width: 720px;
  margin: 0 auto;
  color: var(--text-secondary);
}

.paper-copy {
  max-width: 860px;
  margin: 0 auto;
  color: var(--text-secondary);
  font-size: 1.06rem;
}

.paper-copy p {
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
}

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

.highlight-card {
  height: 100%;
  padding: 1.5rem;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  box-shadow: none;
}

.highlight-card h3 {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
  font-weight: 700;
  text-align: center;
}

.highlight-card p {
  margin: 0;
  color: var(--text-secondary);
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
}

.figure-block {
  margin: 0 auto 2.25rem;
  padding: 1.5rem 1.5rem 1.35rem;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
}

.figure-block:last-child {
  margin-bottom: 0;
}

.paper-figure {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid #ededed;
  background: #ffffff;
  box-shadow: 0 6px 18px -18px rgb(10 10 10 / 0.12);
}

.paper-figure-medium {
  max-width: 820px;
  margin: 0 auto;
}

.paper-figure-hero {
  max-width: 600px;
  margin: 0 auto;
}

.paper-figure-narrow {
  max-width: 900px;
  margin: 0 auto;
}

.paper-figure-small {
  display: block;
  width: min(100%, 520px);
  max-width: 520px;
  margin: 0 auto;
}

.paper-figure-wide {
  margin: 0;
}

.figure-caption {
  margin: 1rem 0 0;
  color: var(--text-secondary);
  font-size: 0.98rem;
  max-width: 940px;
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
}

.caption-label {
  color: var(--text-primary);
  font-weight: 600;
}

.hero-caption {
  margin-left: auto;
  margin-right: auto;
}

.video-groups {
  display: grid;
  gap: 1.5rem;
  margin-top: 2rem;
}

.video-group-card {
  padding: 1.5rem;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
}

.video-group-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.video-group-header h3 {
  margin: 0 0 0.35rem;
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--text-primary);
}

.video-group-header p {
  margin: 0;
  color: var(--text-secondary);
}

.video-toggle-btn {
  flex-shrink: 0;
  border: 1px solid #d7e1ef;
  border-radius: 999px;
  padding: 0.68rem 1rem;
  background: #f5f8fc;
  color: var(--primary-color);
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.video-toggle-btn:hover {
  background: #edf3fb;
  border-color: #ccdaee;
}

.video-feature {
  max-width: 760px;
  margin: 0 auto;
}

.video-shell {
  overflow: hidden;
  border: 1px solid #ededed;
  border-radius: 12px;
  background: #f7f8fa;
  box-shadow: 0 6px 18px -18px rgb(10 10 10 / 0.12);
}

.video-shell video {
  display: block;
  width: 100%;
  max-height: 256px;
  height: auto;
  object-fit: contain;
  background: #000;
}

.video-caption {
  margin: 0.85rem 0 0;
  color: var(--text-secondary);
  font-size: 0.96rem;
  text-align: center;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}

.video-grid.is-collapsed {
  display: none;
}

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

.bibtex-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

pre {
  margin: 0;
  padding: 1.5rem !important;
  overflow-x: auto;
  background: #f8f8f8 !important;
  border: 1px solid var(--border-color) !important;
  border-radius: var(--border-radius) !important;
  box-shadow: var(--shadow-sm);
}

code {
  background: transparent !important;
  color: var(--text-primary) !important;
  font-family: 'SF Mono', 'Monaco', 'Cascadia Code', 'Roboto Mono', monospace !important;
  font-size: 0.92rem;
}

.copy-bibtex-btn {
  border: none;
  border-radius: 999px;
  padding: 0.72rem 1rem;
  background: var(--primary-color);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.copy-bibtex-btn:hover {
  background: var(--primary-hover);
}

.copy-bibtex-btn.copied {
  background: #3273dc;
}

.copy-bibtex-btn.copied .copy-text::after {
  content: "ied";
}

.footer {
  padding: 3rem 1.5rem;
  background: var(--background-primary);
}

.footer .content {
  color: var(--text-secondary);
}

.scroll-to-top {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: var(--primary-color);
  color: #fff;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  cursor: pointer;
  transition: var(--transition);
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-to-top:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
}

.button:focus,
.copy-bibtex-btn:focus,
a:focus {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

@media screen and (max-width: 768px) {
  .hero-paper .hero-body,
  .paper-section {
    padding: 3rem 1rem;
  }

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

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

  .figure-block {
    padding: 1rem;
  }

  .video-group-card {
    padding: 1rem;
  }

  .video-group-header {
    flex-direction: column;
  }

  .video-toggle-btn {
    width: 100%;
  }

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

  .bibtex-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .link-block {
    display: block;
    margin: 0.45rem 0;
  }

  .link-block .button {
    width: 100%;
    justify-content: center;
  }
}

@media screen and (max-width: 480px) {
  .publication-title {
    font-size: 1.95rem !important;
  }

  .publication-affiliations {
    font-size: 0.95rem;
  }
}

@media print {
  .scroll-to-top,
  .copy-bibtex-btn {
    display: none;
  }

  body {
    background: #fff;
  }

  .figure-block,
  pre {
    box-shadow: none !important;
  }
}
