:root {
    color-scheme: light;
    --paper: #fff;
    --ink: #111;
    --muted: #626262;
    --line: #d5d5d5;
    --quiet: #f2f2f2;
    --panel-bg: #111;
    --panel-fg: #fff;
    --panel-muted: #bcbcbc;
    --panel-line: #555;
    --footer-bg: #111;
    --footer-fg: #fff;
    --footer-muted: #bcbcbc;
    --footer-line: #555;
    --margin: clamp(20px, 5.5vw, 96px)
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --paper: #303030;
    --ink: #f5f5f5;
    --muted: #c7c7c7;
    --line: #777;
    --quiet: #3b3b3b;
    --panel-bg: #242424;
    --panel-fg: #fff;
    --panel-muted: #d0d0d0;
    --panel-line: #777;
    --footer-bg: #242424;
    --footer-fg: #fff;
    --footer-muted: #d0d0d0;
    --footer-line: #777
}

*,
*::before,
*::after {
    box-sizing: border-box
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font: 400 16px/1.55 Inter, Arial, sans-serif
}

body.menu-open {
    overflow: hidden
}

img {
    display: block;
    max-width: 100%
}

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

button {
    font: inherit
}

h1,
h2,
h3,
p,
figure,
dl {
    margin: 0
}

ul {
    list-style: none;
    margin: 0;
    padding: 0
}

:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 4px
}

.skip {
    position: absolute;
    z-index: 100;
    top: -100px;
    left: var(--margin);
    padding: 12px 18px;
    background: var(--ink);
    color: var(--paper)
}

.skip:focus {
    top: 12px
}

.wrap {
    margin-inline: var(--margin)
}

.eyebrow,
.kicker,
.meta-term,
.card__note,
.footer__label {
    font-size: 11px;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: .12em;
    text-transform: uppercase
}

.eyebrow,
.kicker,
.meta-term,
.card__note,
.footer__label,
.muted {
    color: var(--muted)
}

.site-header {
    height: 84px;
    border-bottom: 1px solid var(--ink);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-inline: var(--margin);
    background: var(--paper);
    position: relative;
    z-index: 20
}

.brand {
    font-size: 20px;
    font-weight: 650;
    letter-spacing: -.055em;
    white-space: nowrap
}

.brand span {
    font-weight: 400
}

.header-actions {
    display: flex;
    align-items: center;
    gap: clamp(14px, 3vw, 36px)
}

.theme-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    background: none;
    border: 0;
    color: var(--ink);
    cursor: pointer;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .12em;
    white-space: nowrap
}

.theme-toggle::before {
    content: "";
    width: 15px;
    height: 15px;
    border: 1px solid currentColor;
    border-radius: 50%;
    background: linear-gradient(90deg, currentColor 50%, transparent 50%)
}

.theme-toggle:hover,
.menu-button:hover {
    text-decoration: underline;
    text-underline-offset: 5px
}

.menu-button {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 13px 0 13px 15px;
    background: none;
    border: 0;
    cursor: pointer;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .12em
}

.menu-icon {
    width: 29px;
    height: 17px;
    display: flex;
    flex-direction: column;
    justify-content: space-between
}

.menu-icon::before,
.menu-icon::after {
    content: "";
    height: 1px;
    background: currentColor;
    display: block;
    width: 100%
}

.menu-backdrop[hidden],
.menu-panel[hidden] {
    display: none
}

.menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: 30;
    background: rgba(0, 0, 0, .45)
}

.menu-panel {
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    width: min(520px, 100%);
    background: var(--panel-bg);
    color: var(--panel-fg);
    z-index: 31;
    display: flex;
    flex-direction: column;
    padding: 32px clamp(24px, 5vw, 64px) 38px;
    animation: enter .32s ease both
}

.menu-panel__top {
    display: flex;
    justify-content: space-between;
    align-items: center
}

.menu-panel__top .eyebrow {
    color: var(--panel-muted)
}

.menu-close {
    border: 0;
    background: none;
    color: inherit;
    cursor: pointer;
    font-size: 28px;
    line-height: 1;
    padding: 6px
}

.menu-links {
    margin: auto 0;
    display: grid;
    gap: 18px
}

.menu-links a {
    font-size: clamp(36px, 5vw, 60px);
    line-height: 1.08;
    letter-spacing: -.065em;
    font-weight: 500;
    display: inline-block
}

.menu-links a:hover {
    text-decoration: underline;
    text-underline-offset: 8px
}

