/* ==========================================================================
   RENASON — FINE ART DESIGN SYSTEM (styles.css)
   ========================================================================== */

/* ─── Variables & Global Reset ────────────────────────────────────────── */
:root {
    --bg-color: #FFFFFF;        /* Pure White */
    --text-primary: #777777;    /* Grey Text */
    --text-muted: #aaaaaa;      /* Light Grey */
    --accent-crimson: #777777;  /* Grey */
    --border-color: transparent; /* Remove all lines */
    
    --font-heading: 'Cormorant Garamond', 'Noto Serif KR', 'Noto Serif JP', serif;
    --font-body: 'Inter', 'Noto Sans KR', 'Noto Sans JP', 'Noto Sans SC', 'Noto Sans Thai', 'Amiri', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -ms-touch-action: manipulation;
    touch-action: manipulation;
}

/* ─── Copyright Protection ─────────────────────────────────────────── */
img {
    max-width: 100%;
    height: auto;
    display: block;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
    -webkit-touch-callout: none;
    -ms-content-zooming: none;
    -ms-tap-highlight-color: transparent;
}

/* Transparent overlay protection on all image containers to intercept Edge hover search menus and block direct saving */
.main-crimson-box,
.note-hero-banner,
.artist-portrait-box,
.critic-scan-wrapper-new,
.critic-banner-container,
.works-modal-image-col,
.critic-lightbox,
.exhibition-lightbox,
.carousel-item {
    position: relative;
}

.main-crimson-box::after,
.note-hero-banner::after,
.artist-portrait-box::after,
.critic-scan-wrapper-new::after,
.critic-banner-container::after,
.works-modal-image-col::after,
.critic-lightbox::after,
.exhibition-lightbox::after,
.carousel-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    background-color: rgba(255, 255, 255, 0); /* completely transparent */
    pointer-events: auto; /* intercepts pointer events, protecting the img tag underneath */
    cursor: default;
}

/* Specific cursor style overrides for clickable protected images */
.critic-scan-wrapper-new::after,
.carousel-item::after {
    cursor: pointer;
}

/* Ensure controls like close buttons are positioned above the transparent protection layer */
.lightbox-close,
.exhibition-lightbox-close,
.works-modal-close {
    z-index: 20;
}

/* Hover style for criticism scan zoom overlay */
.critic-scan-wrapper-new:hover .scan-overlay {
    opacity: 1;
}

/* Prevent selection across gallery */
.works-section,
.works-modal,
.archive-panel-photos {
    -webkit-user-select: none;
    user-select: none;
}

html {
    scroll-behavior: smooth; /* Smooth scroll to anchors */
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 300;
    line-height: 1.7;
    letter-spacing: 0.01em;
    -webkit-font-smoothing: antialiased;
    overflow-x: clip;
}

/* ─── Layout & Typography ─────────────────────────────────────────────── */
.museum-content {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 2rem 6rem 2rem;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 400;
}

/* Original renason.com typography hierarchy. Content remains unchanged. */
.brand-link {
    font-family: var(--font-heading) !important;
    font-size: 2rem !important;
    font-weight: 500 !important;
    line-height: 1.15 !important;
    letter-spacing: 0.15em !important;
}

.brand-logo > span {
    font-family: var(--font-body) !important;
    font-size: 0.68rem !important;
    font-weight: 300 !important;
    line-height: 1.7 !important;
    letter-spacing: 0.18em !important;
    text-transform: uppercase;
}

.museum-nav .nav-link {
    font-family: var(--font-body) !important;
    font-size: 0.75rem !important;
    font-weight: 500 !important;
    line-height: 1.7 !important;
    letter-spacing: 0.08em !important;
}

.text-tab-btn {
    font-family: var(--font-body) !important;
    font-size: 0.75rem !important;
    font-weight: 500 !important;
    line-height: 1.7 !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase;
}

.section-heading {
    font-size: 3rem;
    line-height: 1.15;
    margin-bottom: 2.5rem;
    letter-spacing: -0.01em;
}

.section-divider {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 3rem 0;
}

/* ─── Sticky Header Navigation ────────────────────────────────────────── */
.museum-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: rgba(248, 247, 244, 0.94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    max-width: 100%;
    padding: 1.2rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: padding 0.3s ease;
    gap: 1rem;
}

.brand-logo {
    display: flex;
    flex-direction: column;
}

.brand-link {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-decoration: none;
    color: var(--text-primary);
}

.sub-artist {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--text-muted);
    margin-top: 0.1rem;
}

.museum-nav {
    display: flex;
    gap: clamp(0.8rem, 1.5vw, 2.2rem);
    flex-wrap: nowrap;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    font-family: var(--font-body);
    font-size: clamp(0.65rem, 0.9vw, 0.75rem);
    font-weight: 500;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    padding-bottom: 0.3rem;
    border-bottom: 1px solid transparent;
    transition: color 0.25s, border-color 0.25s;
    white-space: nowrap;
}

.nav-link:hover, .nav-link.active {
    color: var(--text-primary);
    border-bottom-color: var(--text-primary);
}

.lang-switch {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--text-primary);
}

/* ─── Section Layouts ─────────────────────────────────────────────────── */
.museum-section {
    padding: 3.5rem 0;
}

/* ─── Placeholders (Museum Gray Canvas) ─────────────────────────────────── */
.image-placeholder {
    background-color: transparent;
    border: 1px solid var(--border-color);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: background-color 0.3s, border-color 0.3s;
}

.image-placeholder:hover {
    background-color: transparent;
    border-color: rgba(28, 27, 26, 0.18);
}

.image-placeholder img {
    width: 100%;
    height: auto;
    display: block;
    background-color: transparent;
}

.placeholder-note {
    text-align: center;
    padding: 2rem;
}

.placeholder-note h4 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.placeholder-note p {
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}

/* ── Section 1: Élan Vital (Hero) ─────────────────────────────────────── */
.hero-container {
    display: grid;
    /* Left: portrait painting (narrower), Right: essay text */
    grid-template-columns: 0.75fr 1fr;
    gap: 5rem;
    align-items: flex-start;  /* align to top so portrait image doesn't stretch */
}

/* The painting box: no fixed aspect ratio, let portrait image dictate height */
.main-crimson-box {
    border-left: 3px solid var(--accent-crimson);
    /* No aspect-ratio override — image height determines box height */
}

/* Hero image fills width, preserves natural portrait ratio */
.main-crimson-box .hero-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    -webkit-user-drag: none;
    user-drag: none;
    pointer-events: none;
}

.crimson-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: var(--accent-crimson);
    border-radius: 50%;
    margin-bottom: 1rem;
}

.hero-essay {
    padding-top: 2rem;
    position: sticky;
    top: 6rem;   /* stays visible while user scrolls past tall portrait */
}

.manifesto-paragraph {
    font-size: 1.05rem;
    line-height: 1.85;
    color: var(--text-primary);
    margin-bottom: 1.8rem;
    font-weight: 300;
}

.manifesto-paragraph.italic {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    line-height: 1.5;
    color: var(--text-muted);
    border-left: 2px solid var(--border-color);
    padding-left: 1.5rem;
    margin-top: 2rem;
}


/* ─── Section 2: Works (Catalog) ──────────────────────────────────────── */
.works-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.8rem;
    margin-bottom: 1.2rem;
}

.works-filters {
    display: flex;
    gap: 1.8rem;
}

.filter-btn {
    background: none;
    border: none;
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s;
}

.filter-btn.active, .filter-btn:hover {
    color: var(--accent-crimson);
}

/* ── Uniform Gallery Grid: 3 equal columns, viewport-fitted ─────────── */
.works-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem 1.4rem;
    transition: opacity 0.3s ease;
}

/* Works section: compact to fit 6 cards + pagination in one viewport */
#works.museum-section {
    padding: 1.5rem 0 1rem;
}

/* Force section heading smaller in works context */
#works .section-heading {
    font-size: 2rem;
    margin-bottom: 0.8rem;
}

/* Image boxes: height = (viewport - header70 - heading60 - padding60 - gap - pagination50) / 2 rows */
#works .image-placeholder {
    aspect-ratio: unset;
    height: clamp(140px, calc((100svh - 250px) / 2), 300px);
    overflow: hidden;
    background-color: transparent;
}

