/* === LIGHT STYLES === */
.fade-up { opacity: 0; transform: translateY(20px); animation: fadeUp 0.6s ease-out forwards; }
@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }
.hover-video { opacity: 0; transition: opacity .4s ease; }
.project-card:hover .hover-video { opacity: 1; }
.project-card:hover .default-video { opacity: 0; }

/* === DARK STYLES === */
html.dark body { overflow-x: hidden; }

.fade-up { opacity: 0; transform: translateY(20px); animation: fadeUp 0.6s ease-out forwards; }
    @keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }
    .hover-video { opacity: 0; transition: opacity .4s ease; }
    .project-card:hover .hover-video { opacity: 1; }
    .project-card:hover .default-video { opacity: 0; }
    .glow-red {
    box-shadow: 0 0 15px rgba(255, 26, 26, 0.4);
    }

    /* text glow */
    .text-glow {
    text-shadow: 0 0 8px rgba(255, 26, 26, 0.6);
    }

    /* glass hacker cards */
    .hacker-card {
    background: rgba(17,17,17,0.8);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(139,0,0,0.4);
    }

    .grid-bg {
    position: relative;
    overflow: hidden;
    }

    .grid-bg::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(255,0,0,0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,0,0,0.07) 1px, transparent 1px);
    background-size: 40px 40px;
    animation: gridMove 20s linear infinite;
    pointer-events: none;
    }

    @keyframes gridMove {
    from { transform: translateY(0); }
    to { transform: translateY(40px); }
    }

    .scanlines::after {
    content: "";
    position: fixed;
    inset: 0;
    background: repeating-linear-gradient(
        to bottom,
        rgba(255, 0, 0, 0.03),
        rgba(255, 0, 0, 0.03) 1px,
        transparent 1px,
        transparent 3px
    );
    pointer-events: none;
    z-index: 999;
    }

    .glitch {
    position: relative;
    color: #fff;
    }

    .glitch::before,
    .glitch::after {
    content: attr(data-text);
    position: absolute;
    left: 0;
    width: 100%;
    overflow: hidden;
    }

    .glitch::before {
    animation: glitchTop 1.5s infinite linear alternate-reverse;
    color: #ff1a1a;
    }

    .glitch::after {
    animation: glitchBottom 1.5s infinite linear alternate-reverse;
    color: #8b0000;
    }

    @keyframes glitchTop {
    0% { clip-path: inset(0 0 80% 0); transform: translate(-2px, -2px); }
    50% { clip-path: inset(0 0 20% 0); transform: translate(2px, 2px); }
    100% { clip-path: inset(0 0 60% 0); transform: translate(-1px, 1px); }
    }

    @keyframes glitchBottom {
    0% { clip-path: inset(80% 0 0 0); transform: translate(2px, 2px); }
    50% { clip-path: inset(20% 0 0 0); transform: translate(-2px, -2px); }
    100% { clip-path: inset(60% 0 0 0); transform: translate(1px, -1px); }
    }
    button:hover,
    a:hover {
    transform: translateY(-2px);
    }

    .hacker-card:hover {
    transform: translateY(-6px);
    }

    .cursor-glow {
    cursor: crosshair;
    }

    .nav-link {
    position: relative;
    color: #d1d5db; /* gray-300 */
    transition: all .3s ease;
    }

    .nav-link:hover {
    color: #FF1A1A;
    text-shadow: 0 0 8px rgba(255, 26, 26, 0.6);
    }

    /* Underline animation */
    .nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 0%;
    height: 2px;
    background: #FF1A1A;
    transition: width .3s ease;
    }

    .nav-link:hover::after {
    width: 100%;
    }

    .active-nav {
    color: #4B1E1D;
    text-decoration: bold;
    }


    .active-nav::after {
    width: 100%;
    height: 1px;
    background: #ff1a1a;
    }

    header::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: -100%;
    width: 200%;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        #FF1A1A,
        transparent
    );
    
    }

    @keyframes navScan {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
    }

    .glitch-link {
    position: relative;
    color: #9ca3af; /* gray-400 */
    transition: color .3s ease;
    }

    .glitch-link::before,
    .glitch-link::after {
    content: attr(data-text);
    position: absolute;
    left: 0;
    opacity: 0;
    pointer-events: none;
    }

    .glitch-link::before {
    color: #ff1a1a;
    transform: translate(1px, -1px);
    }

    .glitch-link::after {
    color: #8b0000;
    transform: translate(-1px, 1px);
    }

    /* Hover active glitch */
    .glitch-link:hover::before,
    .glitch-link:hover::after {
    opacity: 0.7;
    animation: glitchShift 0.3s infinite;
    }

    .glitch-link:hover {
    color: #ffffff;
    text-shadow: 0 0 6px rgba(255, 26, 26, 0.6);
    }

    @keyframes glitchShift {
    0% { transform: translate(1px, -1px); }
    50% { transform: translate(-1px, 1px); }
    100% { transform: translate(1px, -1px); }
    }

    @keyframes textFlicker {
    0%, 18%, 22%, 25%, 53%, 57%, 100% {
        opacity: 1;
    }
    20%, 24%, 55% {
        opacity: 0.4;
    }
    }

    .glitch-link:hover {
    animation: textFlicker 1.5s infinite;
    }

    .section-title {
    font-family: monospace;
    font-size: 1.5rem;
    text-align: center;
    margin-bottom: 2rem;
    color: #9ca3af;
    position: relative;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    }
    @media (min-width: 768px) {
        .section-title { font-size: 1.8rem; margin-bottom: 4rem; letter-spacing: 0.2em; }
    }

    /* Red glitch overlay */
    .section-title::before,
    .section-title::after {
    content: attr(data-text);
    position: absolute;
    left: 0;
    width: 100%;
    opacity: 0;
    }

    .section-title::before {
    color: #ff1a1a;
    transform: translate(2px, -2px);
    }

    .section-title::after {
    color: #8b0000;
    transform: translate(-2px, 2px);
    }

    .section-title:hover::before,
    .section-title:hover::after {
    opacity: 0.6;
    animation: titleGlitch 0.3s infinite;
    }

    @keyframes titleGlitch {
    0% { transform: translate(2px, -2px); }
    50% { transform: translate(-2px, 2px); }
    100% { transform: translate(2px, -2px); }
    }

    .section-title::after {
    border-right: 2px solid #ff1a1a;
    animation: blinkCursor 1s infinite;
    }

    @keyframes blinkCursor {
    0%, 50%, 100% { border-color: #ff1a1a; }
    25%, 75% { border-color: transparent; }
    }

    .section-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    }
    @media (min-width: 768px) {
        .section-bar { margin-bottom: 4rem; }
    }

    .section-code {
    font-family: monospace;
    color: #ff1a1a;
    opacity: 0.6;
    }

    /* Mobiel Menu Custom */
    .mobile-menu {
        transition: all 0.3s ease-in-out;
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
    }
    .mobile-menu.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }

