/* ============================================
   Portfolio Common Styles
   ============================================ */

/* Hide Scrollbar */
::-webkit-scrollbar {
    display: none;
}

/* Base Font & Performance */
* {
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Performance Optimizations */
img {
    content-visibility: auto;
}

.card-hover, .glow-effect, .floating {
    will-change: transform, opacity;
    contain: layout style paint;
}

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

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* ============================================
   Animations
   ============================================ */

@keyframes float {
    0%, 100% {
        transform: translateY(0px) translateX(0px);
    }
    33% {
        transform: translateY(-20px) translateX(10px);
    }
    66% {
        transform: translateY(10px) translateX(-10px);
    }
}

@keyframes glow {
    0%, 100% {
        opacity: 0.5;
        filter: blur(40px);
    }
    50% {
        opacity: 0.8;
        filter: blur(60px);
    }
}

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

@keyframes flicker {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
    52% {
        opacity: 1;
    }
    54% {
        opacity: 0.9;
    }
    56% {
        opacity: 1;
    }
}

@keyframes scan {
    0% {
        transform: translateY(-100%);
    }
    100% {
        transform: translateY(100vh);
    }
}

@keyframes pulse-border {
    0%, 100% {
        border-color: rgba(239, 68, 68, 0.5);
    }
    50% {
        border-color: rgba(239, 68, 68, 1);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

/* ============================================
   Blob Animations
   ============================================ */

.blob-1 {
    animation: float 8s ease-in-out infinite, glow 4s ease-in-out infinite;
}

.blob-2 {
    animation: float 10s ease-in-out infinite reverse, glow 5s ease-in-out infinite;
    animation-delay: 1s;
}

.blob-3 {
    animation: float 12s ease-in-out infinite, glow 6s ease-in-out infinite;
    animation-delay: 2s;
}

/* ============================================
   Text Styles
   ============================================ */

.gradient-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.error-text {
    background: linear-gradient(135deg, #ef4444 0%, #f97316 50%, #eab308 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   Card Hover Effects
   ============================================ */

.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.3);
}

/* ============================================
   Tech Badge
   ============================================ */

.tech-badge {
    transition: all 0.3s ease;
}

.tech-badge:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.5);
}

/* ============================================
   Mobile Menu
   ============================================ */

.mobile-menu {
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
}

.mobile-menu.active {
    transform: translateX(0);
}

/* ============================================
   Error Page Specific
   ============================================ */

.error-code {
    animation: glitch 0.5s ease-in-out infinite, flicker 3s ease-in-out infinite;
}

.blocked-icon {
    animation: shake 0.5s ease-in-out;
}

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

.scan-line {
    background: linear-gradient(
        transparent 0%,
        rgba(102, 126, 234, 0.05) 50%,
        transparent 100%
    );
    animation: scan 4s linear infinite;
}

.scan-line-red {
    background: linear-gradient(
        transparent 0%,
        rgba(239, 68, 68, 0.05) 50%,
        transparent 100%
    );
    animation: scan 4s linear infinite;
}

/* ============================================
   Mobile Optimizations
   ============================================ */

@media (max-width: 768px) {
    .card-hover:hover {
        transform: translateY(-4px);
    }

    .tech-badge:hover {
        transform: scale(1.05);
    }
}
