/* =========================================================
   MEHDI BENTAIBI — PORTFOLIO
   DA : futuriste · vert néon clair · holographique
   ========================================================= */

:root {
  --bg: #040a07;
  --bg-2: #07130d;
  --surface: rgba(10, 26, 18, 0.55);
  --surface-2: rgba(14, 36, 25, 0.75);
  --line: rgba(110, 255, 180, 0.14);
  --line-2: rgba(110, 255, 180, 0.32);

  --g: #4dffa6;        /* vert menthe néon */
  --g-2: #2bf5c4;      /* vert aqua */
  --lime: #c4ff6b;     /* vert citron */
  --g-rgb: 77, 255, 166;
  --grad: linear-gradient(100deg, var(--lime), var(--g) 45%, var(--g-2));

  --text: #eafff4;
  --muted: #8fb5a2;
  --dark: #03110a;
  --hollow: #050d09;

  --f-display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --f-body: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --pad: clamp(1.25rem, 5vw, 5rem);
  --max: 1400px;
  --ease: cubic-bezier(0.19, 1, 0.22, 1);
  --ease-2: cubic-bezier(0.65, 0, 0.35, 1);
  --chamfer: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  font-family: var(--f-body);
  color: var(--text);
  background: radial-gradient(1200px 800px at 70% 0%, rgba(var(--g-rgb), 0.08), transparent 60%), var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
strong { color: var(--text); font-weight: 600; }
::selection { background: var(--g); color: var(--dark); }
.mono { font-family: var(--f-mono); }

:focus-visible { outline: 2px solid var(--g); outline-offset: 4px; }

.skip {
  position: fixed; top: 1rem; left: 1rem; z-index: 2000;
  padding: .6rem 1rem; background: var(--g); color: var(--dark);
  transform: translateY(-200%); transition: transform .3s;
}
.skip:focus { transform: none; }

/* scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: linear-gradient(var(--lime), var(--g-2)); border-radius: 8px; }
html { scrollbar-color: var(--g) var(--bg); scrollbar-width: thin; }

/* =========================================================
   LOADER
   ========================================================= */
.loader { display: none; }
.js .loader {
  position: fixed; inset: 0; z-index: 1500;
  display: grid; place-items: center;
}
.loader__shutter {
  position: absolute; left: 0; right: 0; height: 50.5%;
  background: #020604; z-index: -1;
  transition: transform 1s var(--ease-2);
}
.loader__shutter--top { top: 0; border-bottom: 1px solid var(--line-2); }
.loader__shutter--bottom { bottom: 0; border-top: 1px solid var(--line-2); }
.loader__grid {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(var(--g-rgb), .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--g-rgb), .06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at center, #000 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(circle at center, #000 0%, transparent 70%);
  transition: opacity .5s;
}
.loader__inner {
  position: relative; z-index: 1;
  width: min(460px, 86vw);
  transition: opacity .4s, transform .6s var(--ease), filter .4s;
}
.loader__logo {
  position: relative;
  font-family: var(--f-display); font-weight: 900;
  font-size: clamp(3.5rem, 12vw, 6rem); line-height: 1;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 24px rgba(var(--g-rgb), .45));
  margin-bottom: 1.5rem;
  animation: logoGlitch 2.2s steps(1) infinite;
}
.loader__logo i { font-style: normal; animation: blink 1s steps(1) infinite; }
.loader__log {
  font-family: var(--f-mono); font-size: .72rem; color: var(--muted);
  min-height: 7.8em; margin-bottom: 1.2rem;
}
.loader__log li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; animation: logIn .3s var(--ease) both; }
.loader__log li b { color: var(--g); font-weight: 600; }
.loader__bar { height: 2px; background: rgba(var(--g-rgb), .12); overflow: hidden; }
.loader__bar span {
  display: block; height: 100%; width: 100%; background: var(--grad);
  transform-origin: left; transform: scaleX(0);
  box-shadow: 0 0 14px var(--g);
}
.loader__meta {
  display: flex; justify-content: space-between; margin-top: .7rem;
  font-size: .7rem; letter-spacing: .15em; color: var(--muted);
}
.loader__meta span:last-child { color: var(--g); }

.loader.is-done .loader__inner { opacity: 0; transform: scale(1.08); filter: blur(8px); }
.loader.is-done .loader__grid { opacity: 0; }
.loader.is-done .loader__shutter--top { transform: translateY(-101%); transition-delay: .25s; }
.loader.is-done .loader__shutter--bottom { transform: translateY(101%); transition-delay: .25s; }
.loader.is-gone { display: none; }

@keyframes logIn { from { opacity: 0; transform: translateX(-10px); } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes logoGlitch {
  0%, 100% { transform: none; clip-path: none; }
  92% { transform: translate(-3px, 1px) skewX(-8deg); clip-path: inset(10% 0 55% 0); }
  94% { transform: translate(3px, -1px); clip-path: inset(60% 0 5% 0); }
  96% { transform: none; clip-path: none; }
}

/* =========================================================
   AMBIENT LAYERS
   ========================================================= */
#bg {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: 0; pointer-events: none;
  opacity: 0; transition: opacity 1.6s ease;
}
#bg.is-on { opacity: 1; }

.fx-noise {
  position: fixed; inset: -50%; z-index: 990; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: .055;
  animation: grain 1s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-6%, 4%); }
  40% { transform: translate(5%, -7%); }
  60% { transform: translate(-3%, 8%); }
  80% { transform: translate(7%, 2%); }
  100% { transform: translate(0, 0); }
}
.fx-scan {
  position: fixed; inset: 0; z-index: 989; pointer-events: none;
  background: repeating-linear-gradient(to bottom, transparent 0 2px, rgba(0, 0, 0, .18) 3px, transparent 4px);
  opacity: .35;
}
.fx-scan::after {
  content: ""; position: absolute; left: 0; right: 0; height: 18vh; top: -20vh;
  background: linear-gradient(to bottom, transparent, rgba(var(--g-rgb), .045), transparent);
  animation: sweep 9s linear infinite;
}
@keyframes sweep { to { transform: translateY(140vh); } }
.fx-vignette {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, .55) 100%);
}

.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 1100; pointer-events: none; }
.progress span {
  display: block; height: 100%; background: var(--grad);
  transform-origin: left; transform: scaleX(0);
  box-shadow: 0 0 12px var(--g);
}

/* =========================================================
   CURSOR
   ========================================================= */
.cursor { display: none; }
.has-cursor, .has-cursor * { cursor: none !important; }
.has-cursor .cursor { display: block; }
.cursor__dot, .cursor__ring {
  position: fixed; top: 0; left: 0; z-index: 1400; pointer-events: none;
  border-radius: 50%;
}
.cursor__dot {
  width: 6px; height: 6px; margin: -3px 0 0 -3px;
  background: var(--g); box-shadow: 0 0 10px var(--g);
}
.cursor__ring {
  width: 38px; height: 38px; margin: -19px 0 0 -19px;
  border: 1px solid rgba(var(--g-rgb), .6);
  display: grid; place-items: center;
  transition: width .35s var(--ease), height .35s var(--ease), margin .35s var(--ease), background .3s, border-color .3s;
}
.cursor__label {
  font-family: var(--f-mono); font-size: .62rem; font-weight: 600; letter-spacing: .12em;
  color: var(--dark); opacity: 0; transition: opacity .2s;
}
.cursor.is-hover .cursor__ring {
  width: 64px; height: 64px; margin: -32px 0 0 -32px;
  background: rgba(var(--g-rgb), .08); border-color: var(--g);
}
.cursor.is-label .cursor__ring {
  width: 84px; height: 84px; margin: -42px 0 0 -42px;
  background: var(--g); border-color: var(--g);
  box-shadow: 0 0 30px rgba(var(--g-rgb), .5);
}
.cursor.is-label .cursor__label { opacity: 1; }
.cursor.is-label .cursor__dot { opacity: 0; }
.cursor.is-down .cursor__ring { width: 28px; height: 28px; margin: -14px 0 0 -14px; }