#works .image-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: contain;   /* Show FULL painting — no cropping */
    background-color: transparent;
}

.work-card {
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* All cards: uniform square aspect ratio regardless of image size */
.grid-box-large,
.grid-box-medium,
.grid-box-tall,
.grid-box-small {
    aspect-ratio: 1 / 1;
    border-top: none;
}

.work-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.work-title {
    font-size: 1.25rem;
    font-weight: 500;
}

.work-spec {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.work-price {
    font-size: 0.78rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 0.4rem;
}

/* ─── Section 3: Exhibition Archive Accordion ─────────────────────────── */

/* Filter Tabs */
.archive-filters {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1.5rem;
}

.arch-filter-btn {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 100px;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    padding: 0.55rem 1.4rem;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.arch-filter-btn:hover {
    border-color: var(--text-primary);
    color: var(--text-primary);
}

.arch-filter-btn.active {
    background-color: var(--text-primary);
    border-color: var(--text-primary);
    color: var(--bg-color);
}

/* Archive List */
.archive-list {
    border-top: 1px solid var(--border-color);
}

/* Single Archive Row */
.archive-row {
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s ease;
}

.archive-row.has-content .archive-row-header {
    cursor: pointer;
}

.archive-row.has-content .archive-row-header:hover {
    background-color: rgba(28, 27, 26, 0.025);
}

.archive-row.open {
    border-left: 2px solid var(--accent-crimson);
}

.archive-row-header {
    display: grid;
    grid-template-columns: 140px 1fr 36px;
    align-items: center;
    padding: 1.5rem 0;
    gap: 1.5rem;
}

.archive-row-meta {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.archive-year {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--accent-crimson);
    line-height: 1;
}

.archive-type {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    line-height: 1.2;
}

.archive-row-main {
    display: flex;
    align-items: baseline;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.archive-title {
    font-family: var(--font-heading);
    font-size: 1.38rem;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.3;
}

.archive-venue {
    font-size: 0.82rem;
    color: var(--text-muted);
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.archive-toggle {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 200;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    transition: all 0.25s ease;
    line-height: 1;
    flex-shrink: 0;
}

.archive-toggle-placeholder {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
}

.archive-row.open .archive-toggle {
    color: var(--text-primary);
    border-color: var(--text-primary);
    background-color: var(--text-primary);
    color: var(--bg-color);
}

/* Accordion Panel */
.archive-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
    opacity: 0;
}

.archive-row.open .archive-panel {
    max-height: 3000px;
    opacity: 1;
}

.archive-panel-inner {
    padding: 0 0 2.5rem 0;
}

/* Panel: horizontal layout: text left, images right */
.archive-panel-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.archive-panel-layout:has(.archive-panel-left):not(:has(.archive-panel-right)) {
    grid-template-columns: 1fr;
}

.archive-panel-layout:not(:has(.archive-panel-left)):has(.archive-panel-right) {
    grid-template-columns: 1fr;
}

.archive-panel-venue-label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 1rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid var(--border-color);
}

.archive-panel-text {
    font-size: 0.9rem;
    line-height: 1.85;
    color: var(--text-muted);
    white-space: pre-wrap;
}

/* Images in panel: horizontal scroll strip */
.archive-panel-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.8rem;
}

.archive-img-wrap {
    cursor: zoom-in;
    overflow: hidden;
    aspect-ratio: 4/3;
    background-color: var(--border-color);
}

.archive-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.archive-img-wrap:hover img {
    transform: scale(1.05);
}

/* Archive Lightbox */
.archive-lightbox {
    display: none;
    position: fixed;
    z-index: 20000;
    inset: 0;
    background: rgba(10, 10, 10, 0.96);
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.archive-lightbox.show {
    display: flex;
}

.archive-lightbox img {
    max-width: 90vw;
    max-height: 88vh;
    object-fit: contain;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}

.archive-lb-close {
    position: absolute;
    top: 1.5rem;
    right: 2.5rem;
    background: none;
    border: none;
    color: #fff;
    font-size: 2.5rem;
    font-weight: 200;
    cursor: pointer;
    z-index: 20001;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.archive-lb-close:hover { opacity: 1; }

@media (max-width: 768px) {
    .archive-row-header {
        grid-template-columns: 90px 1fr 32px;
        padding: 1.2rem 0;
        gap: 1rem;
    }
    .archive-title {
        font-size: 1.1rem;
    }
    .archive-panel-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .archive-panel-images {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ─── Section 4: Biography ────────────────────────────────────────────── */
.bio-container {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 5rem;
    align-items: center;
}

.bio-text {
    padding: 2rem;
    background-color: rgba(0,0,0,0.01);
    border-radius: 8px;
    font-family: var(--font-body);
}

.bio-paragraph {
    font-family: var(--font-body);
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--text-main);
    margin-bottom: 1.5rem;
    font-weight: 400;
}

.bio-sub-title {
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-weight: 500;
    margin: 2rem 0 1rem 0;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.education-list {
    list-style: none;
}

.education-list li {
    font-family: var(--font-body);
    font-size: 0.95rem;
    margin-bottom: 0.6rem;
    color: var(--text-main);
}

.education-list li strong {
    color: var(--text-primary);
    font-weight: 600;
}

.artist-portrait-box {
    aspect-ratio: 3/4;
    border: 1px solid var(--border-color);
    border-radius: 2px;
}

/* ─── Section 5: Criticism ────────────────────────────────────────────── */
.criticism-list {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    max-width: 900px;
    margin-top: 1rem;
}

.critic-card {
    border-left: 2px solid var(--accent-crimson);
    padding-left: 2.5rem;
}

.critic-body {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    line-height: 1.55;
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-weight: 300;
}

.critic-attr {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

/* ─── Section 6: Contact ──────────────────────────────────────────────── */
.contact-container {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 5rem;
}

.contact-info {
    padding: 2rem;
    background-color: rgba(0,0,0,0.01);
    border-radius: 8px;
    font-family: var(--font-body);
}

.contact-sub {
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text-main);
    line-height: 1.8;
    margin-bottom: 2rem;
}

.direct-email {
    font-family: var(--font-body);
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--accent-crimson);
    background: none;
    border: none;
    letter-spacing: 0.02em;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
    display: inline-block;
    cursor: pointer;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    background: rgba(0,0,0,0.01);
    padding: 3rem;
    border: 1px solid var(--border-color);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-group label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 500;
    color: var(--text-muted);
}

.form-group input,
.form-group textarea {
    background-color: transparent;
    border: none;
    border-bottom: 1px solid var(--border-color);
    padding: 0.6rem 0;
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--text-primary);
    outline: none;
    transition: border-bottom-color 0.25s;
}

.form-group input:focus,
.form-group textarea:focus {
    border-bottom-color: var(--accent-crimson);
}

.museum-submit-btn {
    align-self: flex-start;
    background-color: var(--text-primary);
    color: var(--bg-color);
    border: none;
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding: 1rem 2.5rem;
    cursor: pointer;
    transition: background-color 0.25s, transform 0.25s;
}

.museum-submit-btn:hover {
    background-color: var(--accent-crimson);
    transform: translateY(-1px);
}

/* ─── Footer ──────────────────────────────────────────────────────────── */
.museum-footer {
    max-width: 1300px;
    margin: 0 auto;
    padding: 3rem 2rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.6;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.footer-links a:hover {
    opacity: 1;
}

.admin-link {
    margin-left: 1rem;
    font-size: 0.72rem;
}

/* ─── Responsive Adjustments ──────────────────────────────────────────── */
@media (max-width: 1200px) {
    .works-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1024px) {
    .museum-header {
        padding: 1.5rem 2rem;
    }
    .hero-container {
        /* Stack: image on top, essay below */
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    .main-crimson-box {
        max-width: 420px;   /* limit portrait width on tablet */
        margin: 0 auto;     /* center the portrait */
    }
    .hero-essay {
        position: static;   /* no sticky on mobile */
        padding-top: 0;
    }
    .bio-container, .contact-container {
        grid-template-columns: 1fr;
        gap: 3.5rem;
    }
    .cv-layout {
        grid-template-columns: 1fr;
        gap: 3.5rem;
    }
}

@media (max-width: 768px) {
    .museum-section {
        padding: 1.5rem 0;
    }
    .museum-header {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
        padding: 1.5rem 1rem;
    }
    .museum-nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1.2rem;
    }
    .works-grid {
        grid-template-columns: 1fr;
    }
    .works-header {
        flex-direction: column;
        gap: 1.5rem;
        align-items: flex-start;
    }
    .museum-footer {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
        text-align: center;
    }
    .footer-left {
        flex-direction: column;
        gap: 0.8rem;
    }
    .footer-links {
        flex-direction: column;
        gap: 0.8rem;
    }
    .admin-link {
        margin-left: 0;
    }
    .contact-form {
        padding: 1.5rem;
    }
    .bio-text, .contact-info, .critic-text-col, .works-modal-info-col {
        padding: 1.5rem 1.25rem;
    }
    .form-row {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* ─── Back to Top Button ──────────────────────────────────────────────── */
.back-to-top {
    position: fixed;
    bottom: 3rem;
    right: 3rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--bg-color);
    border: 1px solid var(--text-primary);
    color: var(--text-primary);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s, background-color 0.25s, color 0.25s, transform 0.25s;
    z-index: 999;
    outline: none;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--text-primary);
    color: var(--bg-color);
    transform: translateY(-3px);
}

@media (max-width: 768px) {
    .back-to-top {
        bottom: 2rem;
        right: 2rem;
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

/* ─── Production Additions: Lang switcher, Process notes, Form feedback ─── */

.lang-switch {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-body);
}

.lang-btn {
    background: none;
    border: none;
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.2rem 0;
    transition: color 0.25s;
    outline: none;
}

.lang-btn:hover {
    color: var(--accent-crimson);
}

.lang-btn.active {
    color: var(--text-primary);
    font-weight: 600;
}

.lang-separator {
    font-size: 0.75rem;
    color: var(--border-color);
}

/* Process Notes Grid styling */
.process-section {
    width: 100%;
}

.process-notes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
    margin-top: 2rem;
}

.process-card {
    border: 1px solid var(--border-color);
    padding: 2.2rem;
    background-color: rgba(28, 27, 26, 0.01);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.process-card:hover {
    border-color: var(--accent-crimson);
    transform: translateY(-3px);
    background-color: rgba(28, 27, 26, 0.02);
}

.process-num-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 1.2rem;
    border-bottom: 1px dashed var(--border-color);
    padding-bottom: 0.5rem;
}

.process-number {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--accent-crimson);
}

.process-subtitle {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.68rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.process-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-weight: 400;
}

.process-text {
    font-size: 0.85rem;
    line-height: 1.75;
    color: var(--text-muted);
    font-weight: 300;
    letter-spacing: 0.01em;
}

/* Contact feedback styling */
.contact-feedback {
    margin-top: 1.5rem;
    padding: 1rem 1.5rem;
    font-family: var(--font-body);
    font-size: 0.8rem;
    letter-spacing: 0.02em;
    border: 1px solid transparent;
}

.contact-honeypot {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.direct-email {
    color: inherit;
    text-decoration: none;
}

.direct-email:hover,
.direct-email:focus-visible {
    text-decoration: underline;
    text-underline-offset: 0.25em;
}

.museum-submit-btn:disabled {
    cursor: wait;
    opacity: 0.55;
}

.success-msg {
    background-color: rgba(28, 27, 26, 0.02);
    border-color: var(--border-color);
    color: var(--text-primary);
}

.error-msg {
    background-color: rgba(158, 27, 27, 0.04);
    border-color: rgba(158, 27, 27, 0.2);
    color: var(--accent-crimson);
}

/* Adjust responsive grids for process notes */
@media (max-width: 1024px) {
    .process-notes-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .process-notes-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* Hero Caption styling */
.hero-image-wrapper {
    display: flex;
    flex-direction: column;
}

.hero-caption {
    margin-top: 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    letter-spacing: 0.02em;
    line-height: 1.4;
    display: flex;
    align-items: center;
}

.hero-caption .caption-title {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    color: var(--text-primary);
    margin-right: 0.5rem;
}

/* ─── Works Numbered Pagination — Minimal ─────────────────────────────────── */
.works-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.1rem;
    margin-top: 0.8rem;
    flex-wrap: wrap;
}

.works-page-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    padding: 0.4rem 0.65rem;
    cursor: pointer;
    transition: color 0.2s ease;
    outline: none;
    line-height: 1;
    position: relative;
}

.works-page-btn:hover:not(:disabled) {
    color: var(--text-primary);
}

.works-page-btn.active {
    color: var(--text-primary);
    font-weight: 600;
}

/* Active page underline indicator */
.works-page-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 14px;
    height: 1px;
    background-color: var(--text-primary);
}

.works-page-btn:disabled {
    opacity: 0.25;
    cursor: default;
}

.works-page-arrow {
    font-size: 0.85rem;
    padding: 0.4rem 0.5rem;
    color: var(--text-muted);
}

.works-page-ellipsis {
    color: var(--text-muted);
    font-size: 0.78rem;
    padding: 0.4rem 0.2rem;
    pointer-events: none;
}

.works-page-info {
    font-size: 0.68rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    margin-left: 1.2rem;
    white-space: nowrap;
    opacity: 0.7;
}

/* ─── Load More Button (hidden, kept for fallback) ────────────────────────── */
.load-more-container {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.load-more-btn {
    background-color: transparent;
    border: 1px solid var(--text-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding: 1rem 3rem;
    cursor: pointer;
    transition: background-color 0.25s, color 0.25s, border-color 0.25s, transform 0.25s;
    outline: none;
}

.load-more-btn:hover {
    background-color: var(--text-primary);
    color: var(--bg-color);
    transform: translateY(-1px);
}

.load-more-btn:disabled {
    border-color: var(--border-color);
    color: var(--text-muted);
    cursor: not-allowed;
    background-color: transparent;
    transform: none;
}

/* ─── Section 3: Artist Notes ─────────────────────────────────────────── */
.note-hero-banner {
    width: 100%;
    margin-bottom: 3.5rem;
    border: 1px solid var(--border-color);
    border-radius: 2px;
    overflow: hidden;
    aspect-ratio: 16/7;
}

.note-banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: saturate(0.9);
    transition: transform 0.5s ease;
}

.note-hero-banner:hover .note-banner-img {
    transform: scale(1.02);
}

/* Intro Text for Artist Note */
.note-intro-text {
    max-width: 800px;
    margin: 3rem auto 4rem auto;
    padding: 0 1rem;
}

.note-intro-text p {
    font-family: var(--font-body);
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    text-align: left;
    word-break: keep-all;
    letter-spacing: -0.02em;
}

.concepts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3.5rem;
}

.concept-card {
    border-top: 1px solid var(--border-color);
    padding-top: 1.8rem;
}

.concept-title {
    font-family: var(--font-heading);
    font-size: 1.58rem;
    color: var(--text-primary);
    margin-bottom: 1.2rem;
    font-weight: 400;
    letter-spacing: 0.01em;
}

.concept-body {
    font-size: 0.9rem;
    line-height: 1.8;
    color: var(--text-muted);
    font-weight: 300;
}

@media (max-width: 768px) {
    .concepts-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    .note-hero-banner {
        aspect-ratio: 16/9;
    }
}

/* ─── Criticism Scans Grid ────────────────────────────────────────────── */
.critic-scans-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3.5rem;
    margin-bottom: 3rem;
}

.critic-scan-card {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.critic-scan-wrapper {
    position: relative;
    border: 1px solid var(--border-color);
    aspect-ratio: 1/1.35;
    background-color: var(--bg-color);
    overflow: hidden;
}

.critic-scan-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform 0.4s ease, filter 0.4s ease;
    filter: brightness(0.98);
}

.scan-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(28, 27, 26, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.zoom-icon {
    font-size: 2rem;
    color: #fff;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.3));
}

.critic-scan-card:hover .critic-scan-img {
    transform: scale(1.03);
    filter: brightness(0.9);
}

.critic-scan-card:hover .scan-overlay {
    opacity: 1;
}

.critic-scan-info {
    padding-left: 0.2rem;
}

.critic-scan-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
    font-weight: 500;
}

.critic-scan-spec {
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .critic-scans-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
}

/* ─── Lightbox Modal ──────────────────────────────────────────────────── */
.critic-lightbox {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(24, 23, 22, 0.96); /* warm near-black background */
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 2rem;
}

.critic-lightbox.show {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 85vh;
    object-fit: contain;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.critic-lightbox.show .lightbox-content {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 3rem;
    color: #f1f1f1;
    font-size: 3rem;
    font-weight: 200;
    cursor: pointer;
    transition: color 0.25s, transform 0.25s;
    user-select: none;
    z-index: 10001;
}

.lightbox-close:hover {
    color: var(--accent-crimson);
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .lightbox-close {
        top: 1rem;
        right: 1.5rem;
        font-size: 2.5rem;
    }
    .critic-lightbox {
        padding: 1rem;
    }
}


/* old accordion styles removed — archive accordion styles defined above */


/* ==========================================================================
   ADDED BY ANTIGRAVITY — WORKS DETAIL MODAL & CRITICISM ESSAYS
   ========================================================================== */

/* ── Gallery Card: uniform square cells, image fills with object-fit ── */
.work-card .work-info {
    display: none; /* info shown in modal only */
}

.work-card .image-placeholder {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    width: 100%;
    aspect-ratio: 4 / 5;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    border: none;
    transition: transform 0.3s ease;
}

.work-card:hover .image-placeholder {
    border-color: transparent;
    box-shadow: none;
    transform: scale(1.02);
}

.work-card .work-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    /* Copyright protection */
    -webkit-user-drag: none;
    user-drag: none;
    pointer-events: none;  /* transparent overlay handles click */
}

.work-card:hover .work-image {
    transform: scale(1.05);
}

/* Transparent overlay catches clicks and prevents right-click/save */
.work-card-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(20, 18, 16, 0);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
    cursor: pointer;
}

.work-card:hover .work-card-overlay {
    background-color: rgba(20, 18, 16, 0.06);
}

.view-details-btn {
    color: #1a1917;
    background-color: rgba(255,255,255,0.95);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.55rem 1.1rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.12);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.work-card:hover .view-details-btn {
    opacity: 1;
    transform: translateY(0);
}

/* ─── Works Modal ────────────────────────────────────────────────────── */
.works-modal {
    display: none;
    position: fixed;
    z-index: 11000;
    inset: 0;
    width: 100%;
    height: 100dvh;
    overflow: hidden;
    background-color: rgba(74, 73, 71, 0.96);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 3rem;
}

.works-modal.show {
    display: flex;
    opacity: 1;
}

.works-modal-content {
    position: relative;
    background-color: #f2f2f2;
    color: var(--text-primary);
    width: min(60vw, 1000px);
    max-width: 1000px;
    height: min(80dvh, 900px);
    max-height: 900px;
    min-height: 0;
    border: none;
    box-shadow: none;
    transform: scale(0.97);
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    overflow: hidden;
}

.works-modal.show .works-modal-content {
    transform: scale(1);
}

.works-modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: transparent;
    border: none;
    width: auto;
    height: auto;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 300;
    line-height: 1;
    color: #888;
    cursor: pointer;
    transition: color 0.2s ease, opacity 0.2s ease;
    z-index: 10;
}

