/* 1. Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* 2. Design tokens */
:root {
  --color-base: #FFF6EC;
  --color-accent: #C8956A;
  --color-accent-dark: #8B5E3C;
  --color-text: #2D2D2D;
  --color-text-light: #6B5B4E;
  --color-surface: #FFFFFF;
  --font-main: 'Nunito', sans-serif;
  --font-size-base: 1rem;
  --font-size-lg: 1.25rem;
  --font-size-xl: 1.75rem;
  --font-size-xxl: 2.5rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 2rem;
  --space-xl: 4rem;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  --nav-height: 4rem;
}

/* 3. Base */
html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
  font-family: var(--font-main);
  color: var(--color-text);
  background-color: var(--color-base);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  line-height: 1.6;
  font-size: var(--font-size-base);
}

/* 4. Sticky navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  background-color: var(--color-base);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-lg);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.nav-logo {
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--color-text);
  text-decoration: none;
  transition: color 0.2s, transform 0.2s;
  display: inline-block;
}

.nav-logo:hover {
  color: var(--color-accent-dark);
  transform: scale(1.06);
}

/* 5. Nav links desktop */
.nav-links {
  list-style: none;
  display: flex;
  flex-direction: row;
  gap: var(--space-md);
}

.nav-links a {
  color: var(--color-text);
  text-decoration: none;
  font-weight: 600;
  font-size: var(--font-size-base);
  padding: var(--space-sm) var(--space-sm);
  border-radius: var(--radius-sm);
  transition: color 0.2s, background-color 0.2s;
}

.nav-links a:hover {
  color: var(--color-accent-dark);
  background-color: rgba(200, 149, 106, 0.2);
}

/* 6. Hamburger knop — verborgen op desktop */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
  border-radius: var(--radius-sm);
}

.hamburger-icon,
.hamburger-icon::before,
.hamburger-icon::after {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--color-text);
  border-radius: var(--radius-full);
  position: relative;
  transition: background-color 0.2s;
}

.hamburger-icon::before,
.hamburger-icon::after {
  content: '';
  position: absolute;
  left: 0;
}

.hamburger-icon::before { top: -7px; }
.hamburger-icon::after  { top: 7px; }

/* 7. Mobiel: hamburger zichtbaar, nav-links als dropdown */
@media (max-width: 700px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--color-base);
    padding: var(--space-md) var(--space-lg);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    gap: var(--space-sm);
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links a {
    padding: var(--space-sm) var(--space-md);
    font-size: var(--font-size-lg);
  }
}

/* 8. Container helper */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* 9. Section base padding */
section {
  padding: var(--space-xl) 0;
}

/* 10. Footer */
footer {
  background-color: var(--color-surface);
  text-align: center;
  padding: var(--space-lg);
  color: var(--color-text-light);
  font-size: 0.875rem;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

/* === Intro-sectie === */
.intro-section {
  background-color: #FFD9CB;
  padding: var(--space-xl) 0;
  position: relative;
  overflow: hidden;
}

.intro-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: var(--space-lg);
  align-items: center;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
  position: relative;
  z-index: 1;
}

.intro-foto-wrapper {
  display: flex;
  justify-content: center;
  align-items: stretch;
}

.intro-foto {
  width: 100%;
  max-width: 360px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  object-position: right bottom;
  border-radius: var(--radius-lg);
  border: 4px solid var(--color-surface);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  animation: float 5s ease-in-out infinite;
}

.intro-tekst h1 {
  font-size: var(--font-size-xxl);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-sm);
  line-height: 1.2;
  animation: pop-in 0.65s cubic-bezier(0.34, 1.56, 0.64, 1) both 0.05s;
}

.intro-subtitle {
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--color-accent-dark);
  margin-bottom: var(--space-lg);
  animation: slide-up 0.5s ease both 0.25s;
}

.intro-tekst p {
  color: var(--color-text);
  margin-bottom: var(--space-md);
  font-size: var(--font-size-base);
}

.intro-tekst p:last-child {
  margin-bottom: 0;
}

.intro-tekst p:nth-of-type(2) { animation: slide-up 0.5s ease both 0.4s; }
.intro-tekst p:nth-of-type(3) { animation: slide-up 0.5s ease both 0.55s; }
.intro-tekst p:nth-of-type(4) { animation: slide-up 0.5s ease both 0.7s; }

/* Mobiel: gestapeld, gecentreerd */
@media (max-width: 700px) {
  .intro-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .intro-foto {
    max-width: 260px;
  }

  .intro-tekst h1 {
    font-size: var(--font-size-xl);
  }
}

/* === Opleiding-sectie === */
#opleiding {
  background-color: var(--color-base);
}

#opleiding h2 {
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-lg);
  text-align: center;
}

