:root {
  --bg: #f7f5f1;
  --surface: #ffffff;
  --text: #16203a;
  --muted: #5b6477;
  --line: #e3e0d9;
  --navy: #152340;
  --accent: #8b1e2d;
  --accent-soft: #f4e7e9;
  --on-navy: #ffffff;
  --shadow: 0 1px 2px rgba(21, 35, 64, .05), 0 8px 24px rgba(21, 35, 64, .06);
  --radius: 16px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1526;
    --surface: #151e33;
    --text: #e8ebf2;
    --muted: #9aa3b8;
    --line: #243049;
    --navy: #e8ebf2;
    --accent: #e0707f;
    --accent-soft: #2a1d2a;
    --on-navy: #0e1526;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.2; margin: 0; }
p { margin: 0; }

.wrap { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 24px; }

/* Top bar */
.topbar {
  position: sticky; top: 0; z-index: 10;
  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(--line);
}
.topbar-inner { display: flex; align-items: center; gap: 24px; height: 60px; }
.brand {
  display: grid; place-items: center;
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--navy); color: var(--on-navy);
  font-weight: 700; font-size: 14px; letter-spacing: .02em; text-decoration: none;
}
.nav { display: flex; gap: 24px; margin-left: auto; }
.nav a { color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 500; }
.nav a:hover { color: var(--text); }
.lang { display: flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.lang button {
  border: 0; background: none; color: var(--muted); cursor: pointer;
  font: 600 12px/1 var(--font); letter-spacing: .04em;
  padding: 7px 11px; border-radius: 999px;
}
.lang button[aria-pressed="true"] { background: var(--navy); color: var(--on-navy); }

/* Hero */
.hero {
  display: grid; grid-template-columns: 1.2fr .8fr; gap: 56px; align-items: center;
  padding-top: 72px; padding-bottom: 72px;
}
.eyebrow { color: var(--accent); font-weight: 600; font-size: 15px; margin-bottom: 10px; }
h1 { font-size: clamp(40px, 6vw, 64px); font-weight: 700; letter-spacing: -.025em; color: var(--navy); }
.role { font-size: clamp(18px, 2.2vw, 22px); font-weight: 500; margin-top: 14px; }
.location { display: flex; align-items: center; gap: 6px; color: var(--muted); margin-top: 8px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 18px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface);
  font-weight: 600; font-size: 14px; text-decoration: none;
  transition: border-color .15s, transform .15s;
}
.btn:hover { border-color: var(--muted); transform: translateY(-1px); }
.btn.primary { background: var(--navy); border-color: var(--navy); color: var(--on-navy); }
.btn.primary:hover { border-color: var(--navy); }

.hero-photo { margin: 0; justify-self: end; width: 100%; max-width: 360px; }
.hero-photo img {
  width: 100%; aspect-ratio: 3 / 4; object-fit: cover;
  border-radius: 20px; box-shadow: var(--shadow);
  background: var(--line);
}

/* Icons */
.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.i.fill { fill: currentColor; stroke: none; }
.i .dot { fill: currentColor; }

/* Sections */
.section { padding-top: 56px; padding-bottom: 56px; border-top: 1px solid var(--line); }
h2 {
  font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 24px;
}
h3 { font-size: 18px; font-weight: 600; }
.lead { font-size: 18px; max-width: 70ch; }
.meta { color: var(--muted); font-size: 14px; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 24px 0 0; }
.tags li {
  padding: 6px 14px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
  font-size: 14px; font-weight: 500;
}

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li {
  display: grid; grid-template-columns: 200px 1fr; gap: 24px;
  position: relative; padding-bottom: 32px;
}
.timeline li:last-child { padding-bottom: 0; }
.timeline .when { color: var(--muted); font-size: 14px; font-weight: 500; padding-top: 2px; }
.timeline .what { position: relative; padding-left: 28px; }
.timeline .what::before {
  content: ""; position: absolute; left: 0; top: 7px;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--accent);
}
.timeline li:first-child .what::before { background: var(--accent); }
.timeline li:not(:last-child) .what::after {
  content: ""; position: absolute; left: 5px; top: 22px; bottom: -30px;
  width: 1px; background: var(--line);
}
.org { font-weight: 500; margin-top: 2px; }

/* Cards */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.card {
  display: block; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow);
  text-decoration: none;
}
.card h3 { margin: 6px 0 6px; }
.card-kicker { color: var(--muted); font-size: 13px; font-weight: 500; }
.card .meta { margin-top: 4px; }
.link { display: inline-block; margin-top: 14px; color: var(--accent); font-weight: 600; font-size: 14px; text-decoration: none; }
a.link:hover, .post:hover .link { text-decoration: underline; text-underline-offset: 3px; }
.post { max-width: 640px; transition: border-color .15s; }
.post:hover { border-color: var(--muted); }

.certs { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.certs li {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 12px; font-weight: 500;
}
.certs li::before {
  content: ""; flex: none; width: 8px; height: 8px; border-radius: 2px; background: var(--accent);
}

/* Contact */
.contact { text-align: center; }
.contact h2 { margin-bottom: 16px; }
.contact .lead { margin: 0 auto; color: var(--muted); font-size: 17px; }
.email {
  display: inline-block; margin-top: 20px;
  font-size: clamp(20px, 3vw, 28px); font-weight: 600; color: var(--navy);
  text-decoration: none; border-bottom: 2px solid var(--accent); padding-bottom: 2px;
  word-break: break-all;
}
.socials { list-style: none; display: flex; justify-content: center; gap: 12px; padding: 0; margin: 28px 0 0; }
.socials a {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  transition: color .15s, border-color .15s;
}
.socials a:hover { color: var(--accent); border-color: var(--accent); }
.socials .i { width: 20px; height: 20px; }

.footer { border-top: 1px solid var(--line); padding: 28px 0; color: var(--muted); font-size: 13px; text-align: center; }

a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Responsive */
@media (max-width: 820px) {
  .nav { display: none; }
  .lang { margin-left: auto; }
  .hero { grid-template-columns: 1fr; gap: 32px; padding-top: 40px; padding-bottom: 48px; }
  .hero-photo { order: -1; justify-self: start; max-width: 168px; }
  .grid-2 { grid-template-columns: 1fr; gap: 56px; }
  .timeline li { grid-template-columns: 1fr; gap: 4px; }
  .timeline .when { padding-left: 28px; order: 2; }
  .timeline .what { order: 1; }
  .timeline li:not(:last-child) .what::after { bottom: -60px; }
}
@media (max-width: 480px) {
  .wrap { padding: 0 16px; }
  .section { padding-top: 44px; padding-bottom: 44px; }
  .lead { font-size: 17px; }
  .actions .btn { flex: 1 1 auto; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
