﻿/* ============================================
     RESET & BASE
  ============================================ */
  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

  :root {
    --sand:       #f5f0e8;
    --sand-dark:  #e8e0d0;
    --sand-mid:   #d4c9b4;
    --ocean:      #c5dce8;
    --ocean-deep: #7aadcc;
    --ocean-dark: #3a7a9c;
    --sage:       #a8c4a2;
    --sage-dark:  #6b9465;
    --terra:      #c4855a;
    --terra-light:#e8c4a8;
    --gold:       #c9a84c;
    --gold-light: #f0dfa0;
    --plum:       #7a5c8a;
    --plum-light: #c4aad0;
    --ink:        #2c2420;
    --ink-mid:    #5c4a3c;
    --ink-light:  #8a7a70;
    --white:      #fdfaf5;
    --nav-h:      64px;
    --transition: 0.3s cubic-bezier(0.4,0,0.2,1);
  }

  html { scroll-behavior: smooth; }

  body {
    font-family: 'DM Sans', sans-serif;
    background: var(--sand);
    color: var(--ink);
    min-height: 100vh;
    overflow-x: hidden;
  }

  /* ============================================
     NAVIGATION
  ============================================ */
  nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--nav-h);
    background: rgba(253,250,245,0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--sand-dark);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2.5rem;
    z-index: 1000;
  }

  .nav-logo {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--ink);
    letter-spacing: 0.02em;
    text-decoration: none;
  }

  .nav-logo span {
    color: var(--terra);
  }

  .nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
  }

  .nav-links a {
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--ink-mid);
    text-decoration: none;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    position: relative;
    transition: color var(--transition);
  }

  .nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px; left: 0;
    width: 0; height: 1px;
    background: var(--terra);
    transition: width var(--transition);
  }

  .nav-links a:hover { color: var(--ink); }
  .nav-links a:hover::after { width: 100%; }
  .nav-links a.active { color: var(--terra); }
  .nav-links a.active::after { width: 100%; }

  .nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 4px;
  }

  .nav-toggle span {
    display: block;
    width: 24px; height: 1.5px;
    background: var(--ink);
    transition: var(--transition);
  }

  /* ============================================
     HERO / OVERVIEW SECTION
  ============================================ */
  #home {
    min-height: 100vh;
    padding-top: var(--nav-h);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  /* Subtle background texture */
  .hero-background {
    position: absolute;
    inset: 0;
    background:
      radial-gradient(ellipse 80% 60% at 50% 40%, var(--ocean) 0%, transparent 65%),
      linear-gradient(180deg, var(--sand) 0%, var(--sand-dark) 100%);
    z-index: 0;
  }

  /* Topographic line overlay */
  .hero-background::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
      repeating-linear-gradient(
        0deg,
        transparent,
        transparent 38px,
        rgba(139,110,80,0.06) 38px,
        rgba(139,110,80,0.06) 39px
      ),
      repeating-linear-gradient(
        90deg,
        transparent,
        transparent 38px,
        rgba(139,110,80,0.04) 38px,
        rgba(139,110,80,0.04) 39px
      );
    z-index: 1;
  }

  /* Hero text header */
  .hero-header {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 3rem 2rem 1.5rem;
  }

  .hero-subtitle-top {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-light);
    margin-bottom: 0.75rem;
  }

  .hero-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(2.8rem, 6vw, 4.5rem);
    font-weight: 600;
    color: var(--ink);
    line-height: 1.1;
    letter-spacing: -0.01em;
  }

  .hero-title em {
    font-style: italic;
    color: var(--terra);
  }

  .hero-desc {
    font-size: 1rem;
    color: var(--ink-mid);
    margin-top: 0.75rem;
    font-weight: 300;
    letter-spacing: 0.02em;
  }

  /* ============================================
     OVERVIEW CANVAS
  ============================================ */
  .overview-canvas {
    position: relative;
    z-index: 5;
    width: 100%;
    max-width: 1100px;
    margin: 1rem auto 0;
    padding: 0 1.5rem 3rem;
  }

  .progress-path {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 1;
  }

  /* ============================================
     OVERVIEW PANELS
  ============================================ */
  .topic-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: repeat(4, auto);
    gap: 1.5rem;
    position: relative;
    z-index: 5;
  }

  .topic-card {
    position: relative;
    border-radius: 2rem;
    padding: 1.5rem 1.5rem 1.25rem;
    border: 1px solid rgba(255,255,255,0.7);
    transition: transform var(--transition), box-shadow var(--transition);
    cursor: default;
  }

  .topic-card--clickable {
    cursor: pointer;
  }

  .topic-card:hover {
    transform: translateY(-3px);
  }

  .topic-card--clickable:hover {
    box-shadow: 0 10px 24px rgba(44, 36, 32, 0.12);
  }

  /* Individual panel color themes */
  .topic-card--wie {
    grid-column: 1 / 7;
    grid-row: 1 / 2;
    background: linear-gradient(135deg, #f8f8d8 0%, #e1e7bd 100%);
    box-shadow: 0 4px 20px rgba(180,150,100,0.15);
  }

  .topic-card--innovatie {
    grid-column: 1 / 4;
    grid-row: 2 / 3;
    background: linear-gradient(135deg, #dce8f0 0%, #c8dce8 100%);
    box-shadow: 0 4px 20px rgba(100,160,200,0.15);
  }

  .topic-card--eindreflectie {
    grid-column: 3 / 11;
    grid-row: 3 / 4;
    background: linear-gradient(135deg, #f0d4e7 0%, #e2bbd5 100%);
    box-shadow: 0 4px 20px rgba(180,130,80,0.15);
  }

  .topic-card--internationalisering {
    grid-column: 10 / 13;
    grid-row: 2 / 3;
    background: linear-gradient(135deg, #ddeedd 0%, #c8e0c8 100%);
    box-shadow: 0 4px 20px rgba(100,180,100,0.15);
  }

  .topic-card--seminaries {
    grid-column: 7 / 13;
    grid-row: 1 / 2;
    background: linear-gradient(135deg, #e8dcf0 0%, #d8c8e8 100%);
    box-shadow: 0 4px 20px rgba(150,100,180,0.15);
  }

  .topic-card--persoonlijk {
    grid-column: 4 / 10;
    grid-row: 2 / 3;
    background: linear-gradient(135deg, #f5d7d1 0%, #f8cec6 100%);
    box-shadow: 0 4px 20px rgba(200,160,80,0.15);
  }

  /* Panel header */
  .topic-card-header {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(0,0,0,0.07);
  }


  .topic-card-icon {
    width: 36px; height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
    font-size: 17px;
  }


  .topic-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--ink);
    line-height: 1.2;
  }

  .topic-tagline {
    font-size: 0.72rem;
    color: var(--ink-light);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-top: 2px;
  }

  /* Markers grid inside panel */
  .markers-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    position: relative;
    z-index: 3;
  }

  /* ============================================
     MARKER PINS
  ============================================ */
  .marker {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 0.75rem 0.4rem 0.55rem;
    background: rgba(255,255,255,0.75);
    border: 1px solid rgba(255,255,255,0.9);
    border-radius: 999px;
    cursor: pointer;
    transition: all var(--transition);
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--ink);
    user-select: none;
    text-decoration: none;
  }

  .marker:hover {
    background: rgba(255,255,255,0.95);
    transform: scale(1.04) translateY(-1px);
    box-shadow: 0 4px 14px rgba(0,0,0,0.12);
  }

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

  /* Dot colors per region */
  .topic-card--wie       .marker-dot { background: var(--gold); }
  .topic-card--innovatie .marker-dot { background: var(--ocean-dark); }
  .topic-card--eindreflectie .marker-dot { background: #aa2f8b; }
  .topic-card--internationalisering .marker-dot { background: var(--sage-dark); }
  .topic-card--seminaries .marker-dot { background: var(--plum); }
  .topic-card--persoonlijk .marker-dot { background:#f8866f ; }

  /* Panel icon bg colors */
  .topic-card--wie       .topic-card-icon { background: rgba(196,133,90,0.15); color: var(--terra); }
  .topic-card--innovatie .topic-card-icon { background: rgba(58,122,156,0.15); color: var(--ocean-dark); }
  .topic-card--eindreflectie .topic-card-icon { background: #f5ade3ab; color: #aa2f8b; }
  .topic-card--internationalisering .topic-card-icon { background: rgba(107,148,101,0.15); color: var(--sage-dark); }
  .topic-card--seminaries .topic-card-icon { background: rgba(122,92,138,0.15); color: var(--plum); }
  .topic-card--persoonlijk .topic-card-icon { background: rgba(201,168,76,0.15); color: #f8866f ; }

  /* ============================================
     CONNECTING PATH SVG
  ============================================ */
  .path-svg {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 2;
    overflow: visible;
  }

  .progress-line {
    fill: none;
    stroke: var(--ocean-dark);
    stroke-width: 1.5;
    stroke-dasharray: 6 5;
    opacity: 0.25;
    stroke-linecap: round;
  }

  /* ============================================
     MODAL OVERLAY
  ============================================ */
  .modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(44,36,32,0.5);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
  }

  .modal-overlay.active {
    opacity: 1;
    visibility: visible;
  }

  .modal {
    background: var(--white);
    border-radius: 1.5rem;
    width: 100%;
    max-width: 540px;
    max-height: 100vh;
    overflow-y: auto;
    padding: 2rem;
    position: relative;
    transform: translateY(20px) scale(0.97);
    transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1);
    border: 1px solid var(--sand-dark);
  }

  .modal--section {
    max-width: 860px;
  }

  .modal-overlay.active .modal {
    transform: translateY(0) scale(1);
  }

  .modal-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    margin-bottom: 1rem;
  }

  .modal-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2rem;
    font-weight: 600;
    color: var(--ink);
    line-height: 1.15;
    margin-bottom: 0.25rem;
  }

  .modal-region {
    font-size: 0.8rem;
    color: var(--ink-light);
    margin-bottom: 1.5rem;
  }

  .modal-region:empty {
    display: none;
  }

  .modal-img {
    width: calc(100% + 2rem);
    margin-left: -1rem;
    margin-right: -1rem;
    height: clamp(170px, 22vh, 210px);
    border-radius: 1rem;
    background: var(--sand-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 2.5rem;
    opacity: 1;
    overflow: hidden;
    position: relative;
  }

  .modal-img--gallery {
    background: var(--white); 
  }

  .modal-photo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
    border-radius: 1rem;
  }

  .modal-gallery-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.4rem;
    line-height: 1;
    transition: background var(--transition);
  }

  .modal-gallery-btn:hover {
    background: rgba(0, 0, 0, 0.6);
  }

  .modal-gallery-btn--prev {
    left: 0.6rem;
  }

  .modal-gallery-btn--next {
    right: 0.6rem;
  }

  .modal-gallery-counter {
    position: absolute;
    bottom: 0.5rem;
    right: 0.6rem;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    font-size: 0.72rem;
    letter-spacing: 0.03em;
  }

  .modal-img-inner {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--sand-dark) 0%, var(--sand-mid) 100%);
    display: flex; align-items: center; justify-content: center;
    border-radius: 1rem;
    font-size: 3rem;
    opacity: 0.5;
  }

  .modal-img--gallery .modal-img-inner {
    opacity: 1;
    background: transparent;
  }

  .modal-section {
    margin-bottom: 1.25rem;
  }

  .modal-section-label {
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-light);
    margin-bottom: 0.4rem;
  }

  .modal-section-text {
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--ink-mid);
  }

  .modal-default-content.is-hidden,
  .modal-rich-content.is-hidden {
    display: none;
  }

  .modal-rich-content {
    padding-top: 0.25rem;
  }

  .modal-rich-content .section-container {
    max-width: none;
    margin: 0;
  }

  .modal-rich-content .about-grid,
  .modal-rich-content .reflection-grid {
    gap: 1.25rem;
  }

  .modal-rich-content .stats-row {
    gap: 1rem;
    margin-bottom: 1.5rem;
  }

  .modal-rich-content .activities-intro {
    margin-bottom: 1.75rem;
    max-width: none;
  }

  .modal-rich-content .section-title {
    margin-bottom: 1rem;
  }

  .modal-rich-content .section-label {
    margin-bottom: 0.4rem;
  }

  .modal-rich-content .about-text p:last-child,
  .modal-rich-content .reflection-card:last-child,
  .modal-rich-content .activities-intro:last-child {
    margin-bottom: 0;
  }

  .modal-learnings {
    background: var(--sand);
    border-radius: 0.875rem;
    padding: 1rem 1.25rem;
    border-left: 3px solid var(--terra);
  }

  .modal-learnings .modal-section-label {
    color: var(--terra);
    letter-spacing: 0.1em;
  }

  .modal-close {
    position: absolute;
    top: 1.25rem; right: 1.25rem;
    width: 32px; height: 32px;
    border: 1px solid var(--sand-dark);
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--ink-mid);
    transition: all var(--transition);
    line-height: 1;
    font-family: inherit;
  }

  .modal-close:hover {
    background: var(--sand-dark);
    color: var(--ink);
    transform: rotate(90deg);
  }

  /* ============================================
     ABOUT / OVER MIJ SECTION
  ============================================ */
  #over-mij {
    padding: 6rem 2rem;
    background: var(--white);
    position: relative;
  }

  .section-container {
    max-width: 900px;
    margin: 0 auto;
  }

  .section-label {
    font-size: 0.75rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-light);
    margin-bottom: 0.75rem;
  }

  .section-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 2rem;
    line-height: 1.15;
  }

  .about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
  }

  .about-text p {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--ink-mid);
    margin-bottom: 1rem;
    font-weight: 300;
  }

  .skills-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }

  .skill-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--ink);
  }

  .skill-bar {
    width: 120px;
    height: 4px;
    background: var(--sand-dark);
    border-radius: 999px;
    overflow: hidden;
  }

  .skill-fill {
    height: 100%;
    background: var(--terra);
    border-radius: 999px;
    transform-origin: left;
    animation: skillGrow 1.2s cubic-bezier(0.4,0,0.2,1) both;
    animation-play-state: paused;
  }

  .skill-fill.visible {
    animation-play-state: running;
  }

  @keyframes skillGrow {
    from { transform: scaleX(0); }
    to   { transform: scaleX(1); }
  }

  /* ============================================
     CONTENT SECTIONS
  ============================================ */
  .detail-section {
    padding: 6rem 2rem;
    background: var(--white);
  }

  .modal-source-sections {
    display: none;
  }

  .detail-section--alt { background: var(--sand); }

  .activities-intro {
    font-size: 1rem;
    color: var(--ink-mid);
    line-height: 1.8;
    font-weight: 300;
    max-width: 640px;
    margin-bottom: 3rem;
  }

  .stats-row {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
  }

  .stat-card {
    background: var(--white);
    border: 1px solid var(--sand-dark);
    border-radius: 1rem;
    padding: 1.25rem 1.75rem;
    flex: 1;
    min-width: 140px;
  }

  .stat-number {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--terra);
    line-height: 1;
  }

  .stat-label {
    font-size: 0.75rem;
    color: var(--ink-light);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 0.25rem;
  }

  .reflection-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }

  .reflection-card {
    background: var(--sand);
    border-radius: 1.25rem;
    padding: 1.5rem;
    border: 1px solid var(--sand-dark);
    transition: transform var(--transition);
  }

  .reflection-card:hover {
    transform: translateY(-2px);
  }

  .reflection-card-icon {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
  }

  .reflection-card h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 0.5rem;
  }

  .reflection-card p {
    font-size: 0.875rem;
    color: var(--ink-mid);
    line-height: 1.7;
    font-weight: 300;
  }

  /* ============================================
     FOOTER
  ============================================ */
  footer {
    background: var(--ink);
    color: rgba(255,255,255,0.5);
    text-align: center;
    padding: 2rem;
    font-size: 0.8rem;
    letter-spacing: 0.06em;
  }

  footer span { color: rgba(255,255,255,0.8); }

  /* ============================================
     RESPONSIVE
  ============================================ */
  @media (max-width: 900px) {
    .topic-grid {
      grid-template-columns: 1fr 1fr;
      grid-template-rows: auto;
      gap: 1rem;
    }

    .topic-card--wie,
    .topic-card--innovatie,
    .topic-card--eindreflectie,
    .topic-card--internationalisering,
    .topic-card--seminaries,
    .topic-card--persoonlijk {
      grid-column: auto;
      grid-row: auto;
    }

    .topic-card--persoonlijk {
      grid-column: 1 / -1;
    }

    .about-grid { grid-template-columns: 1fr; gap: 2rem; }
    .reflection-grid { grid-template-columns: 1fr; }
    .stats-row { gap: 1rem; }
  }

  @media (max-width: 600px) {
    nav { padding: 0 1.25rem; }
    .nav-links { display: none; }
    .nav-links.open {
      display: flex;
      flex-direction: column;
      position: fixed;
      top: var(--nav-h); left: 0; right: 0;
      background: var(--white);
      padding: 1.5rem 1.5rem 2rem;
      border-bottom: 1px solid var(--sand-dark);
      gap: 1.25rem;
      z-index: 999;
    }
    .nav-toggle { display: flex; }

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

    .topic-card--persoonlijk { grid-column: 1; }
    .hero-header { padding-top: 2rem; }
    .modal { padding: 1.5rem; }
    .modal-title { font-size: 1.5rem; }
  }

  /* ============================================
     SCROLL FADE IN
  ============================================ */
  .fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
  }

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

  /* Stagger delays */
  .fade-in:nth-child(1) { transition-delay: 0.05s; }
  .fade-in:nth-child(2) { transition-delay: 0.12s; }
  .fade-in:nth-child(3) { transition-delay: 0.19s; }
  .fade-in:nth-child(4) { transition-delay: 0.26s; }
  .fade-in:nth-child(5) { transition-delay: 0.33s; }
  .fade-in:nth-child(6) { transition-delay: 0.40s; }

  /* Scrollbar */
  ::-webkit-scrollbar { width: 6px; }
  ::-webkit-scrollbar-track { background: var(--sand); }
  ::-webkit-scrollbar-thumb { background: var(--sand-mid); border-radius: 3px; }

  .topic-title-trigger { display:block; width:100%; text-align:left; background:transparent; border:0; padding:0; cursor:pointer; position:relative; z-index:2; }
  .topic-title-trigger:hover .topic-title { color: inherit; text-decoration: none; }
  .topic-title-trigger:hover .topic-tagline { color: var(--ink); }
  .topic-title-trigger:focus-visible { outline: none; }
  .topic-title-trigger .topic-title { margin: 0; transition: color 0.2s ease; }
  .topic-title-trigger .topic-tagline { margin: 0; transition: color 0.2s ease; }
