/*
  DYSKOLOS PORTFOLIO
  Thème inspiré de Node.js avec design sombre et bleu électrique
  
  Table des matières:
  1. Variables et configuration
  2. Reset et bases
  3. Layout et conteneurs
  4. En-tête et navigation
  5. Héro et animation
  6. Grille Bento et cartes
  7. Sections spécifiques
  8. Footer
  9. Curseur personnalisé
  10. Animations
  11. Effets visuels (particules, blobs)
  12. Thème clair
  13. Media queries
*/

/* 1. Variables et configuration */
:root {
    /* Couleurs - Mode sombre par défaut */
    --bg-primary: #0f172a;
    --bg-secondary: #1a2234;
    --bg-tertiary: #242f45;
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent-primary: #3eeafd;
    --accent-primary-rgb: 62, 234, 253;
    --accent-secondary: #0e8ac6;
    --accent-secondary-rgb: 14, 138, 198;
    --node-green: #68a063;
    --node-green-rgb: 104, 160, 99;
    
    /* Nouveaux dégradés modernes */
    --gradient-blue: linear-gradient(135deg, #3eeafd, #0e8ac6);
    --gradient-node: linear-gradient(135deg, #8cc84b, #68a063);
    --gradient-modern: linear-gradient(135deg, #3eeafd, #6366f1);
    --gradient-dark: linear-gradient(135deg, #0f172a, #1e293b);
    --gradient-glow: linear-gradient(135deg, rgba(62, 234, 253, 0.4), rgba(99, 102, 241, 0.1));
    
    /* Effets glassmorphism */
    --glass-bg: rgba(15, 23, 42, 0.7);
    --glass-bg-light: rgba(248, 250, 252, 0.7);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    
    /* Ombres améliorées */
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 10px 15px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 20px 25px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 10px rgba(62, 234, 253, 0.25);
    --shadow-node: 0 0 15px rgba(104, 160, 99, 0.5);
    --border-color: rgba(148, 163, 184, 0.1);
    
    /* Typographie */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    /* Dimensions et espacements */
    --header-height: 80px;
    --container-width: 1200px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 24px;
    --radius-full: 9999px;
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 16px;
    --space-4: 24px;
    --space-5: 32px;
    --space-6: 48px;
    --space-8: 64px;
    --space-10: 80px;
    
    /* Animations */
    --transition-fast: 0.2s;
    --transition-normal: 0.3s;
    --transition-slow: 0.5s;
    --easing-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
    --easing-smooth: cubic-bezier(0.65, 0, 0.35, 1);
}

/* 2. Reset et bases */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    height: 100%;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100%;
    overflow-x: hidden;
    transition: background-color var(--transition-normal), color var(--transition-normal);
    padding: 0;
    margin: 0;
    border-top: none;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0 0 var(--space-3);
    line-height: 1.2;
    font-weight: 700;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    letter-spacing: -0.025em;
}

h2 {
    font-size: clamp(2rem, 4vw, 2.5rem);
    letter-spacing: -0.02em;
}

h3 {
    font-size: clamp(1.25rem, 2vw, 1.5rem);
}

p {
    margin-bottom: var(--space-4);
    color: var(--text-secondary);
}

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color var(--transition-fast), transform var(--transition-fast);
}

a:hover {
    color: var(--accent-secondary);
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

/* 3. Layout et conteneurs */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--space-4);
    width: 100%;
}

section {
    padding: var(--space-8) 0;
    position: relative;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-4);
    width: 100%;
}

/* 4. En-tête et navigation avec effet glassmorphism */
.header {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    z-index: 100;
    background-color: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    transition: background-color var(--transition-normal);
    box-shadow: var(--shadow-sm);
}

.header-content {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient-blue);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
    transition: transform var(--transition-normal) var(--easing-bounce);
}

.logo-img {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--transition-normal) var(--easing-bounce);
}

