/* Photography gallery — color wheel + sorted grid. */

.photos-page {
    font-family: 'Times New Roman', Times, serif;
    background-color: #f5f5f0;
    color: #000;
    min-height: 100dvh;
    padding: 20px 0;
}

.photos-layout {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
    max-width: none;
    margin: 0;
    padding: 0;
}

.photos-sidebar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
    position: sticky;
    top: 20px;
}

.photos-swatch {
    width: 100%;
    max-width: 240px;
    text-align: left;
}

.photos-swatch__meta {
    font-size: 0.9rem;
    line-height: 1.55;
    color: #333;
}

.photos-swatch__meta dt {
    color: #888;
    font-style: italic;
    font-size: 0.8rem;
}

.photos-swatch__meta dd {
    margin: 0 0 8px;
}

.photos-swatch__about {
    margin-top: 4px;
    font-size: 0.9rem;
}

.photos-swatch__about a {
    color: #0000EE;
}

.photos-swatch__about a:hover {
    color: #EE0000;
}

.photos-main {
    min-width: 0;
}

.photos-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    align-items: start;
}

.photos-grid__item {
    display: block;
    width: 100%;
    padding: 0;
    border: 1px solid #ddd;
    background: #fff;
    cursor: pointer;
    overflow: hidden;
    aspect-ratio: 1;
}

.photos-grid__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    vertical-align: top;
}

.photos-grid__item:focus-visible {
    outline: 2px solid #0000EE;
    outline-offset: 2px;
}

.photos-status {
    margin-top: 14px;
    font-size: 0.85rem;
    font-style: italic;
    color: #666;
}

/* Detail / lightbox */
.photos-detail {
    position: fixed;
    inset: 0;
    z-index: 40;
    background: rgba(245, 245, 240, 0.97);
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.photos-detail[hidden] {
    display: none;
}

.photos-detail__top {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 12px;
}

.photos-detail__close {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: #0000EE;
    font-family: 'Times New Roman', Times, serif;
    font-size: 1rem;
    text-decoration: underline;
}

.photos-detail__close:hover {
    color: #EE0000;
}

.photos-detail__body {
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
}

.photos-detail__media {
    flex: 1;
    min-width: 0;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photos-detail__media img {
    max-width: 100%;
    max-height: 100%;
    display: block;
    border: 1px solid #ddd;
    background: #fff;
}

.photos-detail__story {
    flex: 0 0 300px;
    max-height: 100%;
    overflow-y: auto;
    text-align: left;
    font-size: 0.9rem;
    line-height: 1.65;
    color: #333;
    white-space: pre-wrap;
}

.photos-detail__caption {
    text-align: center;
    font-size: 0.8rem;
    font-style: italic;
    color: #555;
    margin-top: 12px;
}

@media (max-width: 980px) {
    .photos-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .photos-sidebar {
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        align-items: flex-start;
        gap: 24px;
    }

    .photos-swatch {
        max-width: 200px;
    }

    .photos-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
}

@media (max-width: 900px) {
    .photos-detail__body {
        flex-direction: column;
        gap: 14px;
    }

    .photos-detail__story {
        flex: 0 0 auto;
        max-height: 28%;
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .photos-grid__item {
        transition: none !important;
        transform: none !important;
    }
}
