/* Portfolio — Diego Cortes */

:root {
  --paper: #FAFAF8;
  --ink: #141414;
  --text-2: #2E2E2A;
  --text-3: #45453F;
  --muted: #6B6B66;
  --rule: #DEDED8;
  --rule-soft: #E6E6E1;
  --chip-border: #CFCFC8;
  --code-bg: #F0F0EC;
  --link-hover: #1E3A8A;
  --mono: 'Geist Mono', ui-monospace, Menlo, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Geist, 'Helvetica Neue', Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: #B9B9B3;
}
a:hover { color: var(--link-hover); text-decoration-color: currentColor; }
a.plain { text-decoration: none; }

:focus-visible { outline: 2px solid var(--link-hover); outline-offset: 3px; }

.skip {
  position: absolute; left: -9999px; top: 8px;
  background: var(--ink); color: var(--paper); padding: 8px 12px;
}
.skip:focus { left: 8px; color: var(--paper); }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 32px; }
@media (max-width: 560px) { .wrap { padding: 0 16px; } }

/* En-tête */
.site-header {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  gap: 8px 32px; padding: 22px 0; border-bottom: 1px solid var(--ink);
}
.site-header .name { text-decoration: none; font-weight: 500; }
.header-right { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px; }
.site-nav { display: flex; flex-wrap: wrap; gap: 4px 24px; font-size: 14px; }
.site-nav a { text-decoration: none; padding: 6px 0; }
@media (max-width: 720px) {
  .header-right { display: contents; }
  .site-header .name { order: 1; }
  .lang { order: 2; }
  .site-nav { order: 3; flex-basis: 100%; gap: 0 18px; }
}

.lang { display: flex; border: 1px solid var(--ink); border-radius: 999px; overflow: hidden; }
.lang button {
  min-width: 44px; min-height: 34px; padding: 0 12px;
  font: inherit; font-size: 13px; font-weight: 500;
  border: 0; cursor: pointer; background: transparent; color: var(--ink);
}
.lang button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

