@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@300;400;500;600;700&family=Fira+Code:wght@400;500;600&display=swap');

:root {
  --honey-bronze: #d4940a;
  --hyper-magenta: #9333ea;
  --neon-violet: #a855f7;
  --cool-horizon: #3b82f6;
  --blue-energy: #2563eb;

  --bg-deep: #fafafa;
  --bg-surface: #ffffff;
  --bg-elevated: #f5f5f5;

  --text-primary: #1a1a1a;
  --text-secondary: #4a4a4a;
  --text-muted: #7a7a7a;

  --border-subtle: rgba(0, 0, 0, 0.06);
  --border-light: rgba(0, 0, 0, 0.1);

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  background: var(--bg-deep);
  background-image:
    radial-gradient(ellipse 80% 50% at 100% 50%, rgba(147, 51, 234, 0.03) 0%, transparent 50%);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-primary);
  padding: 48px 28px 48px 28px;
  position: relative;
  min-height: 100vh;
  line-height: 1.7;
  font-size: 15px;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

.cta.colab {
  background-color: #faca64;

  border-color: #faca64;
  color: #000;
  box-shadow: var(--shadow-sm);
}

.cta.colab:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(212, 148, 10, 0.3);
}

h1, h2, h3, h4, h5, h6, .section-heading {
  font-family: 'Space Grotesk', -apple-system, sans-serif;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.hero-text {
  font-family: 'Space Grotesk', -apple-system, sans-serif;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.progress-sidebar {
  position: fixed;
  left: 32px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1000;
  display: none;
}

@media (min-width: 1400px) {
  .progress-sidebar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
  }
}

.progress-track {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.progress-line {
  position: absolute;
  left: 7px;
  top: 22px;
  bottom: 22px;
  width: 2px;
  background: var(--border-light);
  z-index: 0;
}

.progress-line-fill {
  position: absolute;
  left: 7px;
  top: 22px;
  width: 2px;
  background: var(--honey-bronze);
  z-index: 1;
  transition: height 0.3s ease;
  height: 0;
}

.progress-item {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
}

.progress-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 2px solid var(--border-light);
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.progress-item.active .progress-dot {
  background: var(--honey-bronze);
  border-color: var(--honey-bronze);
  box-shadow: 0 0 0 5px rgba(212, 148, 10, 0.2);
}

.progress-item.passed .progress-dot {
  background: var(--honey-bronze);
  border-color: var(--honey-bronze);
}

.progress-label {
  font-family: 'Fira Code', monospace;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  opacity: 0;
  transform: translateX(-8px);
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.progress-item:hover .progress-label,
.progress-item.active .progress-label {
  opacity: 1;
  transform: translateX(0);
}

.progress-item.active .progress-label {
  color: var(--honey-bronze);
}

.progress-item a {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.main-content {
  max-width: 1060px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero-flow {
  position: relative;
  overflow: hidden;
  padding: 64px 48px 48px 48px;
  border-radius: 28px;
  margin-bottom: 40px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-lg);
}

.hero-flow::after {
  content: "";
  position: absolute;
  width: 500px;
  height: 500px;
  bottom: -200px;
  right: -100px;
  background: radial-gradient(circle, rgba(147, 51, 234, 0.08) 0%, rgba(147, 51, 234, 0) 70%);
  animation: orbFlow2 30s ease-in-out infinite;
  z-index: 0;
  pointer-events: none;
}

.hero-flow > * {
  position: relative;
  z-index: 1;
}

.hero-flow .hero-orb {
  position: absolute;
  width: 450px;
  height: 450px;
  top: 40%;
  right: 10%;
  transform: translateY(-50%);
  background: radial-gradient(circle, rgba(37, 99, 235, 0.06) 0%, rgba(37, 99, 235, 0) 70%);
  animation: orbFlow3 28s ease-in-out infinite;
  z-index: 0;
  pointer-events: none;
}

@keyframes orbFlow2 {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(-60px, -50px); }
  50% { transform: translate(-100px, 30px); }
  75% { transform: translate(-30px, -40px); }
}

@keyframes orbFlow3 {
  0%, 100% { transform: translateY(-50%) translate(0, 0); }
  33% { transform: translateY(-50%) translate(-50px, 70px); }
  66% { transform: translateY(-50%) translate(40px, -50px); }
}

.hero-text {
  font-size: 80px;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 20px;
  text-align: center;
  color: var(--text-primary);
}

.sub-hero-text {
  font-family: 'Space Grotesk', -apple-system, sans-serif;
  font-size: 22px;
  font-weight: 400;
  font-style: normal;
  margin-bottom: 36px;
  line-height: 1.5;
  text-align: center;
  color: var(--text-secondary);
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

.hero-pill-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.hero-pill {
  font-family: 'Fira Code', monospace;
  font-size: 11px;
  font-weight: 500;
  padding: 10px 18px;
  border-radius: 100px;
  background: rgba(212, 148, 10, 0.1);
  border: 1px solid rgba(212, 148, 10, 0.25);
  color: var(--honey-bronze);
  transition: all 0.25s ease;
  animation: pillPopIn 0.5s ease both;
}

@keyframes pillPopIn {
  0% {
    opacity: 0;
    transform: scale(0.8) translateY(10px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.hero-pill:hover {
  background: rgba(212, 148, 10, 0.18);
  border-color: rgba(212, 148, 10, 0.4);
  transform: translateY(-2px);
}

.hero-flow .authors {
  text-align: center;
}

.authors {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 2;
  margin-top: 0;
  margin-bottom: 32px;
  text-align: center;
}

.authors span {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 8px;
}

.authors .affiliation {
  font-family: 'Inter', -apple-system, sans-serif;
  font-style: normal;
}

.authors a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
  font-weight: 500;
}

.authors a:hover {
  color: var(--honey-bronze);
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 0;
}

.hero-pipeline-container {
  margin-top: 40px;
  background: var(--bg-elevated);
  border-radius: 16px;
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  position: relative;
}

#heroPipelineCanvas {
  width: 100%;
  height: 320px;
  display: block;
}

@media (max-width: 768px) {
  #heroPipelineCanvas {
    height: 280px;
  }
  
  .hero-pipeline-container {
    margin-top: 32px;
  }
}

.cta {
  font-size: 15px;
  font-weight: 600;
  padding: 14px 28px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  transition: all 0.25s ease;
  border: 1px solid;
}

.cta.primary {
  background: var(--honey-bronze);
  border-color: var(--honey-bronze);
  color: #000;
  box-shadow: var(--shadow-sm);
}

.cta.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(212, 148, 10, 0.3);
}

.cta.dark {
  background: var(--text-primary);
  border-color: var(--text-primary);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.cta.dark:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.tagline {
  font-family: 'Space Grotesk', -apple-system, sans-serif;
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-align: center;
  margin: 64px 0 36px 0;
  color: var(--text-primary);
}

.bibtex-code {
  max-width: 820px;
  margin: 0 auto 64px auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

.bibtex-title {
  font-family: 'Fira Code', monospace;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.bibtex-code pre {
  margin: 0;
  overflow-x: auto;
}

.bibtex-code code {
  font-family: 'Fira Code', monospace;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-secondary);
}

.footer {
  text-align: center;
  padding: 32px 0;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 64px;
  border-top: 1px solid var(--border-subtle);
}

.footer a {
  color: var(--honey-bronze);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

.results-section {
  padding: 0px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.domain-selector {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
}

.domain-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 12px 28px;
  background: var(--bg-elevated);
  border: 2px solid transparent;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.3s ease;
}

.domain-btn .icon {
  font-size: 1.2rem;
}

.domain-btn:hover {
  background: #f0f0f0;
  color: var(--text-primary);
}

.domain-btn.active {
  background: linear-gradient(135deg, #c026d3 0%, #9333ea 100%);
  color: white;
  border-color: transparent;
}

.domain-content {
  display: none;
}

.domain-content.active {
  display: block;
  animation: fadeInUp 0.5s ease;
}

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

.results-layout {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

.carousel-side {
  position: relative;
  display: flex;
  align-items: center;
}

.results-carousel {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-elevated);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  width: 100%;
}

.carousel-item {
  display: none;
}

.carousel-item.active {
  display: block;
  animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.slide-title {
  text-align: center;
  padding: 1.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  background: white;
  margin: 0;
  border-bottom: 1px solid var(--border-light);
}

.comparison-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.comparison-video {
  position: relative;
}

.comparison-video video {
  width: 100%;
  height: auto;
  display: block;
}

.video-tag {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 700;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.bc-tag {
  background: #fee2e2;
  color: #dc2626;
}

.darp-tag {
  background: #dcfce7;
  color: #16a34a;
}

.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.95);
  border: none;
  border-radius: 50%;
  font-size: 28px;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  z-index: 20;
}

.carousel-nav:hover {
  background: white;
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.carousel-nav.prev {
  left: 16px;
}

.carousel-nav.next {
  right: 16px;
}

.table-side {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.results-box {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.box-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  color: var(--text-primary);
  text-align: center;
}

.results-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 0.75rem;
}

.results-table thead th {
  text-align: left;
  padding: 0.75rem 0.5rem;
  border-bottom: 2px solid var(--border-subtle);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.results-table tbody td {
  padding: 0.875rem 0.5rem;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.9rem;
  color: var(--text-primary);
}

.results-table tbody tr:last-child td {
  border-bottom: none;
}

.results-table tbody tr:hover {
  background: #fafafa;
}

.results-table td strong {
  font-weight: 700;
  color: #c026d3;
}

.table-note {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
  font-style: italic;
}

.demo-disclaimer {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 1.5rem;
  opacity: 0.8;
}

@media (max-width: 968px) {
  .results-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .carousel-side {
    order: 1;
  }

  .table-side {
    order: 2;
  }
}

@media (max-width: 768px) {
  body {
    padding: 24px 18px;
    font-size: 14px;
  }
  
  .hero-text {
    font-size: 48px;
  }
  
  .sub-hero-text {
    font-size: 20px;
  }
  
  .hero-flow {
    padding: 40px 28px 32px 28px;
    border-radius: 24px;
  }
  
  .tagline {
    font-size: 24px;
  }
}

@media (max-width: 640px) {
  .domain-selector {
    flex-direction: column;
    padding: 0 1rem;
  }

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

  .carousel-nav {
    width: 40px;
    height: 40px;
    font-size: 24px;
  }

  .carousel-nav.prev {
    left: 8px;
  }

  .carousel-nav.next {
    right: 8px;
  }

  .results-box {
    padding: 1.5rem;
  }

  .results-table {
    font-size: 0.8rem;
  }

  .results-table thead th,
  .results-table tbody td {
    padding: 0.5rem 0.25rem;
  }
}

html {
  scroll-behavior: smooth;
}

::selection {
  background: rgba(255, 184, 74, 0.25);
  color: var(--text-primary);
}

:focus-visible {
  outline: 2px solid var(--honey-bronze);
  outline-offset: 3px;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-elevated);
}

::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

.divergence-section {
  padding: 0px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.section-description {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 48px auto;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-secondary);
}

.divergence-canvas-container {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  padding: 32px;
  box-shadow: var(--shadow-md);
  margin-bottom: 32px;
}

#divergenceCanvas {
  width: 100%;
  height: 500px;
  display: block;
  border-radius: 12px;
  background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
}

.divergence-controls {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}

.divergence-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 10px;
  border: 1px solid var(--border-light);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: 'Inter', -apple-system, sans-serif;
}

.divergence-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
  border-color: var(--border-light);
}

.divergence-btn.primary {
  background: var(--honey-bronze);
  border-color: var(--honey-bronze);
  color: #000;
}

.divergence-btn.primary:hover {
  box-shadow: 0 8px 24px rgba(212, 148, 10, 0.3);
}

.divergence-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.divergence-legend {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.expert-dot {
  background: var(--cool-horizon);
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.4);
}

.bc-dot {
  background: #dc2626;
  box-shadow: 0 0 8px rgba(220, 38, 38, 0.4);
}

.darp-dot {
  background: #16a34a;
  box-shadow: 0 0 8px rgba(22, 163, 74, 0.4);
}

.divergence-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.metric-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.metric-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.metric-card.highlight {
  border-color: var(--honey-bronze);
  background: linear-gradient(135deg, rgba(212, 148, 10, 0.05) 0%, var(--bg-surface) 100%);
}

.metric-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.metric-bar-container {
  width: 100%;
  height: 8px;
  background: var(--bg-elevated);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}

.metric-bar {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease;
  width: 100%;
}

.bc-metric {
  background: linear-gradient(90deg, #dc2626 0%, #ef4444 100%);
}

.darp-metric {
  background: linear-gradient(90deg, #16a34a 0%, #22c55e 100%);
}

.delta-metric {
  background: linear-gradient(90deg, var(--honey-bronze) 0%, #f59e0b 100%);
}

.metric-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  font-family: 'Fira Code', monospace;
}

.divergence-explanation {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--honey-bronze);
  border-radius: 12px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.divergence-explanation p {
  margin: 0;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-secondary);
}

.divergence-explanation strong {
  color: var(--text-primary);
  font-weight: 600;
}

@media (max-width: 768px) {
  .divergence-section {
    padding: 48px 18px;
  }

  #divergenceCanvas {
    height: 350px;
  }

  .divergence-legend {
    gap: 16px;
    font-size: 12px;
  }

  .divergence-controls {
    flex-direction: column;
    width: 100%;
  }

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

  .divergence-metrics {
    grid-template-columns: 1fr;
  }
}

.architecture-section {
  padding: 0px 20px;
  max-width: 1400px;
  margin: 0 auto;
}

.architecture-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 48px;
  align-items: start;
}

.arch-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  padding: 24px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  min-height: 600px;
}

.panel-title {
  font-family: 'Space Grotesk', -apple-system, sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border-subtle);
  flex-shrink: 0;
}

.arch-canvas {
  width: 100%;
  height: 350px;
  border-radius: 12px;
  background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
  cursor: crosshair;
  margin-bottom: 12px;
}

.arch-legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
}

.legend-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.query-dot {
  background: #2563eb;
  box-shadow: 0 0 6px rgba(37, 99, 235, 0.4);
}

.neighbor-dot {
  background: #dc2626;
  box-shadow: 0 0 6px rgba(220, 38, 38, 0.4);
}

.neighbor-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1 1 auto;
  overflow-y: auto;
  min-height: 0;
}

