/* ============================================================
   HOME.CSS
   Alleen op de homepage geladen. Bevat: de intro met de
   geanimeerde naam, de project-cards grid (HBO/MBO-overzicht),
   en de tijdlijn-sectie.
   ============================================================ */

/* HEADER (intro) & ACHTERGROND OPTIMALISATIE */

body {
    position: relative;
    isolation: isolate;
    background-color: #080808;
}

/* Achtergrondlichten - Zonder zware filter: blur() voor optimale performance */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(
            circle at 10% 20%,
            rgba(175, 0, 0, 0.15) 0%,
            transparent 50%
        ),
        radial-gradient(
            circle at 90% 15%,
            rgba(255, 166, 0, 0.12) 0%,
            transparent 50%
        ),
        radial-gradient(
            circle at 50% 90%,
            rgba(12, 0, 116, 0.18) 0%,
            transparent 55%
        );
    transform: translateZ(0); /* Dwingt hardware acceleratie (GPU) af */
}

header {
    overflow: hidden;
    position: relative;
}

/* Rechterkolom naast de naam: iets smaller houden */
.intro-side {
    max-width: 320px;
}

.intro-accent-bar {
    width: 40px;
    height: 3px;
    border-radius: 2px;
    background-color: #ffa600;
    margin-bottom: 1rem;
}

/* Kleine "scroll"-cue met een zacht stuiterende pijl */
.intro-scroll-cue {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #ffa600;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.intro-scroll-cue i {
    will-change: transform;
    animation: introBounce 1.6s ease-in-out infinite;
}

@keyframes introBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(6px);
    }
}

.desktop-left-col {
    width: min-content;
    flex-shrink: 0;
}

.desktop-left-col p {
    max-width: 76%;
}

/* NAME */

.giant-text {
    font-size: clamp(3.5rem, 11vw, 10.5rem);
    line-height: 0.75;
    letter-spacing: -2px;
    white-space: nowrap;
    margin: 0;
    user-select: none;
}

.giant-text .letter {
    display: inline-block;
    transform-origin: center;
    cursor: default;
    user-select: none;
    will-change: transform, text-shadow;
    backface-visibility: hidden;
    animation: chromaFloat 3.5s infinite ease-in-out;
}

/* ANIMATION ORDER */

.l1 { animation-delay: 0s; }
.l2 { animation-delay: .15s; }
.l3 { animation-delay: .3s; }
.l4 { animation-delay: .45s; }
.l5 { animation-delay: .6s; }
.l6 { animation-delay: .75s; }
.l7 { animation-delay: .9s; }
.l8 { animation-delay: 1.05s; }
.l9 { animation-delay: 1.2s; }
.l10 { animation-delay: 1.35s; }
.l11 { animation-delay: 1.5s; }
.l12 { animation-delay: 1.65s; }

/* AUTO-ANIMATIE: Geoptimaliseerde chroma float */
@keyframes chromaFloat {
    0%, 100% {
        transform: perspective(800px) translateY(0) rotateZ(0deg) scale(1);
        text-shadow:
            1px 0 0 rgba(255, 166, 0, 0.35),
            -1px 0 0 rgba(175, 0, 0, 0.35),
            0 2px 0 rgba(12, 0, 116, 0.35);
    }
    50% {
        transform: perspective(800px) translateY(-10px) rotateZ(-2deg) scale(1.03);
        text-shadow:
            3px 0 0 rgba(255, 166, 0, 0.65),
            -3px 0 0 rgba(175, 0, 0, 0.65),
            0 3px 0 rgba(12, 0, 116, 0.5);
    }
}

/* HOVER EFFECT: Glitch-jitter */
.giant-text .letter:hover {
    animation: chromaGlitch 0.6s infinite steps(1);
    position: relative;
    z-index: 10;
}

@keyframes chromaGlitch {
    0% {
        transform: translate(0, 0) skewX(0deg) scale(1.1);
        text-shadow:
            2px 0 0 #ffa600,
            -2px 0 0 #af0000,
            0 2px 0 #0c0074;
    }
    15% {
        transform: translate(-5px, 2px) skewX(3deg) scale(1.12);
        text-shadow:
            -6px 1px 0 #ffa600,
            6px -1px 0 #af0000,
            3px 3px 0 #0c0074;
    }
    30% {
        transform: translate(4px, -3px) skewX(-4deg) scale(1.1);
        text-shadow:
            6px -2px 0 #ffa600,
            -6px 2px 0 #af0000,
            -3px -2px 0 #0c0074;
    }
    45% {
        transform: translate(-3px, -1px) skewX(2deg) scale(1.14);
        text-shadow:
            -4px 3px 0 #ffa600,
            4px -3px 0 #af0000,
            2px 4px 0 #0c0074;
    }
    60% {
        transform: translate(3px, 3px) skewX(-2deg) scale(1.1);
        text-shadow:
            5px 2px 0 #ffa600,
            -5px -2px 0 #af0000,
            0 -4px 0 #0c0074;
    }
    75% {
        transform: translate(-2px, -2px) skewX(4deg) scale(1.13);
        text-shadow:
            -3px -2px 0 #ffa600,
            3px 2px 0 #af0000,
            -2px 3px 0 #0c0074;
    }
    100% {
        transform: translate(0, 0) skewX(0deg) scale(1.1);
        text-shadow:
            2px 0 0 #ffa600,
            -2px 0 0 #af0000,
            0 2px 0 #0c0074;
    }
}

/* TABLET AND DESKTOP */

