/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: #ffffff;
    color: #111111;
    
    /* Sticky Footer Architecture via Flexbox */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow: hidden; /* Restricts vertical body spill on desktop layouts */
}

/* ==========================================
   Full-Bleed Top Navigation Bar Layout
   ========================================== */
.navbar {
    width: 100%;
    height: 80px;
    background-color: #ffffff;
    z-index: 1000;
    display: flex;
    justify-content: space-between; /* Logo left, Menu right */
    align-items: center;
    max-width: 100%; 
    margin: 0;
    padding: 0 40px; 
    position: relative;
}

/* Header Text Elements Spacing Pads */
.navbar .brand {
    padding: 0; 
    display: flex;
    align-items: center;
}

.navbar .main-nav {
    padding: 0; 
}

.brand a {
    text-decoration: none;
    display: flex;
    align-items: center;
}

.brand-logo {
    height: 22px;       
    width: auto;        
    display: block;
    opacity: 1;         
    transition: opacity 0.3s ease-in-out; 
}

/* Premium Rollover Effect */
.brand a:hover .brand-logo {
    opacity: 0.65;     
}

/* Desktop Horizontal Menu Layout */
.main-nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

.main-nav a {
    text-decoration: none;
    color: #777777;
    font-size: 0.85rem;
    font-weight: 500;
    transition: color 0.3s ease-in-out; 
}

.main-nav a:hover {
    color: #111111;
}

.main-nav a.active {
    color: #111111 !important;
    border-bottom: 1px solid #111111; 
    padding-bottom: 7px;              
}

/* Hide Hamburger Menu Icon by Default on Desktop */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

.menu-toggle .bar {
    width: 100%;
    height: 2px;
    background-color: #111111;
    transition: all 0.3s ease;
    display: block;
}

/* ==========================================
   2. Gallery Area (Middle Column fills vertical space)
   ========================================== */