/* =========================================================
   NAV
   ========================================================= */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: space-between; gap: 2rem;
  padding: 1.2rem var(--pad);
  transition: transform .5s var(--ease), background .4s, padding .4s, border-color .4s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(4, 10, 7, .62);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-color: var(--line);
  padding-block: .8rem;
}
.nav.is-hidden { transform: translateY(-110%); }
.nav__logo { display: flex; align-items: center; gap: .35rem; }
.nav__logo-mark {
  font-family: var(--f-display); font-weight: 900; font-size: 1.35rem; letter-spacing: -.02em;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.nav__logo-dot {
  width: 8px; height: 8px; background: var(--g); border-radius: 50%;
  box-shadow: 0 0 12px var(--g); animation: pulse 2s infinite;
}
.nav__links { display: flex; gap: .3rem; }
.nav__links a {
  position: relative; display: flex; align-items: baseline; gap: .4rem;
  padding: .5rem .8rem; font-size: .9rem; font-weight: 500; color: var(--muted);
  border-radius: 6px; transition: color .3s;
}
.nav__links a span { font-size: .62rem; color: var(--g); opacity: .7; }
.nav__links a::after {
  content: ""; position: absolute; left: .8rem; right: .8rem; bottom: .25rem; height: 1px;
  background: var(--grad); transform: scaleX(0); transform-origin: right;
  transition: transform .5s var(--ease);
}
.nav__links a:hover, .nav__links a.is-active { color: var(--text); }
.nav__links a:hover::after, .nav__links a.is-active::after { transform: scaleX(1); transform-origin: left; }
.nav__cta {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .6rem 1.1rem; font-family: var(--f-mono); font-size: .8rem; font-weight: 600;
  color: var(--dark); background: var(--grad);
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
  transition: filter .3s, box-shadow .3s, translate .6s var(--ease);
}
.nav__cta svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.nav__cta:hover { filter: brightness(1.12) drop-shadow(0 0 12px rgba(var(--g-rgb), .6)); }
.nav__burger { display: none; width: 44px; height: 44px; position: relative; }
.nav__burger span {
  position: absolute; left: 10px; right: 10px; height: 2px; background: var(--g);
  transition: transform .5s var(--ease), top .5s var(--ease);
}
.nav__burger span:first-child { top: 17px; }
.nav__burger span:last-child { top: 25px; right: 16px; }
.menu-open .nav__burger span:first-child { top: 21px; transform: rotate(45deg); }
.menu-open .nav__burger span:last-child { top: 21px; right: 10px; transform: rotate(-45deg); }

.menu {
  position: fixed; inset: 0; z-index: 999;
  display: flex; flex-direction: column; justify-content: center; padding: 6rem var(--pad) 3rem;
  background: rgba(3, 8, 6, .96);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  clip-path: circle(0% at calc(100% - 3rem) 2.5rem);
  transition: clip-path .9s var(--ease-2);
  visibility: hidden;
}
.menu-open .menu { clip-path: circle(150% at calc(100% - 3rem) 2.5rem); visibility: visible; }
.menu__links { display: flex; flex-direction: column; gap: .4rem; }
.menu__links a {
  display: flex; align-items: baseline; gap: 1rem;
  font-family: var(--f-display); font-weight: 800; font-size: clamp(1.8rem, 8vw, 3rem); text-transform: uppercase;
  opacity: 0; transform: translateY(30px);
  transition: opacity .5s, transform .7s var(--ease), color .3s;
}
.menu__links a span { font-size: .8rem; color: var(--g); font-weight: 400; }
.menu__links a:hover { color: var(--g); }
.menu-open .menu__links a { opacity: 1; transform: none; }
.menu-open .menu__links a:nth-child(1) { transition-delay: .15s; }
.menu-open .menu__links a:nth-child(2) { transition-delay: .2s; }
.menu-open .menu__links a:nth-child(3) { transition-delay: .25s; }
.menu-open .menu__links a:nth-child(4) { transition-delay: .3s; }
.menu-open .menu__links a:nth-child(5) { transition-delay: .35s; }
.menu-open .menu__links a:nth-child(6) { transition-delay: .4s; }
.menu__foot { margin-top: auto; color: var(--muted); font-size: .8rem; }

/* =========================================================
   LAYOUT COMMUN
   ========================================================= */
main, .footer { position: relative; z-index: 2; }
main { overflow-x: clip; }

.section {
  position: relative;
  max-width: var(--max); margin: 0 auto;
  padding: clamp(5rem, 11vw, 9rem) var(--pad);
}
.section__head {
  display: flex; align-items: baseline; gap: 1.2rem; flex-wrap: wrap;
  margin-bottom: clamp(2.5rem, 6vw, 4.5rem);
}
.section__index { color: var(--g); font-size: .85rem; letter-spacing: .1em; }
.section__title {
  font-family: var(--f-display); font-weight: 800; text-transform: uppercase;
  font-size: clamp(1.45rem, 6vw, 4.6rem); line-height: 1; letter-spacing: -.02em;
}
.section__rule {
  flex: 1 1 60px; height: 1px; align-self: center;
  background: linear-gradient(90deg, var(--g), transparent);
  transform: scaleX(0); transform-origin: left; transition: transform 1.4s var(--ease) .3s;
}
.section__head.is-in .section__rule, .no-js .section__rule { transform: scaleX(1); }

/* reveal */
.js [data-reveal] {
  opacity: 0; transform: translateY(40px); filter: blur(6px);
  transition: opacity .9s var(--ease), transform 1s var(--ease), filter .9s var(--ease);
  transition-delay: calc(var(--d, 0) * 90ms);
}
.js [data-reveal].is-in { opacity: 1; transform: none; filter: none; }
.js [data-reveal].is-settled { transition-delay: 0s; }
.js .link-card[data-reveal], .js .bento__card[data-reveal] {
  transition-property: opacity, transform, filter, border-color, background-color, box-shadow;
  transition-duration: .9s, 1s, .9s, .4s, .4s, .4s;
}

/* tilt */
[data-tilt] { transform-style: preserve-3d; }
.js [data-tilt]:not([data-reveal]),
.js [data-tilt][data-reveal].is-in {
  transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
}
.js [data-tilt].is-tilting { transition: transform .12s linear, opacity .9s, filter .9s; transition-delay: 0s; }
[data-tilt]:not(.is-tilting) { transition: transform .8s var(--ease), opacity .9s var(--ease), filter .9s var(--ease); }

/* spotlight (bordure + halo qui suivent la souris) */
[data-spot] { position: relative; isolation: isolate; }
[data-spot]::before, [data-spot]::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  opacity: 0; transition: opacity .4s;
}
[data-spot]::before {
  z-index: -1;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(var(--g-rgb), .13), transparent 45%);
}
[data-spot]::after {
  z-index: 2; padding: 1px;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), var(--g), transparent 50%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
[data-spot]:hover::before, [data-spot]:hover::after { opacity: 1; }

/* tags */
.tags { display: flex; flex-wrap: wrap; gap: .45rem; }
.tags li {
  padding: .32rem .68rem; font-size: .72rem; letter-spacing: .02em;
  color: #c9ffe3; background: rgba(var(--g-rgb), .07);
  border: 1px solid rgba(var(--g-rgb), .22); border-radius: 4px;
  transition: background .25s, color .25s, transform .25s, box-shadow .25s;
}
.tags li:hover { background: var(--g); color: var(--dark); transform: translateY(-2px); box-shadow: 0 6px 20px -6px var(--g); }

