.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.gallery-item {
    position: relative;
    aspect-ratio: 4 / 3;
    margin: 0;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--paper);
    cursor: pointer;
    overflow: hidden;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-item span {
    position: absolute;
    right: 12px;
    bottom: 12px;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    color: #ffffff;
    background: rgba(7, 17, 31, .78);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 160ms ease, transform 160ms ease;
}

.gallery-item:hover span {
    opacity: 1;
    transform: translateY(0);
}

.gallery-page-section {
    background: var(--soft);
}

.gallery-page-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, .45fr);
    gap: 24px;
    align-items: end;
    margin-bottom: 28px;
}

.gallery-page-head h2 {
    margin: 0;
    color: var(--ink);
    font-size: clamp(2rem, 4vw, 3.4rem);
    line-height: 1;
    font-weight: 800;
}

.gallery-page-head > p {
    margin: 0 0 6px;
    font-weight: 700;
}

.gallery-lightbox-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.image-lightbox {
    position: fixed;
    z-index: 100;
    inset: 0;
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) 72px;
    align-items: center;
    gap: 18px;
    padding: 28px;
    background: rgba(7, 17, 31, .94);
}

.image-lightbox[hidden] {
    display: none;
}

.image-lightbox figure {
    display: grid;
    gap: 14px;
    justify-items: center;
    margin: 0;
}

.image-lightbox img {
    max-width: 100%;
    max-height: 82vh;
    border-radius: var(--radius-md);
    object-fit: contain;
    background: var(--black);
}

.image-lightbox figcaption {
    color: #dbe4ef;
    font-weight: 800;
}

.lightbox-close,
.lightbox-nav {
    display: grid;
    place-items: center;
    border: 1px solid rgba(219, 228, 239, .35);
    border-radius: var(--radius-sm);
    color: #ffffff;
    background: rgba(255, 255, 255, .08);
}

.lightbox-close {
    position: absolute;
    top: 22px;
    right: 22px;
    width: 48px;
    height: 48px;
}

.lightbox-nav {
    width: 58px;
    height: 58px;
    font-size: 1.25rem;
}
