/* ============ Base tokens ============ */
:root{
  --azure:#0B5FFF;
  --azure-deep:#06316B;
  --cyan:#2DD4E0;
  --anthracite:#14171C;
  --anthracite-2:#1B1F26;
  --slate2:#5B6472;

  /* Design System tokens (2026 consolidation) — see DESIGN_SYSTEM.md.
     Replaces ~12 hand-picked border-radius values and ~6 box-shadow
     values that had drifted across components over time. */
  --radius-sm: .5rem;
  --radius-md: .75rem;
  --radius-lg: 1rem;
  --shadow-sm: 0 1px 2px rgba(16,19,26,.05);
  --shadow-md: 0 12px 26px -10px rgba(11,95,255,.35);
  --shadow-lg: 0 20px 44px -16px rgba(11,95,255,.45);
  --ease: cubic-bezier(.4,0,.2,1);
  --duration: .2s;
}

*{ -webkit-tap-highlight-color: transparent; }
html{ scroll-behavior:smooth; }
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior:auto; }
  *,*::before,*::after{ animation-duration:0.001ms !important; animation-iteration-count:1 !important; transition-duration:0.001ms !important; scroll-behavior:auto !important; }
}

::selection{ background:var(--cyan); color:#04181c; }

.skip-link{
  position:absolute; left:-999px; top:auto;
  background:var(--azure); color:#fff; padding:.75rem 1.25rem; border-radius:.5rem; z-index:100;
}
.skip-link:focus{ left:1rem; top:1rem; }

:focus-visible{ outline:2px solid var(--cyan); outline-offset:3px; border-radius:4px; }

/* ============ Section rhythm ============ */
.section{ padding-top:3.5rem; padding-bottom:3.5rem; }
@media(min-width:640px){ .section{ padding-top:6rem; padding-bottom:6rem; } }
.section-label{
  font-family:"JetBrains Mono", monospace;
  font-size:.75rem; letter-spacing:.06em; text-transform:uppercase;
  color:var(--azure); font-weight:600; margin-bottom:1rem;
}
.dark .section-label{ color:var(--cyan); }

/* ============ Nav ============ */
.nav-link{ position:relative; white-space:nowrap; transition:color .2s; text-transform:uppercase; letter-spacing:.04em; }
.nav-link:hover{ color:var(--azure); }
.dark .nav-link:hover{ color:var(--cyan); }
.nav-link[aria-current="page"]{ color:var(--azure); font-weight:700; }
.dark .nav-link[aria-current="page"]{ color:var(--cyan); }
.mobile-link{ display:block; padding:.65rem 0; border-bottom:1px solid rgba(0,0,0,.06); text-transform:uppercase; letter-spacing:.04em; }
.dark .mobile-link{ border-bottom-color:rgba(255,255,255,.08); }
.mobile-link[aria-current="page"]{ color:var(--azure); font-weight:700; }
.dark .mobile-link[aria-current="page"]{ color:var(--cyan); }
.hex-mark{ color:var(--azure); }
.dark .hex-mark{ color:var(--cyan); }

/* ============ Buttons ============ */
/* ============ Button system ============
   Primary / Secondary / Outline / Ghost / Icon — each with hover, focus-visible
   and disabled states defined once. Radius/shadow/timing now come from the
   Design System tokens above instead of one-off values per button. */
.btn-primary, .btn-secondary, .btn-outline, .btn-ghost, .btn-icon{
  display:inline-flex; align-items:center; justify-content:center; gap:.55rem;
  font-weight:600; font-size:.875rem; border-radius:var(--radius-md);
  transition:transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease), background var(--duration) var(--ease), border-color var(--duration) var(--ease), opacity var(--duration) var(--ease);
}
.btn-primary:focus-visible, .btn-secondary:focus-visible, .btn-outline:focus-visible, .btn-ghost:focus-visible, .btn-icon:focus-visible{
  outline:2px solid var(--cyan); outline-offset:2px;
}
.btn-primary:disabled, .btn-secondary:disabled, .btn-outline:disabled, .btn-ghost:disabled, .btn-icon:disabled{
  opacity:.5; cursor:not-allowed; transform:none !important; box-shadow:none !important;
}

