/* ==========================================================================
   Sam Verdyck – stylesheet
   Opbouw:
   1. Variabelen (kleuren en lettertypes)
   2. Basis
   3. Herbruikbare onderdelen (container, knoppen, labels, tags)
   4. Secties, van boven naar onder
   5. Intro-animaties
   ========================================================================== */


/* 1. Variabelen
   -------------------------------------------------------------------------- */
:root {
  color-scheme: light;

  /* Kleuren */
  --bg: #F3F1EC;           /* lichte achtergrond */
  --white: #FFFFFF;
  --ink: #1B1F1D;          /* hoofdtekst */
  --text: #2E3532;         /* tekst in lijsten */
  --muted: #4A524E;        /* grijze bijtekst */
  --line: #D9D5CC;         /* randen en scheidingslijnen */
  --accent: #0E5A55;       /* groen accent (knoppen, links) */
  --accent-dark: #08403C;  /* accent bij hover */
  --deep: #12403B;         /* donkergroene vlakken */
  --deep-2: #1C5A53;       /* kaarten op donkergroen */
  --deepest: #0B2E2A;      /* footer */
  --mint: #E3ECE9;         /* zachte groene achtergrond */
  --soft: #B9C9C5;         /* grijsgroene tekst op donker */
  --soft-2: #D7DDDA;       /* lichte tekst op donker */
  --glow: #8FD3C6;         /* oplichtend groen in de terminal */

  /* Lettertypes */
  --font-body: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Bricolage Grotesque', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}


/* 2. Basis
   -------------------------------------------------------------------------- */
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { text-wrap: balance; }
p, li { text-wrap: pretty; }

a { color: var(--accent); }
/* :where() geeft deze regel geen gewicht, zodat links met een eigen klasse hun kleur houden */
:where(a:hover) { color: var(--accent-dark); }
a:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 8px; }

img { max-width: 100%; height: auto; }

/* Voorkomt horizontaal scrollen door elementen die uitsteken */
.page { overflow-x: clip; }


/* 3. Herbruikbare onderdelen
   -------------------------------------------------------------------------- */

