/* ---------- Fonts (self-hosted, Latin subset) ---------- */
@font-face {
  font-family: "Montserrat";
  src: url("fonts/montserrat-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Montserrat";
  src: url("fonts/montserrat-800.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: "Lato";
  src: url("fonts/lato-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Lato";
  src: url("fonts/lato-600.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --bg: #050508;
  --card: rgba(255, 255, 255, 0.025);
  --card-hover: rgba(255, 255, 255, 0.045);
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #e8e8f2;
  --dim: #a0a0b8;
  --faint: #6a6a85;
  --green: #137f69;
  --accent: #1fc29a;
  --cyan: #00e5cc;
  --grad: linear-gradient(100deg, #17a684 0%, #00e5cc 100%);
  --radius: 16px;
  --maxw: 1120px;
  --pad: clamp(20px, 5vw, 48px);
  --font-head: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Lato", system-ui, -apple-system, "Segoe UI", sans-serif;
  --nav-h: 72px;
  color-scheme: dark;
}

/* ---------- Language switching ---------- */
.lang-nl body [lang="en"],
.lang-en body [lang="nl"] {
  display: none !important;
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  z-index: -1;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(90px);
}
body::before {
  width: 640px;
  height: 640px;
  top: -220px;
  left: -200px;
  background: radial-gradient(circle, rgba(19, 127, 105, 0.32), transparent 70%);
}
body::after {
  width: 560px;
  height: 560px;
  bottom: -240px;
  right: -180px;
  background: radial-gradient(circle, rgba(0, 229, 204, 0.14), transparent 70%);
}

#stars {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

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

a {
  color: inherit;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.1;
}

p {
  margin: 0;
}

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 6px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus {
  top: 12px;
}

.muted {
  color: var(--dim);
  font-weight: 400;
}

.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  transition: background 0.3s, border-color 0.3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled,
.nav.open {
  background: rgba(5, 5, 8, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-color: var(--line);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  max-width: calc(var(--maxw) + 2 * var(--pad));
  height: var(--nav-h);
  margin: 0 auto;
  padding: 0 var(--pad);
}

.brand {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.24em;
  text-decoration: none;
  white-space: nowrap;
}

.menu {
  margin-left: auto;
}
.menu ul {
  display: flex;
  gap: 26px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.menu a {
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--dim);
  transition: color 0.2s;
}
.menu a:hover,
.menu a[aria-current="true"] {
  color: var(--text);
}

.lang-switch {
  display: flex;
  padding: 3px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
}
.lang-switch button {
  padding: 4px 10px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--dim);
  font: 600 0.72rem/1 var(--font-body);
  letter-spacing: 0.08em;
  cursor: pointer;
}
.lang-switch button[aria-pressed="true"] {
  background: var(--grad);
  color: #04120e;
}

.menu-btn {
  display: none;
  margin-left: auto;
  padding: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: none;
  color: var(--text);
  cursor: pointer;
}
.menu-btn svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

/* ---------- Layout ---------- */
main {
  max-width: calc(var(--maxw) + 2 * var(--pad));
  margin: 0 auto;
  padding: 0 var(--pad);
}

.section {
  padding: clamp(72px, 10vw, 120px) 0 0;
}

.section-head {
  margin-bottom: 32px;
}
.section-head h2 {
  margin-top: 10px;
  font-size: clamp(2rem, 4vw, 2.9rem);
  letter-spacing: -0.01em;
}

.card {
  padding: 26px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.card-title {
  margin: 26px 0 14px;
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--dim);
}
.card-title:first-child {
  margin-top: 0;
}

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  align-items: center;
  gap: clamp(32px, 6vw, 80px);
  min-height: 100svh;
  padding: calc(var(--nav-h) + 40px) 0 64px;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  padding: 7px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--dim);
  font-size: 0.82rem;
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(31, 194, 154, 0.6);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  70% {
    box-shadow: 0 0 0 9px rgba(31, 194, 154, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(31, 194, 154, 0);
  }
}

.hero h1 {
  font-weight: 800;
  font-size: clamp(3.2rem, 8.2vw, 6.6rem);
  line-height: 0.98;
  letter-spacing: -0.025em;
}

.hero .eyebrow {
  margin-top: 22px;
}

.hero-intro {
  max-width: 34em;
  margin-top: 14px;
  color: var(--dim);
  font-size: clamp(1.02rem, 1.4vw, 1.15rem);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}
.actions-center {
  justify-content: center;
  margin-top: 18px;
}

.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s, background 0.2s;
}
.btn-primary {
  background: var(--grad);
  color: #04120e;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px -10px rgba(0, 229, 204, 0.55);
}
.btn-ghost {
  border: 1px solid var(--line-strong);
  color: var(--text);
}
.btn-ghost:hover {
  border-color: var(--accent);
  background: rgba(31, 194, 154, 0.08);
}

.hero-photo {
  position: relative;
  justify-self: end;
  width: 100%;
  max-width: 420px;
  margin: 0;
}
.hero-photo::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: -1;
  border-radius: calc(var(--radius) + 6px);
  background: var(--grad);
  filter: blur(26px);
  opacity: 0.28;
}
.hero-photo img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border: 1px solid var(--line-strong);
  border-radius: calc(var(--radius) + 6px);
}

/* ---------- Marquee ---------- */
.marquee {
  overflow: hidden;
  margin: 0 calc(-1 * var(--pad));
  padding: 22px 0;
  border-block: 1px solid var(--line);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee-track {
  display: flex;
  gap: 56px;
  width: max-content;
  animation: marquee 38s linear infinite;
}
.marquee span {
  font-size: 0.72rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--faint);
  white-space: nowrap;
}
@keyframes marquee {
  to {
    transform: translateX(calc(-50% - 28px));
  }
}

/* ---------- About ---------- */
.about {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}
.about-text p {
  color: var(--dim);
  font-size: 1.05rem;
}
.about-text p + p {
  margin-top: 16px;
}

.facts {
  display: grid;
  gap: 16px;
  margin: 0;
}
.facts dt {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--faint);
}
.facts dd {
  margin: 2px 0 0;
}
.facts a {
  text-decoration-color: var(--accent);
  text-underline-offset: 3px;
}

