/* ============================================
   PORTFOLIO TECH/CYBERSÉCURITÉ - CUSTOM CSS
   Design System & Component Styles
   ============================================ */

/* ============================================
   1. CSS VARIABLES - Design Tokens
   ============================================ */
:root {
  /* Background Colors (brighter, improved contrast) */
  --bg-primary: #0f3b6e; /* brighter indigo */
  --bg-secondary: #17527f; /* richer ocean blue */
  --bg-tertiary: #163347; /* softer surface */
  --bg-surface: #123144; /* lighter card surface */

  /* Multi-color accents */
  --accent-a: #00bfff; /* cyan */
  --accent-b: #ff89d1; /* pink-pastel */
  --accent-c: #56e372; /* lime */
  --accent-d: #ffe08a; /* warm soft yellow */

  /* Neon Accent Colors (updated) */
  --neon-cyan: var(--accent-a);
  --neon-green: var(--accent-c);
  --neon-purple: #b026ff;
  --neon-pink: var(--accent-b);

  /* Text Colors */
  --text-primary: #f6fbff;
  --text-secondary: #d5e6f4;
  --text-muted: #9aa6b6;

  /* Effects */
  --border-glow: rgba(0, 191, 255, 0.16);
  --shadow-accent-a: 0 6px 30px rgba(0, 191, 255, 0.05);
  --shadow-accent-b: 0 6px 30px rgba(255, 137, 209, 0.04);
  --surface-alpha: rgba(255,255,255,0.045);
}

/* ============================================
   2. BASE STYLES
   ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ============================================
   3. TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  line-height: 1.2;
}

.font-mono {
  font-family: 'Space Mono', monospace;
}

/* Text Glow Effect */
.text-glow {
  text-shadow: 0 0 6px currentColor, 0 0 12px currentColor;
}

.text-glow-cyan {
  color: var(--neon-cyan);
  text-shadow: 0 0 6px rgba(0,191,255,0.9), 0 0 12px rgba(0,191,255,0.6);
}

.text-glow-green {
  color: var(--neon-green);
  text-shadow: 0 0 6px rgba(86,227,114,0.9), 0 0 12px rgba(86,227,114,0.5);
}

/* ============================================
   4. BUTTONS
   ============================================ */
.btn-primary {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(90deg, var(--accent-a), var(--accent-b));
  color: #071022;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border-radius: 0.6rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-accent-a), var(--shadow-accent-b);
}

.btn-primary:hover {
  transform: translateY(-3px) scale(1.02);
}

.btn-secondary {
  display: inline-block;
  padding: 0.65rem 1.25rem;
  background: linear-gradient(90deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  color: var(--accent-a);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 0.6rem;
  transition: all 0.25s ease;
  cursor: pointer;
}

.btn-secondary:hover {
  background: linear-gradient(90deg, rgba(0,212,255,0.06), rgba(255,107,214,0.04));
  color: #071022;
  box-shadow: var(--shadow-accent-b);
} 

.btn-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--neon-cyan);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.btn-link:hover {
  color: var(--neon-green);
}

/* ============================================
   5. CARDS
   ============================================ */
.skill-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  padding: 1.6rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(255,255,255,0.04);
  transition: all 0.25s ease;
}

.skill-card:hover {
  border-color: rgba(0,199,255,0.12);
  box-shadow: 0 10px 30px rgba(0,199,255,0.04);
  transform: translateY(-6px);
}

.skill-card .icon-container {
  margin-bottom: 1rem;
}

.project-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  padding: 1.25rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(255,255,255,0.04);
  transition: all 0.25s ease;
  cursor: pointer;
}

.project-card:hover {
  border-color: rgba(176, 38, 255, 0.08);
  box-shadow: 0 10px 30px rgba(176, 38, 255, 0.04);
  transform: translateY(-6px);
}

.rss-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  padding: 1.25rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(255,255,255,0.04);
  transition: all 0.3s ease;
}

.rss-card:hover {
  box-shadow: 0 10px 30px rgba(0, 199, 255, 0.04);
  transform: translateY(-4px);
}

.project-card img {
  transition: transform 0.3s ease;
}

.project-card:hover img {
  transform: scale(1.05);
}

.news-card {
  background-color: var(--bg-tertiary);
  padding: 2rem;
  border-radius: 0.75rem;
  border-left: 4px solid var(--neon-green);
  transition: all 0.3s ease;
}

