/* ═══════════════════════════════════════════════════════════════
   YNYZ.SITE — Design System v2
   Cyberpunk Violet / Cyan / Noir — Dark & Light
   ═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;600;700;900&family=Rajdhani:wght@300;400;500;600;700&family=Share+Tech+Mono&display=swap');

/* ── Tokens dark (défaut) ─────────────────────────────────── */
:root {
  --bg:         #04040c;
  --bg2:        #08081a;
  --bg3:        #0d0d22;
  --card:       #0a0a1e;
  --card-hover: #0f0f28;
  --border:     #1a1a38;
  --border-l:   #2a2a55;

  --violet:     #7c3aed;
  --violet-l:   #a855f7;
  --violet-d:   #5b21b6;
  --cyan:       #06b6d4;
  --cyan-l:     #67e8f9;
  --cyan-d:     #0891b2;

  --white:      #e8eaf6;
  --muted:      #5a6080;
  --muted-l:    #8892b0;
  --danger:     #f43f5e;
  --success:    #10b981;

  --font-display: 'Orbitron', monospace;
  --font-body:    'Rajdhani', sans-serif;
  --font-mono:    'Share Tech Mono', monospace;

  --glow-v:  0 0 15px rgba(124,58,237,0.5), 0 0 50px rgba(124,58,237,0.12);
  --glow-c:  0 0 15px rgba(6,182,212,0.5),  0 0 50px rgba(6,182,212,0.12);
  --glow-sm: 0 0 8px  rgba(124,58,237,0.4);

  --radius:  5px;
  --trans:   0.22s ease;
  --shadow:  0 4px 24px rgba(0,0,0,0.4);
}

/* ── Tokens light ─────────────────────────────────────────── */
[data-theme="light"] {
  --bg:         #f0f0ff;
  --bg2:        #e4e4f8;
  --bg3:        #d8d8f0;
  --card:       #ffffff;
  --card-hover: #f4f4ff;
  --border:     #c8c8e8;
  --border-l:   #a8a8d0;

  --white:      #1a1a3a;
  --muted:      #6060a0;
  --muted-l:    #4040808;

  --glow-v: 0 0 12px rgba(124,58,237,0.3);
  --glow-c: 0 0 12px rgba(6,182,212,0.3);
  --shadow: 0 4px 24px rgba(100,80,200,0.12);
}

/* ── Reset ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  background: var(--bg);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background var(--trans), color var(--trans);
  cursor: none;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }
button { font-family: var(--font-body); cursor: none; }
input, textarea, select { font-family: var(--font-body); }

/* ── Scrollbar ────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: linear-gradient(var(--violet), var(--cyan)); border-radius: 3px; }

/* ── Selection ────────────────────────────────────────────── */
::selection { background: rgba(124,58,237,0.35); color: var(--cyan-l); }

/* ── Custom Cursor ────────────────────────────────────────── */
#cursor-dot {
  position: fixed;
  width: 8px; height: 8px;
  background: var(--cyan);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.15s, height 0.15s, background 0.15s;
  box-shadow: var(--glow-c);
}
#cursor-ring {
  position: fixed;
  width: 32px; height: 32px;
  border: 1px solid rgba(124,58,237,0.6);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: transform 0.08s linear, width 0.2s, height 0.2s, border-color 0.2s;
}
body:has(a:hover) #cursor-dot,
body:has(button:hover) #cursor-dot { width: 14px; height: 14px; background: var(--violet-l); }
body:has(a:hover) #cursor-ring,
body:has(button:hover) #cursor-ring { width: 48px; height: 48px; border-color: var(--violet-l); }

/* ── Grid Background ──────────────────────────────────────── */
#bg-grid {
  position: fixed; inset: 0;
  background-image:
    linear-gradient(rgba(124,58,237,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124,58,237,0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
  transition: opacity var(--trans);
}
[data-theme="light"] #bg-grid {
  background-image:
    linear-gradient(rgba(124,58,237,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124,58,237,0.06) 1px, transparent 1px);
}

/* ── Canvas particules ────────────────────────────────────── */
#particles-canvas {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
}