/* ---------- Timeline (experience & education) ---------- */
.orgs {
  display: grid;
  gap: 14px;
}

.org {
  transition: background 0.25s, border-color 0.25s;
}
.org:hover {
  background: var(--card-hover);
  border-color: var(--line-strong);
}

.org-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 12px;
  margin-bottom: 14px;
}
.org-head h3 {
  font-size: 1.08rem;
}
.org-loc {
  color: var(--dim);
  font-size: 0.9rem;
}
.org-loc::before {
  content: "·";
  margin-right: 12px;
  color: var(--faint);
}
.org-sub {
  margin: -10px 0 14px;
  color: var(--dim);
  font-size: 0.9rem;
}

.roles {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Dot sits on the first text line (24px line box); the connector runs from this
   dot to the next role's dot, so it stays correct when a role has a description. */
.role {
  --dot: 9px;
  --dot-top: 7.5px;
  position: relative;
  padding: 0 0 12px 26px;
}
.role:last-child {
  padding-bottom: 0;
}
.role::before {
  content: "";
  position: absolute;
  left: 0;
  top: var(--dot-top);
  width: var(--dot);
  height: var(--dot);
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(31, 194, 154, 0.12);
}
.role:not(:last-child)::after {
  content: "";
  position: absolute;
  left: calc(var(--dot) / 2 - 0.5px);
  top: calc(var(--dot-top) + var(--dot) + 4px);
  bottom: calc(4px - var(--dot-top));
  width: 1px;
  background: var(--line-strong);
}

.role-line {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  column-gap: 24px;
  line-height: 24px;
}
.role-title {
  font-weight: 600;
}
.role-desc {
  margin-top: 4px;
  max-width: 46em;
  color: var(--dim);
  font-size: 0.92rem;
  line-height: 1.55;
}

.date {
  color: var(--dim);
  font-size: 0.88rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.d-start,
.d-end {
  display: inline-block;
  min-width: 7.6ch;
}
.d-start {
  text-align: right;
}
.d-sep {
  display: inline-block;
  width: 2ch;
  text-align: center;
}

/* ---------- Projects ---------- */
.projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
  gap: 16px;
}

.project {
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform 0.25s, border-color 0.25s, background 0.25s;
}
.project:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  background: var(--card-hover);
}
.project h3 {
  font-size: 1.6rem;
}
.project > p {
  color: var(--dim);
}
.project-kicker {
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

.points {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.95rem;
}
.points li {
  position: relative;
  padding-left: 20px;
}
.points li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 8px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.tags li {
  padding: 4px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--dim);
  font-size: 0.8rem;
}
.tags-lg li {
  padding: 6px 13px;
  color: var(--text);
  font-size: 0.88rem;
}
.project .tags {
  margin-top: auto;
  padding-top: 6px;
}

