@import url('https://fonts.googleapis.com/css2?family=Abhaya+Libre:wght@700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Abhaya+Libre:wght@700&family=Inter:wght@400;500&display=swap');

/* =========================================
   1. GLOBAL VARIABLES & RESET
   ========================================= */
:root {
    --bg-color: #0a0a0a;
    --text-color: #f5f5f5;
    --accent-color: #555555;
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

html, body {
    max-width: 100vw !important;
    overflow-x: hidden !important; /* Locks horizontal shifting */
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    line-height: 1.4;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    font-family: 'Abhaya Libre', serif;
    line-height: 1.15;
    margin-bottom: 1rem;
}

/* =========================================
   2. NAVIGATION BAR
   ========================================= */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2.5rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center; 
    gap: 1rem;
    font-family: 'Abhaya Libre', serif;
    font-size: 2.2rem; 
    font-weight: 700;
    letter-spacing: 3px;
    line-height: 1.1;
}

.logo img {
    height: 2rem; 
    width: auto;
    display: block;
}

.logo-link {
    text-decoration: none;
    color: inherit;
    display: inline-block;
}

nav {
    display: flex;
    gap: 2.5rem;
}

nav a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

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

/* =========================================
   3. HERO IMAGERY LAYOUT
   ========================================= */
.hero-image-container {
    position: relative;
    width: 100%;
    height: 90vh;
    overflow: hidden;
}

.hero-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    box-shadow: none;
    filter: brightness(0.7);
}

.hero-logo-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 500px;
    height: auto;
    box-shadow: none;
    z-index: 10;
}

/* =========================================
   4. CALL TO ACTION CONTAINER (DESKTOP)
   ========================================= */
.hero-cta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    padding: 4rem 5% 0; 
    max-width: 1200px;
    margin: 0 auto;
    box-sizing: border-box;
    width: 100%;
}

.cta-btn {
    display: inline-block;
    padding: 1.2rem 3rem;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 1px solid #fff; 
    text-align: center;
    box-sizing: border-box;
}

.cta-btn.primary {
    background: #fff;
    color: #000; 
}

.cta-btn.primary:hover {
    background: transparent;
    color: #fff;
}

.cta-btn.secondary {
    background: #fff;
    color: #000; 
}

.cta-btn.secondary:hover {
    background: transparent;
    color: #fff;
}

.btn {
    display: inline-block;
    color: var(--text-color);
    text-decoration: none;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding-bottom: 5px;
    position: relative;
    transition: color 0.3s ease;
}

.btn::after {
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 1px;
    bottom: 0;
    left: 0;
    background-color: #ffffff;
    transform-origin: bottom center;
    transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}

.btn:hover { color: #ffffff; }
.btn:hover::after { transform: scaleX(1); }

/* =========================================
   5. SPLIT SECTIONS & PROJECTS EDITORIAL
   ========================================= */
.split-layout {
    display: flex;
    align-items: center;
    gap: 6rem;
    padding: 6rem 5%;
    max-width: 1200px;
    margin: 0 auto;
    border-top: 1px solid #222;
}

.split-layout.reverse {
    flex-direction: row-reverse;
}

.content-block { flex: 1; }

.content-block h1 {
    font-size: 3.5rem; 
    font-weight: 400;
    line-height: 1.2;
    margin-bottom: 2rem;
    letter-spacing: -1px;
}

.content-block h2 {
    font-size: 3rem; 
    font-weight: 400;
    margin-bottom: 1.5rem;
}

.content-block p {
    font-size: 1.3rem;
    color: #cccccc;
    margin-bottom: 1.5rem;
    max-width: 800px;
    line-height: 1.4;
}

.image-block {
    flex: 1;
    position: relative;
    z-index: 1;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 2px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
}

/* =========================================
   6. GALLERY INDEX ARCHIVE
   ========================================= */
.gallery-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 6rem 5%;
}

.gallery-intro {
    margin-bottom: 5rem;
    border-bottom: 1px solid #222;
    padding-bottom: 3rem;
}