/* ── Scanline overlay ─────────────────────────────────────── */
#scanline {
  position: fixed; inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.04) 2px,
    rgba(0,0,0,0.04) 4px
  );
  pointer-events: none;
  z-index: 1;
  animation: scanMove 8s linear infinite;
}
@keyframes scanMove {
  0%   { background-position: 0 0; }
  100% { background-position: 0 100vh; }
}
[data-theme="light"] #scanline { opacity: 0.3; }

/* ── Splash Screen ────────────────────────────────────────── */
#splash {
  position: fixed; inset: 0;
  background: var(--bg);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
#splash.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
#splash-logo {
  font-family: var(--font-display);
  font-size: clamp(3rem, 10vw, 6rem);
  font-weight: 900;
  letter-spacing: 8px;
  color: var(--white);
  position: relative;
}
#splash-logo span { color: var(--cyan); }
#splash-logo::after {
  content: attr(data-text);
  position: absolute; inset: 0;
  color: var(--violet-l);
  clip-path: inset(0 100% 0 0);
  animation: splashReveal 1.2s cubic-bezier(.77,0,.18,1) 0.3s forwards;
}
@keyframes splashReveal {
  to { clip-path: inset(0 0% 0 0); }
}
#splash-bar {
  width: 200px; height: 2px;
  background: var(--border);
  border-radius: 1px;
  overflow: hidden;
}
#splash-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--violet), var(--cyan));
  width: 0;
  animation: barFill 1.6s ease forwards;
  box-shadow: var(--glow-c);
}
@keyframes barFill { to { width: 100%; } }
#splash-text {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted-l);
  letter-spacing: 2px;
  animation: splashBlink 0.8s step-end infinite;
}
@keyframes splashBlink { 50% { opacity: 0; } }

/* ── Layout ───────────────────────────────────────────────── */
.container { max-width: 1140px; margin: 0 auto; padding: 0 1.5rem; position: relative; z-index: 2; }

/* ── Navbar ───────────────────────────────────────────────── */
.navbar {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 500;
  height: 64px;
  background: rgba(4,4,12,0.8);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: background var(--trans), border-color var(--trans);
}
[data-theme="light"] .navbar {
  background: rgba(240,240,255,0.85);
}
.navbar.scrolled {
  background: rgba(4,4,12,0.97);
  border-bottom-color: var(--violet-d);
}
[data-theme="light"] .navbar.scrolled {
  background: rgba(240,240,255,0.98);
}
.navbar__inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; max-width: 1140px; margin: 0 auto; padding: 0 1.5rem;
}
.navbar__logo {
  font-family: var(--font-display);
  font-size: 1.25rem; font-weight: 900;
  letter-spacing: 3px;
  color: var(--white);
  position: relative;
  display: flex; align-items: center; gap: 0.5rem;
}
.navbar__logo .accent { color: var(--cyan); text-shadow: var(--glow-c); }
.navbar__logo::after {
  content: '';
  position: absolute; bottom: -4px; left: 0;
  width: 100%; height: 1px;
  background: linear-gradient(90deg, var(--violet), var(--cyan), transparent);
}
.navbar__links {
  display: flex; align-items: center; gap: 0.25rem;
}
.navbar__links a {
  font-family: var(--font-body);
  font-weight: 600; font-size: 0.82rem;
  letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--muted-l);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius);
  transition: color var(--trans), background var(--trans);
  position: relative;
}
.navbar__links a::after {
  content: '';
  position: absolute; bottom: 2px; left: 50%; right: 50%;
  height: 1px; background: var(--cyan);
  transition: left var(--trans), right var(--trans);
}
.navbar__links a:hover,
.navbar__links a.active { color: var(--cyan); }
.navbar__links a:hover::after,
.navbar__links a.active::after { left: 0.75rem; right: 0.75rem; }

.navbar__right { display: flex; align-items: center; gap: 0.75rem; }

/* Theme toggle */
.theme-toggle {
  width: 38px; height: 38px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  transition: border-color var(--trans), box-shadow var(--trans);
  color: var(--muted-l);
}
.theme-toggle:hover { border-color: var(--violet); box-shadow: var(--glow-sm); color: var(--violet-l); }

