/* Base responsive settings */
/* Universal box-sizing */
*, *::before, *::after {
    box-sizing: border-box;
}

:root {
    --container-max-width: 1200px;
    --container-padding: 1rem;
}

.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* Navigation styles */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: white;
    z-index: 1000;
    padding-top: 1rem;
}

.nav {
    max-width: var(--container-max-width);
    height: auto;
    min-height: 4rem;
    padding: 1rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #000000;
    box-sizing: border-box;
}

.nav__brand {
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    font-weight: 500;
    text-decoration: none;
    color: #000000;
    letter-spacing: 1px;
}

.nav__menu {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav__link {
    font-size: 1.125rem;
    text-decoration: none;
    color: #000000;
    padding: 0.5rem;
    transition: color 0.3s ease, filter 0.3s ease; /* Added filter to transition */
}

.nav__link:hover,
.nav__link:focus {
    color: #000;
    filter: blur(4px);
}

/* Ensure content below nav is visible and prevent horizontal scroll */
html, body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    box-sizing: border-box;
}

/* Hero section */

.heading {
    margin: 5rem 0;
    padding: 1rem 0;
    max-width: 1100px;
}

.hero__title {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 500;
    line-height: 1.25em;
    letter-spacing: 1px;
}

/* Contact page */

.hero__contact {
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 500;
    line-height: 1.25em;
    letter-spacing: 1px;
}

.contact__body {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 500;
    letter-spacing: 1px;
}

em {
    font-family: Libre Baskerville, sans-serif;
    font-style: italic;
}

/* ...existing code... */

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 500px), 1fr));
    gap: clamp(2rem, 5vw, 5rem);
    align-content: stretch;
    margin-top: 2rem;
    width: 100%;
}

.grid-item {
    padding: 0;
    border: 0;
    min-height: 250px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}

.grid-item img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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



/* Make the image itself clickable and provide a clear hover/focus affordance */
.grid-item__image-link {
    display: block;
    line-height: 0; /* remove extra whitespace around images */
}

.grid-item__image-link img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
    transition: filter 200ms ease;
    cursor: pointer;
    margin-bottom: 1rem;
}

.grid-item__image-link:hover img,
.grid-item__image-link:focus img {
    filter: blur(5px);
}

.grid-item__image-link:focus {
    outline: 3px solid rgba(69, 227, 251, 0.25); /* subtle cyan focus ring */
    outline-offset: 4px;
}

.grid-item__content {
    padding-top:.75rem;
    border-top: 1px solid #000000;
    margin-top: auto;  /* Pushes content to bottom */
}

.grid-item__link {
    font-weight: 500;
    font-size: clamp(1rem, 4vw, 1.5rem);
    color: #464542;
    text-decoration: none;
    transition: opacity .2s, color .2s;
}

.grid-item__link:hover {
    color: #a8a6a0;
}

/* Footer styles */
.footer {
    background-color: #ffffff;
    margin-top: 4rem;
    min-height: 100px;
} 

/* Two-column layout */
.two-column {
   margin-top: 7rem;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    align-items: center;
}

.two-column__content {
    font-size: 1.25rem;
    line-height: 1.6;
}

.two-column__image {
    width: 100%;
    height: auto;
    display: block;
}

/* Button styles */
.button {
    display: inline-block;
    background-color: #000000;
    color: #ffffff;
    text-decoration: none;
    padding: 1rem 2rem;
    font-size: 1.125rem;
    font-weight: 500;
    transition: opacity 0.2s ease;
}

.button:hover {
    opacity: 0.5;
}

/* Project page utilities */
.project-cover {
    width: 100%;      /* changed from 100vw to prevent overflow */
    max-width: 100%;
    display: block;
    height: auto;
    object-fit: cover;
}

.project-main {
    max-width: 1200px; /* match nav width */
     margin: 0 auto;
     padding-top: 1rem;
}

/* Add a bottom border for H1 on project pages */
.project__title {
   font-size: 4.5rem;
    font-weight: 500;
    line-height: 1.25em;
    border-bottom: 1px solid rgba(0, 0, 0, 0.2);
    margin-bottom: 2rem;
    letter-spacing: 1px;
    padding-bottom: .75rem;
}

.project-copy {
    margin: 1rem 0 3rem 0;
    line-height: 1.6;
    font-size: 1.1875rem;;
}

.project-gallery {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.project-gallery img {
    width: 100%;
    height: auto;
    display: block;
}

/* Two-column container for specific gallery images */
.image-container-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.image-container-2col img {
    width: 100%;
    height: auto;
    display: block;
}

/* ===================================
   RESPONSIVE BREAKPOINTS (Desktop-First)
   =================================== */

/* Tablet and below (max-width: 991px) */
@media (max-width: 991px) {
    :root {
        --container-padding: 2rem;
    }

    .nav__menu {
        gap: 2.5rem;
    }

    .heading {
        margin: 4rem 0;
    }

    .two-column {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

.project-cover {
    padding-top: 4rem;
}

    .project__title {
        font-size: 3.5rem;
        margin-top: 1rem;
    }

    .project-copy {
        font-size: 1.125rem;
    }

    .project-gallery {
 gap: 1rem;
}
}

/* Mobile and below (max-width: 767px) */
@media (max-width: 767px) {
    :root {
        --container-padding: 2rem;
    }

    .nav {
        padding: 0.75rem 0;
        min-height: 3.5rem;
    }

    .nav__menu {
        gap: 1.5rem;
    }

    .nav__link {
        font-size: 1rem;
    }

    .heading {
        margin: 4rem 0 0 0;
        padding: 1rem 0;
    }

    .hero__title {
        font-size: clamp(2rem, 4vw, 3.5rem);
    }

    .hero__contact {
        font-size: clamp(1.5rem, 3vw, 2.5rem);
    }

    .contact__body {
        font-size: clamp(1.125rem, 2.5vw, 1.5rem);
    }

    .grid-container {
        grid-template-columns: 1fr;
        gap: clamp(1.5rem, 4vw, 3rem);
    margin-top: 0;
    }

    .grid-item {
        min-height: 200px;
    }

    .two-column__content {
        font-size: 1.125rem;
    }

    .button {
        padding: 0.875rem 1.75rem;
        font-size: 1rem;
    }

.project-gallery {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.project-cover {
    padding-top: 4rem;
}

    .project__title {
        font-size: 2.5rem;
        margin-bottom: 1.5rem;
        padding-bottom: 0.5rem;
    }

    .project-copy {
        margin: 1rem 0 2rem 0;
        font-size: 1rem;
    }

    .image-container-2col {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .footer {
    background-color: #ffffff;
    min-height: 3rem;
    margin-top: 0;
} 
}