.gallery-intro h2 {
    font-family: 'Abhaya Libre', serif;
    font-size: 3.5rem;
    font-weight: 400;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
}

.gallery-intro p {
    font-size: 1.3rem;
    color: #cccccc;
    max-width: 800px;
    line-height: 1.4;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); 
    gap: 1.5rem; 
    margin-top: 2rem;
}

.gallery-item {
    text-decoration: none;
    color: inherit;
    display: block;
}

.gallery-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 5;
    overflow: hidden;
}

.gallery-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.50);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: background-color 0.4s ease;
}

.gallery-overlay h3 {
    font-family: 'Abhaya Libre', serif;
    font-size: 2.2rem;
    color: #ffffff;
    font-weight: 400;
    letter-spacing: 2px;
    text-align: center;
    padding: 0 1rem;
}

.gallery-item:hover img { transform: scale(1.05); }
.gallery-item:hover .gallery-overlay { background-color: rgba(0, 0, 0, 0.35); }

/* =========================================
   NEW 7. INNER PROJECTS & COMPACT ALBUMS (FIXED)
   ========================================= */
.project-header {
    max-width: 1200px;
    margin: 0 auto;
    padding: 6rem 5% 2rem !important; /* Forces layout away from screen edges */
    box-sizing: border-box;
    text-align: left; /* Locks the title, subtitle, and back button to the left */
}

/* Fixes the bright default purple color states on your back links */
.back-link,
.back-link:visited,
.back-link:link {
    color: #666666 !important; /* Premium, dim gray */
    text-decoration: none;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s ease;
    display: inline-block;
    margin-bottom: 1.5rem;
}

.back-link:hover,
.back-link:active {
    color: var(--text-color) !important; /* Snaps cleanly to white on hover */
}

.project-header h1 {
    font-family: 'Abhaya Libre', serif;
    font-size: 4rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

.project-header .subtitle {
    font-size: 1.3rem;
    color: #888;
}

.inner-gallery-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 6rem 5%;
    border-top: 1px solid #222;
}

.standalone-gallery {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5% 6rem;
}

.inner-gallery-section h2 {
    font-family: 'Abhaya Libre', serif;
    font-size: 2.5rem;
    font-weight: 400;
    margin-bottom: 3rem;
    letter-spacing: 1px;
}

.inner-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.gallery-photo img {
    width: 100%;
    height: auto;
    object-fit: cover;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
}

/* =========================================
   7. STUDIO PERFORMANCE COMPONENTS
   ========================================= */
.services-section, .philosophy-section {
    max-width: 1000px;
    margin: 0 auto;
    padding: 6rem 5%;
    border-top: 1px solid #222;
}

.services-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-top: 3rem;
    align-items: start;
}

