:root {
    color-scheme: dark;
    --ink: #080d16;
    --panel: #101925;
    --panel-raised: #14212f;
    --line: rgba(129, 187, 215, 0.18);
    --line-bright: rgba(114, 211, 244, 0.42);
    --cyan: #8fe3f7;
    --cyan-muted: #84a7b8;
    --gold: #efc979;
    --text: #e8f0f2;
    --muted: #91a1ad;
    --page-width: 1540px;
    --gallery-gap: 14px;
    font-family: "Segoe UI", Arial, sans-serif;
    background: var(--ink);
    color: var(--text);
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    background: var(--ink);
}

body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(ellipse at 14% 0%, rgba(37, 102, 138, 0.2), transparent 38rem),
        radial-gradient(ellipse at 92% 28%, rgba(108, 78, 42, 0.1), transparent 34rem),
        var(--ink);
    color: var(--text);
}

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

button:focus-visible,
a:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 4px;
}

.page-shell {
    width: min(100%, var(--page-width));
    min-height: 100vh;
    margin: 0 auto;
    padding: 0 clamp(20px, 5vw, 76px);
}

.site-header {
    display: flex;
    min-height: 86px;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    border-bottom: 1px solid var(--line);
}

.page-title {
    margin: 0;
    color: var(--text);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 2rem;
    font-weight: 400;
    letter-spacing: -0.025em;
}

.song-player {
    display: flex;
    align-items: center;
    gap: 12px;
}

.song-button {
    display: inline-flex;
    min-height: 47px;
    align-items: center;
    gap: 13px;
    padding: 0 16px;
    border: 1px solid rgba(239, 201, 121, 0.48);
    border-radius: 2px;
    background: rgba(239, 201, 121, 0.08);
    color: #f2d58d;
    font: inherit;
    font-size: 0.8rem;
    letter-spacing: 0.035em;
    cursor: pointer;
    transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.song-button:hover {
    transform: translateY(-1px);
    border-color: var(--gold);
    background: rgba(239, 201, 121, 0.15);
}

.song-button[aria-pressed="true"] {
    border-color: var(--cyan);
    background: rgba(143, 227, 247, 0.1);
    color: var(--cyan);
}

.song-icon {
    display: inline-grid;
    width: 23px;
    height: 23px;
    place-items: center;
    border: 1px solid currentColor;
    border-radius: 50%;
}

.song-icon svg {
    display: block;
    width: 12px;
    height: 12px;
    fill: currentColor;
}

.song-status {
    min-height: 1em;
    color: var(--cyan-muted);
    font-size: 0.7rem;
}

.song-player audio {
    display: none;
}

main {
    display: block;
    padding-top: 28px;
}

.gallery-section {
    padding: 0 0 56px;
}

.gallery-toolbar {
    display: flex;
    min-height: 48px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
}

.gallery-title,
.gallery-count {
    margin: 0;
}

.gallery-title {
    color: var(--text);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.25rem;
    font-weight: 400;
}

.gallery-count {
    color: var(--cyan);
    font-size: 0.75rem;
}

.gallery-grid {
    display: flex;
    flex-direction: column;
    gap: var(--gallery-gap);
}

.gallery-row {
    display: flex;
    width: 100%;
    gap: var(--gallery-gap);
}

.gallery-card {
    position: relative;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--panel);
    transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.gallery-card:hover,
.gallery-card:focus-within {
    z-index: 1;
    transform: translateY(-2px);
    border-color: var(--line-bright);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.32), 0 0 18px rgba(72, 182, 219, 0.1);
}

.gallery-card-button {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    overflow: hidden;
    padding: 0;
    border: 0;
    background: var(--panel);
    color: inherit;
    text-align: left;
    cursor: zoom-in;
}

.gallery-card-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 500ms cubic-bezier(0.2, 0.65, 0.3, 1), filter 250ms ease;
}

.gallery-card-button:hover .gallery-card-image,
.gallery-card-button:focus-visible .gallery-card-image {
    transform: scale(1.035);
    filter: saturate(1.05);
}

.gallery-card-overlay {
    position: absolute;
    inset: 28% 0 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 5px;
    padding: 32px 13px 12px;
    background: linear-gradient(transparent, rgba(5, 10, 17, 0.76));
    opacity: 0.86;
    transition: opacity 180ms ease;
}

.gallery-card-button:hover .gallery-card-overlay,
.gallery-card-button:focus-visible .gallery-card-overlay {
    opacity: 1;
}

