:root {
    --cursor-x: 50%;
    --cursor-y: 50%;
}

body {
    background-color: #0a0a0a; 
    color: #f3f4f6;
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
}
.mono { font-family: 'IBM Plex Mono', monospace; }

/* FINAL POLISH: Custom Scrollbar for Dark Mode */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: #0a0a0a; 
}
::-webkit-scrollbar-thumb {
    background: #262626; 
    border-radius: 5px;
    border: 2px solid #0a0a0a;
}
::-webkit-scrollbar-thumb:hover {
    background: #404040; 
}

/* FINAL POLISH: Custom Text Selection Color */
::selection {
    background: rgba(59, 130, 246, 0.2); /* Tech Blue */
    color: white;
}

/* Enhanced Gradients - Boosted opacity for visibility */
.tech-gradient-hero {
    background: radial-gradient(circle at 50% 40%, rgba(56, 189, 248, 0.28) 0%, rgba(10, 10, 10, 0) 60%),
                radial-gradient(circle at 80% 80%, rgba(56, 189, 248, 0.18) 0%, rgba(10, 10, 10, 0) 50%);
}
.tech-gradient-purple {
    background: radial-gradient(circle at 85% 30%, rgba(168, 85, 247, 0.4) 0%, rgba(10, 10, 10, 0) 70%),
                radial-gradient(circle at 10% 80%, rgba(139, 92, 246, 0.25) 0%, rgba(10, 10, 10, 0) 60%),
                linear-gradient(180deg, #0a0a0a 0%, #0f1014 100%);
}
.tech-gradient-blue {
    background: radial-gradient(circle at 15% 70%, rgba(34, 197, 94, 0.3) 0%, rgba(10, 10, 10, 0) 60%),
                radial-gradient(circle at 80% 20%, rgba(59, 130, 246, 0.35) 0%, rgba(10, 10, 10, 0) 60%);
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

@keyframes rotate-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
@keyframes rotate-reverse {
    from { transform: rotate(360deg); }
    to { transform: rotate(0deg); }
}

/* Moved Scan Animation Here for Better Performance */
@keyframes scan {
    0% { top: 0; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

/* Glass Panels */
.glass-panel {
    position: relative;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.15); 
    backdrop-filter: blur(12px);
    overflow: hidden;
    transition: border-color 0.3s ease, transform 0.3s ease;
}
.glass-panel:hover {
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
}

/* Text Shimmer */
.shimmer-text {
    background: linear-gradient(to right, #9ca3af 20%, #ffffff 30%, #ffffff 70%, #9ca3af 80%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 500% auto;
    animation: textShimmer 5s ease-in-out infinite alternate;
}
@keyframes textShimmer {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}

/* HUD Elements */
.crosshair {
    position: absolute;
    width: 20px;
    height: 20px;
}
.crosshair::before, .crosshair::after {
    content: '';
    position: absolute;
    background: rgba(255, 255, 255, 0.4); 
}
.crosshair::before { top: 9px; left: 0; width: 100%; height: 1px; }
.crosshair::after { left: 9px; top: 0; height: 100%; width: 1px; }

/* Mobile Menu Animation */
#mobile-menu {
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s;
}
#mobile-menu.menu-closed {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
#mobile-menu.menu-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Staggered Item Animation - Cascading Effect */
.mobile-link {
    opacity: 0;
    transform: translateY(-20px); /* Start slightly ABOVE */
    /* Exit animation: fast slide UP */
    transition: opacity 0.2s ease-in, transform 0.2s ease-in;
}

.menu-open .mobile-link {
    opacity: 1;
    transform: translateY(0); /* Slide DOWN to natural position */
    /* Enter animation: smooth slide down */
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Stagger Delays for cascading entrance */
.menu-open .mobile-link:nth-child(1) { transition-delay: 0.05s; }
.menu-open .mobile-link:nth-child(2) { transition-delay: 0.1s; }
.menu-open .mobile-link:nth-child(3) { transition-delay: 0.15s; }
.menu-open .mobile-link:nth-child(4) { transition-delay: 0.2s; }
.menu-open .mobile-link:nth-child(5) { transition-delay: 0.25s; }

/* Terminal Blinking Cursor */
.cursor-blink {
    display: inline-block;
    animation: blink 1s step-end infinite;
    font-weight: 700;
    color: #3b82f6; 
    margin-left: 2px;
}

/* Anchor scroll offset for sticky header */
[id^="problem"], 
[id^="platform"],
[id^="agents"], 
[id^="value"],
[id^="contact"] {
    scroll-margin-top: 6.5rem; /* 104px - header height + spacing */
}
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}
