body, html {
    margin: 0;
    height: 100dvh;
    width: 100dvw;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', sans-serif;
    background: #0F172A; /* Neural Forest: Midnight Blue (Primary) */
}

.main-page {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: row;
}

.welcome-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding-top: 3vmin;
    padding-right: calc(35% + 5vmin);
    background: #F8F9FA; /* Main section background */
    box-shadow: inset 1px 0 0 #DEE2E6;
    order: -1;
    position: relative;
    overflow: hidden;
}

.bubbles-section {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: repeat(3, 1fr);
    gap: 1vW;
    padding: 3vW;
    background: #DEE2E6; /* Bubble section background */
    overflow: hidden;
}

.welcome-section h1 {
    font-size: 4vmax;
    font-weight: 700;
    margin: 6vmin 0 0.8vmin 7vmin;
    color: #007361; /* Dark slate for contrast on light bg */
    letter-spacing: -0.5px;
    position: relative;
    z-index: 2;
}

.welcome-section p {
    font-size: 2vmax;
    color: #343A40; /* Dark grey subtitle */
    margin: 0 0 3vmin 7vmin;
    line-height: 1.6;
    position: relative;
    z-index: 2;
    opacity: 0.85;
}

.header-top {
    width: 100%;
}

.cv-panel {
    width: 20vw;
    height: 20/sqert(2)vw;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 2;
    -webkit-user-select: none; 
    -ms-user-select: none;
    user-select: none;
    margin: 10% 0 0 21%;
}

.cv-jpeg {
    height: 100%;
    width: 100%;
    border: 0.1vmin solid #007361; /* Neural Forest: Emerald Green border */
    border-radius: 0.5vmin;
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.15); /* Emerald green glow */
    background: #1E293B; /* Neural Forest: Slate */
    box-sizing: border-box;
    object-fit: cover;
}

.cv-button {
    width: 80%;
    margin: 1.25vmin 0 0 10%;
    display: inline-flex;
    justify-content: center;
    background: #007361; /* Bubble cover accent */
    color: #FFFFFF;
    text-decoration: none;
    border-radius: 0.75vmin;
    font-weight: 500;
    font-size: 80%;
    text-align: center;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 115, 97, 0.3);
    position: relative;
    z-index: 2;
}

.bubble {
    /* ⏱ RETURN TO IDLE: how long it takes to go back to default state (emoji visible, no image) after hover/touch ends */
    background: #007361; /* Bubble background */
    backdrop-filter: blur(10px);
    border-radius: 1vmin;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-size: 4.5vmin;
    color: #ffffff; /* Bubble icon color */
    transition: all 0.75s ease-in;
    position: relative;
    border: 0.05vmin solid #334155; /* Neural Forest: subtle slate border */
    font-weight: 500;
    overflow: hidden;
}

.bubble::before {
    /* 🖼️ IMAGE FADE-OUT: how long the background cover image takes to disappear after hover/touch ends */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0);
    transition: all 0.75s ease;
    z-index: -1;
    opacity: 0;
}


#bubble-about::before { 
    background-image: url('Images/About-me.jpeg');
    background-size: cover;
    background-position: center;
}
#bubble-education::before { 
    background-image: url('Images/Education-experience.jpeg');
    background-size: cover;
    background-position: center;
}
#bubble-skills::before { 
    background-image: url('Images/Technical-skills.jpeg');
    background-size: cover;
    background-position: center;
}
#bubble-goals::before { 
    background-image: url('Images/Career-interests.jpeg');
    background-size: cover;
    background-position: center;
}
#bubble-contact::before { 
    background-image: url('Images/Contact-informations.jpg');
    background-size: cover;
    background-position: center;
}
#bubble-passions::before { 
    background-image: url('Images/My-passions.jpg');
    background-size: cover;
    background-position: center;
}

.bubble:hover::before,
.bubble.preview-active::before {
    /* 🖼️ IMAGE REVEAL: how fast the background cover image fades IN when hovering/touching */
    opacity: 1;
    transition: opacity 2s cubic-bezier(0.16, 1, 0.3, 1);
}

