/* ==========================================================
   Maxime Boullet, portfolio
   Bleu nuit, accent bleu pervenche et menthe. Police : Schibsted Grotesk.
   ========================================================== */

@font-face {
  font-family: "Schibsted Grotesk";
  src: url("../assets/fonts/schibsted-grotesk.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0c111d;
  --surface: rgba(22, 30, 48, 0.72);
  --surface-solid: #151d2f;
  --line: rgba(148, 166, 210, 0.14);
  --line-strong: rgba(148, 166, 210, 0.28);
  --text: #e9edf6;
  --soft: #c3cbdb;
  --muted: #8f9ab2;
  --accent: #7c9cff;
  --accent-2: #5fe0c8;
  --accent-soft: rgba(124, 156, 255, 0.14);
  --grad: linear-gradient(120deg, var(--accent) 0%, #9d8cff 45%, var(--accent-2) 100%);

  --font: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap: 1160px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 16px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }

::selection { background: rgba(124, 156, 255, .35); }

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

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 200;
  background: var(--accent); color: var(--bg); padding: 10px 14px;
  border-radius: 8px; font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Barre de progression ---------- */

.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 120;
  background: var(--grad);
  transform-origin: 0 50%;
  transform: scaleX(var(--progress, 0));
}

/* ---------- En-tête ---------- */

.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background-color .3s, border-color .3s, backdrop-filter .3s;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgba(12, 17, 29, 0.78);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--line);
}

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
  transition: height .3s var(--ease);
}
.is-scrolled .header-inner { height: 60px; }

.brand {
  display: inline-flex; align-items: center; gap: 12px;
  text-decoration: none; font-weight: 600;
}
.brand-mark {
  display: grid; place-items: center;
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--grad); color: #0b1020;
  font-weight: 800; font-size: 0.85rem; letter-spacing: 0.02em;
  transition: transform .4s var(--ease);
}
.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.06); }

.site-nav { position: relative; }
.site-nav ul { display: flex; gap: 2px; align-items: center; position: relative; z-index: 1; }
.site-nav a {
  display: block; padding: 8px 14px; border-radius: 999px;
  color: var(--muted); text-decoration: none; font-size: 0.95rem;
  transition: color .2s;
}
.site-nav a:hover, .site-nav a[aria-current="true"] { color: var(--text); }
.nav-indicator {
  position: absolute; top: 0; left: 0; height: 100%;
  border-radius: 999px; background: rgba(124, 156, 255, .12);
  border: 1px solid rgba(124, 156, 255, .22);
  opacity: 0;
  transition: transform .45s var(--ease), width .45s var(--ease), opacity .3s;
  pointer-events: none;
}
.site-nav .nav-cv {
  margin-left: 10px;
  color: var(--text);
  background: var(--surface-solid);
  border: 1px solid var(--line-strong);
  transition: border-color .2s, background-color .2s;
}
.site-nav .nav-cv:hover { border-color: var(--accent); background: var(--accent-soft); }

.nav-toggle {
  display: none;
  width: 44px; height: 44px; border: 1px solid var(--line-strong); border-radius: 12px;
  background: var(--surface-solid); cursor: pointer; position: relative;
}
.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  position: absolute; left: 12px; width: 18px; height: 2px;
  background: var(--text); border-radius: 2px; content: "";
  transition: transform .25s var(--ease), background-color .2s;
}
.nav-toggle-bar { top: 21px; }
.nav-toggle-bar::before { left: 0; top: -6px; }
.nav-toggle-bar::after { left: 0; top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Boutons ---------- */

.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 12px;
  font-weight: 600; font-size: 1rem;
  text-decoration: none; cursor: pointer;
  border: 1px solid transparent;
  transition: transform .25s var(--ease), box-shadow .25s, background-color .2s, border-color .2s;
}
.btn:active { transform: scale(.97); }
.btn-primary {
  background: var(--grad); background-size: 160% 100%; background-position: 0 0;
  color: #0b1020;
  box-shadow: 0 8px 30px -10px rgba(124, 156, 255, .7);
  transition: transform .25s var(--ease), box-shadow .25s, background-position .5s var(--ease);
}
.btn-primary:hover { background-position: 100% 0; box-shadow: 0 12px 40px -10px rgba(95, 224, 200, .6); transform: translateY(-2px); }
.btn-ghost { border-color: var(--line-strong); color: var(--text); background: rgba(255, 255, 255, .02); }
.btn-ghost:hover { border-color: var(--accent); background: var(--accent-soft); transform: translateY(-2px); }
.btn-small {
  min-height: 40px; padding: 0 16px; font-size: 0.92rem; border-radius: 10px;
  background: var(--surface-solid); color: var(--text); border-color: var(--line-strong);
}
.btn-small:hover { border-color: var(--accent); }