@media (min-width: 768px) {
    header {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }

    .desktop-left-col {
        width: min-content;
        flex-shrink: 0;
    }

    .desktop-left-col p {
        max-width: 76%;
        margin-right: auto;
        padding-right: 0 !important;
    }
}

/* PROJECT CARDS (homepage-overzicht: HBO / MBO secties) */

.project-card .ratio {
    overflow: hidden;
    will-change: transform, filter;
}

.project-card:nth-child(1) .cycle-img:first-child { animation-delay: 0s; }
.project-card:nth-child(2) .cycle-img:first-child { animation-delay: 1s; }
.project-card:nth-child(3) .cycle-img:first-child { animation-delay: 2s; }
.project-card:nth-child(4) .cycle-img:first-child { animation-delay: 3s; }

/* HOVER: Afbeeldingen wisselen snel */
.project-card:hover .cycle-img {
    animation: imgCycle 0.8s steps(1) infinite;
}

.project-card:hover .cycle-img:nth-child(1) { animation-delay: 0s; }
.project-card:hover .cycle-img:nth-child(2) { animation-delay: 0.2s; }
.project-card:hover .cycle-img:nth-child(3) { animation-delay: 0.4s; }
.project-card:hover .cycle-img:nth-child(4) { animation-delay: 0.6s; }

.project-card:hover .ratio {
    animation: chromaGlitchImg 0.6s infinite steps(1);
    position: relative;
    z-index: 10;
}

/* TIJDLIJN */

.timeline-track {
    gap: 0;
    padding-left: 90px;
    padding-right: 90px;
}

.timeline-node {
    position: relative;
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: #111;
    border: 2px solid #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    z-index: 2;
    cursor: pointer;
    will-change: transform, box-shadow;
    transition: transform 0.3s ease-out, box-shadow 0.3s ease-out, border-color 0.3s ease-out;
}

.timeline-node .timeline-logo {
    border-radius: 50%;
}

.timeline-logo {
    width: 68%;
    height: 68%;
    object-fit: contain;
    will-change: transform, filter;
}

.plane-logo {
    filter: brightness(0) invert(1);
}

.timeline-node--active {
    border-color: #ffa600;
    box-shadow: 0 0 0 5px rgba(255, 166, 0, 0.15);
}

.timeline-node:hover,
.timeline-node:focus-within {
    transform: scale(1.1);
    outline: none;
    box-shadow:
        0 0 0 6px rgba(255, 166, 0, 0.2),
        0 0 24px rgba(175, 0, 0, 0.35);
}

.timeline-node:hover .timeline-logo,
.timeline-node:focus-within .timeline-logo {
    animation: chromaGlitchImg 0.6s infinite steps(1);
}

/* INFOKAARTJE */
.timeline-info {
    position: absolute;
    bottom: calc(100% + 1rem);
    left: 50%;
    transform: translate(-50%, 8px) scale(0.95);
    width: 200px;
    background-color: #111;
    border: 1px solid rgba(255, 166, 0, 0.4);
    border-radius: 0.5rem;
    padding: 0.85rem 1rem;
    text-align: left;
    opacity: 0;
    pointer-events: none;
    z-index: 5;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    will-change: transform, opacity;
    transition: opacity 0.25s ease-out, transform 0.25s ease-out;
}

.timeline-info::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 7px solid transparent;
    border-top-color: #111;
}

.timeline-node:hover .timeline-info,
.timeline-node:focus-within .timeline-info {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, 0) scale(1);
}

.timeline-info h4 {
    font-size: 0.9rem;
    font-weight: 700;
    margin: 0 0 0.15rem;
    color: #fff;
}

.timeline-info-period {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #ffa600;
    margin: 0 0 0.5rem;
}

.timeline-info-desc {
    font-size: 0.78rem;
    line-height: 1.4;
    color: #adb5bd;
    margin: 0;
}

.timeline-label {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 0.75rem;
    white-space: nowrap;
    font-size: 0.75rem;
    color: #fff;
    text-align: center;
    line-height: 1.3;
}

.timeline-label small {
    color: #adb5bd;
    font-size: 0.7rem;
}

.timeline-line {
    flex-shrink: 0;
    width: 48px;
    height: 4px;
    position: relative;
}

.timeline-line--done {
    background-color: #fff;
}

.timeline-line--upcoming {
    background-image: repeating-linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.3) 0,
        rgba(255, 255, 255, 0.3) 6px,
        transparent 6px,
        transparent 12px
    );
}

.timeline-line--current {
    background-image: linear-gradient(
        90deg,
        #ffa600,
        #af0000,
        #0c0074,
        #ffa600
    );
    background-size: 300% 100%;
    will-change: background-position;
    animation: timelineCurrentFlow 2.5s linear infinite;
}

@keyframes timelineCurrentFlow {
    0% {
        background-position: 0% 0;
    }
    100% {
        background-position: 300% 0;
    }
}

.timeline-line--current::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 12px;
    background-color: #ffa600;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    will-change: box-shadow;
    animation: timelinePing 1.8s ease-out infinite;
}

@keyframes timelinePing {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 166, 0, 0.6);
    }
    70% {
        box-shadow: 0 0 0 14px rgba(255, 166, 0, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 166, 0, 0);
    }
}

.timeline-now-label {
    position: absolute;
    top: -1.75rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #ffa600;
    white-space: nowrap;
}

/* MOBILE */

@media (max-width: 767.98px) {
    header {
        margin-top: 3rem !important;
    }

    .giant-text {
        font-size: clamp(3rem, 15vw, 5rem);
        letter-spacing: -1px;
    }

    .desktop-left-col {
        width: 100%;
    }

    .desktop-left-col p {
        max-width: 100%;
    }
}