/* =========================
   Variabelen + dark mode
========================= */
:root{
  --bg: #ffffff;
  --text: #111111;
  --muted: #6b7280;
  --brand: #1f6feb;
  --accent: #e5e7eB;
  --card: #ffffff;

  --border: #e5e7eb;
  --radius: 14px;

  --container: 1120px;
  --maxw: 72ch;

  --space: clamp(12px, 2vw, 20px);
  --gap: 1rem;
  --gap-lg: 2rem;
}
@media (prefers-color-scheme: dark){
  :root{
    --bg:#0b0f14; 
    --text:#f2f5f7; 
    --muted:#a9b3bd;
    --brand:#5aa7ff; 
    --accent:#121820; 
    --card:#0f141a;
    --border: rgba(255,255,255,.14);
  }
}

/* =========================
   Base
========================= */
*{ box-sizing:border-box }
html,body{
  margin:0; padding:0;
  background:var(--bg); color:var(--text);
  font:16px/1.6 system-ui,-apple-system,Segoe UI,Roboto,Inter,sans-serif;
}
img{ max-width:100%; display:block }
a{ color:var(--brand); text-decoration:none }
a:hover{ text-decoration:underline }

/* =========================
   Layout / Utilities
========================= */
.container{ max-width: var(--container); margin-inline:auto; padding: 0 1rem; }
.section-head{ margin: 2.5rem 0 1.5rem; }
.spread{ display:flex; align-items:center; justify-content:space-between; gap:24px; flex-wrap:wrap }
.primary-nav{ display:flex; gap:20px }
.muted{ color: var(--muted) }
.hero-photo{
  max-width: clamp(140px, 25%, 240px);
  margin: var(--gap) 0;
}
.hero-photo img{
  width: 100%;
  height: auto;
  border-radius: var(--radius);
}
.header{
  position: relative;
  z-index: 5;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding-block: clamp(.6rem, 1.5vw, 1rem);
}
.footer{
  margin-top: clamp(2.5rem, 6vw, 4rem);
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding-block: clamp(.6rem, 1.5vw, 1rem);
}
.footer .muted,
.footer a{
  color: var(--muted);
  font-weight: 500;
}
.footer a:hover,
.footer a:focus-visible{
  color: var(--text);
  text-decoration: none;
}
.site-title{
  font-weight:700;
  font-size:1.05rem;
  color:var(--text);
  text-decoration:none;
  letter-spacing:.01em;
}
.site-title:hover{ text-decoration:none; color:var(--brand) }
.primary-nav a{
  font-weight:500;
  color:var(--muted);
  padding:.3rem .1rem;
  transition:color .2s ease, opacity .2s ease;
}
.primary-nav a:hover,
.primary-nav a:focus-visible{
  color:var(--text);
  opacity:.9;
}

/* =========================
   Typografie
========================= */
h1{ font-size:clamp(28px, 4.5vw, 36px); line-height:1.15; margin:.2em 0 .3em }
h2{ font-size:clamp(22px, 3.5vw, 28px); margin:1.2em 0 .4em }
h3{ font-size:clamp(18px, 2.6vw, 22px); margin:1em 0 .3em }
p{ margin:.6em 0 }
.lead{ color:var(--muted); font-size:1.05rem }