/* ---------- Cartes : survol lumineux et inclinaison ---------- */

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  isolation: isolate;
}
.spotlight::before {
  content: "";
  position: absolute; inset: -1px; z-index: -1;
  border-radius: inherit;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(124, 156, 255, .16), transparent 60%);
  opacity: 0; transition: opacity .35s;
  pointer-events: none;
}
.spotlight::after {
  content: "";
  position: absolute; inset: -1px; z-index: -1;
  border-radius: inherit; padding: 1px;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(124, 156, 255, .8), rgba(95, 224, 200, .35) 40%, transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0; transition: opacity .35s;
  pointer-events: none;
}
.spotlight:hover::before, .spotlight:hover::after { opacity: 1; }

.tilt {
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--ty, 0));
  transition: transform .4s var(--ease), border-color .3s;
  will-change: transform;
}
.tilt:hover { --ty: -4px; }
.tilt.is-tilting { transition: transform .08s linear; }

/* ---------- Intro ---------- */

.hero {
  position: relative;
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 120px 0 96px;
  overflow: hidden;
}

.hero-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero-grid-bg {
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(148, 166, 210, .22) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask: radial-gradient(520px circle at var(--hx, 70%) var(--hy, 40%), #000 0%, rgba(0,0,0,.35) 45%, transparent 75%);
          mask: radial-gradient(520px circle at var(--hx, 70%) var(--hy, 40%), #000 0%, rgba(0,0,0,.35) 45%, transparent 75%);
}
.blob {
  position: absolute; border-radius: 50%;
  filter: blur(80px); opacity: .5;
}
.blob-1 {
  width: 520px; height: 520px; top: -120px; right: -80px;
  background: radial-gradient(circle, rgba(124, 156, 255, .55), transparent 65%);
  animation: drift-1 18s ease-in-out infinite alternate;
}
.blob-2 {
  width: 440px; height: 440px; bottom: -160px; left: -120px;
  background: radial-gradient(circle, rgba(95, 224, 200, .35), transparent 65%);
  animation: drift-2 22s ease-in-out infinite alternate;
}
@keyframes drift-1 { to { transform: translate(-120px, 90px) scale(1.15); } }
@keyframes drift-2 { to { transform: translate(140px, -60px) scale(1.1); } }

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
  width: 100%;
}

.hero-badge {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 14px 6px 10px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line-strong);
  color: var(--soft); font-size: 0.9rem; font-weight: 500;
}
.badge-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 0 0 rgba(95, 224, 200, .6);
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(95, 224, 200, .55); }
  70%, 100% { box-shadow: 0 0 0 10px rgba(95, 224, 200, 0); }
}

