:root {
    color-scheme: light;
    --bg: #edf2f5;
    --surface: #ffffff;
    --surface-soft: #f5f8fa;
    --text: #17252f;
    --muted: #687985;
    --border: #d7e0e5;
    --accent: #315f78;
    --accent-strong: #21495f;
    --accent-soft: #e3edf2;
    --on-accent: #ffffff;
    --shadow-sm: 0 1px 2px rgb(18 40 53 / 8%), 0 4px 16px rgb(18 40 53 / 5%);
    --shadow-lg: 0 24px 80px rgb(2 12 18 / 35%);
    --radius-sm: 0.55rem;
    --radius-md: 0.9rem;
    --radius-lg: 1.25rem;
    --content-width: 92rem;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg);
}

* {
    box-sizing: border-box;
}

html {
    min-width: 20rem;
    scroll-behavior: smooth;
}

html.lightbox-open {
    overflow: hidden;
}

body {
    min-height: 100vh;
    margin: 0;
    background: linear-gradient(180deg, #dce8ee 0, var(--bg) 22rem), var(--bg);
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

a {
    color: var(--accent-strong);
}

a:focus-visible,
button:focus-visible {
    outline: 3px solid #78a9c2;
    outline-offset: 3px;
}

.skip-link {
    position: fixed;
    z-index: 1000;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.65rem 1rem;
    border-radius: var(--radius-sm);
    background: var(--text);
    color: var(--surface);
    transform: translateY(-200%);
}

.skip-link:focus {
    transform: none;
}

.site-header {
    border-bottom: 1px solid rgb(255 255 255 / 38%);
    background: rgb(237 242 245 / 84%);
    backdrop-filter: blur(16px);
}

.site-header__inner {
    display: flex;
    min-height: 6rem;
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 0.9rem clamp(1rem, 3vw, 2rem);
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.brand {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    gap: 0.85rem;
    color: var(--text);
    text-decoration: none;
}

.brand__mark {
    display: grid;
    width: 2.8rem;
    height: 2.8rem;
    flex: 0 0 auto;
    border-radius: 0.75rem;
    place-items: center;
    background: var(--accent-strong);
    color: var(--on-accent);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.brand__copy {
    display: grid;
}

.brand__copy strong {
    font-size: 1.1rem;
    letter-spacing: -0.02em;
}

.brand__copy span {
    color: var(--muted);
    font-size: 0.78rem;
}

.main-nav {
    display: flex;
    margin: 0;
    padding: 0.25rem;
    gap: 0.2rem;
    border: 1px solid rgb(93 119 133 / 14%);
    border-radius: 999px;
    background: rgb(255 255 255 / 62%);
    list-style: none;
}

.main-nav a {
    display: grid;
    min-height: 2.75rem;
    padding: 0.6rem 0.9rem;
    border-radius: 999px;
    place-items: center;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 650;
    text-decoration: none;
    transition: color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.main-nav a:hover {
    color: var(--text);
}

.main-nav a[aria-current="page"] {
    background: var(--surface);
    color: var(--accent-strong);
    box-shadow: var(--shadow-sm);
}

.content {
    min-height: calc(100vh - 14rem);
    max-width: var(--content-width);
    margin: 0 auto;
    padding: clamp(2.25rem, 5vw, 5rem) clamp(1rem, 3vw, 2rem) 4rem;
}

.page-heading h1 {
    max-width: 18ch;
    margin: 0;
    font-size: clamp(2rem, 4.5vw, 4rem);
    line-height: 1.02;
    letter-spacing: -0.045em;
}

.page-heading {
    margin-bottom: clamp(1.75rem, 4vw, 3rem);
}

.page-heading__row {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 2rem;
}

.eyebrow {
    margin: 0 0 0.65rem;
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.page-heading__summary {
    margin: 0 0 0.2rem;
    color: var(--muted);
    white-space: nowrap;
}

.back-link {
    display: inline-block;
    margin-bottom: 1.4rem;
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 650;
    text-decoration: none;
}

.back-link:hover {
    color: var(--accent-strong);
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 16.5rem), 1fr));
    gap: clamp(0.8rem, 1.4vw, 1.25rem);
}

.photo-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.photo-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 34px rgb(18 40 53 / 13%);
}

.photo-card__image-link {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #cbd9e0;
}

.photo-card__image-link::after {
    position: absolute;
    inset: auto 0 0;
    height: 30%;
    background: linear-gradient(transparent, rgb(4 18 26 / 18%));
    content: "";
    pointer-events: none;
}

.photo-card__image-link img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 300ms ease;
}

.photo-card:hover .photo-card__image-link img {
    transform: scale(1.018);
}

.photo-card__body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 0.85rem 0.95rem 0.95rem;
    column-gap: 0.75rem;
}

