:root {
  --text-main: #1f2933;
  --text-muted: #5f6b7a;
  --line: #e5e7eb;
  --soft: #f7f8fa;
}

html {
  scroll-behavior: smooth;
}

body {
  color: var(--text-main);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

.container.is-max-desktop {
  max-width: min(960px, calc(100vw - 2rem)) !important;
}

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

.publication-title {
  max-width: min(980px, calc(100vw - 2rem));
  margin: 0 auto 1.25rem;
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: 0;
  overflow-wrap: anywhere;
  word-break: normal;
}

.title-line {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  white-space: nowrap;
}

.title-mark {
  width: 0.9em;
  height: 0.9em;
  object-fit: contain;
  flex: 0 0 auto;
}

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

.publication-note {
  margin-top: 0.35rem;
  color: var(--text-muted);
}

.publication-venue {
  margin-top: 0.25rem;
  color: #7c3aed;
  font-weight: 700;
  letter-spacing: 0;
}

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

.publication-links {
  margin-top: 1.35rem;
  max-width: 100%;
}

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

.button.is-dark {
  background-color: #22272e;
}

.button {
  white-space: normal;
}

.button.is-dark:hover {
  background-color: #111827;
}

.disabled-link {
  cursor: not-allowed;
  opacity: 0.55;
}

.hf-icon {
  font-size: 1.1em;
  line-height: 1;
}

.teaser .hero-body {
  padding-top: 1.25rem;
  padding-bottom: 2.75rem;
}

.teaser .subtitle {
  margin: 1.2rem auto 0;
  max-width: 850px;
  color: var(--text-muted);
  font-size: 1.15rem;
  line-height: 1.55;
}

.paper-image,
.result-figure img {
  width: 100%;
  max-width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.paper-image {
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.section {
  padding: 3.5rem 1.5rem;
}

.section.is-light {
  background: var(--soft);
}

.title {
  letter-spacing: 0;
}

.content p {
  color: var(--text-main);
}

.narrow-copy {
  max-width: 850px;
  margin: 0 auto 1.5rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
  margin: 0 auto 1.8rem;
  max-width: 100%;
}

.stats-grid div {
  padding: 1.15rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  text-align: center;
}

.stats-grid strong {
  display: block;
  font-size: 1.85rem;
  line-height: 1;
}

.stats-grid span {
  display: block;
  margin-top: 0.45rem;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.result-figure {
  max-width: 980px;
  margin: 1.25rem auto 0;
}

.result-figure img {
  display: block;
}

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

.copy-bibtex-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 2.4rem;
  padding: 0 0.85rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text-main);
  cursor: pointer;
  font-weight: 600;
}

pre {
  border-radius: 6px;
  background: #f3f4f6;
}

.footer {
  padding: 2rem 1.5rem;
  background: #fff;
  border-top: 1px solid var(--line);
}

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

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

  .publication-authors {
    font-size: 1rem !important;
  }

  .publication-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.55rem;
    max-width: 340px;
    margin-left: auto;
    margin-right: auto;
  }

  .link-block,
  .link-block .button {
    width: 100%;
  }

  .link-block {
    margin: 0;
  }

  .button {
    justify-content: center;
  }

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

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

@media (max-width: 520px) {
  .container.is-max-desktop {
    max-width: min(340px, calc(100vw - 2rem)) !important;
  }

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

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

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