.works-modal-close-mobile {
    display: none;
}

.works-modal-close:hover {
    color: #666;
    opacity: 0.8;
}

.works-modal-layout {
    display: grid;
    grid-template-rows: minmax(0, 7fr) minmax(0, 3fr);
    height: 100%;
    width: 100%;
    min-height: 0;
    overflow: hidden;
}

.works-modal-image-col {
    height: 100%;
    min-height: 0;
    min-width: 0;
    width: 100%;
    background-color: #f2f2f2;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem;
    border-bottom: none;
    overflow: hidden;
}

.works-modal-image-col img {
    width: 100%;
    height: 100%;
    min-height: 0;
    object-fit: contain;
    display: block;
    box-shadow: none;
    -webkit-user-drag: none;
    user-drag: none;
    pointer-events: none;
}

.works-modal-info-col {
    height: 100%;
    min-height: 0;
    min-width: 0;
    width: 100%;
    padding: clamp(1rem, 2vh, 1.5rem) 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: rgba(0,0,0,0.01);
    text-align: center;
    color: var(--text-muted);
}

.modal-info-inner {
    flex: 0 1 auto;
    min-height: 0;
}

.works-modal-title {
    font-family: var(--font-body);
    font-size: 1.15rem;
    font-weight: 500;
    line-height: 1.35;
    letter-spacing: 0.01em;
    color: var(--text-main);
    margin-bottom: 0.4rem;
}

