/* Custom Utilities */
.noise-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 50;
    opacity: 0.03;
    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)'/%3E%3C/svg%3E");
}

/* Staggered Animation */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Electric Hover Effect */
.electric-border {
    position: relative;
    overflow: hidden;
}
.electric-border::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 2px;
    background: currentColor;
    transition: left 0.3s ease-in-out;
}
.electric-border:hover::before {
    left: 0;
}

/* Switch Toggle */
.switch-input { display: none; }
.switch-label {
    width: 48px;
    height: 24px;
    background: #ccc;
    border-radius: 999px;
    position: relative;
    cursor: pointer;
    border: 2px solid transparent;
    transition: 0.3s;
}
.switch-label::after {
    content: '';
    position: absolute;
    top: 2px; left: 2px;
    width: 16px; height: 16px;
    background: white;
    border-radius: 50%;
    transition: 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}
html.dark .switch-label { background: #1f1f1f; border-color: #00F0FF; }
html.dark .switch-label::after { transform: translateX(24px); background: #00F0FF; }

/* Glitch Text Effect for Hero */
.glitch-wrapper {
    position: relative;
}
.glitch-wrapper::before, .glitch-wrapper::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
}
.glitch-wrapper:hover::before {
    left: 2px;
    text-shadow: -1px 0 #ff00c1;
    clip-path: inset(44% 0 61% 0);
    animation: glitch-anim-1 0.4s infinite linear alternate-reverse;
}
@keyframes glitch-anim-1 {
    0% { clip-path: inset(20% 0 80% 0); }
    20% { clip-path: inset(60% 0 10% 0); }
    40% { clip-path: inset(40% 0 50% 0); }
    60% { clip-path: inset(80% 0 5% 0); }
    80% { clip-path: inset(10% 0 70% 0); }
    100% { clip-path: inset(30% 0 20% 0); }
}