.news-card:hover {
  box-shadow: 0 8px 24px rgba(57, 255, 20, 0.15);
}

/* ============================================
   RSS FEED CARDS
   ============================================ */
. rss-controls {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.rss-card {
  background-color: var(--bg-tertiary);
  padding: 1.25rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(0, 240, 255, 0.06);
  transition: all 0.3s ease;
}

.rss-card:hover {
  box-shadow: 0 10px 30px rgba(0, 240, 255, 0.06);
  transform: translateY(-4px);
}

.rss-card h4 {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}

.rss-meta {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.rss-excerpt {
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.rss-link {
  color: var(--neon-cyan);
  font-weight: 600;
  text-decoration: none;
}

.rss-empty {
  color: var(--text-secondary);
  text-align: center;
  padding: 1.5rem 0;
}

/* ============================================
   6. BADGES
   ============================================ */
.tech-badge {
  display: inline-block;
  padding: 0.45rem 0.9rem;
  font-size: 0.875rem;
  background: linear-gradient(90deg, rgba(0,212,255,0.06), rgba(123,255,106,0.04));
  color: var(--accent-a);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 9999px;
  font-weight: 600;
}

.tech-badge-large {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  font-size: 1rem;
  background: linear-gradient(90deg, rgba(255,107,214,0.06), rgba(255,209,102,0.04));
  color: var(--accent-b);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 0.5rem;
  font-weight: 700;
}

.skill-tag {
  display: inline-block;
  padding: 0.45rem 0.9rem;
  font-size: 0.875rem;
  background: linear-gradient(90deg, rgba(123,255,106,0.06), rgba(0,212,255,0.03));
  color: var(--accent-c);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 0.5rem;
  font-weight: 600;
}

/* ============================================
   7. NAVIGATION
   ============================================ */
.nav-link {
  position: relative;
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 0;
  transition: color 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--neon-cyan);
  transition: width 0.3s ease;
}

.nav-link:hover {
  color: var(--neon-cyan);
}

.nav-link:hover::after {
  width: 100%;
}

.nav-link.active {
  color: var(--neon-cyan);
}

.nav-link.active::after {
  width: 100%;
}

/* ============================================
   8. ANIMATIONS
   ============================================ */
@keyframes neon-pulse {
  0%, 100% {
    box-shadow: 0 0 10px var(--neon-cyan), 0 0 20px var(--neon-cyan);
  }
  50% {
    box-shadow: 0 0 20px var(--neon-cyan), 0 0 30px var(--neon-cyan), 0 0 40px var(--neon-cyan);
  }
}

.neon-pulse {
  animation: neon-pulse 2s ease-in-out infinite;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.float-animation {
  animation: float 3s ease-in-out infinite;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

/* ============================================
   9. UTILITY CLASSES
   ============================================ */
.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-4px);
}

/* Filter bar for projects page */
.filter-bar {
  gap: 0.25rem;
}

.filter-btn {
  background: transparent;
  color: var(--text-primary);
  border-radius: 9999px;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  background: rgba(0,240,255,0.06);
  color: var(--neon-cyan);
}

.filter-btn.active {
  background: linear-gradient(90deg, rgba(0,240,255,0.12), rgba(176,38,255,0.06));
  color: var(--neon-cyan);
  border-color: rgba(0,240,255,0.18);
  box-shadow: 0 4px 18px rgba(0,240,255,0.06);
}

.glass-effect {
  background: linear-gradient(135deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 6px 20px rgba(16,34,56,0.35), var(--shadow-accent-a);
  border-radius: 0.75rem;
} 

.stat-box {
  text-align: center;
  padding: 1.5rem;
  background-color: var(--bg-tertiary);
  border-radius: 0.5rem;
  border: 1px solid rgba(0, 240, 255, 0.2);
  transition: all 0.3s ease;
}

.stat-box:hover {
  border-color: rgba(0, 240, 255, 0.5);
  transform: translateY(-2px);
}

/* ============================================
   10. MOBILE MENU
   ============================================ */
.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: rgba(10, 14, 39, 0.98);
  backdrop-filter: blur(10px);
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-menu nav {
  text-align: center;
}

.mobile-menu a {
  display: block;
  color: var(--text-primary);
  font-size: 1.5rem;
  font-weight: 600;
  text-decoration: none;
  padding: 1rem;
  transition: color 0.3s ease;
}

.mobile-menu a:hover {
  color: var(--neon-cyan);
}

/* ============================================
   11. RESPONSIVE UTILITIES
   ============================================ */
@media (max-width: 768px) {
  .skill-card, .project-card, .news-card {
    padding: 1.5rem;
  }

  h1 {
    font-size: 2.5rem;
  }

  h2 {
    font-size: 2rem;
  }
}

/* ============================================
   12. PROSE / RICH TEXT CONTENT
   ============================================ */
.prose {
  max-width: 65ch;
  color: var(--text-secondary);
}

/* ============================================
   THEME: Bright / Colorful Override
   ============================================ */
.theme-bright {
  --bg-primary: #f4f8ff;
  --bg-secondary: #eef6ff;
  --bg-tertiary: #ffffff;
  --bg-surface: #ffffff;
  --text-primary: #071022;
  --text-secondary: #3b4b5b;
  --accent-a: #0077cc;
  --accent-b: #ff5fb4;
  --accent-c: #1db954;
  --neon-cyan: var(--accent-a);
  --neon-green: var(--accent-c);
  --neon-pink: var(--accent-b);
  --border-glow: rgba(0, 119, 204, 0.12);
}

/* Theme toggle button */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.45rem 0.6rem;
  border-radius: 0.5rem;
  background: linear-gradient(90deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  color: var(--accent-a);
  border: 1px solid rgba(255,255,255,0.04);
}

.theme-toggle i { pointer-events: none; }

/* HERO CONTRAST FIXES */
.hero-contrast { color: var(--text-primary); }
.hero-contrast p, .hero-contrast .text-gray-300, .hero-contrast .text-gray-400 {
  color: var(--text-secondary) !important;
  font-weight: 600;
  line-height: 1.6;
}
.hero-contrast .btn-primary, .hero-contrast .btn-secondary { box-shadow: 0 8px 30px rgba(0,0,0,0.08); }
.hero-contrast .text-glow-cyan { text-shadow: none; color: var(--neon-cyan); }
.hero-contrast h1 { color: var(--text-primary); text-shadow: none; font-size: clamp(2.5rem, 6vw, 4rem); }
.hero-contrast p { color: var(--text-secondary); }

/* mobile adjustment */
@media (max-width: 768px) {
  .hero-contrast p { font-size: 1rem; }
}


/* Palette selector */
.palette-selector {
  display: inline-flex;
  gap: 0.4rem;
  align-items: center;
  margin-left: 0.6rem;
}

.palette-btn {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.06);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.palette-btn:hover { transform: translateY(-2px); }

.palette-btn[data-palette="pastel"] { background: linear-gradient(90deg, #bfe9ff, #ffd3f0); }
.palette-btn[data-palette="vibrant"] { background: linear-gradient(90deg, #00bfff, #ff5fb4); }
.palette-btn[data-palette="default"] { background: linear-gradient(90deg, var(--accent-a), var(--accent-b)); }

.palette-btn.active { box-shadow: 0 6px 20px rgba(0,0,0,0.12); transform: translateY(-3px); }

/* Theme presets (variable overrides) */
.theme-pastel {
  --accent-a: #66c2ff;
  --accent-b: #ffc7e6;
  --accent-c: #9feab6;
  --accent-d: #fff0b8;
  --text-primary: #072033;
  --bg-primary: #f7fbff;
  --bg-secondary: #f2f8ff;
  --bg-tertiary: #ffffff;
  --bg-surface: #ffffff;
}

.theme-vibrant {
  --accent-a: #00bfff;
  --accent-b: #ff4fa3;
  --accent-c: #34d04a;
  --accent-d: #ffd25f;
  --text-primary: #071022;
  --bg-primary: #07192a;
  --bg-secondary: #0b2a3f;
  --bg-tertiary: #071a2a;
  --bg-surface: #081a2b;
}


.prose h2 {
  color: var(--neon-cyan);
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.prose h3 {
  color: var(--text-primary);
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.prose p {
  margin-bottom: 1rem;
}

.prose ul, .prose ol {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.prose li {
  margin-bottom: 0.5rem;
}

.prose a {
  color: var(--neon-cyan);
  text-decoration: underline;
}

.prose a:hover {
  color: var(--neon-green);
}

/* ============================================
   13. ACCESSIBILITY
   ============================================ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

:focus-visible {
  outline: 2px solid var(--neon-cyan);
  outline-offset: 2px;
}