.edu-card {
  background-color: var(--color-surface);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
  max-width: 600px;
  margin: 0 auto;
  border-left: 4px solid var(--color-accent);
}

.edu-card h3 {
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-sm);
}

.edu-instelling {
  font-size: var(--font-size-base);
  font-weight: 600;
  color: var(--color-accent-dark);
  margin-bottom: var(--space-sm);
}

.edu-jaar {
  font-size: var(--font-size-base);
  color: var(--color-text-light);
}

/* === Stages-sectie === */

#stages {
  background-color: var(--color-surface);
}

.timeline {
  position: relative;
  padding-left: 2rem;
  margin-top: var(--space-xl);
}

/* Verticale lijn */
.timeline::before {
  content: '';
  position: absolute;
  left: 0.5rem;
  top: 0.5rem;
  bottom: 0;
  width: 2px;
  background-color: var(--color-accent);
  border-radius: var(--radius-full);
}

.timeline-item {
  position: relative;
  margin-bottom: var(--space-lg);
}

.timeline-item:last-child {
  margin-bottom: 0;
}

/* Dot — left waarde moet overeenkomen met padding-left .timeline (2rem) minus helft dot-breedte (0.5rem) = 1.5rem */
.timeline-dot {
  position: absolute;
  left: -1.5rem;
  top: 0.4rem;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background-color: var(--color-accent-dark);
  border: 2px solid var(--color-surface);
  box-shadow: 0 0 0 2px var(--color-accent);
}

.timeline-card {
  background-color: var(--color-surface);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
  border-left: 4px solid var(--color-accent);
}

.timeline-school {
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-sm);
}

.timeline-meta {
  font-size: var(--font-size-base);
  font-weight: 600;
  color: var(--color-accent-dark);
  margin-bottom: var(--space-sm);
}

.timeline-omschrijving {
  color: var(--color-text-light);
  font-size: var(--font-size-base);
  line-height: 1.6;
}

/* === Portfolio-sectie === */

#portfolio {
  background-color: var(--color-base);
}

.portfolio-intro {
  color: var(--color-text-light);
  font-size: var(--font-size-base);
  margin-bottom: var(--space-xl);
  text-align: center;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--space-md);
}

.portfolio-item {
  position: relative;
  aspect-ratio: 1 / 1;
  background-color: var(--color-surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
  transition: transform 0.2s, box-shadow 0.2s;
  margin: 0;
}

.portfolio-item:hover {
  transform: translateY(-5px) rotate(-1.5deg);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.portfolio-item a {
  display: block;
  height: 100%;
}

.portfolio-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.portfolio-item figcaption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-sm) var(--space-md);
  font-size: 0.875rem;
  color: var(--color-surface);
  font-weight: 600;
  text-align: center;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.45));
}

/* === Contact-sectie === */

#contact {
  background-color: var(--color-accent);
  text-align: center;
}

#contact h2 {
  color: var(--color-text);
}

.contact-intro {
  color: var(--color-text);
  margin-bottom: var(--space-xl);
  font-size: var(--font-size-lg);
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-md);
}

.contact-link {
  display: inline-block;
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: var(--font-size-base);
  text-decoration: none;
  transition: background-color 0.2s, color 0.2s;
}

.contact-link--email {
  background-color: var(--color-text);
  color: var(--color-base);
}

.contact-link--email:hover {
  background-color: var(--color-accent-dark);
  color: var(--color-surface);
  animation: bounce-up 0.45s ease;
}

.contact-link--linkedin {
  background-color: var(--color-surface);
  color: var(--color-accent-dark);
  border: 2px solid var(--color-accent-dark);
}

.contact-link--linkedin:hover {
  background-color: var(--color-accent-dark);
  color: var(--color-surface);
  animation: bounce-up 0.45s ease;
}

/* === Scroll-animaties === */

/* Secties starten onzichtbaar en enigszins naar beneden verschoven */
.section-animate {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

/* Wanneer de sectie zichtbaar wordt via Intersection Observer */
.section-animate.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Gebruikers die geen animaties willen: toon alles direct */
@media (prefers-reduced-motion: reduce) {
  .section-animate {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .intro-foto,
  .deco,
  .intro-tekst h1,
  .intro-subtitle,
  .intro-tekst p {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  #opleiding.is-visible .edu-card,
  #stages.is-visible .timeline-item,
  #stages.is-visible .timeline-dot,
  #portfolio.is-visible .portfolio-item {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  #opleiding h2::after,
  #stages h2::after,
  #portfolio h2::after {
    transform: scaleX(1) !important;
    transition: none !important;
  }

  .contact-link--email:hover,
  .contact-link--linkedin:hover {
    animation: none !important;
  }
}

/* ============================================
   Speelse animaties
   ============================================ */

/* --- Keyframes --- */

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-10px); }
}