/* Burger */
.navbar__burger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; padding: 4px;
}
.navbar__burger span {
  display: block; width: 22px; height: 2px;
  background: var(--muted-l);
  transition: all 0.3s ease;
  border-radius: 1px;
}
.navbar__burger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.navbar__burger.open span:nth-child(2) { opacity: 0; }
.navbar__burger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ── Bandeau défilant ─────────────────────────────────────── */
.ticker {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  height: 36px;
  position: relative;
  z-index: 2;
}
.ticker__track {
  display: flex; align-items: center;
  height: 100%;
  white-space: nowrap;
  animation: tickerScroll 30s linear infinite;
}
.ticker:hover .ticker__track { animation-play-state: paused; }
.ticker__item {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted-l);
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 0 2rem;
  display: flex; align-items: center; gap: 0.75rem;
}
.ticker__item::before {
  content: '◈';
  color: var(--violet);
  font-size: 0.6rem;
}
@keyframes tickerScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex; align-items: center;
  padding-top: 64px;
  position: relative; overflow: hidden;
}
.hero__bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 15% 55%, rgba(124,58,237,0.1) 0%, transparent 65%),
    radial-gradient(ellipse 45% 45% at 85% 25%, rgba(6,182,212,0.07) 0%, transparent 65%);
  pointer-events: none;
}
.hero__content { padding: 5rem 0 4rem; max-width: 680px; }

.hero__eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8rem; color: var(--cyan);
  letter-spacing: 3px; text-transform: uppercase;
  margin-bottom: 1.75rem;
  display: flex; align-items: center; gap: 0.75rem;
  opacity: 0; animation: fadeUp 0.6s ease 0.3s forwards;
}
.hero__eyebrow::before {
  content: '';
  width: 36px; height: 1px;
  background: var(--cyan); box-shadow: var(--glow-c);
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 9vw, 7rem);
  font-weight: 900;
  line-height: 0.92;
  letter-spacing: -2px;
  margin-bottom: 1.75rem;
}
.hero__title .line { display: block; }
.hero__title .line-1 {
  color: var(--white);
  opacity: 0; animation: fadeUp 0.6s ease 0.5s forwards;
}
.hero__title .line-2 {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--violet-l);
  opacity: 0; animation: fadeUp 0.6s ease 0.65s forwards;
  position: relative;
}
.hero__title .line-3 {
  color: var(--cyan);
  text-shadow: var(--glow-c);
  opacity: 0; animation: fadeUp 0.6s ease 0.8s forwards;
  min-height: 1em;
}

/* Glitch effect sur line-1 */
.hero__title .line-1 { position: relative; }
.hero__title .line-1::before,
.hero__title .line-1::after {
  content: attr(data-text);
  position: absolute; inset: 0;
  opacity: 0;
}
.hero__title .line-1::before { color: var(--cyan);   animation: glitch1 4s infinite 2s; clip-path: inset(20% 0 60% 0); }
.hero__title .line-1::after  { color: var(--violet-l); animation: glitch2 4s infinite 2.1s; clip-path: inset(60% 0 20% 0); }
@keyframes glitch1 {
  0%,90%,100% { transform: translate(0); opacity: 0; }
  91%  { transform: translate(-3px, 1px); opacity: 0.7; }
  93%  { transform: translate(3px, -1px); opacity: 0.7; }
  95%  { transform: translate(0); opacity: 0; }
}
@keyframes glitch2 {
  0%,90%,100% { transform: translate(0); opacity: 0; }
  91%  { transform: translate(3px, 1px); opacity: 0.6; }
  93%  { transform: translate(-3px, -1px); opacity: 0.6; }
  95%  { transform: translate(0); opacity: 0; }
}

.hero__desc {
  font-size: 1.1rem; color: var(--muted-l);
  max-width: 500px; line-height: 1.75;
  margin-bottom: 2.5rem;
  opacity: 0; animation: fadeUp 0.6s ease 1s forwards;
}
.hero__cta {
  display: flex; gap: 1rem; flex-wrap: wrap;
  opacity: 0; animation: fadeUp 0.6s ease 1.1s forwards;
}

