:root {
  --primary-color: #2563eb;
  --primary-hover: #1d4ed8;
  --accent-color: #0ea5e9;
  --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-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --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);
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--background-primary);
  color: var(--text-primary);
  font-family: "Inter", "Google Sans", "Noto Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.hero {
  position: relative;
  overflow: hidden;
}

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

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

.publication-title {
  color: var(--text-primary) !important;
  font-family: "Inter", "Google Sans", sans-serif !important;
  font-weight: 800 !important;
  line-height: 1.1 !important;
  margin-bottom: 1.5rem !important;
}

.project-kicker {
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  background: var(--background-accent);
  color: var(--primary-color);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-tagline {
  max-width: 780px;
  margin: 0 auto 1.75rem;
  color: var(--text-secondary);
}

.publication-authors {
  margin-bottom: 1rem;
  font-family: "Inter", "Google Sans", sans-serif !important;
  font-weight: 500;
}

.author-block {
  display: inline-block;
  margin-right: 0.5rem;
}

.affiliation-block {
  margin-top: 1rem;
  color: var(--text-secondary);
}

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

.link-block a {
  margin: 8px 4px;
}

.button {
  position: relative;
  overflow: hidden;
  border: 2px solid transparent !important;
  border-radius: var(--border-radius) !important;
  font-weight: 700 !important;
  transition: var(--transition) !important;
}

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

.button.is-dark:hover {
  transform: translateY(-2px);
  background: var(--primary-color) !important;
  box-shadow: var(--shadow-lg);
}

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

.teaser .hero-body {
  padding-top: 2rem;
  padding-bottom: 4rem;
}

.project-figure {
  margin: 0 auto 2rem;
  padding: 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  background: var(--background-primary);
  box-shadow: var(--shadow-lg);
}

.project-figure.hero-figure {
  margin-bottom: 1.5rem;
}

.project-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--border-radius);
}

.project-figure figcaption {
  max-width: 860px;
  margin: 1rem auto 0;
  color: var(--text-secondary);
  font-size: 0.98rem;
  text-align: center;
}

.compact-figure {
  max-width: 760px;
}

.teaser-panel {
  padding: 2rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  background:
    radial-gradient(circle at top left, rgb(37 99 235 / 0.12), transparent 32rem),
    var(--background-primary);
  box-shadow: var(--shadow-lg);
}

.teaser-title {
  margin-bottom: 1rem !important;
  padding-bottom: 0 !important;
}

.teaser-title::after {
  display: none;
}

.instruction-bubble {
  margin: 0 auto 1rem;
  padding: 1.25rem;
  border-radius: var(--border-radius-lg);
  background: var(--background-primary);
  text-align: left;
  box-shadow: var(--shadow-md);
}

.instruction-bubble.is-response {
  border-left: 4px solid var(--primary-color);
  background: linear-gradient(135deg, #eff6ff, #f8fafc);
}

.bubble-label {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--text-light);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.instruction-bubble p {
  margin: 0;
  color: var(--text-primary);
  font-size: 1.05rem;
  font-weight: 700;
}

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

.section-lead {
  max-width: 740px;
  margin: -1rem auto 2rem;
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.title.is-3 {
  position: relative;
  margin-bottom: 2rem !important;
  padding-bottom: 1rem;
  color: var(--text-primary);
  font-family: "Inter", "Google Sans", sans-serif !important;
  font-weight: 800 !important;
}

.title.is-3::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 60px;
  height: 3px;
  border-radius: 2px;
  background: var(--gradient-accent);
  transform: translateX(-50%);
}

.content.has-text-justified {
  color: var(--text-secondary);
  font-size: 1.1rem;
  line-height: 1.8;
}

.content.has-text-justified p {
  margin-bottom: 1.5rem;
}

.pipeline-grid,
.results-grid,
.visual-grid {
  display: grid;
  gap: 1rem;
}

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

.visual-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
}

.pipeline-card,
.result-card {
  height: 100%;
  padding: 1.5rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  background: var(--background-primary);
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.pipeline-card:hover,
.result-card:hover,
.visual-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.pipeline-index {
  display: inline-block;
  margin-bottom: 1rem;
  color: var(--accent-color);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.pipeline-card h3 {
  margin-bottom: 0.75rem;
  color: var(--text-primary);
  font-size: 1.2rem;
  font-weight: 800;
}

.pipeline-card p,
.result-card p {
  color: var(--text-secondary);
}

.result-value {
  display: block;
  color: var(--primary-color);
  font-size: 2.4rem;
  font-weight: 900;
  line-height: 1;
}

.result-label {
  display: block;
  margin: 0.6rem 0 0.75rem;
  color: var(--text-primary);
  font-size: 1.05rem;
  font-weight: 800;
}

.visual-card {
  margin-bottom: 0;
  transition: var(--transition);
}

.visual-card img {
  height: 360px;
  object-fit: contain;
  background: #fff;
}

.visual-card figcaption {
  font-weight: 800;
}

pre {
  overflow-x: auto;
  padding: 1.5rem !important;
  border: 1px solid var(--border-color) !important;
  border-radius: var(--border-radius) !important;
  background: var(--background-accent) !important;
  box-shadow: var(--shadow-sm);
  font-size: 0.9rem !important;
}

code {
  background: var(--background-accent) !important;
  color: var(--text-primary) !important;
  font-family: "SF Mono", "Monaco", "Cascadia Code", "Roboto Mono", monospace !important;
}

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

.copy-bibtex-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: var(--border-radius);
  background: var(--primary-color);
  color: #fff;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 700;
  transition: var(--transition);
}

.copy-bibtex-btn:hover {
  transform: translateY(-2px);
  background: var(--primary-hover);
  box-shadow: var(--shadow-md);
}

.copy-bibtex-btn.copied {
  background: #10b981;
}

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

.scroll-to-top:hover {
  transform: translateY(-3px);
  background: var(--primary-hover);
  box-shadow: var(--shadow-xl);
}

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

.footer {
  padding: 3rem 1.5rem;
  border-top: 1px solid var(--border-color);
  background: var(--background-secondary);
}

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

.footer a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
}

.footer a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

.footer .icon-link {
  display: inline-block;
  margin: 0 0.35rem 1rem;
  color: var(--text-secondary);
  font-size: 25px;
  transition: var(--transition);
}

.footer .icon-link:hover {
  transform: translateY(-2px);
  color: var(--primary-color);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero,
.section {
  animation: fadeInUp 0.6s ease-out;
}

.button:focus,
a:focus,
button:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

@media screen and (max-width: 1024px) {
  .visual-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

  .publication-header .hero-body {
    padding: 3rem 1rem 2rem;
  }

  .publication-title {
    font-size: 2.5rem !important;
    line-height: 1.2 !important;
  }

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

  .teaser .hero-body {
    padding: 1rem;
  }

  .teaser-panel {
    padding: 1.25rem;
  }

  .pipeline-grid,
  .results-grid,
  .visual-grid {
    grid-template-columns: 1fr;
  }

  .visual-card img {
    height: auto;
    max-height: 520px;
  }

  .content.has-text-justified {
    font-size: 1rem;
  }

  .button {
    margin: 0.25rem !important;
    font-size: 0.875rem !important;
  }
}

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

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

@media print {
  .hero,
  .section {
    animation: none;
  }

  .scroll-to-top {
    display: none;
  }
}
