:root {
    color-scheme: light;
    --background: #ffffff;
    --foreground: #000000;
    --border: #e8e8e8;
    --input: #f8f8f7;
    --primary: #277eff;
    --primary-foreground: #ffffff;
    --secondary: #dbe7fb;
    --secondary-foreground: #277eff;
    --muted: #e8e8e8;
    --muted-foreground: #949494;
    --nav-height: 78px;
    --page-x: 48px;
    --font-body: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    background: var(--background);
    color: var(--foreground);
    font-family: var(--font-body);
    letter-spacing: 0;
    margin: 0;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select {
    color: inherit;
    font: inherit;
    letter-spacing: 0;
}

button {
    background: transparent;
}

img,
svg {
    display: block;
}

svg {
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.visually-hidden {
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

.app-shell {
    background: var(--background);
    color: var(--foreground);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-nav {
    align-items: center;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: saturate(160%) blur(6px);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    min-height: var(--nav-height);
    padding: 18px var(--page-x);
    position: sticky;
    top: 0;
    z-index: 40;
}

.brand {
    font-size: 24px;
    font-weight: 800;
    line-height: 1;
}

.nav-links {
    align-items: center;
    display: flex;
    gap: 32px;
}

.nav-links a,
.nav-action,
.detail-top-button,
.neighbor-link,
.toolbar-button,
.status-line,
.load-more {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.25;
}

.nav-links a {
    color: var(--muted-foreground);
}

.nav-links a.active {
    color: var(--foreground);
    text-decoration: underline;
    text-underline-offset: 4px;
}

.nav-action {
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--muted-foreground);
    cursor: not-allowed;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0;
    width: 40px;
}

.nav-action svg {
    height: 18px;
    width: 18px;
}

.showcase-hero {
    display: flex;
    flex-direction: column;
    height: 600px;
    justify-content: flex-end;
    overflow: hidden;
    padding: 64px var(--page-x);
    position: relative;
}

.showcase-hero-media {
    inset: 0;
    position: absolute;
}

.showcase-hero-media img {
    filter: grayscale(1);
    height: 100%;
    object-fit: cover;
    opacity: 0.58;
    width: 100%;
}

.showcase-hero-media::after {
    background: rgba(255, 255, 255, 0.36);
    content: "";
    inset: 0;
    position: absolute;
}

.showcase-hero-copy {
    max-width: 896px;
    position: relative;
    z-index: 1;
}

.kicker,
.inventory-label,
.metadata-label,
.placeholder-label {
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.35;
    margin: 0 0 16px;
    text-transform: uppercase;
}

.showcase-hero h1 {
    font-size: 72px;
    font-weight: 800;
    line-height: 1.12;
    margin: 0 0 24px;
}

.showcase-hero p:not(.kicker) {
    color: var(--muted-foreground);
    font-size: 20px;
    font-weight: 300;
    line-height: 1.65;
    margin: 0;
    max-width: 672px;
}

.catalogue-toolbar {
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 16px var(--page-x);
    position: sticky;
    top: var(--nav-height);
    z-index: 20;
}

.toolbar-left,
.toolbar-right,
.filter-chips,
.chip,
.toolbar-button {
    align-items: center;
    display: flex;
}

.toolbar-left {
    flex: 0 1 auto;
    gap: 12px;
    min-width: 0;
}

.toolbar-right {
    flex: 0 0 auto;
    margin-left: auto;
}

.search-control {
    background: var(--input);
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--foreground);
    cursor: text;
    min-height: 40px;
    padding: 8px 42px 8px 16px;
    width: 220px;
}

.search-shell {
    position: relative;
}

.search-submit {
    align-items: center;
    background: transparent;
    border: 0;
    box-shadow: none;
    color: var(--muted-foreground);
    cursor: pointer;
    display: flex;
    height: 40px;
    justify-content: center;
    right: 0;
    padding: 0;
    position: absolute;
    top: 0;
    width: 40px;
    z-index: 1;
}

.search-submit:hover {
    color: var(--foreground);
}

.search-submit svg {
    color: var(--muted-foreground);
    height: 16px;
    width: 16px;
}

.toolbar-button {
    border: 1px solid var(--border);
    border-radius: 999px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    cursor: pointer;
    flex: 0 0 auto;
    gap: 8px;
    min-height: 40px;
    padding: 8px 16px;
    width: auto;
}

.toolbar-button.primary {
    background: var(--foreground);
    border-color: var(--foreground);
    color: var(--background);
}

.toolbar-button.secondary {
    background: var(--background);
}

.toolbar-button svg {
    height: 16px;
    width: 16px;
}

.toolbar-divider {
    background: var(--border);
    height: 24px;
    margin: 0 8px;
    width: 1px;
}

.filter-chips {
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
}

.chip {
    background: var(--secondary);
    border: 0;
    border-radius: 999px;
    color: var(--secondary-foreground);
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    gap: 6px;
    line-height: 1;
    padding: 7px 12px;
}

.chip svg {
    height: 12px;
    width: 12px;
}

.filter-panel {
    align-items: end;
    background: rgba(255, 255, 255, 0.98);
    border-top: 1px solid var(--border);
    border-bottom: 0;
    box-shadow: none;
    display: grid;
    flex: 0 0 calc(100% + (var(--page-x) * 2));
    gap: 14px;
    grid-template-columns: repeat(4, minmax(150px, 1fr)) auto;
    margin: 16px calc(var(--page-x) * -1) -16px;
    padding: 14px var(--page-x) 16px;
    width: calc(100% + (var(--page-x) * 2));
}

.filter-panel[hidden] {
    display: none;
}

.filter-field {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.filter-field span {
    color: var(--muted-foreground);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.filter-panel select {
    appearance: none;
    background: var(--input);
    border: 1px solid var(--border);
    border-radius: 6px;
    min-height: 38px;
    padding: 8px 28px 8px 10px;
    width: 100%;
}

.filter-panel-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    padding-top: 0;
}

.filter-action {
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    font-size: 12px;
    font-weight: 700;
    gap: 6px;
    min-height: 38px;
    padding: 8px 10px;
}

.filter-action svg {
    height: 12px;
    width: 12px;
}

.filter-action.primary {
    background: var(--foreground);
    border-color: var(--foreground);
    color: var(--background);
}

.filter-action.secondary {
    background: var(--background);
    color: var(--muted-foreground);
}

.filter-action.secondary:hover {
    color: var(--foreground);
}

.status-line {
    color: var(--muted-foreground);
}

.year-section {
    background: var(--background);
    padding: 96px var(--page-x) 128px;
}

.year-section:nth-child(even) {
    background: rgba(219, 231, 251, 0.1);
}

.year-heading {
    align-items: baseline;
    display: flex;
    gap: 24px;
    margin-bottom: 64px;
}

.year-heading h2 {
    font-size: 48px;
    font-weight: 800;
    line-height: 1;
    margin: 0;
}

.year-heading .rule {
    background: var(--border);
    flex: 1;
    height: 1px;
}

.year-heading .year-caption {
    color: var(--muted-foreground);
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
}

.artwork-grid {
    align-items: start;
    display: grid;
    gap: 64px 32px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.artwork-card {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.artwork-media {
    aspect-ratio: 4 / 5;
    background: var(--muted);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
    margin-bottom: 16px;
    overflow: hidden;
    position: relative;
}

.artwork-card:nth-child(2n) .artwork-media {
    aspect-ratio: 1 / 1;
}

.artwork-card:nth-child(3n) .artwork-media {
    aspect-ratio: 3 / 4;
}

.artwork-card:nth-child(5n) .artwork-media {
    aspect-ratio: 4 / 3;
}

.artwork-media img,
.missing-image {
    height: 100%;
    object-fit: cover;
    transition: transform 700ms ease;
    width: 100%;
}

.artwork-card:hover .artwork-media img {
    transform: scale(1.05);
}

.artwork-title {
    font-size: 16px;
    font-weight: 800;
    line-height: 1.3;
    margin: 0 0 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.artwork-medium {
    color: var(--muted-foreground);
    font-size: 12px;
    line-height: 1.35;
    margin: 0 0 8px;
}

.artwork-inventory {
    color: var(--primary);
    font-size: 10px;
    font-weight: 800;
    line-height: 1.4;
    margin-top: auto;
    text-transform: uppercase;
}

.loading-row,
.catalogue-status {
    align-items: center;
    color: var(--muted-foreground);
    display: flex;
    font-size: 14px;
    font-weight: 700;
    gap: 8px;
    justify-content: center;
    padding: 64px var(--page-x);
    text-transform: uppercase;
}

.load-more {
    border: 1px solid var(--border);
    cursor: pointer;
    padding: 12px 18px;
}

.gallery-sentinel {
    height: 1px;
}

.site-footer {
    align-items: center;
    border-top: 1px solid var(--border);
    color: var(--muted-foreground);
    display: flex;
    font-size: 12px;
    font-weight: 800;
    justify-content: space-between;
    padding: 32px var(--page-x);
    text-transform: uppercase;
}

.locale-toggle {
    align-items: center;
    display: inline-flex;
    gap: 8px;
}

.locale-option {
    background: transparent;
    border: 0;
    color: var(--muted-foreground);
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    min-width: 24px;
    padding: 0;
    text-transform: uppercase;
}

.locale-option:hover {
    color: var(--foreground);
}

.locale-option.is-active,
.locale-option[aria-pressed="true"] {
    color: var(--foreground);
    text-decoration: underline;
    text-underline-offset: 4px;
}

.locale-option:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 4px;
}

.locale-divider {
    color: var(--muted-foreground);
    font-size: 12px;
    font-weight: 500;
}

.detail-nav {
    align-items: center;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: saturate(160%) blur(6px);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    min-height: var(--nav-height);
    padding: 18px var(--page-x);
    position: sticky;
    top: 0;
    z-index: 40;
}

.detail-nav-left,
.detail-neighbors,
.detail-top-button,
.neighbor-link {
    align-items: center;
    display: flex;
}

.detail-nav-left {
    gap: 24px;
}

.detail-top-button,
.neighbor-link {
    border: 0;
    color: var(--muted-foreground);
    gap: 8px;
    padding: 0;
}

.detail-top-button svg,
.neighbor-link svg {
    height: 16px;
    width: 16px;
}

.detail-neighbors {
    border-left: 1px solid var(--border);
    gap: 16px;
    padding-left: 24px;
}

.detail-nav-right {
    align-items: center;
    display: flex;
    gap: 16px;
}

.neighbor-link:not(.disabled) {
    color: var(--foreground);
}

.neighbor-link.disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.view-toggle {
    align-items: center;
    background: var(--muted);
    border-radius: 8px;
    display: flex;
    margin-right: 16px;
    padding: 4px;
}

.view-toggle button {
    border: 0;
    border-radius: 4px;
    color: var(--muted-foreground);
    cursor: not-allowed;
    font-size: 14px;
    font-weight: 600;
    padding: 6px 16px;
}

.view-toggle button.active {
    background: var(--background);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
    color: var(--foreground);
}

.detail-shell {
    display: flex;
    flex: 1;
    min-height: calc(100vh - var(--nav-height));
    overflow: hidden;
}

.detail-carousel {
    align-items: center;
    background: #e5e5e5;
    border-right: 1px solid var(--border);
    display: flex;
    flex: 1;
    justify-content: center;
    overflow: hidden;
    padding: 24px;
    position: relative;
}

.detail-image-stage {
    align-items: center;
    display: flex;
    height: 100%;
    justify-content: center;
    margin: 0;
    width: 100%;
}

.detail-image-stage img {
    box-shadow: 0 25px 25px rgba(0, 0, 0, 0.15);
    filter: drop-shadow(0 25px 25px rgba(0, 0, 0, 0.15));
    max-height: calc(100vh - 150px);
    max-width: 100%;
    object-fit: contain;
}

.detail-image-empty {
    align-items: center;
    color: var(--muted-foreground);
    display: flex;
    font-size: 14px;
    font-weight: 700;
    justify-content: center;
    min-height: 360px;
    text-transform: uppercase;
}

.carousel-button {
    align-items: center;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid var(--border);
    border-radius: 999px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
    color: var(--foreground);
    cursor: pointer;
    display: flex;
    height: 48px;
    justify-content: center;
    opacity: 0.6;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    transition: opacity 150ms ease, background 150ms ease;
    width: 48px;
}

.carousel-button:hover {
    background: rgba(255, 255, 255, 0.82);
    opacity: 1;
}

.carousel-button svg {
    height: 24px;
    width: 24px;
}

.carousel-button.previous {
    left: 32px;
}

.carousel-button.next {
    right: 32px;
}

.carousel-thumbs {
    bottom: 24px;
    display: flex;
    gap: 10px;
    left: 50%;
    position: absolute;
    transform: translateX(-50%);
}

.carousel-thumbs button {
    background: transparent;
    border: 2px solid transparent;
    cursor: pointer;
    height: 58px;
    padding: 0;
    width: 46px;
}

.carousel-thumbs button.active {
    border-color: var(--primary);
}

.carousel-thumbs img {
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.metadata-panel {
    background: var(--background);
    flex-shrink: 0;
    overflow-y: auto;
    padding: 48px;
    width: 500px;
}

.metadata-panel header {
    margin-bottom: 48px;
}

.metadata-panel h1 {
    font-size: 36px;
    font-weight: 800;
    line-height: 1.25;
    margin: 0 0 16px;
}

.artwork-year {
    color: var(--muted-foreground);
    font-size: 18px;
    line-height: 1.55;
    margin: 0;
}

.metadata-stack {
    display: grid;
    gap: 32px;
}

.metadata-block {
    border-top: 1px solid var(--border);
    padding-top: 32px;
}

.metadata-label {
    color: var(--muted-foreground);
    margin-bottom: 8px;
}

.metadata-block p {
    font-size: 16px;
    font-weight: 300;
    line-height: 1.65;
    margin: 0;
}

.editor-placeholder {
    height: 1px;
    margin-top: 32px;
}

.static-page {
    display: flex;
    flex: 1;
    gap: 96px;
    padding: 96px var(--page-x);
}

.static-copy {
    flex: 1;
    max-width: 672px;
}

.static-copy h1 {
    font-size: 48px;
    font-weight: 800;
    line-height: 1.15;
    margin: 0 0 48px;
}

.prose {
    color: var(--muted-foreground);
    display: grid;
    font-size: 18px;
    font-weight: 300;
    gap: 24px;
    line-height: 1.65;
}

.prose p {
    margin: 0;
}

.contact-block {
    margin-top: 64px;
}

.contact-block h2 {
    font-size: 14px;
    font-weight: 800;
    margin: 0 0 24px;
    text-transform: uppercase;
}

.contact-block p {
    font-size: 14px;
    margin: 0;
}

.portrait-panel {
    flex: 1;
}

.portrait-frame {
    aspect-ratio: 3 / 4;
    background: var(--muted);
    margin: 0 0 16px auto;
    max-width: 448px;
    overflow: hidden;
    width: 100%;
}

.portrait-frame img {
    filter: grayscale(1);
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.portrait-panel figcaption {
    color: var(--muted-foreground);
    font-size: 12px;
    line-height: 1.5;
    margin-left: auto;
    max-width: 448px;
    text-align: right;
}

.exhibitions-page {
    flex: 1;
    margin: 0 auto;
    max-width: 1024px;
    padding: 96px 48px;
    width: 100%;
}

.exhibitions-page h1 {
    font-size: 48px;
    font-weight: 700;
    line-height: 1;
    margin: 0 0 64px;
    text-align: center;
}

.exhibition-sections {
    display: grid;
    gap: 64px;
}

.exhibition-section h2 {
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 32px;
    padding-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.exhibition-rows {
    display: grid;
    gap: 24px;
}

.exhibition-row {
    align-items: baseline;
    display: flex;
    gap: 48px;
}

.exhibition-row time {
    color: var(--muted-foreground);
    flex: 0 0 64px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
}

.exhibition-entry {
    flex: 1;
    min-width: 0;
}

.exhibition-entry h3 {
    font-size: 20px;
    font-weight: 500;
    line-height: 1.35;
    margin: 0;
}

.exhibition-entry p {
    color: var(--muted-foreground);
    font-size: 16px;
    font-weight: 300;
    line-height: 1.5;
    margin: 2px 0 0;
}

@media (max-width: 1120px) {
    .artwork-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .detail-shell {
        flex-direction: column;
        overflow: visible;
    }

    .detail-carousel {
        min-height: 620px;
    }

    .metadata-panel {
        width: 100%;
    }
}

@media (max-width: 820px) {
    :root {
        --page-x: 24px;
        --nav-height: 112px;
    }

    .site-nav,
    .detail-nav {
        align-items: flex-start;
        flex-wrap: wrap;
        gap: 18px;
    }

    .nav-links {
        order: 3;
        width: 100%;
    }

    .showcase-hero h1 {
        font-size: 48px;
    }

    .catalogue-toolbar,
    .static-page {
        align-items: stretch;
        flex-direction: column;
    }

    .catalogue-toolbar {
        gap: 16px;
    }

    .toolbar-right {
        margin-left: 0;
        order: 1;
        width: 100%;
    }

    .toolbar-left {
        align-items: center;
        flex-direction: row;
        order: 2;
        width: 100%;
    }

    .filter-button {
        width: auto;
    }

    .toolbar-divider {
        display: none;
    }

    .filter-chips {
        display: flex;
    }

    .search-control {
        width: 100%;
    }

    .search-shell {
        width: 100%;
    }

    .filter-panel {
        flex-basis: calc(100% + 48px);
        grid-template-columns: 1fr;
        margin-left: -24px;
        margin-right: -24px;
        order: 3;
        width: calc(100% + 48px);
    }

    .filter-panel-actions {
        justify-content: flex-start;
    }

    .year-section {
        padding-bottom: 80px;
        padding-top: 72px;
    }

    .artwork-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .exhibitions-page {
        padding-left: 24px;
        padding-right: 24px;
        padding-top: 72px;
    }

    .exhibitions-page h1 {
        font-size: 42px;
        margin-bottom: 56px;
    }
}

@media (max-width: 560px) {
    .brand {
        font-size: 20px;
    }

    .showcase-hero {
        height: 520px;
    }

    .showcase-hero h1 {
        font-size: 36px;
    }

    .showcase-hero p:not(.kicker) {
        font-size: 17px;
    }

    .filter-button span {
        display: none;
    }

    .filter-button {
        justify-content: center;
        padding-left: 12px;
        padding-right: 12px;
    }

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

    .detail-nav-left,
    .detail-neighbors {
        align-items: flex-start;
        flex-direction: column;
    }

    .detail-neighbors {
        border-left: 0;
        padding-left: 0;
    }

    .view-toggle {
        display: none;
    }

    .metadata-panel {
        padding: 36px 24px 64px;
    }

    .site-footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .exhibitions-page {
        padding-bottom: 88px;
    }

    .exhibitions-page h1 {
        font-size: 36px;
    }

    .exhibition-sections {
        gap: 56px;
    }

    .exhibition-row {
        align-items: flex-start;
        gap: 20px;
    }

    .exhibition-row time {
        flex-basis: 52px;
    }

    .exhibition-entry h3 {
        font-size: 18px;
    }
}
