/* --- LOCAL FONTS --- */
@font-face {
    font-family: 'Cairo';
    src: url('./fonts/cairo-v31-arabic_latin-regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
}
@font-face {
    font-family: 'Cairo';
    src: url('./fonts/cairo-v31-arabic_latin-700.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'Courier Prime';
    src: url('./fonts/courier-prime-v11-latin-regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
}
@font-face {
    font-family: 'Courier Prime';
    src: url('./fonts/courier-prime-v11-latin-700.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'Libre Baskerville';
    src: url('./fonts/libre-baskerville-v24-latin-regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
}
@font-face {
    font-family: 'Libre Baskerville';
    src: url('./fonts/libre-baskerville-v24-latin-700.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
}

:root {
    --text-color: #ffffff;
    --header-height: 70px;
    
    /* Colors */
    --color-black: #000000;
    --color-white: #ffffff;
    --color-bg-dark-slate: #0e0e0e;
    --color-grey-dark: #111111;
    --color-grey-light: #aaaaaa;
    --color-grey-lighter: #ffffff;
    
    /* Overlays */
    --color-overlay-card: rgba(12, 12, 12, 0.85); /* Slightly transparent to see animation */
    --color-overlay-modal: rgba(0, 0, 0, 0.95);

    /* Scrollbar Vars */
    --scrollbar-track: transparent;
    --scrollbar-thumb: rgba(255, 255, 255, 0.2);
    --scrollbar-thumb-hover: rgba(255, 255, 255, 0.5);
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    width: 100%;
}

body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100vh;
    background-color: #000000;
    color: var(--text-color);
    font-family: 'Courier Prime', monospace;
    overflow-x: hidden;
}

@keyframes blurFadeIn {
    20% {
        filter: blur(0px); /* Crystal clear start */
        opacity: 1;
    }
    100% {
        filter: blur(3px); /* Ends slightly blurry to focus on text */
        opacity: 0.4;      /* Slight dimming for readability */
    }
}
/* --- VANTA BACKGROUND CONTAINER --- */
#vanta-bg {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    z-index: -1; 
    pointer-events: none;
    
    /* Hardware Acceleration */
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    perspective: 1000px;
    
    /* Performance hint for the blur */
    will-change: filter; 

    /* The Animation: Wait 0.5s, then blur over 5 seconds, and stay blurred */
    animation: blurFadeIn 20s ease-out forwards;
    animation-delay: 0.5s; 
}

/* Vignette Overlay (Subtle) */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(0,0,0,0) 40%, rgba(0,0,0,0.4) 100%);
    z-index: -1; 
    pointer-events: none;
}

#transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000000;
    z-index: 99999;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
    display: none;
}

/* --- SIDEBARS --- */
.global-sidebar {
    position: fixed;
    top: var(--header-height);
    height: calc(100vh - var(--header-height));
    width: 7vw;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    pointer-events: none;
    writing-mode: vertical-rl;
    text-orientation: upright;
    text-transform: uppercase;
    font-size: clamp(20px, 4vh, 60px);
    font-weight: 700;
    color: var(--color-white);
    letter-spacing: 5px;
    -webkit-text-stroke: 1px #000000;
}

.global-sidebar.left { left: 0; }
.global-sidebar.right { right: 0; }
.global-sidebar span+span { margin-top: 2em; }

/* --- BOOT LAYER --- */
#boot-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    background-color: #000000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease-out;
    opacity: 1;
}