.hero-name {
  margin-top: 22px;
  font-size: clamp(3.4rem, 10.5vw, 8.4rem);
  line-height: 0.92;
  font-weight: 800;
  letter-spacing: -0.045em;
}
.name-line { display: block; color: #fff; }
.char { display: inline-block; }

.hero-role {
  margin-top: 24px;
  font-size: clamp(1.25rem, 2.4vw, 1.65rem);
  font-weight: 500;
  color: var(--soft);
  display: flex; flex-wrap: wrap; gap: 0 .35em; align-items: baseline;
}
.rotator {
  position: relative; display: inline-grid;
  color: var(--text); font-weight: 700;
}
.rotator-word {
  grid-area: 1 / 1;
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  opacity: 0; transform: translateY(60%); filter: blur(4px);
  transition: opacity .5s var(--ease), transform .5s var(--ease), filter .5s;
  white-space: nowrap;
}
.rotator-word.is-active { opacity: 1; transform: none; filter: none; }
.rotator-word.is-leaving { opacity: 0; transform: translateY(-60%); filter: blur(4px); }

.hero-pitch {
  margin-top: 18px;
  color: var(--muted);
  max-width: 54ch;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

.now { padding: 26px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.now-title { font-size: 1rem; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.now-title::before {
  content: ""; width: 22px; height: 2px; border-radius: 2px; background: var(--grad);
}
.now-list { margin-top: 18px; display: grid; gap: 14px; }
.now-list dt { color: var(--muted); font-size: 0.85rem; }
.now-list dd { font-weight: 500; line-height: 1.4; }
.now-links {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; padding-top: 18px;
  border-top: 1px solid var(--line);
}
.now-links a {
  display: inline-block; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--line-strong); text-decoration: none;
  font-size: 0.9rem; font-weight: 500;
  transition: border-color .2s, background-color .2s, transform .2s var(--ease);
}
.now-links a:hover { border-color: var(--accent); background: var(--accent-soft); transform: translateY(-1px); }

.scroll-cue {
  position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%);
  width: 26px; height: 42px; border-radius: 14px;
  border: 2px solid var(--line-strong);
}
.scroll-cue span {
  position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px;
  border-radius: 2px; background: var(--accent);
  animation: cue 1.8s var(--ease) infinite;
}
@keyframes cue {
  0% { opacity: 0; transform: translateY(0); }
  30% { opacity: 1; }
  100% { opacity: 0; transform: translateY(14px); }
}

/* Entrée de l'intro */
.js .hero-badge, .js .hero-role, .js .hero-pitch, .js .hero-actions, .js .now {
  opacity: 0; transform: translateY(18px);
}
.js .hero .char { opacity: 0; transform: translateY(70%) rotate(6deg); }
.is-loaded .hero-badge, .is-loaded .hero-role, .is-loaded .hero-pitch, .is-loaded .hero-actions, .is-loaded .now,
.is-loaded .hero .char {
  opacity: 1; transform: none;
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.is-loaded .hero .char { transition-delay: calc(var(--i) * 35ms + 120ms); }
.is-loaded .hero-role { transition-delay: .55s; }
.is-loaded .hero-pitch { transition-delay: .65s; }
.is-loaded .hero-actions { transition-delay: .75s; }
.is-loaded .now { transition-delay: .85s; }
.is-loaded .now.tilt {
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--ty, 0));
  transition: opacity .8s var(--ease) .85s, transform .4s var(--ease);
}
.is-loaded .now.tilt.is-tilting { transition: opacity .8s var(--ease) .85s, transform .08s linear; }

/* ---------- Sections ---------- */

.section { padding: clamp(72px, 10vw, 128px) 0; position: relative; }

.section-head {
  display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between;
  gap: 16px 32px;
  margin-bottom: clamp(32px, 5vw, 56px);
}
.section-title {
  font-size: clamp(2rem, 4.6vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
}
.section-sub { color: var(--muted); max-width: 46ch; }

/* Apparition au défilement */
.js [data-reveal] {
  opacity: 0; transform: translateY(28px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
  transition-delay: var(--d, 0ms);
}
.js [data-reveal].is-visible { opacity: 1; transform: none; }
.js [data-reveal].is-settled { transition: transform .4s var(--ease), border-color .3s, opacity .3s; transition-delay: 0ms; }
.js .tilt[data-reveal].is-settled.is-tilting { transition: transform .08s linear; }
.js .tilt[data-reveal].is-visible { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--ty, 0)); }

/* ---------- Profil ---------- */

.profile-lead {
  font-size: clamp(1.3rem, 2.6vw, 1.85rem);
  line-height: 1.4; font-weight: 500;
  letter-spacing: -0.01em;
  max-width: 34ch;
}
.profile-cols {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px 48px; margin-top: 32px; color: var(--soft);
  max-width: 980px;
}
.facts {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px; margin-top: 48px;
}
.fact { padding: 24px; display: flex; flex-direction: column; gap: 4px; }
.fact-num {
  font-size: clamp(2.4rem, 5vw, 3.4rem); font-weight: 800; line-height: 1;
  letter-spacing: -0.04em;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  font-variant-numeric: tabular-nums;
}
.fact-label { color: var(--muted); }

/* ---------- Parcours ---------- */

.filters {
  display: inline-flex; padding: 4px; gap: 4px;
  border-radius: 999px; border: 1px solid var(--line-strong);
  background: var(--surface);
}
.filter {
  border: 0; background: transparent; cursor: pointer;
  padding: 8px 16px; border-radius: 999px;
  color: var(--muted); font-size: 0.92rem; font-weight: 500;
  transition: color .2s, background-color .25s;
}
.filter:hover { color: var(--text); }
.filter.is-active { background: var(--text); color: var(--bg); }

.timeline { position: relative; --line-x: 168px; }
.timeline::before, .timeline::after {
  content: ""; position: absolute; left: var(--line-x); top: 8px; bottom: 8px;
  width: 2px; border-radius: 2px;
}
.timeline::before { background: var(--line); }
.timeline::after {
  background: var(--grad);
  transform-origin: top; transform: scaleY(var(--tl, 0));
}

.tl-item {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 0 56px;
  position: relative;
  padding-bottom: 24px;
}
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: "";
  position: absolute; left: calc(var(--line-x) - 6px); top: 22px; z-index: 1;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--muted);
  transition: border-color .3s, background-color .3s, box-shadow .3s;
}
.tl-item.is-key::before { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft); }
.tl-item:hover::before { border-color: var(--accent-2); box-shadow: 0 0 0 6px rgba(95, 224, 200, .15); }

