:root {
  --paper: #f4f1eb;
  --paper-deep: #e9e3da;
  --ink: #252421;
  --muted: #706c64;
  --line: rgba(37, 36, 33, .16);
  --accent: #7c4432;
  --accent-soft: #c8a993;
  --night: #20211f;
  --night-soft: #2e302b;
  --font-display: 'Forum', serif;
  --font-body: 'Assistant', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
  --measure: min(92vw, 1380px);
  --reading: min(92vw, 820px);
  --radius: 1px;
}

html[data-theme="dark"], html.dark {
  --paper: #20211f;
  --paper-deep: #2b2c28;
  --ink: #f1ece4;
  --muted: #b8b1a7;
  --line: rgba(241, 236, 228, .19);
  --accent: #d09b77;
  --accent-soft: #674b3d;
  --night: #f1ece4;
  --night-soft: #ddd5c9;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--paper); }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font-body); font-size: 1rem; line-height: 1.55; overflow-x: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select { color: inherit; font: inherit; }
button { cursor: pointer; }

.site-header { width: var(--measure); margin: 0 auto; min-height: 6.75rem; display: flex; align-items: center; justify-content: space-between; gap: 2rem; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; }
.brand-mark { width: 2.65rem; height: 2.65rem; flex: 0 0 auto; }
.brand-name { font: 500 1.42rem/1 var(--font-display); letter-spacing: .02em; }
.site-nav { display: flex; align-items: center; gap: clamp(1rem, 2vw, 2.2rem); }
.site-nav a { font-size: .8rem; letter-spacing: .09em; text-decoration: none; text-transform: uppercase; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--accent); }
.header-actions { display: flex; align-items: center; gap: .65rem; margin-left: auto; }
[data-theme-toggle], .menu-toggle { min-width: 2.5rem; min-height: 2.5rem; padding: .45rem; border: 1px solid var(--line); background: transparent; display: inline-grid; place-items: center; }
[data-theme-toggle] { font-size: 1rem; }
.menu-toggle { display: none; }

.page-wrap { width: var(--measure); margin: 0 auto; }
.rail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 11rem; gap: clamp(1.5rem, 4vw, 4.5rem); align-items: start; padding: 4.5rem 0 6rem; }
.rail-layout:has([data-side-links][hidden]), .rail-layout:has([data-side-links]:empty) { grid-template-columns: minmax(0, 1fr); }
[data-side-links][hidden] { display: none; }
.side-links { position: sticky; top: 2rem; border-top: 1px solid var(--ink); padding-top: .85rem; }
.side-links h2 { margin: 0 0 1rem; font: 500 1.15rem/1.1 var(--font-display); }
.side-links ol { padding: 0; margin: 0; list-style: none; }
.side-links li { border-bottom: 1px solid var(--line); padding: .65rem 0; }
.side-links a { color: var(--muted); font-size: .8rem; text-decoration: none; }
.side-links a:hover { color: var(--accent); }

.eyebrow { margin: 0 0 1rem; color: var(--accent); font: 600 .7rem/1.2 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 500; line-height: .98; letter-spacing: -.015em; }
h1 { max-width: 14ch; margin: 0; font-size: clamp(3.3rem, 7vw, 7.2rem); }
h2 { margin: 0; font-size: clamp(2.3rem, 4vw, 4.5rem); }
h3 { margin: 0; font-size: clamp(1.65rem, 2.6vw, 2.5rem); }
p { max-width: 62ch; }
.intro { color: var(--muted); font-size: 1.08rem; line-height: 1.65; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 3.05rem; padding: .75rem 1.2rem; border: 1px solid var(--ink); text-decoration: none; font-size: .76rem; letter-spacing: .1em; text-transform: uppercase; transition: background .2s ease, color .2s ease; }
.button:hover, .button.primary { background: var(--ink); color: var(--paper); }
.button.secondary { border-color: var(--accent); color: var(--accent); }
.button.secondary:hover { background: var(--accent); color: var(--paper); }
.arrow-link { display: inline-flex; align-items: center; gap: .7rem; color: var(--accent); font-size: .8rem; letter-spacing: .09em; text-decoration: none; text-transform: uppercase; }
.arrow-link::after { content: '↗'; font-size: 1rem; }

