/* ==========================================================================
   jacco.io — Jacco Koppes
   Design tokens first, then base, then components (top of page to bottom).
   Hex values are fallbacks for browsers without oklch(); the oklch line wins
   everywhere else.
   ========================================================================== */

:root {
  /* Surfaces */
  --paper:        #f8f9fb;
  --paper:        oklch(0.98 0.004 250);
  --paper-alt:    #f3f4f7;
  --paper-alt:    oklch(0.955 0.005 250);
  --deep:         #1f2530;
  --deep:         oklch(0.24 0.03 250);
  --deep-card:    #262d3a;
  --deep-card:    oklch(0.28 0.035 250);

  /* Ink */
  --ink:          #22262c;
  --ink:          oklch(0.24 0.015 250);
  --ink-muted:    #5c626c;
  --ink-muted:    oklch(0.42 0.015 250);
  --ink-soft:     #656b76;
  --ink-soft:     oklch(0.45 0.015 250);
  --on-deep:      #f2f3f6;
  --on-deep:      oklch(0.96 0.005 250);
  --on-deep-soft: #c9cfda;
  --on-deep-soft: oklch(0.82 0.02 250);
  --on-deep-mute: #9aa4b5;
  --on-deep-mute: oklch(0.7 0.04 250);

  /* Accents */
  --accent:       #3a5f9a;
  --accent:       oklch(0.45 0.1 250);
  --navy:         #2b3b55;
  --navy:         oklch(0.32 0.06 250);
  --accent-dot:   #5f88cf;
  --accent-dot:   oklch(0.62 0.12 250);
  --accent-light: #9fb8ee;
  --accent-light: oklch(0.78 0.09 250);
  --accent-tag:   #97aee0;
  --accent-tag:   oklch(0.75 0.08 250);

  /* Lines */
  --line:         #e2e4e8;
  --line:         oklch(0.9 0.006 250);
  --line-strong:  #d2d5db;
  --line-strong:  oklch(0.85 0.008 250);
  --line-btn:     #c7cbd3;
  --line-btn:     oklch(0.82 0.01 250);
  --line-deep:    #313a49;
  --line-deep:    oklch(0.34 0.04 250);
  --tag-bg:       #2b3342;
  --tag-bg:       oklch(0.32 0.045 250);

  --font-sans: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  --wrap: 1180px;
  --gutter: 48px;
  --radius: 8px;
  --radius-sm: 4px;
}

/* ---------- Base ---------- */

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

html { scroll-behavior: smooth; scroll-padding-top: 96px; -webkit-text-size-adjust: 100%; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }

::selection { background: var(--accent); color: var(--paper); }

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

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

.container {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.mono-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.kicker {
  margin: 0 0 20px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
.kicker--light { color: var(--accent-tag); margin-bottom: 14px; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 12px 20px;
  background: var(--navy);
  color: var(--paper);
  font-size: 14px;
  font-weight: 600;
}
.skip-link:focus { left: 12px; top: 12px; color: var(--paper); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.btn--solid { background: var(--navy); color: var(--paper); }
.btn--solid:hover { background: var(--accent); color: var(--paper); }
.btn--ghost { border: 1px solid var(--line-btn); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Nav ---------- */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav__inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 20px var(--gutter);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.nav__brand { font-weight: 700; font-size: 16px; letter-spacing: -0.01em; }

.nav__links {
  display: flex;
  align-items: center;
  gap: 36px;
  font-size: 13px;
  font-weight: 500;
}

.nav__cta { padding: 10px 22px; }

/* Language switch is JS-driven: only show it when JS is available. */
.langswitch { display: none; }
.js .langswitch {
  display: flex;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.langswitch__btn {
  border: 0;
  padding: 8px 12px;
  font: 600 12px/1 var(--font-sans);
  cursor: pointer;
  background: transparent;
  color: var(--ink);
  transition: background-color 0.18s ease, color 0.18s ease;
}
.langswitch__btn:hover { background: var(--paper-alt); }
.langswitch__btn.is-active { background: var(--navy); color: var(--paper); }

/* ---------- Hero ---------- */

.hero {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 168px var(--gutter) 88px;
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 72px;
  align-items: center;
}

.hero__title {
  margin: 0;
  font-weight: 700;
  font-size: clamp(34px, 5.2vw, 68px);
  line-height: 1.08;
  letter-spacing: -0.025em;
}

.hero__lead {
  margin: 28px 0 0;
  max-width: 560px;
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink-muted);
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

.hero__card { min-width: 0; }

.monogram {
  height: 420px;
  background: var(--deep);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 28px;
}
.monogram__top { display: flex; justify-content: space-between; align-items: flex-start; }
.monogram__top .mono-label { color: var(--on-deep-mute); }
.monogram__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent-dot); }
.monogram__mark {
  margin: 0;
  font-weight: 700;
  font-size: clamp(96px, 12vw, 148px);
  line-height: 0.9;
  letter-spacing: -0.05em;
  color: var(--on-deep);
}
.monogram__mark span { color: var(--accent-dot); }
.monogram__foot {
  border-top: 1px solid var(--line-deep);
  padding-top: 16px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.monogram__name { font-size: 13px; font-weight: 600; color: var(--on-deep); }
.monogram__place { color: var(--on-deep-mute); }

/* ---------- Sections ---------- */

.section { padding-block: 88px; }
.section--deep { background: var(--deep); color: var(--on-deep); padding-block: 0; }
.section--deep .container { padding-block: 88px; }
.section--stats { padding-block: 0; border-bottom: 1px solid var(--line); }
.section--stats .container { padding-block: 64px; }

.section__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 52px;
}
.section__head--tabs { align-items: center; margin-bottom: 48px; gap: 20px; }

.section__title {
  margin: 0;
  font-weight: 700;
  font-size: clamp(26px, 3vw, 38px);
  letter-spacing: -0.02em;
}
.section__meta { font-size: 12px; letter-spacing: normal; text-transform: none; color: var(--on-deep-mute); }

/* ---------- Current roles ---------- */

.roles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }

.role {
  background: var(--deep-card);
  border: 1px solid var(--line-deep);
  border-radius: var(--radius);
  padding: 32px;
  transition: border-color 0.18s ease;
}
.role:hover { border-color: var(--accent-tag); }

.role__tag {
  display: inline-block;
  margin: 0 0 18px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-tag);
  background: var(--tag-bg);
  padding: 5px 10px;
  border-radius: 3px;
}
.role__title { margin: 0; font-size: 19px; font-weight: 600; line-height: 1.35; }
.role__org { margin: 6px 0 14px; font-size: 13px; color: var(--accent-light); }
.role__org a { color: var(--accent-light); border-bottom: 1px solid var(--line-deep); }
.role__org a:hover { color: var(--on-deep); border-color: var(--on-deep); }
.role__desc { margin: 0; font-size: 14px; line-height: 1.7; color: var(--on-deep-soft); }

/* ---------- Stats ---------- */

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px; }
.stat__n {
  margin: 0;
  font-weight: 700;
  font-size: clamp(34px, 4vw, 44px);
  letter-spacing: -0.02em;
  color: var(--accent);
}
.stat__label { margin: 8px 0 0; font-size: 13px; line-height: 1.6; color: var(--ink-soft); }