.logo-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.logo:hover .logo-icon,
.logo:hover .logo-img {
    transform: rotate(-10deg) scale(1.1);
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-name {
    font-weight: 700;
    font-size: 1.25rem;
    background: var(--gradient-blue);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.logo-tagline {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.theme-switcher {
    position: relative;
}

#theme-toggle {
    width: 60px;
    height: 30px;
    background-color: var(--bg-tertiary);
    border-radius: var(--radius-full);
    padding: 4px;
    transition: background-color var(--transition-normal);
    position: relative;
}

.toggle-track {
    width: 100%;
    height: 100%;
    position: relative;
}

.toggle-indicator {
    position: absolute;
    width: 22px;
    height: 22px;
    background-color: var(--accent-primary);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    left: 4px;
    transition: transform var(--transition-normal) var(--easing-bounce);
    box-shadow: var(--shadow-glow);
    display: flex;
    align-items: center;
    justify-content: center;
}

.light-mode .toggle-indicator {
    transform: translateY(-50%) translateX(30px);
}

.toggle-icon::before {
    content: "🌙";
    font-size: 12px;
    transition: transform var(--transition-slow), opacity var(--transition-slow);
}

.light-mode .toggle-icon::before {
    content: "☀️";
}

/* 5. Héro et animation */
.hero-section {
    min-height: calc(100vh - var(--header-height));
    display: flex;
    align-items: center;
    padding: var(--space-10) 0;
    position: relative;
    overflow: hidden;
}

.hero-section .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-6);
    align-items: center;
}

.hero-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-title {
    margin-bottom: var(--space-4);
    position: relative;
    animation: popIn 0.8s ease-out forwards;
}

.hero-title::after {
    content: '';
    width: 80px;
    height: 4px;
    background: var(--gradient-blue);
    position: absolute;
    bottom: -10px;
    left: 0;
    border-radius: var(--radius-full);
}

.accent-text {
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary), var(--accent-primary));
    background-size: 200% auto;
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    animation: shimmerText 8s linear infinite;
}

@keyframes glow {
    0% {
        text-shadow: 0 0 5px rgba(62, 234, 253, 0.1);
    }
    50% {
        text-shadow: 0 0 15px rgba(62, 234, 253, 0.3);
    }
    100% {
        text-shadow: 0 0 5px rgba(62, 234, 253, 0.1);
    }
}

.hero-description {
    font-size: 1.2rem;
    max-width: 600px;
    margin-bottom: var(--space-5);
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-top: var(--space-5);
}

.tech-badge {
    background-color: rgba(62, 234, 253, 0.08);
    color: var(--accent-primary);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid rgba(62, 234, 253, 0.2);
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
    animation: popIn 0.5s ease-out forwards;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.tech-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 12px rgba(62, 234, 253, 0.4);
    background-color: rgba(62, 234, 253, 0.12);
    border-color: rgba(62, 234, 253, 0.4);
}

.tech-badge:hover::before {
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Style Node.js pour certains badges */
.tech-badge:nth-child(even) {
    background-color: rgba(104, 160, 99, 0.1);
    color: var(--node-green);
    border: 1px solid rgba(104, 160, 99, 0.2);
}

.tech-badge:nth-child(even):hover {
    box-shadow: var(--shadow-node);
    background-color: rgba(104, 160, 99, 0.15);
}

.tech-badge:nth-child(even)::before {
    background: linear-gradient(90deg, transparent, rgba(104, 160, 99, 0.2), transparent);
}

.hero-animation-container {
    width: 100%;
    height: 320px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: var(--space-4);
    perspective: 1000px;
    background: none;
}

.hero-animation {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transform-style: preserve-3d;
    animation: rotateSlowly 120s linear infinite;
    background: none;
    box-shadow: none;
}

/* 6. Grille Bento et cartes */
.section-title {
    font-size: 2rem;
    margin-bottom: var(--space-6);
    position: relative;
    display: inline-block;
    animation: popIn 0.6s ease-out forwards;
}

.section-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -10px;
    width: 60px;
    height: 4px;
    background: var(--gradient-blue);
    border-radius: var(--radius-full);
    transition: width var(--transition-normal) var(--easing-bounce);
}

.section-title:hover::after {
    width: 100%;
}

.bento-card {
    background-color: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: var(--space-5);
    border: 1px solid var(--border-color);
    transition: transform 0.4s var(--easing-bounce), 
                box-shadow 0.4s var(--easing-standard), 
                background-color 0.3s var(--easing-standard);
    will-change: transform;
    transform: translateY(0);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    height: 100%;
    min-height: 240px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.bento-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-blue);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-normal) var(--easing-bounce);
}

