/* =========================================
   1. CORE & ANIMATIONS
   ========================================= */

html {
    scroll-behavior: smooth;
}

/* GLOBAL BACKGROUND (The "Modern Aura")
   Replaces the tactical grid with soft, deep, blurry gradients.
*/
body {
    background-color: #0f172a; /* Deep Slate Base */
    background-image: 
        /* Top Left: Soft Blue Glow */
        radial-gradient(circle at 0% 0%, rgba(56, 189, 248, 0.15) 0%, transparent 50%),
        /* Bottom Right: Deep Purple Glow */
        radial-gradient(circle at 100% 100%, rgba(124, 58, 237, 0.15) 0%, transparent 50%),
        /* Center Right: Cyan Hint */
        radial-gradient(circle at 100% 0%, rgba(14, 165, 233, 0.1) 0%, transparent 50%);
    background-attachment: fixed; /* Keeps the glow fixed while scrolling */
    background-size: cover;
    color: #f1f5f9; /* Light text for dark mode */
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

img {
    user-drag: none;
    -webkit-user-drag: none;
    user-select: none;
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
}

/* =========================================
   2. HERO SECTION
   ========================================= */

.hero-modern {
    /* A smooth gradient that blends into the body */
    background: linear-gradient(180deg, rgba(15, 23, 42, 0) 0%, #1e3a8a 100%);
    position: relative;
    overflow: hidden;
    /* The Curve */
    border-radius: 0 0 50% 50% / 0 0 40px 40px;
    box-shadow: 0 10px 40px -10px rgba(0,0,0,0.5);
    z-index: 10;
}

/* =========================================
   3. UI ELEMENTS (Glassmorphism)
   ========================================= */

/* Modern Glass Cards */
.modern-card {
    background: rgba(30, 41, 59, 0.6); /* More transparent */
    backdrop-filter: blur(12px); /* Stronger blur */
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    height: 100%;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
}

.modern-card:hover {
    transform: translateY(-5px);
    background: rgba(30, 41, 59, 0.8); 
    border-color: rgba(56, 189, 248, 0.3); /* Soft blue border on hover */
    box-shadow: 0 20px 40px -5px rgba(0, 0, 0, 0.4);
}

/* Top Color Strip Animation */
.modern-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.modern-card:hover::after { opacity: 1; }

/* Icon Containers */
.icon-box {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    font-size: 1.75rem;
    background: rgba(255, 255, 255, 0.05) !important;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.icon-box i {
    text-shadow: 0 0 15px rgba(255,255,255,0.3);
}

/* Buttons */
.btn {
    transition: all 0.3s ease;
}
.btn:hover, .btn:active {
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.4);
}

/* =========================================
   4. NAVIGATION BAR
   ========================================= */

.navbar {
    background-color: rgba(15, 23, 42, 0.85); /* Dark semi-transparent */
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    padding: 1rem 0;
}

@media (min-width: 640px) {
    .navbar { padding: 1.5rem 0; }
    .navbar .container {
        display: flex;
        align-items: center;
        justify-content: space-between !important;
        width: 100%;
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 1rem;
    }
    .menu {
        display: flex !important;
        flex-direction: row !important;
        position: static !important;
        background: none !important;
        width: auto !important;
        height: auto !important;
        box-shadow: none !important;
        gap: 1.5rem;
    }
    .menu-toggle + label { display: none !important; }
    
    /* Link Styling for Dark Nav */
    .navbar a:not(.btn) {
        color: #e2e8f0; /* Light gray text */
    }
    .navbar a:not(.btn):hover {
        color: #ffffff;
    }
}

.navbar.condensed {
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
    background-color: rgba(15, 23, 42, 0.95);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

/* Mobile Menu */
.menu-toggle { display: none; }
@media (max-width: 639px) {
    .navbar .container {
        display: flex; justify-content: space-between; align-items: center; padding: 0 1rem;
    }
    .menu-toggle + label {
        display: block !important; cursor: pointer; font-size: 1.5rem; color: #e2e8f0; z-index: 60;
    }
    .menu {
        display: none; position: fixed !important; top: 0; left: 0; width: 100vw; height: 100vh;
        background: #0f172a; /* Dark mobile menu */
        flex-direction: column; justify-content: center; align-items: center; z-index: 55;
    }
    .menu-toggle:checked ~ .menu { display: flex !important; }
    
    .menu a:not(.btn) { color: #f1f5f9; font-size: 1.2rem; margin-bottom: 1rem;}
}

/* =========================================
   5. FOOTER & MISC
   ========================================= */

footer a { transition: all 0.2s ease; }
footer a:not(.rounded-full):hover {
    padding-left: 4px;
    color: #60a5fa; 
}

/* Logo Scroll Container */
.logo-scroll-container {
    margin: 2rem 0;
    overflow: hidden;
    position: relative;
    width: 100%;
    background: rgba(203, 213, 225, 0.9); 
    border-radius: 1rem;
    padding: 1rem 0;
    /* CHANGE: Darker border to match the new darker background */
    border: 1px solid rgba(148, 163, 184, 0.4); 
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.logo-scroll {
    display: flex;
    width: fit-content;
    animation: scrollAnimation 60s linear infinite;
}

.logo-scroll img {
    height: 85px; margin: 0 70px; object-fit: contain; flex-shrink: 0; transition: transform 0.3s ease;
}
.logo-scroll img:hover { transform: scale(1.1); }

@keyframes scrollAnimation {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/* Typography Overrides for Dark Mode Compatibility */
.bg-tech-grid h1, .bg-tech-grid h2, .bg-tech-grid h3, .bg-tech-grid h4,
.bg-tech-grid .text-gray-900, .modern-card .text-gray-900 {
    color: #ffffff !important;
}
.bg-tech-grid p, .bg-tech-grid li, .bg-tech-grid .text-gray-600,
.modern-card .text-gray-600 {
    color: #cbd5e1 !important;
}
h1, h2, h3 { font-size: clamp(1.5rem, 5vw, 2.5rem); }
.hero-modern h1 { font-size: clamp(2rem, 6vw, 4rem); }