/* 
============================================================
    PHOTO GALLERY — Masonry · Light · Minimal
============================================================ 
*/

/* ----------- Reset & base ----------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --white: #fafaf9;
    --off-white: #f2f1ef;
    --light-gray: #e5e4e1;
    --mid-gray: #9e9c98;
    --dark-gray: #3a3936;
    --black: #141413;

    --gap: 1.25rem;
    --col-min: 260px;
    --nav-h: 4rem;
    --radius: 2px;

    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--white);
    color: var(--black);
    font-family: 'DM Mono', monospace;
    font-weight: 300;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--black);
    text-decoration: underline;
    text-decoration-color: var(--light-gray);
    text-underline-offset: 3px;
    transition: text-decoration-color 0.2s;
}

.lightbox_meta a {
    color: var(--mid-gray);
}

a:hover {
    text-decoration-color: var(--dark-gray);
}

/* ----------- Navigation ----------- */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    background: rgba(250, 250, 249, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--light-gray);
    z-index: 100;
}

.nav-title {
    font-family: Georgia, 'Times New Roman', Times, serif;
    font-weight: 300;
    font-size: 1.35rem;
    letter-spacing: 0.12em;
    color: var(--black);
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--mid-gray);
    text-decoration: none;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
    color: var(--black);
}

/* ----------- Page wrapper ----------- */
.page {
    padding-top: calc(var(--nav-h) + 3rem);
    padding-bottom: 5rem;
    max-width: 1440px;
    margin: 0 auto;
    padding-left: 2rem;
    padding-right: 2rem;
}

/* ----------- Section header ----------- */
.section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--light-gray);
}

.section-header_title {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: 2.2rem;
    letter-spacing: 0.06em;
    color: var(--black);
}

.section-header_meta {
    color: var(--mid-gray);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* ----------- Filter bar ----------- */
.filter-bar {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
}

.filter-btn {
    appearance: none;
    background: transparent;
    border: 1px solid var(--light-gray);
    border-radius: 999px;
    padding: 0.3rem 0.9rem;
    font-family: 'DM Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    color: var(--mid-gray);
    cursor: pointer;
    transition: background 0.18s, color 0.18s, border-color 0.18s;
}

.filter-btn:hover {
    border-color: var(--dark-gray);
    color: var(--dark-gray);
}

.filter-btn.active {
    background: var(--black);
    border-color: var(--black);
    color: var(--white);
}

/* ----------- Masonry grid ----------- */
.masonry {
    columns: var(--col-min) 3;
    column-gap: var(--gap);
}

/* item wrapper */
.photo-card {
    break-inside: avoid;
    margin-bottom: var(--gap);
    position: relative;
    cursor: pointer;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--off-white);

    /* staggered fade-in on load */
    opacity: 0;
    transform: translateY(10px);
    animation: none;
}

.photo-card.animate {
    animation: card-in 0.55s var(--ease-out) forwards;
}

/* stagger delay for first 12 cards */
.photo-card:nth-child(1) {
    animation-delay: 0.05s;
}

.photo-card:nth-child(2) {
    animation-delay: 0.10s;
}

.photo-card:nth-child(3) {
    animation-delay: 0.15s;
}

.photo-card:nth-child(4) {
    animation-delay: 0.20s;
}

.photo-card:nth-child(5) {
    animation-delay: 0.25s;
}

.photo-card:nth-child(6) {
    animation-delay: 0.30s;
}

.photo-card:nth-child(7) {
    animation-delay: 0.35s;
}

.photo-card:nth-child(8) {
    animation-delay: 0.40s;
}

.photo-card:nth-child(9) {
    animation-delay: 0.45s;
}

.photo-card:nth-child(10) {
    animation-delay: 0.50s;
}

.photo-card:nth-child(11) {
    animation-delay: 0.55s;
}

.photo-card:nth-child(12) {
    animation-delay: 0.60s;
}

@keyframes card-in {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.photo-card img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform 0.55s var(--ease-out);
}

/* hover overlay */
._overlay {
    position: absolute;
    inset: 0;
    background: rgba(20, 20, 19, 0);
    display: flex;
    align-items: flex-end;
    padding: 1.1rem;
    transition: background 0.35s;
}

.photo-card_info {
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.3s, transform 0.3s;
}

.photo-card_label {
    font-family: 'DM Mono', monospace;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    color: var(--white);
    text-transform: uppercase;
}

.photo-card_date {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 0.85rem;
    color: rgba(250, 250, 249, 0.65);
}

.photo-card:hover img {
    transform: scale(1.03);
}

.photo-card:hover .photo-card_overlay {
    background: rgba(20, 20, 19, 0.38);
}

.photo-card:hover .photo-card_info {
    opacity: 1;
    transform: translateY(0);
}

/* ----------- Lightbox ----------- */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(20, 20, 19, 0.96);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.lightbox_img {
    max-width: 90vw;
    max-height: 75vh;
    height: auto;
    width: auto;
    object-fit: contain;
    border-radius: var(--radius);
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.5);
    transform: scale(0.97);
    transition: transform 0.4s var(--ease-out), opacity 0.25s ease;
    /* background: var(--off-white); */
    flex-shrink: 0;
}

