/* ============================================================
   STYLE.CSS — Portfolio Cyber-Futuriste
   Abdelmoughit LAHBABI
   
   SOMMAIRE :
   1. Variables & Reset
   2. Typographie
   3. Layout & Navigation
   4. Hero
   5. About (compteurs, skills)
   6. Projets (grille, filtres, cards)
   7. Galerie Pexels
   8. Contact
   9. Footer
   10. Modal
   11. Effets (neon, glass, grain, scanline)
   12. Animations & Scroll Reveal
   13. Responsive
   14. Reduced Motion
   ============================================================ */

/* ============================================================
   1. VARIABLES & RESET
   ============================================================ */
:root {
  /* Couleurs Dark (defaut) */
  --bg-primary: #020408;
  --bg-secondary: #0A0A0A;
  --bg-subtle: #121212;
  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #475569;
  --border-color: rgba(255, 255, 255, 0.08);

  /* Neon */
  --neon-cyan: #00F0FF;
  --neon-violet: #7000FF;
  --neon-cyan-dim: #00B8C4;
  --neon-violet-dim: #5200BD;

  /* Fonts */
  --font-display: 'Syne', sans-serif;
  --font-ui: 'Rajdhani', sans-serif;
  --font-body: 'Exo 2', sans-serif;

  /* Spacing */
  --nav-height: 4rem;
  --container-max: 72rem;
  --section-py: 6rem;
}

/* Mode clair */
html.light {
  --bg-primary: #F8FAFC;
  --bg-secondary: #F1F5F9;
  --bg-subtle: #E2E8F0;
  --text-primary: #1E293B;
  --text-secondary: #475569;
  --text-muted: #94A3B8;
  --border-color: rgba(0, 0, 0, 0.08);
  --neon-cyan: #0099AA;
  --neon-violet: #5200BD;
}

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

/* Force hidden elements to stay hidden */
[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; color: inherit; }
img { max-width: 100%; display: block; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--neon-cyan); border-radius: 3px; }

/* ============================================================
   2. TYPOGRAPHIE
   ============================================================ */
.neon-text {
  color: var(--neon-cyan);
  text-shadow: 0 0 7px rgba(0, 240, 255, 0.6), 0 0 30px rgba(0, 240, 255, 0.3);
}
html.light .neon-text { text-shadow: none; }

/* ============================================================
   3. LAYOUT & NAVIGATION
   ============================================================ */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}
.container-sm { max-width: 48rem; }
.text-center { text-align: center; }

/* Nav */
#main-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-height);
  transition: background 0.3s, backdrop-filter 0.3s, box-shadow 0.3s;
}
#main-nav.scrolled {
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}
html.light #main-nav.scrolled {
  background: rgba(255, 255, 255, 0.7);
}

.nav-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
}

.nav-logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--neon-cyan);
  text-shadow: 0 0 7px rgba(0, 240, 255, 0.6);
}
html.light .nav-logo { text-shadow: none; }
.nav-logo .dot { color: rgba(255, 255, 255, 0.4); }
html.light .nav-logo .dot { color: rgba(0, 0, 0, 0.3); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  position: relative;
  transition: color 0.3s;
}
html.light .nav-link { color: rgba(0, 0, 0, 0.5); }

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 2px;
  background: var(--neon-cyan);
  box-shadow: 0 0 8px var(--neon-cyan);
  transition: width 0.3s;
}
.nav-link:hover::after, .nav-link.active::after { width: 100%; }
.nav-link.active, .nav-link:hover { color: var(--neon-cyan); }

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

.nav-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.6rem;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
  transition: border-color 0.3s, color 0.3s;
}
html.light .nav-btn { border-color: rgba(0, 0, 0, 0.1); color: rgba(0, 0, 0, 0.6); }
.nav-btn:hover { border-color: var(--neon-cyan); color: var(--neon-cyan); }

.icon-sm { width: 16px; height: 16px; }
.icon-xs { width: 12px; height: 12px; }

.mobile-only { display: none; }

/* Mobile menu */
.mobile-menu {
  padding: 1rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-color);
}
html.light .mobile-menu { background: rgba(255, 255, 255, 0.8); }

.mobile-link {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  transition: color 0.3s;
}
html.light .mobile-link { color: rgba(0, 0, 0, 0.6); }
.mobile-link:hover, .mobile-link.active { color: var(--neon-cyan); }