.photo-card__author,
.photo-card__date,
.photo-card__caption {
    margin: 0;
}

.photo-card__author {
    min-width: 0;
    overflow: hidden;
    font-size: 0.88rem;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.photo-card__author a {
    color: var(--text);
    text-decoration: none;
}

.photo-card__date {
    color: var(--muted);
    font-size: 0.78rem;
    white-space: nowrap;
}

.photo-card__caption {
    display: -webkit-box;
    grid-column: 1 / -1;
    margin-top: 0.45rem;
    overflow: hidden;
    color: var(--muted);
    font-size: 0.86rem;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.photo-card__invalid {
    display: grid;
    aspect-ratio: 4 / 3;
    place-items: center;
    color: #713f3f;
    background: #f2e5e5;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr));
    gap: 0.85rem;
}

.filter-card {
    display: grid;
    min-width: 0;
    min-height: 6.4rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    grid-template-columns: 3.25rem minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.9rem;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    color: var(--text);
    text-decoration: none;
    transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.filter-card:hover {
    border-color: #b5c7d0;
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgb(18 40 53 / 11%);
}

.filter-card__avatar {
    display: grid;
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 50%;
    place-items: center;
    background: var(--accent-soft);
    color: var(--accent-strong);
    font-size: 0.82rem;
    font-weight: 850;
}

.filter-card__copy {
    display: grid;
    min-width: 0;
}

.filter-card__copy strong,
.filter-card__copy span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.filter-card__copy strong {
    font-size: 1rem;
}

.filter-card__copy span {
    color: var(--muted);
    font-size: 0.85rem;
}

.filter-card__count {
    display: grid;
    min-width: 4.5rem;
    color: var(--accent-strong);
    font-size: 1.15rem;
    font-weight: 800;
    text-align: right;
}

.filter-card__count small {
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 550;
}

.season-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr));
    gap: 1rem;
}