.neighbor-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 16px;
  transition: all 0.3s ease;
}

.neighbor-card:hover {
  background: var(--bg-surface);
  box-shadow: var(--shadow-sm);
  transform: translateX(4px);
}

.neighbor-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-weight: 600;
  font-size: 13px;
  color: var(--text-primary);
}

.neighbor-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: var(--honey-bronze);
  color: #000;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.neighbor-data {
  display: grid;
  gap: 8px;
  font-family: 'Fira Code', monospace;
  font-size: 12px;
}

.data-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.data-row-vector {
  display: flex;
  align-items: center;
  gap: 8px;
}

.data-label {
  color: var(--text-muted);
  font-weight: 600;
  min-width: 30px;
}

.data-value {
  color: var(--text-primary);
  font-weight: 500;
}

.data-value.vector {
  color: var(--honey-bronze);
}

.arrow-icon {
  text-align: center;
  color: var(--honey-bronze);
  font-size: 20px;
  margin: 8px 0;
}

.prediction-output {
  background: rgba(212, 148, 10, 0.1);
  border: 1px solid rgba(212, 148, 10, 0.3);
  border-radius: 8px;
  padding: 10px;
  margin-top: 8px;
}

.prediction-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.prediction-value {
  font-family: 'Fira Code', monospace;
  font-size: 13px;
  font-weight: 600;
  color: var(--honey-bronze);
}