/* ============================================================
   4. HERO
   ============================================================ */
#particle-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  max-width: 60rem;
  padding: 0 1.5rem;
  transition: transform 0.15s ease-out;
}

.hero-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 6.5vw, 7rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
  text-align: center;
  width: 100%;
  word-break: break-word;
  overflow-wrap: break-word;
}
.hero-name-white { color: var(--text-primary); display: block; }

.hero-role {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.hero-tagline {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 32rem;
  margin: 0 auto 2.5rem;
}

.hero-ctas {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.hero-socials {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.3);
  animation: bounce 2s infinite;
}
html.light .scroll-indicator { color: rgba(0, 0, 0, 0.3); }

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* ============================================================
   5. ABOUT
   ============================================================ */
.section {
  position: relative;
  padding: var(--section-py) 0;
  background: var(--bg-primary);
  z-index: 1;
}
.section-alt { background: var(--bg-secondary); }

.section-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--neon-cyan);
  margin-bottom: 1.5rem;
}
.section-label::before {
  content: '';
  width: 2rem; height: 1px;
  background: var(--neon-cyan);
}
.section-label.center {
  justify-content: center;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.75rem, 4vw, 3rem);
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.section-subtitle {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4rem;
  margin-top: 2rem;
}

.about-bio {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1rem;
}

/* Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 2.5rem;
  text-align: center;
}

.stat-value {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-variant-numeric: tabular-nums;
}
.stat-suffix {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 3.5vw, 3rem);
}

.stat-label {
  display: block;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* Skills */
.skills-title {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: 2rem;
}

.skills-list { display: flex; flex-direction: column; gap: 1.25rem; }

.skill-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.skill-name {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--neon-cyan);
}

.skill-percent {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: var(--text-secondary);
  opacity: 0.7;
}

.hud-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 2px;
  overflow: hidden;
}
html.light .hud-bar { background: rgba(0, 0, 0, 0.08); }

.hud-bar-fill {
  height: 100%;
  width: 0;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-violet));
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
  transition: width 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.hud-bar-fill.animated { width: var(--target-width); }

/* ============================================================
   6. PROJETS
   ============================================================ */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
}

.filter-btn {
  padding: 0.5rem 1.25rem;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.5);
  transition: all 0.3s;
}
html.light .filter-btn { border-color: rgba(0, 0, 0, 0.1); color: rgba(0, 0, 0, 0.5); }
.filter-btn:hover { border-color: rgba(0, 240, 255, 0.3); color: rgba(255, 255, 255, 0.8); }
html.light .filter-btn:hover { border-color: rgba(0, 153, 170, 0.3); color: rgba(0, 0, 0, 0.7); }

.filter-btn.active {
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
  background: rgba(0, 240, 255, 0.05);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.15);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

/* Project card */
.project-card {
  position: relative;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(8px);
  cursor: pointer;
  transform-style: preserve-3d;
  transition: transform 0.15s ease-out, opacity 0.4s, border-color 0.3s;
}
html.light .project-card { background: rgba(255, 255, 255, 0.8); }
.project-card:hover { border-color: rgba(0, 240, 255, 0.3); }

.project-card.hidden-filter {
  display: none;
}

.project-card-img {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
}
.project-card-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}
.project-card:hover .project-card-img img { transform: scale(1.1); }

.project-card-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8), rgba(0,0,0,0.2), transparent);
}

.project-badge {
  position: absolute;
  top: 0.75rem; right: 0.75rem;
  z-index: 2;
  padding: 0.2rem 0.6rem;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  background: rgba(0, 240, 255, 0.15);
  border: 1px solid rgba(0, 240, 255, 0.3);
  color: var(--neon-cyan);
}

.project-music-badge {
  position: absolute;
  top: 0.75rem; left: 0.75rem;
  z-index: 2;
  padding: 0.35rem;
  background: rgba(112, 0, 255, 0.3);
  border: 1px solid rgba(112, 0, 255, 0.5);
  display: flex;
}
.project-music-badge svg { width: 12px; height: 12px; color: #c084fc; }

.project-year-badge {
  position: absolute;
  top: 0.75rem; left: 0.75rem;
  z-index: 2;
  padding: 0.2rem 0.6rem;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  background: rgba(0, 0, 0, 0.5);
  color: rgba(255, 255, 255, 0.7);
}

.project-card-body { padding: 1.25rem; }

.project-card-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  transition: color 0.3s;
}
.project-card:hover .project-card-title { color: var(--neon-cyan); }

