:root {
    --primary: #a80000;
    --primary-glow: #d60000;
    --cyan-glow: #00f0ff;
    --void: #050505;
    --glass: rgba(20, 20, 20, 0.6);
    --text-white: #ffffff;
    --text-gray: #a1a1aa;
    --card-bg: #111111;
    --border-color: rgba(255, 255, 255, 0.1);
    --overlay: rgba(0, 0, 0, 0.6);
    --hero-grad-1: #ffffff;
    --hero-grad-2: #6b7280;
}

[data-theme="light"] {
    --void: #f8fafc; /* Refined Pearl White */
    --glass: rgba(255, 255, 255, 0.75);
    --text-white: #0f172a;
    --text-gray: #475569;
    --card-bg: #ffffff;
    --border-color: rgba(15, 23, 42, 0.1); 
    --overlay: rgba(255, 255, 255, 0.75); /* Lighter overlay for light mode */
    --hero-grad-1: #0f172a;
    --hero-grad-2: #334155;
    --glass-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.08), 0 4px 18px -2px rgba(15, 23, 42, 0.04);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--void);
    color: var(--text-white);
    font-family: 'Space Grotesk', sans-serif;
    overflow-x: hidden;
    transition: background-color 0.5s ease, color 0.5s ease;
}

/* Theme Utilities */
.glass-card { background-color: var(--glass); }
[class*="border-white/10"], [class*="border-white/5"] { border-color: var(--border-color); }

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::selection { background: var(--primary); color: #fff; }

/* Theme Persistence for Grays */
.text-gray-300 { color: var(--text-gray); }
.text-gray-400 { color: var(--text-gray); opacity: 0.9; }
.text-gray-500 { color: var(--text-gray); opacity: 0.8; }
.text-gray-600 { color: var(--text-gray); opacity: 0.6; }

[data-theme="light"] .mix-blend-screen { mix-blend-mode: multiply; }
/* Ken Burns Hero Animation */
@keyframes kenburns {
    0% { transform: scale(1) translate(0, 0); }
    50% { transform: scale(1.1) translate(-2%, -1%); }
    100% { transform: scale(1.2) translate(-5%, -2%); }
}

.animate-kenburns {
    animation: kenburns 40s ease-out infinite alternate;
}

[data-theme="light"] .hero-overlay {
    background: linear-gradient(to bottom, rgba(248, 250, 252, 0.1), rgba(248, 250, 252, 0.4), var(--void));
}

.hero-overlay {
    background: linear-gradient(to bottom, rgba(5, 5, 5, 0.3), rgba(5, 5, 5, 0.6), var(--void));
}
::-webkit-scrollbar-track {
    background: var(--void);
}
::-webkit-scrollbar-thumb {
    background: #331010;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Neon Glow */
.neon-text-red {
    text-shadow: 0 0 10px rgba(168, 0, 0, 0.7), 0 0 20px rgba(168, 0, 0, 0.5);
}
.neon-border-red {
    box-shadow: 0 0 10px rgba(168, 0, 0, 0.3), inset 0 0 10px rgba(168, 0, 0, 0.1);
}

/* Cyber Grid */
.cyber-grid {
    background-image: linear-gradient(to right, rgba(255,255,255,0.05) 1px, transparent 1px), 
                      linear-gradient(to bottom, rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 40px 40px;
}

/* Animations */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.animate-shimmer {
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

/* Glassmorphism */
.glass-card {
    background: var(--glass);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

[data-theme="light"] .glass-card {
    box-shadow: var(--glass-shadow);
    border-color: rgba(0, 0, 0, 0.05);
}

.pearl-glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(15px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
}

[data-theme="dark"] .pearl-glass {
    background: rgba(17, 17, 17, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
}

.glass-card:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
}

[data-theme="light"] .glass-card:hover {
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.1);
}

/* Sticky Bottom Nav for Mobile */
@media (max-width: 768px) {
    .mobile-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 60px;
        background: var(--glass);
        backdrop-filter: blur(15px);
        display: flex;
        justify-content: space-around;
        align-items: center;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        z-index: 1000;
    }
}

.theme-wipe-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    pointer-events: none;
    clip-path: circle(0% at 50% 50%);
    transition: clip-path 0.5s cubic-bezier(0.65, 0, 0.35, 1);
}

.dark .theme-wipe-overlay {
    background: #050505;
}

[data-theme="light"] .theme-wipe-overlay {
    background: #f1f5f9;
}

/* Scroll Reveal */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

/* Delay Utillities */
.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }
.delay-400 { transition-delay: 400ms; }

/* Expertise Section Styling */
.expertise-card {
    transition: transform 0.4s ease, border-color 0.4s ease;
}

.expertise-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
}

.expertise-card:hover .icon-box {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 0 20px rgba(168, 0, 0, 0.4);
}

/* Journey Styling */
.journey-step {
    position: relative;
}

.journey-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 100%;
    width: 50%;
    height: 1px;
    background: linear-gradient(to right, var(--primary), transparent);
    z-index: 0;
}

@media (max-width: 768px) {
    .journey-step:not(:last-child)::after {
        display: none;
    }
}

/* Infinite Marquee */
@keyframes marquee {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

.animate-marquee {
    animation: marquee 40s linear infinite;
    will-change: transform;
}

.hover\:pause-animation:hover {
    animation-play-state: paused;
}

/* Float Animations */
@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-10px, -20px); }
}

@keyframes float-delayed {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(15px, -15px); }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-float-delayed {
    animation: float-delayed 8s ease-in-out infinite;
}
