/* Portfolio Entry Animations */
/* These animations apply to a wrapper element to avoid affecting background positioning */

/* Animation wrapper for content */
.entry-animation-wrapper {
    position: relative;
    width: 100%;
    min-height: 100vh;
}

/* Fade Up Animation */
.entry-animation-wrapper.entry-fade-up {
    animation: entryFadeUp 1s ease-out forwards;
}

@keyframes entryFadeUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Blur Animation */
.entry-animation-wrapper.entry-blur {
    animation: entryBlur 1.5s ease-out forwards;
}

@keyframes entryBlur {
    from {
        filter: blur(20px);
        opacity: 0;
    }
    to {
        filter: blur(0);
        opacity: 1;
    }
}

/* Curtain Reveal Animation */
body.entry-curtain {
    position: relative;
}

/* Curtain overlay - full black screen that lifts up */
.curtain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #000000;
    z-index: 99999;
    pointer-events: none;
}

/* Animation applied after page load */
.curtain-overlay.lift {
    animation: curtainLift 1.5s ease-out forwards;
}

@keyframes curtainLift {
    from {
        transform: translateY(0);
    }
    to {
        transform: translateY(-100%);
    }
}

/* Loading Bar Animation */
body.entry-loading-bar {
    position: relative;
}

/* Brightness Animation */
.entry-animation-wrapper.entry-brightness {
    animation: entryBrightness 2s ease-out forwards;
}

@keyframes entryBrightness {
    from {
        filter: brightness(100);
    }
    to {
        filter: brightness(1);
    }
}

/* Loading Screen Overlay - Full Black Background */
.loading-screen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #000000;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    animation: fadeOutLoadingScreen 0.5s ease-out 2s forwards;
}

/* Loading Percentage Display */
.loading-percentage {
    font-size: 120px;
    font-weight: 700;
    color: var(--accent-color);
    text-shadow: 0 0 30px var(--accent-color);
    margin-bottom: 30px;
}

/* Loading Bar Container */
.loading-bar-container {
    width: 400px;
    max-width: 80%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.loading-bar-fill {
    height: 100%;
    background: var(--accent-color);
    box-shadow: 0 0 20px var(--accent-color);
    border-radius: 4px;
    transition: width 0.1s ease-out;
}

@keyframes fadeOutLoadingScreen {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
        pointer-events: none;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .loading-percentage {
        font-size: 72px;
    }

    .loading-bar-container {
        width: 300px;
    }

    @keyframes entryFadeUp {
        from {
            opacity: 0;
            transform: translateY(30px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    @keyframes entryDownUp {
        0% {
            opacity: 1;
            transform: translateY(0);
        }
        30% {
            opacity: 0.8;
            transform: translateY(40px);
        }
        60% {
            opacity: 1;
            transform: translateY(-10px);
        }
        100% {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

/* Prefers reduced motion - disable animations */
@media (prefers-reduced-motion: reduce) {
    .entry-animation-wrapper.entry-fade-up,
    .entry-animation-wrapper.entry-blur,
    .entry-animation-wrapper.entry-brightness {
        animation: none !important;
        opacity: 1 !important;
        filter: none !important;
        transform: none !important;
    }

    body.entry-curtain,
    body.entry-loading-bar {
        animation: none !important;
    }

    .curtain-overlay,
    .loading-screen-overlay {
        display: none !important;
    }
}
