/* CSS Reset & Variables */
:root {
    --primary: #ff1e1e;
    --secondary: #8b0000;
    --dark: #050505;
    --darker: #020202;
    --light: #f5f5f5;
    --gray: #a0a0a0;
}

body {
    background-color: var(--dark);
    color: var(--light);
    overflow-x: hidden;
    cursor: none; /* Hide default cursor for custom cursor */
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--darker);
}
::-webkit-scrollbar-thumb {
    background: #222;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--secondary);
}

/* Custom Cursor */
.custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 8px;
    height: 8px;
    background-color: var(--primary);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: screen;
    transition: width 0.3s, height 0.3s, background-color 0.3s;
}

.cursor-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 30, 30, 0.4);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 9998;
    transition: width 0.3s, height 0.3s, border-color 0.3s;
    /* smooth following */
    transition-timing-function: ease-out;
}

.custom-cursor.hover {
    width: 0px;
    height: 0px;
    background-color: transparent;
}
.cursor-glow.hover {
    width: 60px;
    height: 60px;
    border-color: var(--primary);
    background-color: rgba(255, 30, 30, 0.1);
    backdrop-filter: blur(2px);
}

/* Typography Enhancements */
.text-gradient {
    background: linear-gradient(to right, #ff1e1e, #ff7e7e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glow-text {
    text-shadow: 0 0 20px rgba(255, 30, 30, 0.6), 0 0 40px rgba(255, 30, 30, 0.2);
}

/* Navbar */
#navbar.scrolled {
    background-color: rgba(2, 2, 2, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 30, 30, 0.1);
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.nav-link {
    position: relative;
    color: var(--gray);
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

.nav-link:hover, .nav-link.active {
    color: var(--light);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transform: translateX(-50%);
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(255, 30, 30, 0.8);
}

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

/* Hero Section Styles */
.hero-container {
    background: linear-gradient(135deg, rgba(20,20,20,0.4) 0%, rgba(5,5,5,0.8) 100%);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(40, 40, 40, 0.5);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5), inset 0 0 0 1px rgba(255,255,255,0.05);
    transition: border-color 0.5s ease;
}

.hero-container:hover {
    border-color: rgba(255, 30, 30, 0.2);
}

/* 3D Tilt Effect */
.perspective-container {
    perspective: 1000px;
    transform-style: preserve-3d;
}

.3d-tilt {
    transform-style: preserve-3d;
    will-change: transform;
}

.character-img {
    transform: translateZ(50px);
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.8));
    animation: floating 6s ease-in-out infinite;
}

.moon-glow {
    transform: translateZ(-20px);
    animation: pulse 4s ease-in-out infinite alternate;
}

/* Animations */
@keyframes floating {
    0% { transform: translateZ(50px) translateY(0px); }
    50% { transform: translateZ(50px) translateY(-15px); }
    100% { transform: translateZ(50px) translateY(0px); }
}

@keyframes pulse {
    0% { opacity: 0.6; transform: translateZ(-20px) scale(0.95); }
    100% { opacity: 1; transform: translateZ(-20px) scale(1.05); }
}

@keyframes scrollLine {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(200%); }
}

.scroll-line {
    animation: scrollLine 2s cubic-bezier(0.77, 0, 0.175, 1) infinite;
}

/* Typewriter cursor */
.typewriter-text {
    display: inline-block;
    min-width: 10px;
    animation: blinkCursor 0.75s step-end infinite;
}

@keyframes blinkCursor {
    from, to { border-color: transparent; }
    50% { border-color: var(--primary); }
}

/* Social Icons */
.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--gray);
    transition: all 0.3s ease;
    background: rgba(255,255,255,0.02);
}

.social-icon:hover {
    color: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(255, 30, 30, 0.4);
    transform: translateY(-3px);
    background: rgba(255,30,30,0.05);
}

/* Page Loader */
.loader-progress {
    transition: width 0.1s ease;
}

/* Utilities */
.magnetic-wrap {
    display: inline-block;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .character-img {
        animation: none; /* Reduce heavy animations on mobile */
    }
}


        /* Services Specific Styles */
        .scan-line {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 2px;
            background: linear-gradient(to right, transparent, var(--primary), transparent);
            animation: scan 3s infinite linear;
            opacity: 0.7;
            box-shadow: 0 0 10px var(--primary);
        }
        @keyframes scan {
            0% { transform: translateY(-100%); }
            100% { transform: translateY(1000%); }
        }

        .glass-card {
            background: linear-gradient(135deg, rgba(20,20,20,0.6) 0%, rgba(5,5,5,0.8) 100%);
            backdrop-filter: blur(16px);
            border: 1px solid rgba(40, 40, 40, 0.5);
            box-shadow: 0 10px 30px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.05);
            transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            position: relative;
            overflow: hidden;
        }

        .glass-card::before {
            content: '';
            position: absolute;
            top: 0; left: 0; right: 0;
            height: 1px;
            background: linear-gradient(to right, transparent, rgba(255,30,30,0.5), transparent);
            opacity: 0;
            transition: opacity 0.4s ease;
        }

        .glass-card:hover {
            border-color: rgba(255, 30, 30, 0.4);
            transform: translateY(-10px) scale(1.02);
            box-shadow: 0 20px 40px rgba(0,0,0,0.8), 0 0 30px rgba(255,30,30,0.15);
            z-index: 10;
        }

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

        .icon-box {
            position: relative;
            width: 60px;
            height: 60px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: rgba(255,30,30,0.05);
            border-radius: 12px;
            border: 1px solid rgba(255,30,30,0.1);
            transition: all 0.3s ease;
        }

        .glass-card:hover .icon-box {
            background: rgba(255,30,30,0.15);
            border-color: rgba(255,30,30,0.4);
            box-shadow: 0 0 20px rgba(255,30,30,0.3);
            transform: scale(1.1);
        }

        .icon-box svg {
            transition: all 0.3s ease;
        }

        .glass-card:hover .icon-box svg {
            filter: drop-shadow(0 0 8px rgba(255,30,30,0.8));
        }

        .divider-energy {
            height: 1px;
            width: 100%;
            background: linear-gradient(to right, transparent, var(--secondary), var(--primary), var(--secondary), transparent);
            box-shadow: 0 0 15px var(--primary);
            position: relative;
        }
        
        .divider-energy::after {
            content: '';
            position: absolute;
            top: 50%; left: 50%;
            transform: translate(-50%, -50%);
            width: 50px; height: 4px;
            background: var(--light);
            border-radius: 4px;
            box-shadow: 0 0 10px #fff, 0 0 20px var(--primary);
        }

        .timeline-node {
            width: 20px; height: 20px;
            background: var(--darker);
            border: 2px solid var(--primary);
            border-radius: 50%;
            position: relative;
            z-index: 2;
            transition: all 0.3s ease;
        }
        
        .timeline-item:hover .timeline-node {
            background: var(--primary);
            box-shadow: 0 0 20px var(--primary);
            transform: scale(1.3);
        }

        .timeline-line {
            position: absolute;
            left: 9px;
            top: 20px;
            bottom: -50px;
            width: 2px;
            background: rgba(255,30,30,0.2);
            z-index: 1;
        }

        .accordion-content {
            max-height: 0;
            overflow: hidden;
            transition: max-height 0.4s ease;
        }
        .accordion-item.active .accordion-content {
            max-height: 500px; /* arbitrary large value */
        }
        .accordion-item.active .accordion-icon {
            transform: rotate(180deg);
            color: var(--primary);
        }
    