.chip {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .25rem .6rem; font-size: .64rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); border: 1px solid var(--line-2); border-radius: 99px;
}
.chip--live { color: var(--g); }
.chip--live i { width: 6px; height: 6px; border-radius: 50%; background: var(--g); box-shadow: 0 0 8px var(--g); animation: pulse 1.6s infinite; }

.pulse { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--g); box-shadow: 0 0 10px var(--g); }
.pulse::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1px solid var(--g);
  animation: ripple 1.8s var(--ease) infinite;
}
@keyframes pulse { 50% { opacity: .35; } }
@keyframes ripple { from { transform: scale(.5); opacity: 1; } to { transform: scale(2.6); opacity: 0; } }

.caret {
  display: inline-block; width: .55em; height: 1.1em; margin-left: 2px; vertical-align: -0.18em;
  background: var(--g); box-shadow: 0 0 8px var(--g);
  animation: blink 1s steps(1) infinite;
}

/* boutons */
.btn {
  position: relative; display: inline-flex; align-items: center; gap: .7rem;
  padding: 1rem 1.6rem; font-weight: 600; font-size: .95rem;
  clip-path: var(--chamfer); overflow: hidden;
  transition: box-shadow .3s, filter .3s, color .3s, background .3s, translate .6s var(--ease);
}
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .4s var(--ease); }
.btn:hover svg { transform: translateX(4px); }
.btn--primary { background: var(--grad); color: var(--dark); }
.btn--primary::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .65), transparent);
  transform: skewX(-20deg); transition: left .8s var(--ease);
}
.btn--primary:hover::after { left: 130%; }
.btn--primary:hover { filter: drop-shadow(0 0 18px rgba(var(--g-rgb), .55)); }
.btn--ghost { color: var(--text); background: var(--line-2); }
.btn--ghost::before {
  content: ""; position: absolute; inset: 1px; z-index: -1; background: var(--bg);
  clip-path: var(--chamfer); transition: background .3s;
}
.btn--ghost { isolation: isolate; }
.btn--ghost:hover { color: var(--g); background: var(--g); }
.btn--ghost:hover::before { background: #071a10; }
.btn__label { position: relative; z-index: 1; }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 7.5rem var(--pad) 6rem;
}
.hero__hud { position: absolute; inset: 5.2rem calc(var(--pad) * .5) 1.4rem; pointer-events: none; font-size: .68rem; color: var(--muted); letter-spacing: .14em; }
.hud-corner { position: absolute; width: 22px; height: 22px; border-color: rgba(var(--g-rgb), .55); border-style: solid; border-width: 0; }
.hud-corner--tl { top: 0; left: 0; border-top-width: 1px; border-left-width: 1px; }
.hud-corner--tr { top: 0; right: 0; border-top-width: 1px; border-right-width: 1px; }
.hud-corner--bl { bottom: 0; left: 0; border-bottom-width: 1px; border-left-width: 1px; }
.hud-corner--br { bottom: 0; right: 0; border-bottom-width: 1px; border-right-width: 1px; }
.hero__coord { position: absolute; left: 2rem; bottom: .9rem; }
.hero__clock { position: absolute; right: 2rem; bottom: .9rem; color: var(--g); }

.hero__grid {
  width: 100%; max-width: var(--max); margin: 0 auto;
  display: grid; grid-template-columns: 1.3fr .8fr; gap: clamp(2rem, 5vw, 5rem); align-items: center;
}
.hero__tag {
  display: inline-flex; align-items: center; gap: .8rem;
  padding: .5rem 1rem; margin-bottom: 1.8rem;
  font-size: .7rem; letter-spacing: .2em; color: var(--g);
  border: 1px solid var(--line-2); border-radius: 99px; background: rgba(var(--g-rgb), .05);
}
.hero__title {
  font-family: var(--f-display); font-weight: 900; text-transform: uppercase;
  font-size: clamp(2.5rem, 7.4vw, 7.8rem); line-height: .95; letter-spacing: -.03em;
  margin-bottom: 1.8rem;
}
.hero__line { position: relative; display: block; width: max-content; perspective: 600px; }
.hero__line--outline .char { color: var(--hollow); -webkit-text-stroke: 4px var(--g); paint-order: stroke fill; }
.char { display: inline-block; will-change: transform; }
.js .char { opacity: 0; }
.is-ready .char { animation: charIn 1s var(--ease) both; animation-delay: calc(var(--i) * 50ms); }
.is-ready .hero__line--outline .char {
  animation: charIn 1s var(--ease) both, charFill 5s ease-in-out infinite;
  animation-delay: calc(var(--i) * 50ms + .25s), calc(var(--i) * 110ms + 2.4s);
}
.hero__line:first-child .char { text-shadow: 0 0 40px rgba(var(--g-rgb), .25); }
@keyframes charIn {
  from { opacity: 0; transform: translateY(80%) rotateX(-90deg) scale(.8); filter: blur(8px); }
  to { opacity: 1; transform: none; filter: none; }
}
@keyframes charFill {
  0%, 40%, 100% { color: var(--hollow); text-shadow: none; }
  15%, 25% { color: var(--g); text-shadow: 0 0 30px rgba(var(--g-rgb), .7); }
}

/* glitch */
.glitch::before, .glitch::after {
  content: attr(data-text); position: absolute; inset: 0;
  pointer-events: none; opacity: 0; -webkit-text-stroke: 0;
}
.glitch::before { color: var(--lime); animation: glitchA 4.5s steps(1) infinite 3s; }
.glitch::after { color: var(--g-2); animation: glitchB 4.5s steps(1) infinite 3s; }
.glitch:hover::before { animation-duration: .9s; animation-delay: 0s; }
.glitch:hover::after { animation-duration: .9s; animation-delay: 0s; }
@keyframes glitchA {
  0%, 86%, 100% { opacity: 0; transform: none; clip-path: inset(0 0 100% 0); }
  87% { opacity: .9; transform: translate(-6px, 2px); clip-path: inset(12% 0 62% 0); }
  89% { opacity: .9; transform: translate(5px, -1px); clip-path: inset(58% 0 18% 0); }
  91% { opacity: .9; transform: translate(-3px, 0); clip-path: inset(32% 0 40% 0); }
  93% { opacity: 0; }
}
@keyframes glitchB {
  0%, 87%, 100% { opacity: 0; transform: none; clip-path: inset(0 0 100% 0); }
  88% { opacity: .85; transform: translate(6px, -2px); clip-path: inset(70% 0 6% 0); }
  90% { opacity: .85; transform: translate(-5px, 1px); clip-path: inset(4% 0 78% 0); }
  92% { opacity: .85; transform: translate(4px, 0); clip-path: inset(44% 0 30% 0); }
  94% { opacity: 0; }
}

.hero__role { font-size: clamp(.85rem, 1.6vw, 1.05rem); color: var(--text); margin-bottom: 1.4rem; min-height: 1.7em; }
.hero__prompt { color: var(--g); margin-right: .6rem; }
.hero__lead { max-width: 54ch; color: var(--muted); font-size: clamp(1rem, 1.4vw, 1.15rem); margin-bottom: 2.4rem; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 1rem; }

.js .intro {
  opacity: 0; transform: translateY(30px); filter: blur(10px);
  transition: opacity 1s var(--ease), transform 1.2s var(--ease), filter 1s var(--ease);
  transition-delay: calc(var(--d, 0) * 90ms + .2s);
}
.is-ready .intro { opacity: 1; transform: none; filter: none; }

