/* Modèle I "Aurora" : aurores, cartes en verre dépoli, apparitions douces.
   Les couleurs sont des variables : le mode sombre ne fait que les redéfinir. */

:root {
  /* Valeurs de secours : build.py injecte les vraies couleurs et polices
     (palette, couleurs personnalisées, mode sombre) depuis content/site.yml. */
  --bg: #fbfaf7;
  --surface: #ffffff;
  --surface-2: #f3f1ec;
  --text: #1c1917;
  --muted: #57534e;
  --line: #e4e0d8;
  --accent: #0f766e;
  --accent-rgb: 15, 118, 110;
  --on-accent: #ffffff;
  --accent2: #b45309;
  --accent2-rgb: 180, 83, 9;
  --shadow: 0 1px 2px rgba(20, 20, 30, 0.05), 0 8px 24px rgba(20, 20, 30, 0.07);
  --shadow-lift: 0 2px 4px rgba(20, 20, 30, 0.05), 0 16px 36px rgba(20, 20, 30, 0.11);
  --font-heading: Georgia, serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-mono: ui-monospace, Consolas, monospace;
  --radius: 14px;
  --wrap: 1080px;
  --topbar-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--topbar-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.65 var(--font-body);
  overflow-wrap: break-word;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { font-family: var(--font-heading); font-weight: 600; line-height: 1.2; margin: 0; letter-spacing: -0.01em; }
p { margin: 0 0 0.9em; }
ul, ol { padding-left: 1.2em; }
.muted { color: var(--muted); }
.wrap { width: min(100% - 32px, var(--wrap)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon { flex: none; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
main:focus { outline: none; }
main { flex: 1 0 auto; }
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--accent); color: var(--on-accent); padding: 10px 16px; border-radius: 8px; font-weight: 600;
}
.skip-link:focus { top: 12px; }

/* Barre du haut et navigation par section */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  width: min(100% - 32px, var(--wrap)); margin-inline: auto;
  min-height: var(--topbar-h); display: flex; align-items: center; gap: 20px;
}
.brand { font-family: var(--font-heading); font-weight: 600; font-size: 1.15rem; color: var(--text); text-decoration: none; white-space: nowrap; }
.section-nav { margin-left: auto; min-width: 0; }
.section-nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.section-nav a {
  display: block; padding: 6px 12px; border-radius: 999px;
  color: var(--muted); text-decoration: none; font-size: 0.92rem; font-weight: 500; white-space: nowrap;
}
.section-nav a:hover { color: var(--text); background: var(--surface-2); }
.section-nav a[aria-current="true"] { color: var(--accent); background: rgba(var(--accent-rgb), 0.1); }
.theme-toggle {
  flex: none; width: 40px; height: 40px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); display: grid; place-items: center; cursor: pointer;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.when-dark { display: none; }
:root[data-theme="dark"] .when-dark { display: inline-flex; }
:root[data-theme="dark"] .when-light { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .when-dark { display: inline-flex; }
  :root:not([data-theme="light"]) .when-light { display: none; }
}

/* Hero */
.hero {
  display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 56px; align-items: center;
  padding: 88px 0 72px;
}
.eyebrow { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 0.92rem; margin-bottom: 18px; }
.hero h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); line-height: 1.02; letter-spacing: -0.025em; }
.role { font-family: var(--font-heading); font-size: clamp(1.15rem, 2.2vw, 1.45rem); color: var(--accent); margin: 14px 0 20px; font-weight: 500; }
.pitch { font-size: 1.08rem; color: var(--muted); max-width: 56ch; }
.pitch strong { color: var(--text); font-weight: 600; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.hero-photo { margin: 0; justify-self: end; width: min(100%, 340px); }
.hero-photo img {
  aspect-ratio: 1; object-fit: cover; width: 100%;
  border-radius: 28px 28px 28px 120px; box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

.btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 10px 18px;
  border-radius: 999px; font-weight: 600; font-size: 0.95rem; text-decoration: none; border: 1px solid transparent;
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 88%, var(--text)); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-icon { width: 44px; padding: 0; justify-content: center; background: var(--surface); color: var(--text); border-color: var(--line); }
.btn-icon:hover { border-color: var(--accent); color: var(--accent); }

/* Sections */
.section { padding: 64px 0; border-top: 1px solid var(--line); }
.section-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 32px; }
.section-num { font-family: var(--font-heading); color: var(--accent); font-size: 1rem; font-weight: 500; }
.section-head h2 { font-size: clamp(1.8rem, 3.4vw, 2.4rem); }
.prose { max-width: 70ch; }
.prose > :last-child { margin-bottom: 0; }
.prose-lead { font-size: 1.08rem; }
.prose ul { margin: 0 0 0.9em; }
.prose li { margin-bottom: 0.35em; }
.prose li::marker { color: var(--accent); }
.prose h2 { font-size: 1.45rem; margin: 1.6em 0 0.6em; }
.prose h3 { font-size: 1.2rem; margin: 1.4em 0 0.5em; }
.prose table { width: 100%; border-collapse: collapse; margin: 1em 0 1.4em; font-size: 0.95rem; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.prose th { font-weight: 600; background: var(--surface-2); }
.prose code { background: var(--surface-2); padding: 0.1em 0.35em; border-radius: 5px; font-size: 0.9em; }
.prose pre { background: var(--surface-2); padding: 14px; border-radius: 10px; overflow-x: auto; }
.prose img { border-radius: 10px; margin: 1em 0; }
.prose blockquote { margin: 1em 0; padding-left: 16px; border-left: 3px solid var(--accent); color: var(--muted); }
.small { font-size: 0.95rem; color: var(--muted); }

.tags { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 14px 0 0; }
.tags li {
  font-size: 0.8rem; padding: 3px 10px; border-radius: 999px;
  background: var(--surface-2); color: var(--muted); border: 1px solid var(--line);
}
.tags-lg li { font-size: 0.9rem; padding: 5px 12px; color: var(--text); }
.badge {
  display: inline-block; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase;
  color: var(--accent); background: rgba(var(--accent-rgb), 0.1); padding: 3px 9px; border-radius: 6px;
}

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0 0 0 28px; position: relative; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.tl-item { position: relative; margin-bottom: 22px; }
.tl-item::before {
  content: ""; position: absolute; left: -28px; top: 26px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--bg); border: 3px solid var(--accent);
}
.tl-item.is-current::before { background: var(--accent); box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.18); }
.tl-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow); }
.tl-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: start; margin-bottom: 12px; }
.tl-logo { width: 48px; height: 48px; border-radius: 12px; object-fit: contain; background: var(--surface-2); }
.tl-initials { display: grid; place-items: center; font-weight: 700; color: var(--accent); }
.tl-title h3 { font-size: 1.2rem; }
.tl-org { margin: 4px 0 0; font-weight: 500; }
.tl-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; text-align: right; }
.tl-meta time { font-size: 0.9rem; color: var(--muted); white-space: nowrap; }