/* Gecentreerde inhoud met zijmarge */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* Standaard sectie: verticale ruimte en kolom */
.section-inner {
  padding-top: 96px;
  padding-bottom: 96px;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

/* Achtergrondbanden over de volle breedte */
.band-white { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.band-dark  { background: var(--deep); color: var(--bg); }
.band-mint  { background: var(--mint); }

/* Kleine label boven een titel, bv. "// whoami" */
.eyebrow { margin: 0; font-family: var(--font-mono); font-size: 15px; color: var(--accent); }
.eyebrow--light { color: var(--soft); }

/* Titel + inleiding bovenaan een sectie */
.section-head { display: flex; flex-direction: column; gap: 16px; max-width: 760px; }
.section-head--narrow { max-width: 720px; }
.section-head--tight { gap: 14px; }

.section-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(32px, 3.6vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.section-title--small { font-size: clamp(30px, 3.2vw, 42px); }

.section-lead { margin: 0; font-size: 20px; color: var(--muted); }

/* Rij met kaarten die naast elkaar staan en op smalle schermen onder elkaar springen */
.card-row { display: flex; flex-wrap: wrap; gap: 20px; align-items: stretch; }

/* Raster dat zelf het aantal kolommen kiest */
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }

/* Knoppen */
.actions { display: flex; flex-wrap: wrap; gap: 16px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 18px;
  text-decoration: none;
}
.btn--primary { background: var(--accent); color: var(--white); }
.btn--light   { background: var(--bg); color: var(--ink); }
.btn--outline { padding: 16px 24px; color: var(--ink); border: 1.5px solid currentColor; }
.btn--outline-light { color: var(--bg); }
.btn--small   { padding: 12px 20px; font-size: inherit; }

/* Ronde tags, bv. vaardigheden */
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag  { padding: 8px 14px; border-radius: 999px; background: var(--white); font-size: 16px; }
.tag--mint { background: var(--mint); }

/* Logo "> sv" */
.logo {
  font-family: var(--font-mono);
  font-size: 18px;
  background: var(--deep);
  color: var(--bg);
  padding: 6px 10px;
  border-radius: 8px;
}
.logo--light { font-size: 16px; background: var(--bg); color: var(--ink); padding: 5px 9px; }

/* Terminalvenster */
.terminal {
  background: var(--deep);
  color: var(--bg);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  font-family: var(--font-mono);
}
.terminal-dots { display: flex; gap: 8px; }
.dot { width: 12px; height: 12px; border-radius: 999px; background: var(--muted); }
.prompt { margin: 0; color: var(--soft); }


/* 4. Secties
   -------------------------------------------------------------------------- */

/* --- Navigatie --- */
.site-header { border-bottom: 1px solid var(--line); }

.nav {
  padding-top: 20px;
  padding-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 20px; }

.nav-links { display: flex; flex-wrap: wrap; align-items: center; gap: 28px; font-size: 16px; font-weight: 500; }
.nav-link  { color: var(--ink); text-decoration: none; }

/* Hamburgerknop: verborgen op grote schermen */
.menu-toggle { display: none; }

/* Mobiel: links verdwijnen achter de hamburgerknop */
@media (max-width: 720px) {
  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 1.5px solid var(--ink);
    border-radius: 999px;
    background: transparent;
    color: var(--ink);
    cursor: pointer;
  }

  /* Drie streepjes: de span zelf is het middelste, ::before en ::after de andere twee */
  .menu-icon,
  .menu-icon::before,
  .menu-icon::after {
    display: block;
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transition: transform .2s ease, background-color .2s ease;
  }
  .menu-icon { position: relative; }
  .menu-icon::before,
  .menu-icon::after { content: ""; position: absolute; left: 0; }
  .menu-icon::before { top: -6px; }
  .menu-icon::after  { top: 6px; }

  /* Open: streepjes worden een kruisje */
  .menu-toggle[aria-expanded="true"] .menu-icon { background-color: transparent; }
  .menu-toggle[aria-expanded="true"] .menu-icon::before { transform: translateY(6px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] .menu-icon::after  { transform: translateY(-6px) rotate(-45deg); }

  /* Menu zit dicht tot script.js de klasse is-open toevoegt */
  .nav-links {
    display: none;
    flex-basis: 100%;   /* neemt een eigen rij onder logo en knop */
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    font-size: 18px;
  }
  .nav-links.is-open { display: flex; }

  .nav-link { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .nav-links .btn--small { justify-content: center; margin-top: 16px; padding: 14px 20px; }
}


/* --- Hero (intro bovenaan) --- */
.hero {
  padding-top: 80px;
  padding-bottom: 96px;
  display: flex;
  flex-wrap: wrap;
  gap: 56px;
  align-items: center;
}

.intro-text { flex: 1 1 540px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.intro-text .eyebrow { letter-spacing: 0.02em; }
.intro-text .actions { align-items: center; }

.hero-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(42px, 5.6vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.02em;
}
.hero-lead { margin: 0; font-size: 21px; color: var(--muted); max-width: 600px; }

/* Foto met terminal die er half overheen schuift */
.hero-media { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; align-items: flex-end; }

.intro-photo {
  width: 100%;
  max-width: 380px;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 24px;
  display: block;
}

.intro-term {
  width: calc(100% - 12px);   /* op mobiel steekt hij 12px links uit de foto, zonder de schermrand te raken */
  max-width: 440px;
  margin-top: -96px;   /* schuift over de onderkant van de foto */
  margin-right: 24px;
  box-sizing: border-box;
  position: relative;
  padding: 24px;
  gap: 16px;
  font-size: 14px;
  box-shadow: 0 12px 32px rgba(27, 31, 29, 0.18);
}

.term-list {
  margin: 0;
  display: grid;
  grid-template-columns: minmax(0, 100px) minmax(0, 1fr);
  gap: 12px 16px;
}
.term-list dt { color: var(--soft); }
.term-list dd { margin: 0; }


/* --- Skills: drie kaarten (backend, frontend, project) --- */
.bridge-card {
  flex: 1 1 0;  /* drie even brede kaarten naast elkaar */
  min-width: 0;
  background: var(--bg);
  border-radius: 20px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.bridge-card--dark { background: var(--deep); color: var(--bg); }

.bridge-label { margin: 0; font-family: var(--font-mono); font-size: 14px; color: var(--muted); }
.bridge-card--dark .bridge-label { color: var(--soft); }
.bridge-card--dark .tag { background: var(--deep-2); }

.bridge-arrow { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; padding: 0 4px; }

/* Smaller scherm: kaarten onder elkaar, pijl gecentreerd en verticaal (↕) */
@media (max-width: 860px) {
  .bridge { flex-direction: column; }
  .bridge-card { flex: 0 0 auto; }
  .bridge-arrow svg { transform: rotate(90deg); }
}

/* Rollen */
.roles { display: flex; flex-direction: column; gap: 20px; }
.roles-title { margin: 0; font-family: var(--font-display); font-size: 24px; font-weight: 700; }

.role { border-top: 3px solid var(--ink); padding-top: 20px; display: flex; flex-direction: column; gap: 8px; }
.role h4 { margin: 0; font-family: var(--font-display); font-size: 20px; font-weight: 700; }
.role p  { margin: 0; color: var(--muted); font-size: 16px; }


/* --- Hoe ik werk --- */
.split-head { display: flex; flex-wrap: wrap; gap: 32px 56px; align-items: flex-end; }
.split-head-main { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.split-head-text { margin: 0; flex: 1 1 420px; min-width: 0; font-size: 20px; color: var(--soft-2); }

.trait { background: var(--deep-2); border-radius: 20px; padding: 28px; display: flex; flex-direction: column; gap: 10px; }
.trait-num { font-family: var(--font-mono); font-size: 15px; color: var(--soft); }
.trait h3 { margin: 0; font-family: var(--font-display); font-size: 22px; font-weight: 700; }
.trait p  { margin: 0; color: var(--soft-2); font-size: 16px; }


/* --- Werkervaring --- */
.timeline { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 20px; }

.job {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px 40px;
}
.job--highlight { border: 2px solid var(--accent); }  /* uitgelichte job */

.job-meta { flex: 0 1 220px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.job-date { font-family: var(--font-mono); font-size: 14px; color: var(--muted); }

.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge  { font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 999px; }
.badge--klant { background: var(--accent); color: var(--white); }
.badge--tech  { background: var(--ink); color: var(--bg); }
.badge--soft  { background: var(--mint); color: var(--accent); }

.job-body { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.job-title { margin: 0; font-family: var(--font-display); font-size: 24px; font-weight: 700; }
.job-company { color: var(--muted); font-weight: 500; }
.job-points {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 17px;
  color: var(--text);
}


/* --- Opleiding --- */
.edu {
  padding-top: 96px;
  padding-bottom: 96px;
  display: flex;
  flex-wrap: wrap;
  gap: 40px 72px;
  align-items: flex-start;
}
.edu-head { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.edu-lead { margin: 0; font-size: 18px; color: var(--muted); }

.edu-list {
  flex: 2 1 560px;
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border-bottom: 1px solid var(--line);
}
.edu-item { display: flex; flex-wrap: wrap; gap: 6px 32px; padding: 24px 0; border-top: 1px solid var(--line); }

.edu-year { flex: 0 0 150px; font-family: var(--font-mono); font-size: 15px; color: var(--muted); padding-top: 4px; }
.edu-year--current { color: var(--accent); }  /* lopende opleiding */

.edu-info { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.edu-info h3 { margin: 0; font-family: var(--font-display); font-size: 22px; font-weight: 700; line-height: 1.25; }
.edu-info p  { margin: 0; color: var(--muted); font-size: 17px; }


/* --- Naast het werk --- */
.section-inner--compact { padding-top: 88px; padding-bottom: 88px; gap: 40px; }

.hobby-terminal { flex: 3 1 560px; min-width: 0; padding: 28px 32px; gap: 20px; font-size: 15px; }
.hobby-terminal .dot { background: var(--deep-2); }

.project { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.project:not(:last-child) { padding-bottom: 20px; border-bottom: 1px solid var(--deep-2); }

.project-name  { flex: 0 0 180px; display: flex; flex-direction: column; gap: 4px; }
.project-dir   { color: var(--glow); font-weight: 500; }
.project-since { color: var(--soft); font-size: 13px; }
.project-text  {
  flex: 1 1 280px;
  min-width: 0;
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  color: var(--soft-2);
}

.readme {
  flex: 2 1 340px;
  min-width: 0;
  background: var(--white);
  border-radius: 20px;
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.readme-label { margin: 0; font-family: var(--font-mono); font-size: 14px; color: var(--muted); }
.readme-text  { margin: 0; font-size: 18px; color: var(--text); }
.readme-foot  {
  margin-top: auto;   /* duwt dit blok naar de onderkant van de kaart */
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.readme-question { margin: 0; font-size: 16px; font-weight: 600; }


/* --- Contact --- */
.contact {
  padding-top: 96px;
  padding-bottom: 96px;
  display: flex;
  flex-wrap: wrap;
  gap: 48px 56px;
  align-items: center;
}
.contact-main { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }

.contact-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(36px, 4.4vw, 60px);
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.contact-lead { margin: 0; font-size: 20px; color: var(--soft-2); }

.contact-list {
  flex: 1 1 380px;
  min-width: 0;
  margin: 0;
  background: var(--deep-2);
  border-radius: 20px;
  padding: 28px;
  display: grid;
  grid-template-columns: minmax(0, 110px) minmax(0, 1fr);
  gap: 16px;
  font-size: 17px;
}
.contact-list dt { font-family: var(--font-mono); font-size: 14px; color: var(--soft); padding-top: 3px; }
.contact-list dd { margin: 0; }
.contact-list a  { color: var(--bg); }

/* Smal scherm: label boven de waarde, zodat lange adressen binnen de kaart blijven */
@media (max-width: 480px) {
  .contact-list { grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 24px; }
  .contact-list dt { padding-top: 0; }
  .contact-list dd { margin-bottom: 14px; overflow-wrap: anywhere; }
  .contact-list dd:last-child { margin-bottom: 0; }
}


/* --- Footer --- */
.site-footer { background: var(--deepest); color: var(--soft-2); }

.footer-inner {
  padding-top: 32px;
  padding-bottom: 32px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: 15px;
}
.footer-brand { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.footer-name  { color: var(--bg); font-weight: 600; }
.footer-copy  { margin: 0; font-family: var(--font-mono); font-size: 14px; }


/* 5. Intro-animaties
   Elementen schuiven bij het laden na elkaar in beeld,
   daarna "typt" de terminal en verschijnen de regels één voor één.
   -------------------------------------------------------------------------- */
.intro-text > * { animation: rise .7s cubic-bezier(.2, .7, .2, 1) both; }
.intro-text > *:nth-child(2) { animation-delay: .08s; }
.intro-text > *:nth-child(3) { animation-delay: .16s; }
.intro-text > *:nth-child(4) { animation-delay: .24s; }

.intro-photo { animation: photo 1s cubic-bezier(.2, .7, .2, 1) .1s both; }
.intro-term  { animation: rise .7s cubic-bezier(.2, .7, .2, 1) .45s both; }

/* Typ-effect: breedte groeit van 0 tot 17 tekens */
.typed {
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  vertical-align: bottom;
  width: 17ch;
  animation: type .8s steps(17, end) 1s both;
}

/* Regels verschijnen na elkaar; --i (in de HTML) bepaalt de volgorde */
.row-in { animation: fade .45s ease calc(1.75s + var(--i) * .12s) both; }

/* Knipperende cursor */
.cursor { color: var(--glow); animation: blink 1.05s steps(1, end) 2.6s infinite; }

@keyframes rise  { from { opacity: 0; transform: translateY(14px); } }
@keyframes photo { from { opacity: 0; transform: translateY(18px) scale(.97); } }
@keyframes type  { from { width: 0; } }
@keyframes fade  { from { opacity: 0; transform: translateX(-6px); } }
@keyframes blink { 50% { opacity: 0; } }

/* Geen animaties voor bezoekers die minder beweging willen */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