.hero { position: relative; min-height: min(47rem, 76vh); margin-bottom: 7rem; display: grid; align-items: end; overflow: hidden; background: var(--night); color: #f6f1e9; }
.hero-slide { position: absolute; inset: 0; opacity: 0; pointer-events: none; transition: opacity .6s ease; }
.hero-slide.is-active { opacity: 1; pointer-events: auto; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hero-slide::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(19, 19, 17, .77), rgba(19, 19, 17, .16) 72%); }
.hero-caption { position: relative; z-index: 1; width: var(--measure); margin: 0 auto; padding: clamp(2rem, 6vw, 6rem) 0; }
.hero-caption h1 { max-width: 8.5ch; }
.hero-caption p { max-width: 32rem; margin: 1.5rem 0 2rem; color: rgba(246,241,233,.82); font-size: 1.12rem; }
.hero-caption .button { border-color: #f6f1e9; color: #f6f1e9; }
.hero-caption .button:hover { background: #f6f1e9; color: var(--ink); }
.hero-controls { position: absolute; z-index: 2; right: max(4vw, calc((100vw - 1380px) / 2)); bottom: 2.25rem; display: flex; gap: .5rem; }
.hero-control { width: .65rem; height: .65rem; border: 1px solid #f6f1e9; border-radius: 50%; background: transparent; padding: 0; }
.hero-control.is-active { background: #f6f1e9; }

.section { margin-bottom: 7rem; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 2rem; margin-bottom: 2.25rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.section-heading p { margin: 0; max-width: 28rem; color: var(--muted); }
.artist-grid, .exhibition-grid, .work-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); gap: 1.5rem; align-items: start; }
.artist-card, .exhibition-card, .work-card { min-width: 0; }
.artist-card a, .exhibition-card a, .work-card a { text-decoration: none; }
.artist-portrait, .exhibition-image, .work-image { overflow: hidden; background: var(--paper-deep); }
.artist-portrait { aspect-ratio: 4 / 5; }
.exhibition-image { aspect-ratio: 16 / 10; }
.work-image { aspect-ratio: 4 / 5; }
.artist-portrait img, .exhibition-image img, .work-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.artist-card:hover img, .exhibition-card:hover img, .work-card:hover img { transform: scale(1.035); }
.card-meta { display: flex; flex-wrap: wrap; gap: .35rem .75rem; align-items: center; margin-top: .9rem; color: var(--muted); font: .67rem/1.2 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; }
.card-title { margin: .45rem 0 0; font: 500 1.65rem/1.05 var(--font-display); }
.card-copy { margin: .5rem 0 0; color: var(--muted); font-size: .94rem; }

.split-feature { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(2rem, 7vw, 8rem); align-items: center; }
.split-feature.reverse { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); }
.feature-image { min-height: 33rem; background: var(--paper-deep); }
.feature-image img { width: 100%; height: 100%; min-height: 33rem; object-fit: cover; }
.feature-copy h2 { max-width: 10ch; }
.feature-copy p { margin: 1.5rem 0 2rem; color: var(--muted); font-size: 1.08rem; }
.numbered-list { margin: 2rem 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.numbered-list li { display: grid; grid-template-columns: 2.5rem 1fr; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.numbered-list b { color: var(--accent); font: .7rem var(--font-mono); }

.editorial-band { padding: 4rem clamp(1.25rem, 5vw, 6rem); background: var(--paper-deep); }
.editorial-band .section-heading { border-color: rgba(37,36,33,.25); }
.news-grid, .archive-results { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); gap: 1.5rem; align-items: start; }
.story-card { min-width: 0; }
.story-image { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--night-soft); }
.story-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.story-meta { display: flex; flex-wrap: wrap; gap: .5rem .75rem; align-items: center; margin-top: .85rem; color: var(--muted); font: .68rem var(--font-mono); letter-spacing: .06em; text-transform: uppercase; }
.story-card h3 { margin-top: .45rem; font-size: 2rem; }
.story-card h3 a { text-decoration: none; }
.empty-state { margin: 0; padding: 1.4rem; border: 1px dashed var(--line); color: var(--muted); }

.newsletter { display: grid; grid-template-columns: minmax(0, 1fr) minmax(19rem, .8fr); gap: 3rem; padding: clamp(2rem, 5vw, 4.5rem) 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.newsletter h2 { max-width: 9ch; }
.newsletter-form { display: grid; gap: .8rem; align-content: center; }
.field-label { font: .68rem var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
.input, .select { width: 100%; min-height: 3rem; padding: .7rem .85rem; border: 1px solid var(--line); border-radius: 0; background: transparent; }
.form-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(8rem, .65fr); gap: .75rem; }
.form-note { min-height: 1.5rem; margin: .1rem 0 0; color: var(--accent); font-size: .85rem; }
.partner-line { display: flex; flex-wrap: wrap; gap: 1.5rem 3rem; padding: 1.5rem 0; border-bottom: 1px solid var(--line); color: var(--muted); font: .7rem var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }

.page-intro { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(15rem, .8fr); gap: 3rem; align-items: end; margin-bottom: 4rem; }
.page-intro p { margin: 0; color: var(--muted); font-size: 1.1rem; }
.archive-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) 15rem; gap: .75rem; margin-bottom: 2rem; }
.filter-list { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem; }
.filter-list a { padding: .5rem .7rem; border: 1px solid var(--line); color: var(--muted); font-size: .78rem; text-decoration: none; }
.filter-list a:hover { border-color: var(--accent); color: var(--accent); }
.shop-controls { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: 2rem; padding: 1rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.shop-controls .select { width: auto; min-width: 10rem; }
.shop-card { position: relative; }
.wishlist { position: absolute; z-index: 1; top: .65rem; right: .65rem; width: 2.35rem; height: 2.35rem; border: 1px solid rgba(255,255,255,.75); border-radius: 50%; background: rgba(25,25,22,.34); color: #fff; }
.wishlist.is-saved { background: var(--accent); border-color: var(--accent); }
.shop-card[hidden] { display: none; }
.price { color: var(--ink); font-size: .9rem; }

.prose { max-width: var(--reading); margin: 0 auto; }
.article-header { max-width: 58rem; margin: 0 auto 3rem; }
.article-header h1 { max-width: 17ch; }
.article-deck { max-width: 44rem; color: var(--muted); font-size: 1.2rem; }
.article-cover { width: 100%; max-height: 40rem; object-fit: cover; margin-bottom: 3rem; }
.prose p { font-family: var(--font-body); font-size: 1.13rem; line-height: 1.8; }
.prose h2, .prose h3 { margin-top: 3rem; }
.prose a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: .18em; }
.byline { max-width: var(--reading); margin: 0 auto 2.5rem; padding: 1rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 3.25rem 1fr; gap: .2rem 1rem; align-items: center; }
.byline[hidden] { display: none; }
.byline img { width: 3.25rem; height: 3.25rem; object-fit: cover; border-radius: 50%; grid-row: span 2; }
.byline strong { font-family: var(--font-display); font-size: 1.35rem; }
.byline p { margin: 0; color: var(--muted); font-size: .88rem; }

.about-statement { max-width: 55rem; margin: 0 auto 6rem; text-align: center; }
.about-statement p { margin: 1.5rem auto 0; color: var(--muted); font-size: 1.25rem; line-height: 1.7; }
.contact-card { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; padding: 2rem 0; border-top: 1px solid var(--line); }
.contact-card h3 { font-size: 2rem; }
.contact-card a { color: var(--accent); }

.site-footer { width: var(--measure); margin: 0 auto; padding: 3rem 0 2rem; border-top: 1px solid var(--ink); }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 2rem; }
.footer-title { margin: 0 0 .85rem; font: 500 1.25rem var(--font-display); }
.footer-grid p { margin: 0; color: var(--muted); font-size: .9rem; }
.footer-links { display: grid; gap: .35rem; }
.footer-links a { color: var(--muted); font-size: .85rem; text-decoration: none; }
.footer-links a:hover { color: var(--accent); }
.footer-bottom { display: flex; justify-content: space-between; gap: 1rem; margin-top: 3rem; padding-top: 1rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .75rem; }

@media (max-width: 900px) {
  .site-header { min-height: 5.75rem; }
  .menu-toggle { display: inline-grid; }
  .site-nav { position: absolute; z-index: 5; top: 5.75rem; right: 4vw; left: 4vw; display: none; padding: 1.25rem; border: 1px solid var(--line); background: var(--paper); box-shadow: 0 1rem 2rem rgba(0,0,0,.08); }
  .site-nav.is-open { display: grid; }
  .site-nav a { padding: .35rem 0; }
  .hero { min-height: 42rem; }
  .split-feature, .split-feature.reverse, .newsletter, .page-intro { grid-template-columns: 1fr; }
  .feature-copy { order: -1; }
  .newsletter h2 { max-width: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .page-wrap, .site-header, .site-footer { width: min(90vw, 1380px); }
  .rail-layout { padding-top: 3rem; }
  .hero { width: 100vw; margin-left: calc((100vw - 90vw) / -2); min-height: 38rem; }
  .hero-caption { width: 90vw; }
  .hero-controls { right: 5vw; }
  .section { margin-bottom: 4.5rem; }
  .section-heading { display: block; }
  .section-heading p { margin-top: 1rem; }
  .feature-image, .feature-image img { min-height: 24rem; }
  .archive-toolbar, .form-row, .contact-card { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { display: block; }
  .footer-bottom span { display: block; margin-top: .5rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