.menu-panel__bottom {
    border-top: 1px solid var(--panel-line);
    padding-top: 20px;
    color: var(--panel-muted);
    font-size: 13px
}

@keyframes enter {
    from {
        transform: translateX(100%)
    }

    to {
        transform: translateX(0)
    }
}

.page-intro {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 20px;
    align-items: end;
    padding-block: clamp(62px, 10vw, 150px) clamp(48px, 7vw, 100px)
}

.page-intro h1 {
    font-size: clamp(52px, 10vw, 160px);
    line-height: .88;
    font-weight: 500;
    letter-spacing: -.09em;
    max-width: 1000px;
    margin-top: 23px
}

.page-intro__aside {
    text-align: right;
    font-size: 12px;
    max-width: 140px;
    line-height: 1.45
}

.page-intro__aside span {
    display: block;
    font-size: clamp(52px, 8vw, 120px);
    letter-spacing: -.085em;
    line-height: 1
}

.section {
    padding: clamp(62px, 8vw, 126px) 0
}

.section+.section {
    border-top: 1px solid var(--line)
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: start;
    border-top: 1px solid var(--ink);
    padding-top: 15px;
    margin-bottom: 38px;
    gap: 20px
}

.section-head h2 {
    font-size: clamp(30px, 4vw, 58px);
    letter-spacing: -.065em;
    line-height: 1.08;
    font-weight: 500
}

.section-head small {
    font-size: 12px;
    color: var(--muted);
    padding-top: 7px
}

.exhibitions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(24px, 3.5vw, 56px)
}

.card {
    min-width: 0
}

.card__image {
    display: block;
    /* Вертикальный кадр формата A (210×297) — под печатные афиши. */
    aspect-ratio: 210/297;
    overflow: hidden;
    background: var(--quiet)
}

.card__image img {
    width: 100%;
    height: 100%;
    object-fit: contain
}

.card__info {
    border-top: 1px solid var(--ink);
    margin-top: 19px;
    padding-top: 14px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px
}

.card h3 {
    font-size: clamp(23px, 2.5vw, 38px);
    font-weight: 500;
    line-height: 1.13;
    letter-spacing: -.055em
}

.card h3 a:hover,
.work-card h3 a:hover {
    text-decoration: underline;
    text-underline-offset: 5px
}

.card__number {
    font-size: 12px;
    color: var(--muted)
}

.card__details {
    grid-column: 1/-1;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6
}

.card__details span {
    display: block
}

.card__note {
    grid-column: 1/-1;
    margin-top: 7px
}

.poster {
    width: 100%;
    height: auto;
    background: var(--quiet)
}

.exhibition-hero {
    padding-block: 62px 110px
}

.exhibition-hero__top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 200px;
    align-items: end;
    gap: 30px
}

.exhibition-hero h1 {
    font-size: clamp(52px, 9vw, 136px);
    line-height: .92;
    font-weight: 500;
    letter-spacing: -.085em;
    margin: 20px 0 28px
}

.exhibition-hero__index {
    font-size: clamp(75px, 13vw, 200px);
    font-weight: 400;
    letter-spacing: -.12em;
    line-height: .8;
    text-align: right
}

.exhibition-detail {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
    gap: clamp(40px, 10vw, 160px);
    border-top: 1px solid var(--ink);
    padding-top: 23px
}

.exhibition-detail__meta {
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr);
    row-gap: 13px;
    font-size: 14px
}

.exhibition-detail__copy {
    font-size: clamp(17px, 1.65vw, 23px);
    line-height: 1.5;
    letter-spacing: -.025em
}

.works {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(30px, 3vw, 48px) clamp(20px, 2.5vw, 40px)
}

/* Views html_list wrapper: keep the existing card grid instead of nesting
   an unstyled ul inside the grid. */
.exhibition-works__list > .works,
.artist-works__list > .works {
    display: contents;
}

.exhibition-works__list > .works > ul,
.artist-works__list > .works > ul {
    display: contents;
    list-style: none;
    margin: 0;
    padding: 0;
}

.exhibition-works__list > .works > ul > li,
.artist-works__list > .works > ul > li {
    min-width: 0;
}

.work-card {
    min-width: 0
}

.work-card>a:first-child {
    display: grid;
    place-items: center;
    aspect-ratio: 4/5;
    background: var(--quiet)
}

.work-card img {
    width: 100%;
    height: 100%;
    object-fit: contain
}

.work-card__info {
    border-top: 1px solid var(--ink);
    padding-top: 12px;
    margin-top: 15px
}

.work-card h3 {
    font-size: clamp(20px, 2vw, 28px);
    font-weight: 500;
    letter-spacing: -.05em;
    line-height: 1.18
}

