/* ========================================
   DriveWAM Project Page Styles
   Based on Nerfies template with modern enhancements
   ======================================== */

:root {
  --primary: #4a6cf7;
  --primary-light: #6b8cff;
  --primary-dark: #3451b2;
  --accent: #f97316;
  --bg-light: #fafbff;
  --bg-section: #f0f4ff;
  --text-primary: #1a1a2e;
  --text-secondary: #555;
  --card-shadow: 0 4px 24px rgba(74, 108, 247, 0.08);
  --card-shadow-hover: 0 8px 32px rgba(74, 108, 247, 0.15);
  --border-radius: 12px;
}

/* ---- Global ---- */
body {
  font-family: 'Noto Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-primary);
  background: #fff;
}

.section {
  padding: 3rem 1.5rem;
}

/* ---- Hero ---- */
.hero {
  background: linear-gradient(135deg, var(--bg-light) 0%, var(--bg-section) 100%);
}

.publication-title {
  font-family: 'Google Sans', 'Noto Sans', sans-serif;
  font-weight: 700;
  font-size: 2.5rem !important;
  line-height: 1.25;
  margin-bottom: 1.2rem !important;
}

.drivewam-title {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.publication-authors {
  margin-bottom: 0.3rem;
}

.publication-authors .author-block {
  margin: 0 0.15rem;
}

.publication-authors a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.publication-authors a:hover {
  text-decoration: underline;
}

.publication-authors sup {
  color: var(--primary);
  font-weight: 600;
  margin-left: 1px;
}

.publication-venue {
  margin-top: 0.8rem;
  margin-bottom: 1.2rem;
}

.publication-venue .badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  padding: 0.35rem 1.2rem;
  border-radius: 20px;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* Link Buttons */
.publication-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 0.5rem;
}

.publication-links .button {
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.25s ease;
  border: none;
  padding-left: 1.2rem;
  padding-right: 1.4rem;
}

.publication-links .button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.publication-links .icon {
  margin-right: 0.15rem;
}

/* ---- Teaser ---- */
.teaser {
  padding-top: 0;
  background: linear-gradient(180deg, var(--bg-section) 0%, #fff 100%);
}

.teaser-image-container {
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
}

.teaser-image {
  width: 100%;
  display: block;
}

.teaser-caption {
  margin-top: 1.2rem;
  font-size: 1.05rem !important;
  color: var(--text-secondary);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.highlight {
  color: var(--primary);
  font-weight: 600;
}

/* ---- Section Titles ---- */
.section-title {
  font-family: 'Google Sans', 'Noto Sans', sans-serif;
  position: relative;
  display: inline-block;
  margin-bottom: 1.5rem !important;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 50px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 2px;
}

.has-text-centered .section-title::after,
.section-title.has-text-centered::after {
  left: 50%;
  transform: translateX(-50%);
}

/* Center the underline when section-title is inside a centered container */
.has-text-centered > .section-title::after {
  left: 50%;
  transform: translateX(-50%);
}

/* ---- Highlight Cards ---- */
.highlight-cards {
  margin-top: 1rem;
}

.highlight-card {
  border: none;
  border-radius: var(--border-radius);
  box-shadow: var(--card-shadow);
  transition: all 0.3s ease;
  height: 100%;
  background: #fff;
}

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

.highlight-card .card-icon {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 0.8rem;
}

.highlight-card .title {
  font-family: 'Google Sans', 'Noto Sans', sans-serif;
  color: var(--text-primary);
}

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

/* ---- Method Figures ---- */
.method-figure {
  background: #fff;
  border-radius: var(--border-radius);
  padding: 1.2rem;
  box-shadow: var(--card-shadow);
}

.method-figure img {
  width: 100%;
  border-radius: 8px;
}

.figure-caption {
  margin-top: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ---- Results Section ---- */
#results {
  background: var(--bg-light);
}

.result-table {
  font-size: 0.95rem;
  border-radius: var(--border-radius);
  overflow: hidden;
}

.result-table thead th {
  background: var(--text-primary);
  color: #fff;
  font-weight: 600;
  border-color: var(--text-primary);
  text-align: center;
  white-space: nowrap;
}

.result-table thead th:first-child {
  text-align: left;
}

.result-table tbody td {
  text-align: center;
  vertical-align: middle;
}

.result-table tbody td:first-child {
  text-align: left;
  font-weight: 500;
}

.result-table .ours-row {
  background: linear-gradient(90deg, rgba(74, 108, 247, 0.12), rgba(249, 115, 22, 0.08)) !important;
}

.result-table .ours-row td {
  color: var(--primary-dark) !important;
  font-weight: 600;
}

/* Group header rows in tables */
.table-group-header {
  background: #f5f5f5 !important;
  font-size: 0.9rem;
  padding: 0.4rem 0.75rem !important;
  border-left: 3px solid var(--primary) !important;
}

/* Ablation tables */
.ablation-table {
  font-size: 0.92rem;
}

#ablation {
  background: #fff;
}

#ablation .figure-caption {
  margin-top: 0.5rem;
}

/* ---- Qualitative Results ---- */
#qualitative {
  background: #fff;
}

/* ---- BibTeX ---- */
#bibtex {
  background: var(--bg-light);
}

.bibtex-box {
  background: var(--text-primary);
  color: #e0e0e0;
  padding: 1.2rem 1.5rem;
  border-radius: var(--border-radius);
  font-size: 0.88rem;
  line-height: 1.6;
  overflow-x: auto;
  position: relative;
}

.bibtex-box code {
  color: #e0e0e0;
  background: transparent;
  padding: 0;
  font-size: inherit;
}

/* ---- Footer ---- */
.footer {
  padding: 2rem 1.5rem;
  background: var(--bg-section);
}

.footer p {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

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

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .publication-title {
    font-size: 1.6rem !important;
  }

  .section {
    padding: 2rem 1rem;
  }

  .highlight-cards .column {
    margin-bottom: 1rem;
  }

  .publication-links {
    gap: 0.4rem;
  }

  .publication-links .button {
    font-size: 0.85rem;
    padding-left: 0.9rem;
    padding-right: 1rem;
  }
}

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

  .is-size-5.publication-authors {
    font-size: 0.9rem !important;
  }
}

/* ---- Scroll Animation ---- */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}
