/* ── Tokens ───────────────────────────────────────────────────────────── */
:root {
  --accent: #7a1f2e;
  --accent-soft: #f6e9eb;
  --bg: #ffffff;
  --bg-alt: #faf7f7;
  --text: #1f2328;
  --muted: #5d636b;
  --line: #e7e1e2;
  --tag-bg: #f3eef0;
  --tag-text: #4a3238;
  --hero-bg: #7a1f2e;
  --hero-text: #ffffff;
  --hero-muted: #f3d6db;
  --radius: 10px;
  --wrap: 1040px;
  color-scheme: light;
}
/* Dark theme: follows the system unless the visitor picked a theme with the toggle. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --accent: #e48a9a;
    --accent-soft: #3a2328;
    --bg: #15171a;
    --bg-alt: #1b1e22;
    --text: #e8e6e3;
    --muted: #a3a8ae;
    --line: #2c3036;
    --tag-bg: #262a30;
    --tag-text: #e2d4d7;
    --hero-bg: #4f1420;
    --hero-text: #ffffff;
    --hero-muted: #f0c9d0;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --accent: #e48a9a;
  --accent-soft: #3a2328;
  --bg: #15171a;
  --bg-alt: #1b1e22;
  --text: #e8e6e3;
  --muted: #a3a8ae;
  --line: #2c3036;
  --tag-bg: #262a30;
  --tag-text: #e2d4d7;
  --hero-bg: #4f1420;
  --hero-text: #ffffff;
  --hero-muted: #f0c9d0;
  color-scheme: dark;
}

/* ── Base ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { line-height: 1.2; margin: 0; }
p { margin: 0; }
a { color: var(--accent); }
b { font-weight: 700; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }

/* Language switch: only the active language is shown. */
html[data-lang="fr"] [data-l="en"],
html[data-lang="en"] [data-l="fr"] { display: none !important; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 100; background: var(--bg); padding: 8px 12px; border-radius: 6px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ── Top bar ──────────────────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; gap: 20px; height: 60px; }
.brand {
  font-weight: 800; letter-spacing: .02em; text-decoration: none;
  color: var(--bg); background: var(--accent); border-radius: 8px;
  width: 36px; height: 36px; display: grid; place-items: center; font-size: 15px;
}
nav { display: flex; gap: 18px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
nav::-webkit-scrollbar { display: none; }
nav a { color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 500; white-space: nowrap; }
nav a:hover { color: var(--text); }
.lang-toggle {
  font: inherit; font-size: 13px; font-weight: 700; letter-spacing: .05em;
  border: 1px solid var(--line); background: transparent; color: var(--text);
  border-radius: 999px; padding: 4px 12px; cursor: pointer; flex: none;
}
.lang-toggle:hover, .theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.theme-toggle {
  border: 1px solid var(--line); background: transparent; color: var(--text);
  border-radius: 999px; width: 34px; height: 30px; padding: 0; cursor: pointer; flex: none;
  display: grid; place-items: center;
}
.theme-toggle svg { width: 16px; height: 16px; }
/* Show the moon in light mode (switch to dark) and the sun in dark mode (switch to light). */
.theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: block; }
:root[data-theme="dark"] .theme-toggle .moon { display: none; }
@media (max-width: 560px) { nav { gap: 12px; } nav a { font-size: 14px; } .topbar-inner { gap: 12px; } }
/* Phones: the page is short enough to scroll, keep only the contact link. */
@media (max-width: 520px) { nav a:not([href="#contact"]) { display: none; } }

