/* ─── Keyframe Animations ─────────────────────────────────── */

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(0.85);
    }
}

@keyframes floatCard {

    0%,
    100% {
        transform: translateY(0) rotate(0.5deg);
    }

    50% {
        transform: translateY(-14px) rotate(-0.5deg);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes glowPulse {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(91, 156, 246, 0.3);
    }

    50% {
        box-shadow: 0 0 40px rgba(91, 156, 246, 0.7), 0 0 80px rgba(91, 156, 246, 0.2);
    }
}

@keyframes letterReveal {
    from {
        opacity: 0;
        transform: translateY(20px) rotateX(-40deg);
    }

    to {
        opacity: 1;
        transform: translateY(0) rotateX(0);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% center;
    }

    100% {
        background-position: 200% center;
    }
}

@keyframes rotateSlow {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes borderGlow {

    0%,
    100% {
        border-color: rgba(78, 144, 226, 0.25);
    }

    50% {
        border-color: rgba(126, 200, 227, 0.6);
    }
}

/* ─── Hero entrance animations ────────────────────────────── */
.hero-badge {
    animation: fadeInUp 0.7s ease both;
    animation-delay: 0.1s;
}

.hero-greeting {
    animation: fadeInUp 0.7s ease both;
    animation-delay: 0.2s;
}

.hero-name {
    animation: fadeInUp 0.7s ease both;
    animation-delay: 0.3s;
}

.hero-role {
    animation: fadeInUp 0.7s ease both;
    animation-delay: 0.4s;
}

.hero-cta {
    animation: fadeInUp 0.7s ease both;
    animation-delay: 0.55s;
}

.hero-meta {
    animation: fadeInUp 0.7s ease both;
    animation-delay: 0.7s;
}

.hero-visual {
    animation: slideInRight 0.9s cubic-bezier(0.4, 0, 0.2, 1) both;
    animation-delay: 0.3s;
}

/* ─── Glow animations ─────────────────────────────────────── */
.hero-card {
    animation: floatCard 6s ease-in-out infinite, glowPulse 4s ease-in-out infinite;
}

/* ─── Shimmer text ────────────────────────────────────────── */
.shimmer-text {
    background: linear-gradient(90deg,
            #fff 0%,
            var(--cyan-light) 30%,
            #fff 60%,
            var(--cyan) 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 4s linear infinite;
}

/* ─── Mobile menu stagger ─────────────────────────────────── */
.mobile-menu.open a:nth-child(1) {
    transition-delay: 0.05s;
}

.mobile-menu.open a:nth-child(2) {
    transition-delay: 0.10s;
}

.mobile-menu.open a:nth-child(3) {
    transition-delay: 0.15s;
}

.mobile-menu.open a:nth-child(4) {
    transition-delay: 0.20s;
}

.mobile-menu.open a:nth-child(5) {
    transition-delay: 0.25s;
}

.mobile-menu.open a:nth-child(6) {
    transition-delay: 0.30s;
}

.mobile-menu.open .mobile-lang {
    transition-delay: 0.35s;
    opacity: 1;
    transform: none;
}

/* ─── Skill bars animate trigger ─────────────────────────── */
.skill-fill {
    transition-delay: var(--delay, 0s);
}

/* ─── Timeline pulse ──────────────────────────────────────── */
.timeline-item::before {
    animation: glowPulse 2.5s ease-in-out infinite;
}

/* ─── Card border breathe ─────────────────────────────────── */
.hero-card {
    animation: floatCard 6s ease-in-out infinite, borderGlow 4s ease-in-out infinite;
}