body {
    background-color: #050505;
    color: #ffffff;
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0a0a0a;
}
::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #444;
}

/* Glassmorphism Utilities */
.glass {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.glass-nav {
    background: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Gradient Text */
.text-gradient {
    background: linear-gradient(to right, #ffffff, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-gradient-alt {
    background: linear-gradient(to right, #6366f1, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Scroll Reveal Utility */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
    will-change: opacity, transform; /* Performance hint */
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Canvas z-index */
#hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.6;
    pointer-events: none;
}

/* Hero Grid Animation */
.perspective-grid {
    position: absolute;
    width: 200%;
    height: 130%;
    left: -50%;
    top: -30%;
    background-image: 
        linear-gradient(rgba(99, 102, 241, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    transform: perspective(500px) rotateX(60deg);
    animation: grid-move 20s linear infinite;
    z-index: -1;
    mask-image: linear-gradient(to bottom, transparent 0%, black 40%, transparent 90%);
}

@keyframes grid-move {
    0% { transform: perspective(500px) rotateX(60deg) translateY(0); }
    100% { transform: perspective(500px) rotateX(60deg) translateY(50px); }
}

/* Glitch Text Effect */
.glitch-wrapper {
    position: relative;
    display: inline-block;
}
.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent; 
}
.glitch-text::before {
    left: 2px;
    text-shadow: -1px 0 #ff00c1;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}
.glitch-text::after {
    left: -2px;
    text-shadow: -1px 0 #00fff9;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim2 5s infinite linear alternate-reverse;
}
@keyframes glitch-anim {
    0% { clip: rect(30px, 9999px, 10px, 0); }
    5% { clip: rect(80px, 9999px, 90px, 0); }
    10% { clip: rect(40px, 9999px, 15px, 0); }
    100% { clip: rect(40px, 9999px, 15px, 0); }
}
@keyframes glitch-anim2 {
    0% { clip: rect(10px, 9999px, 80px, 0); }
    5% { clip: rect(60px, 9999px, 10px, 0); }
    10% { clip: rect(20px, 9999px, 60px, 0); }
    100% { clip: rect(20px, 9999px, 60px, 0); }
}

/* Spotlight Card Effect */
@media (hover: hover) {
    .spotlight-cards:hover .spotlight-card::after {
        opacity: 1;
    }
    .spotlight-cards:hover .spotlight-card::before {
        opacity: 1;
    }
}

.spotlight-card::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.5s;
    background: radial-gradient(600px circle at var(--mouse-x) var(--mouse-y), rgba(168, 85, 247, 0.4), transparent 40%);
    z-index: 1;
    pointer-events: none;
}
.spotlight-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: inherit;
    background: radial-gradient(800px circle at var(--mouse-x) var(--mouse-y), rgba(255, 255, 255, 0.06), transparent 40%);
    z-index: 3;
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
}

.spotlight-inner {
    background-color: #121212; /* Match card color */
    position: absolute;
    inset: 1px;
    border-radius: inherit;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
}