:root {
    --bg: #0d1117;
    --card: rgba(255, 255, 255, 0.06);
    --border: rgba(255, 255, 255, 0.12);
    --text: #c9d1d9;
    --muted: #8b949e;
    --accent: #58a6ff;
    --shadow: 0 16px 38px -10px rgba(0, 0, 0, 0.7);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: radial-gradient(circle at 20% 20%, rgba(88, 166, 255, 0.25), transparent 55%),
        radial-gradient(circle at 80% 40%, rgba(88, 166, 255, 0.12), transparent 55%),
        #0b0f16;
    color: var(--text);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
}

.page-header {
    padding: 2.5rem 1rem 1rem;
    text-align: center;
}

.page-header h1 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3rem);
}

.page-header p {
    margin: 0.5rem auto 0;
    max-width: 40ch;
    color: var(--muted);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    padding: 1rem;
    max-width: 1100px;
    margin: 0 auto 3rem;
}

.gallery-item {
    border-radius: 16px;
    overflow: hidden;
    background: var(--card);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.gallery-button {
    width: 100%;
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.gallery-button:focus-visible {
    outline: 3px solid rgba(88, 166, 255, 0.65);
    outline-offset: 4px;
}

.gallery-item img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform 220ms ease;
}

.gallery-item:hover,
.gallery-button:focus-visible {
    transform: translateY(-4px);
    border-color: rgba(88, 166, 255, 0.55);
    box-shadow: 0 22px 45px -14px rgba(0, 0, 0, 0.75);
}

.gallery-item:hover img {
    transform: scale(1.03);
}

.gallery-item figcaption {
    padding: 0.75rem 1rem 1rem;
    font-size: 0.95rem;
    color: var(--muted);
}

.lightbox {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.75);
    z-index: 1000;
}

.lightbox[hidden] {
    display: none;
}

.lightbox-image {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 12px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.65);
}

.lightbox-caption {
    margin: 1rem 0 0;
    color: var(--text);
    font-size: 1rem;
    text-align: center;
}

.lightbox-close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    background: rgba(10, 13, 18, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    width: 2.5rem;
    height: 2.5rem;
    color: var(--text);
    font-size: 1.25rem;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: transform 180ms ease, background 180ms ease;
}

.lightbox-close:hover {
    transform: scale(1.05);
    background: rgba(10, 13, 18, 0.92);
}

@media (max-width: 460px) {
    .page-header {
        padding: 1.75rem 1rem 0.75rem;
    }

    .gallery-grid {
        gap: 1rem;
        padding: 0.75rem;
    }
}

.site-footer {
    margin-top: auto;
    text-align: center;
    padding: 1rem 0;
    font-size: 0.9rem;
    color: #888;
}

.site-footer a {
    color: inherit;
    text-decoration: underline;
}

.site-footer a:hover,
.site-footer a:focus {
    color: #000;
}