.works-modal-divider {
    display: none;
}

.works-modal-specs {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    margin-bottom: 0;
}

.works-modal-specs .spec-value {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 400;
    font-family: var(--font-body);
}

.works-modal-spec-row {
    display: flex;
    justify-content: center;
    font-size: 0.85rem;
    border-bottom: none;
    padding-bottom: 0;
}

.spec-label {
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.spec-value {
    color: var(--text-primary);
    font-weight: 500;
}

.works-modal-price {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-crimson);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 2.5rem;
}

.artwork-inquiry-toggle {
    width: 100%;
    border: 1px solid var(--text-primary);
    background: var(--text-primary);
    color: #fff;
    padding: 0.9rem 1.2rem;
    margin: -0.7rem 0 1.5rem;
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
}

.artwork-inquiry-toggle:hover {
    background: var(--accent-crimson);
    border-color: var(--accent-crimson);
}

.artwork-inquiry-form {
    border: 1px solid var(--border-color);
    margin: -0.5rem 0 1.5rem;
    background: #fff;
}

.artwork-inquiry-form[hidden] {
    display: none;
}

.inquiry-compose-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.8rem 1rem;
    background: #f4f3f0;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.08em;
}

#inquiry-artwork-reference {
    color: var(--accent-crimson);
    text-align: right;
}

.inquiry-field-row {
    display: grid;
    grid-template-columns: 72px 1fr;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding: 0.55rem 0.9rem;
}

.inquiry-field-row label {
    color: var(--text-muted);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.inquiry-field-row input,
.inquiry-field-row textarea {
    width: 100%;
    border: none;
    outline: none;
    resize: vertical;
    background: transparent;
    color: var(--text-primary);
    font: 0.82rem/1.5 var(--font-body);
}

.inquiry-message-row {
    align-items: start;
}

.inquiry-send-button {
    margin: 0.9rem;
    border: none;
    background: var(--accent-crimson);
    color: #fff;
    padding: 0.75rem 1.2rem;
    font-family: var(--font-body);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    cursor: pointer;
}

.inquiry-send-button:disabled {
    cursor: wait;
    opacity: 0.55;
}

.artwork-inquiry-form .contact-feedback {
    margin: 0 0.9rem 0.9rem;
    padding: 0.7rem 0.9rem;
}

.works-modal-nav {
    flex: 0 0 auto;
    display: flex;
    justify-content: center;
    gap: 3.5rem;
    margin-top: clamp(0.6rem, 1.8vh, 1.5rem);
}

.modal-nav-btn {
    background: none;
    border: none;
    padding: 0.5rem;
    font-size: 1.5rem;
    color: #ccc;
    cursor: pointer;
    transition: color 0.2s ease;
}

.modal-nav-btn:hover {
    color: #888;
}

/* ─── Criticism tabbed layout ───────────────────────────────────────── */
.critic-tab-container {
    margin-top: 3.5rem;
}

.critic-tabs {
    display: flex;
    justify-content: center;
    gap: 3rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1.5rem;
    margin-bottom: 3.5rem;
}

.critic-tab-btn {
    background: none;
    border: none;
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 400;
    color: var(--text-muted);
    cursor: pointer;
    position: relative;
    padding-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.critic-tab-btn:hover, .critic-tab-btn.active {
    color: var(--text-primary);
}

.critic-tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1.58rem;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--accent-crimson);
}

