/* Shared styles for marijnsaedt.com and projects.marijnsaedt.com.
   Colours, fonts and shapes match cv.marijnsaedt.com so the three sites feel like one.
   Layout: one rounded "sheet" on a soft background, a navy banner on top,
   and section titles as full-width navy bars (same as the CV). */

:root {
  color-scheme: light;
  --navy: #3f5578;
  --navy-top: #445b83;
  --navy-bottom: #3a4f6d;
  --navy-soft: #5872a1;
  --bg: #e9ebf1;
  --card: #ffffff;
  --text: #2b3040;
  --heading: #333b4d;
  --muted: #666b79;
  --border: #e2e5ec;
  --accent: #f0a04b;
  --accent-ink: #a75f12;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    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;
  }
}
: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; }
*, *::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; color: var(--heading); }
p { margin: 0 0 12px; }
p:last-child { margin-bottom: 0; }
a { color: inherit; }
ul { list-style: none; margin: 0; padding: 0; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; z-index: 10; padding: 8px 12px; border-radius: 8px; background: var(--card); }

/* ---------- Site header (same as on the CV) ---------- */
.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; align-items: center; 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); }
.site-nav .pill-lang, .site-nav .theme {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--heading);
  font: 700 0.85rem "Lato", sans-serif;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  cursor: pointer;
}
.site-nav .pill-lang { margin-left: 6px; }
.site-nav .theme { width: 40px; padding: 0; }
.site-nav .theme svg { width: 18px; height: 18px; }

/* ---------- The sheet ---------- */
.sheet { max-width: 1200px; margin: 0 auto; background: var(--card); }
.sheet-pad { --pad: 24px; padding: 0 var(--pad) 32px; }

/* Navy banner at the top, like the CV sidebar and profile banner */
.banner {
  background: linear-gradient(180deg, var(--navy-top) 0%, var(--navy-bottom) 100%);
  color: #fff;
  border-bottom: 4px solid var(--accent);
  padding: 40px 24px;
}
.banner-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 40px; }
.banner-text { flex: 999 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.banner h1 { color: #fff; font-weight: 800; font-size: clamp(2.1rem, 5.5vw, 3.4rem); line-height: 1.1; letter-spacing: -0.01em; text-wrap: balance; }
.banner .lead { margin: 0; max-width: 600px; font-size: 1.12rem; color: rgba(255, 255, 255, 0.82); }
.eyebrow {
  font: 700 0.8rem "Montserrat", sans-serif;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  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);
}
.portrait {
  flex: none;
  margin: 0 auto;
  width: 200px;
  height: 272px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--navy-soft);
  border: 4px solid rgba(9, 13, 20, 0.45);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35), inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}
.portrait img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }

.actions { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 6px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 10px;
  border: 2px solid transparent;
  font-weight: 700;
  text-decoration: none;
  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); }

/* ---------- Sections: full-width navy bar as title (same as the CV) ---------- */
.block { margin-top: 40px; }
.block > h2, .bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 calc(var(--pad) * -1) 24px;
  padding: 12px var(--pad);
  background: var(--navy);
  color: #fff;
  font: 800 1.05rem "Montserrat", sans-serif;
  letter-spacing: 0.02em;
}
.block > h2::before, .bar::before {
  content: "";
  width: 11px; height: 11px;
  background: var(--accent);
  border-radius: 2px;
  flex: none;
}
.bar { justify-content: space-between; }
.bar h2 { color: #fff; font: inherit; display: flex; align-items: center; gap: 12px; }
.bar::before { display: none; }
.bar h2::before { content: ""; width: 11px; height: 11px; background: var(--accent); border-radius: 2px; flex: none; }
.bar a { color: var(--accent); font: 700 0.95rem "Lato", sans-serif; text-decoration: none; }
.bar a:hover { text-decoration: underline; }

/* Skill tiles */
.grid4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.tile { border: 1px solid var(--border); border-radius: 14px; padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.tile svg { width: 26px; height: 26px; }
.tile h3 { font-size: 1.05rem; font-weight: 700; }
.tile p { margin: 0; font-size: 0.95rem; color: var(--muted); }

/* Project cards */
.grid3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.proj {
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--card);
}
a.proj { transition: transform .15s ease, border-color .35s ease; }
a.proj:hover { transform: translateY(-3px); border-color: var(--muted); }
.proj[hidden] { display: none; }
.proj .img {
  height: 170px;
  background: linear-gradient(180deg, var(--navy-top) 0%, var(--navy-bottom) 100%);
  border-bottom: 3px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  text-align: center;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.85rem;
}
.proj .img img { width: 100%; height: 100%; object-fit: cover; }
.proj .img:has(img) { padding: 0; }
.proj .img.illu { position: relative; }
.proj .img.illu::after {
  content: attr(data-label);
  position: absolute; right: 10px; bottom: 9px;
  padding: 2px 9px; border-radius: 99px;
  background: rgba(0, 0, 0, 0.6); color: #fff;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.03em;
}
.proj .body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.meta { display: flex; justify-content: space-between; gap: 12px; font-weight: 700; font-size: 0.85rem; color: var(--accent-ink); }
.proj h3 { font-size: 1.15rem; font-weight: 800; }
.proj p { margin: 0; font-size: 0.95rem; color: var(--muted); flex: 1; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 6px; }
.tags li {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-ink);
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--border);
}

/* Filters on the projects page */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.filters button {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--heading);
  font: 700 0.9rem "Lato", sans-serif;
  cursor: pointer;
}
.filters button:hover { border-color: var(--muted); }
.filters button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #2a1a05; }

/* Call to action at the bottom */
.cta {
  margin-top: 48px;
  border-radius: 16px;
  padding: 32px;
  background: linear-gradient(180deg, var(--navy-top) 0%, var(--navy-bottom) 100%);
  color: #fff;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.cta h2 { color: #fff; font-size: 1.5rem; font-weight: 800; }
.cta p { margin: 6px 0 0; color: rgba(255, 255, 255, 0.8); }

.foot {
  margin-top: 40px;
  padding: 22px 0 0;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}
.foot nav { display: flex; flex-wrap: wrap; gap: 18px; }
.foot a { color: var(--muted); }
.foot a:hover { color: var(--heading); }

/* ---------- Bigger screens ---------- */
@media (min-width: 640px) {
  .sheet-pad { --pad: 40px; }
  .banner { padding: 48px 40px; }
}
@media (min-width: 960px) {
  body { padding: 32px 24px; }
  .site-header { padding: 0 0 20px; }
  .sheet { border-radius: 18px; overflow: clip; box-shadow: 0 24px 70px rgba(0, 0, 0, 0.22); }
  .sheet-pad { --pad: 56px; padding-bottom: 40px; }
  .banner { padding: 56px; }
  .portrait { width: 224px; height: 306px; margin: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none; }
  .btn:hover, a.proj:hover { transform: none; }
}
/* The first section bar sits right under the banner, like on the CV */
.sheet-pad > .block:first-child { margin-top: 0; }
