/* jesse.platformengineer.nl: layout & theme. Content lives in content/profile.yaml. */

@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/inter-400.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/inter-600.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/inter-700.woff2") format("woff2"); }

:root {
  color-scheme: light;
  --bg: #f7f7f5;
  --surface: #ffffff;
  --text: #15171c;
  --muted: #565d6b;
  --faint: #7a8090;
  --border: #e3e3df;
  --accent: #2552c4;
  --accent-soft: #e9effc;
  --chip: #f0f1f3;
  --chip-text: #3a404c;
  --draft: #8a5a00;
  --draft-soft: #fdf4e3;
  --shadow: 0 1px 2px rgb(16 24 40 / .04), 0 1px 3px rgb(16 24 40 / .06);
  --radius: 14px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0c0f13; --surface: #141920; --text: #e8eaef; --muted: #a2aab8; --faint: #7d8696;
    --border: #252c36; --accent: #86a8ff; --accent-soft: #1a2440; --chip: #1c222b; --chip-text: #c9cfda;
    --draft: #f1c46b; --draft-soft: #2a2213; --shadow: none;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0c0f13; --surface: #141920; --text: #e8eaef; --muted: #a2aab8; --faint: #7d8696;
  --border: #252c36; --accent: #86a8ff; --accent-soft: #1a2440; --chip: #1c222b; --chip-text: #c9cfda;
  --draft: #f1c46b; --draft-soft: #2a2213; --shadow: none;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 4.5rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 1rem/1.65 var(--font); font-feature-settings: "kern", "calt";
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: var(--accent); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.2; margin: 0; letter-spacing: -.015em; }
p { margin: 0 0 .9em; }
p:last-child { margin-bottom: 0; }

.skip { position: absolute; left: -999px; top: 0; background: var(--surface); padding: .5rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; top: 1rem; }

.wrap { width: 100%; max-width: 50rem; margin: 0 auto; padding: 0 1rem; }
@media (min-width: 640px) { .wrap { padding: 0 1.5rem; } }

/* Top bar */
.topbar {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(160%) blur(10px); -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar .wrap { display: flex; align-items: center; gap: 1rem; height: 3.5rem; }
.brand { font-weight: 700; color: var(--text); text-decoration: none; letter-spacing: -.01em; white-space: nowrap; }
.nav { display: flex; gap: .25rem; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { color: var(--muted); text-decoration: none; font-size: .875rem; padding: .35rem .55rem; border-radius: 8px; white-space: nowrap; }
.nav a:hover { color: var(--text); background: var(--chip); }
@media (max-width: 639px) { .nav { display: none; } .theme-toggle { margin-left: auto; } }
.theme-toggle {
  flex: none; display: inline-grid; place-items: center; width: 2.25rem; height: 2.25rem;
  border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--muted); cursor: pointer;
}
.theme-toggle:hover { color: var(--text); }
.theme-toggle svg { width: 1.1rem; height: 1.1rem; }
.theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .moon { display: block; }
}

/* Hero */
.hero { padding: 4rem 0 2.5rem; }
@media (min-width: 640px) { .hero { padding: 5.5rem 0 3rem; } }
.avatar {
  width: 4rem; height: 4rem; border-radius: 18px; display: grid; place-items: center;
  background: var(--accent); color: var(--bg); font-weight: 700; font-size: 1.35rem; letter-spacing: -.02em; margin-bottom: 1.5rem;
}
.hero h1 { font-size: clamp(2.25rem, 7vw, 3.25rem); font-weight: 700; letter-spacing: -.035em; }
.hero .title { font-size: clamp(1.05rem, 3vw, 1.3rem); color: var(--muted); margin: .6rem 0 0; font-weight: 600; }
.hero .tagline { color: var(--faint); font-size: .95rem; margin: .4rem 0 0; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; margin-top: 1.75rem; }
.loc { display: inline-flex; align-items: center; gap: .4rem; color: var(--muted); font-size: .95rem; }
.loc svg { width: 1rem; height: 1rem; }
.btn {
  display: inline-flex; align-items: center; gap: .5rem; font-weight: 600; font-size: .925rem; text-decoration: none;
  padding: .55rem .95rem; border-radius: 10px; background: var(--text); color: var(--bg); border: 1px solid var(--text);
}
.btn:hover { opacity: .88; }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn svg { width: 1rem; height: 1rem; }

