/* 
 * Smooth Page Transition (Blur + Fade + Scale)
 * Used across the site when clicking internal links
 */

/* The main overlay: provides a smooth darkening + massive blur effect */
.page-transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(5, 5, 5, 0.3); /* Subtle dark tint */
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px); /* For Safari */
    z-index: 99998;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), 
                backdrop-filter 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                -webkit-backdrop-filter 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Exit: Fading / Blurring out of current page */
.page-transition-overlay.page-leaving {
    opacity: 1;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    pointer-events: all;
    cursor: wait;
}

/* Entry: Blurring into new page (Wait state) */
.page-transition-overlay.page-entering {
    opacity: 1;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    pointer-events: all;
    transition: none; /* Immediately blur on fresh page load */
}

/* Restored: Removing the blur to reveal the loaded page */
.page-transition-overlay.page-entered {
    opacity: 0;
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    pointer-events: none;
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), 
                backdrop-filter 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                -webkit-backdrop-filter 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Dedicated overlay when full solid black is required (project expansion background) */
.page-transition-overlay.dark-solid {
    background-color: #050505; 
    background-image: radial-gradient(circle at center, rgba(16,18,27,1) 0%, rgba(5,5,5,1) 100%);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}