.tl-item.is-hidden { display: none; }

.tl-date {
  color: var(--muted); font-size: 0.92rem; line-height: 1.5;
  font-variant-numeric: tabular-nums; text-align: right; padding-top: 18px;
}
.tl-card { padding: 20px 24px; transition: transform .3s var(--ease), border-color .3s; }
.tl-card:hover { transform: translateX(4px); }
.tl-title { font-size: 1.2rem; font-weight: 700; line-height: 1.3; }
.tl-org { font-weight: 500; color: var(--accent); margin-left: 4px; }
.tl-meta {
  display: flex; align-items: center; gap: 10px;
  margin-top: 6px; color: var(--muted); font-size: 0.92rem;
}
.tag {
  display: inline-block; padding: 1px 10px; border-radius: 999px;
  border: 1px solid var(--line-strong); color: var(--soft);
  font-size: 0.8rem; font-weight: 500;
}
.tag-accent { border-color: rgba(124, 156, 255, .5); color: var(--accent); background: var(--accent-soft); }

.tl-points { margin-top: 12px; display: grid; gap: 6px; max-width: 70ch; }
.tl-points li { position: relative; padding-left: 18px; color: var(--soft); }
.tl-points li::before {
  content: ""; position: absolute; left: 0; top: 0.68em;
  width: 6px; height: 6px; border-radius: 50%; background: var(--line-strong);
}

/* ---------- Compétences (bento) ---------- */

.bento {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
}
.bento-item { padding: 28px; }
.bento-lang { grid-column: span 7; }
.bento-tech { grid-column: span 5; }
.bento-know { grid-column: span 6; }
.bento-langs { grid-column: span 6; }
.block-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 20px; }