.season-card {
    position: relative;
    display: grid;
    min-height: 11rem;
    padding: 1.25rem;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    align-content: end;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    color: var(--muted);
    text-decoration: none;
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.season-card::before {
    position: absolute;
    top: -3rem;
    right: -2rem;
    width: 10rem;
    height: 7rem;
    border-radius: 50%;
    background: var(--accent-soft);
    content: "";
    transform: rotate(-12deg);
}

.season-card:hover {
    border-color: #b5c7d0;
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgb(18 40 53 / 12%);
}

.season-card__label {
    margin-bottom: auto;
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.season-card strong {
    color: var(--text);
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    letter-spacing: -0.04em;
}

.season-card strong span {
    color: var(--border);
    font-weight: 400;
}

.empty-state {
    display: grid;
    max-width: 40rem;
    min-height: 20rem;
    margin: 2rem auto;
    padding: 2rem;
    border: 1px dashed #b8c8d0;
    border-radius: var(--radius-lg);
    place-items: center;
    align-content: center;
    background: rgb(255 255 255 / 45%);
    text-align: center;
}

.empty-state__mark {
    display: grid;
    width: 3.4rem;
    height: 3.4rem;
    margin-bottom: 1rem;
    border-radius: 50%;
    place-items: center;
    background: var(--accent-soft);
    color: var(--accent-strong);
    font-size: 0.78rem;
    font-weight: 850;
}

.empty-state h2 {
    margin: 0;
    font-size: 1.45rem;
}

.empty-state p {
    max-width: 33rem;
    margin: 0.55rem 0 1.2rem;
    color: var(--muted);
}

.button {
    display: inline-flex;
    min-height: 2.75rem;
    padding: 0.65rem 1rem;
    border-radius: 999px;
    align-items: center;
    justify-content: center;
    background: var(--accent-strong);
    color: var(--on-accent);
    font-weight: 750;
    text-decoration: none;
}

.pagination {
    display: flex;
    margin-top: clamp(2rem, 5vw, 4rem);
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.pagination a,
.pagination__ellipsis {
    display: grid;
    min-width: 2.75rem;
    min-height: 2.75rem;
    padding: 0.45rem;
    border: 1px solid transparent;
    border-radius: 999px;
    place-items: center;
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 700;
    text-decoration: none;
}

.pagination a:hover {
    border-color: var(--border);
    background: var(--surface);
    color: var(--text);
}

.pagination a[aria-current="page"] {
    background: var(--accent-strong);
    color: var(--on-accent);
}

.pagination__pages {
    display: flex;
    margin: 0;
    padding: 0;
    align-items: center;
    gap: 0.15rem;
    list-style: none;
}

.pagination__edge {
    padding-inline: 0.85rem !important;
}

.pagination__edge.is-disabled {
    opacity: 0.42;
    pointer-events: none;
}

.site-footer {
    border-top: 1px solid var(--border);
    color: var(--muted);
}

.site-footer__inner {
    display: flex;
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 1.5rem clamp(1rem, 3vw, 2rem);
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.85rem;
}

.site-footer__inner p {
    margin: 0;
}

.site-footer nav {
    display: flex;
    gap: 1rem;
}

.lightbox {
    width: min(96vw, 90rem);
    max-width: none;
    height: min(94vh, 64rem);
    max-height: none;
    padding: 0;
    overflow: hidden;
    border: 1px solid rgb(255 255 255 / 14%);
    border-radius: var(--radius-lg);
    background: #0d151a;
    color: #edf5f8;
    box-shadow: var(--shadow-lg);
}

.lightbox[open] {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
}

.lightbox::backdrop {
    background: rgb(5 12 16 / 88%);
    backdrop-filter: blur(8px);
}

.lightbox__toolbar {
    display: flex;
    min-height: 3.75rem;
    padding: 0.55rem 0.7rem 0.55rem 1rem;
    align-items: center;
    justify-content: space-between;
}

.lightbox__position {
    margin: 0;
    color: #91a3ad;
    font-size: 0.82rem;
}

.icon-button,
.lightbox__nav {
    display: grid;
    width: 2.75rem;
    height: 2.75rem;
    border: 1px solid rgb(255 255 255 / 16%);
    border-radius: 999px;
    place-items: center;
    background: rgb(255 255 255 / 8%);
    color: #fff;
    cursor: pointer;
}

.icon-button {
    font-size: 1.8rem;
}

.lightbox__stage {
    display: grid;
    height: auto;
    min-height: 0;
    padding: 0 0.8rem;
    grid-template-columns: 3.25rem minmax(0, 1fr) 3.25rem;
    align-items: center;
    gap: 0.6rem;
    overflow: hidden;
}

.lightbox__image {
    display: block;
    width: auto;
    height: auto;
    min-width: 0;
    min-height: 0;
    max-width: 100%;
    max-height: 100%;
    margin: auto;
    object-fit: contain;
}

.lightbox__nav {
    font-size: 2.3rem;
}

.lightbox__nav:disabled {
    opacity: 0.3;
    cursor: default;
}

.lightbox__details {
    display: grid;
    min-height: 0;
    max-height: min(28dvh, 14rem);
    padding: 1rem clamp(1rem, 5vw, 5rem) 1.35rem;
    grid-template-columns: minmax(0, 1fr) auto;
    align-content: start;
    gap: 0.3rem 1rem;
    overflow-y: auto;
}

.lightbox__author,
.lightbox__date,
.lightbox__caption {
    margin: 0;
}

.error-page {
    display: grid;
    min-height: 100vh;
    place-items: center;
}

.error-shell {
    width: min(90vw, 42rem);
    padding: clamp(1.5rem, 5vw, 3.5rem);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.error-shell__code {
    display: block;
    margin-bottom: 1.5rem;
    color: var(--border);
    font-size: clamp(4rem, 16vw, 8rem);
    font-weight: 850;
    line-height: 0.8;
    letter-spacing: -0.07em;
}

.error-shell h1 {
    margin: 0;
    font-size: clamp(1.8rem, 5vw, 3rem);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.error-shell > p:not(.eyebrow) {
    margin: 0.8rem 0 1.5rem;
    color: var(--muted);
}

.lightbox__author {
    font-weight: 750;
}

.lightbox__date {
    color: #91a3ad;
    font-size: 0.85rem;
}

.lightbox__caption {
    grid-column: 1 / -1;
    max-width: 70ch;
    margin-top: 0.35rem;
    color: #c8d5db;
    font-size: 0.92rem;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

@media (max-width: 720px) {
    .site-header__inner {
        min-height: auto;
        padding-top: 0.75rem;
        padding-bottom: 0.7rem;
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .brand__copy span {
        display: none;
    }

    .main-nav {
        display: grid;
        width: 100%;
        grid-template-columns: repeat(3, 1fr);
    }

    .main-nav a {
        display: grid;
        min-height: 2.75rem;
        padding: 0.55rem 0.45rem;
        place-items: center;
        text-align: center;
    }

    .content {
        padding-top: 2.5rem;
    }

    .page-heading__row {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.75rem;
    }

    .page-heading__summary {
        white-space: normal;
    }

    .pagination {
        gap: 0.25rem;
    }

    .pagination__edge span {
        display: none;
    }

    .pagination__pages {
        gap: 0;
    }

    .pagination__pages li {
        display: none;
    }

    .pagination__pages li.is-current {
        display: list-item;
    }

    .site-footer__inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .lightbox {
        width: 100vw;
        height: 100dvh;
        border: 0;
        border-radius: 0;
    }

    .lightbox__stage {
        padding: 0;
        grid-template-columns: 2.9rem minmax(0, 1fr) 2.9rem;
        gap: 0.15rem;
    }

    .lightbox__nav {
        width: 2.75rem;
        height: 3.4rem;
        border: 0;
        border-radius: var(--radius-sm);
        background: transparent;
    }

    .lightbox__details {
        padding: 0.9rem 1rem 1.25rem;
        grid-template-columns: 1fr;
    }
}

@media (min-width: 721px) and (max-width: 1080px) {
    .site-header__inner {
        align-items: stretch;
        flex-direction: column;
        gap: 0.75rem;
    }

    .main-nav {
        align-self: flex-start;
        flex-wrap: wrap;
    }
}

@media (max-width: 390px) {
    .brand__mark {
        width: 2.45rem;
        height: 2.45rem;
    }

    .gallery {
        grid-template-columns: 1fr;
    }

    .main-nav a {
        font-size: 0.8rem;
    }
}

@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: dark;
        --bg: #10181d;
        --surface: #18242b;
        --surface-soft: #1d2b33;
        --text: #e8f0f3;
        --muted: #9caeb8;
        --border: #2c3c45;
        --accent: #78a9c2;
        --accent-strong: #9cc6da;
        --accent-soft: #213844;
        --on-accent: #0c202a;
        --shadow-sm: 0 1px 2px rgb(0 0 0 / 22%), 0 7px 22px rgb(0 0 0 / 12%);
    }

    body {
        background: linear-gradient(180deg, #172a34 0, var(--bg) 22rem), var(--bg);
    }

    .site-header {
        border-bottom-color: rgb(255 255 255 / 7%);
        background: rgb(16 24 29 / 86%);
    }

    .main-nav {
        border-color: rgb(255 255 255 / 8%);
        background: rgb(0 0 0 / 14%);
    }

    .main-nav a[aria-current="page"] {
        background: var(--surface-soft);
    }

    .photo-card:hover {
        box-shadow: 0 14px 36px rgb(0 0 0 / 28%);
    }

    .photo-card__image-link {
        background: #243740;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