/* =========================
   Buttons
========================= */
.button{ display:inline-block; padding:.6em 1em; border-radius:999px; background:var(--brand); color:#fff; font-weight:600 }
.button.outline{ background:transparent; color:var(--brand); border:1px solid var(--brand) }
.button:hover{ opacity:.9; text-decoration:none }

/* =========================
   Project Overzicht (cards)
   (LET OP: geen .card__* en geen globale .grid!)
========================= */
.grid.projects-grid{
  display:flex;
  flex-direction:column;
  gap: var(--gap-lg);
  margin-top: calc(var(--space)*1.2);
}
.card{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:var(--radius);
  overflow:hidden;
  transition:transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.card:hover{ transform:translateY(-2px); box-shadow:0 6px 20px rgba(0,0,0,.08) }
.card:focus-within{ box-shadow:0 0 0 2px var(--brand) }
@media (prefers-color-scheme: dark){
  .card{ background:rgba(18,24,32,.85) }
  .card:hover{ box-shadow:0 18px 40px rgba(0,0,0,.65) }
}

.card-link{
  display: grid;
  gap: var(--gap);
  grid-template-columns: 1fr;
  grid-template-areas:
    "body"
    "media";
  align-items: start;
  color: inherit;
  text-decoration: none;
}
.card-link:focus-visible{ outline: 0 }
.card-media{
  grid-area: media;
  width: 100%;
  aspect-ratio: 4 / 3;
  max-height: 320px;
  overflow:hidden;
}
.card-media img{ width: 100%; height: 100%; object-fit: cover; display: block; }
.card-body{
  grid-area: body;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: .6rem;
}
.card-title{ font-size: 1.1rem; margin: 0; }
.card-summary{ color: var(--muted); font-size: .95rem; }
.tags{
  display: flex;
  align-items: center;
  gap: .45rem;
  flex-wrap: nowrap;
  margin: .4rem 0 0;
  padding: 0;
  list-style: none;
  overflow: hidden;
}
.tag{
  background: #f1f5f9;
  border-radius: 999px;
  padding: .25rem .65rem;
  font-size: .83rem;
  white-space: nowrap;
}
@media (prefers-color-scheme: dark){
  .tag{ background: rgba(255,255,255,.12); color: var(--text); border:1px solid rgba(255,255,255,.18) }
}
@media (min-width: 900px){
  .card-link{
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    grid-template-areas: "body media";
    align-items: stretch;
  }
  .card-body{
    grid-column: 1;
    padding: 1.25rem 1.5rem;
  }
  .card-media{
    grid-column: 2;
    align-self: center;
    height: auto;
    min-height: 0;
  }
}

/* =========================
   Project Detail
========================= */
.project-head{ margin: 2rem 0 1.5rem; }
.lead{ color: var(--muted); font-size: 1.1rem; }
.meta{ display: flex; gap: 1rem; flex-wrap: wrap; padding: 0; list-style: none; margin: 1rem 0; color: #111; }
.meta li{ background: #f8fafc; border: 1px solid var(--border); border-radius: 999px; padding: .4rem .8rem; font-size: .9rem; }
.results{ margin: 1rem 0 0; padding: 0; list-style: none; color: #0a0; }
.hero img{ width: 100%; height: auto; border-radius: var(--radius); }
@media (prefers-color-scheme: dark){
  .meta li{ background: rgba(255,255,255,.08); color: var(--text) }
}

/* =========================
   Prose + Render Hooks
========================= */
.prose{ max-width: var(--maxw); line-height: 1.65; font-size: 1.05rem; }
.prose h1,.prose h2,.prose h3{ line-height: 1.2; margin: 2rem 0 1rem; }
.prose p{ margin: 1rem 0; }
.figure{ margin: var(--gap-lg) 0; text-align: center; }
.figure img{ width: 100%; height: auto; border-radius: var(--radius); }
.caption{ color: var(--muted); font-size: .9rem; margin-top: .5rem; }
.link{ text-decoration: underline; text-underline-offset: 3px; }
.h2 .anchor,.h3 .anchor,.h4 .anchor{ opacity: 0; margin-right: .4rem; }
h2:hover .anchor, h3:hover .anchor, h4:hover .anchor{ opacity: .6; }

/* =========================
   Shortcodes
========================= */
.callout{ border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.25rem; margin: 1.25rem 0; background: #f8fafc; }
.callout.success{ background: #f0fdf4; }
.callout .callout-title{ font-weight: 600; margin-bottom: .5rem; }
.cols{ display: grid; gap: var(--gap); margin: var(--gap-lg) 0; }
.cols-2{ grid-template-columns: 1fr 1fr; }
@media (max-width: 900px){ .cols-2{ grid-template-columns: 1fr; } }
.gallery{ display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); margin: var(--gap-lg) 0; }
.gallery img{ width: 100%; border-radius: var(--radius); display: block; }