.critic-tab-content {
    display: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.critic-tab-content.active {
    display: block;
    opacity: 1;
}

.critic-layout {
    display: flex;
    gap: 5rem;
    align-items: flex-start;
}

.critic-layout.no-scan {
    justify-content: center;
}

.critic-layout.no-scan .critic-text-col {
    max-width: 800px;
    width: 100%;
}

.critic-scan-col {
    flex: 0.7;
    max-width: 320px;
}

.critic-scan-wrapper-new {
    position: relative;
    cursor: pointer;
    border: 1px solid var(--border-color);
    overflow: hidden;
    background-color: var(--bg-alabaster);
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.critic-scan-img-new {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.critic-scan-wrapper-new:hover .critic-scan-img-new {
    transform: scale(1.04);
}

.critic-text-col {
    flex: 2.2;
    display: flex;
    flex-direction: column;
    padding: 2.5rem;
    background-color: rgba(0,0,0,0.01);
    border-radius: 8px;
}

.critic-essay-title {
    font-family: var(--font-body);
    font-size: 1.3rem;
    line-height: 1.4;
    font-weight: 500;
    margin-bottom: 0.8rem;
    color: var(--text-main);
}

.critic-essay-author {
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 2.2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.critic-essay-body {
    font-family: var(--font-body);
    font-size: 0.95rem;
    line-height: 1.85;
    letter-spacing: -0.02em;
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    text-align: left;
    text-align-last: auto;
    word-spacing: normal;
    word-break: keep-all;
    overflow-wrap: break-word;
}

.critic-essay-body p {
    margin: 0;
    text-align: left;
    text-align-last: auto;
    letter-spacing: inherit;
    word-spacing: 0;
    word-break: inherit;
}

/* Page-by-page Pagination, Banner & Click Triggers */
.critic-banner-container {
    width: 100%;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
    border-radius: 2px;
    overflow: hidden;
    aspect-ratio: 820/312;
}

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

.critic-essay-title.clickable,
.critic-essay-author.clickable {
    cursor: pointer;
    transition: color 0.3s ease;
}

.critic-essay-title.clickable:hover {
    color: var(--accent-crimson);
}

.critic-scan-trigger-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    margin-top: -1.2rem;
    margin-bottom: 1.8rem;
    transition: color 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px dashed var(--border-color);
    padding-bottom: 0.2rem;
    width: fit-content;
}

.critic-scan-trigger-btn:hover {
    color: var(--accent-crimson);
    border-bottom-color: var(--accent-crimson);
}

.critic-pagination {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2.2rem;
    font-family: var(--font-body);
}

.critic-page-btn {
    background: none;
    border: none;
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.2rem 0.5rem;
    transition: all 0.3s ease;
    position: relative;
}

.critic-page-btn:hover,
.critic-page-btn.active {
    color: var(--text-primary);
    font-weight: 600;
}

.critic-page-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 1.5px;
    background-color: var(--accent-crimson);
}

.critic-page-dot {
    color: var(--text-muted);
    opacity: 0.3;
    font-size: 0.7rem;
    user-select: none;
}

.critic-essay-body-page {
    display: none;
    opacity: 0;
}

.critic-essay-body-page.active {
    display: block;
    animation: criticFadeIn 0.4s ease forwards;
}

@keyframes criticFadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ─── Responsive ─────────────────────────────────────────────────────── */

/* Tablet: 2-column grid */
@media (max-width: 900px) {
    .works-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.2rem 1rem;
    }

    .works-modal-layout {
        grid-template-rows: minmax(0, 7fr) minmax(0, 3fr);
        height: 100%;
        max-height: none;
        overflow: hidden;
    }

    .works-modal-image-col {
        height: 100%;
        width: 100%;
        max-height: none;
        border-right: none;
        padding: 1.5rem;
    }

    .works-modal-image-col img {
        width: 100%;
        height: 100%;
        max-height: none;
    }

    .works-modal-info-col {
        height: 100%;
        padding: 1rem 1.5rem;
    }

    .works-modal {
        padding: 0.75rem;
    }

    .works-modal-content {
        width: 95vw;
        height: 92dvh;
        max-width: 100%;
    }

    .works-modal-title {
        font-size: 1rem;
    }

    .critic-layout {
        flex-direction: column;
        gap: 2rem;
        align-items: center;
    }

    .critic-scan-col {
        width: 100%;
        max-width: 240px;
    }

    .critic-tabs {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }

    .critic-tab-btn.active::after { display: none; }
    .critic-tab-btn.active {
        color: var(--accent-crimson);
        font-weight: 600;
    }
}

/* Mobile: 2-column grid (or 1-column on very small) */
@media (max-width: 540px) {
    .works-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .works-modal-layout {
        max-height: none;
    }

    .works-modal-image-col {
        max-height: none;
        padding: 0.75rem;
    }

    .works-modal-image-col img {
        max-height: none;
    }

    .works-modal {
        padding: 0.4rem;
    }

    .works-modal-info-col {
        padding: 0.65rem 1.2rem;
    }

    .works-modal-title {
        font-size: 0.95rem;
    }

    .works-modal-nav {
        gap: 2.5rem;
        margin-top: 0.4rem;
    }

    .inquiry-compose-header {
        flex-direction: column;
        gap: 0.25rem;
    }

    #inquiry-artwork-reference {
        text-align: left;
    }

    .modal-nav-btn {
        padding: 0.3rem 0.7rem;
        font-size: 1.25rem;
    }
}

/* Landscape mobile */
@media (max-width: 900px) and (orientation: landscape) {
    .works-modal-layout {
        grid-template-rows: minmax(0, 7fr) minmax(0, 3fr);
        height: 100%;
        max-height: none;
        overflow: hidden;
    }

    .works-modal-image-col {
        width: 100%;
        max-height: none;
        padding: 0.75rem;
    }

    .works-modal-info-col {
        width: 100%;
        overflow: hidden;
        padding: 0.45rem 1rem;
    }
}

/* ==========================================================================
   ARTIST NOTE — TEXT-ONLY READING LAYOUT
   ========================================================================== */

#texts.museum-section {
    width: min(100%, 960px);
    margin-inline: auto;
    padding: clamp(3rem, 7vh, 6rem) 0;
}

#texts .texts-tab-header {
    margin-bottom: clamp(3.5rem, 8vh, 6.5rem) !important;
    gap: clamp(1.5rem, 4vw, 3.5rem) !important;
}

#texts .text-tab-btn {
    border: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    color: var(--text-muted) !important;
}

#texts .text-tab-btn.active {
    color: var(--text-primary) !important;
}

.note-intro-text {
    width: min(100%, 800px);
    max-width: none;
    margin: 0 auto;
    padding: 3rem 2rem;
    background-color: rgba(0,0,0,0.01);
    border-radius: 8px;
    font-family: var(--font-body);
}

.note-page-title {
    max-width: 680px;
    margin: 0 auto 1rem;
    font-size: clamp(1.8rem, 3.2vw, 2.4rem);
    font-family: var(--font-body);
    font-weight: 500;
    line-height: 1.35;
    letter-spacing: -0.02em;
    text-wrap: balance;
}

.note-page-subtitle {
    max-width: 680px;
    margin: 0 auto 0.65rem;
    font-size: clamp(1rem, 1.5vw, 1.15rem);
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.65;
    letter-spacing: -0.015em;
    text-transform: none;
    text-wrap: balance;
}

.note-page-subtitle2 {
    max-width: 680px;
    margin: 0 auto clamp(3.5rem, 7vh, 5.5rem);
    font-size: 0.95rem;
    font-family: var(--font-body);
    font-weight: 300;
    line-height: 1.7;
    letter-spacing: 0;
    text-wrap: balance;
}

.note-intro-text p,
html[lang="ko"] .note-intro-text p {
    margin: 0 0 2.15rem !important;
    font-family: var(--font-body);
    font-size: 1.02rem !important;
    font-weight: 300;
    line-height: 2 !important;
    letter-spacing: -0.018em;
    color: var(--text-primary);
    text-align: left;
    word-break: keep-all;
    overflow-wrap: break-word;
}

.note-intro-text p:last-child {
    margin-bottom: 0 !important;
}

.note-pagination {
    margin-top: clamp(3.5rem, 7vh, 5.5rem);
    gap: 0.8rem;
}

.note-pagination .critic-page-btn {
    min-width: 1.75rem;
    padding: 0.35rem 0;
    border: 0;
    background: transparent;
    color: var(--text-muted);
    font-weight: 300;
}

