/* animations.css — Scroll progress bar, scroll-in animations, responsive */

/* Scroll progress bar */
.scroll-progress-container {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: rgba(255, 255, 255, 0.1);
    z-index: 9999;
    transform: translateY(100%);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}

.scroll-progress-container.active {
    transform: translateY(0);
    opacity: 1;
}

.scroll-progress-bar {
    height: 100%;
    width: 0%;
    background-color: #fff;
    transition: width 0.15s ease-out;
}

/* Scroll-in animations (IntersectionObserver) */
.achievement-card,
.project-card,
.section-header {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s ease-out;
}

.show-element {
    opacity: 1;
    transform: translateY(0);
}

/* Timeline stagger */
.timeline-item-v2 {
    opacity: 0;
    transform: translateY(20px);
    animation: timelineFadeIn 0.5s ease-out forwards;
}

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

.timeline-item-v2:nth-child(1) {
    animation-delay: 0.1s;
}

.timeline-item-v2:nth-child(2) {
    animation-delay: 0.25s;
}

.timeline-item-v2:nth-child(3) {
    animation-delay: 0.4s;
}

.timeline-item-v2:nth-child(4) {
    animation-delay: 0.55s;
}

.achievement-card:nth-child(2) {
    transition-delay: 0.2s;
}

.achievement-card:nth-child(3) {
    transition-delay: 0.4s;
}

/* Responsive */
@media (max-width: 900px) {
    .hero-inner {
        flex-direction: column-reverse;
        justify-content: center;
        gap: 30px;
        padding-top: 40px;
    }

    .portrait-frame {
        width: 240px;
        height: 315px;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .title {
        font-size: 3rem;
    }

    .section-header h2,
    .section-title {
        font-size: 2.8rem;
    }

    .timeline-item {
        grid-template-columns: 1fr;
    }

    .timeline-role {
        font-size: 1.8rem;
    }

    .timeline-item-v2 {
        margin-bottom: 40px;
    }
}