:root {
  --primary: #3273dc;
  --primary-dark: #2366c4;
  --text: #363636;
  --muted: #6b7280;
  --light: #f5f5f5;
  --border: #e5e7eb;
}

html {
  scroll-behavior: smooth;
}

body {
  color: var(--text);
  font-family: "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.6rem 0.9rem;
  color: #fff;
  background: #222;
  border-radius: 4px;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.publication-header .hero-body {
  padding: 5rem 1.5rem 2.25rem;
}

.publication-header .container.is-max-desktop {
  max-width: 1120px;
}

.publication-venue {
  display: inline-block;
  margin: 0 0 1.1rem;
  padding: 0.3rem 0.75rem;
  color: var(--primary-dark);
  background: #eef5ff;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
}

.publication-title {
  max-width: 1120px;
  margin: 0 auto 1.7rem !important;
  color: #222 !important;
  font-size: clamp(2.2rem, 4.2vw, 3.35rem) !important;
  font-weight: 700 !important;
  line-height: 1.15 !important;
  letter-spacing: -0.035em;
}

.publication-title-line {
  display: block;
  white-space: nowrap;
}

.publication-authors {
  margin-bottom: 0.55rem;
  font-family: "Inter", sans-serif;
}

.author-block {
  display: inline-block;
  margin: 0 0.38rem;
  color: var(--primary);
  font-weight: 500;
}

.publication-authors .author-block a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.publication-authors .author-block a:hover,
.publication-authors .author-block a:focus-visible {
  color: var(--primary-dark);
  border-bottom-color: currentColor;
}

.publication-authors sup {
  color: #4b5563;
  font-size: 0.65em;
}

.publication-affiliations {
  color: var(--muted);
  line-height: 1.55;
}

.publication-affiliations .author-block {
  color: var(--muted);
  font-weight: 400;
}

.contribution-note {
  color: #8a8a8a;
  font-size: 0.78rem;
}

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

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

.resource-button {
  min-width: 7.4rem;
  justify-content: center;
  color: #fff !important;
  background: #363636 !important;
  border: 0 !important;
  box-shadow: none !important;
}

.resource-button:disabled {
  opacity: 0.72;
  cursor: not-allowed;
}

.resource-button:not(:disabled):hover,
.resource-button:not(:disabled):focus {
  background: #1f1f1f !important;
}

.arxiv-icon img {
  width: auto;
  height: 1.25rem;
  filter: invert(1);
}

.resource-note {
  margin-top: 0.4rem;
  color: #9b9b9b;
  font-size: 0.72rem;
}

.citation-section {
  border-top: 1px solid #e7ecf3;
  background: #fff;
}

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

.citation-heading .title {
  margin: 0;
  color: #262626;
}

.copy-bibtex {
  min-width: 7.5rem;
  height: 3rem;
  border: 0;
  background: #2864e8;
  color: #fff;
  font-weight: 600;
  box-shadow: none;
}

.copy-bibtex:hover,
.copy-bibtex:focus {
  background: #174fc9;
  color: #fff;
}

.citation-box {
  margin: 0;
}

.citation-box pre {
  margin: 0;
  padding: 2rem 2.25rem;
  overflow-x: auto;
  border: 1px solid #dce5f0;
  border-radius: 0.75rem;
  background: #f2f5f9;
  color: #1f2c42;
  box-shadow: 0 2px 5px rgba(31, 44, 66, 0.08);
  text-align: left;
  font-size: 1rem;
  line-height: 1.55;
}

.copy-status {
  min-height: 1.5rem;
  margin-top: 0.5rem;
  color: #666;
  font-size: 0.85rem;
}

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

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

.teaser-figure img {
  width: 100%;
  border-radius: 8px;
}

.teaser-figure figcaption,
.publication-figure figcaption {
  margin-top: 0.9rem;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.55;
}

.hero.is-light {
  background: var(--light);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section {
  padding: 4.5rem 1.5rem;
}

.section .title.is-3 {
  margin-bottom: 2rem;
  color: #2b2b2b;
  font-weight: 600;
}

.section-intro {
  max-width: 850px;
  margin: 0 auto 2.2rem;
  font-size: 1rem;
  line-height: 1.8;
}

.motivation-section {
  border-bottom: 1px solid var(--border);
}

.content.has-text-justified {
  line-height: 1.8;
}

.publication-figure {
  margin: 2rem auto;
  text-align: center;
}

.publication-figure img {
  width: 100%;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
}

.method-columns,
.motivation-points {
  margin-top: 2.6rem;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.method-columns .column,
.motivation-points .column {
  padding: 1.8rem 1.5rem;
}

.method-columns .column + .column,
.motivation-points .column + .column {
  border-left: 1px solid var(--border);
}

.method-columns .title,
.motivation-points .title {
  margin-bottom: 0.65rem !important;
  color: #333;
  font-size: 1rem;
  font-weight: 600;
}

.method-columns p,
.motivation-points p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.65;
}

.benchmark-metrics {
  margin-top: 2.5rem;
  padding-top: 1.6rem;
  border-top: 1px solid #ddd;
}

.benchmark-metrics .column {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.benchmark-metrics strong {
  color: var(--primary-dark);
  font-size: 1rem;
  font-weight: 600;
}

.benchmark-metrics span {
  color: var(--muted);
  font-size: 0.76rem;
}

.results-figure {
  max-width: 1050px;
  margin-bottom: 4.5rem;
}

.qualitative-section {
  max-width: 920px;
  margin: 0 auto;
  padding-top: 0.5rem;
}

.qualitative-section .title {
  margin-bottom: 0.7rem !important;
}

.qualitative-intro {
  margin: 0 0 0.55rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.highlight-legend {
  margin: 0 0 2.2rem;
  color: var(--muted);
  font-size: 0.74rem;
}

.highlight-legend span {
  display: inline-block;
  margin-right: 0.38rem;
  color: #ff0000;
  font-weight: 600;
}

.qualitative-image {
  max-width: 210px;
  margin: 0 auto 2.8rem;
  text-align: center;
}

.qualitative-image img {
  width: 100%;
  border-radius: 5px;
}

.qualitative-image figcaption {
  margin-top: 0.65rem;
  color: var(--muted);
  font-size: 0.74rem;
}

.qualitative-comparisons {
  display: grid;
  gap: 2rem;
}

.comparison-example h4 {
  margin: 0 0 0.75rem;
  color: #333;
  font-size: 0.9rem;
  font-weight: 600;
}

.caption-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.caption-box {
  min-height: 100%;
  padding: 1rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 5px;
}

.caption-label {
  display: inline-block;
  margin-bottom: 0.55rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.caption-box p {
  margin: 0;
  color: #555;
  font-size: 0.8rem;
  line-height: 1.7;
}

.zero-shot-caption {
  background: #fff;
  border-color: var(--border);
}

.zero-shot-caption .caption-label {
  color: #222;
}

.figure-red {
  color: #ff0000;
}

.focus-caption {
  background: #fff;
  border-color: var(--border);
}

.focus-caption .caption-label {
  color: #222;
}

.footer {
  padding: 2.5rem 1.5rem;
  background: #f5f5f5;
}

.footer .content {
  color: #777;
  font-size: 0.78rem;
}

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

.scroll-top {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  width: 2.6rem;
  height: 2.6rem;
  display: grid;
  place-items: center;
  color: #fff;
  background: #363636;
  border: 0;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.16);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.scroll-top.visible {
  opacity: 0.9;
  pointer-events: auto;
  transform: translateY(0);
}

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

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

  .publication-title-line {
    white-space: normal;
  }

  .section {
    padding: 3.5rem 1rem;
  }

  .content.has-text-justified,
  .section-intro {
    text-align: left !important;
  }

  .method-columns,
  .motivation-points {
    border-bottom: 0;
  }

  .method-columns .column,
  .motivation-points .column {
    border-bottom: 1px solid var(--border);
  }

  .method-columns .column + .column,
  .motivation-points .column + .column {
    border-left: 0;
  }

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

  .caption-pair {
    grid-template-columns: 1fr;
  }

  .qualitative-image {
    max-width: 260px;
    margin: 0 auto 2.2rem;
  }

  .citation-heading {
    align-items: center;
  }

  .copy-bibtex {
    min-width: 6.5rem;
    height: 2.75rem;
  }

  .citation-box pre {
    padding: 1.5rem;
    font-size: 0.85rem;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
