/* ===================================
   🚀 PORTFOLIO ULTRA-MODERNE - RAZI SNIHA
   Effets avancés et animations sophistiquées
   =================================== */

/* ==================== VARIABLES MODERNES ==================== */
:root {
    /* Couleurs principales avec gradients */
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --accent-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --dark-gradient: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
    
    /* Couleurs néon */
    --neon-blue: #00f3ff;
    --neon-pink: #ff006e;
    --neon-purple: #8b5cf6;
    --neon-green: #10b981;
    
    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-blur: 20px;
    
    /* Ombres avancées */
    --shadow-neon: 0 0 20px rgba(0, 243, 255, 0.5);
    --shadow-3d: 0 20px 60px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 30px rgba(102, 126, 234, 0.6);
    
    /* Animations */
    --animation-speed: 0.6s;
    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==================== CANVAS BACKGROUNDS ==================== */
#particles-canvas, #matrix-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

#matrix-canvas {
    opacity: 0.3;
}

/* ==================== ANIMATIONS KEYFRAMES ==================== */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-20px) rotate(2deg); }
    66% { transform: translateY(-10px) rotate(-2deg); }
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(102, 126, 234, 0.5); }
    50% { box-shadow: 0 0 40px rgba(102, 126, 234, 0.8), 0 0 60px rgba(102, 126, 234, 0.4); }
}

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes orbit {
    from { transform: rotate(0deg) translateX(180px) rotate(0deg); }
    to { transform: rotate(360deg) translateX(180px) rotate(-360deg); }
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink {
    50% { border-color: transparent; }
}

@keyframes glitch {
    0% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
    100% { transform: translate(0); }
}

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes rotateIn {
    from {
        opacity: 0;
        transform: rotate(-10deg) scale(0.9);
    }
    to {
        opacity: 1;
        transform: rotate(0) scale(1);
    }
}

@keyframes neon-pulse {
    0%, 100% {
        text-shadow: 0 0 10px var(--neon-blue),
                     0 0 20px var(--neon-blue),
                     0 0 30px var(--neon-blue);
    }
    50% {
        text-shadow: 0 0 20px var(--neon-blue),
                     0 0 30px var(--neon-blue),
                     0 0 40px var(--neon-blue),
                     0 0 50px var(--neon-blue);
    }
}

/* ==================== HERO SECTION MODERNE ==================== */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-size: 200% 200%;
    animation: gradient-shift 15s ease infinite;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: float 20s linear infinite;
}

/* Typing Effect */
.typing-effect {
    position: relative;
    display: inline-block;
    /* Retirer les effets qui cachent le texte */
    /* overflow: hidden; */
    /* border-right: 3px solid var(--neon-blue); */
    white-space: nowrap;
    /* animation: typing 3.5s steps(40, end), blink 0.75s step-end infinite; */
}

/* Glitch Effect */
.glitch {
    position: relative;
    /* animation: glitch 3s infinite; */
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.6;
}

.glitch::before {
    left: 2px;
    text-shadow: -2px 0 var(--neon-pink);
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch 5s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -2px 0 var(--neon-blue);
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch 2s infinite linear alternate-reverse;
}

/* Floating Avatar */
.floating {
    animation: float 6s ease-in-out infinite;
}

.hero-avatar {
    position: relative;
    animation: pulse-glow 3s infinite;
    background: linear-gradient(45deg, var(--neon-purple), var(--neon-blue));
    padding: 5px;
}

/* Orbiting Circles */
.orbit-circle {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    margin: -5px 0 0 -5px;
}

.orbit-1 {
    background: var(--neon-blue);
    box-shadow: 0 0 20px var(--neon-blue);
    animation: orbit 10s linear infinite;
}

.orbit-2 {
    background: var(--neon-pink);
    box-shadow: 0 0 20px var(--neon-pink);
    animation: orbit 15s linear infinite reverse;
}

.orbit-3 {
    background: var(--neon-green);
    box-shadow: 0 0 20px var(--neon-green);
    animation: orbit 20s linear infinite;
}

/* Modern Buttons */
.btn-modern {
    position: relative;
    overflow: hidden;
    transition: var(--transition-smooth);
    backdrop-filter: blur(10px);
}

.btn-modern::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-modern:hover::before {
    width: 300px;
    height: 300px;
}

.btn-modern span,
.btn-modern i {
    position: relative;
    z-index: 1;
}

