:root {
    color-scheme: light;
    --bg: #ffffff;
    --surface: #ffffff;
    --text: #161616;
    --muted: #666666;
    --line: #e6e6e6;
    --accent: #161616;
    --accent-dark: #161616;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--text);
    font-family: "Montserrat", Arial, Helvetica, sans-serif;
    line-height: 1.55;
}

body.menu-is-open {
    overflow: hidden;
}

a {
    color: inherit;
}

img {
    display: block;
    max-width: 100%;
}

.site-header,
.site-footer {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 42px 0 28px;
}

.nav-backdrop {
    display: none;
}

.site-name {
    font-size: 1.95rem;
    font-weight: 400;
    letter-spacing: 0.02em;
    line-height: 1;
    text-decoration: none;
}

.menu-toggle,
.menu-close {
    display: none;
    border: 0;
    background: transparent;
    color: var(--text);
    cursor: pointer;
}

.menu-toggle {
    width: 44px;
    height: 44px;
    padding: 10px;
    margin-right: -10px;
}

.menu-toggle span,
.menu-close span {
    display: block;
    height: 1px;
    background: currentColor;
}

.menu-toggle span {
    width: 24px;
    margin: 6px auto;
}

.menu-close {
    position: absolute;
    top: 28px;
    right: 22px;
    width: 44px;
    height: 44px;
    padding: 0;
}

.menu-close span {
    position: absolute;
    left: 10px;
    width: 24px;
}

.menu-close span:first-child {
    transform: rotate(45deg);
}

.menu-close span:last-child {
    transform: rotate(-45deg);
}

.menu-toggle:focus-visible,
.menu-close:focus-visible {
    outline: 2px solid var(--text);
    outline-offset: 3px;
}

.site-nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px 22px;
    font-size: 1.25rem;
    line-height: 1;
}