.work-card p {
    font-size: 13px;
    color: var(--muted);
    margin-top: 5px
}

.work-card p a {
    text-decoration: underline;
    text-underline-offset: 3px
}

.read-more {
    display: inline-block;
    margin-top: 20px;
    text-decoration: underline;
    text-underline-offset: 5px;
    font-size: 14px
}

.story {
    display: grid;
    grid-template-columns: minmax(160px, .55fr) minmax(0, 1.45fr);
    gap: clamp(28px, 7vw, 120px);
    border-top: 1px solid var(--ink);
    padding-top: 20px
}

.story__text {
    max-width: 770px;
    font-size: clamp(17px, 1.7vw, 23px);
    line-height: 1.65
}

.story__text p+p {
    margin-top: 1.3em
}

.work-page .work-entry {
    display: none
}

.work-page .work-entry:target {
    display: block
}

.work-page:not(:has(.work-entry:target)) #work-1 {
    display: block
}

.work-entry {
    padding-block: 68px 130px
}

.work-entry__top {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: end;
    margin-bottom: 42px
}

.work-entry__top h1 {
    font-size: clamp(48px, 7vw, 106px);
    letter-spacing: -.08em;
    font-weight: 500;
    line-height: 1;
    margin-top: 10px
}

.work-entry__number {
    font-size: clamp(70px, 11vw, 150px);
    letter-spacing: -.12em;
    line-height: .8
}

.work-entry__body {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(270px, .65fr);
    gap: clamp(35px, 6vw, 100px);
    align-items: start
}

.gallery {
    min-width: 0
}

.gallery__frame {
    height: min(72vw, max(160px, calc(100svh - 180px)));
    background: var(--quiet);
    display: flex;
    align-items: center;
    justify-content: center
}

.gallery__frame img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain
}

.gallery__frame img[hidden] {
    display: none
}

.gallery__controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    border-top: 1px solid var(--ink);
    padding-top: 13px;
    margin-top: 12px
}

.gallery__controls button {
    border: 0;
    background: none;
    cursor: pointer;
    padding: 9px 0;
    font-size: 13px
}

.gallery__controls button:hover {
    text-decoration: underline
}

.gallery__counter {
    font-size: 12px;
    color: var(--muted)
}

.art-meta {
    border-top: 1px solid var(--ink)
}

.art-meta__row {
    display: grid;
    grid-template-columns: 95px minmax(0, 1fr);
    gap: 10px;
    padding-block: 17px;
    border-bottom: 1px solid var(--line);
    font-size: 14px
}

.art-meta dd {
    margin: 0
}

.art-meta dd a {
    text-decoration: underline;
    text-underline-offset: 3px
}

.work-entry__description {
    margin: 28px 0 0;
    font-size: 16px;
    line-height: 1.65
}

.purchase {
    margin-top: 35px;
    border-top: 1px solid var(--ink);
    padding-top: 18px;
    font-size: 14px
}

.purchase h2 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px
}

.purchase a {
    text-decoration: underline;
    text-underline-offset: 3px;
    font-size: 20px;
    display: inline-block;
    margin-top: 12px
}

.work-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    border-top: 1px solid var(--ink);
    padding-top: 16px;
    margin-top: 90px
}

.work-nav__item:last-child {
    text-align: right
}

.work-nav__item span {
    display: block
}

.work-nav__item a {
    display: inline-block;
    font-size: clamp(21px, 3vw, 36px);
    font-weight: 500;
    line-height: 1.12;
    letter-spacing: -.06em;
    margin-top: 10px
}

.work-nav__item a:hover {
    text-decoration: underline;
    text-underline-offset: 5px
}

.artist-hero {
    display: grid;
    grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr);
    gap: clamp(38px, 7vw, 120px);
    padding-block: 80px 120px
}

.artist-hero__portrait {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: contain;
    background: var(--quiet)
}

.artist-hero__body h1 {
    font-size: clamp(50px, 7vw, 102px);
    line-height: .96;
    font-weight: 500;
    letter-spacing: -.08em;
    margin: 20px 0 55px
}

.artist-hero__columns {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    gap: clamp(25px, 4vw, 65px);
    border-top: 1px solid var(--ink);
    padding-top: 18px
}

.artist-hero__bio {
    font-size: clamp(16px, 1.6vw, 21px);
    line-height: 1.55
}

.artist-hero__participation ul {
    margin-top: 19px
}