.loader {
    width: 50px;
    aspect-ratio: 1;
    border-radius: 50%;
    background: repeating-conic-gradient(#13181a 0 90deg, #536876 0 180deg);
    animation: l21 1s infinite linear;
}

@keyframes l21 { 100% { transform: rotate(.5turn) } }

/* --- HEADER --- */
header {
    position: fixed;
    top: 0;
    width: 100%;
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5vw;
    box-sizing: border-box;
    border-bottom: 1px solid var(--color-white);
    background: var(--color-bg-dark-slate);
    backdrop-filter: blur(10px);
    z-index: 1000;
}

.hamburger-menu {
    display: none;
    cursor: pointer;
    z-index: 1001;
    width: 24px;
    height: 18px;
    position: relative;
    padding: 0;
}

.hamburger-menu span {
    display: block;
    position: absolute;
    height: 2px;
    width: 100%;
    background: var(--color-white);
    opacity: 1;
    left: 0;
    transform: rotate(0deg);
    transition: .25s ease-in-out;
}

.hamburger-menu span:nth-child(1) { top: 0px; }
.hamburger-menu span:nth-child(2) { top: 8px; }
.hamburger-menu span:nth-child(3) { top: 16px; }

.hamburger-menu.active span:nth-child(1) { top: 8px; transform: rotate(135deg); }
.hamburger-menu.active span:nth-child(2) { opacity: 0; left: -60px; }
.hamburger-menu.active span:nth-child(3) { top: 8px; transform: rotate(-135deg); }

.nav-links { display: flex; gap: 30px; }

header a.nav-item {
    color: var(--color-grey-light);
    text-decoration: none;
    font-size: clamp(14px, 1.1vw, 18px);
    font-weight: 700;
    text-transform: uppercase;
    transition: color 0.2s ease;
}

header a.nav-item:hover, header a.nav-item.active { color: var(--color-white); }

.lang-switch { display: flex; border: 1px solid var(--color-white); }

.lang-opt {
    color: var(--color-grey-light);
    text-decoration: none;
    padding: 6px 15px;
    font-size: clamp(10px, 0.8vw, 12px);
    font-weight: 700;
    transition: all 0.2s;
}

.lang-opt+.lang-opt { border-left: 1px solid var(--color-white); }
.lang-opt:hover, .lang-opt.active { background-color: var(--color-white); color: var(--color-black); }

/* --- MAIN LAYOUT --- */
main {
    position: absolute;
    top: var(--header-height);
    left: 0;
    height: calc(100vh - var(--header-height));
    width: 100%;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
    background: transparent; 
}

main::-webkit-scrollbar { width: 4px; }
main::-webkit-scrollbar-track { background: var(--scrollbar-track); }
main::-webkit-scrollbar-thumb { background-color: var(--scrollbar-thumb); border-radius: 4px; }

main>section {
    width: 100%;
    height: 100%;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 0 8vw;
    scroll-margin-top: 0px; 
}

.mobile-title {
    display: none;
    font-family: 'Libre Baskerville', serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--color-white);
    text-transform: uppercase;
    text-align: center;
    background: var(--color-bg-dark-slate);
    border: 2px solid var(--color-white);
    border-bottom: none;
    padding: 12px 30px;
    margin: 0 auto;
    width: fit-content;
    position: relative;
    top: 2px;
    z-index: 2;
}

/* --- HERO (DESKTOP) --- */
#home-section .hero-content {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
}

.hero-left, .hero-right {
    flex: 1;
    width: 50%;
    display: flex;
    height: 100%;
}

/* INCREASED SPACING FOR DESKTOP */
.hero-left { justify-content: flex-end; align-items: center; padding-right: 80px; }
.hero-right { flex-direction: column; justify-content: center; align-items: flex-start; padding-left: 80px; }

.image-frame {
    width: clamp(250px, 25vw, 400px);
    border: 2px solid var(--color-white);
    background: var(--color-black);
    padding: 0; /* CHANGED: Was 15px. Now 0 removes the inner border */
    aspect-ratio: 1 / 1;
    position: relative;
}

.my-png {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center center;
    transition: opacity 0.3s ease;
}

.pfp-shuffle-btn {
    position: absolute;
    top: -15px; left: -15px;
    width: 40px; height: 40px;
    background: var(--color-white);
    color: var(--color-black);
    border: 2px solid #000;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; z-index: 10; font-size: 18px;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.pfp-shuffle-btn i { transform: scaleX(-1); }
.pfp-shuffle-btn:hover { transform: scale(1.1) rotate(180deg); }

/* --- PFP LOADER --- */
.pfp-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    /* Pulls it back by half its own width/height to center it */
    transform: translate(-50%, -50%);
    
    width: 40px;
    height: 40px;
    margin: 0; /* Important: removes any browser default margins */
    
    border: 4px solid var(--color-grey-dark);
    border-top: 4px solid var(--color-white);
    border-radius: 50%;
    
    animation: spin 1s linear infinite;
    z-index: 20; /* High enough to be over the black background */
    display: none;
}

