@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary-gradient: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);
    --tech-blue: #0ea5e9;
    --tech-cyan: #06b6d4;
    --tech-teal: #14b8a6;
    --glow-blue: rgba(14, 165, 233, 0.4);
    --glow-cyan: rgba(6, 182, 212, 0.4);
}

body {
    font-family: 'Inter', sans-serif;
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #1e293b;
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #0ea5e9, #06b6d4);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #38bdf8, #22d3ee);
}

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

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

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

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

@keyframes pulse-glow {
    0%, 100% { 
        box-shadow: 0 0 20px var(--glow-blue), 0 0 40px var(--glow-cyan);
    }
    50% { 
        box-shadow: 0 0 40px var(--glow-blue), 0 0 80px var(--glow-cyan);
    }
}

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

@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

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

@keyframes text-glow {
    0%, 100% { text-shadow: 0 0 10px rgba(14, 165, 233, 0.5); }
    50% { text-shadow: 0 0 20px rgba(14, 165, 233, 0.8), 0 0 30px rgba(6, 182, 212, 0.6); }
}

@keyframes particle-float {
    0%, 100% { 
        transform: translateY(0) translateX(0) scale(1);
        opacity: 0.6;
    }
    25% { 
        transform: translateY(-30px) translateX(10px) scale(1.1);
        opacity: 1;
    }
    50% { 
        transform: translateY(-20px) translateX(-10px) scale(0.9);
        opacity: 0.8;
    }
    75% { 
        transform: translateY(-40px) translateX(5px) scale(1.05);
        opacity: 0.7;
    }
}

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

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
}

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

.animate-glow {
    animation: pulse-glow 3s ease-in-out infinite;
}

.animate-gradient {
    background-size: 200% 200%;
    animation: gradient-shift 4s ease infinite;
}

.animate-shimmer {
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }

/* ==================== Gradient Text ==================== */

.text-gradient {
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-image: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 50%, #14b8a6 100%);
}

.text-gradient-animate {
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-image: linear-gradient(135deg, #0ea5e9, #06b6d4, #14b8a6, #0ea5e9);
    background-size: 300% 300%;
    animation: gradient-shift 6s ease infinite;
}

/* ==================== Glassmorphism ==================== */

.glass {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.dark .glass-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(14, 165, 233, 0.3);
    box-shadow: 0 8px 32px rgba(14, 165, 233, 0.15);
}

/* ==================== Glow Effects ==================== */

.glow-blue {
    box-shadow: 0 0 20px rgba(14, 165, 233, 0.3), 0 0 40px rgba(14, 165, 233, 0.1);
}

.glow-cyan {
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.3), 0 0 40px rgba(6, 182, 212, 0.1);
}

.glow-text {
    text-shadow: 0 0 10px currentColor, 0 0 20px currentColor;
}

.hover-glow:hover {
    box-shadow: 0 0 30px rgba(14, 165, 233, 0.4), 0 0 60px rgba(14, 165, 233, 0.2);
}

/* ==================== Gradient Border ==================== */

.gradient-border {
    position: relative;
    background: transparent;
}

.gradient-border::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, #0ea5e9, #06b6d4, #14b8a6);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}

.gradient-border-animate::before {
    background: linear-gradient(135deg, #0ea5e9, #06b6d4, #14b8a6, #0ea5e9);
    background-size: 300% 300%;
    animation: gradient-shift 4s ease infinite;
}

/* ==================== Tech Buttons ==================== */

.btn-tech {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-tech::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.6s ease;
}

.btn-tech:hover::before {
    left: 100%;
}

.btn-tech:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 40px rgba(14, 165, 233, 0.4);
}

.btn-outline-tech {
    position: relative;
    background: transparent;
    overflow: hidden;
}

.btn-outline-tech::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.1), rgba(6, 182, 212, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-outline-tech:hover::after {
    opacity: 1;
}

/* ==================== Tech Cards ==================== */

.tech-card {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.tech-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #0ea5e9, #06b6d4, transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tech-card:hover::before {
    opacity: 1;
}

.tech-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(14, 165, 233, 0.2);
}

.dark .tech-card:hover {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(14, 165, 233, 0.4);
}

/* ==================== Decorative Elements ==================== */

.cyber-grid {
    background-image: 
        linear-gradient(rgba(14, 165, 233, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(14, 165, 233, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
}

.dark .cyber-grid {
    background-image: 
        linear-gradient(rgba(14, 165, 233, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(14, 165, 233, 0.08) 1px, transparent 1px);
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: linear-gradient(135deg, #0ea5e9, #06b6d4);
    border-radius: 50%;
    animation: particle-float 8s ease-in-out infinite;
}

.scan-line {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(14, 165, 233, 0.5), transparent);
    animation: scan-line 8s linear infinite;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.3;
}

/* ==================== Code Block ==================== */

.code-block {
    position: relative;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border: 1px solid rgba(14, 165, 233, 0.2);
}

.code-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #0ea5e9, transparent);
}

/* ==================== Feature Icons ==================== */

.feature-icon {
    position: relative;
    overflow: hidden;
}

.feature-icon::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 40%, rgba(255,255,255,0.2) 50%, transparent 60%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.group:hover .feature-icon::after {
    transform: translateX(100%);
}

/* ==================== Navigation ==================== */

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #0ea5e9, #06b6d4);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

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

/* ==================== Section Dividers ==================== */

.section-divider {
    position: relative;
}

.section-divider::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 1px;
    background: linear-gradient(90deg, transparent, #667eea, transparent);
}

/* ==================== Image Effects ==================== */

.tech-image {
    position: relative;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.tech-image::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, #0ea5e9, #06b6d4, #14b8a6);
    border-radius: inherit;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tech-image:hover::before {
    opacity: 1;
}

.tech-image:hover {
    transform: scale(1.02);
}

/* ==================== Badge Styles ==================== */

.tech-badge {
    position: relative;
    overflow: hidden;
}

.tech-badge::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.5s ease;
}

.tech-badge:hover::before {
    transform: translate(-50%, -50%) scale(1);
}

/* ==================== Responsive Adjustments ==================== */

@media (max-width: 768px) {
    .tech-card:hover {
        transform: translateY(-4px);
    }
    
    .btn-tech:hover {
        transform: translateY(-2px);
    }
    
    .scan-line {
        display: none;
    }
}

/* ==================== Performance Optimizations ==================== */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ==================== Light Mode Adjustments ==================== */

:root:not(.dark) .glass-card {
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(0, 0, 0, 0.08);
}

:root:not(.dark) .tech-card:hover {
    box-shadow: 0 20px 60px rgba(14, 165, 233, 0.15);
}

:root:not(.dark) .cyber-grid {
    background-image: 
        linear-gradient(rgba(14, 165, 233, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(14, 165, 233, 0.05) 1px, transparent 1px);
}
