/* Shared styles for the English (/) and Dutch (/nl/) pages.
   Layout: one dark sidebar (like the PDF CV) + one continuous content column
   made of full-width bars, no separate cards. */

:root {
  color-scheme: light;
  --navy: #3f5578;        /* lighter blue in light mode, so it isn't a fixed dark block.
                              Used for the banner and every section bar: one flat colour. */
  --navy-top: #445b83;    /* subtle gradient for the sidebar, half the previous swing */
  --navy-bottom: #3a4f6d;
  --navy-soft: #5872a1;   /* portrait placeholder behind the photo only */
  --bg: #e9ebf1;          /* page background around the sheet */
  --card: #ffffff;        /* the sheet itself */
  --text: #2b3040;
  --heading: #333b4d;
  --muted: #666b79;
  --border: #e2e5ec;
  --accent: #f0a04b;      /* warm tone picked from the photo (hair) */
  --accent-ink: #a75f12;  /* darker version for text on light backgrounds */
}

/* Dark mode: follows the system, unless the visitor picked a theme with the button */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --navy: #333b4d;      /* back to the deep PDF navy in dark mode */
    --navy-top: #383f52;
    --navy-bottom: #2e3644;
    --navy-soft: #4a5368;
    --bg: #0d1016;
    --card: #1a1f2a;
    --text: #e4e7ee;
    --heading: #e9ecf4;
    --muted: #a0a7b8;
    --border: #2b3242;
    --accent-ink: #f0a04b;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --navy: #333b4d;
  --navy-top: #383f52;
  --navy-bottom: #2e3644;
  --navy-soft: #4a5368;
  --bg: #0d1016;
  --card: #1a1f2a;
  --text: #e4e7ee;
  --heading: #e9ecf4;
  --muted: #a0a7b8;
  --border: #2b3242;
  --accent-ink: #f0a04b;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

/* Smooth light/dark switch: every colour on the page (backgrounds, the sidebar,
   text, borders, shadows) fades at the same speed instead of snapping.
   Transitioning background-color also catches colours set via the `background`
   shorthand (e.g. `background: var(--navy)`), since that shorthand sets the
   background-color longhand. Every bar uses the same solid --navy, so there is
   no gradient here any more — that used to need a separate, slower transition
   of its own, which is why the sidebar used to visibly lag behind. */
