:root {
  --bg: #05070d;
  --bg-2: #0a0f1c;
  --panel: rgba(14, 20, 36, 0.62);
  --panel-solid: #0d1322;
  --line: rgba(120, 200, 255, 0.14);
  --line-strong: rgba(120, 220, 255, 0.35);
  --text: #e6edf7;
  --muted: #8b98b0;
  --cyan: #22e6ff;
  --violet: #8b5cf6;
  --magenta: #ff3ea5;
  --green: #39ff9f;
  --grad: linear-gradient(110deg, var(--cyan), var(--violet) 55%, var(--magenta));
  --radius: 16px;
  --font: 'Space Grotesk', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text); font-family: var(--font);
  font-size: 17px; line-height: 1.65; overflow-x: hidden; -webkit-font-smoothing: antialiased;
}
body.is-booting, body.modal-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.mono { font-family: var(--mono); }
::selection { background: var(--cyan); color: var(--bg); }

/* ---------- Boot ---------- */
#boot {
  position: fixed; inset: 0; z-index: 100; background: var(--bg); display: grid; place-items: center;
  transition: opacity .6s var(--ease), visibility .6s;
}
#boot.done { opacity: 0; visibility: hidden; }
.boot-inner { width: min(560px, 90vw); }
#boot-log { font-family: var(--mono); font-size: 13px; color: var(--green); min-height: 9.5em; margin: 0 0 16px; white-space: pre-wrap; }
#boot-log .ok { color: var(--cyan); }
.boot-bar { height: 2px; background: var(--line); overflow: hidden; }
.boot-bar span { display: block; height: 100%; width: 0; background: var(--grad); box-shadow: 0 0 12px var(--cyan); transition: width .2s linear; }

/* ---------- Fond animé ---------- */
#fx-bg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.grid-overlay {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at 50% 30%, #000 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 0%, transparent 70%);
}
.scanlines {
  position: fixed; inset: 0; z-index: 90; pointer-events: none; opacity: .05;
  background: repeating-linear-gradient(0deg, #fff 0 1px, transparent 1px 3px);
}
#cursor-glow {
  position: fixed; width: 520px; height: 520px; left: 0; top: 0; z-index: 0; pointer-events: none; border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 230, 255, .10), rgba(139, 92, 246, .06) 40%, transparent 70%);
  transform: translate(-50%, -50%); transition: opacity .3s;
}
#progress { position: fixed; top: 0; left: 0; height: 2px; width: 0; z-index: 60; background: var(--grad); box-shadow: 0 0 10px var(--cyan); }
main, .footer { position: relative; z-index: 1; }