/*Test */

.glitch-link {
    position: relative;
    color: #9ca3af; /* gray-400 */
    transition: color .3s ease;
}

.glitch-link::before,
.glitch-link::after {
    content: attr(data-text); /* Haalt tekst op uit HTML */
    position: absolute;
    left: 0;
    opacity: 0;
    pointer-events: none;
}

.glitch-link::before {
    color: #ff1a1a;
    transform: translate(1px, -1px);
}

.glitch-link::after {
    color: #8b0000;
    transform: translate(-1px, 1px);
}

/* Activatie bij hover */
.glitch-link:hover::before,
.glitch-link:hover::after {
    opacity: 0.7;
    animation: glitchShift 0.3s infinite;
}

.glitch-link:hover {
    color: #ffffff;
    text-shadow: 0 0 6px rgba(255, 26, 26, 0.6);
    animation: textFlicker 1.5s infinite;
}

@keyframes glitchShift {
    0% { transform: translate(1px, -1px); }
    50% { transform: translate(-1px, 1px); }
    100% { transform: translate(1px, -1px); }
}

@keyframes textFlicker {
    0%, 18%, 22%, 25%, 53%, 57%, 100% { opacity: 1; }
    20%, 24%, 55% { opacity: 0.4; }
}

/* === LIGHT MODE NAV (Minimalist) === */
.nav-link-light {
    position: relative;
    color: #6b7280; /* gray-500 */
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: color 0.3s ease;
}

.nav-link-light:hover, .active-light {
    color: #4B1E1D; /* your primary bordeaux */
}

.nav-link-light::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -4px;
    left: 0;
    background-color: #4B1E1D;
    transition: width 0.3s ease;
}

.active-light::after {
    width: 100%;
}

/* === DARK MODE NAV (Hacker/Matrix) === */
.nav-link-dark {
    font-family: 'Courier New', Courier, monospace;
    color: rgba(255, 26, 26, 0.5); /* Dimmed red */
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.nav-link-dark:hover, .active-dark {
    color: #ffcccc;
    text-shadow: 0 0 8px rgba(255, 117, 117, 0.8), 0 0 15px rgba(255, 26, 26, 0.4);
}

/* The "Glow Bar" for Dark Mode */
.nav-link-dark::before {
    content: '> ';
    opacity: 0;
    transition: opacity 0.3s ease;
}

.active-dark::before {
    opacity: 1;
}
