/* ===== Design Tokens ===== */
:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --accent: #0ea5e9;
  --text-primary: #1e293b;
  --text-secondary: #475569;
  --text-light: #94a3b8;
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-accent: #f1f5f9;
  --border: #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%);
  --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-warm: linear-gradient(135deg, #f97316 0%, #ef4444 100%);
  --radius: 12px;
  --radius-lg: 16px;
  --ease: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Base ===== */
html {
  scroll-behavior: smooth;
}

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

/* ===== Sections ===== */
.hero.is-light,
section.hero.is-light {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

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

/* ===== Section Titles ===== */
.title.is-3 {
  font-family: 'Google Sans', 'Inter', sans-serif !important;
  font-weight: 700 !important;
  color: var(--text-primary);
  margin-bottom: 2rem !important;
  position: relative;
  padding-bottom: 1rem;
}

.has-text-centered .title.is-3::after,
.has-text-centered > .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;
}

/* Left-aligned section titles also get the accent bar */
.columns .title.is-3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: var(--gradient-accent);
  border-radius: 2px;
}

/* ===== Publication Header ===== */
.publication-title {
  font-family: 'Google Sans', 'Inter', sans-serif !important;
  font-weight: 800 !important;
  color: var(--text-primary) !important;
  margin-bottom: 1.5rem !important;
  line-height: 1.15 !important;
  letter-spacing: -0.02em;
}

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

.publication-authors a {
  color: var(--primary) !important;
  text-decoration: none;
  font-weight: 600;
  transition: var(--ease);
  position: relative;
}

.publication-authors a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -2px;
  left: 0;
  background: var(--gradient-accent);
  transition: var(--ease);
}

.publication-authors a:hover::after {
  width: 100%;
}

.publication-authors a:hover {
  color: var(--primary-hover) !important;
}

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

/* ===== Venue Badge ===== */
.publication-venue {
  display: inline-block;
  margin-top: 0.6rem;
  padding: 0.4rem 1.2rem;
  background: var(--gradient-warm);
  color: #fff !important;
  font-weight: 700;
  font-size: 1.05rem;
  border-radius: 24px;
  letter-spacing: 0.03em;
  box-shadow: 0 4px 14px -3px rgba(239, 68, 68, 0.45);
  animation: venuePulse 3s ease-in-out infinite;
}

@keyframes venuePulse {
  0%, 100% { box-shadow: 0 4px 14px -3px rgba(239, 68, 68, 0.45); }
  50% { box-shadow: 0 4px 20px -3px rgba(239, 68, 68, 0.65); }
}

.eql-cntrb {
  font-size: 0.875rem;
  color: var(--text-light);
  font-style: italic;
}

/* ===== Buttons ===== */
.button {
  border-radius: var(--radius) !important;
  font-weight: 600 !important;
  transition: var(--ease) !important;
  border: 2px solid transparent !important;
  position: relative;
  overflow: hidden;
}

.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) !important;
}

.button.is-dark:active {
  transform: translateY(0);
}

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

/* ===== Content ===== */
.content.has-text-justified {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

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

/* ===== Highlights Section ===== */
.highlights-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.highlight-card {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  text-align: center;
  transition: var(--ease);
  box-shadow: var(--shadow-sm);
}

.highlight-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.highlight-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #fff;
}

.highlight-icon.icon-reason {
  background: linear-gradient(135deg, #667eea, #764ba2);
}

.highlight-icon.icon-reject {
  background: linear-gradient(135deg, #f97316, #ef4444);
}

.highlight-icon.icon-free {
  background: linear-gradient(135deg, #10b981, #06b6d4);
}

.highlight-card h4 {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.highlight-card p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.6;
  margin: 0;
}

/* ===== Figure Cards ===== */
.figure-card {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: var(--ease);
}

.figure-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-xl);
}

.figure-card img {
  width: 100%;
  display: block;
}

.figure-card .figure-caption {
  padding: 1rem 1.5rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  border-top: 1px solid var(--border);
  background: var(--bg-secondary);
}

/* ===== Result Tables ===== */
.table-card {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--ease);
}

.table-card:hover {
  box-shadow: var(--shadow-md);
}

.table-card img {
  width: 100%;
  display: block;
}

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

.bibtex-header .title {
  margin-bottom: 0 !important;
}

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

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

.copy-bibtex-btn {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  padding: 0.6rem 1rem;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--ease);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: inherit;
}

.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 ===== */
.scroll-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: var(--ease);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: var(--shadow-lg);
}

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

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

/* ===== Footer ===== */
.footer {
  background: var(--bg-secondary) !important;
  border-top: 1px solid var(--border);
  padding: 3rem 1.5rem !important;
}

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

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

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

/* ===== Animations ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-body,
.section > .container {
  animation: fadeInUp 0.6s ease-out both;
}

/* Stagger animations for child sections */
section:nth-child(2) > .container { animation-delay: 0.05s; }
section:nth-child(3) > .container { animation-delay: 0.1s; }
section:nth-child(4) > .container { animation-delay: 0.15s; }
section:nth-child(5) > .container { animation-delay: 0.2s; }

/* ===== Video ===== */
.publication-video {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%;
  overflow: hidden;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-xl);
}

.publication-video iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* ===== Carousel ===== */
.results-carousel {
  overflow: hidden;
  padding: 1rem 0;
}

.results-carousel .item {
  margin: 1rem;
  overflow: hidden;
  padding: 1.5rem;
  font-size: 0;
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: var(--ease);
  border: 1px solid var(--border);
}

.results-carousel .item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* ===== Accessibility ===== */
.button:focus,
a:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

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

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

  .highlights-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

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

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

  .columns.is-vcentered {
    flex-direction: column;
  }
}

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

  .link-block {
    display: block;
    margin-bottom: 0.5rem;
  }

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

/* ===== Print ===== */
@media print {
  .scroll-to-top { display: none; }
  .hero, .section { animation: none; }
  .button { box-shadow: none !important; }
}