.note-pagination .critic-page-btn.active {
    color: var(--text-primary);
    font-weight: 500;
}

.note-pagination .critic-page-btn.active::after {
    display: none;
}

.note-pagination .critic-page-dot {
    opacity: 0.3;
}

@media (max-width: 768px) {
    #texts.museum-section {
        padding: 2.25rem 0 3.5rem;
    }

    #texts .texts-tab-header {
        justify-content: space-between !important;
        gap: 0.75rem !important;
        margin-bottom: 1.5rem !important;
    }

    #texts .text-tab-btn {
        font-size: 0.68rem !important;
    }

    .note-intro-text {
        width: 100%;
        margin-top: 1rem;
        padding: 1.5rem 1.25rem;
    }

    .note-page-title {
        font-size: clamp(1.75rem, 8vw, 2.15rem);
        line-height: 1.35;
    }

    .note-page-subtitle {
        font-size: 0.95rem;
        line-height: 1.7;
    }

    .note-page-subtitle2 {
        margin-bottom: 3rem;
        font-size: 0.82rem;
    }

    .note-intro-text p,
    html[lang="ko"] .note-intro-text p {
        margin-bottom: 1.8rem !important;
        font-size: 0.96rem !important;
        line-height: 1.9 !important;
        letter-spacing: -0.022em;
    }

    .note-pagination {
        margin-top: 3.5rem;
    }

    .back-to-top {
        display: none !important;
    }
}


/* ==========================================================================
   MULTILINGUAL TYPOGRAPHY & LAYOUT SYSTEM
   Auto-activates via html[dir="rtl"] (Arabic) or lang-specific classes
   ========================================================================== */

/* Arabic (AR) — RTL Layout */
html[dir="rtl"] body {
    font-family: "Amiri", "Inter", sans-serif;
    direction: rtl;
    text-align: right;
}

/* Preserve LTR for brand header even in RTL mode */
html[dir="rtl"] .museum-header {
    direction: ltr;
}

html[dir="rtl"] .brand-logo,
html[dir="rtl"] .museum-nav,
html[dir="rtl"] .lang-switch {
    direction: ltr;
    text-align: left;
}

html[dir="rtl"] .hero-container { direction: rtl; }
html[dir="rtl"] .hero-essay { text-align: right; }
html[dir="rtl"] .works-header { flex-direction: row-reverse; }
html[dir="rtl"] .works-filters { flex-direction: row-reverse; }
html[dir="rtl"] .hero-caption { flex-direction: row-reverse; }
html[dir="rtl"] .works-modal-layout { flex-direction: row-reverse; }
html[dir="rtl"] .works-modal-image-col { border-right: none; border-left: 1px solid var(--border-color); }

html[dir="rtl"] .manifesto-paragraph.italic {
    border-left: none;
    border-right: 2px solid var(--border-color);
    padding-left: 0;
    padding-right: 1.5rem;
    text-align: right;
}

html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3,
html[dir="rtl"] h4 {
    font-family: "Amiri", serif;
    line-height: 1.7;
}

html[dir="rtl"] .section-heading,
html[dir="rtl"] .manifesto-paragraph,
html[dir="rtl"] .bio-text,
html[dir="rtl"] .contact-sub {
    text-align: right;
}

/* Thai (TH) */
html[lang="th"] body,
html[lang="th"] p,
html[lang="th"] .manifesto-paragraph,
html[lang="th"] .bio-text {
    font-family: "Noto Sans Thai", "Inter", sans-serif;
    word-break: break-word;
    line-height: 1.9;
    overflow-wrap: break-word;
}

html[lang="th"] h1, html[lang="th"] h2,
html[lang="th"] h3, html[lang="th"] h4 {
    font-family: "Noto Sans Thai", serif;
    line-height: 2.0;
}

/* Japanese (JA) */
html[lang="ja"] body,
html[lang="ja"] p,
html[lang="ja"] .manifesto-paragraph {
    font-family: "Noto Sans JP", "Inter", sans-serif;
    line-break: strict;
    overflow-wrap: break-word;
    line-height: 1.9;
}

html[lang="ja"] h1, html[lang="ja"] h2,
html[lang="ja"] h3, html[lang="ja"] h4 {
    font-family: "Noto Sans JP", "Cormorant Garamond", serif;
    line-height: 1.7;
}

/* Chinese (ZH) */
html[lang="zh"] body,
html[lang="zh"] p,
html[lang="zh"] .manifesto-paragraph {
    font-family: "Noto Sans SC", "Inter", sans-serif;
    line-height: 1.9;
    overflow-wrap: break-word;
    font-size: 0.92rem;
}

html[lang="zh"] h1, html[lang="zh"] h2,
html[lang="zh"] h3, html[lang="zh"] h4 {
    font-family: "Noto Sans SC", "Cormorant Garamond", serif;
}

/* Korean (KO) — Noto Serif KR for headings (thin elegance), Noto Sans KR for body */
html[lang="ko"] body,
html[lang="ko"] p,
html[lang="ko"] .manifesto-paragraph,
html[lang="ko"] .note-intro-text,
html[lang="ko"] .bio-paragraph,
html[lang="ko"] .contact-sub,
html[lang="ko"] .concept-body,
html[lang="ko"] .critic-essay-text,
html[lang="ko"] .archive-panel-text,
html[lang="ko"] .bio-text {
    font-family: 'Noto Sans KR', 'Inter', sans-serif;
    font-weight: 300;
    word-break: keep-all;
    overflow-wrap: break-word;
    line-height: 1.9;
}

html[lang="ko"] h1, html[lang="ko"] h2,
html[lang="ko"] h3, html[lang="ko"] h4,
html[lang="ko"] .section-heading,
html[lang="ko"] .concept-title,
html[lang="ko"] .archive-title,
html[lang="ko"] .critic-essay-title,
html[lang="ko"] .bio-sub-title,
html[lang="ko"] .row-title {
    font-family: 'Noto Serif KR', 'Cormorant Garamond', serif;
    font-weight: 300;
    letter-spacing: -0.01em;
    line-height: 1.6;
}

/* Korean reading copy must never expand spaces to fill the line width. */
html[lang="ko"] #texts .critic-essay-body,
html[lang="ko"] #texts .critic-essay-body p,
html[lang="ko"] #texts .note-intro-text,
html[lang="ko"] #texts .note-intro-text p,
html[lang="ko"] #texts .bio-text,
html[lang="ko"] #texts .bio-text p,
html[lang="ko"] #texts .education-list {
    text-align: left !important;
    text-align-last: auto !important;
    text-justify: auto;
    letter-spacing: -0.02em;
    word-spacing: 0;
    word-break: keep-all;
    overflow-wrap: break-word;
}

/* Lang button active state */
.lang-btn.active {
    color: var(--accent-crimson);
    font-weight: 600;
    border-bottom: 1.5px solid var(--accent-crimson);
    padding-bottom: 1px;
}


/* ==========================================================================
   EXHIBITION HISTORY — ACCORDION LIST
   ========================================================================== */

/* Section header */
.exhibitions-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1.5rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.archive-filters {
    display: flex;
    gap: 1.8rem;
    flex-wrap: wrap;
}

/* List container */
.main-cv-container {
    padding: 2.5rem 0;
}

.exhibitions-list {
    display: flex;
    flex-direction: column;
}

/* Each row */
.exhibition-row {
    border-bottom: none; /* 블록형 디자인을 위해 줄 제거 */
}

.exhibition-row:first-child {
    border-top: none;
}

/* Row header — always visible, clickable */
.exhibition-row-header {
    display: grid;
    grid-template-columns: 4rem 10rem 1fr auto;
    align-items: center;
    gap: 1.5rem;
    padding: 1rem 1.5rem; /* 블록형 텍스트박스 느낌을 위해 좌우 패딩 추가 */
    background-color: rgba(0,0,0,0.01); /* 아주 연한 배경으로 블록 느낌 */
    border-radius: 4px; /* 약간 둥근 모서리 */
    margin-bottom: 0.5rem; /* 행 간 간격 */
    cursor: default;
    transition: background-color 0.2s ease;
    user-select: none;
}

.exhibition-row.has-content .exhibition-row-header {
    cursor: pointer;
}