.gallery-card-title {
    overflow: hidden;
    color: #f0f5f5;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(0.85rem, 1.35vw, 1.1rem);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gallery-card-description {
    display: -webkit-box;
    overflow: hidden;
    color: rgba(232, 240, 242, 0.76);
    font-size: 0.68rem;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.gallery-row-fill {
    display: block;
    min-width: 0;
}

.lightbox {
    position: fixed;
    z-index: 20;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 22px;
    background: rgba(3, 7, 12, 0.94);
    backdrop-filter: blur(8px);
}

.lightbox[hidden] {
    display: none;
}

body.lightbox-open {
    overflow: hidden;
}

.lightbox-backdrop {
    position: absolute;
    inset: 0;
}

.lightbox-dialog {
    position: relative;
    display: grid;
    width: min(1180px, 100%);
    height: min(860px, 100%);
    min-height: 0;
    grid-template-rows: minmax(0, 1fr) auto;
    overflow: hidden;
    border: 1px solid var(--line-bright);
    background: #0c141e;
    box-shadow: 0 25px 100px rgba(0, 0, 0, 0.6), 0 0 42px rgba(74, 184, 221, 0.08);
}

.lightbox-image-stage {
    position: relative;
    min-height: 0;
    overflow: hidden;
    background: radial-gradient(ellipse at center, rgba(28, 43, 57, 0.44), transparent 72%);
}

.lightbox-image {
    display: block;
    position: absolute;
    inset: 44px 76px;
    width: calc(100% - 152px);
    height: calc(100% - 88px);
    object-fit: contain;
}

.lightbox-close,
.lightbox-nav {
    position: absolute;
    z-index: 2;
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border: 1px solid var(--line-bright);
    border-radius: 50%;
    background: rgba(7, 13, 21, 0.88);
    color: var(--cyan);
    font: inherit;
    line-height: 0;
    cursor: pointer;
    transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.lightbox-close:hover,
.lightbox-nav:hover {
    border-color: var(--gold);
    background: #182331;
    color: var(--gold);
}

.lightbox-close {
    top: 14px;
    right: 14px;
}

.lightbox-close svg,
.lightbox-nav svg {
    display: block;
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.lightbox-nav {
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-previous {
    left: 17px;
}

.lightbox-next {
    right: 17px;
}

.lightbox-nav:disabled {
    opacity: 0.34;
    cursor: default;
}

.lightbox-caption {
    display: flex;
    min-height: 112px;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    padding: 20px 28px 22px;
    border-top: 1px solid var(--line);
    background: rgba(11, 18, 27, 0.96);
}

.lightbox-caption-copy {
    min-width: 0;
}

.lightbox-position {
    color: var(--cyan);
    font-family: Consolas, "Courier New", monospace;
    font-size: 0.62rem;
    letter-spacing: 0.1em;
}

.lightbox-caption h2 {
    margin: 5px 0 4px;
    color: #eff5f5;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.35rem;
    font-weight: 400;
}

.lightbox-caption p {
    margin: 0;
    color: var(--muted);
    font-size: 0.77rem;
    line-height: 1.5;
}

.full-image-link {
    flex: 0 0 auto;
    padding: 10px 12px;
    border: 1px solid var(--line);
    color: var(--cyan-muted);
    font-size: 0.72rem;
    text-decoration: none;
    transition: border-color 160ms ease, color 160ms ease;
}

.full-image-link:hover {
    border-color: var(--line-bright);
    color: var(--cyan);
}

@media (max-width: 900px) {
    .page-shell {
        padding-right: clamp(20px, 4vw, 38px);
        padding-left: clamp(20px, 4vw, 38px);
    }

    .lightbox-image-stage {
    }

    .lightbox-image {
        right: 62px;
        left: 62px;
        width: calc(100% - 124px);
    }
}

@media (max-width: 700px) {
    :root {
        --gallery-gap: 10px;
    }

    .site-header {
        min-height: 0;
        flex-wrap: wrap;
        padding: 14px 0;
    }

    .song-player {
        gap: 8px;
    }

    .song-button {
        min-height: 42px;
        padding: 0 12px;
    }

    .song-status {
        font-size: 0.62rem;
    }

    .lightbox {
        padding: 10px;
    }

    .lightbox-dialog {
        height: min(760px, 100%);
    }

    .lightbox-image {
        inset: 54px 42px;
        width: calc(100% - 84px);
        height: calc(100% - 108px);
    }

    .lightbox-close,
    .lightbox-nav {
        width: 38px;
        height: 38px;
    }

    .lightbox-previous {
        left: 7px;
    }

    .lightbox-next {
        right: 7px;
    }

    .lightbox-caption {
        min-height: 104px;
        gap: 12px;
        padding: 16px;
    }
}

@media (max-width: 520px) {
    .site-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .song-player {
        flex-wrap: wrap;
    }

    .lightbox-caption {
        align-items: flex-start;
        flex-direction: column;
    }

    .full-image-link {
        padding: 7px 9px;
    }
}

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