/* Ensure the image fades smoothly */
#profile-pic {
    opacity: 1;
    transition: opacity 0.2s ease-in-out; /* Quick smooth fade */
    will-change: opacity;
}

.hero-text-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: fit-content;
}

.hero-name {
    font-family: 'Libre Baskerville', serif;
    font-size: clamp(40px, 5vw, 85px);
    font-weight: 700;
    color: var(--color-white);
    margin: 0;
    line-height: 1.1;
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    -webkit-text-stroke: 1px #000000;
}

.name-first { 
    font-size: 1.29em;        /* Make MUSA much bigger */
    letter-spacing: 0px;     /* Remove the wide spacing */
    margin-right: 0;         /* Remove old spacing fix */
    line-height: 0.85;       /* Pull MATINI closer upwards */
    font-weight: 700;
    padding-right: 7px;
}

.name-last { 
    font-size: 0.9em;        /* Standard size */
    letter-spacing: 0.1em;   /* Slight breathing room */
}

.hero-subtitle {
    font-family: 'Courier Prime', monospace;
    font-size: clamp(16px, 1.5vw, 22px);
    color: var(--color-grey-lighter);
    margin: 20px 0 0 0;
    width: 100%;
    font-weight: 700;
    line-height: 1.5;
    text-align: center;
    -webkit-text-stroke: 0.2px #000000;
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: clamp(10px, 1.5vw, 18px);
    margin: 25px 0 0 0;
    width: 100%;
}

.social-icon-btn {
    width: clamp(36px, 2.5vw, 50px);
    height: clamp(36px, 2.5vw, 50px);
    font-size: clamp(18px, 1.8vw, 24px);
    border: 2px solid var(--color-white);
    background: var(--color-overlay-card);
    color: var(--color-white);
    text-decoration: none;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s ease;
}

.social-icon-btn:hover {
    background: var(--color-white);
    color: var(--color-black);
    box-shadow: 4px 4px 0px var(--color-black);
}

/* --- CONTENT CONTAINERS --- */
.content-container {
    width: 100%;
    height: 85%;
    max-width: 1400px;
    border: 2px solid var(--color-white);
    background: var(--color-overlay-card);
    padding: 30px 40px;
    box-sizing: border-box;
    overflow-y: auto;
}

.content-container::-webkit-scrollbar { width: 4px; }
.content-container::-webkit-scrollbar-thumb { background-color: rgba(255, 255, 255, 0.3); }

.markdown-body {
    font-family: 'Libre Baskerville', serif;
    font-size: clamp(16px, 1.2vw, 18px);
    line-height: 1.7;
    color: var(--color-white);
}