.project-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.75rem; }

.project-tag {
  padding: 0.15rem 0.5rem;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: rgba(0, 240, 255, 0.05);
  border: 1px solid rgba(0, 240, 255, 0.15);
  color: var(--neon-cyan);
}

.project-card-more {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--neon-cyan);
  opacity: 0;
  transition: opacity 0.3s;
}
.project-card:hover .project-card-more { opacity: 1; }

/* ============================================================
   7. GALERIE PEXELS
   ============================================================ */
.gallery-profile-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  transition: color 0.3s;
}
.gallery-profile-link:hover { color: var(--neon-cyan); }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.gallery-item {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
}

.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}
.gallery-item:hover img { transform: scale(1.1); }

.gallery-item-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
  opacity: 0;
  transition: opacity 0.3s;
  display: flex;
  align-items: flex-end;
  padding: 1rem;
}
.gallery-item:hover .gallery-item-overlay { opacity: 1; }

.gallery-item-photographer {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.9);
}

.gallery-error { text-align: center; padding: 3rem 0; }
.gallery-error p { color: #EF4444; font-family: var(--font-body); margin-bottom: 1rem; }

.gallery-loadmore { text-align: center; margin-top: 2.5rem; }

/* Skeleton */
.skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.03) 75%);
  background-size: 200% 100%;
  animation: shimmer 2s infinite linear;
  border-radius: 4px;
}
html.light .skeleton {
  background: linear-gradient(90deg, rgba(0,0,0,0.03) 25%, rgba(0,0,0,0.08) 50%, rgba(0,0,0,0.03) 75%);
  background-size: 200% 100%;
}
.skeleton-photo { aspect-ratio: 4/3; }

@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }

/* ============================================================
   8. CONTACT
   ============================================================ */
.contact-socials {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 3rem;
}

.contact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1.5rem 2rem;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(16px);
  transition: all 0.3s;
}
html.light .contact-card { background: rgba(255, 255, 255, 0.7); }
.contact-card:hover {
  border-color: rgba(0, 240, 255, 0.4);
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.15);
}

.contact-icon {
  width: 28px; height: 28px;
  color: rgba(255, 255, 255, 0.5);
  transition: color 0.3s;
}
html.light .contact-icon { color: rgba(0, 0, 0, 0.4); }
.contact-card:hover .contact-icon { color: var(--neon-cyan); }

.contact-card-label {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  transition: color 0.3s;
}
html.light .contact-card-label { color: rgba(0, 0, 0, 0.4); }
.contact-card:hover .contact-card-label { color: var(--neon-cyan); }

/* ============================================================
   9. FOOTER
   ============================================================ */
#footer {
  border-top: 1px solid var(--border-color);
  background: var(--bg-primary);
  padding: 3rem 0;
  position: relative;
  z-index: 1;
}

.footer-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-left { display: flex; flex-direction: column; gap: 0.35rem; }
.footer-copy { font-size: 0.75rem; color: var(--text-muted); }
.footer-made { font-family: var(--font-ui); font-size: 0.7rem; letter-spacing: 0.1em; color: var(--text-muted); opacity: 0.5; }

.footer-socials { display: flex; gap: 1rem; }

.back-to-top {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.3s;
}
.back-to-top:hover { color: var(--neon-cyan); }

