/* Import JetBrains Mono font */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&display=swap');

/* Animated gradient background */
.gradient-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        45deg,
        #0a0e27 0%,
        #1a1f3a 25%,
        #0f1729 50%,
        #1e2139 75%,
        #0a0e27 100%
    );
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    z-index: -1;
}

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

/* Particles.js container */
#particles-js {
    pointer-events: none;
}

/* Gradient text effect */
.gradient-text {
    background: linear-gradient(
        135deg,
        #3b82f6 0%,
        #8b5cf6 25%,
        #06b6d4 50%,
        #10b981 75%,
        #3b82f6 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientFlow 3s linear infinite;
}

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

/* Terminal window styling */
.terminal-window {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 1px solid rgba(59, 130, 246, 0.2);
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.terminal-window:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 80px rgba(59, 130, 246, 0.3);
}

.terminal-header {
    background: rgba(30, 41, 59, 0.9);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(59, 130, 246, 0.2);
}

.terminal-content {
    padding: 24px;
    font-family: 'JetBrains Mono', monospace;
}

/* Glass card effect */
.glass-card {
    background: rgba(26, 31, 58, 0.4);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 1px solid rgba(59, 130, 246, 0.2);
    padding: 24px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.5), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.glass-card:hover::before {
    transform: translateX(100%);
}

.glass-card:hover {
    background: rgba(26, 31, 58, 0.6);
    border-color: rgba(59, 130, 246, 0.4);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(59, 130, 246, 0.2);
}

/* Badge styling */
.badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 20px;
    font-size: 0.875rem;
    color: #60a5fa;
    transition: all 0.3s ease;
}

.badge:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.5);
    transform: scale(1.05);
}

/* Code block styling */
.code-block {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
}

/* Section title styling */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    text-align: center;
    color: #e4e4e7;
    font-family: 'JetBrains Mono', monospace;
}

/* Typing animation */
.typing-text {
    opacity: 0;
    display: inline-block;
}

.typing-text::after {
    content: '|';
    animation: blink 1s infinite;
    margin-left: 4px;
}

@keyframes blink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0;
    }
}

/* Glow effects */
.glow-blue {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.4);
}

.glow-purple {
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.4);
}

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

/* Link hover effects */
a {
    position: relative;
}

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #0a0e27;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #3b82f6, #8b5cf6);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #60a5fa, #a78bfa);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .section-title {
        font-size: 1.75rem;
    }

    .terminal-window {
        margin: 0 -1rem;
    }

    .badge {
        font-size: 0.75rem;
        padding: 4px 12px;
    }
}

/* Selection styling */
::selection {
    background: rgba(59, 130, 246, 0.3);
    color: #fff;
}

/* Focus states */
a:focus,
button:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Pulse animation for interactive elements */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Grid pattern overlay (subtle) */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(59, 130, 246, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 1;
}
