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

html {
    font-size: 19px;      /* Default is 16px. Try 17px, 18px, or 20px */
    overflow-y: scroll;   /* Forces scrollbar to always be visible, preventing layout shift between pages */
}

body {
    background-color: #DBDBDB; 
    color: #715911; 
    font-family: 'EB Garamond', Georgia, serif;
    -webkit-font-smoothing: antialiased;
}

/* --- Header Layout --- */
.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 3rem 5rem;
    max-width: 1400px; 
    margin: 0 auto;
    
    /* Sticky header */
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: #DBDBDB; /* Must match body background */
}

.logo {
    font-size: 1.9rem;
    text-decoration: none;
    color: inherit;
    font-weight: 400;
    letter-spacing: 0.02em;
}

.main-nav {
    display: flex;
    gap: 3rem;
}

.main-nav a {
    text-decoration: none;
    color: inherit;
    font-size: 1.1rem;
    letter-spacing: 0.05em;
    transition: opacity 0.3s ease;
}

.main-nav a:hover {
    opacity: 0.6;
    text-decoration: underline;
    text-underline-offset: 8px;
}

.main-nav a.active {
    text-decoration: underline;
    text-underline-offset: 8px;
}

/* --- Hero Image Section (Homepage) --- */
.hero-section {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem 2rem;
    max-width: 1800px; 
    margin: 0 auto;
}

.hero-image {
    width: 100%;       
    height: auto;      
    display: block;
}

/* --- Work Page: Intro Text --- */
.work-intro {
    text-align: center;
    max-width: 800px; 
    margin: 3rem auto 5rem auto;
    padding: 0 2rem;
    font-size: 1.25rem;
    line-height: 1.8;
    color: inherit;
}

.work-intro a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 4px;
    transition: opacity 0.3s ease;
}

.work-intro a:hover {
    opacity: 0.6;
}

/* --- Work Page: Poster Grid --- */
.poster-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr); 
    gap: 1.5rem;
    max-width: 1400px; 
    margin: 0 auto;
    padding: 0 5rem 5rem 5rem;
}

.poster-grid img {
    width: 100%;
    height: auto;
    display: block;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15); 
    transition: transform 0.3s ease;
    cursor: pointer;
}

.poster-grid img:hover {
    transform: translateY(-8px); 
}

/* --- Work Page: Featured Project --- */
.work-featured {
    max-width: 800px;
    margin: 0 auto 6rem auto;
    padding: 0 2rem;
    text-align: center;
    font-size: 1.25rem;
    line-height: 1.8;
}

.work-featured a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 4px;
    transition: opacity 0.3s ease;
}

.work-featured a:hover {
    opacity: 0.6;
}

/* --- Responsive Video Embed (16:9) --- */
.vimeo-embed {
    position: relative;
    padding-bottom: 56.25%; 
    height: 0;
    overflow: hidden;
    margin-top: 3rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.vimeo-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* --- Showreel Page --- */
.showreel-wrapper {
    max-width: 1100px;
    margin: 3rem auto 6rem auto;
    padding: 0 5rem;
}

.showreel-wrapper .vimeo-embed {
    margin-top: 0;
}

/* --- About & Contact Page Layout --- */
.about-content {
    display: flex;
    align-items: center;
    gap: 4rem;
    max-width: 1400px;
    margin: 5rem auto;
    padding: 0 5rem;
}

.about-text {
    flex: 1; 
    font-size: 1.25rem;
    line-height: 1.8;
}

.about-text p {
    margin-bottom: 1.5rem;
}

.about-image {
    flex: 1; 
    display: flex;
    justify-content: center; 
}

.about-image img {
    width: 100%;
    max-width: 1750px;
    height: auto;
    display: block;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

/* Contact Page: Clickable Image */
.about-image a {
    display: block;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.about-image a:hover {
    opacity: 0.8; 
}

/* --- Lightbox Styles --- */
.lightbox {
    display: none; 
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(30, 30, 30, 0.95); 
    justify-content: center;
    align-items: center;
}

.lightbox.active {
    display: flex; 
}

.lightbox img {
    max-width: 75%;
    max-height: 75vh;
    object-fit: contain;
    box-shadow: 0 0 40px rgba(0,0,0,0.8);
}

/* Close Button */
.close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: #DBDBDB;
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
    z-index: 9999;
    font-family: sans-serif;
}

.close:hover { 
    color: #fff; 
}

/* Navigation Arrows */
.prev, .next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #DBDBDB;
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
    padding: 10px 25px;
    user-select: none;
    z-index: 9999;
    font-family: sans-serif;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    transition: 0.3s;
}

.prev { left: 40px; }
.next { right: 40px; }

.prev:hover, .next:hover { 
    color: #fff; 
    background-color: rgba(113, 89, 17, 0.9);
}

/* --- Responsive Layout Adjustments --- */
@media (max-width: 1200px) {
    .poster-grid {
        grid-template-columns: repeat(6, 1fr); 
    }
}

@media (max-width: 900px) {
    .site-header {
        flex-direction: column;
        padding: 2rem;
        gap: 2rem;
    }

    .logo {
        font-size: 2.2rem;
    }

    .main-nav {
        gap: 1.5rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .main-nav a {
        font-size: 1rem;
    }

    .hero-section {
        padding: 1rem;
    }

    .poster-grid {
        grid-template-columns: repeat(4, 1fr); 
        padding: 0 2rem 3rem 2rem;
    }

    .about-content {
        flex-direction: column;
        padding: 2rem;
        margin: 2rem auto;
        gap: 2rem;
    }
    
    .about-image img {
        max-width: 100%;
    }

    .showreel-wrapper {
        padding: 0 2rem;
        margin: 2rem auto 4rem auto;
    }
}

@media (max-width: 600px) {
    .poster-grid {
        grid-template-columns: repeat(3, 1fr); 
        gap: 1rem;
    }

    .prev { left: 15px; padding: 5px 15px; font-size: 35px; }
    .next { right: 15px; padding: 5px 15px; font-size: 35px; }
    .close { top: 10px; right: 20px; font-size: 40px; }
}