/*  Minimal gallery styling  */
:root {
    --bg: #fafafa;
    --fg: #111;
    --accent: #666;
    --gap: 1.25rem;
}

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

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--fg);
    line-height: 1.6;
}

header {
    text-align: center;
    padding: 2rem 1rem 1rem;
}

h1 {
    margin: 0;
    font-weight: 500;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: var(--gap);
    padding: var(--gap);
    max-width: 1440px;
    margin: 0 auto;
}

figure {
    margin: 0;
    position: relative;
    cursor: zoom-in;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,.1);
    background: #fff;
}

figure img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .25s ease;
}

figure:hover img {
    transform: scale(1.05);
}

figcaption {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: .5rem;
    background: rgba(255,255,255,.8);
    font-size: .875rem;
    text-align: center;
    color: var(--accent);
}

/* Light-box styles */
#lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

#lightbox.hidden {
    display: none;
}

#lightbox img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0,0,0,.4);
}

#lightbox .close {
    position: fixed;
    top: 1.25rem;
    right: 1.5rem;
    font-size: 2rem;
    color: #fff;
    cursor: pointer;
}