.exhibition-row.has-content .exhibition-row-header:hover {
    background-color: rgba(0,0,0,0.02);
}

.row-year {
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-main);
    letter-spacing: 0.02em;
    flex-shrink: 0;
}

.row-type {
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 0.02em;
    color: var(--text-muted);
    flex-shrink: 0;
}

.row-title {
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--text-main);
    line-height: 1.6;
}

.row-toggle {
    font-family: var(--font-body);
    font-size: 1.2rem;
    font-weight: 300;
    color: var(--text-muted);
    width: 24px;
    text-align: center;
    flex-shrink: 0;
    transition: transform 0.3s ease, color 0.2s ease;
}

.exhibition-row.expanded .row-toggle {
    color: var(--accent-crimson);
    transform: rotate(45deg);
}

.row-toggle-placeholder {
    width: 24px;
    flex-shrink: 0;
}

/* Detail panel — hidden by default, expands on click */
.exhibition-row-detail {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.detail-content {
    padding: 1.5rem 0 2.5rem 5.5rem;
}

/* Text description inside detail */
.detail-desc {
    font-family: var(--font-body);
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.75;
    margin-bottom: 1.5rem;
    max-width: 680px;
    white-space: pre-line;
}

/* Image carousel inside accordion */
.carousel-container {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
    -webkit-overflow-scrolling: touch;
}

.carousel-container::-webkit-scrollbar {
    height: 4px;
}
.carousel-container::-webkit-scrollbar-track { background: transparent; }
.carousel-container::-webkit-scrollbar-thumb {
    background-color: var(--border-color);
    border-radius: 2px;
}

.carousel-item {
    flex: 0 0 auto;
    width: 280px;
    cursor: pointer;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.carousel-item:hover {
    border-color: #c8c4be;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.carousel-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
    pointer-events: none;
    -webkit-user-drag: none;
}

.carousel-item:hover img {
    transform: scale(1.03);
}

/* Lightbox for exhibition images */
.exhibition-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(0,0,0,0.92);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.exhibition-lightbox.show {
    display: flex;
}
.exhibition-lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.exhibition-lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    color: white;
    font-size: 2rem;
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
    line-height: 1;
}
.exhibition-lightbox-close:hover { opacity: 1; }

/* Responsive */
@media (max-width: 768px) {
    .exhibition-row-header {
        grid-template-columns: 3rem 1fr auto;
        gap: 0.8rem;
        padding: 0.8rem 1rem;
    }
    .row-type {
        display: none;
    }
    .row-title {
        font-size: 0.92rem;
    }
    .detail-content {
        padding: 1rem 0 1.5rem 0;
    }
    .carousel-item {
        width: 220px;
    }
    .carousel-item img {
        height: 160px;
    }
    .exhibitions-header {
        flex-direction: column;
        gap: 1rem;
        margin-bottom: 0.5rem;
    }
    .main-cv-container {
        padding-top: 0.5rem;
    }
    .archive-filters {
        gap: 1.2rem;
    }
}

/* ─── Note Pagination & Headings ───────────────────────────────────── */
.note-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2.2rem;
    font-family: var(--font-body);
}

.note-page-title {
    font-family: 'Noto Serif KR', 'Cormorant Garamond', serif;
    font-size: 1.85rem;
    font-weight: 300;
    margin-bottom: 0.8rem;
    color: var(--text-primary);
    text-align: center;
    letter-spacing: -0.01em;
    line-height: 1.4;
}

.note-page-subtitle {
    font-family: var(--font-body);
    font-size: 1.05rem;
    font-weight: 400;
    margin-bottom: 0.6rem;
    color: var(--text-primary);
    text-align: center;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.note-page-subtitle2 {
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 300;
    margin-bottom: 2.5rem;
    color: var(--text-muted);
    text-align: center;
    letter-spacing: 0.02em;
}

html[lang="ko"] .note-page-title {
    font-family: 'Noto Serif KR', serif;
    font-weight: 400;
}

html[lang="ko"] .note-page-subtitle {
    font-family: 'Noto Sans KR', sans-serif;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
}

html[lang="ko"] .note-page-subtitle2 {
    font-family: 'Noto Sans KR', sans-serif;
    font-weight: 300;
    letter-spacing: 0;
}

/* ==========================================================================
   ADDED BY ANTIGRAVITY — MOBILE UX & LAYOUT OPTIMIZATIONS
   ========================================================================== */

/* 1. Prevent Horizontal Wobble completely */
html, body {
    max-width: 100vw;
}

/* 2. Fix iOS Safari Auto-Zoom Bug (Inputs must be >=16px) */
input, textarea, select {
    font-size: 16px !important;
}

/* 3. Force Works Modal Close Button to always be clickable */
.works-modal-close {
    z-index: 99999 !important;
    pointer-events: auto !important;
}

@media (max-width: 768px) {
    /* 4. Force 1-Column Grid (override any conflicting media queries) */
    .works-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
        width: 100%;
        max-width: 100vw;
    }

    /* 5. Slimmer Mobile Header & Centered Menu */
    .museum-header {
        flex-direction: column;
        align-items: center;
        padding: 0.8rem 1rem 0.5rem;
        gap: 0.8rem;
    }
    .brand-logo {
        text-align: center;
        width: 100%;
        margin-bottom: 0.2rem;
    }
    .museum-nav {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        justify-content: center; /* Center all items */
        gap: 0.8rem 1.2rem; /* Vertical and horizontal gaps */
        padding-bottom: 0.2rem;
    }
    .nav-link {
        font-size: 0.75rem;
        white-space: nowrap;
    }
    .lang-switch {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        justify-content: center; /* Center languages */
        gap: 0.8rem;
    }
    .lang-btn {
        font-size: 0.7rem;
    }

    /* 6. Tighter Mobile Typography & Spacing */
    .section-title {
        font-size: 1.6rem;
    }
    .hero-title {
        font-size: 1.8rem;
        margin-bottom: 0.5rem;
    }
    .manifesto-paragraph,
    .hero-essay p,
    .note-content p,
    p {
        font-size: 0.9rem !important;
        line-height: 1.4 !important;
        margin-bottom: 0.8rem !important;
    }
    h2 {
        font-size: 1.4rem;
        margin-bottom: 0.8rem;
    }
    h3 {
        font-size: 1.2rem;
    }

    /* 7. Reduce gaps and fix centering (Hero & Gallery) */
    .museum-content {
        padding: 1.5rem 1rem 4rem 1rem;
    }
    .museum-section {
        padding: 1.5rem 0;
    }
    #elan-vital {
        padding-top: 0 !important; /* Close the gap above the red horse */
    }
    .work-card {
        margin: 0 auto;
        width: 100%;
        max-width: 420px; /* Center perfectly on mobile */
    }
    .image-placeholder {
        width: 100% !important;
        background-color: transparent !important;
    }
}

/* ==========================================================================
   RESPONSIVE GALLERY SYSTEM
   One source of truth for desktop, tablet, and mobile proportions.
   ========================================================================== */

.museum-header {
    min-height: 5rem;
    padding: 1.35rem clamp(1.5rem, 3vw, 3.5rem) 0.85rem;
    align-items: flex-start;
    border-bottom: none;
    background: rgba(255, 255, 255, 0.96);
}

.brand-logo {
    flex: 0 0 auto;
    gap: 0.18rem;
    text-align: left;
}

.brand-link:focus-visible,
.nav-link:focus-visible {
    outline: 1px solid var(--text-muted);
    outline-offset: 4px;
}

.museum-nav {
    flex: 0 0 auto;
    justify-content: flex-end;
    gap: clamp(1.4rem, 2.4vw, 3rem);
    margin-top: 0.35rem;
}

.museum-content {
    width: min(100%, 1440px);
    max-width: none;
    padding-inline: clamp(1.5rem, 5vw, 5rem);
}

#elan-vital.museum-section {
    display: flex;
    align-items: center;
    justify-content: center;
    height: calc(100dvh - 5rem);
    min-height: 560px;
    padding: clamp(1.25rem, 3vh, 2.5rem) 0;
}

#elan-vital .hero-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

#elan-vital .hero-image-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 1200px;
    height: 100%;
}

#elan-vital .hero-image-wrapper img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