.artist-hero__participation a {
    display: block;
    padding-block: 10px;
    border-bottom: 1px solid var(--line);
    text-decoration: underline;
    text-underline-offset: 3px
}

.artist-hero__bio p+p {
    margin-top: 1.2em
}

.artist-hero__bio details {
    margin-top: 1.2em
}

.artist-hero__bio summary {
    cursor: pointer;
    display: inline-block;
    list-style: none;
    text-decoration: underline;
    text-underline-offset: 5px;
    font-size: 14px;
    font-weight: 500
}

.artist-hero__bio summary::-webkit-details-marker {
    display: none
}

.artist-hero__bio details[open] summary {
    margin-top: 1.2em
}

.artist-hero__bio summary .expanded,
.artist-hero__bio details[open] summary .collapsed {
    display: none
}

.artist-hero__bio details[open] summary .expanded {
    display: inline
}

.footer {
    background: var(--footer-bg);
    color: var(--footer-fg);
    padding: clamp(40px, 6vw, 85px) var(--margin) 24px
}

.footer__top {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: end
}

.footer__label {
    color: var(--footer-muted)
}

.footer__title {
    /* Уменьшено с clamp(36px, 5vw, 74px) под длинную подпись. */
    font-size: clamp(28px, 3.6vw, 52px);
    font-weight: 500;
    letter-spacing: -.07em;
    line-height: 1.08;
    margin-top: 14px
}

.footer__contact {
    justify-self: end;
    font-size: 15px
}

.footer__contact a {
    display: block;
    text-decoration: underline;
    text-underline-offset: 4px;
    margin-top: 14px
}

.footer__bottom {
    border-top: 1px solid var(--footer-line);
    margin-top: 90px;
    padding-top: 18px;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    color: var(--footer-muted);
    font-size: 12px
}

@media(max-width:1000px) {
    .exhibition-detail {
        grid-template-columns: 1fr;
        gap: 34px
    }

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

    .artist-hero__columns {
        grid-template-columns: 1fr
    }

    .artist-hero__participation {
        margin-top: 20px
    }

    .work-entry__body {
        grid-template-columns: 1fr 300px;
        gap: 30px
    }
}

@media(max-width:700px) {
    .site-header {
        height: 68px
    }

    .brand {
        font-size: 18px
    }

    .menu-button {
        font-size: 0;
        gap: 0
    }

    .page-intro {
        grid-template-columns: 1fr;
        padding-block: 75px 65px
    }

    .page-intro__aside {
        display: none
    }

    .section {
        padding-block: 70px
    }

    .section-head {
        margin-bottom: 27px
    }

    .exhibitions {
        grid-template-columns: 1fr;
        gap: 45px
    }

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

    .work-card h3 {
        font-size: 19px
    }

    .exhibition-hero {
        padding-block: 40px 70px
    }

    .exhibition-hero__top {
        grid-template-columns: 1fr
    }

    .exhibition-hero__index {
        display: none
    }

    .exhibition-detail__meta {
        grid-template-columns: 110px 1fr
    }

    .story {
        grid-template-columns: 1fr;
        gap: 22px
    }

    .work-entry {
        padding-block: 50px 85px
    }

    .work-entry__body {
        grid-template-columns: 1fr
    }

    .gallery__frame {
        height: min(75svh, 650px);
        min-height: 250px
    }

    .work-entry__number {
        font-size: 65px
    }

    .work-nav {
        margin-top: 65px
    }

    .artist-hero {
        grid-template-columns: 1fr;
        padding-block: 50px 85px
    }

    .artist-hero__portrait {
        max-height: 500px;
        aspect-ratio: 1/1;
        object-position: center 35%
    }

    .artist-hero__body h1 {
        margin-bottom: 32px
    }

    .footer__top {
        grid-template-columns: 1fr
    }

    .footer__contact {
        justify-self: start
    }

    .footer__bottom {
        margin-top: 60px
    }
}

@media(max-width:390px) {
    .works {
        grid-template-columns: 1fr
    }

    .work-nav__item a {
        font-size: 19px
    }

    .art-meta__row {
        grid-template-columns: 88px 1fr
    }

    .page-intro h1 {
        font-size: 52px
    }
}

@media(max-width:700px) {
    .theme-toggle {
        font-size: 0;
        gap: 0
    }

    .theme-toggle::before {
        width: 20px;
        height: 20px
    }
}

@media(prefers-reduced-motion:reduce) {
    html {
        scroll-behavior: auto
    }

    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important
    }
}

.messages {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    padding: 30px;
    background-color: #e2fbef;
    margin-top: 30px;
}