/* Typewriter cursor */
.tw-cursor {
  display: inline-block; width: 3px; height: 0.85em;
  background: var(--cyan); margin-left: 2px;
  vertical-align: middle;
  animation: twBlink 0.9s step-end infinite;
  box-shadow: var(--glow-c);
}
@keyframes twBlink { 50% { opacity: 0; } }

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.7rem 1.6rem;
  font-family: var(--font-body); font-weight: 700;
  font-size: 0.85rem; letter-spacing: 1.5px; text-transform: uppercase;
  border-radius: var(--radius); border: none;
  cursor: none; transition: all var(--trans);
  position: relative; overflow: hidden;
}
.btn::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent);
  opacity: 0; transition: opacity var(--trans);
}
.btn:hover::before { opacity: 1; }
.btn:active { transform: scale(0.97); }

.btn--primary {
  background: linear-gradient(135deg, var(--violet-d), var(--violet-l));
  color: #fff;
  box-shadow: var(--glow-v);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 0 25px rgba(124,58,237,0.7), 0 0 70px rgba(124,58,237,0.2); }

.btn--outline {
  background: transparent; color: var(--cyan);
  border: 1px solid var(--cyan);
}
.btn--outline:hover { background: rgba(6,182,212,0.08); box-shadow: var(--glow-c); transform: translateY(-2px); }

.btn--ghost {
  background: transparent; color: var(--muted-l);
  border: 1px solid var(--border);
}
.btn--ghost:hover { border-color: var(--violet); color: var(--white); }

.btn--sm { padding: 0.45rem 1rem; font-size: 0.78rem; }

/* ── Section ──────────────────────────────────────────────── */
.section { padding: 6rem 0; position: relative; }
.section--sm { padding: 3.5rem 0; }

.section__header { margin-bottom: 3rem; }
.section__label {
  font-family: var(--font-mono); font-size: 0.74rem;
  color: var(--violet-l); letter-spacing: 3px; text-transform: uppercase;
  display: block; margin-bottom: 0.5rem;
}
.section__title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700; line-height: 1.1; color: var(--white);
}
.section__title span { color: var(--cyan); }
.section__line {
  width: 56px; height: 2px; margin-top: 1rem;
  background: linear-gradient(90deg, var(--violet), var(--cyan));
  box-shadow: var(--glow-sm);
}

/* ── Cards ────────────────────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  position: relative;
  transition: border-color var(--trans), box-shadow var(--trans), transform var(--trans), background var(--trans);
}
.card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--violet), var(--cyan), transparent);
  opacity: 0; transition: opacity var(--trans);
  border-radius: var(--radius) var(--radius) 0 0;
}
.card:hover { border-color: var(--border-l); box-shadow: var(--glow-sm); transform: translateY(-3px); background: var(--card-hover); }
.card:hover::before { opacity: 1; }

/* ── Grid ─────────────────────────────────────────────────── */
.grid { display: grid; gap: 1.5rem; }
.grid--3 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); }

/* ── Tags ─────────────────────────────────────────────────── */
.tag {
  display: inline-flex; align-items: center;
  padding: 0.18rem 0.6rem;
  font-family: var(--font-mono); font-size: 0.7rem;
  border-radius: 3px; letter-spacing: 0.5px;
  cursor: none; transition: all var(--trans);
}
.tag--v { background: rgba(124,58,237,0.15); color: var(--violet-l); border: 1px solid rgba(124,58,237,0.3); }
.tag--c { background: rgba(6,182,212,0.12);  color: var(--cyan-l);   border: 1px solid rgba(6,182,212,0.28); }
.tag--g { background: rgba(100,116,139,0.1); color: var(--muted-l);  border: 1px solid var(--border); }
.tag--v:hover { background: rgba(124,58,237,0.3); }
.tag--c:hover { background: rgba(6,182,212,0.25); }
.tag--g:hover { background: rgba(100,116,139,0.2); color: var(--white); }
.tag.active { background: rgba(6,182,212,0.25); color: var(--cyan-l); border-color: var(--cyan); }

.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }

/* ── Page Hero (sous-pages) ───────────────────────────────── */
.page-hero {
  padding: 8.5rem 0 3.5rem;
  position: relative; overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.page-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 80% at 50% 0%, rgba(124,58,237,0.09) 0%, transparent 70%);
  pointer-events: none;
}

