/* Base resets & utilities */
body {
    cursor: none; /* Hide default cursor for custom one */
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #050505;
}
::-webkit-scrollbar-thumb {
    background: #1f2937;
    border: 1px solid #00ff41;
}
::-webkit-scrollbar-thumb:hover {
    background: #00ff41;
}

/* CRT Scanline Effect */
.scanlines {
    background: linear-gradient(
        to bottom,
        rgba(255,255,255,0),
        rgba(255,255,255,0) 50%,
        rgba(0,0,0,0.2) 50%,
        rgba(0,0,0,0.2)
    );
    background-size: 100% 4px;
    animation: scrollLines 10s linear infinite;
}

@keyframes scrollLines {
    0% { background-position: 0 0; }
    100% { background-position: 0 100%; }
}

/* Digital Noise */
.noise {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.1'/%3E%3C/svg%3E");
}

/* Glitch Animation for Name */
.glitch-wrapper {
    position: relative;
}

.glitch {
    position: relative;
    display: inline-block;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    left: 2px;
    text-shadow: -1px 0 #00ff41;
    clip: rect(24px, 550px, 90px, 0);
    animation: glitch-anim-1 3s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -1px 0 #00f3ff;
    clip: rect(85px, 550px, 140px, 0);
    animation: glitch-anim-2 2.5s infinite linear alternate-reverse;
}

@keyframes glitch-anim-1 {
    0% { clip: rect(20px, 9999px, 80px, 0); }
    20% { clip: rect(10px, 9999px, 30px, 0); }
    40% { clip: rect(50px, 9999px, 90px, 0); }
    60% { clip: rect(80px, 9999px, 20px, 0); }
    80% { clip: rect(30px, 9999px, 60px, 0); }
    100% { clip: rect(70px, 9999px, 10px, 0); }
}

@keyframes glitch-anim-2 {
    0% { clip: rect(60px, 9999px, 10px, 0); }
    20% { clip: rect(30px, 9999px, 60px, 0); }
    40% { clip: rect(80px, 9999px, 20px, 0); }
    60% { clip: rect(10px, 9999px, 50px, 0); }
    80% { clip: rect(40px, 9999px, 90px, 0); }
    100% { clip: rect(20px, 9999px, 70px, 0); }
}

/* Typing Cursor */
.cursor-blink {
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Glass Panel Enhancements */
.glass-panel {
    background: rgba(10, 10, 10, 0.7);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

/* Mobile responsive cursor reset */
@media (max-width: 768px) {
    body {
        cursor: auto;
    }
}