:root {
  /* Fonts */
  --font-head: 'Assistant', sans-serif;
  --font-body: 'Assistant', sans-serif;

  /* Light Theme Defaults */
  --bg-primary:    #eeeeee;
  --bg-surface:    #FFFFFF;
  --text-primary:  #111111;
  --text-secondary:#5C5C5C;
  --accent-action: #238844;
  --action-text:   #FFFFFF;
  --border-color:  #e0e0e0;
}

[data-theme="dark"] {
  --bg-primary:    #111111;
  --bg-surface:    #1e1e1e;
  --text-primary:  #eeeeee;
  --text-secondary:#B388C8; /* Lavender for subtitles/accent */
  --accent-action: #42BD69; /* Neon Green for visibility */
  --action-text:   #111111;
  --border-color:  #333333;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
}

.text-balance {
  text-wrap: balance;
}

/* Spotlight Animation */
@keyframes spotlight {
  0% {
    opacity: 0;
    transform: translate(-72%, -62%) scale(0.5);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -40%) scale(1);
  }
}

.animate-spotlight {
  animation: spotlight 2s ease .75s 1 forwards;
}

:root {
  --spotlight-color: rgba(106, 44, 145, 0.08); /* Purple, very subtle for light mode */
}

[data-theme="dark"] {
  --spotlight-color: rgba(66, 189, 105, 0.15); /* Neon Green, glowing for dark mode */
}

.spotlight-card {
  position: relative;
  overflow: hidden;
}

.spotlight-overlay {
  pointer-events: none;
  position: absolute;
  inset: -1px; /* -inset-px */
  opacity: 0;
  transition: opacity 0.3s ease;
  background: radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), var(--spotlight-color), transparent 40%);
  z-index: 0;
}

.spotlight-card:hover .spotlight-overlay {
  opacity: 1;
}

.spotlight-content {
  position: relative;
  z-index: 10;
}

/* Retro Grid Animation */
@keyframes grid-movement {
  0% { transform: translateY(0); }
  100% { transform: translateY(calc(var(--cell-size) * 1)); }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.animate-grid {
  animation: grid-movement 3s linear infinite;
}

.animate-spin-slow {
  animation: spin 3s linear infinite;
}

:root {
  --grid-angle: 65deg;
  --cell-size: 40px;
  --grid-opacity: 0.5;
  --grid-light-line: rgba(106, 44, 145, 0.1); /* Purple low opacity */
  --grid-dark-line: rgba(66, 189, 105, 0.1); /* Neon Green low opacity */
}

.retro-grid-container {
  perspective: 200px;
  overflow: hidden;
  position: absolute;
  width: 100%;
  height: 100%;
  inset: 0;
  pointer-events: none;
}

.retro-grid {
  position: absolute;
  inset: 0;
  transform: rotateX(var(--grid-angle));
  width: 300%;
  height: 300%;
  margin-left: -100%;
  transform-origin: center top;
  
  background-image: 
    linear-gradient(to right, var(--grid-light-line) 1px, transparent 0),
    linear-gradient(to bottom, var(--grid-light-line) 1px, transparent 0);
  background-size: var(--cell-size) var(--cell-size);
}

[data-theme="dark"] .retro-grid {
  background-image: 
    linear-gradient(to right, var(--grid-dark-line) 1px, transparent 0),
    linear-gradient(to bottom, var(--grid-dark-line) 1px, transparent 0);
}

/* Utility for hiding elements based on theme if needed outside of Tailwind */
.dark .light-only { display: none; }
.dark-only { display: none; }
.dark .dark-only { display: block; }

/* ===== Scroll-driven timeline (Van gesprek naar kennis) ===== */
.timeline-section {
  position: relative;
  height: 300vh;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}
.timeline-head {
  padding: 3rem 1.5rem 1rem;
  text-align: center;
}
.timeline-sticky {
  position: sticky;
  top: 6.5rem;
  height: calc(100vh - 6.5rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.75rem;
  padding: 0 1rem;
}

/* Top: line + nodes */
.timeline-viewport {
  width: 100%;
  max-width: 46rem;
}
.timeline-track {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 0 3rem;
}
.timeline-line {
  position: absolute;
  left: 3rem;
  right: 3rem;
  top: 1.25rem;
  height: 3px;
  background: var(--border-color);
  border-radius: 999px;
  overflow: hidden;
}
.timeline-line-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #6A2C91, #238844);
  transition: width 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}
[data-theme="dark"] .timeline-line-fill {
  background: linear-gradient(90deg, #42BD69, #B388C8);
}
.timeline-node {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}
.timeline-node-dot {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  background: var(--bg-surface);
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all 0.3s ease;
}
.timeline-node-num {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}
.timeline-node-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}
.timeline-node.is-active .timeline-node-dot {
  border-color: var(--accent-action);
  color: var(--accent-action);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent-action) 15%, transparent);
}

/* Bottom: full-width slides that move right-to-left */
.timeline-slides {
  width: 100%;
  overflow: hidden;
}
.timeline-slide-track {
  display: flex;
  /* spring-ish snap: the panel ticks to each step, giving the "stuck" friction feel */
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  will-change: transform;
}
.timeline-slide {
  flex: 0 0 100%;
  width: 100%;
  min-height: calc(100vh - 6.5rem - 20rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: 1fr;
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: center;
  padding: clamp(1.5rem, 4vw, 4rem) clamp(1.5rem, 6vw, 6rem);
}
.timeline-slide-img {
  height: 100%;
  min-height: 18rem;
  border-radius: 1.5rem;
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.35);
  background: var(--bg-surface);
}
.timeline-slide-img img {
  width: 100%;
  height: 100%;
  min-height: 18rem;
  object-fit: cover;
  display: block;
}
.timeline-slide-body {
  padding: clamp(0.5rem, 2vw, 1.5rem);
}
.timeline-slide-num {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  color: var(--accent-action);
  margin-bottom: 1rem;
}
.timeline-slide-num::after {
  content: "";
  display: block;
  width: 3.5rem;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, #6A2C91, #238844);
}
.timeline-slide-title {
  font-family: var(--font-head);
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 900;
  line-height: 1.05;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
}
.timeline-slide-text {
  color: var(--text-secondary);
  line-height: 1.75;
  font-size: clamp(1.1rem, 1.6vw, 1.4rem);
  max-width: 42ch;
}
@media (max-width: 768px) {
  .timeline-slide {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    min-height: auto;
    padding: 1.5rem;
  }
  .timeline-slide-img {
    order: -1;
    min-height: 12rem;
    height: auto;
  }
  .timeline-slide-img img { min-height: 12rem; height: 14rem; }
  .timeline-slide-title { font-size: 2rem; }
  .timeline-slide-text { max-width: none; }
}
@media (max-width: 640px) {
  .timeline-node-label { display: none; }
  .timeline-track { padding: 0 1.25rem; }
  .timeline-line { left: 1.25rem; right: 1.25rem; }
}
