/* BearStack.AI - Futuristic Dark Theme */

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

/* Root variables for consistent theming */
:root {
    --bg-primary: #000000;
    --bg-secondary: #0a0a0a;
    --bg-tertiary: #111111;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --accent-blue: #0066ff;
    --accent-cyan: #00d4ff;
    --accent-purple: #6366f1;
    --gradient-primary: linear-gradient(135deg, #0066ff 0%, #00d4ff 100%);
    --gradient-secondary: linear-gradient(135deg, #6366f1 0%, #0066ff 100%);
    --shadow-glow: 0 0 40px rgba(0, 102, 255, 0.3);
    --shadow-glow-strong: 0 0 60px rgba(0, 102, 255, 0.5);
}

/* Base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Animated background grid */
.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(0, 102, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 102, 255, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 0;
    opacity: 0.4;
}

.bg-grid::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 50% 50%, rgba(0, 102, 255, 0.1) 0%, transparent 50%);
    animation: gridPulse 8s ease-in-out infinite;
}

@keyframes gridPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

/* Main content positioning */
main {
    position: relative;
    z-index: 1;
}

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

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

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

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-cyan);
}

/* Gradient text effect */
.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Glowing button */
.glow-button {
    position: relative;
    overflow: hidden;
    background: var(--gradient-primary);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 102, 255, 0.4);
}

.glow-button::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;
}

.glow-button:hover::before {
    width: 300px;
    height: 300px;
}

.glow-button:hover {
    box-shadow: var(--shadow-glow-strong);
    transform: translateY(-2px);
}

/* Card with futuristic styling */
.tech-card {
    background: rgba(17, 17, 17, 0.8);
    border: 1px solid rgba(0, 102, 255, 0.2);
    backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.tech-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 102, 255, 0.1), transparent);
    transition: left 0.5s;
}

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

.tech-card:hover {
    border-color: var(--accent-cyan);
    box-shadow: 0 8px 32px rgba(0, 102, 255, 0.3);
    transform: translateY(-4px);
}

/* Hero section animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

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

.fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

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

/* Section divider */
.section-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-blue), transparent);
    margin: 4rem 0;
}

/* Hover glow effect for images */
.glow-on-hover {
    transition: all 0.3s ease;
}

.glow-on-hover:hover {
    box-shadow: 0 0 30px rgba(0, 102, 255, 0.5);
}

/* Mobile menu styles */
#mobile-menu {
    transition: all 0.3s ease-out;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 102, 255, 0.2);
}

/* Header blur effect */
.header-blur {
    backdrop-filter: blur(10px);
    background: rgba(0, 0, 0, 0.8);
    border-bottom: 1px solid rgba(0, 102, 255, 0.1);
}

/* Pulse animation for status indicators */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Loading shimmer effect */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.shimmer {
    background: linear-gradient(90deg, transparent 0%, rgba(0, 102, 255, 0.1) 50%, transparent 100%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* Radar Effect */
.radar-canvas {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 0;
    opacity: 0.6;
}

/* AI Text Radar Highlight */
#ai-text {
    transition: text-shadow 2s ease-out, filter 2s ease-out;
    position: relative;
    display: inline-block;
    text-shadow: none;
    filter: brightness(1);
}

#ai-text.radar-hit {
    text-shadow:
        0 0 20px rgba(0, 212, 255, 0.8),
        0 0 40px rgba(0, 212, 255, 0.6),
        0 0 60px rgba(0, 212, 255, 0.4);
    filter: brightness(1.5);
    transition: text-shadow 0.1s ease-in, filter 0.1s ease-in;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .bg-grid {
        background-size: 30px 30px;
    }

    /* Stagger .AI text to the right on mobile */
    #ai-text {
        display: block;
        margin-left: auto;
        margin-right: 0;
        width: fit-content;
        padding-right: 0.1rem;
    }
}
