:root {
  --ink: #102033;
  --muted: #5d6b7d;
  --line: #d9e2ec;
  --paper: #ffffff;
  --soft: #f4f8fb;
  --blue: #1d4ed8;
  --teal: #0f766e;
  --amber: #b45309;
  --shadow: 0 18px 45px rgba(16, 32, 51, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  display: block;
  max-width: 100%;
}

.hero.publication-header {
  padding: 72px 0 46px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(244, 248, 251, 0.98), rgba(255, 255, 255, 0.96)),
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.14), transparent 34%),
    radial-gradient(circle at bottom right, rgba(180, 83, 9, 0.12), transparent 30%);
}

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

.publication-title {
  max-width: 1020px;
  margin: 0 auto 26px !important;
  color: var(--ink) !important;
  font-size: clamp(2.1rem, 4.8vw, 4.4rem) !important;
  font-weight: 800 !important;
  line-height: 1.1 !important;
  letter-spacing: 0;
}

.publication-authors {
  margin-bottom: 10px;
  color: var(--ink);
  font-weight: 700;
}

.publication-venue {
  display: inline-block;
  margin-top: 12px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.1);
  color: var(--teal);
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.publication-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 26px;
}

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

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px !important;
  font-weight: 800 !important;
  box-shadow: 0 8px 20px rgba(16, 32, 51, 0.08);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
  text-decoration: none;
  box-shadow: 0 12px 26px rgba(16, 32, 51, 0.12);
}

.button.is-dark {
  border-color: var(--blue) !important;
  background: var(--blue) !important;
  color: #ffffff !important;
}

.hero.teaser .hero-body {
  padding: 38px 1.5rem 52px;
}

.publication-banner {
  overflow: hidden;
  margin: 0 auto 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.publication-banner img {
  width: 100%;
}

.subtitle {
  color: var(--muted);
}

.section {
  padding: 62px 1.5rem;
}

.hero.is-light {
  border-block: 1px solid var(--line);
  background: var(--soft);
}

.title.is-3 {
  margin-bottom: 22px !important;
  color: var(--ink) !important;
  font-size: 2rem !important;
  font-weight: 800 !important;
  line-height: 1.15;
  letter-spacing: 0;
}

.content.has-text-justified,
.publication-body {
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.7;
}

.content.has-text-justified p,
.publication-body p {
  margin-bottom: 16px;
}

.result-box {
  height: 100%;
  min-height: 190px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.result-box h3 {
  margin: 0 0 12px;
  color: var(--teal);
  font-size: 1.15rem;
  font-weight: 800;
}

.result-box p {
  color: var(--muted);
}

.metric {
  margin: 0 0 10px;
  color: var(--teal) !important;
  font-size: 2.35rem;
  font-weight: 800;
  line-height: 1;
}

.publication-body img,
.publication-body figure img {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.94rem;
}

.table {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.paper-frame {
  width: 100%;
  height: min(76vh, 760px);
  min-height: 520px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.supplement-link {
  margin-top: 14px;
  color: var(--muted);
}

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

.copy-bibtex-btn,
.scroll-to-top,
.more-works-btn,
.close-btn {
  cursor: pointer;
  font: inherit;
}

.copy-bibtex-btn {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: #ffffff;
  font-weight: 800;
}

pre {
  overflow-x: auto;
  margin: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0d1726;
  color: #edf5ff;
  font-size: 0.93rem;
  line-height: 1.55;
}

pre code {
  color: inherit;
  background: transparent;
}

.equation,
.math-block {
  border-left: 4px solid var(--amber);
  background: #ffffff;
  color: var(--ink);
}

.math-block {
  overflow-x: auto;
  margin: 20px 0;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-radius: 8px;
  font-size: 1.05rem;
}

.scroll-to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 10;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
  color: #ffffff;
  box-shadow: 0 8px 22px rgba(16, 32, 51, 0.22);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.scroll-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}

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

.more-works-container {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 20;
}

.more-works-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--ink);
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(16, 32, 51, 0.08);
}

.more-works-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(380px, calc(100vw - 36px));
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
}

.more-works-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.dropdown-header h4 {
  margin: 0;
  color: var(--ink);
  font-weight: 800;
}

.close-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
}

.works-list {
  padding: 10px;
}

.work-item {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 12px;
  border-radius: 8px;
  color: inherit;
}

.work-item:hover {
  background: var(--soft);
  text-decoration: none;
}

.work-info h5 {
  margin: 0 0 4px;
  color: var(--ink);
  font-weight: 800;
}

.work-info p {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.9rem;
}

.work-venue {
  color: var(--teal);
  font-size: 0.82rem;
  font-weight: 800;
}

.footer {
  padding: 30px 1.5rem;
  border-top: 1px solid var(--line);
  background: #ffffff;
  color: var(--muted);
  font-size: 0.95rem;
}

.footer p {
  margin: 0;
}

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

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

  .section {
    padding: 44px 1rem;
  }

  .publication-links {
    display: grid;
    grid-template-columns: 1fr;
  }

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

  .paper-frame {
    min-height: 420px;
  }

  .more-works-container {
    top: auto;
    right: 14px;
    bottom: 72px;
  }
}