/* ── About ────────────────────────────────────────────────── */
.about-layout { display: grid; grid-template-columns: 340px 1fr; gap: 4rem; align-items: start; }
.about-photo-wrap {
  position: sticky; top: 80px;
}
.about-photo {
  width: 100%; aspect-ratio: 1;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); color: var(--muted);
  font-size: 0.82rem; overflow: hidden; position: relative;
}
.about-photo::before {
  content: '';
  position: absolute; inset: -1px;
  background: linear-gradient(135deg, var(--violet), transparent 50%, var(--cyan));
  border-radius: calc(var(--radius) + 1px);
  z-index: -1; opacity: 0.6;
}
.about-photo img { width: 100%; height: 100%; object-fit: cover; }

.about-status {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.4rem 0.9rem;
  background: rgba(16,185,129,0.1);
  border: 1px solid rgba(16,185,129,0.3);
  border-radius: var(--radius);
  font-family: var(--font-mono); font-size: 0.75rem;
  color: #34d399; margin-top: 1rem;
}
.about-status::before {
  content: '';
  width: 6px; height: 6px;
  background: #34d399; border-radius: 50%;
  animation: pulse-dot 2s ease infinite;
}
@keyframes pulse-dot {
  0%,100% { box-shadow: 0 0 0 0 rgba(52,211,153,0.4); }
  50%      { box-shadow: 0 0 0 5px rgba(52,211,153,0); }
}

.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 2rem 0; }
.stat {
  text-align: center;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1rem 0.5rem;
}
.stat__num { font-family: var(--font-display); font-size: 1.8rem; font-weight: 700; color: var(--cyan); text-shadow: var(--glow-c); }
.stat__label { font-size: 0.72rem; color: var(--muted-l); text-transform: uppercase; letter-spacing: 1px; }

/* Timeline */
.timeline { position: relative; padding-left: 2rem; }
.timeline::before {
  content: '';
  position: absolute; top: 0; bottom: 0; left: 7px;
  width: 1px;
  background: linear-gradient(var(--violet), var(--cyan), transparent);
}
.timeline__item { position: relative; margin-bottom: 2rem; }
.timeline__item::before {
  content: '';
  position: absolute; left: -1.93rem; top: 6px;
  width: 9px; height: 9px;
  background: var(--violet); border-radius: 50%;
  box-shadow: 0 0 8px rgba(124,58,237,0.6);
  border: 2px solid var(--bg);
}
.timeline__date { font-family: var(--font-mono); font-size: 0.73rem; color: var(--cyan); letter-spacing: 1px; margin-bottom: 0.25rem; }
.timeline__title { font-family: var(--font-display); font-size: 0.95rem; font-weight: 700; color: var(--white); margin-bottom: 0.2rem; }
.timeline__desc { font-size: 0.9rem; color: var(--muted-l); line-height: 1.6; }

/* ── Portfolio ────────────────────────────────────────────── */
.filter-bar { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 2.5rem; }

.project-card { display: flex; flex-direction: column; }
.project-card__icon {
  width: 44px; height: 44px;
  background: linear-gradient(135deg, rgba(124,58,237,0.3), rgba(6,182,212,0.2));
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; margin-bottom: 1rem; flex-shrink: 0;
}
.project-card__title { font-family: var(--font-display); font-size: 0.95rem; font-weight: 700; color: var(--white); margin-bottom: 0.4rem; }
.project-card__desc { font-size: 0.88rem; color: var(--muted-l); flex-grow: 1; line-height: 1.65; margin-bottom: 1rem; }
.project-card__footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.75rem; margin-top: auto; }
.project-card[data-hidden] { display: none; }

/* ── Blog ─────────────────────────────────────────────────── */
.post-card__meta { display: flex; align-items: center; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 0.75rem; }
.post-card__date { font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); }
.post-card__reading { font-family: var(--font-mono); font-size: 0.7rem; color: var(--muted); }
.post-card__title { font-family: var(--font-display); font-size: 1.05rem; font-weight: 700; color: var(--white); line-height: 1.3; margin-bottom: 0.5rem; }
.post-card__excerpt { font-size: 0.88rem; color: var(--muted-l); line-height: 1.65; margin-bottom: 1rem; }
.post-card__more {
  font-family: var(--font-mono); font-size: 0.78rem; color: var(--cyan);
  display: inline-flex; align-items: center; gap: 0.4rem;
  transition: gap var(--trans);
}
.post-card__more:hover { gap: 0.8rem; }