/* Projets */
.filters { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); margin-bottom: 26px; }
.filter {
  font: inherit; font-size: 0.92rem; font-weight: 500; min-height: 38px; padding: 6px 16px; border-radius: 999px;
  border: 0; background: transparent; color: var(--muted); cursor: pointer;
}
.filter:hover { color: var(--text); }
.filter[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.project-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }
.project-card {
  display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.project-card:hover { transform: translateY(-3px); border-color: rgba(var(--accent-rgb), 0.45); }
.project-card[hidden] { display: none; }
.project-thumb { aspect-ratio: 16 / 9; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.project-thumb img { width: 100%; height: 100%; object-fit: cover; }
.project-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.project-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 0.82rem; color: var(--muted); margin-bottom: 8px; }
.star { margin-left: auto; color: var(--accent2); font-weight: 600; }
.project-body h3 { font-size: 1.2rem; margin-bottom: 8px; }
.project-body h3 a { color: var(--text); text-decoration: none; }
.project-body h3 a:hover { color: var(--accent); }
.project-summary { color: var(--muted); font-size: 0.95rem; margin: 0; }
.project-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: auto; padding-top: 16px; }
.link-more { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: none; margin-right: auto; }
.link-more:hover { text-decoration: underline; }
.link-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 0.88rem; color: var(--muted); text-decoration: none; min-height: 32px; }
.link-chip:hover { color: var(--accent); }
.empty-filter { color: var(--muted); }