.prediction-visual {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
}

.prediction-label-inline {
  font-family: 'Fira Code', monospace;
  font-size: 13px;
  font-weight: 600;
  color: var(--honey-bronze);
}

.aggregation-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 20px;
}

.aggregation-active {
  width: 100%;
}

.aggregation-formula {
  background: var(--bg-elevated);
  border: 2px solid var(--border-subtle);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  margin-bottom: 20px;
}

.formula-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.formula-content {
  font-family: 'Fira Code', monospace;
  font-size: 15px;
  color: var(--text-primary);
  line-height: 1.8;
}

.prediction-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
  width: 100%;
}

.prediction-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--bg-elevated);
  border-radius: 8px;
  font-family: 'Fira Code', monospace;
  font-size: 12px;
}

.prediction-item-label {
  color: var(--text-muted);
  font-weight: 600;
  min-width: 40px;
}

.prediction-item-value {
  color: var(--honey-bronze);
  font-weight: 600;
}

.final-output {
  width: 100%;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.15) 0%, rgba(37, 99, 235, 0.05) 100%);
  border: 2px solid #2563eb;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.2);
  }
  50% {
    box-shadow: 0 0 30px rgba(37, 99, 235, 0.4);
  }
}

.final-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.final-value {
  font-family: 'Fira Code', monospace;
  font-size: 20px;
  font-weight: 700;
  color: #2563eb;
}