.pagination { display: flex; justify-content: center; gap: 0.5rem; margin-top: 3rem; }
.pagination__btn {
  min-width: 36px; height: 36px; padding: 0 0.75rem;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius); font-family: var(--font-mono); font-size: 0.8rem;
  color: var(--muted-l); transition: all var(--trans); cursor: none;
  display: flex; align-items: center; justify-content: center;
}
.pagination__btn:hover,
.pagination__btn.active { border-color: var(--violet); color: var(--violet-l); background: rgba(124,58,237,0.1); }

/* Blog post body */
.post-body { max-width: 740px; margin: 0 auto; }
.post-body h1 { font-family: var(--font-display); font-size: clamp(1.8rem, 4vw, 2.5rem); font-weight: 700; line-height: 1.2; margin-bottom: 0.75rem; }
.post-header { margin-bottom: 3rem; padding-bottom: 2rem; border-bottom: 1px solid var(--border); }
.post-body p { color: var(--muted-l); line-height: 1.85; margin-bottom: 1.25rem; font-size: 1.02rem; }
.post-body h2 { font-family: var(--font-display); font-size: 1.4rem; color: var(--white); margin: 2.5rem 0 1rem; }
.post-body h3 { font-family: var(--font-body); font-size: 1.05rem; color: var(--cyan); font-weight: 700; margin: 2rem 0 0.75rem; }
.post-body a { color: var(--cyan); border-bottom: 1px solid rgba(6,182,212,0.3); transition: border-color var(--trans); }
.post-body a:hover { border-bottom-color: var(--cyan); }
.post-body code { font-family: var(--font-mono); background: var(--bg3); color: var(--violet-l); padding: 0.15em 0.45em; border-radius: 3px; font-size: 0.88em; }
.post-body pre { background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; overflow-x: auto; margin: 1.75rem 0; }
.post-body pre code { background: none; padding: 0; color: var(--cyan-l); font-size: 0.9rem; }
.post-body ul, .post-body ol { padding-left: 1.5rem; margin-bottom: 1.25rem; }
.post-body li { color: var(--muted-l); margin-bottom: 0.4rem; line-height: 1.7; }
.post-body blockquote {
  border-left: 3px solid var(--violet);
  padding: 0.75rem 1.25rem; margin: 1.75rem 0;
  background: rgba(124,58,237,0.06);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic; color: var(--muted-l);
}

/* TOC */
.toc {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem 1.5rem;
  margin: 2rem 0;
}
.toc__title { font-family: var(--font-mono); font-size: 0.75rem; color: var(--violet-l); letter-spacing: 2px; text-transform: uppercase; margin-bottom: 0.75rem; }
.toc__list { list-style: none; padding: 0; }
.toc__list li { margin-bottom: 0.35rem; }
.toc__list a { font-size: 0.88rem; color: var(--muted-l); transition: color var(--trans); display: flex; align-items: center; gap: 0.5rem; }
.toc__list a::before { content: '›'; color: var(--cyan); font-family: var(--font-mono); }
.toc__list a:hover { color: var(--cyan); }

/* Post actions */
.post-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 2rem; }
.post-nav { display: flex; justify-content: space-between; gap: 1rem; margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--border); }
.post-nav a { font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted-l); max-width: 45%; line-height: 1.5; transition: color var(--trans); }
.post-nav a:hover { color: var(--cyan); }

/* ── Contact ──────────────────────────────────────────────── */
.contact-layout { display: grid; grid-template-columns: 1fr 320px; gap: 2rem; }
.form { display: flex; flex-direction: column; gap: 1.1rem; }
.field label {
  display: block; font-family: var(--font-mono); font-size: 0.75rem;
  color: var(--violet-l); letter-spacing: 1px; text-transform: uppercase; margin-bottom: 0.4rem;
}
.field label .opt { color: var(--muted); font-size: 0.65rem; margin-left: 0.4rem; }
.field input, .field textarea, .field select {
  width: 100%; background: var(--bg2);
  border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--white); font-family: var(--font-body); font-size: 0.95rem;
  padding: 0.7rem 1rem; outline: none;
  transition: border-color var(--trans), box-shadow var(--trans);
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--violet); box-shadow: var(--glow-sm);
}
.field textarea { min-height: 150px; resize: vertical; }
.field--honeypot { display: none !important; }