.service-item {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.service-item h3 { margin-bottom: 1rem; flex: 0 0 auto; }
.service-item p { flex: 1 0 auto; font-size: 1.1rem; color: #cccccc; line-height: 1.4; }

/* =========================================
   8. CONTACT FORM OVERLAYS
   ========================================= */
.contact-wrapper { max-width: 1000px; margin: 0 auto; padding: 6rem 5%; }
.contact-header { margin-bottom: 4rem; }
.title-with-socials { display: flex; align-items: center; gap: 2rem; margin-bottom: 0.5rem; }
.title-with-socials h1 { margin: 0; line-height: 1; }

.contact-social-icons { display: flex; gap: 1.2rem; align-items: center; }
.contact-social-icons a img { width: 24px; height: 24px; filter: grayscale(100%) brightness(0.6); display: block; transition: all 0.3s ease; box-shadow: none;}
.contact-social-icons a:hover img { filter: grayscale(0%) brightness(1); }

.contact-layout { display: grid; grid-template-columns: 1fr 1.5fr; gap: 8rem; margin-top: 4rem; }
.sidebar-portrait img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; filter: grayscale(100%); }

.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; margin-bottom: 0.5rem; color: #888; }
.form-group input, .form-group textarea { background: transparent; border: none; border-bottom: 1px solid #333; padding: 1rem 0; color: #fff; font-size: 1.1rem; width: 100%; transition: border-color 0.3s ease; }
.form-group input:focus, .form-group textarea:focus { border-bottom: 1px solid #fff; outline: none; }

button.btn { background: #fff; color: #000; padding: 1.5rem 3rem; margin-top: 2rem; text-transform: uppercase; font-weight: 800; letter-spacing: 3px; border: none; cursor: pointer; transition: all 0.3s ease; }
button.btn:hover { background: #cccccc; }



/* =========================================
   NEW: PROJECTS HUB PAGE (RESTORED)
   ========================================= */

.projects-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 6rem 5%;
}

.project-intro {
    margin-bottom: 5rem;
    text-align: center;
}

.project-intro h1 {
    font-family: 'Abhaya Libre', serif;
    font-size: 4rem;
    margin-bottom: 1rem;
}

.projects-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Two massive side-by-side portals */
    gap: 2rem;
}

.project-item {
    text-decoration: none;
    color: inherit;
    display: block;
}

.project-image-wrapper {
    position: relative;
    aspect-ratio: 16 / 9; /* Landscape format layout frame */
    overflow: hidden;
}

.project-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.project-item:hover img {
    transform: scale(1.02);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 2rem;
    box-sizing: border-box;
}

.project-overlay h3 {
    font-family: 'Abhaya Libre', serif;
    font-size: 2.2rem;
    color: white;
    margin: 0;
    width: 100%;
    line-height: 1.2;
}

/* =========================================
   GLASS GLARE HOVER EFFECT
   ========================================= */
.project-image-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-25deg);
    z-index: 3;
    transition: left 0.7s cubic-bezier(0.19, 1, 0.22, 1);
    pointer-events: none;
}

.project-item:hover .project-image-wrapper::after {
    left: 150%; /* Sweeps the light beam from left to right on hover */
}

/* =========================================
   9. FINE-ART MASONRY STRUCTURE
   ========================================= */
.masonry-gallery {
    column-count: 4;
    column-gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5% 6rem;
}

.masonry-item {
    break-inside: avoid;
    margin-bottom: 1.5rem;
    display: block;
    transition: filter 0.4s ease, transform 0.4s ease, opacity 0.4s ease;
}

.masonry-item img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 2px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
}

/* Only apply hover effects on devices with a mouse */
@media (hover: hover) {
/* Dim all items EXCEPT the one currently being hovered */
    .masonry-gallery:has(.masonry-item:hover) .masonry-item:not(:hover) { 
        filter: blur(3px) brightness(0.5); 
        opacity: 0.8; 
        transform: scale(0.98); 
    }
    
    /* The hovered item stays fully bright and scales up */
    .masonry-gallery .masonry-item:hover { 
        filter: blur(0px) brightness(1); 
        opacity: 1; 
        transform: scale(1.02); 
        z-index: 2; 
    }
}

/* =========================================
   10. LIGHTBOX SYSTEM
   ========================================= */
.modal {
    display: none;
    position: fixed;
    z-index: 100;
    left: 0; top: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(5px);
    align-items: center; justify-content: center;
}