.project-link {
  align-self: flex-start;
  margin-top: auto; /* bottom of the card, level with the tags of the card next to it */
  color: var(--cyan);
  font-weight: 600;
  text-decoration: none;
}
.tags + .project-link {
  margin-top: 0; /* the tags above already take the free space */
}
.project-link:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ---------- Skills & certificates ---------- */
.skills {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 16px;
  align-items: start;
}

.lang-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.lang-list li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.certs {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.certs li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 18px;
}
.cert-name {
  font-weight: 600;
}
.cert-issuer {
  display: block;
  color: var(--dim);
  font-weight: 400;
  font-size: 0.88rem;
}

/* ---------- Contact ---------- */
.contact {
  padding-bottom: clamp(72px, 10vw, 120px);
  text-align: center;
}
.contact h2 {
  margin-top: 10px;
  font-weight: 800;
  font-size: clamp(2.6rem, 7vw, 5rem);
  letter-spacing: -0.02em;
}
.contact-intro {
  max-width: 32em;
  margin: 18px auto 0;
  color: var(--dim);
  font-size: 1.08rem;
}
.contact-mail {
  display: inline-block;
  margin-top: 26px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(1.15rem, 3.2vw, 1.75rem);
  text-decoration: none;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 2px;
  overflow-wrap: anywhere;
}
.contact-mail:hover {
  color: var(--cyan);
}

/* ---------- Footer ---------- */
.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  max-width: calc(var(--maxw) + 2 * var(--pad));
  margin: 0 auto;
  padding: 28px var(--pad) 36px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 0.85rem;
}
.footer .muted {
  color: var(--faint);
}
.footer a {
  text-decoration: none;
}
.footer a:hover {
  color: var(--text);
}

/* ---------- Scroll reveal (only when JS runs) ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.js .reveal.visible {
  opacity: 1;
  transform: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .about,
  .skills {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 860px) {
  :root {
    --nav-h: 64px;
  }
  .nav-inner {
    gap: 12px;
  }
  .menu-btn {
    display: block;
  }
  .menu {
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    display: none;
    padding: 8px var(--pad) 20px;
    background: #07070b;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 40px -12px rgba(0, 0, 0, 0.8);
  }
  .nav.open .menu {
    display: block;
  }
  .menu ul {
    flex-direction: column;
    gap: 0;
  }
  .menu a {
    display: block;
    padding: 12px 0;
    font-size: 0.85rem;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    padding-top: calc(var(--nav-h) + 36px);
  }
  .hero-photo {
    justify-self: start;
    max-width: 340px;
  }
}

@media (max-width: 520px) {
  .card {
    padding: 22px 20px;
  }
  .role-line {
    display: block;
  }
  .role-line .date {
    display: block;
    margin-top: 2px;
    line-height: 1.4;
  }
  .d-start {
    min-width: 0;
  }
  .certs li {
    flex-direction: column;
    gap: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .marquee-track,
  .status-dot {
    animation: none;
  }
  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .btn,
  .project,
  .org {
    transition: none;
  }
}