.bento-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.card-icon {
    margin-bottom: var(--space-4);
    width: 48px;
    height: 48px;
    background: rgba(62, 234, 253, 0.1);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.5s var(--easing-bounce);
    position: relative;
    transform-origin: center;
}

.bento-card:hover .card-icon {
    transform: scale(1.15) rotate(5deg);
    animation: pulseIcon 2s infinite alternate var(--easing-standard);
}

.icon {
    width: 24px;
    height: 24px;
    color: var(--accent-primary);
    transition: transform 0.4s var(--easing-bounce), color 0.4s;
}

.bento-card:hover .icon {
    color: var(--accent-secondary);
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: var(--space-2);
    color: var(--text-primary);
    position: relative;
    overflow: hidden;
}

.card-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-blue);
    transition: width 0.4s var(--easing-bounce);
}

.bento-card:hover .card-title::after {
    width: 100%;
}

.card-description {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-3);
    flex-grow: 1;
}

.card-link {
    font-size: 0.95rem;
    color: var(--accent-primary);
    font-weight: 500;
    display: flex;
    align-items: center;
    margin-top: auto;
    transition: all var(--transition-normal);
}

.arrow {
    display: inline-block;
    margin-left: var(--space-2);
    transition: transform 0.3s var(--easing-bounce);
    position: relative;
}

.bento-card:hover .arrow {
    transform: translateX(8px);
}

.highlight {
    border: 1px solid rgba(62, 234, 253, 0.2);
    background: linear-gradient(135deg, rgba(62, 234, 253, 0.05), rgba(10, 40, 70, 0.2));
    animation: borderPulse 3s infinite;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

/* 7. Sections spécifiques */
/* Section contributions */
.contributions-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-4);
}

.contribution-card .card-icon {
    background: rgba(104, 160, 99, 0.1);
    transform-origin: center;
}

.contribution-card:hover .card-icon {
    background: rgba(104, 160, 99, 0.2);
    animation: rotateIcon 2s ease-in-out infinite;
}

.contribution-card .icon {
    color: var(--node-green);
}

.contribution-card {
    animation-delay: 0.2s;
    transform-origin: center;
}

.contribution-card:nth-child(2) {
    animation-delay: 0.4s;
}

/* Section contact */
.contact-grid {
    grid-template-columns: 1fr;
}

.contact-card {
    background-color: var(--glass-bg);
    border-radius: var(--radius-md);
    padding: var(--space-5);
    border: 1px solid var(--glass-border);
    animation: popIn 0.6s ease-out forwards;
    transform-origin: center;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--glass-shadow);
}

.contact-description {
    margin-bottom: var(--space-4);
    max-width: 600px;
    animation: fadeIn 0.6s ease-out forwards;
    animation-delay: 0.2s;
    opacity: 0;
    animation-fill-mode: forwards;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.contact-link {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    transition: all 0.3s var(--easing-bounce);
    width: fit-content;
    opacity: 0;
    animation: slideInRight 0.5s ease-out forwards;
    animation-fill-mode: forwards;
}

.contact-link:nth-child(1) {
    animation-delay: 0.4s;
}

.contact-link:nth-child(2) {
    animation-delay: 0.6s;
}

.contact-link:hover {
    transform: translateX(5px) scale(1.05);
    color: var(--accent-primary);
}

.contact-link .icon {
    width: 20px;
    height: 20px;
    animation: rotateIcon 3s ease-in-out infinite;
    animation-delay: 1s;
}

/* 8. Footer */
.footer {
    background-color: var(--glass-bg);
    padding: var(--space-6) 0;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    margin-top: var(--space-8);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.footer::before {
    display: none;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-copyright {
    color: var(--text-secondary);
    font-size: 0.875rem;
    animation: fadeIn 0.6s ease-out forwards;
}

.footer-links {
    display: flex;
    gap: var(--space-4);
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.875rem;
    transition: color 0.3s, transform 0.3s var(--easing-bounce);
    opacity: 0;
    animation: fadeIn 0.5s ease-out forwards;
    position: relative;
}

.footer-links a:nth-child(1) {
    animation-delay: 0.2s;
}

.footer-links a:nth-child(2) {
    animation-delay: 0.4s;
}

.footer-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-primary);
    transition: width 0.3s var(--easing-bounce);
}

.footer-links a:hover {
    color: var(--accent-primary);
    transform: translateY(-2px);
}

.footer-links a:hover::after {
    width: 100%;
}

/* 9. Curseur personnalisé */
.cursor {
    position: fixed;
    left: 0;
    top: 0;
    pointer-events: none;
    z-index: 9999;
}

.cursor-dot {
    position: fixed;
    width: 8px;
    height: 8px;
    background-color: var(--accent-primary);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s ease-in-out, transform 0.2s ease-in-out;
}

.cursor-outline {
    position: fixed;
    width: 40px;
    height: 40px;
    border: 2px solid var(--accent-primary);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out, width 0.3s ease, height 0.3s ease;
    opacity: 0.4;
}

/* 10. Animations */
@keyframes subtleFloat {
    0% { transform: translate(-50%, -50%); }
    50% { transform: translate(-50%, -50%) translateY(-3px); }
    100% { transform: translate(-50%, -50%); }
}

@keyframes pulse {
    0% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.05); }
    100% { opacity: 0.4; transform: scale(1); }
}

