:root {
  --primary-color: #2563eb;
  --primary-hover: #1d4ed8;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-light: #94a3b8;
  --background-primary: #ffffff;
  --background-secondary: #f8fafc;
  --background-accent: #f1f5f9;
  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --gradient-accent: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --border-radius: 12px;
  --border-radius-lg: 16px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --topbar-height: 5.5rem;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--topbar-height) + 1rem);
}
body {
  font-family: "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-primary);
  line-height: 1.6;
  font-size: 16px;
  background-color: var(--background-primary);
  -webkit-font-smoothing: antialiased;
}

/* ---------------------------------------------------------------
   Top bar
   --------------------------------------------------------------- */
.site-topbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgb(255 255 255 / 0.92);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border-color);
}
.topbar-inner {
  max-width: calc(960px + 3rem);
  margin: 0 auto;
  padding: 0.7rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.topbar-logos {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-shrink: 0;
}
.topbar-logo-link {
  display: flex;
  align-items: center;
}
.topbar-logo {
  height: 64px;
  width: auto;
  display: block;
  object-fit: contain;
}
.topbar-nav {
  display: flex;
  align-items: center;
  gap: 1.35rem;
  min-width: 0;
}
.topbar-nav a {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  white-space: nowrap;
  padding: 0.2rem 0;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
}
.topbar-nav a:hover,
.topbar-nav a.is-active {
  color: var(--text-primary);
  border-bottom-color: var(--primary-color);
}
.topbar-nav a:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------------------------------------------------------------
   Hero and publication links
   --------------------------------------------------------------- */
.hero .hero-body {
  padding-top: 3.5rem;
}
.button {
  border-radius: var(--border-radius) !important;
  font-weight: 600 !important;
  transition: var(--transition) !important;
}
.button.is-dark {
  background: var(--text-primary) !important;
  border: none !important;
  color: white !important;
  box-shadow: var(--shadow-md);
}
.button.is-dark:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  background: var(--primary-color) !important;
  color: white !important;
}
.link-block a {
  margin: 8px 4px;
}
.link-logo {
  height: 18px;
  width: auto;
  margin-right: 0.45rem;
  vertical-align: middle;
  filter: brightness(0) invert(1);
}
.link-logo.no-invert {
  filter: none;
}
.hero.is-light {
  background: var(--background-secondary);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}
.publication-title {
  font-family: "Inter", sans-serif !important;
  font-weight: 800 !important;
  color: var(--text-primary) !important;
  margin-bottom: 1.5rem !important;
  line-height: 1.15 !important;
}
.publication-authors {
  font-weight: 500;
  margin-bottom: 0.75rem;
}
.publication-authors a {
  color: var(--primary-color) !important;
  text-decoration: none;
  font-weight: 600;
}
.publication-authors a:hover {
  color: var(--primary-hover) !important;
}
.author-block {
  display: inline-block;
  margin: 0 0.35rem;
}
.publication-venue {
  color: var(--text-secondary);
  font-weight: 600;
  background: var(--background-accent);
  padding: 0.45rem 0.9rem;
  border-radius: var(--border-radius);
  margin-top: 0.75rem;
  display: inline-block;
}
.publication-banner img {
  width: 100%;
  height: auto;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg);
}
.teaser .hero-body {
  padding-top: 2rem;
  padding-bottom: 3rem;
}

/* ---------------------------------------------------------------
   Sections
   --------------------------------------------------------------- */
.title.is-3 {
  font-family: "Inter", sans-serif !important;
  font-weight: 700 !important;
  color: var(--text-primary);
  margin-bottom: 1.5rem !important;
  position: relative;
  padding-bottom: 0.85rem;
}
.title.is-3::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--gradient-accent);
  border-radius: 2px;
}
.title.is-4 {
  font-weight: 700 !important;
  color: var(--text-primary);
  margin-top: 2rem;
  margin-bottom: 1rem;
}
.content.has-text-justified {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-secondary);
}
.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin: 1.5rem 0 0.5rem;
}
@media screen and (max-width: 1100px) {
  .metric-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
.metric-card {
  background: var(--background-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 1.1rem 1.15rem;
  box-shadow: var(--shadow-sm);
}
.metric-card h4 {
  margin: 0 0 0.4rem;
  font-size: 1rem;
  color: var(--text-primary);
}
.metric-card p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.5;
}
.table-wrap {
  overflow-x: auto;
  margin: 1rem 0 0.5rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
}
.results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  background: white;
  margin: 0 !important;
}
.results-table th,
.results-table td {
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid var(--border-color);
  text-align: right;
  white-space: nowrap;
}
.results-table th {
  background: var(--background-accent);
  color: var(--text-primary);
  font-weight: 700;
}
.results-table td:first-child,
.results-table th:first-child {
  text-align: left;
  font-weight: 600;
}
.results-table tbody tr:hover {
  background: #f8fafc;
}
.results-table .best {
  font-weight: 800;
}
.table-caption {
  font-size: 0.92rem;
  color: var(--text-secondary);
  margin: 0.75rem 0 1.75rem;
  line-height: 1.55;
}
.group-head {
  text-align: center !important;
  border-bottom: 1px solid var(--border-color);
}

/* ---------------------------------------------------------------
   Footer, BibTeX, utilities
   --------------------------------------------------------------- */
.footer {
  background: var(--background-secondary);
  border-top: 1px solid var(--border-color);
  padding: 3rem 1.5rem;
}
.footer .content {
  color: var(--text-secondary);
  line-height: 1.7;
}
.footer a {
  color: var(--primary-color);
  text-decoration: none;
}
.footer a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}
.sponsor-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin: 1.25rem 0 1.75rem;
}
.sponsor-row img {
  height: 42px;
  width: auto;
  object-fit: contain;
}
pre {
  background: var(--background-accent) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: var(--border-radius) !important;
  padding: 1.5rem !important;
  font-size: 0.9rem !important;
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
  white-space: pre-wrap;
}
.bibtex-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}
.copy-bibtex-btn {
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--border-radius);
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.copy-bibtex-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.copy-bibtex-btn.copied {
  background: #10b981;
}
.scroll-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: var(--shadow-lg);
}
.scroll-to-top:hover {
  background: var(--primary-hover);
  transform: translateY(-3px);
}
.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
}
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.hero,
.section {
  animation: fadeInUp 0.6s ease-out;
}

/* ---------------------------------------------------------------
   Responsive
   --------------------------------------------------------------- */
@media screen and (max-width: 900px) {
  .topbar-inner {
    padding: 0.6rem 1rem;
    gap: 1rem;
  }
  .topbar-nav {
    gap: 1rem;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .topbar-nav::-webkit-scrollbar {
    display: none;
  }
}
@media screen and (max-width: 640px) {
  :root {
    --topbar-height: 8.5rem;
  }
  .topbar-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 0.55rem;
  }
  .topbar-logos {
    justify-content: center;
    gap: 1rem;
  }
  .topbar-logo {
    height: 52px;
  }
  .topbar-nav {
    justify-content: flex-start;
    padding-bottom: 0.15rem;
  }
}
@media screen and (max-width: 768px) {
  .publication-title {
    font-size: 1.85rem !important;
  }
  .metric-grid {
    grid-template-columns: 1fr;
  }
  .button {
    margin: 0.25rem !important;
  }
  .sponsor-row img {
    height: 32px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .hero,
  .section {
    animation: none;
  }
  * {
    transition-duration: 0.01ms !important;
  }
}