/* Custom Styles to complement Tailwind CSS */

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

/* Track */
::-webkit-scrollbar-track {
    background: #040706;
}

/* Handle */
::-webkit-scrollbar-thumb {
    background: #0d1110;
    border: 1px solid #00ff6633;
    border-radius: 5px;
}

/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
    background: #00ff66;
}

/* Light Mode Overrides for Scrollbar */
html:not(.dark) ::-webkit-scrollbar-track {
    background: #f4fbf7;
}

html:not(.dark) ::-webkit-scrollbar-thumb {
    background: #d1e6db;
    border: 1px solid #8b9a9333;
}

html:not(.dark) ::-webkit-scrollbar-thumb:hover {
    background: #8b9a93;
}

/* Terminal Typing Cursor Animation */
.cursor {
    display: inline-block;
    width: 10px;
    height: 1.2em;
    background-color: #00ff66;
    vertical-align: bottom;
    animation: blink 1s step-end infinite;
    margin-left: 2px;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* Project Card Hover Animation */
.project-card {
    transition: all 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px -10px rgba(0, 255, 102, 0.2);
    border-color: rgba(0, 255, 102, 0.5);
}

html:not(.dark) .project-card:hover {
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.1);
    border-color: #8b9a93;
}

/* Scanner Animation for Radar */
@keyframes scan {
    0% {
        transform: translateY(-100%);
    }

    100% {
        transform: translateY(100%);
    }
}

/* Scroll Reveal Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Theme Toggle Glitch Effect */
.glitch-active {
    animation: glitch 0.5s cubic-bezier(.25, .46, .45, .94) both;
    filter: brightness(1.1) contrast(1.2);
}

@keyframes glitch {
    0% {
        transform: translate(0);
        filter: hue-rotate(0deg) brightness(1);
    }

    20% {
        transform: translate(-2px, 2px);
        text-shadow: -2px 0 red, 2px 0 blue;
        filter: hue-rotate(90deg) brightness(1.2);
    }

    40% {
        transform: translate(-2px, -2px);
        text-shadow: 2px 0 red, -2px 0 blue;
        filter: hue-rotate(180deg) brightness(0.8);
    }

    60% {
        transform: translate(2px, 2px);
        text-shadow: -2px 0 red, 2px 0 blue;
        filter: hue-rotate(270deg) brightness(1.5);
    }

    80% {
        transform: translate(2px, -2px);
        text-shadow: 2px 0 red, -2px 0 blue;
        filter: hue-rotate(90deg) brightness(0.5);
    }

    100% {
        transform: translate(0);
        text-shadow: none;
        filter: hue-rotate(0deg) brightness(1);
    }
}