/* Nouvelles animations */
@keyframes scaleUp {
    0% { transform: scale(0.95); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

@keyframes popIn {
    0% { transform: scale(0.8); opacity: 0; }
    80% { transform: scale(1.05); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes shimmerText {
    0% { background-position: -100% 0; }
    100% { background-position: 200% 0; }
}

@keyframes floatCard {
    0% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
    100% { transform: translateY(0); }
}

@keyframes rotateIcon {
    0% { transform: rotate(0deg); }
    25% { transform: rotate(10deg); }
    75% { transform: rotate(-10deg); }
    100% { transform: rotate(0deg); }
}

@keyframes borderPulse {
    0% { border-color: rgba(62, 234, 253, 0.2); }
    50% { border-color: rgba(62, 234, 253, 0.6); }
    100% { border-color: rgba(62, 234, 253, 0.2); }
}

/* Animation à l'apparition des éléments */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
    will-change: opacity, transform;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Délais différents pour les animations */
.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }
.fade-in-delay-4 { transition-delay: 0.4s; }
.fade-in-delay-5 { transition-delay: 0.5s; }

/* 11. Effets visuels d'arrière-plan */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.02; /* reduced */
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.5' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.06'/%3E%3C/svg%3E");
}

/* Arrière-plan moderne avec grille */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(to bottom, rgba(15, 23, 42, 0.5) 1px, transparent 1px),
        linear-gradient(to right, rgba(15, 23, 42, 0.5) 1px, transparent 1px);
    background-size: 35px 35px;
    opacity: 0.015; /* lighter grid */
    z-index: -4;
    pointer-events: none;
}

/* Arrière-plan avec réseau de traits */
.network-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -3;
    overflow: hidden;
    pointer-events: none;
}

.network-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -3;
}

.mouse-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    transition: background 0.3s ease-out;
}

/* Suppression des anciens styles d'arrière-plan */
.motion-background,
.depth-layer,
.motion-shape,
.network-grid-container,
.network-grid-point,
.modern-particles-container,
.modern-particle,
.modern-particle.square,
.modern-particle.circle,
.modern-particle.line,
.wave-background,
.wave,
.wave-1,
.wave-2,
.wave-3,
.wave-haze,
.grid-container,
.grid-dot,
.grid-dot.accent-dot,
.cyber-background,
.matrix-canvas,
.cyber-grid,
.cyber-line,
.cyber-line.accent-line,
.cyber-glow,
.hexagon-background,
.hexagon-canvas {
    display: none;
}

