@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@0,400;0,500;1,400&display=swap');

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

body {
    background: #fff;
    color: #000;
    font-family: 'IBM Plex Mono', 'Courier New', monospace;
    font-size: 13px;
    margin: 0;
    padding: 0;
}

a { color: #000; text-decoration: none; }
a:visited { color: #555; }
a:hover { text-decoration: underline; }

/* ── Site header ── */
#site-header {
    padding: 32px calc(40px + (100vw - 80px) / 24) 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}
.site-title {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 20px;
    font-weight: 500;
    letter-spacing: -0.02em;
}
.title-name,
.title-albums {
    font-size: 20px;
    font-weight: 500;
    letter-spacing: -0.02em;
    color: #000;
}
#site-header nav {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}
#site-header nav a {
    font-size: 20px;
    font-weight: 500;
    color: #555;
}
#site-header nav a:hover { text-decoration: underline; }

/* ── Gallery home ── */
#gallery-home {
    padding: 40px 40px 80px;
}

.category-section {
    margin-bottom: 56px;
}

.category-title {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #999;
    margin: 0 0 16px;
    padding-left: calc((40px + (100vw - 80px) / 24) * 2 / 3 - 40px);
}
.category-title a {
    color: #999;
}
.category-title--sub {
    padding-left: calc((40px + (100vw - 80px) / 24) * 2 / 3 - 40px + 4ch);
}

/* Fixed-size album cover grid */
.album-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
}

.album-cell {
    padding: 12.5%;
}

.album-cell a {
    display: block;
    text-decoration: none;
}

.album-cover {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
    background: #f0f0f0;
}

.album-title {
    font-size: 11px;
    color: #000;
    padding: 5px 0 0;
    line-height: 1.4;
}

/* ── Text content pages (about, shows) ── */
.page-content {
    padding: 40px 40px 80px 10ch;
    max-width: 700px;
    line-height: 1.7;
}
.page-content p {
    margin: 0 0 1.2em;
}

/* ── Album view ── */
#album-view {
    padding: 40px 40px 80px;
}

#album-header {
    margin-bottom: 28px;
}
#album-header h1 {
    font-size: 16px;
    font-weight: 500;
    margin: 0 0 6px;
}
#album-header .description {
    font-size: 12px;
    color: #555;
    margin: 0;
}
#album-header .back {
    font-size: 11px;
    color: #999;
    display: inline-block;
    margin-bottom: 12px;
}
#album-header .back:hover { color: #000; text-decoration: none; }

/* Album image grid — reuses .album-grid; item styles below */
.al-item {
    padding: 12.5%;
    cursor: pointer;
}

.al-item img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
}

.al-caption {
    padding-top: 6px;
}

.al-title {
    font-size: 11px;
    font-weight: 500;
    margin: 0 0 2px;
    line-height: 1.4;
    color: #000;
}

.al-cap {
    font-size: 11px;
    color: #555;
    margin: 0;
    line-height: 1.4;
}

/* ── Lightbox ── */
#lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,0.97);
    z-index: 1000;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
#lightbox.active { display: flex; }

#lightbox-img-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    flex: 1;
    padding: 40px;
    min-height: 0;
}

#lightbox-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

#lightbox-info {
    padding: 12px 40px 24px;
    text-align: center;
    max-width: 700px;
    width: 100%;
}
#lightbox-title {
    font-size: 13px;
    font-weight: 500;
    margin: 0 0 4px;
}
#lightbox-caption {
    font-size: 12px;
    color: #555;
    margin: 0;
    white-space: pre-line;
}

#lightbox-close {
    position: fixed;
    top: 20px;
    right: 28px;
    font-size: 20px;
    cursor: pointer;
    color: #999;
    background: none;
    border: none;
    padding: 4px 8px;
    font-family: inherit;
}
#lightbox-close:hover { color: #000; }

#lightbox-prev,
#lightbox-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    cursor: pointer;
    color: #bbb;
    background: none;
    border: none;
    padding: 8px 16px;
    font-family: inherit;
}
#lightbox-prev { left: 12px; }
#lightbox-next { right: 12px; }
#lightbox-prev:hover,
#lightbox-next:hover { color: #000; }

#lightbox-counter {
    position: fixed;
    bottom: 16px;
    right: 24px;
    font-size: 11px;
    color: #bbb;
}

/* ── Mobile (≤ 600px): 2-column grid, tighter padding ── */
@media (max-width: 600px) {
    #site-header {
        padding: 20px 20px 0;
    }

    .category-title {
        padding-left: 0;
    }

    #gallery-home, #album-view {
        padding-left: 20px;
        padding-right: 20px;
    }

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