.levels { display: grid; gap: 18px; }
.levels li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "name label" "bar bar";
  gap: 8px 16px; align-items: baseline;
}
.lv-name { grid-area: name; font-weight: 600; }
.lv-label { grid-area: label; color: var(--muted); font-size: 0.88rem; }
.lv-bar {
  grid-area: bar; position: relative; display: block;
  height: 6px; border-radius: 999px; background: rgba(148, 166, 210, .12);
  overflow: hidden;
}
.lv-bar > span {
  position: absolute; inset: 0;
  width: calc(var(--lv) * 20%);
  border-radius: inherit; background: var(--grad);
  transform-origin: left; transform: scaleX(0);
  transition: transform 1.2s var(--ease) .2s;
}
.is-visible .lv-bar > span, html:not(.js) .lv-bar > span { transform: scaleX(1); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips li {
  padding: 7px 14px; border-radius: 10px;
  background: rgba(255, 255, 255, .03); border: 1px solid var(--line-strong);
  font-size: 0.94rem; font-weight: 500;
  transition: transform .25s var(--ease), border-color .25s, background-color .25s;
}
.chips li:hover { transform: translateY(-3px); border-color: var(--accent); background: var(--accent-soft); }
.chips-sm li { padding: 3px 10px; font-size: 0.82rem; color: var(--soft); border-radius: 8px; }
.chips-sm li:hover { transform: none; }

.know-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.know-list li {
  padding: 12px 14px; border-radius: 12px;
  background: rgba(255, 255, 255, .025); border: 1px solid var(--line);
  font-size: 0.95rem; line-height: 1.35;
  transition: border-color .25s, background-color .25s;
}
.know-list li:hover { border-color: var(--line-strong); background: rgba(255, 255, 255, .05); }

/* ---------- Projets ---------- */

.projects {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.project { padding: 26px; display: flex; flex-direction: column; }
.project-top { display: flex; align-items: center; gap: 14px; }
.project-logo {
  width: 56px; height: 56px; flex: none; object-fit: contain;
  background: #f4f5f8; border-radius: 14px; padding: 7px;
  transition: transform .4s var(--ease);
}
.project:hover .project-logo { transform: scale(1.06) rotate(-3deg); }
.project-logo-text {
  display: grid; place-items: center; padding: 0;
  background: var(--grad); color: #0b1020; font-weight: 800; font-size: 1.25rem;
}
.project-kind { font-size: 0.92rem; font-weight: 600; line-height: 1.35; }
.project-kind span { color: var(--muted); font-weight: 400; }
.project-title { margin-top: 22px; font-size: 1.6rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.project-desc { margin-top: 12px; color: var(--soft); font-size: 0.98rem; flex: 1; }
.project .chips { margin-top: 18px; }
.project-link {
  margin-top: 16px; align-self: flex-start;
  font-size: 0.92rem; font-weight: 600; color: var(--accent);
  text-decoration: none; position: relative;
}
.project-link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px;
  background: currentColor; transform: scaleX(.35); transform-origin: left;
  transition: transform .35s var(--ease);
}
.project-link:hover::after { transform: scaleX(1); }

/* Débuts sur Scratch */
.origins { margin-top: clamp(64px, 8vw, 96px); }
.origins-title { font-size: clamp(1.4rem, 2.6vw, 1.8rem); font-weight: 800; letter-spacing: -0.02em; }
.origins-lead { margin-top: 10px; color: var(--muted); max-width: 66ch; }

.games {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 28px;
}
.game { overflow: hidden; display: flex; flex-direction: column; }
.game-thumb {
  position: relative; display: block; width: 100%; padding: 0; border: 0;
  background: #05070d; cursor: pointer; overflow: hidden;
  border-radius: var(--radius) var(--radius) 0 0;
}
.game-thumb img {
  width: 100%; height: auto; aspect-ratio: 480 / 352;
  image-rendering: pixelated;
  transition: transform .6s var(--ease), filter .4s;
}
.game-thumb:hover img, .game-thumb:focus-visible img { transform: scale(1.06); filter: brightness(.55); }
.game-play-badge {
  position: absolute; left: 50%; top: 50%;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 18px 10px 14px; border-radius: 999px;
  background: rgba(12, 17, 29, .82); border: 1px solid var(--line-strong);
  font-weight: 700;
  transform: translate(-50%, -30%); opacity: 0;
  transition: opacity .3s, transform .4s var(--ease);
  backdrop-filter: blur(6px);
}
.game-thumb:hover .game-play-badge, .game-thumb:focus-visible .game-play-badge { opacity: 1; transform: translate(-50%, -50%); }
.play-icon {
  width: 0; height: 0;
  border-left: 11px solid var(--accent-2);
  border-top: 7px solid transparent; border-bottom: 7px solid transparent;
}
.game-body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.game-title { font-size: 1.15rem; font-weight: 700; }
.game-desc { margin-top: 6px; font-size: 0.95rem; color: var(--soft); flex: 1; }
.game-keys { margin-top: 12px; font-size: 0.82rem; color: var(--muted); line-height: 2; }
kbd {
  display: inline-block; min-width: 1.75em; padding: 0 5px; margin-right: 2px;
  border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 5px;
  background: var(--surface-solid); color: var(--text);
  font: inherit; font-weight: 600; text-align: center; line-height: 1.5;
}

.game-dialog {
  width: min(960px, calc(100vw - 32px), calc((100vh - 150px) * 1.2));
  padding: 0; border: 1px solid var(--line-strong); border-radius: 18px;
  background: var(--surface-solid); color: var(--text);
  box-shadow: 0 40px 120px -20px rgba(0, 0, 0, .7);
}
.game-dialog[open] { animation: pop .35s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(.97); } }
.game-dialog::backdrop { background: rgba(5, 8, 15, 0.75); backdrop-filter: blur(6px); }
.game-dialog-head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 16px; border-bottom: 1px solid var(--line);
}
.game-dialog-title { font-size: 1.05rem; font-weight: 700; }
.game-frame { aspect-ratio: 480 / 400; background: #000; }
.game-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.game-dialog-note { padding: 10px 16px; color: var(--muted); font-size: 0.88rem; }

/* ---------- Contact ---------- */

.contact {
  overflow: hidden;
  padding: clamp(36px, 6vw, 72px);
  text-align: center;
  background: linear-gradient(180deg, rgba(22, 30, 48, .9), rgba(16, 22, 36, .9));
}
.contact::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; padding: 1px;
  background: var(--grad);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: .55;
}
.contact-glow {
  position: absolute; z-index: -1; left: 50%; top: -60%;
  width: 640px; height: 640px; margin-left: -320px; border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 156, 255, .28), transparent 60%);
  animation: glow 8s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes glow { to { transform: translateY(60px) scale(1.15); opacity: .7; } }
