*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --font: 'Courier New', Courier, monospace;
    --bg: #ffffff;
    --text: #111111;
    --muted: #999999;
    --border: #e0e0e0;
    --nav-height: 2.75rem;
    --pad: 2rem;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    font-size: 0.8rem;
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    color: var(--muted);
}

img {
    display: block;
    max-width: 100%;
}

/* ─── NAV ─────────────────────────────── */

nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--pad);
    background: var(--bg);
    z-index: 100;
    border-bottom: 1px solid var(--border);
}

.site-name {
    font-size: 1rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    line-height: 1.2;
}

.site-subtitle {
    font-size: 0.85rem;
    letter-spacing: 0.03em;
    text-transform: none;
    color: var(--muted);
}

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

nav ul li a {
    font-size: 0.8rem;
    letter-spacing: 0.04em;
}

nav ul li a.active {
    color: var(--muted);
}

/* ─── LAYOUT ──────────────────────────── */

main {
    padding-top: var(--nav-height);
}

.page {
    padding: var(--pad);
    max-width: 1400px;
    margin: 0 auto;
}

.page-label {
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 2rem;
}

/* ─── HOME ────────────────────────────── */

.home {
    width: 100%;
}

.home img {
    width: 100%;
    display: block;
}

/* ─── PORTFOLIO INDEX ─────────────────── */

.collections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
}

.collection-link {
    display: block;
}

.collection-link img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    background: #eee;
}

.collection-meta {
    padding: 0.5rem 0 0;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.collection-title {
    font-size: 0.8rem;
}

.collection-count {
    font-size: 0.7rem;
    color: var(--muted);
}

/* ─── GALLERY PAGE ────────────────────── */

.gallery-header {
    padding: var(--pad);
    padding-bottom: 1.25rem;
    max-width: 1400px;
    margin: 0 auto;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: baseline;
    gap: 2rem;
}

.gallery-header h1 {
    font-size: 0.8rem;
    font-weight: normal;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.gallery-header .gallery-desc {
    font-size: 0.8rem;
    color: var(--muted);
    max-width: 560px;
    line-height: 1.8;
}

.gallery-header .gallery-desc p {
    margin-bottom: 0.85rem;
}

.gallery-header .gallery-desc p:last-child {
    margin-bottom: 0;
}

.gallery-essay-title {
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text);
    margin-bottom: 1rem !important;
}

.gallery-grid {
    columns: 3;
    column-gap: 0.75rem;
    padding: 0 var(--pad) var(--pad);
    max-width: 1400px;
    margin: 0 auto;
}

.gallery-grid figure {
    break-inside: avoid;
    margin-bottom: 0.75rem;
}

.gallery-grid img {
    width: 100%;
    cursor: zoom-in;
    background: #f0f0f0;
}

.gallery-grid figcaption {
    font-size: 0.7rem;
    color: var(--muted);
    padding: 0.35rem 0 0;
    line-height: 1.5;
}

.back-link {
    display: inline-block;
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    color: var(--muted);
    padding: var(--pad);
    padding-bottom: 0;
    max-width: 1400px;
    margin: 0 auto;
    display: block;
}

/* ─── LIGHTBOX ────────────────────────── */

.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.96);
    z-index: 200;
    cursor: zoom-out;
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 92vw;
    max-height: 92vh;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 1.25rem;
    right: 1.5rem;
    color: #666;
    font-family: var(--font);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    cursor: pointer;
}

.lightbox-caption {
    position: absolute;
    bottom: 1.25rem;
    left: 50%;
    transform: translateX(-50%);
    color: #666;
    font-family: var(--font);
    font-size: 0.7rem;
    text-align: center;
    white-space: nowrap;
}

/* ─── EXHIBITIONS ─────────────────────── */

.exhibitions-list {
    max-width: 680px;
}

.exhibition-featured {
    padding: 2rem 0 2.5rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 2.5rem;
}

.exhibition-featured-title {
    font-size: 1rem;
    letter-spacing: 0.04em;
    margin-bottom: 0.35rem;
}

.exhibition-featured-venue {
    font-size: 0.8rem;
    color: var(--muted);
    margin-bottom: 1rem;
}

.exhibition-featured-desc {
    font-size: 0.8rem;
    line-height: 1.8;
    max-width: 480px;
}