.site-nav a,
.text-link {
    color: var(--text);
    text-decoration: none;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.text-link:hover,
.text-link:focus-visible {
    text-decoration: underline;
}

.site-nav a.is-active {
    text-decoration: underline;
}

main {
    flex: 1;
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    padding: 28px 0 80px;
}

.page-hero {
    max-width: 760px;
    padding: 24px 0 52px;
}

.page-heading,
.text-page {
    max-width: 780px;
    margin-bottom: 36px;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

h1,
h2 {
    margin: 0;
    line-height: 1.12;
}

h1 {
    font-size: 1.95rem;
    max-width: 840px;
    font-weight: 400;
}

h2 {
    font-size: 1rem;
    font-weight: 400;
}

h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.12;
}

.prose {
    margin-top: 20px;
    color: var(--muted);
    font-size: 1rem;
    max-width: 680px;
}

.prose > *:first-child {
    margin-top: 0;
}

.prose > *:last-child {
    margin-bottom: 0;
}

.umb-block-grid,
.umb-block-grid__layout-container,
.umb-block-grid__area-container,
.umb-block-grid__area {
    display: grid;
    gap: 24px;
}

.umb-block-grid--columns-1,
.umb-block-grid__area-container--columns-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

.umb-block-grid--columns-2,
.umb-block-grid__area-container--columns-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.umb-block-grid--columns-3,
.umb-block-grid__area-container--columns-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.umb-block-grid--columns-4,
.umb-block-grid__area-container--columns-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.umb-block-grid--columns-5,
.umb-block-grid__area-container--columns-5 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.umb-block-grid--columns-6,
.umb-block-grid__area-container--columns-6 {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.umb-block-grid--columns-7,
.umb-block-grid__area-container--columns-7 {
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.umb-block-grid--columns-8,
.umb-block-grid__area-container--columns-8 {
    grid-template-columns: repeat(8, minmax(0, 1fr));
}

.umb-block-grid--columns-9,
.umb-block-grid__area-container--columns-9 {
    grid-template-columns: repeat(9, minmax(0, 1fr));
}

.umb-block-grid--columns-10,
.umb-block-grid__area-container--columns-10 {
    grid-template-columns: repeat(10, minmax(0, 1fr));
}

.umb-block-grid--columns-11,
.umb-block-grid__area-container--columns-11 {
    grid-template-columns: repeat(11, minmax(0, 1fr));
}

.umb-block-grid--columns-12,
.umb-block-grid__area-container--columns-12 {
    grid-template-columns: repeat(12, minmax(0, 1fr));
}

.umb-block-grid__layout-item--span-1,
.umb-block-grid__area--span-1 {
    grid-column: span 1;
}

.umb-block-grid__layout-item--span-2,
.umb-block-grid__area--span-2 {
    grid-column: span 2;
}

.umb-block-grid__layout-item--span-3,
.umb-block-grid__area--span-3 {
    grid-column: span 3;
}

.umb-block-grid__layout-item--span-4,
.umb-block-grid__area--span-4 {
    grid-column: span 4;
}

.umb-block-grid__layout-item--span-5,
.umb-block-grid__area--span-5 {
    grid-column: span 5;
}

.umb-block-grid__layout-item--span-6,
.umb-block-grid__area--span-6 {
    grid-column: span 6;
}

.umb-block-grid__layout-item--span-7,
.umb-block-grid__area--span-7 {
    grid-column: span 7;
}

.umb-block-grid__layout-item--span-8,
.umb-block-grid__area--span-8 {
    grid-column: span 8;
}

.umb-block-grid__layout-item--span-9,
.umb-block-grid__area--span-9 {
    grid-column: span 9;
}

.umb-block-grid__layout-item--span-10,
.umb-block-grid__area--span-10 {
    grid-column: span 10;
}

.umb-block-grid__layout-item--span-11,
.umb-block-grid__area--span-11 {
    grid-column: span 11;
}

.umb-block-grid__layout-item--span-12,
.umb-block-grid__area--span-12 {
    grid-column: span 12;
}

.umb-block-grid__layout-item--rows-1,
.umb-block-grid__area--rows-1 {
    grid-row: span 1;
}

.umb-block-grid__layout-item--rows-2,
.umb-block-grid__area--rows-2 {
    grid-row: span 2;
}

.umb-block-grid__layout-item--rows-3,
.umb-block-grid__area--rows-3 {
    grid-row: span 3;
}

.umb-block-grid__layout-item--rows-4,
.umb-block-grid__area--rows-4 {
    grid-row: span 4;
}

.umb-block-grid__layout-item--rows-5,
.umb-block-grid__area--rows-5 {
    grid-row: span 5;
}

.umb-block-grid__layout-item--rows-6,
.umb-block-grid__area--rows-6 {
    grid-row: span 6;
}

.umb-block-grid__layout-item--rows-7,
.umb-block-grid__area--rows-7 {
    grid-row: span 7;
}

.umb-block-grid__layout-item--rows-8,
.umb-block-grid__area--rows-8 {
    grid-row: span 8;
}

.umb-block-grid__layout-item--rows-9,
.umb-block-grid__area--rows-9 {
    grid-row: span 9;
}

.umb-block-grid__layout-item--rows-10,
.umb-block-grid__area--rows-10 {
    grid-row: span 10;
}

.umb-block-grid__layout-item--rows-11,
.umb-block-grid__area--rows-11 {
    grid-row: span 11;
}

.umb-block-grid__layout-item--rows-12,
.umb-block-grid__area--rows-12 {
    grid-row: span 12;
}

.about-page {
    display: grid;
    grid-template-columns: minmax(280px, 0.85fr) minmax(0, 1fr);
    gap: 56px;
    align-items: start;
}

.about-page--text-only {
    display: block;
    max-width: 680px;
    margin: 0;
    text-align: left;
}

.about-portrait {
    margin: 0;
}

.about-portrait img {
    width: 100%;
    max-height: 760px;
    object-fit: contain;
    object-position: center top;
}

.about-content {
    padding-top: 10px;
}

.about-page--text-only .about-content {
    padding-top: 0;
}

.about-page--text-only h1,
.about-page--text-only .prose {
    margin-left: 0;
    margin-right: 0;
}

.link-grid,
.artwork-grid {
    display: grid;
    gap: 34px 24px;
}

.link-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.artwork-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
}

.link-card,
.artwork-card a,
.event-item a {
    background: var(--surface);
    text-decoration: none;
}

.link-card {
    min-height: 72px;
    display: flex;
    align-items: center;
    border-top: 1px solid var(--line);
    font-size: 1rem;
    font-weight: 400;
}

.artwork-card a {
    display: block;
    overflow: hidden;
}

.artwork-card figure,
.detail-image {
    margin: 0;
    background: var(--bg);
}

.artwork-card figure {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

.artwork-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.gallery-artwork-grid .artwork-card figure {
    aspect-ratio: auto;
}

.gallery-artwork-grid .artwork-card img {
    position: static;
    width: 100%;
    height: auto;
    object-fit: contain;
}

.detail-image img {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: var(--detail-image-height);
    height: auto;
    margin-inline: auto;
    object-fit: contain;
}

.image-placeholder {
    min-height: var(--detail-image-height);
    display: grid;
    place-items: center;
    color: var(--muted);
    font-size: 0.9rem;
}

.card-text {
    padding: 12px 0 0;
}

.card-text p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.detail-layout {
    --detail-image-height: 520px;
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
    gap: 56px;
    align-items: start;
}

.detail-layout.has-gallery-controls {
    --detail-image-height: clamp(420px, 64vh, 620px);
}

.detail-gallery {
    min-width: 0;
}

.detail-gallery.has-gallery-controls {
    padding-inline: clamp(42px, 4vw, 54px);
}

.detail-image {
    position: relative;
    overflow: hidden;
}

.detail-gallery.has-gallery-controls .detail-image {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
}

.detail-image .detail-gallery-image {
    display: none;
}

.detail-gallery.has-gallery-controls .detail-gallery-image {
    position: static;
    width: auto;
    max-width: 100%;
    max-height: var(--detail-image-height);
    height: auto;
    object-fit: contain;
}

.detail-image .detail-gallery-image.is-active {
    display: block;
}

.gallery-arrow {
    position: absolute;
    top: 50%;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgb(255 255 255 / 86%);
    color: var(--text);
    font: inherit;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    transform: translateY(-50%);
}

.gallery-arrow:hover,
.gallery-arrow:focus-visible,
.thumbnail-button:hover,
.thumbnail-button:focus-visible {
    border-color: var(--text);
}

.gallery-arrow:focus-visible,
.thumbnail-button:focus-visible {
    outline: 2px solid var(--text);
    outline-offset: 3px;
}

.gallery-arrow span {
    margin-top: -3px;
}

.gallery-arrow-previous {
    left: -52px;
}

.gallery-arrow-next {
    right: -52px;
}

.detail-thumbnails {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
}

.thumbnail-button {
    height: 86px;
    padding: 0;
    border: 1px solid var(--line);
    background: var(--bg);
    cursor: pointer;
    line-height: 0;
}

.thumbnail-button.is-active {
    display: none;
}

.thumbnail-button img {
    display: block;
    max-width: none;
    width: auto;
    height: 100%;
    object-fit: contain;
}

.detail-content {
    padding-top: 12px;
}

.detail-content h1 {
    font-size: 1.55rem;
}

@media (min-width: 821px) {
    .detail-content {
        min-height: var(--detail-image-height);
        display: flex;
        flex-direction: column;
    }

    .detail-content .text-link {
        margin-top: auto;
        align-self: flex-start;
    }
}

.related-artworks {
    margin-top: 72px;
    padding-top: 28px;
    border-top: 1px solid var(--line);
}

.related-artworks-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.related-artworks-controls {
    display: flex;
    gap: 10px;
}

.related-artworks-controls.is-hidden {
    display: none;
}

.related-artworks-arrow {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--bg);
    color: var(--text);
    font: inherit;
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
}

.related-artworks-arrow:hover,
.related-artworks-arrow:focus-visible {
    border-color: var(--text);
}

.related-artworks-arrow:focus-visible {
    outline: 2px solid var(--text);
    outline-offset: 3px;
}

.related-artworks-arrow:disabled {
    color: var(--muted);
    cursor: default;
    opacity: 0.42;
}

.related-artworks-arrow:disabled:hover {
    border-color: var(--line);
}

.related-artworks-arrow span {
    margin-top: -3px;
}

.related-artworks-track {
    display: grid;
    grid-auto-columns: calc((100% - 72px) / 4);
    grid-auto-flow: column;
    gap: 24px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.related-artworks-track::-webkit-scrollbar {
    display: none;
}

.related-artworks-track .artwork-card {
    scroll-snap-align: start;
}

.exhibition-image-card {
    margin: 0;
}

.exhibition-image-button {
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: zoom-in;
    line-height: 0;
}

.exhibition-image-button:hover img,
.exhibition-image-button:focus-visible img {
    opacity: 0.82;
}

.exhibition-image-button:focus-visible {
    outline: 2px solid var(--text);
    outline-offset: 4px;
}

.exhibition-image-card img {
    position: static;
    width: 100%;
    height: auto;
    max-height: 340px;
    object-fit: contain;
    object-position: center;
    transition: opacity 160ms ease;
}

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

.image-lightbox {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: grid;
    place-items: center;
    padding: 72px 80px 44px;
    background: rgb(255 255 255 / 96%);
}

body.image-lightbox-is-open {
    overflow: hidden;
}

.image-lightbox-figure {
    margin: 0;
    max-width: min(1120px, 100%);
    max-height: 100%;
    display: grid;
    gap: 14px;
    justify-items: center;
}

.image-lightbox-figure img {
    max-width: 100%;
    max-height: calc(100vh - 150px);
    object-fit: contain;
}

.image-lightbox-figure figcaption {
    color: var(--muted);
    font-size: 0.88rem;
}

.image-lightbox-close,
.image-lightbox-arrow {
    position: fixed;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgb(255 255 255 / 90%);
    color: var(--text);
    font: inherit;
    line-height: 1;
    cursor: pointer;
}

.image-lightbox-close:hover,
.image-lightbox-close:focus-visible,
.image-lightbox-arrow:hover,
.image-lightbox-arrow:focus-visible {
    border-color: var(--text);
}

.image-lightbox-close:focus-visible,
.image-lightbox-arrow:focus-visible {
    outline: 2px solid var(--text);
    outline-offset: 3px;
}

.image-lightbox-close {
    top: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    font-size: 2rem;
}

.image-lightbox-close span {
    margin-top: -4px;
}

.image-lightbox-arrow {
    top: 50%;
    width: 48px;
    height: 48px;
    font-size: 2.2rem;
    transform: translateY(-50%);
}

.image-lightbox-arrow span {
    margin-top: -4px;
}

.image-lightbox-previous {
    left: 24px;
}

.image-lightbox-next {
    right: 24px;
}

.facts {
    display: grid;
    gap: 14px;
    margin: 28px 0;
}

.facts div {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.facts dt {
    color: var(--muted);
}

.facts dd {
    margin: 0;
    font-weight: 700;
}

.event-list {
    display: grid;
    gap: 14px;
}

.exhibition-section {
    margin-top: 42px;
}

.exhibition-section h2 {
    margin-bottom: 14px;
}

.event-item a {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    padding: 18px 0;
    border-top: 1px solid var(--line);
}

.event-item p,
.event-item time,
.empty-state,
.site-footer {
    color: var(--muted);
}

.event-item p {
    margin: 8px 0 0;
}

.event-item time {
    white-space: nowrap;
}

.empty-state {
    margin: 0;
    padding: 24px;
    border-top: 1px solid var(--line);
}

.site-footer {
    padding: 28px 0;
    font-size: 0.9rem;
}

@media (max-width: 820px) {
    .event-item a,
    .facts div {
        align-items: flex-start;
        flex-direction: column;
    }

    .site-header {
        align-items: center;
        padding: 28px 0 20px;
    }

    .site-name {
        font-size: 1.65rem;
    }

    h1 {
        font-size: 1.7rem;
    }

    .detail-content h1 {
        font-size: 1.42rem;
    }

    .menu-toggle {
        width: 52px;
        height: 52px;
        padding: 11px;
        margin-right: -12px;
    }

    .menu-toggle span {
        width: 29px;
        margin: 7px auto;
    }

    .menu-toggle,
    .menu-close {
        display: block;
    }

    .nav-backdrop {
        position: fixed;
        inset: 0;
        z-index: 20;
        display: block;
        background: rgb(22 22 22 / 24%);
        opacity: 0;
        pointer-events: none;
        transition: opacity 180ms ease;
    }

    body.menu-is-open .nav-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    .site-nav {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        z-index: 30;
        width: min(340px, 86vw);
        padding: 96px 28px 32px;
        display: flex;
        align-items: flex-start;
        justify-content: flex-start;
        flex-direction: column;
        gap: 22px;
        background: var(--surface);
        border-left: 1px solid var(--line);
        box-shadow: -18px 0 40px rgb(22 22 22 / 8%);
        font-size: 1.15rem;
        transform: translateX(100%);
        visibility: hidden;
        transition: transform 220ms ease, visibility 220ms ease;
    }

    .site-nav.is-open {
        transform: translateX(0);
        visibility: visible;
    }

    .site-nav a {
        width: 100%;
        padding: 2px 0 12px;
        border-bottom: 1px solid var(--line);
    }

    .link-grid,
    .detail-layout,
    .about-page,
    .umb-block-grid,
    .umb-block-grid__layout-container,
    .umb-block-grid__area-container,
    .umb-block-grid__area {
        grid-template-columns: 1fr;
    }

    .umb-block-grid__layout-item,
    .umb-block-grid__area {
        grid-column: span 1;
    }

    .about-page {
        gap: 28px;
    }

    .about-portrait img {
        max-height: none;
    }

    .gallery-artwork-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .related-artworks-track {
        grid-auto-columns: calc((100% - 24px) / 2);
    }

    .detail-layout.has-gallery-controls {
        --detail-image-height: clamp(320px, 62vh, 520px);
    }

    .gallery-arrow {
        width: 38px;
        height: 38px;
        font-size: 1.8rem;
    }

    .gallery-arrow-previous {
        left: -44px;
    }

    .gallery-arrow-next {
        right: -44px;
    }

    .event-item time {
        white-space: normal;
    }

    .image-lightbox {
        padding: 72px 18px 38px;
    }

    .image-lightbox-figure img {
        max-height: calc(100vh - 170px);
    }

    .image-lightbox-arrow {
        top: auto;
        bottom: 18px;
        width: 42px;
        height: 42px;
        font-size: 2rem;
        transform: none;
    }

    .image-lightbox-previous {
        left: calc(50% - 56px);
    }

    .image-lightbox-next {
        right: calc(50% - 56px);
    }
}

@media (max-width: 520px) {
    .gallery-artwork-grid {
        grid-template-columns: 1fr;
    }

    .related-artworks-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
    }

    .related-artworks-track {
        grid-auto-columns: 82%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .exhibition-image-card img {
        transition: none;
    }
}
