:root {
  --bg: #f7f6f2;
  --surface: #ffffff;
  --text: #1c2430;
  --muted: #5b6573;
  --line: #e3e1da;
  --accent: #1f3a5f;
  --accent-soft: #e8edf4;
  --highlight: #c8102e;
  --radius: 14px;
  --max: 1080px;
  font-size: 17px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12161c;
    --surface: #1a2029;
    --text: #e8ebef;
    --muted: #a3acb8;
    --line: #2b3340;
    --accent: #8fb3e0;
    --accent-soft: #1f2a3a;
    --highlight: #ff6b7d;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { font-weight: 700; letter-spacing: .02em; color: var(--accent); text-decoration: none; white-space: nowrap; }
.brand span { color: inherit; }
.nav { display: flex; gap: 22px; align-items: center; }
.nav a { color: var(--muted); text-decoration: none; font-size: .95rem; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }
.nav .btn { color: #fff; }
@media (max-width: 720px) {
  .nav { gap: 14px; }
  .nav .hide-sm { display: none; }
}

/* Buttons */
.btn {
  display: inline-block; padding: 11px 20px; border-radius: 999px;
  background: var(--accent); color: #fff; text-decoration: none; font-weight: 600; font-size: .95rem;
  border: 1px solid var(--accent);
}
@media (prefers-color-scheme: dark) { .btn { color: #0f1620 !important; } }
.btn:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--accent) !important; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* Hero */
.hero { padding: 72px 0 56px; }
.hero .wrap { display: grid; grid-template-columns: 1fr 260px; gap: 48px; align-items: center; }
.eyebrow { color: var(--accent); font-weight: 600; font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 14px; }
h1 { font-size: clamp(2rem, 4.6vw, 3.2rem); line-height: 1.12; margin: 0 0 20px; letter-spacing: -.02em; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 40ch; margin: 0; }
.portrait { width: 260px; height: 260px; border-radius: 50%; object-fit: cover; border: 6px solid var(--surface); box-shadow: 0 10px 40px rgba(0,0,0,.08); }
@media (max-width: 760px) {
  .hero { padding: 40px 0 32px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 28px; }
  .portrait { width: 140px; height: 140px; order: -1; }
}

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding: 0 0 64px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.stat b { display: block; font-size: 1.7rem; color: var(--accent); line-height: 1.2; }
.stat span { color: var(--muted); font-size: .9rem; }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* Sections */
section.block { padding: 56px 0; border-top: 1px solid var(--line); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 0 0 10px; letter-spacing: -.01em; }
h3 { font-size: 1.15rem; margin: 0 0 8px; }
.section-intro { color: var(--muted); max-width: 60ch; margin: 0 0 32px; }

.grid { display: grid; gap: 18px; }
.grid.three { grid-template-columns: repeat(3, 1fr); }
.grid.two { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 860px) { .grid.three, .grid.two { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; display: flex; flex-direction: column;
}
.card p { color: var(--muted); margin: 0 0 14px; }
.card ul { margin: 0 0 16px; padding-left: 18px; color: var(--muted); }
.card .more { margin-top: auto; font-weight: 600; text-decoration: none; }
.tag { display: inline-block; font-size: .78rem; font-weight: 600; color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 3px 10px; margin-bottom: 12px; align-self: flex-start; }
.num { font-size: .85rem; font-weight: 700; color: var(--accent); margin-bottom: 10px; }

/* Page header */
.page-head { padding-top: 56px; padding-bottom: 24px; }
.page-head .lead { max-width: 60ch; }

/* Timeline (CV) */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline > li { display: grid; grid-template-columns: 170px 1fr; gap: 24px; padding: 22px 0; border-top: 1px solid var(--line); }
.timeline > li:first-child { border-top: 0; }
.timeline .when { color: var(--muted); font-size: .92rem; padding-top: 2px; }
.timeline h3 { margin-bottom: 2px; }
.timeline .org { color: var(--accent); font-weight: 600; margin: 0 0 8px; }
.timeline ul { margin: 0; padding-left: 18px; color: var(--muted); }
@media (max-width: 640px) { .timeline > li { grid-template-columns: 1fr; gap: 4px; } }

.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.chips li { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: .9rem; }

/* CTA */
.cta { background: var(--accent); color: #fff; border-radius: 20px; padding: 44px; margin: 56px 0; }
.cta h2 { color: #fff; }
.cta p { color: rgba(255,255,255,.85); max-width: 55ch; }
.cta a.btn { background: #fff; color: #1f3a5f !important; border-color: #fff; }
.cta a.btn.ghost { background: transparent; color: #fff !important; border-color: rgba(255,255,255,.6); }
@media (prefers-color-scheme: dark) { .cta { background: #1f3a5f; } }
@media (max-width: 640px) { .cta { padding: 28px; } }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 32px 0 48px; color: var(--muted); font-size: .9rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
.site-footer a { color: var(--muted); }
.site-footer nav { display: flex; gap: 18px; flex-wrap: wrap; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; background: var(--surface); padding: 8px 12px; z-index: 99; }

/* --- Mobile fixes --- */
html, body { overflow-x: hidden; }
.stat { min-width: 0; }
.stat b { overflow-wrap: normal; hyphens: auto; }
@media (max-width: 720px) {
  .site-header .wrap { flex-wrap: wrap; height: auto; padding-top: 10px; padding-bottom: 10px; row-gap: 8px; }
  .brand { font-size: 1.05rem; }
  .nav { width: 100%; justify-content: space-between; gap: 8px; }
  .nav a { font-size: .9rem; }
  .nav .btn { padding: 8px 14px; font-size: .85rem; }
  .stat { padding: 14px; }
  .stat b { font-size: 1.15rem; }
  .stat span { font-size: .82rem; }
  .cta .btn-row .btn { width: 100%; text-align: center; }
  .site-footer .wrap { flex-direction: column; }
}
@media (max-width: 380px) {
  .nav { gap: 4px; }
  .nav a { font-size: .85rem; }
}

/* Language switcher */
.lang { display: flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: .82rem; font-weight: 700; order: 3; margin-left: 16px; }
.lang a { color: var(--muted); text-decoration: none; padding: 5px 10px; border-radius: 999px; line-height: 1; }
.lang a:hover { color: var(--text); background: var(--accent-soft); }
.lang a[aria-current] { color: #fff; background: var(--accent); }
@media (prefers-color-scheme: dark) { .lang a[aria-current] { color: #0f1620; } }
.site-header .nav { order: 2; margin-left: auto; }
@media (max-width: 720px) {
  .lang { order: 2; margin-left: auto; }
  .site-header .nav { order: 3; margin-left: 0; }
}