/* ============================================================
   10. MODAL
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
}

.modal-content {
  position: relative;
  max-width: 48rem;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 2rem;
}

.modal-close-btn {
  position: absolute;
  top: 1rem; right: 1rem;
  color: var(--text-secondary);
  z-index: 10;
  transition: color 0.3s;
}
.modal-close-btn:hover { color: var(--neon-cyan); }

.modal-image {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border: 1px solid var(--border-color);
  margin-bottom: 1.5rem;
}

.modal-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.modal-category {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--neon-cyan);
  margin-bottom: 1rem;
}

.modal-desc {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.modal-tech-title {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--neon-cyan);
  margin-bottom: 0.75rem;
}

.modal-listen-box {
  margin-top: 1rem;
  padding: 1rem;
  background: rgba(112, 0, 255, 0.05);
  border: 1px solid rgba(112, 0, 255, 0.2);
}
.modal-listen-label {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #c084fc;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.modal-listen-placeholder {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
}

/* ============================================================
   11. EFFETS (boutons, glass, grain, scanline, social links)
   ============================================================ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 2rem;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--neon-cyan);
  border: 1px solid rgba(0, 240, 255, 0.3);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.15), inset 0 0 15px rgba(0, 240, 255, 0.05);
  background: rgba(0, 240, 255, 0.05);
  transition: all 0.3s;
}
.btn-primary:hover {
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.3);
}

.btn-secondary {
  display: inline-flex;
  padding: 0.75rem 2rem;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.6);
  transition: all 0.3s;
}
html.light .btn-secondary { border-color: rgba(0, 0, 0, 0.15); color: rgba(0, 0, 0, 0.6); }

/* Energy pulse effect */
.btn-energy { position: relative; overflow: hidden; }
.btn-energy::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(0, 240, 255, 0.3), transparent);
  transform: scaleX(0);
  transform-origin: left;
}
.btn-energy:hover::after { animation: energy-sweep 0.6s ease-out; }
@keyframes energy-sweep {
  0% { transform: scaleX(0); opacity: 1; }
  100% { transform: scaleX(1); opacity: 0; }
}

/* Social links */
.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem; height: 2.5rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.6);
  transition: all 0.3s;
}
html.light .social-link { border-color: rgba(0, 0, 0, 0.1); color: rgba(0, 0, 0, 0.5); }
.social-link:hover {
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.3);
  transform: translateY(-2px);
}
.social-link svg { width: 18px; height: 18px; }

/* Glass */
.glass {
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
html.light .glass { background: rgba(255, 255, 255, 0.7); border-color: rgba(0, 0, 0, 0.08); }

/* Grain overlay */
.grain-overlay::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px;
}
html.light .grain-overlay::before { opacity: 0.02; }

/* Scanline */
.scanline::after {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 4px;
  background: linear-gradient(to bottom, transparent, rgba(0, 240, 255, 0.08), transparent);
  z-index: 9998;
  pointer-events: none;
  animation: scanmove 8s linear infinite;
}
@keyframes scanmove { 0% { top: -4px; } 100% { top: 100vh; } }

/* ============================================================
   12. ANIMATIONS & SCROLL REVEAL
   ============================================================ */
.reveal-element {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.16,1,0.3,1),
              transform 0.8s cubic-bezier(0.16,1,0.3,1),
              filter 0.8s cubic-bezier(0.16,1,0.3,1);
  filter: blur(4px);
}
.reveal-element.revealed {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

/* Stagger children delay */
.reveal-stagger > .reveal-element:nth-child(1) { transition-delay: 0s; }
.reveal-stagger > .reveal-element:nth-child(2) { transition-delay: 0.1s; }
.reveal-stagger > .reveal-element:nth-child(3) { transition-delay: 0.15s; }
.reveal-stagger > .reveal-element:nth-child(4) { transition-delay: 0.2s; }
.reveal-stagger > .reveal-element:nth-child(5) { transition-delay: 0.25s; }
.reveal-stagger > .reveal-element:nth-child(6) { transition-delay: 0.3s; }
.reveal-stagger > .reveal-element:nth-child(7) { transition-delay: 0.35s; }
.reveal-stagger > .reveal-element:nth-child(8) { transition-delay: 0.4s; }
.reveal-stagger > .reveal-element:nth-child(9) { transition-delay: 0.45s; }
.reveal-stagger > .reveal-element:nth-child(10) { transition-delay: 0.5s; }
.reveal-stagger > .reveal-element:nth-child(11) { transition-delay: 0.55s; }

/* ============================================================
   13. RESPONSIVE
   ============================================================ */
@media (min-width: 1024px) {
  .about-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 1023px) {
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  :root { --section-py: 4rem; }
  .nav-links { display: none; }
  .mobile-only { display: flex; }
  .projects-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-socials { flex-direction: column; align-items: center; }
  .footer-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .gallery-grid { grid-template-columns: 1fr; }
  .hero-ctas { flex-direction: column; align-items: center; }
}

/* ============================================================
   14. REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .reveal-element {
    opacity: 1; transform: none; filter: none; transition: none;
  }
  .scanline::after, .grain-overlay::before { display: none; }
  .btn-energy::after { display: none; }
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