.markdown-body h1, .markdown-body h2 {
    font-family: 'Libre Baskerville', monospace;
    font-weight: 700;
    color: var(--color-white);
    border-bottom: 1px solid #555;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.markdown-body p { margin: 0 0 20px 0; }
.markdown-body code { background: var(--color-grey-dark); padding: 2px 5px; border: 1px solid #333; font-size: 0.9em; }
.markdown-body a { color: var(--color-white); text-decoration: underline; text-underline-offset: 3px; }

.grid-container {
    display: flex;
    flex-wrap: wrap;
    
    /* Horizontal Center ONLY */
    justify-content: center; 
    
    /* Vertical: Start from the top (Don't center vertically) */
    align-items: flex-start;     
    align-content: flex-start;   
    
    gap: 20px;
    width: 100%;
    padding-bottom: 20px; /* Space at bottom for scrolling */
}

.grid-card {
    /* --- NEW SIZING LOGIC --- */
    flex: 0 1 280px;       /* 0 = Don't grow, 1 = Allow shrink, 280px = Width */
    max-width: 100%;       /* Prevents overflow on tiny phones */
    /* ------------------------ */

    aspect-ratio: 4 / 3;
    background: var(--color-grey-dark);
    border: 2px solid var(--color-white);
    color: var(--color-white);
    text-decoration: none;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease;
    cursor: pointer;
    user-select: none;
}

.grid-card:hover { transform: scale(1.05); }
.grid-card img { width: 100%; height: 100%; object-fit: cover; }

.card-title {
    position: absolute; bottom: 0; left: 0; width: 100%;
    padding: 5px 15px; 
    line-height: 1.2;
    background: rgba(12, 16, 21, 0.65);
    -webkit-text-stroke: 0.3px #000000;
    backdrop-filter: blur(10px);
    text-align: center; font-size: 16px; font-weight: 700;
    box-sizing: border-box; 
}

/* --- FOOTER --- */
#footer-section .content-container {
    height: auto; width: fit-content; max-width: 90%;
    display: flex; flex-direction: column;
    justify-content: center; align-items: center;
    gap: 30px; padding: 40px 60px;
}

.footer-text { font-family: 'Libre Baskerville', serif; font-size: clamp(24px, 2.5vw, 400px); text-align: center; }
.email-wrapper { font-size: clamp(16px, 1.2vw, 20px); font-weight: 700; color: var(--color-grey-light); }
.email-link { color: var(--color-white); text-decoration: underline; text-underline-offset: 5px; cursor: pointer; }
.email-link:hover { color: var(--color-grey-lighter); }

/* --- MODAL --- */
#detail-modal {
    position: fixed; top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: var(--color-overlay-modal);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: none; align-items: center; justify-content: center;
}

.modal-wrapper {
    display: flex; align-items: stretch; justify-content: center;
    width: 95%; max-width: 1200px;
    height: auto; max-height: 90vh;
}

.modal-content {
    flex: 1; display: flex; flex-direction: column;
    width: 100%; background: var(--color-bg-dark-slate);
    border: 2px solid var(--color-white);
    position: relative; overflow: hidden;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
}

.modal-nav-sidebar {
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    width: 60px; background: var(--color-bg-dark-slate);
    border: 2px solid var(--color-white); cursor: pointer;
    transition: all 0.2s ease; z-index: 1002; gap: 40px;
}

.modal-nav-sidebar:hover { background: var(--color-white); color: var(--color-black); }
.modal-nav-sidebar.left { border-right: none; }
.modal-nav-sidebar.right { border-left: none; }
.sb-text-wrapper { display: flex; align-items: center; justify-content: center; width: 20px; height: 120px; }
.sb-text { font-weight: 700; font-size: 16px; letter-spacing: 3px; white-space: nowrap; }
.sb-arrow { font-size: 20px; }
.modal-nav-sidebar.left .sb-text { transform: rotate(-90deg); }
.modal-nav-sidebar.right .sb-text { transform: rotate(90deg); }
.hidden-desc { display: none; }

.modal-gallery-card-wrapper {
    width: 100%; flex-shrink: 0;
    background: var(--color-bg-dark-slate);
    border-bottom: 2px solid var(--color-white);
    position: relative; z-index: 20;
}

.image-zoom-container {
    width: 100%; aspect-ratio: 16 / 9;
    position: relative; background: #000;
    display: flex; align-items: center; justify-content: center;
    cursor: none; overflow: hidden;
    touch-action: none;
}