/* Thème clair avec glassmorphism */
.light-mode {
    --bg-primary: #f0f4f8;
    --bg-secondary: #ffffff;
    --bg-tertiary: #e2e8f0;
    --text-primary: #1e293b;
    --text-secondary: #334155;
    --text-muted: #64748b;
    --accent-primary: #0e98d6;
    --accent-primary-rgb: 14, 152, 214;
    --accent-secondary: #0284c7;
    --accent-secondary-rgb: 2, 132, 199;
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-bg-light: rgba(255, 255, 255, 0.8);
    --border-color: rgba(148, 163, 184, 0.2);
    --shadow-sm: 0 4px 6px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 8px 15px rgba(15, 23, 42, 0.07);
    --shadow-lg: 0 15px 25px rgba(15, 23, 42, 0.08);
    --shadow-glow: 0 0 20px rgba(14, 152, 214, 0.25);
    --glass-border: rgba(255, 255, 255, 0.5);
    --node-green: #2e783c;
    --node-green-rgb: 46, 120, 60;
    
    /* Nouveaux dégradés pour le thème clair */
    --gradient-blue: linear-gradient(135deg, #0ea5e9, #0284c7);
    --gradient-node: linear-gradient(135deg, #4ade80, #22c55e);
    --gradient-modern: linear-gradient(135deg, #38bdf8, #0284c7);
    --gradient-dark: linear-gradient(135deg, #e2e8f0, #cbd5e1);
    --gradient-glow: linear-gradient(135deg, rgba(14, 152, 214, 0.2), rgba(56, 189, 248, 0.1));
}

.light-mode .header {
    background-color: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
}

.light-mode .noise-overlay {
    opacity: 0.015;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

.light-mode body {
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.light-mode body::before {
    background-image: 
        linear-gradient(to bottom, rgba(203, 213, 225, 0.3) 1px, transparent 1px),
        linear-gradient(to right, rgba(203, 213, 225, 0.3) 1px, transparent 1px);
    opacity: 0.4;
    background-size: 40px 40px;
}

.light-mode .mouse-glow {
    opacity: 0.3;
    background: radial-gradient(circle, rgba(14, 152, 214, 0.15) 0%, rgba(255, 255, 255, 0) 70%);
}

.light-mode .bento-card {
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 10px 15px rgba(15, 23, 42, 0.05);
}

.light-mode .bento-card:hover {
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-glow), 0 15px 25px rgba(15, 23, 42, 0.08);
    border-color: rgba(14, 152, 214, 0.3);
}

.light-mode .bento-card::before {
    background: var(--gradient-blue);
    opacity: 0.05;
}

.light-mode .bento-card:hover::before {
    opacity: 0.08;
}

.light-mode .card-icon {
    background-color: rgba(240, 249, 255, 0.8);
    box-shadow: 0 5px 10px rgba(15, 23, 42, 0.05);
}

.light-mode .bento-card:hover .card-icon {
    background: linear-gradient(135deg, #e0f2fe, #bae6fd);
    box-shadow: 0 5px 10px rgba(14, 152, 214, 0.1);
}

.light-mode .icon {
    color: var(--accent-primary);
}

.light-mode .footer {
    background-color: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(203, 213, 225, 0.3);
    box-shadow: 0 -2px 10px rgba(15, 23, 42, 0.03);
}

.light-mode .tech-badge {
    background-color: rgba(240, 249, 255, 0.8);
    color: var(--accent-primary);
    border: 1px solid rgba(186, 230, 253, 0.4);
    box-shadow: 0 2px 5px rgba(15, 23, 42, 0.05);
}

.light-mode .tech-badge:hover {
    background-color: rgba(224, 242, 254, 0.9);
    box-shadow: 0 2px 5px rgba(14, 152, 214, 0.1);
    border-color: rgba(14, 152, 214, 0.3);
}

.light-mode .highlight {
    background: linear-gradient(135deg, rgba(224, 242, 254, 0.8), rgba(186, 230, 253, 0.8));
    border: 1px solid rgba(14, 152, 214, 0.2);
}

.light-mode .highlight:hover {
    background: linear-gradient(135deg, rgba(186, 230, 253, 0.9), rgba(125, 211, 252, 0.3));
    border-color: rgba(14, 152, 214, 0.4);
}

.light-mode .contact-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(240, 249, 255, 0.8));
}

.light-mode ::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

.light-mode ::-webkit-scrollbar-thumb {
    background: #cbd5e1;
}

.light-mode ::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* 13. Media queries */
@media (max-width: 1200px) {
    .container {
        max-width: 95%;
    }
}

@media (max-width: 1024px) {
    :root {
        --header-height: 70px;
        --space-8: 50px;
        --space-10: 70px;
    }
    
    .hero-section .container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-title::after,
    .section-title::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .tech-stack {
        justify-content: center;
    }
    
    .hero-animation {
        grid-row: 1;
        height: 200px;
    }
    
    .section-title {
        display: block;
        text-align: center;
        margin: 0 auto var(--space-6);
    }
    
    /* Réduire l'intensité de l'arrière-plan animé */
    .network-canvas {
        opacity: 0.7;
    }
}

@media (max-width: 768px) {
    :root {
        --space-8: 40px;
        --space-10: 60px;
    }
    
    .bento-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        gap: var(--space-4);
        text-align: center;
    }
    
    /* Garantir que l'animation est cachée sur mobile */
    .hero-animation-container,
    .hero-animation,
    .network-background,
    .network-canvas,
    .mouse-glow {
        display: none !important;
    }
    
    /* Amélioration de la section hero sur mobile */
    .hero-section {
        min-height: auto;
        padding: var(--space-6) 0;
    }
    
    .hero-section .container {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 0 var(--space-3);
        margin: 0 auto;
        max-width: 95%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .hero-content {
        padding: var(--space-4) 0;
        margin: 0 auto;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
    }
    
    .hero-title {
        font-size: clamp(2rem, 7vw, 3rem);
        line-height: 1.2;
        margin-bottom: var(--space-4);
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .hero-title .accent-text {
        display: inline-block;
        text-align: center;
    }
    
    .hero-title::after {
        left: 50%;
        transform: translateX(-50%);
        margin-top: var(--space-2);
    }
    
    .title-line {
        display: block;
        width: 100%;
        text-align: center;
    }
    
    .mobile-break {
        display: block;
        height: 0.5rem;
        width: 100%;
    }
    
    .hero-description {
        font-size: 1rem;
        line-height: 1.5;
        margin: var(--space-3) auto;
        max-width: 90%;
        padding: 0;
        text-align: center;
    }
    
    /* Améliorer l'affichage des badges techniques sur mobile */
    .tech-stack {
        flex-wrap: wrap;
        justify-content: center;
        gap: var(--space-2);
        margin-top: var(--space-3);
        width: 100%;
    }
    
    .tech-badge {
        margin-bottom: var(--space-1);
        padding: var(--space-1) var(--space-2);
        font-size: 0.85rem;
    }
    
    /* Style d'arrière-plan optimisé pour mobile */
    body {
        background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    }
    
    /* Optimiser les animations pour mobile */
    .bento-card:hover {
        animation: none;
        transform: translateY(-5px);
        transition: transform 0.3s ease-out, box-shadow 0.3s ease-out;
    }
    
    .card-icon, 
    .contribution-card:hover .card-icon,
    .contact-link .icon {
        animation: none;
    }
}

/* Extra-small devices */
@media (max-width: 480px) {
    :root {
        --space-4: 16px;
        --space-5: 24px;
        --space-6: 32px;
    }
    
    .logo-tagline {
        display: none;
    }
    
    .hero-title {
        font-size: clamp(1.8rem, 6vw, 2.5rem);
        width: 100%;
        text-align: center;
    }
    
    .hero-description {
        font-size: 0.95rem;
        line-height: 1.4;
        margin: var(--space-2) auto var(--space-3);
        max-width: 95%;
        width: 100%;
        text-align: center;
    }
    
    .mobile-break {
        height: 0.3rem;
    }
    
    .tech-stack {
        flex-wrap: wrap;
        gap: var(--space-1);
        margin-top: var(--space-2);
        width: 100%;
        display: flex;
        justify-content: center;
    }
    
    .tech-badge {
        padding: 4px 10px;
        font-size: 0.8rem;
        margin-bottom: 4px;
    }
    
    .bento-card {
        padding: var(--space-4);
    }
    
    /* Simplifier davantage l'arrière-plan pour les très petits écrans */
    body {
        background: var(--bg-primary);
    }
    
    /* Garantir l'absence d'animation pour les très petits écrans */
    .hero-animation-container,
    .hero-animation {
        display: none !important;
    }
    
    /* Adapter les boutons et éléments interactifs pour écrans tactiles */
    button, a, .bento-card, .tech-badge {
        cursor: default; /* Supprimer les effets de souris sur tactile */
    }
}

/* Suppression des effets de lueur sur les nœuds satellites */
.network-scene::before,
.network-scene::after,
.hero-animation::before,
.hero-animation::after {
    display: none;
}

/* Animation pour la bulle satellite */
.satellite-node {
    animation: subtleFloat 5s ease-in-out infinite;
    transition: all var(--transition-normal) var(--easing-bounce);
}

.satellite-node:nth-child(2n) {
    animation-delay: 0.5s;
    animation-duration: 6s;
}

.satellite-node:nth-child(3n) {
    animation-delay: 1s;
    animation-duration: 7s;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes glowing {
    0% { box-shadow: 0 0 5px rgba(62, 234, 253, 0.5); }
    50% { box-shadow: 0 0 20px rgba(62, 234, 253, 0.8); }
    100% { box-shadow: 0 0 5px rgba(62, 234, 253, 0.5); }
}

/* Effet de scrollbar personnalisé */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 5px;
    border: 2px solid var(--bg-primary);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-secondary);
}

.title-line {
    display: inline-block;
}

/* Classes pour le centrage sur mobile et la suppression de l'animation */
.mobile-centered {
    text-align: center !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.hide-on-mobile {
    display: none !important;
}

/* Arrière-plan simplifié pour mobile */
.mobile-simplified-bg {
    background: var(--bg-primary) !important;
}

.mobile-simplified-bg::before {
    display: none !important;
}

@media (min-width: 992px) {
    .hide-on-mobile {
        display: flex !important;
    }
    
    .mobile-centered {
        text-align: left !important;
        width: auto !important;
        max-width: none !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}

.hero-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

@media (min-width: 992px) {
    .hero-container {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: var(--space-6);
        align-items: center;
    }
}

/* Forcer le centrage sur mobile */
@media (max-width: 992px) {
    .hero-section, 
    .hero-section .container,
    .hero-content, 
    .hero-title, 
    .title-line, 
    .hero-description,
    .tech-stack {
        text-align: center !important;
        align-items: center !important;
        justify-content: center !important;
        margin-left: auto !important;
        margin-right: auto !important;
        display: flex !important;
        flex-direction: column !important;
    }
    
    .hero-content {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }

    .tech-stack {
        flex-direction: row !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
    }
    
    .hero-animation-container,
    .hero-animation,
    #hero-animation {
        display: none !important;
    }
}

/* Further responsive adjustments */
@media (max-width: 600px) {
    /* Bento grid, contributions, projects and skills should be single column */
    .bento-grid, .contributions-grid, .projects-grid, .skills-grid, .contact-grid {
        grid-template-columns: 1fr !important;
        gap: var(--space-4) !important;
    }

    /* Reduce header spacing */
    .header { height: 64px; }
    .logo-name { font-size: 1rem; }

    /* Make hero description smaller */
    .hero-description { font-size: 1rem; }

    /* Footer compact */
    .footer-content { padding: var(--space-4) 0; }

    /* Skill labels stack nicer */
    .skill-label { font-size: 0.95rem; }
}

@media (max-width: 420px) {
    :root { --space-3: 12px; --space-4: 16px; }
    .logo-img img { width: 32px; height: 32px; }
    .toggle-indicator { width: 18px; height: 18px; }
    .nav-list a { font-size: 0.95rem; }
}

@keyframes pulseIcon {
    0% { transform: scale(1.1); }
    100% { transform: scale(1.2) rotate(5deg); }
}

/* Réinitialiser les animations sur mobile */
@media (max-width: 767px) {
    .bento-card:hover {
        transform: none;
        box-shadow: none;
    }
    
    .bento-card:hover .card-icon {
        animation: none;
        transform: none;
    }
    
    /* Suppression de l'animation à droite du texte "Admin Sys & Réseaux" */
    .hero-title::after,
    .accent-text::after {
        display: none !important;
    }
} 

/* 14. Page compétences - barres de compétences */
.skills-section {
    padding: var(--space-8) 0;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--space-6);
    align-items: start;
}

.skills-card {
    background: linear-gradient(180deg, rgba(var(--accent-primary-rgb),0.04), rgba(255,255,255,0.01));
    border: 1px solid var(--glass-border);
    padding: var(--space-5);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

.skills-card h2 {
    margin-bottom: var(--space-2);
    color: var(--text-primary);
}

.skills-card .muted {
    color: var(--text-secondary);
    margin-bottom: var(--space-4);
}

.skill {
    margin-bottom: var(--space-4);
}

.skill-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-2);
    color: var(--text-secondary);
    font-weight: 600;
}

.skill-bar {
    background: linear-gradient(90deg, rgba(255,255,255,0.03), rgba(255,255,255,0.02));
    border-radius: 999px;
    height: 14px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.03);
}

.skill-progress {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    box-shadow: var(--shadow-glow);
    transition: width 1.2s var(--easing-smooth);
}

.skill-percent {
    font-weight: 600;
    color: var(--text-secondary);
}

.note.muted {
    color: var(--text-muted);
    margin-top: var(--space-4);
}

@media (max-width: 600px) {
    .skills-card { padding: var(--space-4); }
}

/* NAV - top navigation */
.top-nav {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.nav-list {
    list-style: none;
    display: flex;
    gap: var(--space-4);
    align-items: center;
}

.nav-list a {
    padding: 8px 12px;
    border-radius: 8px;
    color: var(--text-secondary);
    transition: background-color var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
}

.nav-list a:hover {
    color: var(--text-primary);
    background: rgba(62,234,253,0.06);
    transform: translateY(-2px);
}

/* Animations légères pour la page compétences */
.skills-card{
    transform: translateY(6px);
    opacity: 0;
    transition: transform 0.5s var(--easing-smooth), opacity 0.5s var(--easing-smooth), box-shadow 0.3s;
}

.skills-card.pop {
    transform: translateY(0) scale(1);
    opacity: 1;
    box-shadow: 0 12px 30px rgba(0,0,0,0.35);
}

.skill-progress:hover {
    filter: brightness(1.05);
}

/* responsive nav */
@media (max-width: 900px) {
    .nav-list { gap: var(--space-2); }
}

@media (max-width: 600px) {
    .top-nav { display: none; }
}

/* Projects page styles */
.projects-section {
    padding: var(--space-8) 0;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-6);
}

.project-card {
    background: linear-gradient(180deg, rgba(var(--accent-primary-rgb),0.03), rgba(255,255,255,0.01));
    border: 1px solid var(--glass-border);
    padding: var(--space-5);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: transform 0.35s var(--easing-smooth), box-shadow 0.35s;
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.project-title { margin-bottom: var(--space-2); }
.project-desc { color: var(--text-secondary); margin-bottom: var(--space-3); }
.project-meta { display:flex; gap: var(--space-3); align-items:center; }
.tag { background: rgba(255,255,255,0.03); padding:6px 8px; border-radius:8px; color:var(--text-secondary); font-weight:600; }
.project-link { margin-left:auto; color:var(--accent-primary); font-weight:700; }

@media (max-width: 600px) {
    .projects-grid { grid-template-columns: 1fr; }
}

/* Mobile menu styles */
.menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    color: var(--text-primary);
}

.hamburger {
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    position: relative;
    display: inline-block;
}
.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    left: 0;
    width: 20px;
    height: 2px;
    background: var(--text-primary);
}
.hamburger::before { top: -6px; }
.hamburger::after { top: 6px; }

/* mobile-specific nav behaviour */
@media (max-width: 900px) {
    .menu-toggle { display: flex; }
    .top-nav { display: none; }
    body.nav-open .top-nav {
        display: flex;
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: linear-gradient(180deg, var(--bg-secondary), rgba(26,34,52,0.95));
        flex-direction: column;
        padding: var(--space-4);
        gap: var(--space-3);
        z-index: 120;
        border-bottom: 1px solid var(--glass-border);
    }
    body.nav-open .nav-list { flex-direction: column; gap: var(--space-3); }
    body.nav-open .nav-list a { padding: 10px 14px; border-radius: 8px; }
}

/* When nav open, animate hamburger to X */
body.nav-open .hamburger { background: transparent; }
body.nav-open .hamburger::before { transform: rotate(45deg); top: 0; }
body.nav-open .hamburger::after { transform: rotate(-45deg); top: 0; }