/* ===== MATRIX THEME ===== */
body.theme-matrix {
    background: #0d0208;
    color: #00ff41;
    font-family: 'Courier New', monospace;
}

body.theme-matrix::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(0deg, transparent 0%, rgba(0, 255, 65, 0.05) 100%);
    pointer-events: none;
    z-index: 1;
    animation: matrix-scan 3s linear infinite;
}

@keyframes matrix-scan {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100%); }
}

body.theme-matrix .header {
    background: rgba(13, 2, 8, 0.95);
    border-bottom: 2px solid #00ff41;
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.3);
}

body.theme-matrix .logo,
body.theme-matrix .nav-link {
    color: #00ff41 !important;
    text-shadow: 0 0 10px rgba(0, 255, 65, 0.8);
}

body.theme-matrix .hero {
    background: linear-gradient(135deg, #0d0208 0%, #1a0f14 100%);
    position: relative;
    overflow: hidden;
}

body.theme-matrix .hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(0, 255, 65, 0.03) 2px,
            rgba(0, 255, 65, 0.03) 4px
        );
    pointer-events: none;
    animation: matrix-lines 20s linear infinite;
}

@keyframes matrix-lines {
    0% { transform: translateY(0); }
    100% { transform: translateY(100px); }
}

body.theme-matrix .btn-primary {
    background: transparent;
    border: 2px solid #00ff41;
    color: #00ff41;
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.5);
    animation: matrix-pulse 2s ease-in-out infinite;
}

@keyframes matrix-pulse {
    0%, 100% { box-shadow: 0 0 20px rgba(0, 255, 65, 0.5); }
    50% { box-shadow: 0 0 40px rgba(0, 255, 65, 0.8); }
}

body.theme-matrix .btn-primary:hover {
    background: #00ff41;
    color: #0d0208;
    box-shadow: 0 0 40px rgba(0, 255, 65, 1);
}

body.theme-matrix .project-card {
    background: rgba(13, 2, 8, 0.9);
    border: 1px solid #00ff41;
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.2);
}

body.theme-matrix .project-card:hover {
    box-shadow: 0 0 40px rgba(0, 255, 65, 0.5);
    transform: translateY(-10px);
}

/* ===== HACKER THEME ===== */
body.theme-hacker {
    background: #000000;
    color: #0f0;
    font-family: 'Courier New', monospace;
}

body.theme-hacker::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(0, 255, 0, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 0, 0, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
    animation: hacker-glow 5s ease-in-out infinite;
}

@keyframes hacker-glow {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

body.theme-hacker .header {
    background: rgba(0, 0, 0, 0.95);
    border-bottom: 2px solid #0f0;
    box-shadow: 0 5px 30px rgba(0, 255, 0, 0.3);
}

body.theme-hacker .logo {
    color: #0f0 !important;
    animation: hacker-glitch 3s infinite;
}

@keyframes hacker-glitch {
    0%, 90%, 100% { transform: translate(0); }
    92% { transform: translate(-2px, 2px); }
    94% { transform: translate(2px, -2px); }
    96% { transform: translate(-2px, -2px); }
    98% { transform: translate(2px, 2px); }
}

body.theme-hacker .nav-link {
    color: #0f0 !important;
    position: relative;
}

body.theme-hacker .nav-link::before {
    content: '> ';
    opacity: 0;
    transition: opacity 0.3s;
}

body.theme-hacker .nav-link:hover::before {
    opacity: 1;
}

body.theme-hacker .hero {
    background: #000;
    position: relative;
}

body.theme-hacker .hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 2px,
            rgba(0, 255, 0, 0.03) 2px,
            rgba(0, 255, 0, 0.03) 4px
        );
    pointer-events: none;
}

body.theme-hacker .btn-primary {
    background: transparent;
    border: 2px solid #0f0;
    color: #0f0;
    position: relative;
    overflow: hidden;
}

body.theme-hacker .btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 0, 0.3), transparent);
    transition: left 0.5s;
}

body.theme-hacker .btn-primary:hover::before {
    left: 100%;
}

body.theme-hacker .btn-primary:hover {
    background: #0f0;
    color: #000;
    box-shadow: 0 0 30px rgba(0, 255, 0, 0.8);
}

body.theme-hacker .project-card {
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid #0f0;
    position: relative;
}

body.theme-hacker .project-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #0f0, transparent, #0f0);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s;
}

body.theme-hacker .project-card:hover::before {
    opacity: 1;
    animation: hacker-border 1.5s linear infinite;
}

@keyframes hacker-border {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== CYBERPUNK THEME ===== */
body.theme-cyberpunk {
    background: #0a0e27;
    color: #00d9ff;
}

body.theme-cyberpunk::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 30% 30%, rgba(255, 0, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 70% 70%, rgba(0, 217, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
    animation: cyberpunk-pulse 4s ease-in-out infinite;
}

@keyframes cyberpunk-pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 0.8; }
}

