:root {
    --bg: #0e0e10;
    --fg: #e8e8e8;
    --muted: #8a8a90;
    --card: #1a1a1d;
    --border: #222;
    --accent: #6aa3ff;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--fg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1 {
    font-weight: 300;
    font-size: 1.6rem;
    margin: 0;
}

.empty {
    color: var(--muted);
    text-align: center;
    padding: 3rem 1rem;
}

/* --- Picker --- */
.page-picker main {
    padding: 1rem;
    max-width: 480px;
    margin: 0 auto;
    text-align: center;
}

.page-picker h1 {
    margin: 2.5rem 0 1.5rem;
    font-size: 2rem;
    letter-spacing: 0.02em;
}

ul.people {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

ul.people a {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 1rem 1.25rem;
    background: var(--card);
    border-radius: 10px;
    color: var(--fg);
    transition: background 0.15s ease;
}

ul.people a:hover {
    background: #232327;
    text-decoration: none;
}

ul.people .name { font-size: 1.15rem; }
ul.people .count { color: var(--muted); font-size: 0.85rem; }

/* --- Gallery --- */
.gallery-header {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: rgba(14, 14, 16, 0.92);
    backdrop-filter: blur(6px);
    z-index: 10;
}

.gallery-header .back { font-size: 0.95rem; }
.gallery-header h1 { font-size: 1.1rem; font-weight: 400; }

.gallery {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 1rem;
    max-width: 1600px;
    margin: 0 auto;
}

.drawing {
    margin: 0;
    display: flex;
    flex-direction: column;
}

.drawing img {
    display: block;
    width: 100%;
    height: auto;
    max-height: calc(100vh - 6rem);
    object-fit: contain;
    cursor: zoom-in;
    background: #000;
}

.drawing figcaption {
    color: var(--muted);
    font-size: 0.8rem;
    margin-top: 0.4rem;
    align-self: flex-end;
    font-variant-numeric: tabular-nums;
}

@media (min-width: 800px) {
    .gallery {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
        padding: 1.5rem;
    }
    .drawing img { max-height: 90vh; }
}

/* --- Lightbox --- */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.96);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 1rem;
}

.lightbox[hidden] { display: none; }

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

.lightbox-close {
    position: absolute;
    top: 0.5rem;
    right: 0.75rem;
    background: transparent;
    border: none;
    color: var(--fg);
    font-size: 2.5rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.25rem 0.6rem;
}

body.no-scroll { overflow: hidden; }

/* --- Footer --- */
.site-footer {
    color: var(--muted);
    font-size: 0.75rem;
    text-align: center;
    padding: 2rem 1rem 1.5rem;
    margin-top: 2rem;
    border-top: 1px solid var(--border);
}

.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--fg); }