/* Sections */
section { padding: 2.5rem 0; border-top: 1px solid var(--border); }
.label {
  font-size: .75rem; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--faint);
  margin-bottom: 1.25rem;
}
.label.spaced { margin-top: 2.5rem; }
.lead { font-size: 1.075rem; color: var(--text); max-width: 42rem; }
.lead p { color: var(--text); }

/* Bio */
.bio { max-width: 42rem; }
.bio.placeholder {
  border: 1px dashed color-mix(in srgb, var(--draft) 55%, transparent); background: var(--draft-soft);
  border-radius: var(--radius); padding: 1.1rem 1.25rem; color: var(--muted);
}
.badge {
  display: inline-block; font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--draft); border: 1px solid currentColor; border-radius: 999px; padding: .1rem .55rem; margin-bottom: .6rem;
}

/* Expertise grid */
.grid { display: grid; gap: .875rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid { grid-template-columns: 1fr 1fr; } }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem 1.2rem; box-shadow: var(--shadow); }
.card h3 { font-size: 1rem; font-weight: 600; margin-bottom: .65rem; }

.tags { display: flex; flex-wrap: wrap; gap: .375rem; list-style: none; margin: 0; padding: 0; }
.tags li { font-size: .8rem; line-height: 1.4; padding: .2rem .55rem; border-radius: 7px; background: var(--chip); color: var(--chip-text); }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 5px; top: .5rem; bottom: .5rem; width: 2px; background: var(--border); border-radius: 2px; }
.job { position: relative; padding: 0 0 2rem 2rem; }
.job:last-child { padding-bottom: 0; }
.job::before {
  content: ""; position: absolute; left: 0; top: .4rem; width: 12px; height: 12px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--accent);
}
.job.current::before { background: var(--accent); }
.job-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .1rem 1rem; }
.job h3 { font-size: 1.075rem; font-weight: 600; }
.period { font-size: .85rem; color: var(--faint); font-variant-numeric: tabular-nums; white-space: nowrap; }
.company { color: var(--accent); font-weight: 600; font-size: .95rem; margin: .15rem 0 .5rem; }
.job p { color: var(--muted); font-size: .95rem; margin-bottom: .75rem; }
details.earlier { margin-top: 2rem; }
details.earlier > summary {
  cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: .5rem;
  font-weight: 600; font-size: .925rem; color: var(--text); padding: .5rem .9rem; border: 1px solid var(--border); border-radius: 10px; background: var(--surface);
}
details.earlier > summary::-webkit-details-marker { display: none; }
details.earlier > summary::after { content: "+"; color: var(--faint); font-weight: 400; }
details.earlier[open] > summary::after { content: "−"; }
details.earlier[open] > summary { margin-bottom: 2rem; }

/* Lists: education, certifications */
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: .7rem 0; border-bottom: 1px solid var(--border); }
.rows li:first-child { padding-top: 0; }
.rows li:last-child { border-bottom: 0; }
.rows .what { font-weight: 600; }
.rows .sub { display: block; color: var(--muted); font-weight: 400; font-size: .925rem; }
.rows .when { color: var(--faint); font-size: .85rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.two { display: grid; gap: 2.5rem; }
@media (min-width: 640px) { .two { grid-template-columns: 1.4fr 1fr; } }

/* Contact & footer */
.contact p { color: var(--muted); max-width: 36rem; margin-bottom: 1.25rem; }
.links { display: flex; flex-wrap: wrap; gap: .6rem; }
footer { border-top: 1px solid var(--border); padding: 2rem 0 3rem; color: var(--faint); font-size: .85rem; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; }

/* 404 */
.notfound { min-height: 70vh; display: grid; place-content: center; text-align: center; gap: 1rem; padding: 2rem 1rem; }
.notfound h1 { font-size: 3rem; }
.notfound p { color: var(--muted); }

@media print {
  .topbar, .theme-toggle, footer { display: none; }
  details.earlier > summary { display: none; }
  section { break-inside: avoid-page; }
}