/* ---------- Experience / education ---------- */

/* Without JS both panels are shown, each with its own heading. */
.tabs { display: none; }
.js .tabs {
  display: flex;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--paper-alt);
}
.tabs__btn {
  border: 0;
  margin: 2px;
  padding: 11px 24px;
  border-radius: 5px;
  font: 600 13px/1 var(--font-sans);
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  transition: background-color 0.18s ease, box-shadow 0.18s ease;
}
.tabs__btn.is-active { background: var(--paper); box-shadow: 0 1px 3px rgb(31 37 48 / 0.15); }

.panel + .panel { margin-top: 56px; }
.js .panel + .panel { margin-top: 0; }
.js .panel__heading { display: none; }
.js .panel[hidden] { display: none; }

.panel__heading { margin: 0 0 20px; font-size: 20px; font-weight: 600; }

.track { display: flex; flex-direction: column; }
.track__row {
  display: grid;
  grid-template-columns: 160px 1fr 1.25fr;
  gap: 32px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
  align-items: baseline;
}
.track__years { font-family: var(--font-mono); font-size: 12px; color: var(--accent); }
.track__title { margin: 0; font-size: 15px; font-weight: 600; line-height: 1.5; }
.track__desc { margin: 0; font-size: 14px; line-height: 1.65; color: var(--ink-soft); }

/* ---------- Footer ---------- */

.footer { background: var(--deep); color: var(--on-deep); }
.footer .container { padding-block: 80px 48px; }

.footer__mail {
  display: inline-block;
  font-weight: 700;
  font-size: clamp(24px, 4vw, 52px);
  letter-spacing: -0.02em;
  color: var(--on-deep);
  overflow-wrap: anywhere;
}
.footer__mail:hover { color: var(--accent-light); }

.footer__bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 64px;
  padding-top: 22px;
  border-top: 1px solid var(--line-deep);
  font-size: 12px;
  color: var(--on-deep-mute);
}
.footer__links { display: flex; gap: 28px; }
.footer__links a { color: var(--on-deep-soft); }
.footer__links a:hover { color: var(--on-deep); }

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  :root { --gutter: 32px; }
  .hero {
    grid-template-columns: 1fr;
    gap: 48px;
    padding-top: 132px;
  }
  .hero__card { max-width: 420px; }
  .monogram { height: 340px; }
  .track__row { grid-template-columns: 130px 1fr; }
  .track__desc { grid-column: 2; }
}

@media (max-width: 760px) {
  .section { padding-block: 64px; }
  .section--deep .container,
  .footer .container { padding-block: 64px; }
  .section--stats .container { padding-block: 48px; }
  .roles { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 32px 24px; }
  .section__head { margin-bottom: 36px; }
  .footer__bar { margin-top: 44px; }
}

@media (max-width: 620px) {
  :root { --gutter: 22px; }
  html { scroll-padding-top: 76px; }
  .nav__inner { padding-block: 12px; gap: 10px; }
  .nav__brand { font-size: 15px; white-space: nowrap; }
  .nav__links { gap: 10px; }
  .nav__link { display: none; }
  .nav__cta { padding: 9px 14px; font-size: 12px; white-space: nowrap; }
  .langswitch__btn { padding: 8px 9px; }
  .hero { padding-top: 116px; }
  .hero__actions .btn { flex: 1 1 auto; text-align: center; }
  .monogram { height: 280px; padding: 22px; }
  .role { padding: 24px; }
  .track__row { grid-template-columns: 1fr; gap: 8px; }
  .track__desc { grid-column: auto; }
  .tabs__btn { padding: 10px 16px; }
  .footer__bar { flex-direction: column; align-items: flex-start; }
}

/* ---------- Print ---------- */

@media print {
  .nav, .skip-link, .tabs, .hero__actions { display: none !important; }
  .js .panel[hidden] { display: block !important; }
  .js .panel__heading { display: block !important; }
  body { background: #fff; color: #000; }
  .section--deep, .footer, .monogram { background: #fff !important; color: #000 !important; }
  .role, .track__row { break-inside: avoid; }
  .hero { padding-top: 24px; }
}