.image-zoom-container img { width: 100%; height: 100%; object-fit: contain; display: block; transform-origin: center; }
.modal-loader { border: 5px solid #333; border-top: 5px solid #fff; border-radius: 50%; width: 40px; height: 40px; animation: spin 1s linear infinite; position: absolute; z-index: 5; display: none; }
@keyframes spin { 
    0% { transform: translate(-50%, -50%) rotate(0deg); } 
    100% { transform: translate(-50%, -50%) rotate(360deg); } 
}

#modal-pdf { width: 100%; height: 100%; display: none; border: none; }

.zoom-lens {
    position: absolute; border: 2px solid var(--color-white);
    border-radius: 50%; width: 150px; height: 150px;
    background-repeat: no-repeat; background-color: #000;
    pointer-events: none; display: none; z-index: 10;
}

.gallery-nav-overlay {
    position: absolute; top: 50%; left: 0; width: 100%;
    transform: translateY(-50%); display: flex;
    justify-content: space-between; padding: 0 20px;
    box-sizing: border-box; pointer-events: none; z-index: 15;
}

.gallery-arrow {
    background: rgba(0, 0, 0, 0.6); color: var(--color-white);
    border: 2px solid var(--color-white); font-size: 18px;
    width: 45px; height: 45px; display: flex; align-items: center; justify-content: center;
    cursor: pointer; pointer-events: auto; transition: all 0.2s; border-radius: 50%;
}
.gallery-arrow:hover { background: var(--color-white); color: var(--color-black); }

.image-counter {
    position: absolute; bottom: 15px; right: 20px;
    background: rgba(0, 0, 0, 0.7); color: var(--color-white);
    border: 1px solid #fff; padding: 5px 12px;
    font-size: 14px; font-weight: bold;
    pointer-events: none; border-radius: 4px; z-index: 15;
}

.modal-text {
    flex: 1; overflow-y: auto; padding: 20px 40px;
    background: var(--color-bg-dark-slate);
    scrollbar-width: thin; scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}
.modal-text::-webkit-scrollbar { width: 4px; }
.modal-text::-webkit-scrollbar-track { background: var(--scrollbar-track); }
.modal-text::-webkit-scrollbar-thumb { background-color: var(--scrollbar-thumb); border-radius: 4px; }

.modal-close {
    position: fixed; top: 20px; right: 30px;
    background: var(--color-black); color: var(--color-white);
    border: 2px solid var(--color-white);
    width: 40px; height: 40px; font-size: 20px; /* Standard Icon Size */
    
    /* Centering Logic */
    display: flex; 
    align-items: center; 
    justify-content: center;
    /* No padding needed for icons */
    
    cursor: pointer;
    z-index: 1001;
    transition: all 0.2s;
}
.modal-close:hover { background: var(--color-white); color: var(--color-black); }

.project-nav-bottom {
    display: none; width: 100%;
    border-top: 2px solid var(--color-white);
    background: var(--color-bg-dark-slate);
}
.nav-btn-bottom {
    flex: 1; background: var(--color-bg-dark-slate);
    color: var(--color-white); border: none; padding: 20px;
    font-family: 'Courier Prime', monospace;
    font-weight: 700; font-size: 16px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    gap: 10px; transition: background 0.2s;
}
.nav-btn-bottom:hover { background: var(--color-white); color: var(--color-black); }
.nav-btn-bottom+.nav-btn-bottom { border-left: 2px solid var(--color-white); }

/* --- MOBILE & RESPONSIVE RULES --- */

@media (max-width: 700px) {

    html, body { overflow: auto; height: auto; overflow-x: hidden; }
    main::-webkit-scrollbar, .content-container::-webkit-scrollbar, .modal-text::-webkit-scrollbar { display: none; }
    .content-container, .modal-text { scrollbar-width: none; }

    main {
        position: relative; top: 0; left: 0;
        height: auto; width: 100%; overflow: visible;
        margin-top: var(--header-height);
        scroll-snap-type: none;
    }

    /* SCROLL OFFSET FOR MOBILE NAV */
    main>section { scroll-margin-top: 130px; }
    #home-section { scroll-margin-top: 200px; }

    .global-sidebar { display: none; }
    .hamburger-menu { display: block; order: 1; }
    .lang-switch { order: 2; }

    #vanta-bg {
        height: 100%;
    }

    .nav-links {
        position: fixed;
        top: var(--header-height);
        left: 0;
        width: 100%;
        height: auto;
        padding-bottom: 0;
        background: rgba(10, 10, 10, 0.98);
        backdrop-filter: blur(30px);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        gap: 0;
        transform: translateY(-150%);
        transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 999;
        border-bottom: 2px solid var(--color-white);
        box-shadow: 0 10px 30px rgba(0,0,0,0.8);
    }

    .nav-links.open { transform: translateY(0); }

    .nav-links .nav-item {
        padding: 25px 0;
        width: 100%;
        text-align: center;
        font-size: 20px;
        letter-spacing: 2px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    .nav-links .nav-item:last-child { border-bottom: none; }

    main>section {
        padding: 0;
        display: flex; flex-direction: column; justify-content: flex-start;
        height: auto; min-height: auto;
        scroll-snap-align: none;
        margin-bottom: 80px;
    }

    .mobile-title {
        display: block;
        border-left: 2px solid var(--color-white);
        border-right: 2px solid var(--color-white);
        border-top: 2px solid var(--color-white);
        border-bottom: none;
        margin-top: 0;
    }

    #home-section {
        min-height: auto;
        justify-content: flex-start;
        padding-top: 40px;
        margin-bottom: 60px;
    }

    #home-section .hero-content {
        flex-direction: column; text-align: center;
        gap: 20px;
        height: auto; justify-content: flex-start;
        align-items: center; width: 100%;
    }

    .hero-left, .hero-right {
        flex: 0 1 auto; width: 100%; height: auto;
        display: flex; justify-content: center; padding: 0;
    }
    
    .hero-right { padding: 0 15px; align-items: center; }

    .hero-name {
        flex-direction: row; gap: 15px; flex-wrap: wrap; justify-content: center;
        font-size: clamp(32px, 8vw, 52px);
    }
    .name-first { letter-spacing: normal; margin-right: 0; }

    /* BIGGER PFP on Mobile */
    .image-frame { width: clamp(260px, 65vw, 400px); }

    .social-links {
        gap: 10px;
        flex-wrap: nowrap;
        max-width: 95%;
    }
    .social-icon-btn {
        width: 38px; height: 38px; font-size: 18px;
        flex-shrink: 0;
    }

    .content-container {
        width: 90%; margin: 0 auto; flex-grow: 0;
        height: auto; max-height: none; overflow: visible;
        border: 2px solid var(--color-white);
        background: var(--color-overlay-card);
        padding: 20px 15px; justify-content: flex-start; z-index: 1;
    }

    .grid-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .grid-card { aspect-ratio: 4 / 3 !important; }

    #footer-section {
        justify-content: center; margin-bottom: 0;
        padding-bottom: 80px;
    }
    #footer-section .content-container {
        height: auto; width: 90%; max-height: none;
        border: 2px solid var(--color-white);
        padding: 40px 30px; flex-grow: 0; margin: auto;
    }
    .footer-text { font-size: 24px; }
    .email-wrapper { font-size: 16px; text-align: center; }

    .modal-nav-sidebar { display: none; }
    .project-nav-bottom { display: flex; }
    .modal-wrapper { width: 100%; max-height: unset; height: auto; display: block; }
    .modal-content { width: 95%; margin: 0 auto; max-height: 85vh; border: 2px solid var(--color-white); }
    .image-zoom-container { aspect-ratio: auto; height: 35vh; cursor: default; }

    .modal-close {
        top: 15px; right: 15px;
        width: 50px; height: 50px; font-size: 30px;
        background: #000; color: #fff; border: 2px solid #fff;
        z-index: 2000;
    }

    .modal-text { padding: 15px; }
    .zoom-lens { display: none !important; }
    /* Reset "MUSA" size for mobile so it fits on one line nicely */
    .name-first { 
        font-size: 0.9em; 
        padding-right: 0; 
        line-height: normal;
    }
    
    .name-last {
        letter-spacing: normal;
    }
    
    /* Ensure flexbox centers the name properly on phone */
    .hero-name {
        flex-direction: row; 
        align-items: baseline;
        gap: 10px;
    }
}

@media (max-width: 350px) {
    .social-links { gap: 5px; }
    .social-icon-btn { width: 32px; height: 32px; font-size: 14px; }
    .hero-name { font-size: 28px; }
}