.contact .section-title { max-width: none; }
.contact-lead { margin: 14px auto 0; color: var(--muted); max-width: 46ch; }
.contact-mail {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 20px;
  margin-top: 30px;
}
.mail-link {
  font-size: clamp(1.3rem, 4.2vw, 2.4rem);
  font-weight: 700; letter-spacing: -0.02em;
  text-decoration: none; overflow-wrap: anywhere;
  background: linear-gradient(var(--text), var(--text)) left bottom / 100% 2px no-repeat;
  padding-bottom: 4px;
  transition: color .3s;
}
.mail-link:hover {
  background-image: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.copy-btn.is-copied { border-color: var(--accent-2); color: var(--accent-2); }
.contact-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 32px; }

/* ---------- Pied de page ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0;
  color: var(--muted); font-size: 0.9rem;
}
.footer-inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.to-top { color: var(--muted); text-decoration: none; }
.to-top:hover { color: var(--text); }

/* ---------- Responsive ---------- */

@media (max-width: 1020px) {
  .hero-layout { grid-template-columns: 1fr; }
  .now { max-width: 520px; }
  .projects, .games { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bento-lang, .bento-tech, .bento-know, .bento-langs { grid-column: span 12; }
}

@media (max-width: 820px) {
  .nav-toggle { display: inline-block; }
  .site-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    background: rgba(12, 17, 29, .96); border-bottom: 1px solid var(--line);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    clip-path: inset(0 0 100% 0); visibility: hidden;
    transition: clip-path .4s var(--ease), visibility 0s .4s;
  }
  .site-nav.is-open { clip-path: inset(0 0 0 0); visibility: visible; transition: clip-path .4s var(--ease); }
  .site-header:has(.site-nav.is-open) { background: rgba(12, 17, 29, .96); }
  .site-nav ul { flex-direction: column; align-items: stretch; padding: 8px var(--gutter) 20px; gap: 2px; }
  .site-nav a { padding: 14px 12px; font-size: 1.1rem; border-radius: 10px; }
  .site-nav .nav-cv { margin: 10px 0 0; text-align: center; }
  .nav-indicator { display: none; }

  .profile-cols { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; }
  .fact { flex-direction: row; align-items: baseline; gap: 14px; }
  .know-list { grid-template-columns: 1fr; }
  .projects, .games { grid-template-columns: 1fr; }

  .timeline { --line-x: 6px; }
  .tl-item { grid-template-columns: 1fr; padding-left: 32px; }
  .tl-item::before { left: 0; top: 4px; }
  .tl-date { text-align: left; padding-top: 0; margin-bottom: 8px; }
  .section-head { align-items: start; }
  .scroll-cue { display: none; }
}

@media (max-width: 420px) {
  .brand-name { display: none; }
  .hero-actions .btn { flex: 1 1 100%; }
  .filter { padding: 8px 12px; }
}

/* Mouvement réduit : tout s'affiche directement */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important; transition-delay: 0ms !important;
    scroll-behavior: auto !important;
  }
  .js [data-reveal], .js .hero-badge, .js .hero-role, .js .hero-pitch, .js .hero-actions, .js .now, .js .hero .char {
    opacity: 1; transform: none;
  }
  .lv-bar > span { transform: scaleX(1); }
  .rotator-word { filter: none; }
}