*, *::before, *::after {
  transition: background-color .35s ease, color .35s ease,
              border-color .35s ease, box-shadow .35s ease;
}
body {
  margin: 0;
  font-family: "Lato", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
}
h1, h2, h3 { font-family: "Montserrat", "Lato", system-ui, sans-serif; line-height: 1.2; margin: 0; }
p { margin: 0 0 12px; }
p:last-child { margin-bottom: 0; }
a { color: inherit; }
ul { list-style: none; margin: 0; padding: 0; }
.muted { color: var(--muted); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* ---------- Page: sidebar + content ---------- */
.layout {
  max-width: 1200px;
  margin: 0 auto;
  background: var(--card);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

/* ---------- Sidebar ---------- */
.side {
  background: linear-gradient(180deg, var(--navy-top) 0%, var(--navy-bottom) 100%);
  box-shadow: inset -14px 0 24px -16px rgba(0, 0, 0, 0.4);
  color: #fff;
  padding: 18px 24px 36px;
}
.side-inner {
  max-width: 420px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.topbar {
  align-self: stretch;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 22px;
}
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font: 700 0.9rem "Lato", sans-serif;
  text-decoration: none;
  cursor: pointer;
}
.pill:hover { background: rgba(255, 255, 255, 0.18); }
.pill svg { width: 18px; height: 18px; }

.portrait {
  position: relative;
  width: 200px;
  height: 272px;
  border-radius: 999px;            /* same arch shape as the CV photo */
  overflow: hidden;
  background: var(--navy-soft);
  border: 4px solid rgba(9, 13, 20, 0.45);   /* dark, translucent ring for depth instead of flat white */
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35), inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  display: grid;
  place-items: center;
  font: 800 3rem "Montserrat", sans-serif;
  color: rgba(255, 255, 255, 0.85);
}
.portrait img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 0;          /* photo.jpg is already cropped to head and shoulders */
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 26px;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.88);
}
.status::before {
  content: "";
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #57d38c;
  box-shadow: 0 0 0 4px rgba(87, 211, 140, 0.2);
}
.side h1 {
  margin: 14px 0 8px;
  font-size: clamp(2rem, 8vw, 2.4rem);
  font-weight: 800;
  letter-spacing: 0.005em;
  text-wrap: balance;
}
.role {
  margin: 0;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  font-family: "Montserrat", sans-serif;
  text-wrap: balance;
}
.actions {
  width: 100%;
  display: grid;
  gap: 10px;
  margin-top: 26px;
}
.btn {
  display: block;
  padding: 12px 20px;
  border-radius: 10px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  border: 2px solid transparent;
  transition: transform .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: #2a1a05; }
.btn-primary:hover { background: #f5b26a; }
.btn-ghost { border-color: rgba(255, 255, 255, 0.45); color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); }

.contact-list {
  width: 100%;
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  display: grid;
  gap: 16px;
  text-align: left;
}
.contact-list small {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.contact-list a, .contact-list span { color: #fff; font-weight: 700; text-decoration: none; word-break: break-word; }
.contact-list a:hover { text-decoration: underline; }

/* ---------- Content column: banner + full-width bars ---------- */
.content { --pad: 24px; padding: 0 var(--pad) 24px; min-width: 0; }

/* Banner at the top: full width, edge to edge */
.banner {
  margin: 0 calc(var(--pad) * -1);      /* no gap: the first section bar sits right below */
  padding: 40px var(--pad) 36px;
  background: var(--navy);
  color: #fff;
  border-bottom: 4px solid var(--accent);
}
.banner h2 {
  margin-bottom: 14px;
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
.banner p { color: rgba(255, 255, 255, 0.8); }
.banner .intro { font-size: 1.15rem; line-height: 1.6; color: #fff; }

/* Every section starts with a bar that runs edge to edge */
.block { margin-bottom: 40px; }
.block > h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 calc(var(--pad) * -1) 24px;
  padding: 12px var(--pad);
  background: var(--navy);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.block > h2::before {
  content: "";
  width: 11px; height: 11px;
  background: var(--accent);
  border-radius: 2px;
  flex: none;
}

/* ---------- Timeline (mirrors the CV) ---------- */
.timeline { margin: 0; padding: 0 0 0 28px; position: relative; }
.timeline::before {
  content: "";
  position: absolute;
  left: 6px; top: 8px; bottom: 8px;
  width: 2px;
  background: var(--heading);
}
.timeline li { position: relative; padding-bottom: 26px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: "";
  position: absolute;
  left: -28px; top: 6px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--card);
  border: 2px solid var(--heading);
}
.timeline li.now::before { background: var(--accent); border-color: var(--accent-ink); }
.timeline .when { font-weight: 700; font-size: 0.9rem; color: var(--accent-ink); }
.timeline .who { font-family: "Montserrat", sans-serif; font-weight: 700; font-size: 1.08rem; color: var(--heading); }
.timeline .what { margin: 2px 0 0; color: var(--muted); }
.timeline .tech {
  margin-top: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-ink);
}

/* ---------- Aligned rows (skills, education, personal) ---------- */
.rows { margin: 0; }
.rows > div {
  display: grid;
  gap: 2px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.rows > div:first-child { padding-top: 0; }
.rows > div:last-child { border-bottom: 0; padding-bottom: 0; }
.rows dt {
  padding-top: 2px;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.rows dd { margin: 0; }
.rows dd strong { display: block; color: var(--heading); }
.rows .note { display: block; font-size: 0.9rem; color: var(--muted); }

.foot {
  padding: 22px 0 8px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
}

/* ---------- Bigger screens ---------- */
@media (min-width: 640px) {
  .content { --pad: 40px; }
  .rows > div { grid-template-columns: 180px 1fr; gap: 24px; }
  .contact-list { grid-template-columns: 1fr 1fr; }
  .contact-list li:nth-child(odd):last-child { grid-column: 1 / -1; }
}
@media (min-width: 960px) {
  body { padding: 32px 24px; }
  .layout {
    grid-template-columns: 360px minmax(0, 1fr);
    border-radius: 18px;
    overflow: clip;                       /* rounds the sidebar and banner corners too */
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.22);
  }
  .content { --pad: 56px; }
  .banner { padding-top: 56px; padding-bottom: 48px; }
  /* 80px = BOTTOM_GAP in layout.js: the empty space under the last contact line
     stays 80px while scrolling and at the very end, where the rounded corner shows. */
  .side { padding: 22px 32px 80px; }
  .contact-list { grid-template-columns: 1fr; }
  .portrait { width: 224px; height: 306px; }
}
/* The sidebar sticks while the content scrolls. layout.js sets --side-top so that a sidebar
   taller than the window first scrolls along until its bottom is visible, then stays there
   until the page ends. Without JS it simply sticks to the top. */
@media (min-width: 960px) {
  .side-inner { position: sticky; top: var(--side-top, 22px); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none; }
  .btn:hover { transform: none; }
}

/* ---------- Site header: shared with marijnsaedt.com and projects.marijnsaedt.com ---------- */
.site-header {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.site-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--heading);
  font: 800 1.1rem "Montserrat", sans-serif;
}
.site-logo {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--navy);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
}
.site-nav { display: flex; flex-wrap: wrap; gap: 6px; }
.site-nav a {
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid transparent;
  text-decoration: none;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.95rem;
}
.site-nav a:hover { color: var(--heading); }
.site-nav a[aria-current="page"] { color: var(--heading); background: var(--card); border-color: var(--border); }
@media (min-width: 960px) {
  .site-header { padding: 0 0 20px; }
}