/* ---------- Navigation ---------- */
.nav {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 50;
  width: min(1180px, calc(100% - 32px)); display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px 10px 20px; border: 1px solid var(--line); border-radius: 999px;
  background: rgba(8, 12, 22, .55); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4);
  transition: border-color .3s, background .3s;
}
.nav.scrolled { border-color: var(--line-strong); background: rgba(8, 12, 22, .8); }
.nav-logo { font-family: var(--mono); font-weight: 700; letter-spacing: .04em; font-size: 18px; }
.nav-logo .bracket { color: var(--cyan); }
.nav-links { display: flex; gap: 4px; }
.nav-links a { position: relative; padding: 8px 14px; border-radius: 999px; font-size: 15px; color: var(--muted); transition: color .2s, background .2s; }
.nav-links a:hover, .nav-links a.active { color: var(--text); background: rgba(34, 230, 255, .08); }
.nav-links a.nav-cv { color: var(--cyan); border: 1px solid var(--line-strong); }
.nav-links a.nav-cv:hover { background: rgba(34, 230, 255, .12); }
[hidden] { display: none !important; }
.nav-links a.active::after { content: ''; position: absolute; left: 50%; bottom: 3px; width: 4px; height: 4px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); transform: translateX(-50%); }
.nav-right { display: flex; align-items: center; gap: 10px; }
.lang { display: flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.lang button { font-family: var(--mono); font-size: 12px; padding: 4px 10px; border-radius: 999px; color: var(--muted); }
.lang button.active { background: var(--cyan); color: var(--bg); font-weight: 700; }
.burger { display: none; width: 38px; height: 38px; position: relative; }
.burger span { position: absolute; left: 10px; right: 10px; height: 2px; background: var(--text); transition: transform .3s var(--ease); }
.burger span:first-child { top: 14px; } .burger span:last-child { top: 22px; }
.nav.open .burger span:first-child { transform: translateY(4px) rotate(45deg); }
.nav.open .burger span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* ---------- Boutons ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; gap: 10px; padding: 14px 26px; border-radius: 999px;
  font-weight: 600; letter-spacing: .01em; transition: transform .25s var(--ease), box-shadow .25s, background .25s, border-color .25s;
  overflow: hidden; isolation: isolate;
}
.btn-primary { background: var(--grad); color: #05070d; box-shadow: 0 0 0 1px rgba(255,255,255,.1) inset, 0 10px 40px -10px rgba(34, 230, 255, .6); }
.btn-primary::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.6) 50%, transparent 70%); transform: translateX(-120%); transition: transform .7s var(--ease); }
.btn-primary:hover::before { transform: translateX(120%); }
.btn-primary:hover { box-shadow: 0 0 0 1px rgba(255,255,255,.2) inset, 0 14px 50px -8px rgba(139, 92, 246, .8); }
.btn-ghost { border: 1px solid var(--line-strong); background: rgba(34, 230, 255, .04); }
.btn-ghost:hover { border-color: var(--cyan); background: rgba(34, 230, 255, .1); box-shadow: 0 0 24px -6px var(--cyan); }
.btn-sm { padding: 8px 16px; font-size: 14px; }
.btn .arrow { font-style: normal; transition: transform .25s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100svh; display: grid; place-items: center; padding: 120px 24px 80px; overflow: hidden; }
.hero-content { position: relative; z-index: 2; text-align: center; max-width: 900px; }
.hero-hello { color: var(--cyan); font-size: 15px; letter-spacing: .3em; text-transform: uppercase; margin: 0 0 10px; }
.hero-name {
  margin: 0; font-size: clamp(48px, 11vw, 140px); line-height: .95; font-weight: 700; letter-spacing: -.02em;
  background: linear-gradient(180deg, #fff 30%, #9fb4d6); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 30px rgba(34, 230, 255, .25));
}
.hero-role { font-size: clamp(16px, 2.4vw, 22px); margin: 22px 0 10px; color: var(--text); min-height: 1.6em; }
.hero-role .prompt { color: var(--magenta); }
.caret { color: var(--cyan); animation: blink 1s steps(1) infinite; }
.hero-tagline { color: var(--muted); font-size: clamp(16px, 1.8vw, 19px); max-width: 640px; margin: 0 auto 36px; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.glitch { position: relative; }
.glitch::before, .glitch::after {
  content: attr(data-text); position: absolute; inset: 0; background: inherit; -webkit-background-clip: text; background-clip: text;
}
.glitch::before { color: transparent; text-shadow: -2px 0 var(--magenta); clip-path: inset(0 0 0 0); animation: glitch-a 3.2s infinite steps(1); opacity: .8; }
.glitch::after { color: transparent; text-shadow: 2px 0 var(--cyan); animation: glitch-b 2.7s infinite steps(1); opacity: .8; }
@keyframes glitch-a {
  0%, 88%, 100% { clip-path: inset(100% 0 0 0); transform: none; }
  89% { clip-path: inset(10% 0 70% 0); transform: translate(-6px, -2px); }
  91% { clip-path: inset(60% 0 10% 0); transform: translate(5px, 1px); }
  93% { clip-path: inset(35% 0 45% 0); transform: translate(-3px, 0); }
}
@keyframes glitch-b {
  0%, 90%, 100% { clip-path: inset(100% 0 0 0); transform: none; }
  91% { clip-path: inset(50% 0 30% 0); transform: translate(6px, 2px); }
  94% { clip-path: inset(15% 0 65% 0); transform: translate(-5px, -1px); }
}

.hero-ring { position: absolute; z-index: 1; width: min(820px, 120vw); aspect-ratio: 1; left: 50%; top: 50%; transform: translate(-50%, -50%); opacity: .55; pointer-events: none; }
.hero-ring svg { width: 100%; height: 100%; overflow: visible; }
.hero-ring circle { fill: none; stroke-width: 1; transform-origin: 200px 200px; }
.hero-ring .r1 { stroke: var(--cyan); stroke-dasharray: 2 10; animation: spin 60s linear infinite; opacity: .5; }
.hero-ring .r2 { stroke: var(--violet); stroke-dasharray: 120 40 10 40; animation: spin 40s linear infinite reverse; opacity: .45; }
.hero-ring .r3 { stroke: var(--magenta); stroke-dasharray: 1 6; animation: spin 25s linear infinite; opacity: .4; }

.hud { position: absolute; z-index: 2; font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: .1em; display: flex; align-items: center; gap: 6px; }
.hud::before { content: ''; position: absolute; width: 14px; height: 14px; border: 1px solid var(--cyan); opacity: .7; }
.hud-tl { top: 96px; left: 32px; } .hud-tl::before { left: -14px; top: -14px; border-right: 0; border-bottom: 0; }
.hud-tr { top: 96px; right: 32px; } .hud-tr::before { right: -14px; top: -14px; border-left: 0; border-bottom: 0; }
.hud-bl { bottom: 32px; left: 32px; } .hud-bl::before { left: -14px; bottom: -14px; border-right: 0; border-top: 0; }
.hud-br { bottom: 32px; right: 32px; } .hud-br::before { right: -14px; bottom: -14px; border-left: 0; border-top: 0; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); display: inline-block; animation: pulse 2s infinite; }
.blink { color: var(--cyan); animation: blink 1.4s steps(1) infinite; }

.scroll-hint { position: absolute; z-index: 2; bottom: 28px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 11px; letter-spacing: .3em; color: var(--muted); text-transform: uppercase; }
.scroll-hint i { width: 1px; height: 46px; background: linear-gradient(var(--cyan), transparent); position: relative; overflow: hidden; }
.scroll-hint i::after { content: ''; position: absolute; left: 0; top: -40%; width: 100%; height: 40%; background: #fff; animation: drop 1.8s var(--ease) infinite; }

/* ---------- Sections ---------- */
.section { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 120px 0 40px; }
.section-head { margin-bottom: 48px; }
.kicker { color: var(--cyan); font-size: 14px; letter-spacing: .12em; }
.section-head h2 { font-size: clamp(36px, 6vw, 64px); line-height: 1.05; margin: 6px 0 0; letter-spacing: -.02em; }
.section-head h2::after { content: ''; display: block; width: 80px; height: 3px; margin-top: 18px; background: var(--grad); box-shadow: 0 0 14px var(--cyan); border-radius: 3px; }

.reveal { opacity: 0; transform: translateY(30px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* Profil */
.about-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: start; }
.about-text p { margin: 0 0 18px; color: #c5d0e2; font-size: 18px; }
.about-text p:first-child::first-letter { font-size: 1.4em; color: var(--cyan); font-weight: 700; }
.terminal { border: 1px solid var(--line-strong); border-radius: var(--radius); background: rgba(4, 8, 16, .85); box-shadow: 0 30px 80px -30px rgba(34, 230, 255, .35), 0 0 0 1px rgba(255,255,255,.02) inset; overflow: hidden; }
.term-bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.02); }
.term-bar i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; } .term-bar i:nth-child(2) { background: #febc2e; } .term-bar i:nth-child(3) { background: #28c840; }
.term-bar span { margin-left: 10px; font-size: 12px; color: var(--muted); }
.term-body { margin: 0; padding: 18px 20px 22px; font-size: 13.5px; line-height: 1.75; min-height: 300px; white-space: pre-wrap; color: #c5d0e2; }
.term-body .p { color: var(--green); } .term-body .k { color: var(--cyan); } .term-body .v { color: var(--magenta); } .term-body .c { color: var(--muted); }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 56px; }
.stat { position: relative; padding: 26px 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); backdrop-filter: blur(8px); overflow: hidden; }
.stat::before { content: ''; position: absolute; inset: 0 0 auto; height: 1px; background: var(--grad); opacity: .7; }
.stat b { font-size: 46px; font-weight: 700; line-height: 1; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat > span { font-size: 30px; color: var(--cyan); font-weight: 700; }
.stat small { display: block; margin-top: 8px; color: var(--muted); font-size: 14px; }

/* Compétences */
.skills-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.skill-card { position: relative; padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); backdrop-filter: blur(8px); overflow: hidden; transition: border-color .3s, transform .3s var(--ease); }
.skill-card:hover { border-color: var(--line-strong); transform: translateY(-4px); }
.skill-card .ico { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: rgba(34, 230, 255, .08); border: 1px solid var(--line-strong); color: var(--cyan); margin-bottom: 16px; }
.skill-card .ico svg { width: 24px; height: 24px; }
.skill-card h3 { margin: 0 0 14px; font-size: 20px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-family: var(--mono); font-size: 12.5px; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line); color: #c5d0e2; background: rgba(255,255,255,.02); transition: border-color .2s, color .2s; }
.skill-card:hover .chip { border-color: rgba(34, 230, 255, .3); }
.marquee { margin-top: 56px; overflow: hidden; border-block: 1px solid var(--line); padding: 18px 0; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; gap: 48px; width: max-content; animation: marquee 40s linear infinite; font-family: var(--mono); font-size: 22px; color: rgba(230, 237, 247, .28); white-space: nowrap; }
.marquee-track span::before { content: '◆'; color: var(--cyan); opacity: .6; margin-right: 48px; font-size: 12px; vertical-align: middle; }

/* Projets */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 34px; }
.filter { font-family: var(--mono); font-size: 13.5px; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); transition: all .25s var(--ease); }
.filter:hover { color: var(--text); border-color: var(--line-strong); }
.filter.active { color: var(--bg); background: var(--cyan); border-color: var(--cyan); box-shadow: 0 0 22px -4px var(--cyan); font-weight: 700; }
.filter sup { font-size: 10px; margin-left: 4px; opacity: .7; }