/* Compétences */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 28px 40px; }
.skill-group h3 { font-size: 1.1rem; padding-bottom: 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.skill-levels { list-style: none; padding: 0; margin: 0; }
.skill-levels li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.dots { display: inline-flex; gap: 4px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.dot.on { background: var(--accent); }

/* Formation */
.edu-list { list-style: none; margin: 0; padding: 0; }
.edu-item { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.edu-item:first-child { padding-top: 0; }
.edu-dates { color: var(--muted); font-size: 0.92rem; margin: 2px 0 0; }
.edu-item h3 { font-size: 1.15rem; }
.edu-school { margin: 4px 0 6px; font-weight: 500; }

/* Contact */
.contact-title { font-family: var(--font-heading); font-size: clamp(1.8rem, 4.4vw, 3rem); line-height: 1.1; margin: 0 0 10px; }
.contact-text { color: var(--muted); max-width: 56ch; font-size: 1.05rem; }

/* Page projet */
.project-page { padding: 40px 0 72px; max-width: 820px; }
.back-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; text-decoration: none; margin-bottom: 28px; }
.project-page-head h1 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 12px; }
.lead { font-size: 1.15rem; color: var(--muted); }
.project-page-head .project-links { padding-top: 14px; }
.project-hero { margin: 32px 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }

.footer { border-top: 1px solid var(--line); padding: 28px 0; font-size: 0.9rem; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; }
.footer p { margin: 0; }

/* Tablette et mobile */
@media (max-width: 860px) {
  .topbar-inner { flex-wrap: wrap; gap: 0 12px; padding-top: 10px; }
  .brand { flex: 1; }
  .section-nav { order: 3; width: 100%; margin: 6px -16px 0; overflow-x: auto; scrollbar-width: none; padding: 0 16px 8px; width: calc(100% + 32px); }
  .section-nav::-webkit-scrollbar { display: none; }
  html { scroll-padding-top: 120px; }
  .hero { grid-template-columns: 1fr; gap: 32px; padding: 48px 0 52px; }
  .hero-photo { order: -1; justify-self: start; width: 132px; }
  .hero-photo img { border-radius: 24px 24px 24px 64px; }
}
@media (max-width: 600px) {
  .section { padding: 48px 0; }
  .tl-card { padding: 18px; }
  .tl-head { grid-template-columns: auto minmax(0, 1fr); }
  .tl-meta { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between; text-align: left; }
  .edu-item { grid-template-columns: 1fr; gap: 4px; }
  .timeline { padding-left: 22px; }
  .tl-item::before { left: -22px; width: 14px; height: 14px; }
  .timeline::before { left: 6px; }
  .btn { flex: 1 1 auto; justify-content: center; }
  .btn-icon { flex: 0 0 44px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .btn:hover, .project-card:hover { transform: none; }
}

@media print {
  .topbar, .theme-toggle, .filters, .skip-link { display: none; }
  .section { break-inside: avoid; }
}

/* availability badge */
.status { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 18px; padding: 5px 12px 5px 10px; border-radius: 999px; font-size: 0.88rem; font-weight: 600; color: #166534; background: rgba(22, 163, 74, 0.1); border: 1px solid rgba(22, 163, 74, 0.25); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #16a34a; box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.2); }
:root[data-theme="dark"] .status { color: #86efac; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .status { color: #86efac; } }

/* ===================================================================
   Modele I "Aurora" : aurores de couleur en fond, cartes en verre
   depoli, photo cerclee de lumiere, apparitions douces au defilement.
   =================================================================== */
:root { --wrap: 1180px; --radius: 24px; --topbar-h: 74px;
  --page: color-mix(in srgb, var(--bg) 94%, var(--accent) 6%);
  --glass: color-mix(in srgb, var(--surface) 62%, transparent);
  --glass-strong: color-mix(in srgb, var(--surface) 78%, transparent);
  --edge: rgba(255, 255, 255, .55); --edge-soft: color-mix(in srgb, var(--line) 70%, transparent); }
:root[data-theme="dark"] { --page: color-mix(in srgb, var(--bg) 55%, #000); --glass: color-mix(in srgb, var(--surface) 45%, transparent); --glass-strong: color-mix(in srgb, var(--surface) 62%, transparent); --edge: rgba(255, 255, 255, .10); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --page: color-mix(in srgb, var(--bg) 55%, #000); --glass: color-mix(in srgb, var(--surface) 45%, transparent); --glass-strong: color-mix(in srgb, var(--surface) 62%, transparent); --edge: rgba(255, 255, 255, .10); } }
html, body { overflow-x: clip; }
body { background: var(--page); }

/* Aurora background: three large blurred lights that drift very slowly */
.aurora { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.aurora i { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .55; animation: drift 38s ease-in-out infinite alternate; }
.aurora i:nth-child(1) { width: 60vw; height: 60vw; left: -18vw; top: -22vw; background: rgba(var(--accent-rgb), .55); }
.aurora i:nth-child(2) { width: 52vw; height: 52vw; right: -16vw; top: 8vh; background: rgba(var(--accent2-rgb), .40); animation-duration: 46s; animation-delay: -12s; }
.aurora i:nth-child(3) { width: 44vw; height: 44vw; left: 26vw; bottom: -26vw; background: color-mix(in srgb, rgb(var(--accent-rgb)) 50%, #22d3ee); opacity: .32; animation-duration: 52s; }
.aurora::after { content: ""; position: absolute; inset: 0; opacity: .06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E"); }
@keyframes drift { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(6vw, 4vh, 0) scale(1.12); } }

/* Glass navigation pill */
.topbar { position: sticky; top: 14px; background: none; border: 0; backdrop-filter: none; -webkit-backdrop-filter: none; padding: 0 16px; }
.topbar-inner { width: min(100%, var(--wrap)); min-height: 60px; padding: 8px 8px 8px 22px; border-radius: 999px; background: var(--glass-strong);
  border: 1px solid var(--edge-soft); box-shadow: 0 18px 50px -28px rgba(0,0,0,.5), inset 0 1px 0 var(--edge);
  backdrop-filter: blur(18px) saturate(1.5); -webkit-backdrop-filter: blur(18px) saturate(1.5); }
.brand { font-weight: 800; letter-spacing: -.02em; }
.section-nav a[aria-current="true"] { color: var(--on-accent); background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 60%, var(--accent2))); box-shadow: 0 6px 18px -8px rgba(var(--accent-rgb), .9); }
.theme-toggle { background: var(--glass); }

/* Glass surfaces with a light gradient edge */
.glass-card, .tl-card, .project-card, .skill-group, .edu-item, .contact-panel, .glance, .about-grid > .prose {
  position: relative; border-radius: var(--radius); background: var(--glass); border: 1px solid var(--edge-soft);
  box-shadow: 0 24px 60px -36px rgba(0,0,0,.55), inset 0 1px 0 var(--edge);
  backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4);
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.tl-card::before, .project-card::before, .skill-group::before, .edu-item::before, .contact-panel::before, .glance::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none; opacity: 0; transition: opacity .3s ease;
  background: linear-gradient(135deg, rgb(var(--accent-rgb)), transparent 40%, transparent 60%, rgb(var(--accent2-rgb)));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.tl-card:hover, .project-card:hover, .skill-group:hover, .edu-item:hover { transform: translateY(-5px); box-shadow: 0 34px 70px -34px rgba(var(--accent-rgb), .65), inset 0 1px 0 var(--edge); }
.tl-card:hover::before, .project-card:hover::before, .skill-group:hover::before, .edu-item:hover::before, .contact-panel::before, .project-card:first-child::before { opacity: 1; }

/* Hero */
.au-hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 56px; align-items: center; padding: 76px 0 64px; }
.au-hero h1 { font-size: clamp(2.8rem, 6.4vw, 5.2rem); line-height: 1; letter-spacing: -.045em; font-weight: 800; margin: 4px 0 18px; }
.au-hero .role { font-family: var(--font-body); font-weight: 600; font-size: clamp(1.05rem, 1.8vw, 1.25rem); margin: 0 0 18px; }
.au-hero .pitch { font-size: 1.1rem; }
.au-hero .status { margin-bottom: 18px; background: var(--glass-strong); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.au-visual { position: relative; justify-self: center; width: min(100%, 380px); aspect-ratio: 1; }
.au-ring { position: absolute; inset: 8%; border-radius: 50%; padding: 6px;
  background: conic-gradient(from 140deg, rgb(var(--accent-rgb)), rgb(var(--accent2-rgb)), color-mix(in srgb, rgb(var(--accent-rgb)) 50%, #22d3ee), rgb(var(--accent-rgb)));
  box-shadow: 0 0 60px -6px rgba(var(--accent-rgb), .6), 0 0 120px -20px rgba(var(--accent2-rgb), .5); }
.au-ring img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; border: 5px solid var(--page); }
.chip { position: absolute; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 16px; font-weight: 600; font-size: .9rem; white-space: nowrap;
  background: var(--glass-strong); border: 1px solid var(--edge-soft); box-shadow: 0 18px 40px -22px rgba(0,0,0,.55), inset 0 1px 0 var(--edge);
  backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4); animation: float 7s ease-in-out infinite; }
.chip b { font-size: 1.3rem; font-weight: 800; background: linear-gradient(135deg, rgb(var(--accent-rgb)), rgb(var(--accent2-rgb))); -webkit-background-clip: text; background-clip: text; color: transparent; }
.chip .icon { color: var(--accent); }
.chip-1 { left: -6%; top: 10%; }
.chip-2 { right: -8%; top: 42%; animation-delay: -2.4s; }
.chip-3 { left: 2%; bottom: 4%; animation-delay: -4.6s; }
@keyframes float { 50% { transform: translateY(-8px); } }

/* Sections */
.section { border-top: 0; padding: 56px 0; }
.section-head { flex-direction: column; align-items: flex-start; gap: 10px; margin-bottom: 30px; }
.section-num { font-family: var(--font-body); font-size: .78rem; font-weight: 800; letter-spacing: .16em; color: var(--accent); padding: 5px 12px; border-radius: 999px;
  background: var(--glass-strong); border: 1px solid var(--edge-soft); }
.section-head h2 { font-size: clamp(2.1rem, 4.2vw, 3.2rem); font-weight: 800; letter-spacing: -.035em; }
.about-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.about-grid > .prose { max-width: none; padding: 30px 34px; font-size: 1.08rem; }
.glance { padding: 26px; }
.glance-title { font-weight: 800; margin-bottom: 14px; }
.glance-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.glance-stats div { padding: 12px 14px; border-radius: 14px; background: rgba(var(--accent-rgb), .1); }
.glance-stats b { display: block; font-size: 1.9rem; font-weight: 800; line-height: 1.1; background: linear-gradient(135deg, rgb(var(--accent-rgb)), rgb(var(--accent2-rgb))); -webkit-background-clip: text; background-clip: text; color: transparent; }
.glance-stats span { color: var(--muted); font-size: .85rem; }
.glance dl { margin: 0; display: grid; gap: 12px; }
.glance dt { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 700; }
.glance dd { margin: 0; overflow-wrap: anywhere; }
.glance-cv { margin-top: 18px; width: 100%; justify-content: center; }

/* Timeline with a glowing line */
.timeline { padding-left: 34px; }
.timeline::before { left: 10px; width: 3px; border-radius: 3px; background: linear-gradient(180deg, rgb(var(--accent-rgb)), rgb(var(--accent2-rgb)), transparent); box-shadow: 0 0 18px rgba(var(--accent-rgb), .6); }
.tl-item::before { left: -33px; width: 18px; height: 18px; background: var(--page); border: 3px solid var(--accent); box-shadow: 0 0 0 5px rgba(var(--accent-rgb), .15); }
.tl-item.is-current::before { background: var(--accent); box-shadow: 0 0 0 6px rgba(var(--accent-rgb), .2), 0 0 22px rgba(var(--accent-rgb), .9); }
.tl-card { padding: 24px 26px; }
.tl-logo { border-radius: 14px; }

/* Projects */
.filters { background: var(--glass-strong); border-color: var(--edge-soft); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.filter[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
.project-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.project-card { overflow: hidden; }
.project-thumb { position: relative; overflow: hidden; border-bottom: 1px solid var(--edge-soft); }
.project-thumb::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,.28)); pointer-events: none; }
.project-thumb img { transition: transform .6s ease; }
.project-card:hover .project-thumb img { transform: scale(1.06); }
.project-body h3 { font-weight: 800; letter-spacing: -.02em; }
.star { color: var(--accent2); }

.skills-grid { gap: 18px; }
.skill-group { padding: 22px 24px; }
.skill-group h3 { border-bottom: 0; padding-bottom: 8px; font-weight: 800; }
.skill-levels li { border-bottom-color: var(--edge-soft); }
.dot { width: 20px; height: 6px; border-radius: 3px; }
.dot.on { background: linear-gradient(90deg, rgb(var(--accent-rgb)), rgb(var(--accent2-rgb))); box-shadow: 0 0 10px rgba(var(--accent-rgb), .6); }
.tags li { background: var(--glass-strong); border-color: var(--edge-soft); }

.edu-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; }
.edu-item, .edu-item:first-child { grid-template-columns: 1fr; gap: 6px; padding: 24px 26px; border-bottom: 1px solid var(--edge-soft); }
.edu-dates { font-weight: 700; color: var(--accent); }

.contact-panel { text-align: center; padding: 70px 32px; overflow: hidden;
  background: radial-gradient(600px 300px at 50% 0%, rgba(var(--accent-rgb), .32), transparent 70%), radial-gradient(500px 300px at 100% 100%, rgba(var(--accent2-rgb), .24), transparent 70%), var(--glass); }
.contact-title { font-size: clamp(2.4rem, 5.6vw, 4rem); font-weight: 800; letter-spacing: -.04em; }
.contact-panel .contact-text { margin-inline: auto; }
.contact-panel .actions { justify-content: center; }

.btn { font-weight: 700; }
.btn-primary { position: relative; overflow: hidden; background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 55%, var(--accent2))); box-shadow: 0 14px 32px -14px rgba(var(--accent-rgb), .95); }
.btn-primary::after { content: ""; position: absolute; top: 0; left: -70%; width: 50%; height: 100%; pointer-events: none; background: linear-gradient(105deg, transparent, rgba(255,255,255,.5), transparent); transform: skewX(-18deg); }
.btn-primary:hover::after { animation: sheen .8s ease forwards; }
@keyframes sheen { from { left: -70%; } to { left: 130%; } }
.btn-ghost, .btn-icon { background: var(--glass-strong); border-color: var(--edge-soft); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
h1.shine-text { background: linear-gradient(100deg, var(--text) 15%, rgb(var(--accent-rgb)) 55%, rgb(var(--accent2-rgb)) 90%); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; width: fit-content; max-width: 100%; padding-bottom: .06em; }
.footer { border-top: 0; }
.footer-inner { padding: 18px 24px; border-radius: 999px; background: var(--glass); border: 1px solid var(--edge-soft); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.project-page-head, .project-page .prose { position: relative; }
.project-hero { border-radius: var(--radius); box-shadow: 0 30px 70px -36px rgba(var(--accent-rgb), .7); }

/* Gentle reveal on scroll (translate keeps the hover transform free) */
.js-reveal .reveal { opacity: 0; translate: 0 26px; transition: opacity .8s ease, translate .8s cubic-bezier(.2, .7, .2, 1), transform .3s ease, box-shadow .3s ease, border-color .3s ease; }
.js-reveal .reveal.in { opacity: 1; translate: 0 0; }

@media (max-width: 900px) {
  .au-hero { grid-template-columns: 1fr; gap: 28px; padding-top: 40px; }
  .au-visual { order: -1; width: min(100%, 300px); }
  .about-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .topbar { top: 8px; padding: 0 10px; }
  .topbar-inner { border-radius: 22px; padding: 8px 12px 0 16px; }
  .section-nav { margin: 4px 0 0; width: 100%; padding: 0 0 8px; }
  .footer-inner { border-radius: 18px; }
}
@media (max-width: 600px) {
  .au-visual { width: min(100% - 40px, 260px); }
  .chip { font-size: .8rem; padding: 7px 11px; }
  .chip-1 { left: -4%; } .chip-2 { right: -6%; }
  .timeline { padding-left: 26px; }
  .tl-item::before { left: -25px; width: 14px; height: 14px; }
  .timeline::before { left: 7px; }
  .contact-panel { padding: 46px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .aurora i, .chip { animation: none; }
  .tl-card:hover, .project-card:hover, .skill-group:hover, .edu-item:hover, .project-card:hover .project-thumb img { transform: none; }
}


/* Menu hamburger sur téléphone */
.menu-toggle { display: none; }
.menu-toggle .when-open { display: none; }
.menu-toggle[aria-expanded="true"] .when-open { display: inline-flex; }
.menu-toggle[aria-expanded="true"] .when-closed { display: none; }
@media (max-width: 760px) {
  .menu-toggle { display: grid; place-items: center; flex: none; width: 42px; height: 42px; margin-left: auto; border-radius: 12px;
    border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; }
  .menu-toggle:hover, .menu-toggle[aria-expanded="true"] { border-color: var(--accent); color: var(--accent); }
  .section-nav { display: none; order: 5; flex-basis: 100%; width: 100% !important; margin: 0 !important; padding: 4px 0 12px !important; overflow: visible !important; }
  .section-nav.is-open { display: block; animation: menu-in .2s ease; }
  .section-nav ul { flex-direction: column; gap: 2px; }
  .section-nav a { display: block; padding: 12px 14px; border-radius: 10px; font-size: 1rem; white-space: normal; }
  .section-nav a::after { display: none; }
  .topbar-inner { flex-wrap: wrap; }
  .topbar-inner .theme-toggle { margin-left: 0; }
  .brand { flex: 1 1 auto; min-width: 0; }
}
@keyframes menu-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .section-nav.is-open { animation: none; } }
