/* Design Tokens */
html {
    scroll-padding-top: 100px;
}

:root {
    --primary: #ffb4a8;
    --on-primary: #690100;
    --primary-container: #ff5540;
    --on-primary-container: #5c0000;
    --secondary: #c9c6c5;
    --on-secondary: #313030;
    --background: #210e0b;
    --on-background: #ffdad4;
    --surface: #210e0b;
    --on-surface: #ffdad4;
    --error: #ffb4ab;
    --accent: #ff0000;
}

/* Custom Styles */
.glass-panel {
    background: rgba(26, 26, 26, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: none;
    border-radius: 1.5rem;
}

.glow-red {
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.25);
}

.hover-glow-red:hover {
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.25);
    transform: translateY(-2px);
}

.nav-link-underline {
    position: relative;
}

.nav-link-underline::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 50%;
    background-color: #ff0000;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link-underline:hover::after {
    width: 100%;
}

.card-scanline {
    position: relative;
    overflow: hidden;
    border-radius: 1.5rem;
}

.card-scanline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #ff0000, transparent);
    transform: translateX(-100%);
    transition: transform 0.5s ease;
}

.card-scanline:hover::before {
    transform: translateX(100%);
}

.cursor {
    display: inline-block;
    width: 2px;
    height: 1.2em;
    background-color: #ff0000;
    margin-left: 4px;
    vertical-align: middle;
    animation: blink 1s infinite step-end;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

/* Glitch Effect */
.glitch {
    position: relative;
    display: inline-block;
}

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

.glitch::before {
    left: 2px;
    text-shadow: -2px 0 #ff0000;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -2px 0 #00ffff;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim2 5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% {
        clip: rect(31px, 9999px, 94px, 0);
    }

    5% {
        clip: rect(70px, 9999px, 71px, 0);
    }

    10% {
        clip: rect(29px, 9999px, 83px, 0);
    }

    15% {
        clip: rect(16px, 9999px, 91px, 0);
    }

    20% {
        clip: rect(2px, 9999px, 23px, 0);
    }

    25% {
        clip: rect(44px, 9999px, 56px, 0);
    }

    30% {
        clip: rect(65px, 9999px, 70px, 0);
    }

    35% {
        clip: rect(34px, 9999px, 40px, 0);
    }

    40% {
        clip: rect(2px, 9999px, 61px, 0);
    }

    45% {
        clip: rect(24px, 9999px, 90px, 0);
    }

    50% {
        clip: rect(56px, 9999px, 7px, 0);
    }

    55% {
        clip: rect(89px, 9999px, 11px, 0);
    }

    60% {
        clip: rect(12px, 9999px, 45px, 0);
    }

    65% {
        clip: rect(67px, 9999px, 23px, 0);
    }

    70% {
        clip: rect(45px, 9999px, 67px, 0);
    }

    75% {
        clip: rect(12px, 9999px, 45px, 0);
    }

    80% {
        clip: rect(67px, 9999px, 23px, 0);
    }

    85% {
        clip: rect(45px, 9999px, 67px, 0);
    }

    90% {
        clip: rect(12px, 9999px, 45px, 0);
    }

    95% {
        clip: rect(67px, 9999px, 23px, 0);
    }

    100% {
        clip: rect(45px, 9999px, 67px, 0);
    }
}

@keyframes glitch-anim2 {
    0% {
        clip: rect(67px, 9999px, 23px, 0);
    }

    5% {
        clip: rect(45px, 9999px, 67px, 0);
    }

    10% {
        clip: rect(12px, 9999px, 45px, 0);
    }

    15% {
        clip: rect(67px, 9999px, 23px, 0);
    }

    20% {
        clip: rect(45px, 9999px, 67px, 0);
    }

    25% {
        clip: rect(12px, 9999px, 45px, 0);
    }

    30% {
        clip: rect(67px, 9999px, 23px, 0);
    }

    35% {
        clip: rect(45px, 9999px, 67px, 0);
    }

    40% {
        clip: rect(12px, 9999px, 45px, 0);
    }

    45% {
        clip: rect(67px, 9999px, 23px, 0);
    }

    50% {
        clip: rect(45px, 9999px, 67px, 0);
    }

    55% {
        clip: rect(12px, 9999px, 45px, 0);
    }

    60% {
        clip: rect(67px, 9999px, 23px, 0);
    }

    65% {
        clip: rect(45px, 9999px, 67px, 0);
    }

    70% {
        clip: rect(12px, 9999px, 45px, 0);
    }

    75% {
        clip: rect(67px, 9999px, 23px, 0);
    }

    80% {
        clip: rect(45px, 9999px, 67px, 0);
    }

    85% {
        clip: rect(12px, 9999px, 45px, 0);
    }

    90% {
        clip: rect(67px, 9999px, 23px, 0);
    }

    95% {
        clip: rect(45px, 9999px, 67px, 0);
    }

    100% {
        clip: rect(12px, 9999px, 45px, 0);
    }
}