/* Sections */
.section {
  display: flex; flex-wrap: wrap; gap: 16px 48px;
  padding: 40px 0 72px; border-top: 1px solid var(--ink);
  scroll-margin-top: 16px;
}
.section-label { flex: 1 1 200px; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.section-label h2 { margin: 0; font-size: 14px; font-weight: 500; }
.section-label a { font-size: 13px; color: var(--muted); }
.section-body { flex: 999 1 600px; min-width: 0; display: flex; flex-direction: column; }

.lead {
  margin: 0; font-size: clamp(1.2rem, 2vw, 1.45rem); line-height: 1.3;
  letter-spacing: -0.02em; max-width: 34ch; text-wrap: pretty;
}

/* Haut de page */
.hero { padding: 64px 0 72px; display: flex; flex-wrap: wrap; gap: 40px 64px; align-items: flex-end; }
.hero-text { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.hero h1 { margin: 0; font-weight: 500; font-size: clamp(1.9rem, 3.6vw, 2.6rem); line-height: 1.05; letter-spacing: -0.03em; }
.hero .role { margin: 6px 0 0; font-size: 15px; color: var(--muted); }
.hero .intro { margin: 0; font-size: clamp(1.1rem, 1.7vw, 1.25rem); font-weight: 300; line-height: 1.4; letter-spacing: -0.01em; max-width: 36ch; text-wrap: pretty; }
.facts { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 20px; font-size: 14px; max-width: 420px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.links { display: flex; flex-wrap: wrap; gap: 0 14px; }
.portrait { margin: 0; flex: 1 1 200px; max-width: 250px; display: flex; flex-direction: column; gap: 10px; }
.portrait img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 30%; background: #E4E4E0; }
.portrait figcaption, .caption { font-size: 13px; color: var(--muted); }

/* À propos */
.about { gap: 36px; }
.about-paras { display: flex; flex-direction: column; gap: 16px; max-width: 640px; font-size: 16px; line-height: 1.65; color: var(--text-2); }
.about-paras p { margin: 0; text-wrap: pretty; }
.points { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr)); gap: 24px 32px; }
.points div { display: flex; flex-direction: column; gap: 4px; padding-top: 12px; border-top: 1px solid var(--rule); }
.points dt { font-weight: 500; }
.points dd { margin: 0; color: #5C5C57; font-size: 14px; }

/* Ce que je cherche */
.seek { gap: 28px; }
.rows { margin: 0; display: flex; flex-direction: column; }
.rows div { display: flex; flex-wrap: wrap; gap: 2px 32px; padding: 12px 0; border-top: 1px solid var(--rule); }
.rows dt { flex: 0 0 160px; color: var(--muted); font-size: 14px; }
.rows dd { margin: 0; flex: 999 1 300px; min-width: 0; }

/* Boutons « Aperçu » */
.toggle {
  flex: 0 0 auto; min-height: 44px; min-width: 112px; padding: 0 18px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font: inherit; font-size: 14px; font-weight: 500;
  color: var(--ink); background: transparent;
  border: 1px solid var(--ink); border-radius: 999px; cursor: pointer;
}
.toggle:hover { background: #EFEFEA; }
.toggle[aria-expanded="true"] { background: var(--ink); color: var(--paper); }
.toggle .sign { font-size: 16px; line-height: 1; }
.toggle.small { min-height: 40px; min-width: 0; padding: 0 16px; font-size: 13px; align-self: flex-start; }

/* Projets */
.projects { gap: 40px; }
.project-list { display: flex; flex-direction: column; border-top: 1px solid var(--ink); }
.project { border-bottom: 1px solid var(--rule); scroll-margin-top: 16px; }
.project-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px; padding: 20px 0; }
.project-year { flex: 0 0 44px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.project-main { flex: 999 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.project-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; }
.project-title h3 { margin: 0; font-size: 17px; font-weight: 500; letter-spacing: -0.01em; }
.project-title span { font-size: 13px; color: var(--muted); }
.project-pitch { margin: 0; font-size: 14px; color: var(--text-3); text-wrap: pretty; }
.techs { margin: 6px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.techs li {
  padding: 2px 9px; border: 1px solid var(--chip-border); border-radius: 4px;
  font-family: var(--mono); font-size: 12px; line-height: 1.6; color: var(--text-2); background: #FFFFFF;
}

.project-panel { display: flex; flex-wrap: wrap; gap: 36px 48px; padding: 8px 0 44px; }
.project-panel[hidden] { display: none; }
.preview { flex: 0 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.preview img { display: block; width: 100%; max-width: 220px; height: auto; border: 1px solid var(--rule); border-radius: 24px; }
.preview pre {
  margin: 0; padding: 16px 18px; background: var(--code-bg); border: 1px solid var(--rule);
  font-family: var(--mono); font-size: 12px; line-height: 1.7; color: var(--text-2);
  white-space: pre; overflow-x: auto;
}
.preview .caption { font-size: 12px; }
.details { flex: 999 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.details h4 { margin: 0 0 6px; font-size: 13px; font-weight: 500; color: var(--muted); }
.details p { margin: 0; font-size: 15px; line-height: 1.65; text-wrap: pretty; }
.details ul { margin: 0; padding: 0 0 0 18px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; line-height: 1.6; }
.team-row { display: flex; flex-wrap: wrap; gap: 2px 20px; padding: 8px 0; border-top: 1px solid var(--rule-soft); font-size: 14px; line-height: 1.55; }
.team-row .who { flex: 0 0 170px; font-weight: 500; }
.team-row .did { flex: 999 1 220px; min-width: 0; color: var(--text-3); }
.panel-foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0 16px; padding-top: 14px; border-top: 1px solid var(--ink); font-size: 14px; }
.panel-foot .muted { color: var(--muted); }

.now { display: flex; flex-wrap: wrap; gap: 12px 40px; }
.now > p { margin: 0; flex: 1 1 160px; font-size: 13px; color: var(--muted); }
.now-grid { flex: 999 1 400px; min-width: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 20px 40px; font-size: 14px; line-height: 1.6; }
.now-grid p { margin: 0; }
.now-grid .n { font-weight: 500; }
.now-grid .t { color: var(--text-3); }

/* Expérience */
.job { display: flex; flex-wrap: wrap; gap: 8px 32px; padding: 32px 0; border-top: 1px solid var(--rule); }
.job:first-child { padding-top: 0; border-top: 0; }
.job-when { flex: 0 0 120px; display: flex; flex-direction: column; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.job-body { flex: 999 1 400px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.job-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px 32px; }
.job-logo { flex: 0 0 auto; width: 140px; height: 64px; display: flex; justify-content: flex-end; align-items: center; }
.job-logo img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; }
@media (max-width: 560px) { .job-logo { width: 96px; height: 48px; } }
.job-body h3 { margin: 0; font-size: 18px; font-weight: 500; letter-spacing: -0.015em; }
.job-body .role { margin: 0; color: var(--muted); }
.job-body ul { margin: 0; padding: 0 0 0 18px; display: flex; flex-direction: column; gap: 5px; color: var(--text-3); max-width: 62ch; }
.job-projects { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.job-projects-list { display: flex; flex-direction: column; }
.job-projects-list[hidden] { display: none; }
.job-project { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; padding: 9px 0; border-top: 1px solid var(--rule-soft); }
.job-project .jp-main { flex: 999 1 280px; min-width: 0; display: flex; flex-direction: column; }
.job-project .jp-name { font-weight: 500; }
.job-project .jp-text { font-size: 14px; color: var(--text-3); }
.job-project .jp-stack { flex: 0 1 auto; font-family: var(--mono); font-size: 12px; color: var(--text-3); }
.job-project .jp-case { flex: 0 0 auto; font-size: 13px; }

/* Compétences */
.skills { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)); gap: 32px; }
.skills h3 { margin: 0 0 10px; padding-bottom: 8px; border-bottom: 1px solid var(--rule); font-size: 13px; font-weight: 500; color: var(--muted); }
.skills ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 3px; }

/* Formation */
.edu { display: flex; flex-wrap: wrap; gap: 4px 32px; padding: 18px 0; border-top: 1px solid var(--rule); }
.edu:first-child { padding-top: 0; border-top: 0; }
.edu .when { flex: 0 0 120px; font-size: 13px; color: var(--muted); }
.edu .what { flex: 999 1 400px; min-width: 0; }
.edu p { margin: 0; }
.edu .name { font-weight: 500; }
.edu .school { color: var(--muted); }

/* Contact */
.contact-body { gap: 20px; }
.contact-body .intro { margin: 0; font-size: clamp(1.1rem, 1.7vw, 1.25rem); font-weight: 300; line-height: 1.4; max-width: 34ch; }
.contact-body .mail {
  font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 500; letter-spacing: -0.025em; line-height: 1.1;
  text-underline-offset: 6px; overflow-wrap: anywhere; align-self: flex-start;
}
.contact-body .links { font-size: 14px; gap: 0 20px; }
.contact.section { padding-bottom: 96px; }

.site-footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
  padding: 22px 0 36px; border-top: 1px solid var(--rule); font-size: 13px; color: var(--muted);
}
.site-footer .links { gap: 0 20px; }

/* ---------------------------------------------------------------------------
   Fil chronologique des projets
   --------------------------------------------------------------------------- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }

.timeline { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; }
.tl-item { display: grid; grid-template-columns: 64px 28px minmax(0, 1fr); column-gap: 16px; scroll-margin-top: 16px; }
.tl-year { padding-top: 20px; font-size: 15px; font-weight: 500; text-align: right; font-variant-numeric: tabular-nums; }
.tl-now .tl-year { padding-top: 24px; font-size: 13px; font-weight: 400; }
.tl-rail { position: relative; display: flex; justify-content: center; }
.tl-line { position: absolute; top: 0; bottom: 0; left: 50%; width: 1px; background: var(--ink); transform: translateX(-50%); }
.tl-now .tl-line { top: 14px; }
.tl-last .tl-line { bottom: calc(100% - 32px); }
.tl-arrow { position: relative; margin-top: 4px; background: var(--paper); color: var(--ink); }
.tl-dot {
  position: relative; margin-top: 26px; width: 11px; height: 11px; box-sizing: border-box;
  border-radius: 50%; border: 1.5px solid var(--ink); background: var(--paper); transition: background .25s ease;
}
.tl-item.is-open .tl-dot { background: var(--ink); }
.tl-body { min-width: 0; padding: 18px 0 34px; display: flex; flex-direction: column; gap: 6px; }
.tl-body .project-pitch { max-width: 60ch; }
.tl-body .techs { margin-top: 4px; }
.tl-now .tl-body { padding: 20px 0 40px; gap: 10px; }
.tl-now-title { margin: 0; font-size: 13px; color: var(--muted); }
.tl-now-items { display: flex; flex-wrap: wrap; gap: 8px 32px; font-size: 14px; line-height: 1.55; }
.tl-now-items p { margin: 0; flex: 1 1 220px; }
.tl-now-items .n { font-weight: 500; }
.tl-now-items .t { color: var(--text-3); }

.tl-toggle {
  align-self: flex-start; min-height: 44px; margin-top: 2px; padding: 0;
  display: inline-flex; align-items: center; gap: 6px;
  font: inherit; font-size: 14px; font-weight: 500; color: var(--ink);
  background: transparent; border: 0; cursor: pointer;
}
.tl-toggle:hover .label { text-decoration: underline; text-underline-offset: 3px; }
.tl-toggle.small { min-height: 40px; font-size: 13px; }
.tl-toggle .chevron { transition: transform .25s ease; }
.tl-toggle[aria-expanded="true"] .chevron { transform: rotate(180deg); }

.tl-body .project-panel { flex-direction: column; flex-wrap: nowrap; gap: 28px; padding: 18px 0 8px; }
.tl-body .project-panel .details { flex: none; }
.tl-body .project-panel .preview { flex: none; max-width: 340px; }
.tl-body .panel-foot { justify-content: flex-start; }

@media (max-width: 560px) {
  .tl-item { grid-template-columns: 58px 20px minmax(0, 1fr); column-gap: 10px; }
  .tl-now .tl-year { font-size: 12px; }
  .tl-year { font-size: 13px; }
}

/* Formation : « En savoir plus » */
.edu .what { display: flex; flex-direction: column; gap: 2px; }
.edu-more { display: flex; flex-direction: column; gap: 12px; padding: 4px 0 6px; max-width: 62ch; }
.edu-more[hidden] { display: none; }
.edu-more p { margin: 0; font-size: 15px; line-height: 1.65; color: var(--text-2); }
.edu-more .edu-jobs { font-size: 14px; color: var(--text-3); }
.subjects { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.subjects li { padding: 2px 9px; border: 1px solid var(--chip-border); border-radius: 4px; font-size: 13px; line-height: 1.6; color: var(--text-2); background: #FFFFFF; }

/* Contact */
.contact-rows div:last-child { border-bottom: 1px solid var(--rule); }

/* ---------------------------------------------------------------------------
   Version compacte : haut de page, À propos, Formation, Expérience
   --------------------------------------------------------------------------- */
.hero .intro { font-size: 16px; font-weight: 400; line-height: 1.55; letter-spacing: 0; max-width: 46ch; }

#apropos, #competences, #formation, #experience { padding-bottom: 48px; }

.about { gap: 18px; }
.about .lead { font-size: 17px; line-height: 1.4; letter-spacing: -0.01em; max-width: 48ch; }
.about-paras { gap: 10px; max-width: 680px; font-size: 14px; line-height: 1.6; }
.points { gap: 14px 28px; }
.points div { gap: 2px; padding-top: 8px; }
.points dt { font-size: 14px; }
.points dd { font-size: 13px; }

.edu { gap: 2px 32px; padding: 10px 0; }
.edu .when { font-size: 12px; }
.edu .what { gap: 0; }
.edu .name { font-size: 14px; }
.edu .school { font-size: 13px; }
.tl-toggle.small { min-height: 32px; font-size: 12.5px; }
.edu-more { gap: 8px; padding: 2px 0 4px; }
.edu-more p { font-size: 14px; line-height: 1.6; }
.subjects li { font-size: 12px; }

.job { gap: 4px 32px; padding: 18px 0; }
.job-when { font-size: 12px; }
.job-body { gap: 8px; }
.job-body h3 { font-size: 16px; }
.job-body .role { font-size: 13px; }
.job-body ul { gap: 2px; font-size: 14px; }
.job-logo { width: 120px; height: 44px; }
.job-projects { margin-top: 2px; }
.toggle.small { min-height: 32px; padding: 0 12px; font-size: 12.5px; }
.job-project { padding: 6px 0; }

/* ---------------------------------------------------------------------------
   Panneau latéral d'un projet (« Aperçu › »)
   --------------------------------------------------------------------------- */
html.drawer-lock, html.drawer-lock body { overflow: hidden; }
.drawer { position: fixed; inset: 0; z-index: 50; }
.drawer[hidden] { display: none; }
.drawer-backdrop {
  position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; cursor: pointer;
  background: rgba(250, 250, 248, 0.45);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  opacity: 0; transition: opacity .45s ease;
}
.drawer-panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(760px, calc(100vw - 56px));
  overflow-y: auto; overscroll-behavior: contain;
  background: var(--paper); border-left: 1px solid var(--ink);
  box-shadow: -24px 0 60px -30px rgba(20, 20, 20, 0.35);
  padding: 0 40px 48px;
  display: flex; flex-direction: column; gap: 28px;
  transform: translateX(100%); transition: transform .45s cubic-bezier(.22, .8, .24, 1);
}
.drawer.is-open .drawer-backdrop { opacity: 1; }
.drawer.is-open .drawer-panel { transform: none; }
@media (prefers-reduced-motion: reduce) { .drawer-backdrop, .drawer-panel { transition: none; } }

.drawer-top {
  position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; align-items: center;
  margin: 0 -40px; padding: 14px 40px; background: var(--paper); border-bottom: 1px solid var(--rule);
}
.drawer-back {
  min-height: 40px; padding: 0 14px 0 10px; display: inline-flex; align-items: center; gap: 6px;
  font: inherit; font-size: 14px; font-weight: 500; color: var(--ink);
  background: transparent; border: 1px solid var(--ink); border-radius: 999px; cursor: pointer;
}
.drawer-back:hover { background: var(--ink); color: var(--paper); }
.drawer-year { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.drawer-head { display: flex; flex-direction: column; gap: 6px; }
.drawer-head h2 { margin: 0; font-size: 26px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.15; }
.drawer-kind { margin: 0; font-size: 13px; color: var(--muted); }
.drawer-panel .details { flex: none; gap: 22px; }
.drawer-panel .details p { font-size: 14.5px; }
.drawer-panel .preview { flex: none; max-width: 340px; }
.drawer-panel .panel-foot { justify-content: flex-start; }
@media (max-width: 560px) {
  .drawer-panel { width: calc(100vw - 40px); padding: 0 20px 40px; }
  .drawer-top { margin: 0 -20px; padding: 12px 20px; }
  .drawer-head h2 { font-size: 22px; }
}

/* ---------------------------------------------------------------------------
   Échelle typographique unique (prime sur les tailles définies plus haut)
   display 36 · grand titre 22 · accroche 18 · titre 16 · texte 15 · secondaire 14 · légende 13 · code 12
   --------------------------------------------------------------------------- */
:root {
  --fs-display: clamp(1.9rem, 3vw, 2.25rem);
  --fs-xl: 22px;
  --fs-lead: 18px;
  --fs-title: 16px;
  --fs-body: 15px;
  --fs-small: 14px;
  --fs-meta: 13px;
  --fs-code: 12px;
}
body { font-size: var(--fs-body); }

/* Espacement identique pour toutes les sections */
.section { padding: 36px 0 52px; }
.contact.section { padding-bottom: 72px; }

/* Display */
.hero h1 { font-size: var(--fs-display); }

/* Grand titre (panneau projet) */
.drawer-head h2 { font-size: var(--fs-xl); }

/* Accroches */
.hero .intro, .lead, .about .lead { font-size: var(--fs-lead); font-weight: 400; line-height: 1.45; letter-spacing: -0.005em; max-width: 50ch; }

/* Titres d'éléments */
.project-title h3, .job-body h3, .edu .name, .tl-now-items .n { font-size: var(--fs-title); font-weight: 500; }

/* Texte courant */
.about-paras, .details p, .drawer-panel .details p, .edu-more p, .rows dd,
.job-body ul, .details ul, .skills ul, .project-pitch, .tl-now-items, .team-row { font-size: var(--fs-body); line-height: 1.6; }

/* Secondaire */
.hero .role, .facts, .site-nav, .job-body .role, .edu .school, .tl-toggle, .tl-toggle.small,
.drawer-back, .jp-text, .panel-foot, .rows dt, .section-label h2, .points dt, .toggle.small,
.job-project .jp-name, .edu-more .edu-jobs { font-size: var(--fs-small); }

/* Légendes et dates */
.tl-year, .tl-now .tl-year, .project-title span, .drawer-kind, .drawer-year, .details h4, .skills h3,
.caption, .preview .caption, .portrait figcaption, .points dd, .job-when, .edu .when, .tl-now-title,
.section-label a, .site-footer { font-size: var(--fs-meta); }

/* Code et étiquettes techniques */
.techs li, .preview pre, .jp-stack, .job-project .jp-stack, .subjects li { font-size: var(--fs-code); }

@media (max-width: 560px) {
  .drawer-head h2 { font-size: 20px; }
}

/* Bouton « Aperçu › » dans les projets d'une expérience */
.job-project .jp-open { flex: 0 0 auto; min-height: 28px; }

/* Formation : enseignements groupés par année */
.edu-group { display: flex; flex-direction: column; gap: 6px; }
.edu-more .edu-group-title { margin: 4px 0 0; font-size: var(--fs-meta); font-weight: 500; color: var(--muted); }

/* ---------------------------------------------------------------------------
   En-tête fixe en haut de l'écran
   --------------------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(250, 250, 248, 0.94);
  -webkit-backdrop-filter: saturate(1.2) blur(8px); backdrop-filter: saturate(1.2) blur(8px);
  /* fond sur toute la largeur de l'écran, pas seulement la colonne centrale */
  box-shadow: 0 0 0 100vmax rgba(250, 250, 248, 0.94);
  clip-path: inset(0 -100vmax);
  padding: 16px 0;
}
/* Les ancres ne passent pas sous l'en-tête */
.section, .tl-item, .hero { scroll-margin-top: 84px; }
@media (max-width: 720px) {
  .section, .tl-item, .hero { scroll-margin-top: 120px; }
}
@media (max-width: 720px) {
  .site-header { padding: 10px 0 0; row-gap: 4px; }
  .site-nav {
    flex-wrap: nowrap; overflow-x: auto; gap: 0 20px; padding-bottom: 6px;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav a { flex: 0 0 auto; padding: 8px 0; }
}