.modal.active { display: flex; animation: fadeIn 0.3s ease; }
.modal-content { max-width: 90%; max-height: 90vh; object-fit: contain; }
.close-modal { position: absolute; top: 30px; right: 40px; color: #f1f1f1; font-size: 45px; cursor: pointer; }

/* =========================================
   11. FOOTER ARCHITECTURE
   ========================================= */
.site-footer { padding: 4rem 5%; border-top: 1px solid #222; margin-top: 6rem; color: #666; font-size: 0.9rem; }
.footer-content { display: flex; justify-content: space-between; align-items: center; max-width: 1400px; margin: 0 auto; }
.footer-links a { color: #666; text-decoration: none; margin-left: 2rem; }
.footer-links a:hover { color: #ffffff; }
.footer-icons { display: flex; gap: 1.5rem; }
.footer-icons a img { width: 24px; height: 24px; filter: grayscale(100%) brightness(0.5); }
.footer-icons a:hover img { filter: grayscale(0%) brightness(1); }

/* =========================================
   12. MOTION ENGINES & PRESETS
   ========================================= */
@keyframes fadeUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
.hero-image-container { animation: fadeUp 1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; }
.hero-cta { opacity: 0; animation: fadeUp 1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; animation-delay: 0.3s; }

.reveal-item { opacity: 0; transform: translateY(40px); transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1); }
.reveal-item.visible { opacity: 1; transform: translateY(0); }

@keyframes fadeInPage { to { opacity: 1; } }
body { animation: fadeInPage 0.5s ease forwards; opacity: 0; }
body.fade-out { opacity: 0; transition: opacity 0.4s ease; }

/* =========================================
   13. MASTER RESPONSIVE MEDIA QUERIES
   ========================================= */
@media (max-width: 900px) {
    .masonry-gallery { column-count: 4; }
}

@media (max-width: 768px) {    
    header {
        flex-direction: column;
        padding: 1.5rem 5%;
        gap: 1.5rem;
    }
    
    nav {
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero-image-container {
        position: relative !important;
        width: 100% !important;
        height: 55vh !important;
        min-height: 380px !important;
    }

    .hero-logo-overlay {
        max-width: 250px !important;
    }

    /* -----------------------------------------
       THE MOBILE BUTTON RESET (CLAMPED SECURELY)
       ----------------------------------------- */
    .hero-cta {
        display: flex !important;
        flex-direction: column !important; 
        align-items: center !important;
        justify-content: center !important;
        gap: 1.2rem !important;
        padding: 2.5rem 20px !important; 
        width: 100% !important;
        box-sizing: border-box !important;
        background: #0a0a0a !important;
    }

    .cta-btn {
        width: 90% !important; 
        max-width: 280px !important; /* Constrains expansion strictly to 280px */
        padding: 1.1rem 1rem !important;
        box-sizing: border-box !important;
        display: inline-block !important;
    }

    .split-layout, .split-layout.reverse { flex-direction: column; gap: 4rem; padding: 4rem 5%; }
    .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
    .services-grid { grid-template-columns: 1fr; }
    .contact-layout { grid-template-columns: 1fr; gap: 3rem; }
    .footer-content { flex-direction: column; gap: 1.5rem; text-align: center; }
    .footer-links a { margin: 0 1rem; }

    /* Restore Mobile Projects Stacking */
    .projects-grid {
        grid-template-columns: 1fr;
    }

    .project-overlay h3 {
        font-size: 1.8rem;
    }
}

@media (max-width: 500px) {
    .masonry-gallery { column-count: 4; }
}

/* =========================================
   LIGHTBOX NAVIGATION ARROWS
   ========================================= */
.modal-prev, .modal-next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: auto;
    padding: 1rem 1.5rem;
    color: #ffffff;
    font-size: 2rem;
    font-weight: bold;
    background: rgba(0, 0, 0, 0.2); 
    border: none;
    border-radius: 4px;
    user-select: none;
    z-index: 10001;
    transition: background 0.3s ease, transform 0.3s ease;
}

.modal-prev { left: 2%; }
.modal-next { right: 2%; }

@media (hover: hover) {
    .modal-prev:hover, .modal-next:hover {
        background: rgba(0, 0, 0, 0.8);
        transform: translateY(-50%) scale(1.1);
    }
}

/* Make arrows a bit smaller and tighter on mobile */
@media (max-width: 768px) {
    .modal-prev, .modal-next {
        font-size: 1.5rem;
        padding: 0.8rem 1rem;
        background: rgba(0, 0, 0, 0.4); 
    }
}

/* =========================================
   LOCK BACKGROUND SCROLLING
   ========================================= */
body.modal-open {
    overflow: hidden;
}