.logo-animate {
    animation: logo-pulse 4s infinite ease-in-out;
    will-change: transform, filter;
}

@keyframes logo-pulse {

    0%,
    100% {
        transform: scale(1) translateY(0);
        filter: drop-shadow(0 0 15px rgba(255, 0, 0, 0.2));
    }

    50% {
        transform: scale(1.05) translateY(-10px);
        filter: drop-shadow(0 0 30px rgba(255, 0, 0, 0.6));
    }
}

/* Custom Cursor */
.cursor-dot,
.cursor-outline {
    pointer-events: none;
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9999;
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.cursor-dot {
    width: 8px;
    height: 8px;
    background-color: #ff0000;
}

.cursor-outline {
    width: 40px;
    height: 40px;
    border: 2px solid rgba(255, 0, 0, 0.5);
}

@media (max-width: 1024px) {

    .cursor-dot,
    .cursor-outline {
        display: none;
    }
}

/* Hide default cursor only on desktop */
@media (min-width: 1025px) {

    body,
    a,
    button {
        cursor: none !important;
    }
}

/* Terminal Animations */
.terminal-line {
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.5s ease-out;
}

.terminal-line.reveal {
    opacity: 1;
    transform: translateY(0);
}

.terminal-window {
    position: relative;
    overflow: hidden;
}

.terminal-window::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%,
            rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg,
            rgba(255, 0, 0, 0.06),
            rgba(0, 255, 0, 0.02),
            rgba(0, 0, 255, 0.06));
    background-size: 100% 4px, 3px 100%;
    pointer-events: none;
    z-index: 2;
}

.terminal-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(255, 0, 0, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

/* Skills Marquee */
.marquee-container {
    display: flex;
    overflow: hidden;
    user-select: none;
    gap: 40px;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.marquee-content {
    flex-shrink: 0;
    display: flex;
    justify-content: space-around;
    min-width: 100%;
    gap: 40px;
    animation: scroll 30s linear infinite;
}

.marquee-container:hover .marquee-content {
    animation-play-state: paused;
}

@keyframes scroll {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(calc(-100% - 40px));
    }
}

.skill-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    white-space: nowrap;
}

.skill-item:hover {
    background: rgba(255, 0, 0, 0.05);
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.1);
}

.skill-text {
    max-width: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Space Grotesk', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.75rem;
    color: white;
}

.skill-item:hover .skill-text {
    max-width: 200px;
    opacity: 1;
}

/* Project Card Styles */
.project-card {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(26, 26, 26, 0.4);
    border: none;
}

.project-card:hover {
    background: rgba(255, 0, 0, 0.05);
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(255, 0, 0, 0.1);
}

.project-details {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card:hover .project-details {
    max-height: 200px;
    opacity: 1;
    margin-top: 1.5rem;
}

.project-image-container {
    transition: all 0.5s ease;
}

.project-card:hover .project-image-container {
    filter: grayscale(0);
    transform: scale(1.05);
}

/* Scanning Button Effect */
.btn-scan {
    position: relative;
    overflow: hidden;
    transition: all 0.5s ease;
}

.btn-scan::before {
    content: '';
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent, rgba(255, 0, 0, 0.4), transparent);
    animation: btn-scan-anim 3s infinite linear;
    pointer-events: none;
}

@keyframes btn-scan-anim {
    0% {
        top: -100%;
    }

    100% {
        top: 100%;
    }
}

.btn-scan:hover {
    background: #ff0000;
    color: white;
    box-shadow: 0 0 30px rgba(255, 0, 0, 0.4);
}

/* Discord Card Premium */
.discord-card-premium {
    box-shadow: 0 0 50px rgba(88, 101, 242, 0.1);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.discord-card-premium:hover {
    box-shadow: 0 0 80px rgba(88, 101, 242, 0.2), 0 0 30px rgba(255, 0, 0, 0.1);
}