/* Primary — filled, main call to action (e.g. "Télécharger mon CV") */
.btn-primary{
  background:var(--azure); color:#fff; padding:.7rem 1.3rem;
  box-shadow:var(--shadow-sm);
}
.btn-primary:hover{ transform:translateY(-2px); background:#0a53e0; box-shadow:var(--shadow-md); }
.btn-primary.is-generating{ opacity:.75; cursor:wait; pointer-events:none; }
.btn-primary.is-generating:hover{ transform:none; }

/* Secondary — filled, lower emphasis than Primary (e.g. a supporting action next to the main CTA) */
.btn-secondary{
  background:var(--anthracite-2); color:#fff; padding:.7rem 1.3rem;
}
.dark .btn-secondary{ background:rgba(255,255,255,.1); }
.btn-secondary:hover{ transform:translateY(-2px); box-shadow:var(--shadow-sm); }

/* Outline — bordered, no fill (e.g. a form action next to a filled primary) */
.btn-outline{
  border:1.5px solid var(--azure); color:var(--azure); background:transparent; padding:.68rem 1.3rem;
}
.dark .btn-outline{ border-color:var(--cyan); color:var(--cyan); }
.btn-outline:hover{ background:rgba(11,95,255,.08); transform:translateY(-2px); }
.dark .btn-outline:hover{ background:rgba(45,212,224,.1); }

/* Ghost — bordered, neutral (e.g. "Discutons de votre besoin") */
.btn-ghost{
  border:1px solid rgba(0,0,0,.15); padding:.68rem 1.3rem;
}
.dark .btn-ghost{ border-color:rgba(255,255,255,.2); }
.btn-ghost:hover{ border-color:var(--azure); transform:translateY(-2px); }
.dark .btn-ghost:hover{ border-color:var(--cyan); }

/* Icon — square, icon-only (theme toggle, menu toggle, back-to-top...) */
.btn-icon{
  width:2.5rem; height:2.5rem; border-radius:999px;
  border:1px solid rgba(0,0,0,.1); background:transparent; color:inherit;
}
.dark .btn-icon{ border-color:rgba(255,255,255,.15); }
.btn-icon:hover{ border-color:var(--azure); transform:translateY(-1px); }
.dark .btn-icon:hover{ border-color:var(--cyan); }

.btn-lg{ padding:.9rem 1.6rem; font-size:.95rem; }

.social-link{
  display:inline-flex; align-items:center; gap:.45rem;
  font-family:"JetBrains Mono", monospace; font-size:.78rem;
  color:var(--slate2); border:1px solid rgba(0,0,0,.12);
  padding:.5rem .9rem; border-radius:var(--radius-sm); transition:all .2s;
}
.dark .social-link{ color:rgba(255,255,255,.65); border-color:rgba(255,255,255,.15); }
.social-link:hover{ border-color:var(--azure); color:var(--azure); }
.dark .social-link:hover{ border-color:var(--cyan); color:var(--cyan); }
.social-link svg{ width:.95rem; height:.95rem; }
.social-link{ background:none; cursor:pointer; font-family:"Inter", sans-serif; }

/* Language toggle */
.lang-toggle{
  display:inline-flex; align-items:center; gap:.3rem;
  font-family:"JetBrains Mono", monospace; font-size:.75rem; font-weight:600;
  padding:.5rem .7rem; border-radius:999px; border:1px solid rgba(0,0,0,.1);
  color:var(--slate2); transition:border-color .2s;
}
.dark .lang-toggle{ border-color:rgba(255,255,255,.15); }
.lang-toggle:hover{ border-color:var(--azure); }
.lang-toggle [data-lang-option]{ opacity:.4; transition:opacity .2s, color .2s; }
.lang-toggle [data-lang-option].active{ opacity:1; color:var(--azure); }
.dark .lang-toggle [data-lang-option].active{ color:var(--cyan); }
.lang-toggle .lang-sep{ opacity:.3; }

/* QR block (contact section) */
.qr-block{
  display:flex; align-items:center; gap:.9rem;
  padding:.7rem 1rem; border-radius:.85rem; border:1px solid rgba(0,0,0,.08);
  background:#fff;
}
.dark .qr-block{ background:var(--anthracite-2); border-color:rgba(255,255,255,.08); }
.qr-block img{ width:56px; height:56px; border-radius:.4rem; background:#fff; padding:.25rem; flex-shrink:0; }
.qr-block p{ font-size:.75rem; color:var(--slate2); max-width:11rem; line-height:1.4; }
.dark .qr-block p{ color:rgba(255,255,255,.55); }

.footer-link{ color:var(--slate2); font-weight:500; transition:color .2s; }
.dark .footer-link{ color:rgba(255,255,255,.55); }
.footer-link:hover{ color:var(--azure); }
.dark .footer-link:hover{ color:var(--cyan); }

/* ============ About section — reserve space before JS fills it in ============
   #about-heading/#about-cards start empty in the static HTML (content comes
   from cv.json via app.js). Left unconstrained on desktop, the section grows
   from ~0 to its real height once populated, pushing everything below it
   down — confirmed as the #1 desktop CLS cause via Lighthouse's culprit
   report. Scoped to the 1024px+ breakpoint ONLY: below that the two-column
   grid isn't active, and mobile CLS was already excellent before any
   reservation existed here — a first attempt at reserving space on mobile
   too made things worse, don't repeat that mistake.
   NOTE: this estimate changed with the card redesign — three bordered cards
   with icon/padding chrome are taller than the old flowing paragraph text.
   Re-verify with a real PageSpeed retest, don't assume this number is
   exactly right on the first try. */
#about-heading{ margin-top: .75rem; }
@media (min-width: 1024px){
  #about-heading{ min-height: 8rem; }
  #about-cards{ min-height: 44rem; }
}

/* ============ About cards — progression timeline ============
   Now shares .timeline/.timeline-item/.timeline-dot with the Experience
   section instead of a lookalike copy — one system, not two that drift
   apart over time (this is exactly what happened before this cleanup:
   About's dots had silently gone all-cyan instead of matching Experience's
   azure-by-default / cyan-only-for-"current" convention). Only the card's
   inner content styling (icon, body, steps) stays specific to About, since
   Experience's cards are interactive toggle buttons with different content
   needs. */
.about-card-inner{
  display:flex; gap:1.1rem; align-items:flex-start;
  background:#fff; border:1px solid rgba(0,0,0,.06); border-radius:var(--radius-lg); padding:1.5rem;
  transition:transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease), border-color var(--duration) var(--ease);
}
.dark .about-card-inner{ background:var(--anthracite-2); border-color:rgba(255,255,255,.07); }
.about-card-inner:hover{ transform:translateY(-3px); box-shadow:var(--shadow-md); border-color:rgba(11,95,255,.25); }
.about-card-icon{
  flex-shrink:0; width:2.75rem; height:2.75rem; border-radius:var(--radius-md);
  display:flex; align-items:center; justify-content:center; background:rgba(11,95,255,.08); color:var(--azure);
}
.dark .about-card-icon{ background:rgba(45,212,224,.1); color:var(--cyan); }
.about-card-icon svg{ width:1.3rem; height:1.3rem; }
.about-card-body h3{ font-family:"Space Grotesk", sans-serif; font-weight:600; font-size:1.05rem; margin-bottom:.6rem; }
.about-card-body p{ font-size:.92rem; line-height:1.6; color:var(--slate2); }
.dark .about-card-body p{ color:rgba(255,255,255,.65); }
.about-card-intro{ font-size:.92rem; line-height:1.6; color:var(--slate2); margin-bottom:.7rem; }
.dark .about-card-intro{ color:rgba(255,255,255,.65); }
.about-card-items{ display:flex; flex-wrap:wrap; gap:.4rem; margin-top:.8rem; }
.about-card-steps{ display:flex; flex-wrap:wrap; gap:.5rem 1.1rem; margin-bottom:.9rem; }
.about-card-step{ display:inline-flex; align-items:center; gap:.4rem; font-size:.85rem; font-weight:600; color:var(--azure-deep); }
.dark .about-card-step{ color:var(--cyan); }
.about-card-step-icon{ width:.85rem; height:.85rem; flex-shrink:0; }

/* Scroll-in animation for About specifically: subtle, fast (200-250ms).
   Scoped to #about-cards only — Experience's timeline-items also use
   .reveal but keep the site's default .55s timing, which the user
   explicitly likes; this must not change it. */
#about-cards .timeline-item.reveal{ opacity:0; transform:translateY(10px); transition:opacity .22s ease-out, transform .22s ease-out; }
#about-cards .timeline-item.reveal.is-visible{ opacity:1; transform:translateY(0); }
@media (prefers-reduced-motion: reduce){
  #about-cards .timeline-item.reveal{ transition:none; }
}

/* ============ Hero ============ */
.eyebrow{
  display:inline-flex; align-items:center; gap:.5rem;
  font-family:"JetBrains Mono", monospace; font-size:.75rem;
  color:var(--slate2); letter-spacing:.02em;
}
.dark .eyebrow{ color:rgba(255,255,255,.6); }
.status-dot{
  width:8px; height:8px; border-radius:50%; background:var(--cyan);
  box-shadow:0 0 0 0 rgba(45,212,224,.6);
  animation:pulseDot 2s infinite;
}
@keyframes pulseDot{
  0%{ box-shadow:0 0 0 0 rgba(45,212,224,.55); }
  70%{ box-shadow:0 0 0 8px rgba(45,212,224,0); }
  100%{ box-shadow:0 0 0 0 rgba(45,212,224,0); }
}

.terminal{
  max-width:560px; border-radius:.85rem; overflow:hidden;
  background:#0E1116; border:1px solid rgba(255,255,255,.08);
  box-shadow:0 20px 50px -20px rgba(6,49,107,.35);
}
.terminal-bar{ display:flex; gap:.4rem; padding:.65rem .85rem; background:#161A21; }
.terminal-bar span{ width:9px; height:9px; border-radius:50%; background:#3A4048; }
.terminal-bar span:nth-child(1){ background:#FF5F57; }
.terminal-bar span:nth-child(2){ background:#FEBC2E; }
.terminal-bar span:nth-child(3){ background:#28C840; }
.terminal-body{ padding:1.1rem 1.2rem 1.3rem; color:#E7ECF3; min-height:5.4rem; }
.caret{ display:inline-block; color:var(--cyan); animation:blink 1s step-end infinite; }
@keyframes blink{ 50%{ opacity:0; } }

.circuit-bg{
  position:absolute; inset:0; z-index:-1; pointer-events:none;
  background-image:
    radial-gradient(circle at 15% 20%, rgba(11,95,255,.10), transparent 40%),
    radial-gradient(circle at 85% 15%, rgba(45,212,224,.12), transparent 40%),
    linear-gradient(rgba(11,95,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11,95,255,.05) 1px, transparent 1px);
  background-size:auto, auto, 42px 42px, 42px 42px;
}
.dark .circuit-bg{
  background-image:
    radial-gradient(circle at 15% 20%, rgba(11,95,255,.18), transparent 40%),
    radial-gradient(circle at 85% 15%, rgba(45,212,224,.16), transparent 40%),
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
}
.circuit-bg--footer{ opacity:.7; }

/* Data-flow trace — subtle circuit trace with a traveling "packet", added
   alongside circuit-bg (static grid) and the existing portrait-ring/
   ping-node pulses. Positioned along the section edges via viewBox
   coordinates so it never crosses the text or photo. */
.data-flow{ position:absolute; inset:0; width:100%; height:100%; z-index:-1; pointer-events:none; }
.data-flow path{ stroke:var(--azure); stroke-width:1; fill:none; opacity:.25; }
.dark .data-flow path{ stroke:var(--cyan); opacity:.32; }
.data-flow .packet{ fill:var(--cyan); }
.data-flow .node-field line{ stroke:var(--azure); stroke-width:.75; opacity:.28; }
.dark .data-flow .node-field line{ stroke:var(--cyan); opacity:.35; }
.data-flow .node{ fill:var(--cyan); animation:fadeNode 3s ease-in-out infinite; }
@keyframes fadeNode{ 0%,100%{ opacity:.15; } 50%{ opacity:.7; } }
@media (prefers-reduced-motion: reduce){
  .data-flow .packet{ display:none; }
  .data-flow .node{ animation:none; opacity:.4; }
}

/* Radar — large, subtle rotating sweep spanning the whole Hero section
   (not just the photo) — an ambient layer alongside circuit-bg and
   data-flow, centered on the section itself. overflow-hidden on the
   section clips it into a soft arc rather than a full visible circle,
   which is the intended look here. */
.radar-behind{
  position:absolute; top:50%; left:50%; width:480px; height:480px; margin:-240px;
  z-index:-1; pointer-events:none;
}
@media(min-width:640px){ .radar-behind{ width:820px; height:820px; margin:-410px; } }
@media(min-width:1024px){ .radar-behind{ width:1000px; height:1000px; margin:-500px; } }
.radar-behind .radar-ring{ position:absolute; inset:0; border:1px solid rgba(11,95,255,.22); border-radius:50%; }
.radar-behind .radar-ring:nth-child(2){ inset:16%; }
.radar-behind .radar-ring:nth-child(3){ inset:32%; }
.dark .radar-behind .radar-ring{ border-color:rgba(45,212,224,.28); }
.radar-behind .radar-sweep{
  position:absolute; inset:0; border-radius:50%;
  background:conic-gradient(from 0deg, rgba(11,95,255,.35), transparent 70deg);
  animation:radarSweep 9s linear infinite;
}
.dark .radar-behind .radar-sweep{
  background:conic-gradient(from 0deg, rgba(45,212,224,.4), transparent 70deg);
}
@keyframes radarSweep{ to{ transform:rotate(360deg); } }
@media (prefers-reduced-motion: reduce){
  .radar-behind .radar-sweep{ animation:none; }
}


.status-strip{
  display:grid; grid-template-columns:repeat(2,1fr); gap:1.5rem 2rem;
  max-width:460px;
}
@media(min-width:640px){
  .status-strip{
    grid-template-columns:repeat(4,1fr); grid-template-rows:repeat(2,auto);
    grid-auto-flow:column; max-width:none;
  }
  /* The wrapper <div> around each dt/dd pair is only needed to group them
     into 2x2 blocks on mobile. From here up, it's unwrapped so dt/dd become
     direct grid children — that's what lets every dt share row 1 and every
     dd share row 2, so a 2-line label never pushes just its own number down
     while the others stay put (the original bug, reported via screenshot). */
  .status-strip > div{ display:contents; }
}
.status-strip dt{
  font-family:"JetBrains Mono", monospace; font-size:.68rem; text-transform:uppercase; letter-spacing:.05em;
  color:var(--slate2); margin-bottom:.3rem;
}
@media(min-width:640px){
  .status-strip dt{ align-self:end; }
}
.dark .status-strip dt{ color:rgba(255,255,255,.45); }
.status-strip dd{ font-family:"Space Grotesk", sans-serif; font-weight:600; font-size:1.35rem; }

/* Portrait */
.portrait-frame{ position:relative; width:260px; height:260px; margin:0 auto; }
@media(min-width:640px){ .portrait-frame{ width:320px; height:320px; } }
.portrait-ring{ position:absolute; inset:-14px; width:calc(100% + 28px); height:calc(100% + 28px); animation:spinSlow 26s linear infinite; }
@keyframes spinSlow{ to{ transform:rotate(360deg); } }
.portrait-img{
  position:absolute; inset:0; width:100%; height:100%; object-fit:cover;
  clip-path:polygon(50% 3%, 92% 25%, 92% 73%, 50% 97%, 8% 73%, 8% 25%);
  border:2px solid transparent;
}
.ping-node{ position:absolute; width:9px; height:9px; border-radius:50%; background:var(--cyan); box-shadow:0 0 0 0 rgba(45,212,224,.6); }
.ping-node--1{ top:6%; right:8%; animation:pulseDot 2.4s infinite; }
.ping-node--2{ bottom:10%; left:2%; animation:pulseDot 2.4s infinite .6s; }
.ping-node--3{ bottom:30%; right:-2%; animation:pulseDot 2.4s infinite 1.2s; }
.uptime-badge{
  display:flex; align-items:center; gap:.5rem; justify-content:center;
  margin:1.4rem auto 0; width:max-content;
  font-size:.72rem; padding:.5rem .9rem; border-radius:999px;
  border:1px solid rgba(0,0,0,.1); background:rgba(255,255,255,.6);
}
.dark .uptime-badge{ border-color:rgba(255,255,255,.15); background:rgba(255,255,255,.04); }

/* ============ Skill cards ============ */
.skill-card{
  background:#fff; border:1px solid rgba(0,0,0,.06); border-radius:1rem; padding:1.6rem;
  transition:transform .22s cubic-bezier(.4,0,.2,1), box-shadow .22s cubic-bezier(.4,0,.2,1), border-color .22s cubic-bezier(.4,0,.2,1);
}
.skill-card.is-hidden{ display:none; }
#skills-grid{ transition:opacity .12s ease; }
#skills-grid.is-filtering{ opacity:.4; }
.dark .skill-card{ background:var(--anthracite-2); border-color:rgba(255,255,255,.06); }
.skill-card:hover{ transform:translateY(-4px); box-shadow:0 18px 34px -18px rgba(11,95,255,.35); border-color:rgba(11,95,255,.35); }
.skill-icon{ width:2.6rem; height:2.6rem; display:grid; place-items:center; border-radius:.65rem; background:var(--azure); color:#fff; margin-bottom:1.1rem; }
.skill-icon svg{ width:1.3rem; height:1.3rem; }
.skill-card h3{ font-family:"Space Grotesk", sans-serif; font-weight:600; font-size:1.05rem; margin-bottom:.9rem; }
.skill-card ul{ display:flex; flex-direction:column; gap:.65rem; }
.skill-card li{ font-size:.83rem; color:var(--slate2); line-height:1.5; }
.dark .skill-card li{ color:rgba(255,255,255,.6); }

/* ============ Timeline ============ */
.timeline{ position:relative; padding-left:2.1rem; }
.timeline::before{ content:''; position:absolute; left:6px; top:6px; bottom:6px; width:2px; background:linear-gradient(var(--azure), var(--cyan)); opacity:.35; }
.timeline-item{ position:relative; padding-bottom:2.2rem; }
.timeline-item:last-child{ padding-bottom:0; }
.timeline-dot{ position:absolute; left:-2.1rem; top:.35rem; width:14px; height:14px; border-radius:50%; background:var(--azure); border:3px solid var(--paper, #F6F8FB); box-shadow:0 0 0 2px var(--azure); }
.dark .timeline-dot{ border-color:var(--anthracite); }
.timeline-dot--current{ background:var(--cyan); box-shadow:0 0 0 2px var(--cyan); animation:pulseDot 2s infinite; }
.timeline-item--current .timeline-toggle{ border-color:rgba(45,212,224,.45); background:linear-gradient(135deg, rgba(11,95,255,.05), rgba(45,212,224,.06)); }
.timeline-date{ display:flex; align-items:center; flex-wrap:wrap; gap:.55rem; }
.current-badge{
  display:inline-flex; align-items:center; gap:.35rem;
  font-family:"JetBrains Mono", monospace; font-size:.65rem; text-transform:uppercase; letter-spacing:.04em;
  color:var(--azure-deep); background:rgba(11,95,255,.08); border:1px solid rgba(11,95,255,.3);
  padding:.15rem .55rem; border-radius:999px;
}
.dark .current-badge{ color:var(--cyan); background:rgba(45,212,224,.1); border-color:rgba(45,212,224,.35); }
.current-badge .status-dot{ width:6px; height:6px; }
.timeline-toggle{
  width:100%; display:flex; align-items:flex-start; justify-content:space-between; gap:1rem;
  text-align:left; padding:1.25rem 1.4rem; border-radius:var(--radius-lg);
  background:#fff; border:1px solid rgba(0,0,0,.06);
  transition:border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease), transform var(--duration) var(--ease);
}
.dark .timeline-toggle{ background:var(--anthracite-2); border-color:rgba(255,255,255,.06); }
.timeline-toggle:hover{ border-color:rgba(11,95,255,.35); transform:translateY(-3px); box-shadow:var(--shadow-md); }
.timeline-date{ font-size:.72rem; color:var(--azure); margin-bottom:.35rem; letter-spacing:.02em; }
.dark .timeline-date{ color:var(--cyan); }
.timeline-content h3{ font-family:"Space Grotesk", sans-serif; font-weight:600; font-size:1.05rem; margin-bottom:.2rem; }
.timeline-org{ font-size:.85rem; color:var(--slate2); }
.dark .timeline-org{ color:rgba(255,255,255,.55); }
.chevron{ width:1.1rem; height:1.1rem; flex-shrink:0; margin-top:.3rem; transition:transform .25s; color:var(--slate2); }
.timeline-toggle[aria-expanded="true"] .chevron{ transform:rotate(180deg); color:var(--azure); }
.timeline-body{ max-height:0; overflow:hidden; transition:max-height .3s ease; }
.timeline-body ul{ padding:1rem 1.4rem 1.4rem; margin-top:-.3rem; border:1px solid rgba(0,0,0,.06); border-top:none; border-radius:0 0 .85rem .85rem; background:rgba(11,95,255,.03); font-size:.9rem; color:var(--slate2); }
.dark .timeline-body ul{ background:rgba(45,212,224,.04); border-color:rgba(255,255,255,.06); color:rgba(255,255,255,.65); }
.timeline-body li{ position:relative; padding-left:1.1rem; margin-bottom:.4rem; }
.timeline-body li::before{ content:'—'; position:absolute; left:0; color:var(--azure); }
.dark .timeline-body li::before{ color:var(--cyan); }

/* ============ Case-card base (shared by .cert-card and .realisations-card,
   the latter defined in realisations.css which loads after this file — see
   Phase 2 refactor notes). Only properties that were byte-identical between
   the two are pulled up here; anything that differed (border-radius,
   padding, h3 font-size...) stays local to each file, unchanged. ============ */
.cert-card, .realisations-card{
  background:#fff; border:1px solid rgba(0,0,0,.06);
}
.dark .cert-card, .dark .realisations-card{ background:var(--anthracite); border-color:rgba(255,255,255,.07); }
.cert-card:hover, .realisations-card:hover{ transform:translateY(-3px); box-shadow:0 16px 28px -18px rgba(11,95,255,.4); border-color:rgba(11,95,255,.3); }
.cert-card h3, .realisations-card h3{ font-family:"Space Grotesk", sans-serif; font-weight:600; line-height:1.35; margin-bottom:.4rem; }

/* ============ Cert cards ============ */
.cert-card{
  border-radius:.85rem; padding:1.3rem 1.4rem;
  transition:transform .2s cubic-bezier(.4,0,.2,1), box-shadow .2s cubic-bezier(.4,0,.2,1), border-color .2s cubic-bezier(.4,0,.2,1);
}
.cert-card h3{ font-size:.95rem; }
.cert-date{ font-size:.7rem; color:var(--azure); margin-bottom:.5rem; letter-spacing:.03em; font-weight:600; }
.dark .cert-date{ color:var(--cyan); font-weight:500; }
.cert-org{ font-size:.8rem; color:var(--slate2); }
.dark .cert-org{ color:rgba(255,255,255,.55); }

/* Cert card accordion (expand to show acquired skills) */
.cert-card{ cursor:pointer; }
.cert-card:focus-visible{ outline:2px solid var(--cyan); outline-offset:3px; }
.cert-card[aria-expanded="true"]{ border-color:rgba(11,95,255,.3); }
.dark .cert-card[aria-expanded="true"]{ border-color:rgba(45,212,224,.3); }
.cert-toggle-row{
  display:flex; align-items:center; gap:.35rem; margin-top:.9rem;
  font-family:"JetBrains Mono", monospace; font-size:.7rem; font-weight:600; color:var(--azure);
}
.dark .cert-toggle-row{ color:var(--cyan); }
.cert-chevron{ width:13px; height:13px; flex-shrink:0; transition:transform .3s cubic-bezier(.4,0,.2,1); }
.cert-card[aria-expanded="true"] .cert-chevron{ transform:rotate(180deg); }
.cert-panel{ max-height:0; overflow:hidden; opacity:0; transition:max-height .4s cubic-bezier(.4,0,.2,1), opacity .3s ease; }
.cert-panel.is-open{ opacity:1; }
.cert-panel-inner{ margin-top:1.05rem; padding-top:1rem; border-top:1px solid rgba(0,0,0,.06); }
.dark .cert-panel-inner{ border-top-color:rgba(255,255,255,.07); }
.cert-summary{ font-size:.82rem; line-height:1.55; color:var(--slate2); margin-bottom:.9rem; }
.dark .cert-summary{ color:rgba(255,255,255,.6); }
.cert-program-link{
  display:inline-flex; align-items:center; gap:.35rem; margin-top:.95rem;
  font-size:.75rem; font-weight:600; color:var(--azure);
}
.cert-program-link svg{ width:13px; height:13px; }
.dark .cert-program-link{ color:var(--cyan); }
.cert-program-link:hover{ text-decoration:underline; }
@media (prefers-reduced-motion: reduce){
  .cert-chevron, .cert-panel{ transition:none; }
}

.tab-panel:not(.hidden){ animation: fadeInPanel .35s cubic-bezier(.16,1,.3,1); }
@keyframes fadeInPanel{ from{ opacity:0; transform:translateY(6px); } to{ opacity:1; transform:translateY(0); } }

/* ============ Tabs / formations ============ */
.filter-label{
  font-family:"JetBrains Mono", monospace; font-size:.72rem; text-transform:uppercase; letter-spacing:.05em;
  color:var(--slate2); margin-bottom:.6rem;
}
.dark .filter-label{ color:rgba(255,255,255,.4); }
.tabs{ display:flex; flex-wrap:wrap; gap:.6rem; margin-bottom:2rem; }
.tab-btn{
  font-family:"JetBrains Mono", monospace; font-size:.78rem; padding:.55rem 1.05rem;
  border-radius:999px; border:1px solid rgba(0,0,0,.12); color:var(--slate2); transition:all .2s;
}
.dark .tab-btn{ border-color:rgba(255,255,255,.15); color:rgba(255,255,255,.6); }
.tab-btn.active, .tab-btn:hover{ background:var(--azure); color:#fff; border-color:var(--azure); }
.formation-list{ display:grid; sm:grid-cols-2; gap:.85rem; }
@media(min-width:640px){ .formation-list{ grid-template-columns:1fr 1fr; column-gap:2rem; } }
.formation-list li{ position:relative; padding-left:1.2rem; font-size:.92rem; color:var(--slate2); line-height:1.5; }
.dark .formation-list li{ color:rgba(255,255,255,.65); }
.formation-list li::before{ content:''; position:absolute; left:0; top:.55rem; width:6px; height:6px; border-radius:50%; background:var(--cyan); }

/* ============ Languages & badges ============ */
.lang-row{ display:flex; align-items:center; justify-content:space-between; gap:1rem; font-family:"Space Grotesk",sans-serif; font-weight:500; }
.stars{ display:inline-flex; gap:.3rem; }
.stars i{ width:9px; height:9px; border-radius:50%; background:rgba(0,0,0,.12); }
.dark .stars i{ background:rgba(255,255,255,.15); }
.stars i.on{ background:linear-gradient(135deg, var(--azure), var(--cyan)); }
.badge{
  font-family:"JetBrains Mono", monospace; font-size:.75rem;
  padding:.5rem .95rem; border-radius:999px; border:1px solid rgba(11,95,255,.25);
  background:rgba(11,95,255,.06); color:var(--azure-deep);
}
.dark .badge{ color:var(--cyan); border-color:rgba(45,212,224,.3); background:rgba(45,212,224,.07); }
.badge--sm{
  font-weight:500; font-size:.7rem; padding:.35rem .7rem; border-radius:var(--radius-sm);
  background:rgba(11,95,255,.07); border-color:rgba(11,95,255,.18);
}
.dark .badge--sm{ background:rgba(45,212,224,.08); border-color:rgba(45,212,224,.18); }
.badge--outline{ background:transparent; border-style:dashed; }

/* ============ Shared tag layout wrappers (used by the Réalisations page) ============ */
.project-tag-group{ margin-bottom:.9rem; }
.project-tag-group h4{
  font-family:"JetBrains Mono", monospace; font-size:.66rem; text-transform:uppercase; letter-spacing:.05em;
  color:var(--slate2); margin-bottom:.5rem;
}
.dark .project-tag-group h4{ color:rgba(255,255,255,.45); }
.project-tags{ display:flex; flex-wrap:wrap; gap:.4rem; }
.interest-card{
  padding:1.6rem; border-radius:1rem; border:1px solid rgba(0,0,0,.06);
  transition:transform .2s cubic-bezier(.4,0,.2,1), border-color .2s cubic-bezier(.4,0,.2,1);
}
.dark .interest-card{ border-color:rgba(255,255,255,.07); }
.interest-card:hover{ transform:translateY(-3px); border-color:rgba(11,95,255,.3); }
.interest-card svg{ width:1.6rem; height:1.6rem; color:var(--azure); margin-bottom:.9rem; }
.dark .interest-card svg{ color:var(--cyan); }
.interest-card h3{ font-family:"Space Grotesk", sans-serif; font-weight:600; margin-bottom:.4rem; }
.interest-card p{ font-size:.87rem; color:var(--slate2); line-height:1.5; }
.dark .interest-card p{ color:rgba(255,255,255,.55); }

/* ============ Contact ============ */
.contact-card{
  display:flex; align-items:center; gap:1rem; padding:1.3rem 1.4rem; border-radius:1rem;
  border:1px solid rgba(0,0,0,.08); background:#fff; position:relative; transition:transform .2s cubic-bezier(.4,0,.2,1), border-color .2s cubic-bezier(.4,0,.2,1);
}
.dark .contact-card{ background:var(--anthracite-2); border-color:rgba(255,255,255,.08); }
.contact-card:hover{ transform:translateY(-3px); border-color:var(--azure); }
.contact-card svg{ width:1.4rem; height:1.4rem; color:var(--azure); flex-shrink:0; }
.dark .contact-card svg{ color:var(--cyan); }
.contact-label{ font-size:.72rem; text-transform:uppercase; letter-spacing:.04em; color:var(--slate2); margin-bottom:.15rem; }
.dark .contact-label{ color:rgba(255,255,255,.45); }
.contact-value{ font-weight:600; font-size:.95rem; word-break:break-word; }
.copy-hint{ position:absolute; right:1.2rem; bottom:.6rem; font-size:.65rem; color:var(--slate2); opacity:0; transition:opacity .2s; }
.contact-card:hover .copy-hint{ opacity:.8; }

/* ============ Reveal on scroll ============ */
.reveal{ opacity:0; transform:translateY(18px); transition:opacity .55s cubic-bezier(.16,1,.3,1), transform .55s cubic-bezier(.16,1,.3,1); }
.reveal.is-visible{ opacity:1; transform:translateY(0); }

/* ============ Print (native browser print, kept clean) ============ */
@media print{
  #site-header, #scroll-progress, #back-to-top, #toast, .circuit-bg, footer { display:none !important; }
  body{ background:#fff !important; color:#000 !important; }
  .section{ padding:1rem 0 !important; }
}