/* holo portrait */
.hero__visual { display: flex; justify-content: center; }
.holo { position: relative; width: min(100%, 470px); aspect-ratio: 1; }
.holo__aura {
  position: absolute; inset: 4%; border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--g-rgb), .35), rgba(43, 245, 196, .08) 50%, transparent 70%);
  filter: blur(30px); animation: aura 5s ease-in-out infinite;
}
@keyframes aura { 50% { transform: scale(1.12); opacity: .7; } }
.holo__orbits { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.holo__orbits circle { fill: none; stroke: var(--g); transform-origin: 50% 50%; }
.holo__orbits .o1 { stroke-opacity: .5; stroke-width: 1; stroke-dasharray: 2 10; animation: spin 40s linear infinite; }
.holo__orbits .o2 { stroke-opacity: .35; stroke-width: 1.5; stroke-dasharray: 120 40 10 40; animation: spin 18s linear infinite reverse; }
.holo__orbits .o3 { stroke-opacity: .18; stroke-width: 1; }
.holo__orbits .o4 { transform-origin: 50% 50%; animation: spin 9s linear infinite; }
.holo__orbits .o4 circle { fill: var(--g); stroke: none; filter: drop-shadow(0 0 6px var(--g)); }
@keyframes spin { to { transform: rotate(360deg); } }

.holo__frame {
  position: absolute; inset: 16%;
  padding: 2px; background: var(--grad);
  clip-path: polygon(18% 0, 100% 0, 100% 82%, 82% 100%, 0 100%, 0 18%);
  transform: translateZ(30px);
  box-shadow: 0 0 60px rgba(var(--g-rgb), .3);
}
.holo__frame picture, .holo__frame img,
.holo__glitch, .holo__tint, .holo__lines {
  clip-path: polygon(18% 0, 100% 0, 100% 82%, 82% 100%, 0 100%, 0 18%);
}
.holo__frame picture { display: block; width: 100%; height: 100%; }
.holo__frame img {
  width: 100%; height: 100%; object-fit: cover;
  filter: saturate(.75) contrast(1.08) brightness(.95);
  transition: filter .6s var(--ease), transform .8s var(--ease);
}
.holo__frame::after {
  content: ""; position: absolute; inset: 2px; pointer-events: none;
  clip-path: polygon(18% 0, 100% 0, 100% 82%, 82% 100%, 0 100%, 0 18%);
  background: linear-gradient(to top, rgba(4, 10, 7, .75), transparent 45%);
}
.holo__glitch, .holo__tint, .holo__lines, .holo__scan { position: absolute; inset: 2px; pointer-events: none; }
.holo__tint {
  background: linear-gradient(160deg, rgba(var(--g-rgb), .55), rgba(4, 10, 7, .1) 50%, rgba(43, 245, 196, .5));
  mix-blend-mode: color; opacity: .55; transition: opacity .6s var(--ease);
}
.holo__lines {
  background: repeating-linear-gradient(to bottom, rgba(var(--g-rgb), .12) 0 1px, transparent 1px 4px);
  mix-blend-mode: screen; transition: opacity .6s;
}
.holo__scan { overflow: hidden; }
.holo__scan::before {
  content: ""; position: absolute; left: 0; right: 0; height: 26%; top: -30%;
  background: linear-gradient(to bottom, transparent, rgba(var(--g-rgb), .32) 90%, rgba(220, 255, 238, .9) 100%);
  mix-blend-mode: screen;
  animation: scan 3.6s cubic-bezier(.6, 0, .4, 1) infinite;
}
@keyframes scan { to { top: 104%; } }
.holo__glitch {
  background: url("../assets/img/mehdi.webp") center / cover;
  opacity: 0; mix-blend-mode: screen;
  animation: imgGlitch 5.5s steps(1) infinite 2s;
}
.holo__glitch--2 { filter: hue-rotate(60deg) saturate(3); animation-delay: 2.15s; }
@keyframes imgGlitch {
  0%, 90%, 100% { opacity: 0; transform: none; }
  91% { opacity: .85; transform: translate(-8px, 0); clip-path: inset(18% 0 60% 0); }
  92.5% { opacity: .85; transform: translate(10px, 0); clip-path: inset(55% 0 25% 0); }
  94% { opacity: .85; transform: translate(-4px, 0); clip-path: inset(75% 0 8% 0); }
  95.5% { opacity: 0; }
}
.holo:hover .holo__tint { opacity: 0; }
.holo:hover .holo__lines { opacity: .4; }
.holo:hover img { filter: none; transform: scale(1.04); }

.holo__label {
  position: absolute; z-index: 3;
  padding: .32rem .6rem; font-size: .62rem; letter-spacing: .14em; color: var(--g);
  background: rgba(4, 10, 7, .75); border: 1px solid var(--line-2);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transform: translateZ(60px);
  white-space: nowrap;
}
.holo__label--tl { top: 10%; left: 0; }
.holo__label--tr { top: 10%; right: 0; display: flex; align-items: center; gap: .4rem; }
.holo__label--tr i { width: 6px; height: 6px; border-radius: 50%; background: var(--g); box-shadow: 0 0 8px var(--g); animation: pulse 1.4s infinite; }
.holo__label--bl { bottom: 9%; left: -2%; }
.holo__label--br { bottom: 9%; right: 2%; color: var(--lime); }

.hero__scroll {
  position: absolute; left: 50%; bottom: 2rem; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: .6rem;
  font-size: .62rem; letter-spacing: .35em; color: var(--muted);
}
.hero__scroll i { position: relative; width: 1px; height: 54px; background: rgba(var(--g-rgb), .2); overflow: hidden; }
.hero__scroll i::after {
  content: ""; position: absolute; left: 0; top: -40%; width: 100%; height: 40%;
  background: var(--g); box-shadow: 0 0 8px var(--g);
  animation: drop 1.8s var(--ease-2) infinite;
}
@keyframes drop { to { top: 100%; } }

/* =========================================================
   MARQUEE
   ========================================================= */
.marquee { position: relative; padding: 3.5rem 0; overflow: hidden; z-index: 2; }
.marquee__row { display: flex; white-space: nowrap; overflow: hidden; padding: .9rem 0; }
.marquee__inner { display: flex; flex-shrink: 0; align-items: center; gap: 2rem; padding-right: 2rem; will-change: transform; }
.marquee__inner span { font-family: var(--f-display); font-weight: 800; font-size: clamp(1.3rem, 3vw, 2.5rem); letter-spacing: -.01em; }
.marquee__inner b { font-size: clamp(.9rem, 1.6vw, 1.4rem); font-weight: 400; }
.marquee__row--a {
  background: var(--grad); color: var(--dark);
  transform: rotate(-2.2deg) scale(1.06);
  box-shadow: 0 0 60px rgba(var(--g-rgb), .3);
  position: relative; z-index: 2;
}
.marquee__row--b {
  background: rgba(4, 10, 7, .88); border-block: 1px solid var(--line-2);
  transform: rotate(1.8deg) scale(1.06); margin-top: -1.2rem;
}
.marquee__row--b span { color: #040a07; -webkit-text-stroke: 2px var(--g); paint-order: stroke fill; }
.marquee__row--b b { color: var(--g); }

/* =========================================================
   ABOUT
   ========================================================= */
.about__statement {
  font-family: var(--f-display); font-weight: 600;
  font-size: clamp(1.35rem, 3.3vw, 2.9rem); line-height: 1.3; letter-spacing: -.015em;
  max-width: 40ch;
}
.about__statement .w { opacity: .14; transition: opacity .5s, color .5s, text-shadow .5s; }
.about__statement .w.on { opacity: 1; }
.about__statement .w.hl.on {
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 18px rgba(var(--g-rgb), .35));
}
.about__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 5rem); margin-top: clamp(3rem, 7vw, 6rem); align-items: start; }
.about__text p { color: var(--muted); font-size: 1.08rem; line-height: 1.8; }
.about__text p + p { margin-top: 1.2rem; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.stat {
  position: relative; padding: 1.8rem 1.6rem;
  background: var(--surface); border: 1px solid var(--line);
  clip-path: var(--chamfer);
  transition: border-color .4s, background .4s;
}
.stat::before, .stat::after {
  content: ""; position: absolute; width: 14px; height: 14px; border: solid var(--g); opacity: .7;
  transition: width .5s var(--ease), height .5s var(--ease);
}
.stat::before { top: 8px; right: 8px; border-width: 1px 1px 0 0; }
.stat::after { bottom: 8px; left: 8px; border-width: 0 0 1px 1px; }
.stat:hover { background: var(--surface-2); border-color: var(--line-2); }
.stat:hover::before, .stat:hover::after { width: 34px; height: 34px; }
.stat__num {
  display: flex; align-items: flex-start;
  font-family: var(--f-display); font-weight: 900; font-size: clamp(2.6rem, 5vw, 4rem); line-height: 1;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat__num em { font-style: normal; font-size: .5em; margin-left: .1em; }
.stat__label { display: block; margin-top: .7rem; font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

/* =========================================================
   PARCOURS / TIMELINE
   ========================================================= */
.parcours__grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.timeline { position: relative; padding-left: 3rem; }
.timeline__heading {
  display: flex; align-items: center; gap: .7rem; margin: 0 0 2rem -3rem;
  font-size: .8rem; font-weight: 600; letter-spacing: .25em; text-transform: uppercase; color: var(--g);
}
.timeline__heading svg { width: 22px; height: 22px; fill: none; stroke: var(--g); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.timeline__track { position: absolute; left: .6rem; top: 3.6rem; bottom: 1rem; width: 2px; background: rgba(var(--g-rgb), .12); }
.timeline__fill {
  position: absolute; inset: 0; background: linear-gradient(var(--lime), var(--g), var(--g-2));
  transform-origin: top; transform: scaleY(var(--fill, 0));
  box-shadow: 0 0 12px var(--g);
}
.tl-item { position: relative; margin-bottom: 1.6rem; }
.tl-item__node {
  position: absolute; top: 2rem; left: calc(-3rem + .6rem + 1px - 8px);
  width: 16px; height: 16px; transform: rotate(45deg);
  background: var(--bg); border: 2px solid rgba(var(--g-rgb), .4);
  transition: background .4s, border-color .4s, box-shadow .4s;
  z-index: 1;
}
.tl-item.is-active .tl-item__node { background: var(--g); border-color: var(--g); box-shadow: 0 0 18px var(--g); }
.tl-card {
  padding: clamp(1.4rem, 3vw, 2rem); border-radius: 6px;
  background: var(--surface); border: 1px solid var(--line);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  overflow: hidden;
}
.tl-card__top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: .9rem; }
.tl-card__date { color: var(--g); font-size: .8rem; letter-spacing: .08em; }
.tl-card__title { font-family: var(--f-display); font-weight: 600; font-size: clamp(1.05rem, 2vw, 1.35rem); line-height: 1.3; }
.tl-card__place { color: var(--muted); margin-top: .3rem; }
.tl-card__list { margin-top: 1.1rem; display: grid; gap: .5rem; }
.tl-card__list li { position: relative; padding-left: 1.4rem; color: #bcd9ca; font-size: .96rem; }
.tl-card__list li::before { content: "▹"; position: absolute; left: 0; color: var(--g); }
.tl-card--xp { padding-right: clamp(1.4rem, 3vw, 2rem); }
.gear {
  position: absolute; right: -28px; top: -28px; width: 130px; height: 130px; z-index: -1;
  fill: none; stroke: var(--g); stroke-width: 1.2; opacity: .18;
  animation: spin 16s linear infinite;
}
.gear--small { right: 72px; top: 52px; width: 64px; height: 64px; animation-duration: 8s; animation-direction: reverse; opacity: .14; }

/* =========================================================
   PROJETS — scroll horizontal
   ========================================================= */
.projects { position: relative; z-index: 2; }
.projects__pin {
  position: sticky; top: 0; height: 100vh; height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  overflow: hidden; padding: 5.5rem 0 2.5rem;
}
.projects__head { max-width: var(--max); width: 100%; margin: 0 auto clamp(1.5rem, 4vh, 3rem); padding: 0 var(--pad); }
.projects__counter { margin-left: auto; font-size: .85rem; color: var(--muted); letter-spacing: .1em; }
.projects__counter b { color: var(--g); font-weight: 600; }
.projects__track {
  display: flex; gap: clamp(1rem, 2.5vw, 2rem); width: max-content;
  padding: 1rem max(var(--pad), calc((100vw - var(--max)) / 2 + var(--pad)));
  will-change: transform;
}
.pcard {
  width: min(80vw, 500px); flex-shrink: 0;
  display: flex; flex-direction: column;
  background: linear-gradient(160deg, rgba(14, 36, 25, .85), rgba(5, 13, 9, .9));
  border: 1px solid var(--line); border-radius: 10px;
  overflow: hidden;
}
.pcard:hover { border-color: var(--line-2); box-shadow: 0 30px 80px -30px rgba(var(--g-rgb), .35); }
.pcard__visual {
  position: relative; height: clamp(180px, 30vh, 250px);
  display: grid; place-items: center; overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 50% 60%, rgba(var(--g-rgb), .16), transparent 60%),
    linear-gradient(rgba(var(--g-rgb), .07) 1px, transparent 1px) 0 0 / 26px 26px,
    linear-gradient(90deg, rgba(var(--g-rgb), .07) 1px, transparent 1px) 0 0 / 26px 26px,
    #050e09;
}
.pcard__body { padding: clamp(1.3rem, 2.5vw, 1.8rem); display: flex; flex-direction: column; gap: .8rem; flex: 1; }
.pcard__meta { display: flex; justify-content: space-between; font-size: .72rem; color: var(--muted); letter-spacing: .06em; }
.pcard__meta span:first-child { color: var(--g); font-weight: 600; }
.pcard__title { font-family: var(--f-display); font-weight: 800; font-size: clamp(1.2rem, 2.2vw, 1.6rem); line-height: 1.2; }
.pcard__desc { color: var(--muted); font-size: .98rem; flex: 1; }
.projects__bar { max-width: var(--max); width: calc(100% - var(--pad) * 2); margin: clamp(1.2rem, 4vh, 2.5rem) auto 0; height: 2px; background: rgba(var(--g-rgb), .12); }
.projects__bar span { display: block; height: 100%; background: var(--grad); transform-origin: left; transform: scaleX(0); box-shadow: 0 0 10px var(--g); }

/* visuel : dés */
.dice { display: flex; gap: 2.6rem; perspective: 700px; animation: float 4s ease-in-out infinite; }
.die { --s: 64px; width: var(--s); height: var(--s); position: relative; transform-style: preserve-3d; animation: roll 7s cubic-bezier(.6, .05, .3, 1) infinite; }
.die--b { animation-delay: -3.5s; animation-direction: reverse; }
.face {
  position: absolute; inset: 0; padding: 9px;
  display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr);
  grid-template-areas: "a . c" "e g f" "d . b";
  background: rgba(6, 22, 14, .92); border: 1.5px solid var(--g); border-radius: 12px;
  box-shadow: inset 0 0 18px rgba(var(--g-rgb), .3), 0 0 14px rgba(var(--g-rgb), .2);
}
.face i { width: 10px; height: 10px; place-self: center; border-radius: 50%; background: var(--g); box-shadow: 0 0 8px var(--g); }
.f1 { transform: translateZ(32px); }
.f6 { transform: rotateY(180deg) translateZ(32px); }
.f2 { transform: rotateY(90deg) translateZ(32px); }
.f5 { transform: rotateY(-90deg) translateZ(32px); }
.f3 { transform: rotateX(90deg) translateZ(32px); }
.f4 { transform: rotateX(-90deg) translateZ(32px); }
.f1 i { grid-area: g; }
.f2 i:nth-child(1) { grid-area: a; } .f2 i:nth-child(2) { grid-area: b; }
.f3 i:nth-child(1) { grid-area: a; } .f3 i:nth-child(2) { grid-area: g; } .f3 i:nth-child(3) { grid-area: b; }
.f4 i:nth-child(1) { grid-area: a; } .f4 i:nth-child(2) { grid-area: c; } .f4 i:nth-child(3) { grid-area: d; } .f4 i:nth-child(4) { grid-area: b; }
.f5 i:nth-child(1) { grid-area: a; } .f5 i:nth-child(2) { grid-area: c; } .f5 i:nth-child(3) { grid-area: g; } .f5 i:nth-child(4) { grid-area: d; } .f5 i:nth-child(5) { grid-area: b; }
.f6 i:nth-child(1) { grid-area: a; } .f6 i:nth-child(2) { grid-area: c; } .f6 i:nth-child(3) { grid-area: e; } .f6 i:nth-child(4) { grid-area: f; } .f6 i:nth-child(5) { grid-area: d; } .f6 i:nth-child(6) { grid-area: b; }
@keyframes roll {
  0% { transform: rotateX(-20deg) rotateY(30deg); }
  25% { transform: rotateX(250deg) rotateY(160deg) rotateZ(40deg); }
  35%, 45% { transform: rotateX(270deg) rotateY(180deg) rotateZ(0deg); }
  70% { transform: rotateX(520deg) rotateY(330deg) rotateZ(-30deg); }
  80%, 100% { transform: rotateX(700deg) rotateY(390deg) rotateZ(0deg); }
}
@keyframes float { 50% { transform: translateY(-10px); } }
.pcard__score { position: absolute; right: 1rem; bottom: .8rem; font-size: .68rem; letter-spacing: .14em; color: var(--muted); }
.pcard__score b { color: var(--lime); animation: blink 1.2s steps(1) infinite; }

/* visuel : d20 */
.pcard__visual--d20 { perspective: 800px; }
.d20 { width: 140px; height: 140px; overflow: visible; animation: d20 9s ease-in-out infinite; filter: drop-shadow(0 0 16px rgba(var(--g-rgb), .45)); }
.d20 polygon, .d20 path { fill: none; stroke: var(--g); stroke-width: 2; stroke-linejoin: round; }
.d20__outer { fill: rgba(var(--g-rgb), .06) !important; }
.d20__inner { fill: rgba(var(--g-rgb), .14) !important; }
.d20__edges { stroke-opacity: .6; }
.d20 text { font-family: var(--f-display); font-weight: 900; font-size: 30px; fill: var(--lime); }
@keyframes d20 {
  0%, 100% { transform: rotateY(0) rotateZ(0) translateY(0); }
  30% { transform: rotateY(180deg) rotateZ(20deg) translateY(-8px); }
  60% { transform: rotateY(360deg) rotateZ(-10deg) translateY(4px); }
}
.hpbar { position: absolute; left: 1rem; bottom: .9rem; display: flex; align-items: center; gap: .6rem; font-size: .68rem; color: var(--muted); }
.hpbar i { width: 120px; height: 6px; border: 1px solid var(--line-2); border-radius: 3px; overflow: hidden; }
.hpbar b { display: block; height: 100%; background: var(--grad); animation: hp 6s ease-in-out infinite; }
@keyframes hp { 0%, 100% { width: 100%; } 30% { width: 38%; } 45% { width: 38%; } 70% { width: 82%; } }

/* visuel : appli */
.win { width: 78%; height: 74%; display: flex; flex-direction: column; border: 1px solid var(--line-2); border-radius: 8px; background: rgba(5, 16, 10, .92); overflow: hidden; box-shadow: 0 20px 50px -20px rgba(var(--g-rgb), .4); animation: float 5s ease-in-out infinite; }
.win__bar { display: flex; align-items: center; gap: 5px; padding: 7px 10px; border-bottom: 1px solid var(--line); }
.win__bar i { width: 8px; height: 8px; border-radius: 50%; background: rgba(var(--g-rgb), .5); }
.win__bar i:first-child { background: var(--lime); }
.win__bar span { margin-left: auto; font-size: .6rem; color: var(--muted); }
.win__body { flex: 1; display: grid; grid-template-columns: 24% 1fr; }
.win__side { border-right: 1px solid var(--line); padding: 10px 8px; display: grid; gap: 8px; align-content: start; }
.win__side span { height: 7px; border-radius: 3px; background: rgba(var(--g-rgb), .18); }
.win__side span:first-child { background: var(--g); box-shadow: 0 0 8px var(--g); }
.win__main { padding: 10px; display: grid; grid-template-rows: 1fr auto; gap: 8px; }
.win__chart { display: flex; align-items: flex-end; gap: 6px; border-bottom: 1px solid var(--line); padding-bottom: 4px; }
.win__chart b { flex: 1; background: linear-gradient(to top, rgba(var(--g-rgb), .3), var(--g)); border-radius: 2px 2px 0 0; animation: bar 3.2s ease-in-out infinite; }
.win__chart b:nth-child(1) { --h: 40%; animation-delay: -.2s; }
.win__chart b:nth-child(2) { --h: 70%; animation-delay: -.6s; }
.win__chart b:nth-child(3) { --h: 55%; animation-delay: -1s; }
.win__chart b:nth-child(4) { --h: 90%; animation-delay: -1.4s; }
.win__chart b:nth-child(5) { --h: 62%; animation-delay: -1.8s; }
.win__chart b:nth-child(6) { --h: 80%; animation-delay: -2.2s; }
.win__chart b:nth-child(7) { --h: 48%; animation-delay: -2.6s; }
@keyframes bar { 0%, 100% { height: var(--h); } 50% { height: calc(var(--h) * .45); } }
.win__rows { display: grid; gap: 5px; }
.win__rows span { height: 6px; border-radius: 3px; background: linear-gradient(90deg, rgba(var(--g-rgb), .1), rgba(var(--g-rgb), .4), rgba(var(--g-rgb), .1)); background-size: 200% 100%; animation: shimmer 2.4s linear infinite; }
.win__rows span:nth-child(2) { width: 80%; animation-delay: -.8s; }
.win__rows span:nth-child(3) { width: 60%; animation-delay: -1.6s; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* visuel : rack proxmox */
.pcard__visual--rack { align-content: center; gap: .8rem; }
.rack { width: 74%; display: grid; gap: 7px; }
.rack__unit {
  display: flex; align-items: center; gap: 7px; padding: 9px 11px;
  border: 1px solid var(--line-2); border-radius: 5px; background: rgba(5, 16, 10, .92);
  font-size: .68rem; color: #bfffe0;
}
.rack__unit i { width: 7px; height: 7px; border-radius: 50%; background: var(--g); box-shadow: 0 0 8px var(--g); animation: led 1.3s steps(2) infinite; }
.rack__unit i:nth-child(2) { background: var(--lime); animation-duration: .7s; }
.rack__unit:nth-child(2) i { animation-delay: -.4s; }
.rack__unit:nth-child(3) i { animation-delay: -.9s; }
.rack__unit em { margin-left: auto; width: 46px; height: 5px; border-radius: 3px; background: linear-gradient(90deg, transparent, var(--g), transparent); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes led { 50% { opacity: .25; } }
.rack__term { font-size: .7rem; color: var(--text); }
.rack__term span { color: var(--g); }

/* =========================================================
   COMPETENCES
   ========================================================= */
.skills__grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.sphere-wrap { position: relative; width: 100%; max-width: 540px; aspect-ratio: 1; margin: 0 auto; }
.sphere-wrap::before {
  content: ""; position: absolute; inset: 8%; border-radius: 50%;
  border: 1px dashed rgba(var(--g-rgb), .2);
  background: radial-gradient(circle, rgba(var(--g-rgb), .14), transparent 65%);
  animation: spin 60s linear infinite;
}
.sphere-wrap::after {
  content: ""; position: absolute; inset: 22%; border-radius: 50%;
  border: 1px solid rgba(var(--g-rgb), .1);
  box-shadow: inset 0 0 60px rgba(var(--g-rgb), .08);
}
.sphere { position: absolute; inset: 0; }
.sphere span {
  position: absolute; left: 50%; top: 50%;
  font-family: var(--f-mono); font-weight: 600; font-size: clamp(.78rem, 1.5vw, 1.02rem);
  color: var(--g); white-space: nowrap; will-change: transform, opacity;
  text-shadow: 0 0 12px rgba(var(--g-rgb), .5);
  transition: color .2s;
}
.sphere span.is-big { font-family: var(--f-display); font-weight: 800; font-size: clamp(.95rem, 2vw, 1.4rem); color: var(--text); }
.sphere span:hover { color: var(--lime); }
.sphere-wrap__hint { position: absolute; left: 0; right: 0; bottom: -1.5rem; text-align: center; font-size: .68rem; color: var(--muted); letter-spacing: .12em; }

.bento { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.bento__card {
  position: relative; padding: 1.5rem; border-radius: 8px;
  background: var(--surface); border: 1px solid var(--line);
  overflow: hidden;
  transition-property: opacity, transform, filter, border-color, background;
}
.bento__card:hover { background: var(--surface-2); }
.bento__card--wide { grid-column: span 2; }
.bento__card h3 { font-family: var(--f-display); font-weight: 600; font-size: 1rem; margin-bottom: 1rem; letter-spacing: -.01em; }
.bento__icon { position: absolute; right: 1.2rem; top: 1rem; font-size: 1.4rem; font-weight: 600; color: rgba(var(--g-rgb), .22); transition: color .4s, transform .6s var(--ease); }
.bento__card:hover .bento__icon { color: var(--g); transform: scale(1.15) rotate(-6deg); text-shadow: 0 0 14px var(--g); }

/* =========================================================
   CERTIFICATIONS
   ========================================================= */
.certs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
.cert {
  position: relative; display: flex; flex-direction: column;
  min-height: 300px; padding: 1.5rem; border-radius: 12px;
  background: linear-gradient(150deg, rgba(16, 40, 28, .92), rgba(5, 13, 9, .95));
  border: 1px solid var(--line);
  overflow: hidden;
}
.cert::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(var(--g-rgb), .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--g-rgb), .05) 1px, transparent 1px);
  background-size: 20px 20px;
  mask-image: linear-gradient(to bottom, #000, transparent 70%);
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 70%);
}
.cert__shine {
  position: absolute; inset: -1px; pointer-events: none; z-index: 3; border-radius: inherit;
  background: linear-gradient(115deg, transparent 25%, rgba(196, 255, 107, .28) 42%, rgba(43, 245, 196, .32) 50%, rgba(77, 255, 166, .25) 58%, transparent 75%);
  background-size: 250% 250%;
  background-position: var(--sx, 100%) var(--sy, 0%);
  mix-blend-mode: screen; opacity: 0; transition: opacity .4s;
}
.cert:hover .cert__shine { opacity: 1; }
.cert:hover { border-color: var(--line-2); box-shadow: 0 30px 60px -25px rgba(var(--g-rgb), .4); }
.cert__top { position: relative; display: flex; justify-content: space-between; gap: .5rem; font-size: .66rem; letter-spacing: .08em; color: var(--muted); text-transform: uppercase; }
.cert__top span:last-child { color: var(--g); }
.cert__badge { position: relative; width: 92px; height: 92px; margin: 2rem 0 1.6rem; display: grid; place-items: center; transform: translateZ(40px); }
.cert__badge svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.cert__badge polygon { fill: rgba(var(--g-rgb), .08); stroke: var(--g); stroke-width: 2; filter: drop-shadow(0 0 8px rgba(var(--g-rgb), .6)); }
.cert__badge span { position: relative; font-weight: 600; font-size: .85rem; color: var(--lime); letter-spacing: .04em; }
.cert:hover .cert__badge svg { animation: spin 6s linear infinite; }
.cert__title { position: relative; margin-top: auto; font-family: var(--f-display); font-weight: 600; font-size: clamp(.95rem, 1.3vw, 1.08rem); line-height: 1.35; transform: translateZ(30px); }
.cert__id { position: relative; margin-top: .9rem; font-size: .62rem; letter-spacing: .14em; color: rgba(var(--g-rgb), .55); }

.extras { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1.2rem; margin-top: clamp(3rem, 7vw, 5rem); }
.extras__title { font-size: .78rem; letter-spacing: .2em; text-transform: uppercase; color: var(--g); margin-bottom: 1.2rem; font-weight: 600; }
.langs, .hobby { padding: clamp(1.4rem, 3vw, 2rem); border-radius: 10px; background: var(--surface); border: 1px solid var(--line); }
.lang { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 1.2rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.lang:last-child { border-bottom: 0; }
.lang__name { font-family: var(--f-display); font-weight: 600; font-size: clamp(1rem, 2vw, 1.2rem); }
.lang__level { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.signal { display: inline-flex; align-items: flex-end; gap: 3px; height: 22px; }
.signal i { width: 6px; border-radius: 1px; background: rgba(var(--g-rgb), .15); transform-origin: bottom; }
.signal i:nth-child(1) { height: 30%; } .signal i:nth-child(2) { height: 45%; } .signal i:nth-child(3) { height: 62%; } .signal i:nth-child(4) { height: 80%; } .signal i:nth-child(5) { height: 100%; }
.signal[data-lvl="5"] i:nth-child(-n+5),
.signal[data-lvl="4"] i:nth-child(-n+4),
.signal[data-lvl="3"] i:nth-child(-n+3) { background: var(--g); box-shadow: 0 0 8px rgba(var(--g-rgb), .6); }
.js .langs .signal i { transform: scaleY(0); transition: transform .6s var(--ease); }
.js .langs.is-in .signal i { transform: none; }
.langs.is-in .signal i:nth-child(2) { transition-delay: .08s; }
.langs.is-in .signal i:nth-child(3) { transition-delay: .16s; }
.langs.is-in .signal i:nth-child(4) { transition-delay: .24s; }
.langs.is-in .signal i:nth-child(5) { transition-delay: .32s; }

.hobby { text-align: center; display: flex; flex-direction: column; align-items: center; overflow: hidden; }
.hobby .extras__title { align-self: flex-start; }
.hobby__ball { position: relative; width: 90px; height: 120px; margin: .5rem 0 1rem; }
.hobby__ball svg { width: 80px; height: 80px; margin: 0 auto; animation: bounce 1.4s cubic-bezier(.5, 0, .5, 1) infinite alternate; }
.hobby__ball circle, .hobby__ball path, .hobby__ball polygon { fill: none; stroke: var(--g); stroke-width: 2.5; stroke-linejoin: round; }
.hobby__ball polygon { fill: rgba(var(--g-rgb), .25); }
.hobby__shadow { position: absolute; left: 50%; bottom: 4px; width: 60px; height: 8px; margin-left: -30px; border-radius: 50%; background: rgba(var(--g-rgb), .35); filter: blur(4px); animation: shadow 1.4s cubic-bezier(.5, 0, .5, 1) infinite alternate; }
@keyframes bounce { from { transform: translateY(0) rotate(0); } to { transform: translateY(34px) rotate(200deg); } }
@keyframes shadow { from { transform: scale(.5); opacity: .4; } to { transform: scale(1); opacity: 1; } }
.hobby__name { font-family: var(--f-display); font-weight: 600; font-size: 1.15rem; }
.hobby__sub { font-size: .7rem; color: var(--muted); margin-top: .4rem; letter-spacing: .06em; }

/* =========================================================
   CONTACT
   ========================================================= */
.contact__big { display: block; width: fit-content; margin-bottom: clamp(3rem, 6vw, 5rem); }
.contact__big-line {
  display: block; font-family: var(--f-display); font-weight: 900; text-transform: uppercase;
  font-size: clamp(2.2rem, 9vw, 8.5rem); line-height: 1; letter-spacing: -.035em;
}
.contact__big-line--outline {
  color: var(--hollow); -webkit-text-stroke: 4px var(--g); paint-order: stroke fill;
}
.js .contact__big-line--outline[data-reveal] { transition: opacity .9s var(--ease), transform 1s var(--ease), filter .9s var(--ease), color .6s var(--ease), text-shadow .6s; }
.contact__big-line--outline em { font-style: normal; display: inline-block; margin-left: .2em; -webkit-text-stroke: 0; color: var(--g); transition: transform .6s var(--ease); }
.contact__big:hover .contact__big-line--outline { color: var(--g); text-shadow: 0 0 40px rgba(var(--g-rgb), .45); }
.contact__big:hover em { transform: translateX(.2em) rotate(-45deg); }

.contact__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; align-items: start; }
.term { border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; background: rgba(2, 7, 4, .9); box-shadow: 0 0 0 1px rgba(0, 0, 0, .5), 0 30px 80px -30px rgba(var(--g-rgb), .35); }
.term__bar { display: flex; align-items: center; gap: 6px; padding: .7rem 1rem; border-bottom: 1px solid var(--line); background: rgba(var(--g-rgb), .04); }
.term__bar i { width: 10px; height: 10px; border-radius: 50%; background: rgba(var(--g-rgb), .25); }
.term__bar i:nth-child(1) { background: var(--lime); }
.term__bar i:nth-child(2) { background: var(--g); }
.term__bar span { margin-left: auto; font-size: .7rem; color: var(--muted); }
.term__body { padding: 1.3rem 1.4rem; min-height: 330px; font-size: clamp(.72rem, 1.2vw, .84rem); line-height: 1.75; color: #c9ffe3; white-space: pre-wrap; word-break: break-word; }
.term__body .p { color: var(--g); }
.term__body .k { color: var(--lime); }
.term__body .m { color: var(--muted); }

.links { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.link-card {
  display: flex; align-items: center; gap: .9rem; padding: 1rem 1.1rem;
  text-align: left; border-radius: 8px;
  background: var(--surface); border: 1px solid var(--line);
  transition-property: opacity, transform, filter, border-color, background, box-shadow;
}
.link-card:hover { border-color: var(--g); background: var(--surface-2); box-shadow: 0 12px 40px -16px rgba(var(--g-rgb), .6); }
.link-card__icon { flex-shrink: 0; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 8px; background: rgba(var(--g-rgb), .1); border: 1px solid var(--line-2); transition: background .3s, transform .5s var(--ease); }
.link-card__icon svg { width: 20px; height: 20px; fill: none; stroke: var(--g); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.link-card:hover .link-card__icon { background: var(--g); transform: rotate(-8deg) scale(1.06); }
.link-card:hover .link-card__icon svg { stroke: var(--dark); }
.link-card__text { min-width: 0; font-size: .92rem; font-weight: 500; overflow-wrap: anywhere; }
.link-card__text small { display: block; font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: .15rem; }
.link-card--copy { grid-column: span 2; }
.link-card--static:hover { border-color: var(--line-2); box-shadow: none; }
.link-card--accent { background: var(--grad); color: var(--dark); border-color: transparent; }
.link-card--accent .link-card__text small { color: rgba(3, 17, 10, .7); }
.link-card--accent .link-card__icon { background: rgba(3, 17, 10, .12); border-color: rgba(3, 17, 10, .2); }
.link-card--accent .link-card__icon svg { stroke: var(--dark); }
.link-card--accent:hover { background: var(--grad); filter: brightness(1.1); }

/* =========================================================
   FOOTER / TOAST
   ========================================================= */
.footer { overflow: hidden; padding-top: 2rem; }
.footer__big {
  font-family: var(--f-display); font-weight: 900; font-size: 17.5vw; line-height: .78;
  text-align: center; letter-spacing: -.04em; user-select: none;
  background: linear-gradient(to bottom, rgba(var(--g-rgb), .5), rgba(var(--g-rgb), 0) 85%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  transform: translateY(12%);
}
.footer__row {
  position: relative; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
  padding: 1.4rem var(--pad); font-size: .74rem; color: var(--muted); letter-spacing: .06em;
  border-top: 1px solid var(--line); background: rgba(4, 10, 7, .8);
}
.footer__row #footClock { color: var(--g); }
.footer__top { transition: color .3s; }
.footer__top:hover { color: var(--g); }

.toast {
  position: fixed; left: 50%; bottom: 2rem; z-index: 1200;
  padding: .8rem 1.3rem; font-size: .8rem; font-weight: 600;
  color: var(--dark); background: var(--grad); border-radius: 6px;
  box-shadow: 0 10px 40px -10px rgba(var(--g-rgb), .8);
  transform: translate(-50%, 150%); opacity: 0; visibility: hidden;
  transition: transform .6s var(--ease), opacity .4s, visibility .4s;
}
.toast.is-show { transform: translate(-50%, 0); opacity: 1; visibility: visible; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1150px) {
  .nav__links a { padding: .5rem .55rem; font-size: .84rem; }
  .nav__links a span { display: none; }
  .certs { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .nav__links { display: none; }
  .nav__burger { display: block; }
  .nav__cta { margin-left: auto; }
  .nav { gap: .8rem; }

  .hero { padding-top: 6.5rem; }
  .hero__grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero__visual { order: -1; }
  .holo { width: min(76vw, 340px); }
  .hero__title { font-size: clamp(2.3rem, 11.5vw, 5.5rem); }
  .hero__scroll { display: none; }

  .about__grid, .parcours__grid, .skills__grid, .extras, .contact__grid { grid-template-columns: 1fr; }
  .sphere-wrap { max-width: 400px; }

  .projects { height: auto !important; }
  .projects__pin { position: relative; height: auto; overflow: visible; padding: clamp(5rem, 11vw, 9rem) 0 0; }
  .projects__track { flex-direction: column; width: auto; transform: none !important; padding: 0 var(--pad); }
  .pcard { width: 100%; }
  .projects__bar, .projects__counter { display: none; }
}

@media (max-width: 600px) {
  .hero__hud { display: none; }
  .hero__tag { font-size: .6rem; letter-spacing: .14em; }
  .certs { grid-template-columns: 1fr; }
  .cert { min-height: 0; }
  .stats { gap: .7rem; }
  .stat { padding: 1.3rem 1.1rem; }
  .links { grid-template-columns: 1fr; }
  .link-card--copy { grid-column: auto; }
  .bento { grid-template-columns: 1fr; }
  .bento__card--wide { grid-column: auto; }
  .lang { grid-template-columns: 1fr auto; }
  .lang__level { grid-row: 2; grid-column: 1; }
  .lang .signal { grid-row: 1 / 3; grid-column: 2; }
  .footer__row { justify-content: center; text-align: center; }
  .dice { gap: 1.8rem; }
  .die { --s: 54px; }
  .f1 { transform: translateZ(27px); } .f6 { transform: rotateY(180deg) translateZ(27px); }
  .f2 { transform: rotateY(90deg) translateZ(27px); } .f5 { transform: rotateY(-90deg) translateZ(27px); }
  .f3 { transform: rotateX(90deg) translateZ(27px); } .f4 { transform: rotateX(-90deg) translateZ(27px); }
  .face i { width: 8px; height: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important; transition-delay: 0s !important;
  }
  .fx-noise, .fx-scan::after, .holo__scan, .holo__glitch, .glitch::before, .glitch::after { display: none; }
}
