/* ── Reset & Variables ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --ink:        #1a1a2e;
  --ink-mid:    #3d3d5c;
  --ink-light:  #7a7a99;
  --rule:       #e2e2ec;
  --accent:     #2a52be;       /* naval blue */
  --accent-dim: #eef1fa;
  --bg:         #f9f9fb;
  --white:      #ffffff;
  --radius:     6px;
  --max:        860px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
  max-width: 100vw;
}

/* ── Layout ── */
.page {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px 80px;
}

/* ── Header / Hero ── */
header {
  background: var(--white);
  border-bottom: 1px solid var(--rule);
  padding: 48px 0 40px;
  margin-bottom: 48px;
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 36px;
  align-items: center;
}

.photo-wrap {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--accent-dim);
  border: 3px solid var(--rule);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-placeholder {
  font-size: 48px;
  color: var(--ink-light);
  user-select: none;
}

.header-text h1 {
  font-family: 'DM Serif Display', serif;
  font-size: 2.4rem;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.header-text .subtitle {
  font-size: 1rem;
  color: var(--accent);
  font-weight: 500;
  margin-top: 4px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.75rem;
}

.profile-text {
  font-size: 0.875rem;
  color: var(--ink-mid);
  line-height: 1.7;
  margin-top: 12px;
  max-width: 580px;
}

.contact-grid {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px 28px;
  margin-top: 18px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.875rem;
  color: var(--ink-mid);
  text-decoration: none;
  white-space: nowrap;
}

.contact-item:hover { color: var(--accent); }

.contact-item svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* ── Section ── */
section { margin-bottom: 44px; }

.section-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
}

/* ── Experience / Education entries ── */
.entry { margin-bottom: 28px; }
.entry:last-child { margin-bottom: 0; }

.entry-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.entry-title {
  font-weight: 600;
  font-size: 0.96rem;
  color: var(--ink);
}

.entry-org {
  color: var(--ink-mid);
  font-size: 0.88rem;
  font-weight: 400;
}

.entry-period {
  font-size: 0.8rem;
  color: var(--ink-light);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.entry-desc {
  margin-top: 5px;
  font-size: 0.875rem;
  color: var(--ink-mid);
  line-height: 1.65;
}

.rule { border: none; border-top: 1px solid var(--rule); margin: 20px 0; }

/* ── Skills ── */
.skill-group { margin-bottom: 20px; }
.skill-group:last-child { margin-bottom: 0; }

.skill-group-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 9px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag {
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 4px 11px;
  border-radius: var(--radius);
  border: 1px solid #c8d4f5;
}

/* ── Skills prose list ── */
.prose-list {
  list-style: none;
  padding: 0;
}

.prose-list li {
  font-size: 0.875rem;
  color: var(--ink-mid);
  padding: 3px 0 3px 16px;
  position: relative;
}

.prose-list li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* ── Languages ── */
.lang-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

.lang-item {
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 12px 16px;
}

.lang-name {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--ink);
}

.lang-level {
  font-size: 0.78rem;
  color: var(--ink-light);
  margin-top: 2px;
}

/* ── Documents / Links ── */
.doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.doc-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 16px 18px;
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.doc-card:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 12px rgba(42,82,190,0.09);
}

.doc-icon {
  width: 36px;
  height: 36px;
  background: var(--accent-dim);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.doc-icon svg {
  width: 18px;
  height: 18px;
  stroke: var(--accent);
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.doc-info { min-width: 0; }

.doc-title {
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.doc-meta {
  font-size: 0.75rem;
  color: var(--ink-light);
  margin-top: 1px;
}

/* ── Projects ── */
.project-entry { margin-bottom: 20px; }
.project-entry:last-child { margin-bottom: 0; }

.project-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink);
}

.project-desc {
  font-size: 0.875rem;
  color: var(--ink-mid);
  margin-top: 4px;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8rem;
  color: var(--accent);
  text-decoration: none;
  margin-top: 6px;
  font-weight: 500;
}

.project-link:hover { text-decoration: underline; }

.project-link svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── Zelfstudie toggle ── */
.courses-extra { margin-top: 4px; }

.courses-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 5px 13px;
  background: transparent;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  color: var(--accent);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.courses-toggle:hover { background: var(--accent-dim); }

.courses-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.courses-toggle svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.2s ease;
}

.courses-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.courses-extra.is-visible { animation: fadeSlideIn 0.22s ease; }

/* ── Footer ── */
footer {
  border-top: 1px solid var(--rule);
  padding-top: 20px;
  font-size: 0.78rem;
  color: var(--ink-light);
  text-align: center;
  margin-top: 24px;
}

/* ── Responsive ── */
@media (max-width: 600px) {
  header { overflow: hidden; }  /* safety net: no child can cause horizontal scroll */

  .header-inner {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;      /* centers photo cell in the single-column grid */
  }

  .photo-wrap { margin: 0 auto; }

  .header-text h1 { font-size: 1.9rem; }

  .profile-text {
    max-width: 100%;
    overflow-wrap: break-word;  /* prevents long Dutch words from overflowing */
  }

  /* stack contact items vertically on mobile */
  .contact-grid {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }
}