.bubble:hover,
.bubble.preview-active {
    /* 😀 EMOJI HIDE: how fast the emoji text shrinks to 0% */
    transform: scale(1.05);
    border-color: #007361; /* Bubble cover accent on hover */
    background: #343A40; /* Bubble background */
    font-size: 0%;
    transition: all 0ms linear;
}

.bubble::after {
    /* 📝 LABEL FADE-IN: how long the text label takes to appear when returning to idle state */
    content: attr(data-label);
    margin-top: 2vmin;
    font-size: 30%;
    text-align: center;
    z-index: 1;
    opacity: 1;
    color: #FFFFFF; /* White subtext */
    transition: opacity 1s ease-in;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.6); /* Neural Forest: Midnight Blue overlay */
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    z-index: 1000;
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

.personalized-section {
    background: #DEE2E6; /* Slate popup */
    padding: 3vmin;
    border-radius: 1.25vmin;
    border: 1px solid #007361; /* Cover accent border */
    max-width: min(500px, 80vw);
    max-height: 85vh;
    overflow-y: auto;
    text-align: left;
    transform: scale(0.95) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 20px 60px rgba(0, 115, 97, 0.25); /* Cover accent shadow */
}

.personalized-section h2 {
    font-size:5vmin;
    font-weight: 700;
    text-shadow: 
        -0.3px -0.3px 0 #343A40,  
        0.3px -0.3px 0 #343A40,
        -0.3px  0.3px 0 #343A40,
        0.3px  0.3px 0 #343A40;
    margin: 0 0 3vmin 0;
    color: #007361; /* Cover accent heading */
}

.personalized-section p {
    font-size: 2.5vmin;
    color: #353535; /* Light readable text on dark slate */
    line-height: 1.6;
    margin: 0.75vmin 0;
}

.personalized-section ul {
    font-size: 2.25vmin;
    color: #353535; /* Light readable text on dark slate */
    line-height: 1.8;
    margin: 0.75vmin 0;
    padding-left: 1.25vmin;
}

.overlay.active .personalized-section {
    transform: scale(1) translateY(0);
}

.development-banner {
    position: fixed;
    bottom: 1.5vmin;
    right: 2vmin;
    z-index: 1001;
    font-size: 1.4vmin;
    color: rgba(255, 255, 255, 0.5);
    background: rgba(0, 0, 0, 0.3);
    padding: 0.8vmin 1.5vmin;
    border-radius: 0.5vmin;
    pointer-events: none;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', sans-serif;
    backdrop-filter: blur(4px);
    user-select: none;
}


.cv-button:hover {
    background: #005A4B; /* Darker bubble cover accent on hover */
    box-shadow: 0 8px 12px rgba(0, 115, 97, 0.4);
    transform: translateY(-2px);
}

.close-btn {
    position: absolute;
    top: 1.25vmin;
    right: 1.25vmin;
    background: #1E293B; /* Neural Forest: Slate */
    border: 1px solid #334155;
    font-size: 1.75vmin;
    cursor: pointer;
    color: #6EE7B7; /* Neural Forest: light emerald */
    width: 2.75vmin;
    height: 2.75vmin;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: #334155; /* Neural Forest: lighter slate */
    color: #10B981; /* Neural Forest: emerald green */
}

.image-cascade {
    position: absolute;
    right: 4.5vmin;
    top: 0;
    width: 50%;
    height: 100%;
    overflow-y: scroll;
    overflow-x: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    z-index: 0;
    scroll-behavior: auto !important;
    background: transparent;
}
.image-cascade:hover {
    overflow-y: auto;
}

.image-cascade::-webkit-scrollbar {
    display: none;
}

.image-list {
    display: flex;
    flex-direction: column;
    gap: 3vmin;
}


.image-container {
    position: relative;
}

.image-cascade img {
    width: 90%;
    margin: 0 auto;
    display: block;
    height: auto;
    border-radius: 1.5vmin;
    object-fit: cover;
    box-shadow: 0 8px 16px rgba(16, 185, 129, 0.1); /* Emerald tinted shadow */
    transition: transform 0.3s ease, filter 0.5s ease;
    flex-shrink: 0;
    cursor: pointer;
    box-shadow: 0px 0 2.4vmin 0.3vmin rgba(16, 185, 129, 0.3);
}