/* ── Hero ─────────────────────────────────────────────────────────────── */
.hero { background: var(--hero-bg); color: var(--hero-text); padding: 64px 0 72px; }
.hero-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.6fr 1fr; gap: 48px; } }
.identity { display: flex; align-items: center; gap: 24px; }
.photo {
  width: 132px; height: 132px; flex: none; border-radius: 50%; object-fit: cover;
  border: 3px solid rgba(255,255,255,.85); box-shadow: 0 8px 24px rgba(0,0,0,.25);
  background: #5a1622;
}
@media (min-width: 900px) and (max-width: 1060px) { .photo { width: 108px; height: 108px; } .identity { gap: 18px; } }
@media (max-width: 560px) {
  .identity { flex-direction: column; align-items: flex-start; gap: 18px; }
  .photo { width: 104px; height: 104px; }
}
.eyebrow { color: var(--hero-muted); font-size: 14px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.hero h1 { font-size: clamp(32px, 4vw, 46px); letter-spacing: -.02em; white-space: nowrap; }
@media (max-width: 360px) { .hero h1 { white-space: normal; } }
.identity { margin-top: 16px; }
.role { font-size: clamp(19px, 2.6vw, 23px); font-weight: 600; color: var(--hero-muted); margin-top: 6px; }
.hero .lead { margin-top: 18px; max-width: 60ch; color: rgba(255,255,255,.92); }
.hero-link { color: #fff; font-weight: 600; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; text-decoration-color: rgba(255,255,255,.5); }
.hero-link:hover { text-decoration-color: #fff; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 11px 20px; border-radius: 999px; font-weight: 600; font-size: 15px;
  text-decoration: none; border: 1.5px solid currentColor; color: inherit; transition: transform .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.hero .btn.primary { background: #fff; color: #7a1f2e; border-color: #fff; }
.contact .btn.primary { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.contact .btn { color: var(--accent); }

.stats { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.stats li {
  background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.18);
  border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 6px;
}
.stats strong { font-size: 19px; letter-spacing: -.01em; line-height: 1.25; }
/* Only the description under the figure; the figure itself may hold FR/EN spans too. */
.stats li > span { font-size: 13.5px; line-height: 1.4; color: var(--hero-muted); }
@media (max-width: 420px) { .stats { grid-template-columns: 1fr; } }

/* ── Sections ─────────────────────────────────────────────────────────── */
.section { padding: 64px 0; }
.section.alt { background: var(--bg-alt); border-block: 1px solid var(--line); }
.section h2 {
  font-size: 28px; letter-spacing: -.01em; margin-bottom: 28px;
  display: flex; align-items: center; gap: 12px;
}
.section h2::before { content: ""; width: 26px; height: 4px; border-radius: 2px; background: var(--accent); flex: none; }

.job { padding: 4px 0 28px; }
.job + .job { border-top: 1px solid var(--line); padding-top: 28px; }
.job-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; }
.job h3 { font-size: 20px; }
.org { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.org:hover { text-decoration-color: var(--accent); }
a.org::after { content: "↗"; font-size: .7em; margin-left: 2px; vertical-align: super; text-decoration: none; display: inline-block; }
.meta { color: var(--muted); font-size: 15px; margin-top: 4px; }
.dates { color: var(--muted); font-size: 15px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.points { margin: 14px 0 0; padding-left: 20px; display: grid; gap: 6px; }
.points li::marker { color: var(--accent); }

.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.tags span {
  background: var(--tag-bg); color: var(--tag-text);
  font-size: 13px; font-weight: 500; padding: 3px 10px; border-radius: 999px;
}

.cards { display: grid; gap: 16px; }
@media (min-width: 760px) { .cards { grid-template-columns: repeat(2, 1fr); } }
.card {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; display: flex; flex-direction: column; gap: 10px;
}
.card h3 { font-size: 18px; }
.card p:not(.tags) { color: var(--muted); font-size: 15.5px; }
.card .tags { margin-top: auto; padding-top: 4px; }

.skills { display: grid; gap: 22px; }
@media (min-width: 760px) { .skills { grid-template-columns: repeat(2, 1fr); gap: 26px 40px; } }
.skills h3 { font-size: 15px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.skills .tags { margin-top: 10px; }

.two-col { display: grid; gap: 40px; }
@media (min-width: 760px) { .two-col { grid-template-columns: 1.4fr 1fr; } }
.timeline { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.timeline li { padding-left: 16px; border-left: 3px solid var(--accent-soft); }
.muted { color: var(--muted); }

.contact { text-align: left; }
.contact .lead { max-width: 60ch; }

.footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; padding: 24px 0 32px; }