.projects-grid { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-flow: dense; gap: 22px; }
.card {
  --mx: 50%; --my: 50%; --rx: 0deg; --ry: 0deg;
  position: relative; display: flex; flex-direction: column; border-radius: var(--radius); background: var(--panel-solid);
  border: 1px solid var(--line); overflow: hidden; cursor: pointer; text-align: left;
  transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry)); transition: transform .25s var(--ease), border-color .3s, box-shadow .3s, opacity .4s, scale .4s;
  transform-style: preserve-3d;
}
.card::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(420px circle at var(--mx) var(--my), rgba(34, 230, 255, .14), transparent 45%); opacity: 0; transition: opacity .3s; }
.card:hover { border-color: var(--line-strong); box-shadow: 0 30px 60px -30px rgba(34, 230, 255, .45); }
.card:hover::after { opacity: 1; }
.card.featured { grid-column: span 2; }
.card.hide { display: none; }
.card.enter { animation: card-in .55s var(--ease) both; }
.card-media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #070b15; }
.card.featured .card-media { aspect-ratio: 21 / 9; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease), filter .4s; filter: saturate(.85) brightness(.85); }
.card:hover .card-media img { transform: scale(1.06); filter: saturate(1.05) brightness(1); }
.card-media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(13, 19, 34, .95)); }
.card-body { position: relative; z-index: 1; padding: 18px 22px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.card-meta .badges { display: flex; gap: 6px; }
.badge { padding: 2px 8px; border-radius: 6px; border: 1px solid var(--line); font-size: 11px; letter-spacing: .04em; }
.badge.live { color: var(--green); border-color: rgba(57, 255, 159, .35); }
.badge.legacy { color: #f5c26b; border-color: rgba(245, 194, 107, .35); }
.badge.play { color: var(--magenta); border-color: rgba(255, 62, 165, .4); }
.card h3 { margin: 0; font-size: 21px; line-height: 1.25; }
.card.featured h3 { font-size: 26px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.card-foot { margin-top: auto; padding-top: 6px; display: flex; align-items: center; justify-content: space-between; }
.card-foot .chips .chip { font-size: 11px; padding: 3px 9px; }
.card-foot .go { font-family: var(--mono); font-size: 13px; color: var(--cyan); white-space: nowrap; transition: transform .25s var(--ease); }
.card:hover .go { transform: translateX(4px); }

/* Couverture générée */
.cover { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(circle at 30% 20%, hsla(var(--h), 90%, 60%, .35), transparent 55%), radial-gradient(circle at 80% 90%, hsla(calc(var(--h) + 60), 90%, 55%, .3), transparent 55%), #070b15; }
.cover::before { content: ''; position: absolute; inset: -50%; background-image: linear-gradient(hsla(var(--h), 90%, 70%, .14) 1px, transparent 1px), linear-gradient(90deg, hsla(var(--h), 90%, 70%, .14) 1px, transparent 1px); background-size: 28px 28px; transform: perspective(400px) rotateX(55deg) translateY(0); animation: grid-move 6s linear infinite; transform-origin: center; }
.cover svg { position: relative; width: 30%; max-width: 110px; height: auto; color: hsl(var(--h), 95%, 72%); filter: drop-shadow(0 0 18px hsla(var(--h), 95%, 60%, .9)); transition: transform .6s var(--ease); }
.card:hover .cover svg { transform: scale(1.12) rotate(-4deg); }
.cover .orbit { position: absolute; width: 46%; aspect-ratio: 1; border-radius: 50%; border: 1px dashed hsla(var(--h), 90%, 70%, .35); animation: spin 18s linear infinite; }
.cover .orbit::before { content: ''; position: absolute; top: -4px; left: 50%; width: 8px; height: 8px; border-radius: 50%; background: hsl(var(--h), 95%, 70%); box-shadow: 0 0 12px hsl(var(--h), 95%, 60%); }

/* Parcours */
.timeline { list-style: none; margin: 0; padding: 0 0 0 4px; position: relative; }
.timeline::before { content: ''; position: absolute; left: 115px; top: 6px; bottom: 6px; width: 1px; background: linear-gradient(var(--cyan), var(--violet), var(--magenta)); opacity: .6; }
.tl-item { position: relative; display: grid; grid-template-columns: 96px 1fr; gap: 40px; padding: 0 0 34px; }
.tl-year { font-family: var(--mono); font-weight: 700; color: var(--cyan); text-align: right; padding-top: 2px; }
.tl-item::before { content: ''; position: absolute; left: 106px; top: 6px; width: 11px; height: 11px; border-radius: 50%; background: var(--bg); border: 2px solid var(--cyan); box-shadow: 0 0 12px var(--cyan); }
.tl-item h3 { margin: 0 0 4px; font-size: 19px; }
.tl-item p { margin: 0; color: var(--muted); }

/* Contact */
.contact-card { position: relative; padding: 48px; border-radius: 24px; border: 1px solid var(--line-strong); background: var(--panel); backdrop-filter: blur(10px); text-align: center; overflow: hidden; }
.contact-card::before { content: ''; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; background: conic-gradient(from var(--angle, 0deg), transparent 70%, var(--cyan), var(--magenta), transparent); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: border-spin 6s linear infinite; pointer-events: none; }
.contact-card p { font-size: 20px; max-width: 560px; margin: 0 auto 24px; color: #c5d0e2; }
.contact-mail { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; margin-bottom: 30px; }
.contact-mail a { font-size: clamp(18px, 3.2vw, 30px); background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; word-break: break-all; }
.socials { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }
.social { display: inline-flex; align-items: center; gap: 10px; padding: 11px 18px; border-radius: 12px; border: 1px solid var(--line); font-family: var(--mono); font-size: 14px; transition: all .25s var(--ease); }
.social svg { width: 18px; height: 18px; }
.social:hover { border-color: var(--cyan); color: var(--cyan); transform: translateY(-3px); box-shadow: 0 10px 30px -10px var(--cyan); }

.footer { width: min(1180px, calc(100% - 32px)); margin: 80px auto 0; padding: 26px 0 36px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.footer .status { display: inline-flex; align-items: center; gap: 8px; }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 24px; visibility: hidden; pointer-events: none; }
.modal.open { visibility: visible; pointer-events: auto; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(3, 5, 10, .75); backdrop-filter: blur(8px); opacity: 0; transition: opacity .35s; }
.modal.open .modal-backdrop { opacity: 1; }
.modal-panel {
  position: relative; width: min(980px, 100%); max-height: calc(100svh - 48px); overflow-y: auto; border-radius: 20px;
  background: var(--panel-solid); border: 1px solid var(--line-strong); box-shadow: 0 40px 120px -20px rgba(34, 230, 255, .3);
  opacity: 0; transform: translateY(30px) scale(.97); transition: opacity .35s var(--ease), transform .45s var(--ease);
}
.modal.open .modal-panel { opacity: 1; transform: none; }
.modal-top { position: sticky; top: 0; height: 0; z-index: 3; }
.modal-close { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-strong); background: rgba(5, 7, 13, .8); font-size: 20px; line-height: 1; transition: all .2s; }
.modal-close:hover { border-color: var(--magenta); color: var(--magenta); transform: rotate(90deg); }
.modal-hero { position: relative; aspect-ratio: 21 / 9; background: #070b15; overflow: hidden; }
.modal-hero img, .modal-hero video, .modal-hero iframe { width: 100%; height: 100%; object-fit: contain; border: 0; background: #000; }
.modal-hero .cover svg { width: 18%; }
.modal-content { padding: 28px 36px 36px; }
.modal-content h2 { margin: 6px 0 14px; font-size: clamp(26px, 4vw, 38px); line-height: 1.15; }
.modal-content p { color: #c5d0e2; margin: 0 0 14px; }
.modal-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 6px; }
.gallery { display: flex; gap: 10px; overflow-x: auto; padding: 4px 0 10px; margin-top: 20px; scrollbar-width: thin; }
.gallery button { flex: 0 0 auto; width: 140px; aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); opacity: .65; transition: all .2s; }
.gallery button.active, .gallery button:hover { opacity: 1; border-color: var(--cyan); }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.modal-label { font-family: var(--mono); font-size: 12px; color: var(--cyan); letter-spacing: .12em; text-transform: uppercase; margin-top: 22px; }

/* ---------- Animations ---------- */
@keyframes blink { 50% { opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { opacity: .4; } }
@keyframes drop { to { top: 110%; } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes grid-move { to { background-position: 0 28px; } }
@keyframes card-in { from { opacity: 0; transform: translateY(24px) scale(.97); } }
@property --angle { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
@keyframes border-spin { to { --angle: 360deg; } }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .projects-grid, .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .nav-links { position: fixed; top: 70px; left: 0; right: 0; flex-direction: column; padding: 14px; border-radius: 20px; border: 1px solid var(--line-strong); background: rgba(8, 12, 22, .96); opacity: 0; transform: translateY(-10px); pointer-events: none; transition: all .3s var(--ease); }
  .nav.open .nav-links { opacity: 1; transform: none; pointer-events: auto; }
  .nav-links a { padding: 12px 16px; }
  .burger { display: block; }
  .projects-grid, .skills-grid { grid-template-columns: 1fr; }
  .card.featured { grid-column: auto; }
  .card.featured .card-media { aspect-ratio: 16 / 9; }
  .hud-tr, .hud-br { display: none; }
  .hud-tl { left: 24px; } .hud-bl { left: 24px; }
  .section { padding-top: 90px; }
  .timeline::before { left: 7px; }
  .tl-item { grid-template-columns: 1fr; gap: 2px; padding-left: 30px; }
  .tl-item::before { left: 2px; }
  .tl-year { text-align: left; }
  .contact-card { padding: 32px 20px; }
  .modal { padding: 0; }
  .modal-panel { max-height: 100svh; border-radius: 0; }
  .modal-content { padding: 22px 20px 30px; }
  .modal-hero { aspect-ratio: 16 / 10; }
  #cursor-glow { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