body.theme-cyberpunk .header {
    background: rgba(10, 14, 39, 0.95);
    border-bottom: 3px solid;
    border-image: linear-gradient(90deg, #ff00ff, #00d9ff) 1;
    box-shadow: 0 5px 30px rgba(255, 0, 255, 0.3);
}

body.theme-cyberpunk .logo {
    background: linear-gradient(90deg, #ff00ff, #00d9ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: cyberpunk-glow 2s ease-in-out infinite;
}

@keyframes cyberpunk-glow {
    0%, 100% { filter: drop-shadow(0 0 10px rgba(255, 0, 255, 0.8)); }
    50% { filter: drop-shadow(0 0 20px rgba(0, 217, 255, 0.8)); }
}

body.theme-cyberpunk .nav-link {
    color: #00d9ff !important;
    position: relative;
}

body.theme-cyberpunk .nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #ff00ff, #00d9ff);
    transition: width 0.3s;
}

body.theme-cyberpunk .nav-link:hover::after {
    width: 100%;
}

body.theme-cyberpunk .hero {
    background: linear-gradient(135deg, #0a0e27 0%, #1a1f3a 100%);
    position: relative;
    overflow: hidden;
}

body.theme-cyberpunk .hero::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 10px,
            rgba(255, 0, 255, 0.03) 10px,
            rgba(255, 0, 255, 0.03) 20px
        );
    animation: cyberpunk-grid 20s linear infinite;
}

@keyframes cyberpunk-grid {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

body.theme-cyberpunk .btn-primary {
    background: linear-gradient(90deg, #ff00ff, #00d9ff);
    border: none;
    color: #fff;
    position: relative;
    overflow: hidden;
}

body.theme-cyberpunk .btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
}

body.theme-cyberpunk .btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

body.theme-cyberpunk .project-card {
    background: rgba(10, 14, 39, 0.9);
    border: 2px solid transparent;
    background-clip: padding-box;
    position: relative;
}

body.theme-cyberpunk .project-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #ff00ff, #00d9ff, #ff00ff);
    z-index: -1;
    border-radius: 12px;
    opacity: 0;
    transition: opacity 0.3s;
}

body.theme-cyberpunk .project-card:hover::before {
    opacity: 1;
    animation: cyberpunk-rotate 3s linear infinite;
}

@keyframes cyberpunk-rotate {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

/* ===== NEON THEME ===== */
body.theme-neon {
    background: #000;
    color: #fff;
}

body.theme-neon::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 20%, rgba(255, 0, 128, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0, 255, 255, 0.2) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
    animation: neon-ambient 6s ease-in-out infinite;
}

@keyframes neon-ambient {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.7; }
}

body.theme-neon .header {
    background: rgba(0, 0, 0, 0.95);
    border-bottom: 2px solid #ff0080;
    box-shadow: 0 0 30px rgba(255, 0, 128, 0.5);
}

body.theme-neon .logo {
    color: #ff0080 !important;
    text-shadow: 
        0 0 10px #ff0080,
        0 0 20px #ff0080,
        0 0 30px #ff0080;
    animation: neon-flicker 3s infinite;
}

@keyframes neon-flicker {
    0%, 100% { opacity: 1; }
    41%, 43% { opacity: 0.8; }
    42% { opacity: 0.6; }
    45%, 47% { opacity: 0.9; }
    46% { opacity: 0.7; }
}

body.theme-neon .nav-link {
    color: #00ffff !important;
    text-shadow: 0 0 10px #00ffff;
    transition: all 0.3s;
}

body.theme-neon .nav-link:hover {
    text-shadow: 
        0 0 10px #00ffff,
        0 0 20px #00ffff,
        0 0 30px #00ffff;
}

body.theme-neon .hero {
    background: #000;
    position: relative;
}

body.theme-neon .btn-primary {
    background: transparent;
    border: 2px solid #ff0080;
    color: #ff0080;
    text-shadow: 0 0 10px #ff0080;
    box-shadow: 
        0 0 10px #ff0080,
        inset 0 0 10px rgba(255, 0, 128, 0.3);
    animation: neon-button 2s ease-in-out infinite;
}

@keyframes neon-button {
    0%, 100% {
        box-shadow: 
            0 0 10px #ff0080,
            inset 0 0 10px rgba(255, 0, 128, 0.3);
    }
    50% {
        box-shadow: 
            0 0 20px #ff0080,
            0 0 30px #ff0080,
            inset 0 0 20px rgba(255, 0, 128, 0.5);
    }
}

body.theme-neon .btn-primary:hover {
    background: #ff0080;
    color: #000;
    text-shadow: none;
    box-shadow: 
        0 0 30px #ff0080,
        0 0 50px #ff0080;
}

body.theme-neon .project-card {
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid #00ffff;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
}

body.theme-neon .project-card:hover {
    box-shadow: 
        0 0 30px rgba(0, 255, 255, 0.6),
        0 0 50px rgba(255, 0, 128, 0.4);
    transform: translateY(-10px);
}

/* Canvas for Matrix Rain Effect */
#matrix-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.3;
}