#works.museum-section {
    width: min(100%, 1180px);
    margin-inline: auto;
    padding-top: clamp(1.5rem, 3vh, 2.5rem);
}

#works .works-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(1.2rem, 2.4vw, 2.8rem);
}

#works .image-placeholder {
    height: clamp(220px, calc((100svh - 270px) / 2), 390px);
}

@media (max-width: 1100px) {
    .museum-header {
        padding-inline: 2rem;
    }

    .museum-content {
        padding-inline: clamp(1.5rem, 4vw, 3rem);
    }

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

    #works .image-placeholder {
        height: clamp(260px, 42vw, 440px);
    }
}

@media (max-width: 768px) {
    .museum-header {
        position: sticky;
        top: 0;
        z-index: 1000;
        background-color: #ffffff !important;
        -webkit-backdrop-filter: none !important;
        backdrop-filter: none !important;
        min-height: 0;
        padding: 1.15rem 1.25rem 1rem !important;
        gap: 1.15rem !important;
        align-items: stretch !important;
    }

    .brand-logo {
        flex: none;
        width: auto !important;
        margin: 0 !important;
        gap: 0.08rem;
        text-align: left !important;
    }

    .brand-link {
        width: fit-content;
        font-size: clamp(1.8rem, 9vw, 2.35rem) !important;
        line-height: 1 !important;
    }

    .brand-logo > span {
        font-size: 0.62rem !important;
        line-height: 1.45 !important;
    }

    .museum-nav {
        flex: none;
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        gap: 0.45rem 1.5rem !important;
    }

    .museum-nav .nav-link {
        width: fit-content;
        padding-block: 0.35rem;
        font-size: 0.7rem !important;
    }

    .museum-content {
        width: 100%;
        padding: 0 1rem 3rem !important;
    }

    #elan-vital.museum-section {
        height: auto !important;
        min-height: 0;
        padding: 1rem 0 2rem !important;
    }

    #elan-vital .hero-container,
    #elan-vital .hero-image-wrapper {
        width: 100%;
        height: auto;
        max-width: none;
    }

    #elan-vital .hero-image-wrapper img {
        width: 100%;
        height: auto;
        max-height: none;
    }

    #works.museum-section {
        padding: 1rem 0 2rem;
    }

    #works .works-grid {
        grid-template-columns: 1fr !important;
        gap: 1.25rem !important;
    }

    #works .work-card {
        width: 100%;
        max-width: 560px;
    }

    #works .image-placeholder {
        height: auto;
        min-height: 0;
        aspect-ratio: 4 / 5;
    }
}

@media (max-width: 900px) and (orientation: landscape) {
    .museum-header {
        position: sticky;
        top: 0;
        z-index: 1000;
        background-color: #ffffff !important;
        -webkit-backdrop-filter: none !important;
        backdrop-filter: none !important;
        display: grid;
        grid-template-columns: auto 1fr;
        align-items: center !important;
        min-height: 0;
        padding: 0.75rem 1.25rem !important;
        gap: 1.5rem !important;
    }

    .museum-nav {
        display: flex !important;
        justify-content: flex-end;
        gap: clamp(0.9rem, 3vw, 2rem) !important;
    }

    #elan-vital.museum-section {
        height: auto !important;
        min-height: 0;
        padding: 1rem 0 1.5rem !important;
    }

    #elan-vital .hero-image-wrapper img {
        width: auto;
        max-width: 100%;
        max-height: calc(100dvh - 7rem);
    }

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

/* ==========================================================================
   MOBILE CONTENT DENSITY
   Keep artwork, metadata, and reading content together in the first viewport.
   ========================================================================== */

@media (max-width: 768px) {
    /* Artwork modal: reserve a dark strip above the card for the close control. */
    .works-modal {
        align-items: flex-start;
        padding: max(3.25rem, env(safe-area-inset-top)) 0.6rem 0.6rem;
        overflow-y: auto;
    }

    .works-modal-content {
        width: 100%;
        height: auto;
        max-height: calc(100dvh - max(3.85rem, env(safe-area-inset-top)));
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    .works-modal-content > .works-modal-close {
        display: none;
    }

    .works-modal-close-mobile {
        position: absolute;
        top: max(0.35rem, env(safe-area-inset-top));
        right: 0.75rem;
        z-index: 11001;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 2.5rem;
        height: 2.5rem;
        padding: 0;
        border: 0;
        background: transparent;
        color: #fff;
        font-size: 2.15rem;
        font-weight: 300;
        line-height: 1;
        opacity: 0.9;
        cursor: pointer;
    }

    .works-modal-layout {
        display: flex;
        flex-direction: column;
        height: auto;
        max-height: none;
        overflow: visible;
    }

    .works-modal-image-col {
        flex: 0 0 auto;
        width: 100%;
        height: min(56dvh, 31rem);
        padding: 0.6rem;
        overflow: hidden;
    }

    .works-modal-image-col img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

    .works-modal-info-col {
        flex: 0 0 auto;
        height: auto;
        min-height: 0;
        padding: 0.85rem 1rem 0.9rem !important;
        justify-content: flex-start;
    }

    .works-modal-title {
        margin: 0 0 0.25rem;
        font-size: 0.92rem;
        line-height: 1.3;
    }

    .works-modal-specs {
        gap: 0.15rem;
    }

    .works-modal-specs .spec-value {
        font-size: 0.78rem;
        line-height: 1.35;
    }

    .works-modal-nav {
        gap: 2.25rem;
        margin-top: 0.35rem;
    }

    .modal-nav-btn {
        padding: 0.2rem 0.65rem;
        font-size: 1.2rem;
    }

    /* Exhibition filters should lead directly into the selected content. */
    #exhibitions.museum-section {
        padding-top: 0.75rem;
    }

    .exhibitions-header {
        gap: 0.45rem;
        margin-bottom: 0 !important;
        padding-bottom: 0.65rem;
    }

    .archive-filters {
        width: 100%;
        gap: 0.55rem 1rem;
    }

    #exhibitions-container,
    .main-cv-container {
        margin-top: 0 !important;
        padding-top: 0.5rem !important;
    }

    .main-cv-container {
        padding-bottom: 1rem !important;
    }

    .main-cv-container .cv-section {
        margin-bottom: 1.75rem !important;
    }

    .main-cv-container .cv-section h3 {
        margin-bottom: 0.65rem !important;
        padding-bottom: 0.35rem !important;
    }

    /* Text tabs, hero image, and copy should read as one continuous block. */
    #texts.museum-section {
        padding: 0.75rem 0 2rem;
    }

    #texts .texts-tab-header {
        margin-bottom: 0.55rem !important;
    }

    #texts .text-tab-content {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }

    #texts .note-hero-banner {
        margin: 0 0 0.55rem;
    }

    #texts .note-intro-text {
        margin-top: 0;
        padding-top: 1.1rem;
    }

    #content-biography .bio-container,
    #content-criticism .critic-tab-container {
        margin-top: 0;
    }

    #content-criticism .critic-tabs {
        margin-bottom: 1rem;
        padding-bottom: 0.65rem;
    }

    #content-criticism .critic-layout {
        gap: 0.75rem;
    }

    #content-criticism .critic-text-col {
        padding-top: 1.1rem;
    }
}

@media (max-width: 900px) and (orientation: landscape) {
    .works-modal {
        padding-top: max(2.75rem, env(safe-area-inset-top));
    }

    .works-modal-content > .works-modal-close {
        display: none;
    }

    .works-modal-close-mobile {
        position: absolute;
        top: max(0.2rem, env(safe-area-inset-top));
        right: 0.75rem;
        z-index: 11001;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 2.25rem;
        height: 2.25rem;
        padding: 0;
        border: 0;
        background: transparent;
        color: #fff;
        font-size: 2rem;
        font-weight: 300;
        line-height: 1;
        opacity: 0.9;
        cursor: pointer;
    }

    .works-modal-content {
        max-height: calc(100dvh - max(3.25rem, env(safe-area-inset-top)));
    }

    .works-modal-layout {
        display: grid;
        grid-template-columns: minmax(0, 1.4fr) minmax(15rem, 0.6fr);
        grid-template-rows: 1fr;
        height: 100%;
    }

    .works-modal-image-col,
    .works-modal-info-col {
        height: 100%;
    }
}