.exhibition-year-group {
    margin-bottom: 2.5rem;
}

.exhibition-year-label {
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    color: var(--muted);
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.exhibition-item {
    padding: 0.75rem 0;
    border-top: 1px solid var(--border);
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.5rem 2rem;
    align-items: baseline;
}

.exhibition-title {
    font-size: 0.8rem;
}

.exhibition-venue {
    font-size: 0.75rem;
    color: var(--muted);
    grid-column: 1;
}

.exhibition-location {
    font-size: 0.75rem;
    color: var(--muted);
    text-align: right;
    grid-row: 1 / span 2;
    grid-column: 2;
    align-self: center;
}

/* ─── ABOUT ───────────────────────────── */

.about-layout {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 4rem;
    max-width: 900px;
}

.about-photo img {
    width: 100%;
    background: #eee;
}

.about-text p {
    font-size: 0.8rem;
    line-height: 1.85;
    margin-bottom: 1rem;
    max-width: 480px;
}

.about-text p:last-child {
    margin-bottom: 0;
}

.social-links {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.social-links a {
    font-size: 0.75rem;
    color: var(--muted);
}

.social-links a:hover {
    color: var(--text);
}

/* ─── CV ──────────────────────────────── */

.about-name {
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

.cv {
    max-width: 720px;
    margin-top: 1rem;
}

.cv-location {
    font-size: 0.8rem;
    color: var(--muted);
    margin-bottom: 2.5rem;
}

.cv-section {
    margin-bottom: 2.5rem;
}

.cv-heading {
    font-size: 0.7rem;
    font-weight: normal;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.cv-row {
    display: grid;
    grid-template-columns: 5.5rem 1fr;
    gap: 0 1.5rem;
    padding: 0.4rem 0;
    font-size: 0.8rem;
    line-height: 1.6;
    border-bottom: 1px solid var(--border);
}

.cv-year {
    color: var(--muted);
    font-size: 0.75rem;
    padding-top: 0.05rem;
}

/* ─── CONTACT ─────────────────────────── */

.contact-body {
    max-width: 480px;
}

.contact-body p {
    font-size: 0.8rem;
    line-height: 1.85;
    margin-bottom: 2rem;
    color: var(--muted);
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.contact-links a {
    font-size: 0.8rem;
}

.contact-links a span {
    color: var(--muted);
    margin-right: 1rem;
    display: inline-block;
    width: 5rem;
    letter-spacing: 0.04em;
}

/* ─── MOBILE NAV TOGGLE ───────────────── */

.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-family: var(--font);
    font-size: 1.1rem;
    cursor: pointer;
    color: var(--text);
    padding: 0;
    line-height: 1;
}

/* ─── RESPONSIVE ──────────────────────── */

@media (max-width: 768px) {

    :root {
        --pad: 1.25rem;
        --nav-height: 3.25rem;
    }

    /* Nav */
    .nav-toggle {
        display: block;
    }

    .site-subtitle {
        display: none;
    }

    .site-name {
        font-size: 0.8rem;
    }

    nav ul {
        display: none;
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        background: var(--bg);
        flex-direction: column;
        padding: 1.25rem var(--pad) 1.5rem;
        border-bottom: 1px solid var(--border);
        gap: 1.25rem;
        z-index: 99;
    }

    nav ul.open {
        display: flex;
    }

    nav ul li a {
        font-size: 0.9rem;
    }

    /* Gallery */
    .gallery-grid {
        columns: 2;
    }

    .gallery-header {
        flex-direction: column;
        gap: 0.75rem;
        align-items: flex-start;
    }

    /* About */
    .about-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-photo img {
        max-width: 280px;
    }

    /* Collections */
    .collections-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 0.75rem;
    }

    /* CV */
    .cv-row {
        grid-template-columns: 4rem 1fr;
        gap: 0 1rem;
    }

    /* Exhibition */
    .exhibition-item {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }

    .exhibition-location {
        grid-row: auto;
        grid-column: auto;
        text-align: left;
    }
}

@media (max-width: 480px) {

    .gallery-grid {
        columns: 1;
    }

    .site-name {
        font-size: 0.85rem;
    }

    .site-subtitle {
        font-size: 0.72rem;
    }

    .collections-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
