:root {
    --ink: rgba(0, 0, 0, 0.4);
    --ink-strong: #3a3a36;
    --paper: #faf8f4;
    --muted: #6b6b64;
    --line: #e2ded4;
    --accent: #8a6d4f;
    --serif: 'Cormorant Garamond', serif;
    --sans: 'Inter', sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--sans);
    line-height: 1.6;
}

h1, h2, h3 {
    font-family: var(--serif);
    font-weight: 500;
    letter-spacing: 0.01em;
}

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

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
.site-header {
    border-bottom: 1px solid var(--line);
    padding: 22px 0;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    font-family: var(--serif);
    font-size: 1.4rem;
    letter-spacing: 0.03em;
}

.site-nav a {
    margin-left: 28px;
    font-size: 0.92rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
}

.site-nav a:hover {
    color: var(--ink-strong);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 28px;
}

.lang-switch {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    letter-spacing: 0.06em;
}

.lang-switch a {
    color: var(--muted);
}

.lang-switch a.active {
    color: var(--ink-strong);
    font-weight: 500;
}

.lang-switch a:hover {
    color: var(--ink-strong);
}

.lang-divider {
    color: var(--line);
}

/* <picture> only wraps the srcset variants; it must not introduce a box of its own
   between a layout container and the image, or percentage heights stop resolving. */
picture {
    display: contents;
}

/* Home banner */
.home-banner {
    height: clamp(320px, 62vh, 640px);
    background-color: #ece8e0;
    overflow: hidden;
}

.home-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Hero */
.hero {
    padding: 90px 0 70px;
    text-align: center;
    border-bottom: 1px solid var(--line);
}

.hero h1 {
    font-size: 3rem;
    margin: 0 0 12px;
}

.tagline {
    color: var(--muted);
    font-size: 1.1rem;
    margin-bottom: 30px;
}

.btn {
    display: inline-block;
    border: 1px solid var(--ink);
    padding: 10px 26px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    transition: background 0.2s ease, color 0.2s ease;
}

.btn:hover {
    background: var(--ink-strong);
    color: var(--paper);
}

/* Sections */
.page-section, .featured-section, .detail-section, .about-section {
    padding: 60px 0 90px;
}

.section-title, .page-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 40px;
}

.page-subtitle {
    text-align: center;
    color: var(--muted);
    margin-top: -24px;
    margin-bottom: 40px;
}

.center-link {
    text-align: center;
    margin-top: 40px;
}

.center-link a {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--ink);
    padding-bottom: 2px;
}

/* Artwork grid */
.artwork-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 34px;
}

.artwork-card {
    display: block;
}

.artwork-image {
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: #ece8e0;
}

.artwork-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.artwork-card:hover .artwork-image img {
    transform: scale(1.04);
}

.artwork-info {
    padding-top: 14px;
}

.artwork-info h3 {
    margin: 0 0 4px;
    font-size: 1.2rem;
}

.artwork-subtitle {
    margin: 0;
    color: var(--muted);
    font-style: italic;
    font-size: 0.95rem;
}

/* Filter bar */
.filter-bar {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 50px;
}

.filter-pill {
    padding: 7px 18px;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 0.85rem;
    color: var(--muted);
}

.filter-pill.active, .filter-pill:hover {
    border-color: var(--ink-strong);
    color: var(--ink-strong);
}

.empty-state {
    text-align: center;
    color: var(--muted);
    padding: 40px 0;
}

/* Detail view */
.back-link {
    display: inline-block;
    margin-bottom: 30px;
    color: var(--muted);
    font-size: 0.9rem;
}

.back-link:hover {
    color: var(--ink-strong);
}

.detail-layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 50px;
    align-items: start;
}

.detail-image img,
.detail-image video {
    width: 100%;
    display: block;
    background: #ece8e0;
}

.detail-image video {
    background: #000;
}

.detail-info h1 {
    font-size: 2.2rem;
    margin: 0 0 10px;
}

.detail-info h1:has(+ .detail-subtitle) {
    margin-bottom: 2px;
}

.detail-subtitle {
    font-size: 1.7rem;
    font-style: italic;
    margin: 0 0 10px;
}

.detail-meta {
    color: var(--muted);
    margin-bottom: 24px;
}