.lightbox.open .lightbox_img {
    transform: scale(1);
}

.lightbox.open {
    opacity: 1;
    pointer-events: all;
}

.lightbox_close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    appearance: none;
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    width: 2.2rem;
    height: 2.2rem;
    display: grid;
    place-items: center;
    cursor: pointer;
    color: var(--white);
    font-size: 1rem;
    transition: border-color 0.2s, background 0.2s;
}

.lightbox_close:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.lightbox_caption {
    position: absolute;
    bottom: 2rem;
    left: 0;
    right: 0;
    text-align: center;
    color: rgba(250, 250, 249, 0.5);
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* ----------- Footer ----------- */
.footer {
    border-top: 1px solid var(--light-gray);
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--mid-gray);
    font-size: 0.7rem;
    letter-spacing: 0.06em;
}

.footer_name {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: 1rem;
    letter-spacing: 0.1em;
    color: var(--dark-gray);
}

/* ----------- Responsive ----------- */
@media (max-width: 900px) {
    .masonry {
        columns: var(--col-min) 2;
    }
}

@media (max-width: 560px) {
    .masonry {
        columns: 1;
    }

    .nav {
        padding: 0 1.25rem;
    }

    .nav_links {
        gap: 1.25rem;
    }

    .page {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    .section-header {
        flex-direction: column;
        gap: 0.25rem;
    }
}

/* ----------- Utility ----------- */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ----------- Lightbox metadata ----------- */

.lightbox_meta {
    position: static;
    background: none;
    width: 100%;
    max-width: 90vw;
    padding: 1.25rem 0 0 0;
    margin-top: 1rem;
}

.lbm-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.2rem;
    font-weight: 300;
    letter-spacing: 0.06em;
    margin-bottom: 0.25rem;
}

.lbm-sub {
    display: flex;
    gap: 1.5rem;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    color: rgba(250, 250, 249, 0.6);
    margin-bottom: 0.5rem;
}

.lbm-note {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 0.9rem;
    color: rgba(250, 250, 249, 0.55);
    margin-bottom: 0.75rem;
}

.lbm-exif {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 2rem;
    font-size: 0.68rem;
    letter-spacing: 0.06em;
    color: rgba(250, 250, 249, 0.45);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 0.75rem;
    margin-top: 0.5rem;
}

.lbm-exif li span {
    display: inline-block;
    color: rgba(250, 250, 249, 0.25);
    text-transform: uppercase;
    font-size: 0.62rem;
    margin-right: 0.5rem;
    letter-spacing: 0.1em;
}

.lbm-download {
    display: inline-block;
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(250, 250, 249, 0.45);
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    padding-bottom: 0.15rem;
    transition: color 0.2s, border-color 0.2s;
}

.lbm-download:hover {
    color: rgba(250, 250, 249, 0.9);
    border-color: rgba(255, 255, 255, 0.5);
}


/* ----------- Hero ----------- */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: calc(100vh - var(--nav-h));
    margin-top: var(--nav-h);
}

.hero_text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 5rem 4rem;
    border-right: 1px solid var(--light-gray);
}

.hero_eyebrow {
    font-size: 0.68rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--mid-gray);
    margin-bottom: 1.5rem;
}

.hero_title {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: clamp(2.8rem, 5vw, 5rem);
    line-height: 1.05;
    letter-spacing: 0.02em;
    color: var(--black);
    margin-bottom: 1.75rem;
}

.hero_title em {
    font-style: italic;
    color: var(--dark-gray);
}

.hero_desc {
    font-size: 0.78rem;
    color: var(--mid-gray);
    line-height: 1.8;
    max-width: 36ch;
    margin-bottom: 2.5rem;
}

.hero_links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.hero_link {
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--black);
    text-decoration: none;
    border-bottom: 1px solid var(--light-gray);
    padding-bottom: 0.2rem;
    transition: border-color 0.2s;
}

.hero_link:hover {
    border-color: var(--black);
}

.hero_image {
    position: relative;
    overflow: hidden;
    background: var(--off-white);
}

.hero_image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0;
    transform: scale(1.04);
    animation: hero-img-in 1.1s 0.2s var(--ease-out) forwards;
}

.hero_image-caption {
    position: absolute;
    bottom: 1.25rem;
    right: 1.25rem;
    font-size: 0.65rem;
    letter-spacing: 0.08em;
    color: rgba(250, 250, 249, 0.5);
    text-transform: uppercase;
}

@keyframes hero-img-in {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ----------- Responsive ----------- */
@media (max-width: 768px) {
    .hero {
        grid-template-columns: 1fr;
        grid-template-rows: auto 50vw;
    }

    .hero_text {
        border-right: none;
        border-bottom: 1px solid var(--light-gray);
        padding: 3rem 1.5rem;
    }

    .hero_title {
        font-size: 2.8rem;
    }
}