.final-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.final-value-inline {
  font-family: 'Fira Code', monospace;
  font-size: 18px;
  font-weight: 700;
  color: #2563eb;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-height: 200px;
  color: var(--text-muted);
  text-align: center;
  padding: 40px 20px;
}

.empty-state svg {
  margin-bottom: 16px;
  opacity: 0.4;
}

.empty-state p {
  font-size: 14px;
  margin: 0;
}

.neighbor-cards .neighbor-card:last-child {
  margin-bottom: auto;
}

.architecture-explanation {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  padding: 40px;
  box-shadow: var(--shadow-sm);
}

.architecture-explanation h3 {
  font-family: 'Space Grotesk', -apple-system, sans-serif;
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 32px;
  text-align: center;
}

.explanation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.explanation-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.explanation-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--honey-bronze);
  color: #000;
  border-radius: 50%;
  font-size: 16px;
  font-weight: 700;
  flex-shrink: 0;
}

.explanation-content {
  flex: 1;
}

.explanation-content strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.explanation-content p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0;
}

.explanation-content code {
  font-family: 'Fira Code', monospace;
  font-size: 13px;
  background: var(--bg-elevated);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--honey-bronze);
}

@media (max-width: 1200px) {
  .architecture-container {
    grid-template-columns: 1fr;
  }

  .arch-panel {
    min-height: auto;
  }

  .neighbor-cards {
    max-height: none;
  }
}