.detail-description {
    color: var(--muted);
    margin-bottom: 24px;
}

.tag {
    display: inline-block;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 5px 14px;
    font-size: 0.8rem;
    color: var(--muted);
}

/* Exhibitions */
.exhibition-list {
    display: flex;
    flex-direction: column;
    gap: 60px;
}

.exhibition-item {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 40px;
    align-items: start;
}

/* A portrait poster filling this column would stand 749px tall against ~460px of text,
   so it is capped narrower than the cell; justify-self puts the slack in the inner
   gutter, keeping the outer page edge flush. Landscape posters fill the column. */
.exhibition-image {
    /* width: 100% keeps the frame definite. Without it justify-self sizes the item to
       fit-content, which is 0 until the lazy image inside has loaded. */
    width: 100%;
    max-width: 460px;
    aspect-ratio: 4 / 5;
    justify-self: start;
    overflow: hidden;
    background: #ece8e0;
}

.exhibition-item.is-landscape .exhibition-image {
    aspect-ratio: 3 / 2;
    max-width: none;
}

.exhibition-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (min-width: 801px) {
    .exhibition-item:nth-child(even) {
        grid-template-columns: 1fr 1.3fr;
    }

    .exhibition-item:nth-child(even) .exhibition-image {
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
    }

    .exhibition-item:nth-child(even) .exhibition-info {
        grid-column: 1;
        grid-row: 1;
    }
}

.exhibition-info h2 {
    font-size: 1.6rem;
    margin-bottom: 6px;
}

.exhibition-meta {
    color: var(--muted);
    margin-bottom: 14px;
    font-size: 0.9rem;
}

.exhibition-works-title {
    font-family: var(--sans);
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    margin: 26px 0 14px;
}

/* The featured works share a column with the exhibition's text, so they get a fixed
   three-up strip rather than the auto-fill .artwork-grid — an exhibition showing one
   or two works keeps the same thumbnail size as one showing three. */
.exhibition-works {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.exhibition-works .artwork-info {
    padding-top: 10px;
}

.exhibition-works .artwork-info h4 {
    font-family: var(--serif);
    font-weight: 500;
    font-size: 0.95rem;
    line-height: 1.35;
    margin: 0;
}

/* About */
.about-layout {
    display: grid;
    grid-template-columns: 0.9fr 1.3fr;
    gap: 50px;
    align-items: start;
}

.about-portrait img {
    width: 100%;
    border-radius: 4px;
    background: #ece8e0;
}

.about-info h1 {
    font-size: 2.4rem;
    margin-bottom: 8px;
}

.about-bio {
    margin: 20px 0;
}

.about-statements {
    padding-left: 20px;
    color: var(--muted);
    margin-bottom: 26px;
}

.about-statements li {
    margin-bottom: 6px;
}

.about-contact a,
.about-contact .contact-email {
    margin-bottom: 8px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 8px;
    width: fit-content;
}

.about-contact a {
    display: block;
}

.contact-email {
    display: flex;
    align-items: center;
}

/* The address and the icon are one control, so a click anywhere across them
   copies. Stripped back to plain text so it reads as the address it replaced. */
.copy-email {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    color: inherit;
    text-align: left;
    cursor: pointer;
    transition: color 0.2s ease;
}

.copy-email:hover,
.copy-email.copied {
    color: var(--accent);
}

/* The icon sits back a shade until the whole control is hovered or has just copied. */
.copy-email svg {
    width: 16px;
    height: 16px;
    color: var(--muted);
    transition: color 0.2s ease;
}

.copy-email:hover svg,
.copy-email.copied svg {
    color: inherit;
}

/* The check mark stands in for the copy icon for a moment after a successful copy. */
.copy-email .icon-check,
.copy-email.copied .icon-copy {
    display: none;
}

.copy-email.copied .icon-check {
    display: block;
}

/* Screen-reader-only text; the visible address and the icon swap carry the same
   information for everyone else. */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

/* Footer */
.site-footer {
    border-top: 1px solid var(--line);
    padding: 26px 0;
    text-align: center;
    color: var(--muted);
    font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 800px) {
    .detail-layout, .about-layout, .exhibition-item {
        grid-template-columns: 1fr;
    }
    .hero h1 {
        font-size: 2.2rem;
    }
}