.image-cascade img:hover {
    transform: scale(1.1);
    filter: brightness(1.1);
    z-index: 100;
    box-shadow: 0 0vmin 0px rgba(16, 185, 129, 0);
}

.image-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #F8F9FA; /* Neural Forest: Slate tooltip */
    color: #1c2023; /* Neural Forest: light emerald text */
    margin-bottom: 2vmin;
    padding: 1vmin;
    border-radius: 0.8vmin;
    font-size: 1.5vmin;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 100;
    backdrop-filter: blur(10px);
    border: 1px solid #10B981;
}

.image-container:hover .image-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-0.5vmin);
    z-index: 200;
}

/* Mobile Responsive Styles */
@media only screen and (max-aspect-ratio: 0.6) {
    .main-page {
        flex-direction: column;
    }

    .welcome-section {
        flex:3;
    }

    .welcome-section p {
        margin: 0vmin 0 3vmin 5vmin;
        font-size: 3.5vmin;
        display: inline-block;
        vertical-align: baseline;
    }

    .cv-panel {
        width: 65vw;
        margin-left: 25%;
        height: auto;
    }
    
    .cv-jpeg {
        max-height: 15vh;
        object-fit: cover;
        object-position: top;
    }
    .bubble {
        font-size: 5vmin;
    }

    .cv-button {
        font-size: 3.5vmin;
    }

    .personalized-section {
        margin: 4vmin;
        padding: 5vmin;
    }

    .personalized-section p {
        font-size:  2.5vmin;
    }

    .personalized-section h2 {
        font-size: 5vmin;
    }

    .close-btn {
        width: 6vmin;
        height: 6vmin;
        font-size: 4vmin;
    }

    /* Horizontal image cascade for mobile */
    .image-cascade {
        position:relative;
        margin-left:2vw;
        margin-top: 1.5vh;
        width: 96vw;
        height: 100%;
        right: auto;
        overflow-x: auto;
        overflow-y: hidden !important;
        touch-action: pan-x;
    }
    
    .image-cascade:hover {
        overflow-y: hidden !important;
    }
    .image-container {
        position: center;
        margin-top:1.5vh;
        height: 23vh;
    }

    .image-list {
        margin-top: 3%;
        flex-direction: row;
        gap: 6vw;
    }

    .image-cascade img {
        height: 80%;
        width: auto;
        object-position: center;
    }
    .image-tooltip {        
        bottom: auto;
        top: 90%;
        left: 50%;
        transform: translateX(-50%) translateY(0.5vmin);
    }
    .bubbles-section {
        -webkit-user-select: none;
        -ms-user-select: none;
        user-select: none;
        padding-bottom: 2vh;
        background: #DEE2E6; /* Bubble section background */
    }
    .welcome-section h2 {
        color: #1E293B;
    }
    .welcome-section p {
        color: #343A40;
        opacity: 0.85;
    }
    .cv-button {
        background: #007361;
        box-shadow: 0 4px 6px rgba(0, 115, 97, 0.3);
    }
    .personalized-section {
        border-color: #007361;
        box-shadow: 0 20px 60px rgba(0, 115, 97, 0.25);
    }
    .personalized-section h2 {
        color: #007361; /* Cover accent heading */
    }
    .personalized-section p {
        color: #E2E8F0;
    }
    .personalized-section ul {
        color: #E2E8F0;
    }
    #bubble-about::before { 
    background-image: url('Images/About-me.jpeg');
    background-size: cover;
    background-position: center;
    }
    #bubble-education::before { 
        background-image: url('Images/Education-experience.jpeg');
        background-size: cover;
        background-position: center;
    }
    #bubble-skills::before { 
        background-image: url('Images/Technical-skills.jpeg');
        background-size: cover;
        background-position: center;
    }
    #bubble-goals::before { 
        background-image: url('Images/Career-interests.jpeg');
        background-size: cover;
        background-position: center;
    }
    #bubble-contact::before { 
        background-image: url('Images/Contact-informations.jpg');
        background-size: cover;
        background-position: center;
    }
    #bubble-passions::before { 
        background-image: url('Images/My-passions.jpg');
        background-size: cover;
        background-position: center;
    }

}