/* ============================================
   MOBILE RESPONSIVENESS FIXES - CORRECTED VERSION
   ============================================ */

/* ============================================
   MOBILE/TABLET (max-width: 768px) - FIXED VERSION
   ============================================ */
@media (max-width: 768px) {

    /* Reset body and html - PREVENT HORIZONTAL SCROLL */
    html,
    body {
        overflow-x: hidden;
        width: 100%;
        max-width: 100vw;
        position: relative;
    }

    /* Top Header - Logo VISIBLE on mobile */
    .main-header {
        flex-direction: row;
        align-items: center;
        justify-content: center;
        width: auto;
        max-width: calc(100% - 10mm);
        padding: 12px 20px;
        /* Consistent vertical centering */
        border-radius: 20px;
        left: 50%;
        right: auto;
        margin: 0;
        transform: translateX(-50%);
        top: 4mm;
    }

    .main-header .logo {
        font-size: 3.8vw;
        margin: 0 auto;
        opacity: 1 !important;
        display: block !important;
        width: auto !important;
        pointer-events: auto !important;
        color: var(--text-color-dark);
        text-align: center;
        transform: translateX(0) !important;
        /* Override any existing transforms */
    }

    .main-header .main-nav {
        display: none;
    }

    /* Bottom Navigation Bar - WITH PROPER SPACING */
    .mobile-bottom-nav {
        position: fixed;
        bottom: 4mm;
        left: 50%;
        transform: translateX(-50%);
        z-index: 101;
        display: flex;
        align-items: center;
        justify-content: center;
        width: auto;
        max-width: calc(100% - 16mm);
        padding: 8px 16px;
        border-radius: 25px;

        /* Liquid glass effect */
        background-color: rgba(255, 255, 255, 0.08);
        backdrop-filter: blur(45px);
        -webkit-backdrop-filter: blur(45px);
        border: 1px solid rgba(255, 255, 255, 0.2);
        box-shadow: 0 12px 60px rgba(0, 0, 0, 0.35), inset 0 0 0 0 rgba(255, 255, 255, 0.1);
    }

    .mobile-bottom-nav nav {
        display: flex;
        gap: 12px;
        padding: 0;
        margin: 0;
        flex-wrap: nowrap;
        justify-content: center;
        align-items: center;
    }

    .mobile-bottom-nav nav a {
        font-size: 3.2vw;
        padding: 6px 10px;
        color: var(--text-color-dark);
        transition: color 0.3s ease;
        white-space: nowrap;
        font-weight: 400;
    }

    .mobile-bottom-nav nav a:hover {
        color: var(--accent-color);
    }

    /* Hero section - FULL BLEED */
    .hero-section {
        min-height: 100vh;
        padding: 0;
        margin: 0;
        width: 100vw;
        display: flex;
        align-items: flex-start;
        position: relative;
        left: 50%;
        right: 50%;
        margin-left: -50vw;
        margin-right: -50vw;
    }

    .hero-frame {
        padding: 2mm var(--padding-mobile) 30px var(--padding-mobile);
        margin-top: calc(var(--header-height-dynamic) + 2mm);
        width: 100%;
        box-sizing: border-box;
    }

    .hero-headline {
        font-size: 8vw;
        margin-top: 0;
        line-height: 1.2;
        width: 100%;
    }

    .hero-subtext {
        font-size: 5vw;
        font-weight: 600;
        text-align: left;
        line-height: 1.5;
        width: 100%;
    }

    /* Section titles */
    .section-title {
        font-size: 7.5vw;
        padding: 0 var(--padding-mobile);
        width: 100%;
        box-sizing: border-box;
    }

    .about-headline {
        font-size: 7vw;
        text-align: center;
        padding: 0 var(--padding-mobile);
        width: 100%;
        box-sizing: border-box;
    }

    /* About section - FULL BLEED */
    .about-section {
        flex-direction: column;
        padding: 10vh 0;
        margin: 0;
        width: 100vw;
        min-height: auto;
        position: relative;
        left: 50%;
        right: 50%;
        margin-left: -50vw;
        margin-right: -50vw;
    }

    .about-content-left {
        padding: var(--padding-mobile);
        order: 2;
        text-align: center;
        width: 100%;
        box-sizing: border-box;
    }

    .about-image-right {
        order: 1;
        height: 35vh;
        width: 100%;
        margin-bottom: 30px;
        padding: 0;
        box-sizing: border-box;
    }

    .about-image-right img {
        border-radius: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .about-button {
        padding: 12px 30px;
        font-size: 4vw;
        display: inline-block;
    }

    /* Skills section - FULL BLEED */
    .skills-cards-section {
        padding: calc(var(--header-height-dynamic) + 20px) 0 40px 0;
        margin: 0;
        width: 100vw;
        position: relative;
        left: 50%;
        right: 50%;
        margin-left: -50vw;
        margin-right: -50vw;
    }

    .skills-quote {
        font-size: 4vw;
        padding: 0 var(--padding-mobile);
        line-height: 1.6;
        width: 100%;
        box-sizing: border-box;
        margin-left: auto;
        margin-right: auto;
    }

    /* ============================================
       EDUCATION SECTION - 2.5D ACRYLIC GLASS CARDS
       ============================================ */
    .education-section {
        padding: 8vh var(--padding-mobile);
        margin: 0;
        width: 100vw;
        box-sizing: border-box;
        position: relative;
        left: 50%;
        right: 50%;
        margin-left: -50vw;
        margin-right: -50vw;
    }

    .education-section .section-list {
        grid-template-columns: 1fr;
        gap: 30px;
        width: 100%;
    }

    /* 2.5D Thick Acrylic Glass Card */
    .education-item {
        padding: 30px;
        width: 100%;
        box-sizing: border-box;
        position: relative;

        /* Thick 2.5D Acrylic Glass Effect */
        background: linear-gradient(135deg,
                rgba(255, 255, 255, 0.15) 0%,
                rgba(255, 255, 255, 0.08) 50%,
                rgba(255, 255, 255, 0.12) 100%);
        backdrop-filter: blur(40px) saturate(180%);
        -webkit-backdrop-filter: blur(40px) saturate(180%);

        /* Thick 1mm border for 2.5D effect */
        border: 1.5px solid rgba(255, 255, 255, 0.3);
        border-radius: 24px;

        /* Multi-layer 2.5D shadow system */
        box-shadow:
            /* Top highlight for glass */
            inset 0 1px 2px rgba(255, 255, 255, 0.5),
            /* Bottom inner shadow for depth */
            inset 0 -2px 4px rgba(0, 0, 0, 0.1),
            /* Main depth shadow - 1mm thick effect */
            0 4px 0 rgba(0, 0, 0, 0.1),
            0 8px 0 rgba(0, 0, 0, 0.08),
            0 12px 0 rgba(0, 0, 0, 0.06),
            /* Outer glow */
            0 16px 40px rgba(0, 0, 0, 0.3),
            /* Subtle outer border */
            0 0 0 1px rgba(255, 255, 255, 0.1);

        /* 3D transform */
        transform: perspective(1000px) translateZ(0) rotateX(2deg);
        transform-style: preserve-3d;

        /* Smooth animation */
        transition: all 0.4s cubic-bezier(0.4, 0.0, 0.2, 1);

        /* Animation trigger */
        opacity: 0;
        transform: perspective(1000px) translateY(40px) rotateX(5deg);
    }

    /* Glass reflection layer */
    .education-item::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 50%;
        background: linear-gradient(180deg,
                rgba(255, 255, 255, 0.2) 0%,
                rgba(255, 255, 255, 0.05) 50%,
                transparent 100%);
        border-radius: 24px 24px 0 0;
        pointer-events: none;
    }

    /* Secondary light spot */
    .education-item::after {
        content: '';
        position: absolute;
        top: 20%;
        right: 20%;
        width: 100px;
        height: 100px;
        background: radial-gradient(circle,
                rgba(255, 255, 255, 0.15) 0%,
                transparent 70%);
        border-radius: 50%;
        pointer-events: none;
        opacity: 0.6;
    }

    /* Animated state - slide in from bottom */
    .education-item.is-visible {
        opacity: 1;
        transform: perspective(1000px) translateZ(0) rotateX(2deg);
    }

    /* Hover/Active state for mobile */
    .education-item:active {
        transform: perspective(1000px) translateZ(10px) rotateX(1deg) translateY(-2px);
        box-shadow:
            inset 0 1px 3px rgba(255, 255, 255, 0.6),
            inset 0 -2px 6px rgba(0, 0, 0, 0.15),
            0 5px 0 rgba(0, 0, 0, 0.12),
            0 10px 0 rgba(0, 0, 0, 0.1),
            0 15px 0 rgba(0, 0, 0, 0.08),
            0 20px 50px rgba(0, 0, 0, 0.4),
            0 0 0 1px rgba(255, 255, 255, 0.15);
    }

    /* Text styling - creative positioning */
    .education-item strong {
        font-size: 1.3em;
        font-weight: 800;
        color: rgba(220, 227, 232, 0.95);
        margin-bottom: 12px;
        display: block;
        line-height: 1.3;
        text-align: left;
        position: relative;
        z-index: 1;
        text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }

    .education-item span {
        font-size: 0.95em;
        color: rgba(220, 227, 232, 0.75);
        opacity: 0.9;
        display: block;
        margin-bottom: 8px;
        text-align: right;
        position: relative;
        z-index: 1;
        font-weight: 500;
        text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    }

    /* Lumos effect enhanced for acrylic glass */
    .education-item.lumos-active {
        background: linear-gradient(135deg,
                rgba(255, 255, 255, 0.2) 0%,
                rgba(255, 255, 255, 0.12) 50%,
                rgba(255, 255, 255, 0.18) 100%);
        border-color: rgba(255, 255, 255, 0.4);
    }

    .education-item.lumos-active strong,
    .education-item.lumos-active span {
        color: var(--text-color);
        opacity: 1;
    }

    /* Volunteering section - FULL BLEED */
    .volunteering-section {
        min-height: auto;
        padding: 8vh var(--padding-mobile);
        margin: 0;
        width: 100vw;
        box-sizing: border-box;
        overflow: hidden;
        position: relative;
        left: 50%;
        right: 50%;
        margin-left: -50vw;
        margin-right: -50vw;
    }

    .volunteering-section .section-list {
        width: 100%;
        padding: 0;
        box-sizing: border-box;
    }

    .volunteering-section .section-list li {
        font-size: 4vw;
        line-height: 1.6;
        margin-bottom: 20px;
        word-wrap: break-word;
    }

    /* VOLUNTEERING TITLE - PROPERLY CONTAINED */
    .volunteering-section .section-title {
        font-size: 9vw !important;
        font-weight: 900;
        line-height: 1.1;
        margin-bottom: 30px;
        text-transform: uppercase;
        letter-spacing: -0.01em;
        padding: 0 var(--padding-mobile);
        width: 100%;
        box-sizing: border-box;
        overflow-wrap: break-word;
        word-wrap: break-word;
        hyphens: auto;
        max-width: 100%;
        display: block;
    }

    /* ============================================
       CONTACT SECTION - PREMIUM ACRYLIC GLASS BUTTON
       ============================================ */
    .contact-section {
        padding: 5vh var(--padding-mobile) 3vh var(--padding-mobile);
        margin: 0;
        width: 100vw;
        box-sizing: border-box;
        position: relative;
        left: 50%;
        right: 50%;
        margin-left: -50vw;
        margin-right: -50vw;
    }

    .contact-text {
        font-size: 4vw;
        width: 100%;
        padding: 0;
        box-sizing: border-box;
    }

    /* PREMIUM ACRYLIC GLASS CONTACT BUTTON - COMPLETE REDESIGN */
    .contact-button {
        padding: 18px 45px;
        font-size: 4.5vw;
        margin-top: 30px;
        border-radius: 22px;
        font-weight: 600;
        letter-spacing: 0.8px;
        position: relative;
        overflow: hidden;

        /* Transparent Acrylic Glass Background */
        background: linear-gradient(145deg,
                rgba(230, 57, 70, 0.35) 0%,
                rgba(230, 57, 70, 0.25) 50%,
                rgba(230, 57, 70, 0.3) 100%);
        backdrop-filter: blur(45px) saturate(200%) brightness(1.1);
        -webkit-backdrop-filter: blur(45px) saturate(200%) brightness(1.1);

        /* Thick acrylic border */
        border: 2px solid rgba(255, 255, 255, 0.35);

        /* Premium multi-layer shadow system */
        box-shadow:
            /* Inner top highlight - glass shine */
            inset 0 2px 6px rgba(255, 255, 255, 0.5),
            /* Inner bottom depth */
            inset 0 -3px 8px rgba(0, 0, 0, 0.15),
            /* Outer glow - soft red */
            0 12px 50px rgba(230, 57, 70, 0.3),
            /* Main shadow depth */
            0 8px 20px rgba(0, 0, 0, 0.25),
            /* Subtle outer rim */
            0 0 0 1px rgba(255, 255, 255, 0.15);

        /* 3D transform */
        transform: perspective(1200px) translateZ(0) rotateX(2deg);
        transform-style: preserve-3d;

        /* Text styling */
        color: rgba(255, 255, 255, 0.95);
        text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);

        transition: all 0.35s cubic-bezier(0.4, 0.0, 0.2, 1);
    }

    /* Top glass reflection - stronger for acrylic feel */
    .contact-button::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 50%;
        border-radius: 22px 22px 0 0;
        background: linear-gradient(180deg,
                rgba(255, 255, 255, 0.4) 0%,
                rgba(255, 255, 255, 0.15) 40%,
                transparent 100%);
        pointer-events: none;
        z-index: 1;
    }

    /* Light spot - acrylic refraction effect */
    .contact-button::after {
        content: '';
        position: absolute;
        top: 15%;
        right: 20%;
        width: 80px;
        height: 80px;
        background: radial-gradient(circle,
                rgba(255, 255, 255, 0.25) 0%,
                rgba(255, 255, 255, 0.08) 40%,
                transparent 70%);
        border-radius: 50%;
        pointer-events: none;
        z-index: 1;
    }

    /* Active/Press state - realistic glass press */
    .contact-button:active {
        transform: perspective(1200px) translateZ(0) translateY(3px) rotateX(1deg) scale(0.97);
        background: linear-gradient(145deg,
                rgba(230, 57, 70, 0.45) 0%,
                rgba(230, 57, 70, 0.35) 50%,
                rgba(230, 57, 70, 0.4) 100%);
        box-shadow:
            inset 0 3px 8px rgba(255, 255, 255, 0.4),
            inset 0 -2px 6px rgba(0, 0, 0, 0.2),
            0 6px 25px rgba(230, 57, 70, 0.25),
            0 3px 10px rgba(0, 0, 0, 0.2),
            0 0 0 1px rgba(255, 255, 255, 0.1);
    }

    /* Hover state for devices that support it */
    @media (hover: hover) {
        .contact-button:hover {
            background: linear-gradient(145deg,
                    rgba(255, 90, 103, 0.4) 0%,
                    rgba(255, 90, 103, 0.3) 50%,
                    rgba(255, 70, 85, 0.35) 100%);
            border-color: rgba(255, 255, 255, 0.45);
            box-shadow:
                inset 0 2px 8px rgba(255, 255, 255, 0.6),
                inset 0 -3px 10px rgba(0, 0, 0, 0.2),
                0 16px 60px rgba(255, 90, 103, 0.4),
                0 10px 25px rgba(0, 0, 0, 0.3),
                0 0 0 1px rgba(255, 255, 255, 0.2);
            transform: perspective(1200px) translateZ(5px) translateY(-2px) rotateX(2deg);
        }
    }

    /* Footer - FULL BLEED */
    .main-footer {
        padding: 30px var(--padding-mobile);
        font-size: 3.5vw;
        margin: 0;
        width: 100vw;
        box-sizing: border-box;
        position: relative;
        left: 50%;
        right: 50%;
        margin-left: -50vw;
        margin-right: -50vw;
    }

    /* Build version - hidden on mobile */
    .build-version {
        display: none;
        /* Hidden on smartphones */
    }

    /* Content wrapper - prevent overflow */
    .content-wrapper {
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
        padding-bottom: 5mm;
    }

    /* All sections FULL BLEED - CRITICAL OVERRIDE */
    section {
        width: 100vw !important;
        max-width: 100vw;
        box-sizing: border-box;
        overflow-x: hidden;
        position: relative;
        left: 50%;
        right: 50%;
        margin-left: -50vw !important;
        margin-right: -50vw !important;
    }
}