.alert {
  padding: 0.9rem 1.25rem; border-radius: var(--radius);
  font-weight: 600; font-size: 0.92rem;
}
.alert--ok  { background: rgba(16,185,129,0.1); border: 1px solid rgba(16,185,129,0.3); color: #6ee7b7; }
.alert--err { background: rgba(244,63,94,0.1);  border: 1px solid rgba(244,63,94,0.3);  color: #fda4af; }
.alert.pop { animation: popIn 0.35s cubic-bezier(.34,1.56,.64,1) both; }
@keyframes popIn { from { opacity: 0; transform: scale(0.92) translateY(8px); } to { opacity: 1; transform: scale(1) translateY(0); } }

.contact-sidebar { display: flex; flex-direction: column; gap: 1rem; }
.contact-item {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius);
  transition: all var(--trans); color: var(--white);
}
.contact-item:hover { border-color: var(--cyan); transform: translateX(4px); }
.contact-item__icon {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, rgba(124,58,237,0.25), rgba(6,182,212,0.2));
  border-radius: 6px; display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem; flex-shrink: 0;
}
.contact-item__label { font-family: var(--font-mono); font-size: 0.68rem; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; display: block; }
.contact-item__val { font-size: 0.9rem; color: var(--white); }

/* ── Hangar ───────────────────────────────────────────────── */
.ship-card { display: flex; flex-direction: column; }
.ship-card__img {
  width: 100%; aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--bg3), var(--bg2));
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 1px);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem; margin-bottom: 1rem; overflow: hidden;
  position: relative;
}
.ship-card__img::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(4,4,12,0.5), transparent);
}
.ship-card__name { font-family: var(--font-display); font-size: 1rem; font-weight: 700; color: var(--white); margin-bottom: 0.25rem; }
.ship-card__mfg { font-family: var(--font-mono); font-size: 0.72rem; color: var(--cyan); letter-spacing: 1px; margin-bottom: 0.6rem; }
.ship-card__role { font-size: 0.85rem; color: var(--muted-l); margin-bottom: 0.75rem; flex-grow: 1; }
.ship-card__stats { display: grid; grid-template-columns: 1fr 1fr; gap: 0.4rem; }
.ship-stat { background: var(--bg3); border: 1px solid var(--border); border-radius: 3px; padding: 0.35rem 0.6rem; font-family: var(--font-mono); font-size: 0.68rem; }
.ship-stat__k { color: var(--muted); display: block; }
.ship-stat__v { color: var(--white); font-weight: 600; }

/* ── Sabacc ───────────────────────────────────────────────── */
.sabacc-hero {
  background: linear-gradient(135deg, rgba(124,58,237,0.08), rgba(6,182,212,0.05));
  border: 1px solid rgba(124,58,237,0.2);
  border-radius: var(--radius);
  padding: 2.5rem;
  margin-bottom: 3rem;
  position: relative; overflow: hidden;
}
.sabacc-hero::before {
  content: '♠ ♦ ♣ ♥';
  position: absolute; right: 2rem; top: 50%; transform: translateY(-50%);
  font-size: 3rem; opacity: 0.06; letter-spacing: 0.5rem;
  font-family: var(--font-display);
}
.card-demo { display: flex; gap: 1rem; flex-wrap: wrap; margin: 2rem 0; }
.sabacc-card {
  width: 80px; height: 120px;
  background: linear-gradient(135deg, var(--bg3), var(--card));
  border: 1px solid var(--border); border-radius: 8px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.25rem; font-family: var(--font-display); position: relative;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  transition: transform var(--trans), box-shadow var(--trans);
}
.sabacc-card:hover { transform: translateY(-6px) rotate(-2deg); box-shadow: 0 12px 28px rgba(124,58,237,0.3); }
.sabacc-card .suit { font-size: 1.8rem; }
.sabacc-card .val { font-size: 0.8rem; color: var(--cyan); }
.sabacc-card--special { border-color: var(--violet); background: linear-gradient(135deg, rgba(124,58,237,0.2), var(--card)); }
.sabacc-card--special .suit { color: var(--violet-l); }
.rules-table { width: 100%; border-collapse: collapse; margin-top: 1rem; }
.rules-table th { font-family: var(--font-mono); font-size: 0.75rem; color: var(--violet-l); letter-spacing: 1px; text-transform: uppercase; padding: 0.75rem 1rem; border-bottom: 1px solid var(--border); text-align: left; }
.rules-table td { padding: 0.65rem 1rem; border-bottom: 1px solid var(--border); font-size: 0.9rem; color: var(--muted-l); }
.rules-table tr:last-child td { border-bottom: none; }
.rules-table tr:hover td { background: rgba(124,58,237,0.04); }

