:root {
  color-scheme: light;
  --paper: #f8f8f4;
  --ink: #171814;
  --muted: #545650;
  --line: #cecec6;
  --accent: #d5f950;
  --night: #101424;
  --gutter: clamp(1.15rem, 4.1vw, 4.5rem);
  --sans: "Inter", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", "Hiragino Sans GB", sans-serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  --serif: "Iowan Old Style", Baskerville, "Times New Roman", serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 6rem; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 1rem/1.65 var(--sans); -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
button { color: inherit; cursor: pointer; }
button:disabled { cursor: default; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3, p, figure { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid #4a52d1; outline-offset: 4px; }
::selection { background: var(--accent); color: var(--ink); }
.wrap { width: min(calc(100% - var(--gutter) * 2), 1376px); margin-inline: auto; }
.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link:focus { position: fixed; z-index: 10; inset: .5rem auto auto .5rem; padding: .55rem 1rem; color: var(--ink); background: var(--accent); }

.site-header { position: sticky; top: 0; z-index: 5; background: var(--paper); border-bottom: 1px solid var(--line); }
.header-inner { min-height: 74px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1.5rem; }
.wordmark { display: inline-block; width: fit-content; font: 800 2.85rem/.85 Arial, Helvetica, sans-serif; letter-spacing: -.105em; }
.wordmark span { color: #537100; margin-left: .04em; }
.site-nav { display: flex; align-items: center; align-self: stretch; gap: clamp(1.3rem, 3.2vw, 3.3rem); }
.site-nav a { position: relative; display: grid; place-items: center; font-size: .94rem; font-weight: 600; white-space: nowrap; }
.site-nav a::after { content: ""; position: absolute; inset: auto 0 0; height: 3px; background: transparent; }
.site-nav a:hover::after, .site-nav a[aria-current]::after { background: var(--ink); }
.header-actions { justify-self: end; display: flex; gap: .55rem; align-items: center; }
.language-switch { display: flex; align-items: center; flex-shrink: 0; border: 1px solid var(--line); }
.language-switch button { min-width: 39px; min-height: 40px; padding: 0 .35rem; border: 0; background: transparent; font-size: .875rem; font-weight: 650; white-space: nowrap; }
.language-switch button + button { border-left: 1px solid var(--line); }
.language-switch button:hover { background: #e9eae2; }
.language-switch button[aria-pressed="true"] { background: var(--accent); }
.search-trigger, .menu-trigger { display: flex; min-height: 42px; align-items: center; justify-content: center; gap: .7rem; padding: 0 .9rem; border: 1px solid var(--line); background: transparent; font-size: .875rem; font-weight: 600; }
.search-trigger:hover, .menu-trigger:hover { border-color: var(--ink); }
.search-icon { position: relative; flex: 0 0 14px; display: inline-block; width: 14px; height: 14px; border: 1.55px solid currentColor; border-radius: 50%; line-height: 1; }
.search-icon::after { content: ""; position: absolute; width: 7px; height: 1.5px; background: currentColor; transform: rotate(46deg); transform-origin: left center; left: 10px; top: 10px; }
.menu-trigger { display: none; width: 42px; padding: 0; }
.menu-trigger span { display: block; width: 17px; height: 1px; background: currentColor; transition: transform 160ms ease; }
.menu-trigger[aria-expanded="true"] span:first-child { transform: translateY(3px) rotate(45deg); }
.menu-trigger[aria-expanded="true"] span:last-child { transform: translateY(-3px) rotate(-45deg); }

.intro { padding-top: clamp(1rem, 2.5vw, 2rem); }
.feature { display: grid; grid-template-columns: minmax(335px, 34.5%) minmax(0, 1fr); min-height: clamp(410px, 33vw, 495px); background: var(--night); color: var(--paper); }
.feature-copy { z-index: 1; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: clamp(1.85rem, 3.25vw, 3.3rem); }
.feature h1 { font-size: clamp(3.125rem, 5.1vw, 5rem); font-weight: 800; letter-spacing: -.065em; line-height: 1.07; }
html[lang="en"] .feature h1 { font-size: clamp(2.25rem, 4.25vw, 4rem); letter-spacing: -.06em; }
.feature-title-link:hover { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: .06em; text-underline-offset: .15em; }
.feature-title-link:focus-visible { outline-color: var(--accent); }
.feature-picture { position: relative; min-height: 100%; overflow: hidden; }
.feature-picture img { position: absolute; width: 100%; height: 100%; object-fit: cover; object-position: 54% 56%; }

.programme { padding-block: clamp(2.5rem, 4.1vw, 4.75rem) clamp(3.8rem, 7vw, 7.1rem); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.2rem; border-bottom: 1px solid var(--ink); padding-bottom: 1.05rem; }
.section-kicker { margin-bottom: .45rem; font: .75rem/1 var(--mono); letter-spacing: .075em; }
.section-head h2 { font-size: clamp(2.25rem, 4vw, 3.4rem); font-weight: 800; line-height: 1.1; letter-spacing: -.075em; }

.filters { display: flex; justify-content: space-between; align-items: center; gap: .75rem; min-height: 67px; }
.status-filters, .filter-end { display: flex; align-items: center; gap: .5rem; }
.status-filters button { min-height: 41px; background: transparent; border: 1px solid transparent; padding: .35rem clamp(.65rem, 1.25vw, 1.25rem); font-size: .875rem; font-weight: 600; white-space: nowrap; }
.status-filters button:hover { border-color: var(--line); }
.status-filters button.is-active { background: var(--accent); border-color: var(--accent); }
.event-count { font-size: .8125rem; color: var(--muted); padding-right: .45rem; white-space: nowrap; }
.city-control { position: relative; display: flex; }
.city-control::after { content: ""; pointer-events: none; position: absolute; right: .9rem; top: 44%; width: .4rem; height: .4rem; border: solid currentColor; border-width: 0 1px 1px 0; transform: rotate(45deg); }
.city-control select { appearance: none; min-width: 112px; min-height: 41px; padding: .3rem 2rem .3rem .75rem; border: 1px solid var(--line); border-radius: 0; background: var(--paper); color: var(--ink); cursor: pointer; font-size: .875rem; }
.city-control select:hover { border-color: var(--ink); }

.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.6rem clamp(.875rem, 1.7vw, 1.7rem); }
.card-image { display: block; width: 100%; padding: 0; border: 0; background: #e9e9e2; aspect-ratio: 1.55; overflow: hidden; }
.card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 250ms ease; }
.card-image:hover img, .card-image:focus-visible img { transform: scale(1.035); }
.card-meta { display: flex; justify-content: space-between; align-items: center; gap: .5rem; min-height: 2rem; margin-top: .7rem; color: var(--muted); font-size: .8125rem; }
.card-meta time { font-family: var(--mono); font-size: .75rem; }
.card-kind { font-weight: 650; }
.status { display: inline-flex; align-items: center; gap: .35rem; }
.status::before { content: ""; width: .39rem; height: .39rem; background: #767773; border-radius: 50%; }
.status[data-event-status="current"]::before { background: #648526; }
.status[data-event-status="upcoming"]::before { background: #606ad6; }
.card-grid h3 { margin-block: .13rem .25rem; line-height: 1.25; }
.card-title { display: block; background: none; border: 0; padding: 0; text-align: left; font-size: clamp(1.35rem, 2.05vw, 1.85rem); line-height: 1.25; font-weight: 750; letter-spacing: -.025em; }
.card-title:hover { text-decoration: underline; text-underline-offset: .2em; text-decoration-thickness: 1px; }
.card-location, .card-intro { margin-top: .4rem; font-size: .94rem; color: var(--muted); }
.card-date { margin-top: .16rem; color: var(--muted); font: .8125rem/1.5 var(--mono); }
.empty-events { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.4rem; border: 1px solid var(--line); }
.empty-events button { background: var(--accent); border: none; padding: .45rem .9rem; }

.journal { background: #e9eae2; padding-block: clamp(2.6rem, 4.9vw, 5.1rem) clamp(3.5rem, 6vw, 6rem); }
.journal .card-grid { margin-top: 1.3rem; }
.story-card .card-image { aspect-ratio: 1.64; background: #dcded0; }
.story-card .card-image img { object-position: center 47%; }
.story-card .card-intro { max-width: 29rem; }

.footer { background: #1e2019; color: #f4f4ed; }
.footer-top { padding-block: clamp(2.5rem, 5vw, 5rem); display: grid; grid-template-columns: 1.05fr .95fr auto; align-items: center; gap: 2rem; }
.footer-wordmark { font-size: clamp(3.75rem, 8vw, 7rem); }
.footer-wordmark span { color: var(--accent); }
.footer h2 { font-size: 1.15rem; margin-bottom: .4rem; }
.footer-about p, .footer-bottom { color: #c2c6b9; }
.footer-nav { display: grid; gap: .35rem; white-space: nowrap; }
.footer-nav a:hover { color: var(--accent); }
.footer-bottom { display: flex; justify-content: space-between; gap: .7rem 1rem; padding-block: 1rem; border-top: 1px solid #55594e; font-size: .8125rem; }

body:has(dialog[open]) { overflow: hidden; }
.dialog { padding: 0; border: 1px solid var(--ink); border-radius: 0; background: var(--paper); color: var(--ink); width: min(856px, calc(100% - 2rem)); max-height: min(90dvh, 920px); overscroll-behavior: contain; }
.dialog::backdrop { background: #101215b5; }
.dialog-panel { position: relative; }
.close-dialog { display: grid; place-items: center; position: absolute; z-index: 2; top: .9rem; right: .9rem; width: 43px; height: 43px; background: var(--paper); border: 1px solid var(--line); }
.close-dialog::before, .close-dialog::after { content: ""; position: absolute; width: 16px; height: 1px; background: currentColor; transform: rotate(45deg); }
.close-dialog::after { transform: rotate(-45deg); }
.close-dialog:hover { background: var(--accent); border-color: var(--accent); }
.detail-image { width: 100%; max-height: 390px; height: auto; aspect-ratio: 2; object-fit: cover; }
.detail-text { width: min(100%, 740px); margin-inline: auto; padding: clamp(1.25rem, 4.2vw, 3.25rem); }
.detail-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1rem; color: var(--muted); font-size: .875rem; }
.detail-kind { padding: .12rem .45rem; background: var(--accent); color: var(--ink); }
.detail-date { font-family: var(--mono); font-size: .8125rem; }
.detail-text h2 { margin-top: .6rem; font-size: clamp(2rem, 4.5vw, 3.5rem); line-height: 1.13; letter-spacing: -.04em; }
.detail-english { margin-top: .45rem; color: var(--muted); font: italic 1.45rem/1.4 var(--serif); }
.detail-intro { padding-block: 1.2rem; border-bottom: 1px solid var(--line); font-weight: 700; }
.detail-body { margin-top: 1rem; }
.detail-body p + p { margin-top: 1rem; }

.search-dialog { width: min(620px, calc(100% - 2rem)); }
.search-dialog .dialog-panel { padding: clamp(1.1rem, 4vw, 2.1rem); }
.search-dialog h2 { font-size: 2rem; line-height: 1.1; margin: .28rem 3rem 1.2rem 0; }
.search-field { display: flex; align-items: center; gap: .85rem; padding-inline: .8rem; border: 1px solid var(--line); background: #fff; }
.search-field:focus-within { border-color: var(--ink); }
.search-field input { width: 100%; min-width: 0; min-height: 49px; padding: .4rem 0; border: 0; background: transparent; color: var(--ink); }
.search-field input:focus { outline: 0; }
.search-result { display: flex; flex-direction: column; align-items: flex-start; gap: .25rem; width: 100%; min-height: 55px; border: 0; border-bottom: 1px solid var(--line); padding: .55rem 0; background: transparent; text-align: left; }
.search-result:first-child { margin-top: .65rem; }
.search-result:hover .search-result-title { text-decoration: underline; text-underline-offset: .2em; }
.search-result-title { font-weight: 700; }
.search-result-meta, .search-message { color: var(--muted); font-size: .875rem; }
.search-message { margin-top: 1.15rem; }

@media (max-width: 850px) {
  html { scroll-padding-top: 5rem; }
  .header-inner { min-height: 63px; grid-template-columns: 1fr auto; gap: .6rem; }
  .wordmark { font-size: 2.6rem; }
  .header-actions { grid-column: 2; }
  .search-trigger { width: 42px; padding: 0; }
  .search-trigger span { display: none; }
  .menu-trigger { display: flex; flex-direction: column; gap: 5px; }
  .site-nav { position: absolute; inset: 100% 0 auto; display: none; align-items: stretch; flex-direction: column; gap: 0; background: var(--paper); border-block: 1px solid var(--line); padding: .4rem var(--gutter) .7rem; }
  .site-nav.is-open { display: flex; }
  .site-nav a { place-items: center start; min-height: 46px; border-bottom: 1px solid var(--line); }
  .site-nav a:last-child { border-bottom: 0; }
  .site-nav a::after { inset: 10px auto 10px -10px; width: 3px; height: auto; }
}

@media (max-width: 720px) {
  .feature { grid-template-columns: 1fr; min-height: 0; }
  .feature-copy { padding: 1.4rem 1.45rem 1.7rem; }
  .feature-picture { grid-row: 1; aspect-ratio: 1.53; }
  .section-head { padding-bottom: .8rem; }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.65rem .85rem; }
  .filters { flex-wrap: wrap; gap: .4rem 1rem; padding-block: .65rem; }
  .status-filters { gap: .25rem; justify-content: flex-start; }
  .status-filters button { padding-inline: .65rem; }
  .filter-end { margin-left: auto; }
  .card-meta, .card-meta time, .card-date { font-size: .75rem; }
  .card-location, .card-intro { font-size: .875rem; }
  .footer-top { grid-template-columns: 1fr auto; gap: 1.2rem 1rem; }
  .footer-wordmark { font-size: 4.15rem; grid-column: 1 / -1; }
  .footer-about p { max-width: 29ch; }
  .footer-nav { align-self: end; font-size: .875rem; }
  .footer-bottom { flex-wrap: wrap; }
}

@media (max-width: 420px) {
  .card-grid { grid-template-columns: 1fr; }
  .status-filters, .filter-end { width: 100%; }
  .filter-end { justify-content: space-between; }
  .card-image { aspect-ratio: 1.72; }
}

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

.wordmark { width: 123px; }
.wordmark img { width: 100%; height: auto; }
.footer-wordmark { width: clamp(10rem, 22vw, 19rem); }
.footer-wordmark img { filter: invert(1); }

.feature-picture { display: grid; grid-template-rows: minmax(0, 1fr) auto; background: #171c2a; }
.feature-picture img { position: static; min-height: 0; object-fit: contain; }
.image-credit { padding: .42rem 0 0; color: var(--muted); font-size: .75rem; line-height: 1.5; overflow-wrap: anywhere; }
.feature-picture .image-credit { padding: .55rem .8rem; color: #dedfea; background: #171c2a; }
.exhibition-photo .card-image { background: #e9e9e2; }
.exhibition-photo .card-image img { object-fit: contain; transition: none; }
.exhibition-photo .card-image:hover img, .exhibition-photo .card-image:focus-visible img { transform: none; }
.card-text-cover { aspect-ratio: 1.55; display: grid; align-content: space-between; justify-items: start; gap: .65rem; padding: clamp(.95rem, 2.4vw, 1.85rem); background: #e5e8dc; color: #303728; overflow: hidden; }
.card-cover-city { color: #3e4935; font-size: .875rem; }
.card-cover-title { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 3; font: clamp(1.15rem, 2.1vw, 2.15rem)/1.03 var(--serif); }
.results-more { display: flex; justify-content: center; }
#load-more { min-height: 44px; margin-top: 2rem; padding: .55rem 1.2rem; border: 1px solid var(--ink); background: transparent; font-weight: 650; }
#load-more:hover, .official-link:hover { background: var(--accent); }
.detail-figure { background: #e9e9e2; }
.detail-figure .detail-image { object-fit: contain; }
.detail-figure .image-credit { padding: .55rem 1rem; }
.official-link { display: inline-flex; align-items: center; min-height: 44px; margin-top: 1rem; padding: .4rem .8rem; border: 1px solid var(--ink); font-size: .925rem; font-weight: 650; }
.filter-end .city-control select { min-width: 0; width: 100%; }

@media (max-width: 830px) {
  .filters { flex-wrap: wrap; padding-block: .55rem; }
}

@media (max-width: 720px) {
  .wordmark { width: 105px; }
  .footer-wordmark { width: 184px; }
  .feature h1 { font-size: clamp(2.4rem, 8vw, 3.25rem); }
  .feature-picture { aspect-ratio: 1.45; min-height: 0; }
  .feature-picture img { object-position: center; }
}

@media (max-width: 420px) {
  .card-text-cover { aspect-ratio: 1.72; }
  .filter-end { flex-wrap: wrap; justify-content: flex-start; }
  .event-count { order: 3; margin-left: auto; padding-right: 0; }
  .status-filters { flex-wrap: wrap; }
}

@media (max-width: 345px) {
  .site-header .wordmark { width: 90px; }
  .header-actions { gap: .4rem; }
}

.detail-dialog .dialog-content > .detail-text { padding-top: max(3.75rem, 4.2vw); }

.image-rights { padding-bottom: 1rem; color: #c2c6b9; font-size: .8125rem; }
.image-rights summary { cursor: pointer; width: fit-content; }
.image-rights a { text-decoration: underline; text-underline-offset: .15em; }

.detail-body h3 { margin-block: 1.9rem .6rem; font-size: 1.3rem; }
.detail-body .article-figure { margin-block: 1.6rem; }
.detail-body .article-figure img { width: 100%; height: auto; }
.detail-dialog .detail-image[src$="akhavan-cover.webp"] { aspect-ratio: 3 / 2; }
.story-card .card-image img[src$="akhavan-cover.webp"] { object-fit: contain; background: #eeeee9; }

.feature-copy h1 { font-size: 1rem; letter-spacing: 0; margin-bottom: 1.25rem; }
html[lang="en"] .feature-copy h1 { font-size: 1rem; letter-spacing: 0; }
#featured-exhibition h2 { font-size: clamp(1.8rem, 3.2vw, 3.3rem); line-height: 1.15; overflow-wrap: anywhere; }
.featured-city { margin-top: .9rem; }
.featured-date, .featured-position { margin-top: .55rem; font: .82rem/1.55 var(--mono); color: #c2c6d0; }
.feature-picture { grid-template-rows: minmax(0, 1fr) auto; }
.featured-image { min-height: 0; }
.featured-footer { display: flex; align-items: center; gap: .65rem; justify-content: space-between; padding: .55rem .8rem; }
.featured-footer .image-credit { padding: 0; }
.featured-detail, .featured-arrows button { min-height: 44px; border: 0; font-weight: 650; }
.featured-detail { padding: .4rem .8rem; white-space: nowrap; background: var(--accent); color: var(--ink); flex-shrink: 0; }
.featured-arrows { position: absolute; inset: 0 .7rem; display: flex; align-items: center; justify-content: space-between; pointer-events: none; }
.featured-arrows button { pointer-events: auto; width: 44px; background: var(--paper); color: var(--ink); font-size: 1.7rem; line-height: 1; }
.featured-arrows button:hover { background: var(--accent); }
@media (max-width: 720px) {
  .feature-picture { aspect-ratio: auto; }
  .featured-image { aspect-ratio: 1.55; }
}

#detail-title:focus { outline: none; }
.featured-detail { display: inline-flex; align-items: center; }
.article-page { width: min(calc(100% - var(--gutter) * 2), 1020px); padding-block: 2rem 4rem; }
.article-back { display: inline-block; margin-bottom: 1.25rem; text-decoration: underline; text-underline-offset: .2em; }
.article-page #article-title { font-size: clamp(2rem, 4.5vw, 3.5rem); line-height: 1.13; margin-top: .6rem; }
.article-page .detail-image { max-height: 520px; }