@keyframes float-alt {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  40%      { transform: translateY(-8px) rotate(5deg); }
  70%      { transform: translateY(5px) rotate(-3deg); }
}

@keyframes pop-in {
  0%   { opacity: 0; transform: scale(0.8) translateY(14px); }
  65%  { transform: scale(1.06) translateY(-3px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes slide-up {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes slide-in-left {
  from { opacity: 0; transform: translateX(-28px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes bounce-up {
  0%, 100% { transform: translateY(0) scale(1); }
  45%      { transform: translateY(-7px) scale(1.04); }
  70%      { transform: translateY(-3px) scale(1.02); }
}

@keyframes pulse-ring {
  0%, 100% { box-shadow: 0 0 0 2px var(--color-accent); }
  50%      { box-shadow: 0 0 0 7px rgba(200, 149, 106, 0.18); }
}

/* --- Decoratieve achtergrondvormen in intro --- */

.intro-deco {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.deco {
  position: absolute;
  opacity: 0.22;
}

.deco--1 {
  width: 88px; height: 88px;
  background: var(--color-accent);
  border-radius: 50%;
  top: 8%; left: 3%;
  animation: float 7s ease-in-out infinite;
}

.deco--2 {
  width: 52px; height: 52px;
  background: var(--color-accent-dark);
  border-radius: 50%;
  bottom: 10%; left: 5%;
  animation: float-alt 9s ease-in-out infinite 1.2s;
}

.deco--3 {
  width: 130px; height: 130px;
  background: #FFBFA0;
  border-radius: 42% 58% 52% 48% / 45% 40% 60% 55%;
  top: 4%; right: 2%;
  animation: float-alt 11s ease-in-out infinite 0.5s;
}

.deco--4 {
  width: 46px; height: 46px;
  background: var(--color-accent);
  border-radius: 30% 70% 70% 30% / 60% 40% 60% 40%;
  bottom: 7%; right: 8%;
  animation: float 6s ease-in-out infinite 2s;
}

.deco--5 {
  width: 70px; height: 70px;
  background: #F4A676;
  border-radius: 50%;
  top: 42%; right: 3%;
  animation: float-alt 8s ease-in-out infinite 1.8s;
}

/* --- Sectie h2 styling + animated underline --- */

#stages h2,
#portfolio h2 {
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-lg);
  text-align: center;
}

#opleiding h2::after,
#stages h2::after,
#portfolio h2::after {
  content: '';
  display: block;
  width: 52px;
  height: 3px;
  background: var(--color-accent);
  border-radius: var(--radius-full);
  margin: 6px auto 0;
  transform: scaleX(0);
  transition: transform 0.65s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s;
}

#opleiding.is-visible h2::after,
#stages.is-visible h2::after,
#portfolio.is-visible h2::after {
  transform: scaleX(1);
}

/* --- Opleiding: edu-card pop-in + hover --- */

#opleiding.is-visible .edu-card {
  animation: pop-in 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both 0.3s;
}

.edu-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.edu-card:hover {
  transform: translateY(-4px) rotate(0.4deg);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* --- Stages: timeline items slide in from left --- */

#stages.is-visible .timeline-item {
  animation: slide-in-left 0.5s ease both;
}

#stages.is-visible .timeline-item:nth-child(1) { animation-delay: 0.15s; }
#stages.is-visible .timeline-item:nth-child(2) { animation-delay: 0.3s;  }
#stages.is-visible .timeline-item:nth-child(3) { animation-delay: 0.45s; }
#stages.is-visible .timeline-item:nth-child(4) { animation-delay: 0.6s;  }

/* --- Timeline dots pulseren --- */

#stages.is-visible .timeline-dot {
  animation: pulse-ring 2.5s ease-in-out infinite;
}

#stages.is-visible .timeline-item:nth-child(1) .timeline-dot { animation-delay: 0s;   }
#stages.is-visible .timeline-item:nth-child(2) .timeline-dot { animation-delay: 0.6s; }
#stages.is-visible .timeline-item:nth-child(3) .timeline-dot { animation-delay: 1.2s; }
#stages.is-visible .timeline-item:nth-child(4) .timeline-dot { animation-delay: 1.8s; }

/* --- Portfolio: items poppen in met stagger --- */

#portfolio.is-visible .portfolio-item {
  animation: pop-in 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

#portfolio.is-visible .portfolio-item:nth-child(1) { animation-delay: 0.1s; }
#portfolio.is-visible .portfolio-item:nth-child(2) { animation-delay: 0.2s; }
#portfolio.is-visible .portfolio-item:nth-child(3) { animation-delay: 0.3s; }
#portfolio.is-visible .portfolio-item:nth-child(4) { animation-delay: 0.4s; }