.btn-modern:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    right: 50px;
    text-align: center;
    animation: float 3s ease-in-out infinite;
}

.mouse {
    width: 30px;
    height: 50px;
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 15px;
    margin: 0 auto 10px;
    position: relative;
}

.mouse::before {
    content: '';
    width: 4px;
    height: 10px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: float 2s ease-in-out infinite;
}

.scroll-indicator p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* ==================== SECTION HEADERS MODERNES ==================== */
.section-header {
    position: relative;
    margin-bottom: 60px;
}

.section-title {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 20px;
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.title-line {
    width: 50px;
    height: 3px;
    background: var(--primary-gradient);
    display: inline-block;
    border-radius: 2px;
}

/* ==================== STATS MODERNISÉES ==================== */
.stat-item {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.7s;
}

.stat-item:hover::before {
    left: 100%;
}

.stat-item:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: var(--shadow-3d);
    border-color: var(--neon-blue);
}

.stat-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    box-shadow: var(--shadow-glow);
    animation: pulse-glow 3s infinite;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 15px 0;
}

.stat-progress {
    width: 100%;
    height: 4px;
    background: rgba(102, 126, 234, 0.2);
    border-radius: 2px;
    margin-top: 15px;
    overflow: hidden;
}

.stat-progress-bar {
    height: 100%;
    background: var(--primary-gradient);
    width: 0;
    transition: width 2s ease;
}

.stat-item:hover .stat-progress-bar {
    width: 100%;
}

/* ==================== CARDS MODERNES ==================== */
.project-card,
.skill-category {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    overflow: hidden;
    transition: var(--transition-smooth);
    position: relative;
}

.project-card::before,
.skill-category::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        transparent,
        rgba(102, 126, 234, 0.3),
        transparent 30%
    );
    animation: rotate 4s linear infinite;
    opacity: 0;
    transition: opacity 0.3s;
}

@keyframes rotate {
    100% { transform: rotate(360deg); }
}

.project-card:hover::before,
.skill-category:hover::before {
    opacity: 1;
}

.project-card:hover,
.skill-category:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-3d);
    border-color: var(--neon-blue);
}

/* ==================== ANIMATIONS AOS ==================== */
[data-aos] {
    opacity: 0;
    transition: var(--transition-smooth);
}

[data-aos="fade-up"] {
    animation: slideInUp var(--animation-speed) forwards;
}

[data-aos="zoom-in"] {
    animation: scaleIn var(--animation-speed) forwards;
}

[data-aos="rotate-in"] {
    animation: rotateIn var(--animation-speed) forwards;
}

/* ==================== NAVBAR GLASSMORPHISM ==================== */
.navbar {
    background: var(--glass-bg) !important;
    backdrop-filter: blur(var(--glass-blur));
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.nav-link {
    position: relative;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-gradient);
    transition: width 0.3s, left 0.3s;
}

.nav-link:hover::before {
    width: 100%;
    left: 0;
}

/* ==================== TECH TAGS MODERNES ==================== */
.tech-tag {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    transition: var(--transition-smooth);
}

.tech-tag:hover {
    background: var(--primary-gradient);
    color: white;
    transform: scale(1.1);
    box-shadow: var(--shadow-glow);
}

/* ==================== FORM MODERNE ==================== */
.form-group input,
.form-group textarea {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    color: inherit;
    transition: var(--transition-smooth);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--neon-blue);
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.3);
    background: rgba(255, 255, 255, 0.15);
}

/* ==================== RESPONSIVE ENHANCEMENTS ==================== */
@media (max-width: 768px) {
    .typing-effect {
        font-size: 1.8rem;
    }
    
    .orbit-circle {
        display: none;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .stat-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
}

/* ==================== CUSTOM SCROLLBAR ==================== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #1a202c;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-gradient);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-gradient);
}

/* ==================== LOADING SPINNER ==================== */
.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(102, 126, 234, 0.3);
    border-top-color: var(--neon-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==================== CURSOR CUSTOM (optionnel) ==================== */
.custom-cursor {
    width: 20px;
    height: 20px;
    border: 2px solid var(--neon-blue);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transition: all 0.1s;
    mix-blend-mode: difference;
}

.custom-cursor-dot {
    width: 5px;
    height: 5px;
    background: var(--neon-blue);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transition: all 0.05s;
}