@media (max-width: 768px) {
  .architecture-section {
    padding: 48px 18px;
  }

  .arch-panel {
    padding: 20px;
  }

  .architecture-explanation {
    padding: 28px 20px;
  }

  .explanation-grid {
    grid-template-columns: 1fr;
  }
}

.architecture-section .carousel-item.active {
  animation: none;
}


.section-intro {
  max-width: 800px;
  margin: 0 auto 60px;
  font-size: 1.1rem;
  line-height: 1.8;
  color: #374151;
  text-align: center;
}

.multimodal-demo {
  background: white;
  border-radius: 16px;
  padding: 40px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.demo-canvas-container {
  position: relative;
  width: 100%;
  height: 400px;
  background: #fafafa;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 24px;
  border: 2px solid #e5e7eb;
}

#multimodalCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

.demo-controls {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 40px;
}

.control-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  border: 2px solid #e5e7eb;
  background: white;
  color: #374151;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'Inter', sans-serif;
}

.control-btn:hover {
  background: #f9fafb;
  border-color: #d1d5db;
  transform: translateY(-1px);
}

.control-btn.primary {
  background: #3b82f6;
  color: white;
  border-color: #3b82f6;
}

.control-btn.primary:hover {
  background: #2563eb;
  border-color: #2563eb;
}

.aggregation-comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-top: 40px;
}

.comparison-item {
  background: #fafafa;
  border-radius: 12px;
  padding: 24px;
  border: 2px solid #e5e7eb;
}

.comparison-header {
  margin-bottom: 20px;
}

.method-badge {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.method-badge.averaging {
  background: #fef2f2;
  color: #dc2626;
  border: 2px solid #fecaca;
}

.method-badge.set-transformer {
  background: #f0fdf4;
  color: #16a34a;
  border: 2px solid #bbf7d0;
}

.comparison-viz {
  background: white;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 16px;
  min-height: 200px;
  border: 1px solid #e5e7eb;
}

.distribution-viz {
  width: 100%;
  height: 180px;
  position: relative;
}

.comparison-description {
  font-size: 14px;
  line-height: 1.6;
  color: #6b7280;
}

.mathematical-formulation {
  background: white;
  border-radius: 12px;
  padding: 40px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.mathematical-formulation h3 {
  margin-bottom: 24px;
  color: #1f2937;
  font-size: 1.5rem;
}

.formula-box {
  background: #fafafa;
  border-left: 4px solid #3b82f6;
  padding: 20px;
  margin-bottom: 20px;
  border-radius: 6px;
}

.formula-box:last-child {
  margin-bottom: 0;
}

.formula-box strong {
  color: #1f2937;
  display: block;
  margin-bottom: 12px;
  font-size: 15px;
}

.formula {
  font-family: 'Georgia', 'Times New Roman', serif;
  font-size: 16px;
  color: #374151;
  margin: 8px 0;
  font-style: italic;
}

.formula-detail {
  font-size: 14px;
  color: #6b7280;
  margin-top: 12px;
  font-style: normal;
}

.distribution-viz svg {
  width: 100%;
  height: 100%;
}

.dist-mode {
  fill: #3b82f6;
  opacity: 0.7;
}

.dist-prediction {
  fill: #dc2626;
  stroke: #dc2626;
  stroke-width: 2;
}

.dist-prediction.good {
  fill: #16a34a;
  stroke: #16a34a;
}

.dist-label {
  font-size: 12px;
  fill: #6b7280;
  font-family: 'Inter', sans-serif;
}

@media (max-width: 768px) {
  .aggregation-comparison {
    grid-template-columns: 1fr;
  }

  .multimodal-demo {
    padding: 24px;
  }

  .demo-canvas-container {
    height: 300px;
  }

  .mathematical-formulation {
    padding: 24px;
  }
}

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

.comparison-item {
  animation: fadeIn 0.5s ease-out;
}

.comparison-item:nth-child(2) {
  animation-delay: 0.1s;
}