/* ── 404 ──────────────────────────────────────────────────── */
.error-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding-top: 64px; text-align: center;
}
.error-code {
  font-family: var(--font-display); font-size: clamp(6rem, 20vw, 14rem);
  font-weight: 900; line-height: 1;
  color: transparent; -webkit-text-stroke: 2px var(--violet);
  position: relative; margin-bottom: 0.5rem;
  animation: glitch1 3s infinite;
}
.error-code::after {
  content: attr(data-text);
  position: absolute; inset: 0;
  color: var(--cyan); opacity: 0;
  -webkit-text-stroke: 2px var(--cyan);
  animation: glitch2 3s infinite 0.1s;
}

/* ── Footer ───────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 3rem 0 2rem;
  position: relative; z-index: 2;
  margin-top: 4rem;
}
.footer__grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 2.5rem; margin-bottom: 2.5rem; }
.footer__logo { font-family: var(--font-display); font-size: 1.2rem; font-weight: 900; letter-spacing: 3px; color: var(--white); display: inline-block; margin-bottom: 0.75rem; }
.footer__logo span { color: var(--cyan); }
.footer__tagline { font-size: 0.85rem; color: var(--muted); line-height: 1.6; margin-bottom: 0.5rem; }
.footer__made { font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); letter-spacing: 0.5px; }
.footer__made span { color: var(--violet-l); }
.footer__heading { font-family: var(--font-mono); font-size: 0.72rem; color: var(--violet-l); letter-spacing: 2px; text-transform: uppercase; margin-bottom: 1rem; }
.footer__links { display: flex; flex-direction: column; gap: 0.5rem; }
.footer__links a { font-size: 0.88rem; color: var(--muted-l); transition: color var(--trans); display: flex; align-items: center; gap: 0.4rem; }
.footer__links a::before { content: '›'; color: var(--border-l); font-family: var(--font-mono); }
.footer__links a:hover { color: var(--cyan); }
.footer__links a:hover::before { color: var(--cyan); }
.footer__bottom {
  border-top: 1px solid var(--border); padding-top: 1.5rem;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
}
.footer__copy { font-family: var(--font-mono); font-size: 0.73rem; color: var(--muted); }

/* ── Back to top ──────────────────────────────────────────── */
#back-top {
  position: fixed; bottom: 2rem; right: 2rem;
  width: 42px; height: 42px;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; color: var(--muted-l);
  z-index: 200; cursor: none;
  opacity: 0; pointer-events: none;
  transition: all var(--trans);
}
#back-top.visible { opacity: 1; pointer-events: all; }
#back-top:hover { border-color: var(--cyan); color: var(--cyan); box-shadow: var(--glow-c); transform: translateY(-3px); }

/* ── Divider ──────────────────────────────────────────────── */
.divider { height: 1px; background: linear-gradient(90deg, transparent, var(--border), transparent); margin: 0; }

/* ── Scroll reveal ────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.55s ease, transform 0.55s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ── Animations utils ─────────────────────────────────────── */
@keyframes fadeUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 960px) {
  .about-layout { grid-template-columns: 1fr; }
  .about-photo-wrap { position: static; max-width: 280px; }
  .contact-layout { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
  .navbar__links { display: none; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: rgba(4,4,12,0.98); border-bottom: 1px solid var(--border); padding: 1.25rem; gap: 0.25rem; }
  .navbar__links.open { display: flex; }
  .navbar__burger { display: flex; }
  .hero__title { letter-spacing: -1px; }
  .footer__grid { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 480px) {
  .grid--3, .grid--2 { grid-template-columns: 1fr; }
  .hero__cta { flex-direction: column; align-items: flex-start; }
}
