@keyframes fade-up {
    from {
        opacity: 0;
        transform: translateY(28px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes grid-drift {
    0% { transform: translate(0, 0); }
    100% { transform: translate(72px, 72px); }
}

@keyframes float-particle {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.25;
    }
    50% {
        transform: translate(var(--tx, 20px), var(--ty, -30px)) scale(1.3);
        opacity: 0.7;
    }
}

@keyframes line-move {
    0% {
        transform: translateX(-100%);
        opacity: 0;
    }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% {
        transform: translateX(100vw);
        opacity: 0;
    }
}

@keyframes glow-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.4;
    }
    50% {
        transform: scale(1.08);
        opacity: 0.7;
    }
}

@keyframes node-float {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(10px, -15px); }
    66% { transform: translate(-8px, 10px); }
}

@keyframes ring-expand {
    0%, 100% {
        transform: scale(1);
        opacity: 0.25;
    }
    50% {
        transform: scale(1.04);
        opacity: 0.55;
    }
}

/* Scroll-driven navbar */
@supports (animation-timeline: scroll()) {
    .navbar {
        animation: navbar-scroll linear forwards;
        animation-timeline: scroll();
        animation-range: 0 100px;
    }

    @keyframes navbar-scroll {
        0% {
            background-color: transparent;
            box-shadow: none;
            backdrop-filter: none;
        }
        100% {
            background-color: rgba(5, 5, 5, 0.85);
            box-shadow: var(--shadow-sm);
            backdrop-filter: blur(20px);
        }
    }
}

@supports not (animation-timeline: scroll()) {
    .navbar {
        background-color: rgba(5, 5, 5, 0.8);
        backdrop-filter: blur(16px);
    }
}

.about,
.services,
.contact {
    animation: fade-in 0.8s ease;
}