.gallery-container {
    flex: 1; 
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    padding: 20px 0px; 
    display: flex;
    align-items: center;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Minimal Custom Scrollbar */
.gallery-container::-webkit-scrollbar {
    height: 8px; 
    background: transparent; 
}

/* Scrollbar Handle Thumb */
.gallery-container::-webkit-scrollbar-thumb {
    background: #e0e0e0;
    border-radius: 4px; 
    transition: background 0.2s ease;
}

/* Interactive Hover State */
.gallery-container::-webkit-scrollbar-thumb:hover {
    background: #b5b5b5; 
}

.gallery-track {
    display: flex;
    gap: 10px; 
    height: 65vh; /* Comfortably spans middle zone without overflowing footer */
}

.gallery-item {
    display: inline-block;
    height: 100%;
}

.gallery-item picture {
    display: block;
    height: 100%;
}

.gallery-item img {
    height: 100%;
    width: auto;
    object-fit: contain;
    display: block;
}

.landscape img { aspect-ratio: 3 / 2; }
.portrait img { aspect-ratio: 2 / 3; }

.gallery-link {
    display: block;
    height: 100%;  
    width: auto;
    cursor: pointer;
}

.gallery-link img {
    transition: opacity 0.3s ease-in-out;
}

.gallery-link:hover img {
    opacity: 0.95; 
}

/* ==========================================
   3. Sticky Footer Layout (Bottom Bar)
   ========================================== */
.site-footer {
    width: 100%;
    padding: 30px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
    border-top: 1px solid #f0f0f0; 
    font-size: 0.75rem;
    color: #777777;
    margin-top: auto; 
}

.site-footer a {
    color: #777777;
    text-decoration: none;
    transition: color 0.3s ease;
}

.site-footer a:hover {
    color: #000000;
}

/* ==========================================
   4. Project Showcase Templates (Case Studies)
   ========================================== */
.gallery-item.project-intro {
    width: 430px;               
    height: 100%;               
    white-space: normal;     
    display: flex;
    flex-direction: column;
    justify-content: flex-start; 
    padding: 40px;              
    margin-left: 0;             
    margin-right: 0px;         
    box-sizing: border-box;     
}

.gallery-item.project-intro.design { background-color: #ecddd9; }
.gallery-item.project-intro.art-direction { background-color: #e9ddcf; }
.gallery-item.project-intro.photography { background-color: #e4f0f9; }

.gallery-item.project-intro h1 {
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.2;
    color: #111111;
    margin-bottom: 20px;     
    border-bottom: 1px solid #111111; 
    padding-bottom: 7px;
    align-self: flex-start;  
}

.gallery-item.project-intro p {
    font-size: 0.8rem;      
    line-height: 1.4;           
    color: #333333;             
    margin-bottom: 16px;
}

.gallery-item.project-intro p:last-child {
    margin-bottom: 0;
}

/* ==========================================
   5. About Page Custom Template Framework (Desktop View)
   ========================================== */
.gallery-item.about-intro-block {
    width: 640px;               /* Keeps your text column wide and highly readable */
    flex-shrink: 0;             /* Prevents horizontal tracking collapse */
    height: 100%;               /* Uniformly matches asset heights */
    background-color: #f4f4f4;  
    white-space: normal;        
    display: flex;
    flex-direction: column;
    justify-content: flex-start; 
    overflow-y: auto;           
    padding: 40px;              
    margin-left: 0;             
    margin-right: 0px;         
    box-sizing: border-box;     
}
.gallery-item.about-intro-block h1 {
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.2;
    color: #111111;
    margin-bottom: 20px;     
    border-bottom: 1px solid #111111; 
    padding-bottom: 7px;
    align-self: flex-start;  
}

.gallery-item.about-intro-block p {
    font-size: 0.8rem;      
    line-height: 1.5;           
    color: #333333;             
    margin-bottom: 16px;
}

.gallery-item.about-intro-block p:last-child {
    margin-bottom: 0;
}

/* ==========================================
   6. Mobile & Responsive Adaptations (Breakpoints)
   ========================================== */
@media (max-width: 1000px) { 
    body {
        overflow-y: auto !important; 
        height: auto;
    }

    .navbar {
        padding: 0 20px; 
    }

    .brand-logo {
        height: 16px; 
    }

    .menu-toggle {
        display: flex;
        height: 16px; 
    }

    .main-nav {
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background-color: #ffffff;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-in-out;
        z-index: 2000;
        padding: 0;
    }

    .main-nav.active {
        max-height: 350px;
        border-bottom: 1px solid #f0f0f0; 
    }

    .main-nav ul {
        flex-direction: column;
        gap: 0;
        padding: 20px;
    }

    .main-nav li {
        width: 100%;
        text-align: center;
        padding: 12px 0;
    }

    /* Vertical Stacking Layout Switch */
    .gallery-container {
        overflow-x: hidden;
        overflow-y: visible;
        display: block;
        padding: 0px;
    }
    
    .gallery-track {
        flex-direction: column;
        height: auto;
        gap: 10px;
    }
    
    .gallery-item {
        width: 100%;
        height: auto;
    }
    	
    /* Fix: Ensures both layout classes expand edge-to-edge naturally on mobile */
    .gallery-container .gallery-track .gallery-item img {
        width: 100% !important;
        height: auto !important;
    }
	

    /* Project Page Mobile Layout Adapters */
    .gallery-item.project-intro {
        width: 100%;         
        max-width: 100%;        
        height: auto;           
        background-color: transparent; 
        margin: 0 0 0 0;     
        padding: 40px 20px 40px 20px; 
    }

    .gallery-item.project-intro h1 {
        max-width: 600px;
        width: auto;             
        align-self: flex-start;  
    }

    .gallery-item.project-intro p {
        max-width: 600px;       
        width: 100%;
    }

    /* About Page Mobile Layout Adapters */
    .gallery-item.about-intro-block {
        width: 100%;         
        max-width: 100%;        
        height: auto;                 
        background-color: #f4f4f4; 
        margin: 0 0 0 0;           
        padding: 40px 20px 40px 20px; 
    }

    .gallery-item.about-intro-block p {
        max-width: 600px;       
        width: 100%;
    }

    /* Hamburger Animation to 'X' */
    .menu-toggle.open .bar:nth-child(1) {
        transform: translateY(7px) rotate(45deg); 
    }

    .menu-toggle.open .bar:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.open .bar:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg); 
    }
}

/* ==========================================
   7. Ultra-Narrow Stacking Layout (Smartphones)
   ========================================== */
@media (max-width: 480px) {
    .site-footer {
        flex-direction: column; 
        gap: 0;                
        text-align: center;    
        padding: 24px 20px;    
    }

    .site-footer .copyright {
        display: none;
    }
    
    .site-footer .footer-email {
        order: 1;              
    }

    .gallery-item.project-intro h1,
    .gallery-item.project-intro p,
    .gallery-item.about-intro-block p {
        max-width: 100% !important;        
    }
    
    .gallery-item.project-intro h1 {
        width: auto !important;
    }
}
