/*
 * George Washington Carver Life - Redesigned CSS
 * Premium Museum-Quality Design with Rich Imagery
 * Version 3.0 - March 2026
 */

/* ========================================
   CSS CUSTOM PROPERTIES
   ======================================== */
:root {
    /* New Color System - Warm Earth & Nature */
    --color-primary: #1B3A2D;
    --color-primary-light: #2D5A45;
    --color-secondary: #8B4513;
    --color-accent: #C8A951;
    --color-accent-bright: #E8C564;
    --color-terracotta: #C4622D;

    --color-bg-primary: #FAF7F2;
    --color-bg-secondary: #F0EBE1;
    --color-bg-tertiary: #E8E0D4;
    --color-bg-dark: #1A1A1A;
    --color-bg-black: #0D0D0D;
    --color-bg-card: #FFFFFF;

    --color-text-primary: #1A1612;
    --color-text-secondary: #4A4035;
    --color-text-muted: #7A7060;
    --color-text-light: #FAFAFA;
    --color-text-on-dark: #E8E0D4;

    --color-border-light: #D8D0C4;
    --color-border-medium: #B0A898;
    --color-border-dark: #1A1612;

    /* Typography */
    --font-family-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    --font-family-serif: 'Playfair Display', 'Georgia', 'Cambria', serif;
    --font-family-mono: 'JetBrains Mono', 'Consolas', monospace;

    --font-size-xs: clamp(0.7rem, 0.65rem + 0.25vw, 0.8rem);
    --font-size-sm: clamp(0.8rem, 0.75rem + 0.25vw, 0.9rem);
    --font-size-base: clamp(0.95rem, 0.9rem + 0.25vw, 1.05rem);
    --font-size-lg: clamp(1.1rem, 1rem + 0.5vw, 1.3rem);
    --font-size-xl: clamp(1.3rem, 1.1rem + 1vw, 1.8rem);
    --font-size-2xl: clamp(1.6rem, 1.3rem + 1.5vw, 2.6rem);
    --font-size-3xl: clamp(2.2rem, 1.6rem + 3vw, 4.2rem);
    --font-size-4xl: clamp(2.8rem, 2rem + 4vw, 5.5rem);
    --font-size-hero: clamp(3rem, 2rem + 5vw, 6.5rem);

    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --font-weight-black: 900;

    --line-height-tight: 1.15;
    --line-height-snug: 1.3;
    --line-height-normal: 1.6;
    --line-height-relaxed: 1.85;

    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.5rem;
    --space-6: 2rem;
    --space-8: 3rem;
    --space-10: 4rem;
    --space-12: 5rem;
    --space-16: 8rem;
    --space-20: 10rem;

    /* Layout */
    --container-max-width: 1280px;
    --container-padding: var(--space-4);
    --border-radius-sm: 4px;
    --border-radius-md: 8px;
    --border-radius-lg: 16px;
    --border-radius-xl: 24px;
    --border-radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(26, 22, 18, 0.06), 0 1px 2px rgba(26, 22, 18, 0.04);
    --shadow-md: 0 4px 12px rgba(26, 22, 18, 0.08), 0 2px 4px rgba(26, 22, 18, 0.04);
    --shadow-lg: 0 12px 40px rgba(26, 22, 18, 0.12), 0 4px 12px rgba(26, 22, 18, 0.06);
    --shadow-xl: 0 24px 60px rgba(26, 22, 18, 0.16), 0 8px 20px rgba(26, 22, 18, 0.08);
    --shadow-card: 0 2px 8px rgba(26, 22, 18, 0.06), 0 0 1px rgba(26, 22, 18, 0.1);
    --shadow-card-hover: 0 16px 48px rgba(26, 22, 18, 0.14), 0 4px 12px rgba(26, 22, 18, 0.06);
    --shadow-glow: 0 0 40px rgba(200, 169, 81, 0.15);

    /* Z-index */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --color-bg-primary: #0D0F0E;
        --color-bg-secondary: #161A18;
        --color-bg-tertiary: #1E2420;
        --color-bg-card: #1A1E1C;

        --color-text-primary: #E8E2D8;
        --color-text-secondary: #B8B0A0;
        --color-text-muted: #8A8070;

        --color-border-light: #2A2E2C;
        --color-border-medium: #404440;
        --color-border-dark: #E8E2D8;

        --color-accent: #DBC06A;
        --color-accent-bright: #EDD57A;
        --color-primary-light: #3A7A5D;

        --shadow-card: 0 2px 8px rgba(0,0,0,0.3), 0 0 1px rgba(0,0,0,0.4);
        --shadow-card-hover: 0 16px 48px rgba(0,0,0,0.4), 0 4px 12px rgba(0,0,0,0.3);
    }
}

[data-theme="dark"] {
    --color-bg-primary: #0D0F0E;
    --color-bg-secondary: #161A18;
    --color-bg-tertiary: #1E2420;
    --color-bg-card: #1A1E1C;

    --color-text-primary: #E8E2D8;
    --color-text-secondary: #B8B0A0;
    --color-text-muted: #8A8070;

    --color-border-light: #2A2E2C;
    --color-border-medium: #404440;
    --color-border-dark: #E8E2D8;

    --color-accent: #DBC06A;
    --color-accent-bright: #EDD57A;
    --color-primary-light: #3A7A5D;

    --shadow-card: 0 2px 8px rgba(0,0,0,0.3), 0 0 1px rgba(0,0,0,0.4);
    --shadow-card-hover: 0 16px 48px rgba(0,0,0,0.4), 0 4px 12px rgba(0,0,0,0.3);
}

/* ========================================
   RESET & BASE
   ======================================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    scroll-behavior: smooth;
    hanging-punctuation: first last;
}

body {
    font-family: var(--font-family-primary);
    font-size: var(--font-size-base);
    line-height: var(--line-height-normal);
    color: var(--color-text-primary);
    background-color: var(--color-bg-primary);
    overflow-x: hidden;
    min-height: 100vh;
    transition: background-color var(--transition-base), color var(--transition-base);
}

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

/* ========================================
   TYPOGRAPHY
   ======================================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family-serif);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    margin-bottom: var(--space-4);
    color: var(--color-text-primary);
    letter-spacing: -0.01em;
}

h1 { font-size: var(--font-size-3xl); }
h2 { font-size: var(--font-size-2xl); }
h3 { font-size: var(--font-size-xl); }
h4 { font-size: var(--font-size-lg); }
h5 { font-size: var(--font-size-base); }
h6 { font-size: var(--font-size-sm); }

p {
    margin-bottom: var(--space-4);
    color: var(--color-text-secondary);
    line-height: var(--line-height-relaxed);
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-accent);
}

a:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 3px;
    border-radius: 2px;
}

/* ========================================
   LAYOUT
   ======================================== */
.container {
    max-width: var(--container-max-width);
    margin-inline: auto;
    padding-inline: var(--container-padding);
    width: 100%;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    top: -60px;
    left: 0;
    background: var(--color-primary);
    color: #fff;
    padding: var(--space-3) var(--space-5);
    z-index: var(--z-tooltip);
    transition: top var(--transition-fast);
    font-weight: var(--font-weight-semibold);
    border-radius: 0 0 var(--border-radius-md) 0;
}

.skip-link:focus {
    top: 0;
    color: #fff;
}

/* ========================================
   DARK MODE TOGGLE
   ======================================== */
.dark-mode-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    border-radius: var(--border-radius-full);
    background: var(--color-bg-card);
    color: var(--color-text-primary);
    border: 1px solid var(--color-border-light);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-fixed);
    transition: all var(--transition-base);
    font-size: 1.25rem;
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(12px);
}

.dark-mode-toggle:hover {
    transform: scale(1.08);
    box-shadow: var(--shadow-lg);
}

.dark-mode-toggle:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 3px;
}

.dark-mode-icon {
    display: block;
    line-height: 1;
}

/* ========================================
   SITE HEADER / HERO
   ======================================== */
header {
    background: var(--color-primary);
    color: #fff;
    padding: var(--space-16) 0 var(--space-12);
    position: relative;
    overflow: hidden;
    text-align: center;
    min-height: 70vh;
    display: flex;
    align-items: center;
}

header::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(13, 13, 13, 0.4) 0%, rgba(27, 58, 45, 0.85) 50%, rgba(27, 58, 45, 0.95) 100%);
    z-index: 1;
}

header::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('GeorgeWashingtonCarverImage01.jpg');
    background-size: cover;
    background-position: center 20%;
    background-repeat: no-repeat;
    z-index: 0;
    filter: grayscale(30%) contrast(1.1);
}

.header-content {
    position: relative;
    z-index: 2;
    width: 100%;
}

header h1 {
    color: #fff;
    font-size: var(--font-size-hero);
    font-weight: var(--font-weight-black);
    letter-spacing: -0.03em;
    margin-bottom: var(--space-5);
    line-height: 1.05;
    text-shadow: 0 2px 30px rgba(0,0,0,0.3);
}

.subtitle {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-normal);
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: var(--space-8);
    font-family: var(--font-family-primary);
    letter-spacing: 0.02em;
    max-width: 700px;
    margin-inline: auto;
}

/* Hero Stats */
.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--space-4);
    margin-top: var(--space-10);
    max-width: 960px;
    margin-inline: auto;
}

.stat-item {
    text-align: center;
    padding: var(--space-5) var(--space-4);
    border-radius: var(--border-radius-lg);
    transition: all var(--transition-base);
    text-decoration: none;
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 140px;
    position: relative;
    overflow: hidden;
}

.stat-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(200, 169, 81, 0.15) 0%, transparent 60%);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.stat-item:hover::before {
    opacity: 1;
}

.stat-item.clickable {
    cursor: pointer;
}

.stat-item.clickable:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(200, 169, 81, 0.5);
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
}

.stat-number {
    font-size: var(--font-size-3xl);
    font-weight: var(--font-weight-black);
    display: block;
    margin-bottom: var(--space-1);
    font-family: var(--font-family-serif);
    color: var(--color-accent-bright);
}

.stat-label {
    font-size: var(--font-size-xs);
    opacity: 0.85;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    line-height: var(--line-height-snug);
    font-weight: var(--font-weight-medium);
}

/* ========================================
   SEARCH & NAVIGATION
   ======================================== */
.search-nav {
    background: var(--color-bg-card);
    padding: var(--space-4) 0;
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
    border-bottom: 1px solid var(--color-border-light);
    text-align: center;
    transition: box-shadow var(--transition-base);
}

.search-nav.scrolled {
    box-shadow: var(--shadow-md);
}

.nav-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-5);
}

.search-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-4);
    width: 100%;
    max-width: 600px;
    margin-inline: auto;
}

.search-box {
    flex: 1;
    padding: var(--space-3) var(--space-5);
    border: 1px solid var(--color-border-light);
    background: var(--color-bg-primary);
    color: var(--color-text-primary);
    font-size: var(--font-size-base);
    border-radius: var(--border-radius-full);
    width: 100%;
    transition: all var(--transition-base);
    font-family: var(--font-family-primary);
}

.search-box:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(27, 58, 45, 0.12);
    background: var(--color-bg-card);
}

.search-box::placeholder {
    color: var(--color-text-muted);
}

nav {
    background: var(--color-bg-card);
    padding: var(--space-3) 0 var(--space-4);
    border-bottom: 1px solid var(--color-border-light);
    text-align: center;
}

.filters {
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
    justify-content: center;
}

.filter-btn {
    padding: var(--space-2) var(--space-4);
    background: transparent;
    color: var(--color-text-secondary);
    border: 1px solid var(--color-border-light);
    cursor: pointer;
    transition: all var(--transition-base);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    border-radius: var(--border-radius-full);
    font-family: var(--font-family-primary);
    min-height: 40px;
    min-width: 40px;
    letter-spacing: 0.01em;
}

.filter-btn:hover {
    background: var(--color-bg-secondary);
    border-color: var(--color-border-medium);
    color: var(--color-text-primary);
}

.filter-btn:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

.filter-btn.active {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}

/* ========================================
   MAIN CONTENT
   ======================================== */
main {
    padding: var(--space-10) 0 var(--space-12);
    text-align: center;
    min-height: 60vh;
}

.timeline-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr));
    gap: var(--space-6);
    margin-top: var(--space-6);
    justify-items: center;
}

/* ========================================
   TIMELINE CARDS - Premium Design
   ======================================== */
.timeline-card {
    background: var(--color-bg-card);
    border-radius: var(--border-radius-lg);
    transition: all var(--transition-base);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    max-width: 420px;
    width: 100%;
    animation: fadeIn 0.5s ease-out both;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--color-border-light);
}

.timeline-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-card-hover);
}

.timeline-card:focus-within {
    outline: 3px solid var(--color-accent);
    outline-offset: 3px;
}

.timeline-image {
    width: 100%;
    height: 240px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.timeline-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(to top, rgba(27, 58, 45, 0.6), transparent);
    pointer-events: none;
}

.timeline-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.timeline-card:hover .timeline-image img {
    transform: scale(1.06);
}

.placeholder-image {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--color-primary) 0%, #2D5A45 50%, #3A7A5D 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    transition: all var(--transition-slow);
    position: relative;
}

.placeholder-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 40%, rgba(200, 169, 81, 0.2) 0%, transparent 60%);
}

.timeline-card:hover .placeholder-image {
    transform: scale(1.04);
}

.timeline-content {
    padding: var(--space-5) var(--space-5) var(--space-6);
    text-align: left;
}

.timeline-date {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--space-1);
    color: var(--color-primary);
}

.timeline-age {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-3);
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    font-weight: var(--font-weight-medium);
}

.event-title {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
    margin-bottom: var(--space-2);
    font-family: var(--font-family-serif);
    line-height: var(--line-height-snug);
}

.event-location {
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    margin-bottom: var(--space-3);
    font-weight: var(--font-weight-medium);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.event-description {
    font-size: var(--font-size-sm);
    line-height: var(--line-height-relaxed);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-4);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.category-tag {
    display: inline-block;
    background: var(--color-primary);
    color: #fff;
    padding: var(--space-1) var(--space-3);
    font-size: var(--font-size-xs);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-right: var(--space-2);
    border-radius: var(--border-radius-full);
    font-weight: var(--font-weight-semibold);
}

.importance-level {
    display: inline-block;
    font-size: var(--font-size-xs);
    color: var(--color-accent);
    font-weight: var(--font-weight-semibold);
    letter-spacing: 0.02em;
}

/* ========================================
   TIMELINE DETAIL PAGE
   ======================================== */
.timeline-detail {
    display: none;
    max-width: 800px;
    margin-inline: auto;
    padding: var(--space-8) var(--space-4);
}

.timeline-detail.active {
    display: block;
}

.event-header {
    text-align: center;
    margin-bottom: var(--space-8);
}

.event-portrait {
    width: min(320px, 100%);
    height: min(320px, 100%);
    margin-inline: auto;
    margin-bottom: var(--space-6);
    border-radius: var(--border-radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 4px solid var(--color-bg-card);
}

.event-portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.event-main-title {
    font-size: var(--font-size-2xl);
    margin-bottom: var(--space-3);
    color: var(--color-primary);
}

.event-date-location {
    font-size: var(--font-size-lg);
    color: var(--color-text-muted);
    margin-bottom: var(--space-6);
    font-weight: var(--font-weight-normal);
}

.event-highlight {
    background: var(--color-bg-secondary);
    padding: var(--space-6);
    margin: var(--space-6) 0;
    text-align: center;
    border-radius: var(--border-radius-lg);
    border-left: 4px solid var(--color-accent);
}

.event-highlight-title {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--space-3);
    color: var(--color-primary);
}

.detailed-description {
    font-size: var(--font-size-lg);
    line-height: var(--line-height-relaxed);
    margin: var(--space-6) 0;
    color: var(--color-text-secondary);
}

.impact-section, .context-section {
    margin-top: var(--space-6);
}

.impact-section h3, .context-section h3 {
    color: var(--color-primary);
    font-size: var(--font-size-xl);
    margin-bottom: var(--space-4);
}

.impact-list {
    list-style: none;
    padding: 0;
}

.impact-list li {
    padding: var(--space-3) 0;
    border-bottom: 1px solid var(--color-border-light);
    color: var(--color-text-secondary);
    line-height: var(--line-height-normal);
    text-align: left;
}

.impact-list li:last-child {
    border-bottom: none;
}

.impact-list li::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--color-accent);
    border-radius: var(--border-radius-full);
    margin-right: var(--space-3);
    vertical-align: middle;
}

/* Related Events */
.related-events-section {
    margin-top: var(--space-10);
    padding-top: var(--space-8);
    border-top: 1px solid var(--color-border-light);
}

.related-events-section h3 {
    font-size: var(--font-size-xl);
    margin-bottom: var(--space-6);
    text-align: center;
    color: var(--color-primary);
}

.related-events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-5);
    margin-top: var(--space-5);
}

.related-event-tile {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border-light);
    padding: var(--space-5);
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
}

.related-event-tile:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-accent);
}

.related-tile-emoji {
    font-size: 2.5rem;
    margin-bottom: var(--space-3);
    display: block;
}

.related-tile-date {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--space-1);
    color: var(--color-primary);
}

.related-tile-event {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-1);
}

.related-tile-location {
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
}

.relation-tag {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--color-primary);
    color: #fff;
    padding: 2px var(--space-2);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-radius: var(--border-radius-full);
    font-weight: var(--font-weight-semibold);
}

/* Back Button */
.back-btn {
    position: fixed;
    top: 80px;
    left: 20px;
    background: var(--color-bg-card);
    color: var(--color-text-primary);
    border: 1px solid var(--color-border-light);
    padding: var(--space-3) var(--space-5);
    cursor: pointer;
    font-size: var(--font-size-sm);
    z-index: var(--z-fixed);
    transition: all var(--transition-base);
    border-radius: var(--border-radius-full);
    font-weight: var(--font-weight-medium);
    min-height: 44px;
    font-family: var(--font-family-primary);
    box-shadow: var(--shadow-md);
}

.back-btn:hover {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.back-btn:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

body.viewing-event header {
    display: none;
}

body.viewing-event .search-nav,
body.viewing-event nav {
    display: none;
}

/* ========================================
   CARVER QUOTE SECTION
   ======================================== */
.carver-quote-section {
    background: var(--color-primary);
    padding: var(--space-12) 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.carver-quote-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(200, 169, 81, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 30%, rgba(200, 169, 81, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

.quote-container {
    max-width: 800px;
    margin-inline: auto;
    padding: var(--space-6);
    position: relative;
    z-index: 1;
}

.quote-container::before {
    content: '\201C';
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 8rem;
    font-family: var(--font-family-serif);
    color: var(--color-accent);
    opacity: 0.3;
    line-height: 1;
}

.quote-text {
    font-size: var(--font-size-xl);
    font-style: italic;
    line-height: var(--line-height-relaxed);
    margin-bottom: var(--space-5);
    color: rgba(255, 255, 255, 0.95);
    font-family: var(--font-family-serif);
}

.quote-attribution {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    color: var(--color-accent);
    letter-spacing: 0.04em;
}

/* ========================================
   FOOTER
   ======================================== */
footer {
    background: var(--color-bg-black);
    color: var(--color-text-on-dark);
    padding: var(--space-12) 0 0;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent), var(--color-primary));
}

.footer-main {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: var(--space-8);
    margin-bottom: var(--space-8);
    align-items: start;
}

.footer-brand {
    max-width: 380px;
}

.footer-brand h3 {
    font-size: var(--font-size-xl);
    margin-bottom: var(--space-4);
    color: #fff;
    font-weight: var(--font-weight-bold);
}

.footer-description {
    font-size: var(--font-size-sm);
    line-height: var(--line-height-relaxed);
    color: rgba(255, 255, 255, 0.65);
    margin-bottom: var(--space-5);
}

.social-links {
    display: flex;
    gap: var(--space-3);
    margin-top: var(--space-4);
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-md);
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: var(--font-size-base);
    transition: all var(--transition-base);
}

.social-links a:hover {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: var(--color-bg-black);
    transform: translateY(-2px);
}

.footer-section h4 {
    font-size: var(--font-size-xs);
    margin-bottom: var(--space-4);
    color: rgba(255, 255, 255, 0.5);
    font-weight: var(--font-weight-semibold);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-family: var(--font-family-primary);
}

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

.footer-section li {
    margin-bottom: var(--space-2);
}

.footer-section a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: var(--font-size-sm);
    transition: all var(--transition-fast);
    display: inline-block;
}

.footer-section a:hover {
    color: var(--color-accent);
}

.footer-contact {
    background: rgba(255, 255, 255, 0.04);
    padding: var(--space-5);
    border-radius: var(--border-radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-contact h4 {
    font-size: var(--font-size-xs);
    margin-bottom: var(--space-4);
    color: rgba(255, 255, 255, 0.5);
    font-weight: var(--font-weight-semibold);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-family: var(--font-family-primary);
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
    font-size: var(--font-size-sm);
}

.contact-icon {
    font-size: var(--font-size-base);
    margin-top: 2px;
    opacity: 0.6;
}

.contact-info {
    flex: 1;
}

.contact-info strong {
    color: rgba(255, 255, 255, 0.85);
    display: block;
    margin-bottom: 2px;
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-semibold);
}

.contact-info span {
    color: rgba(255, 255, 255, 0.55);
    font-size: var(--font-size-sm);
}

.contact-info span a {
    color: rgba(255, 255, 255, 0.55);
}

.contact-info span a:hover {
    color: var(--color-accent);
}

.newsletter-section {
    margin-top: var(--space-5);
    padding-top: var(--space-5);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.newsletter-section h5 {
    font-size: var(--font-size-sm);
    margin-bottom: var(--space-3);
    color: rgba(255, 255, 255, 0.85);
    font-weight: var(--font-weight-semibold);
}

.newsletter-signup {
    display: flex;
    gap: var(--space-2);
    margin-top: var(--space-3);
}

.newsletter-input {
    flex: 1;
    padding: var(--space-2) var(--space-4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    font-size: var(--font-size-sm);
    border-radius: var(--border-radius-md);
    transition: all var(--transition-base);
    font-family: var(--font-family-primary);
}

.newsletter-input:focus {
    outline: none;
    border-color: var(--color-accent);
    background: rgba(255, 255, 255, 0.1);
}

.newsletter-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.newsletter-btn {
    padding: var(--space-2) var(--space-4);
    background: var(--color-accent);
    color: var(--color-bg-black);
    border: none;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-bold);
    min-height: 40px;
    font-family: var(--font-family-primary);
}

.newsletter-btn:hover {
    background: var(--color-accent-bright);
    transform: translateY(-1px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: var(--space-5) 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-4);
    font-size: var(--font-size-xs);
    color: rgba(255, 255, 255, 0.35);
}

.footer-bottom-left {
    display: flex;
    align-items: center;
    gap: var(--space-5);
}

.footer-bottom-right {
    display: flex;
    gap: var(--space-5);
    align-items: center;
}

.footer-bottom a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    transition: color var(--transition-fast);
    font-size: var(--font-size-xs);
}

.footer-bottom a:hover {
    color: var(--color-accent);
}

.footer-legal {
    font-size: var(--font-size-xs);
    color: rgba(255, 255, 255, 0.35);
}

/* ========================================
   UTILITIES
   ======================================== */
.loading {
    text-align: center;
    padding: var(--space-10);
    font-size: var(--font-size-lg);
    color: var(--color-text-muted);
}

.no-results {
    text-align: center;
    padding: var(--space-10);
    font-size: var(--font-size-lg);
    color: var(--color-text-muted);
}

.hidden {
    display: none !important;
}

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Staggered animation for cards */
.timeline-card:nth-child(1) { animation-delay: 0s; }
.timeline-card:nth-child(2) { animation-delay: 0.08s; }
.timeline-card:nth-child(3) { animation-delay: 0.16s; }
.timeline-card:nth-child(4) { animation-delay: 0.24s; }
.timeline-card:nth-child(5) { animation-delay: 0.32s; }
.timeline-card:nth-child(6) { animation-delay: 0.4s; }
.timeline-card:nth-child(7) { animation-delay: 0.48s; }
.timeline-card:nth-child(8) { animation-delay: 0.56s; }
.timeline-card:nth-child(9) { animation-delay: 0.64s; }
.timeline-card:nth-child(10) { animation-delay: 0.72s; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ========================================
   RESPONSIVE - MOBILE FIRST
   ======================================== */
@media (min-width: 576px) {
    :root {
        --container-padding: var(--space-5);
    }
}

@media (min-width: 768px) {
    :root {
        --container-padding: var(--space-6);
    }

    .hero-stats {
        grid-template-columns: repeat(3, 1fr);
    }

    header {
        padding: var(--space-20) 0 var(--space-16);
        min-height: 80vh;
    }
}

@media (min-width: 992px) {
    .hero-stats {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* Mobile */
@media (max-width: 767px) {
    header {
        min-height: auto;
        padding: var(--space-12) 0 var(--space-8);
    }

    .nav-container {
        gap: var(--space-4);
    }

    .search-container {
        max-width: 100%;
    }

    .timeline-grid {
        grid-template-columns: 1fr;
        gap: var(--space-5);
    }

    .timeline-card {
        margin-inline: auto;
        max-width: 380px;
    }

    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
        max-width: 400px;
        gap: var(--space-3);
    }

    .stat-item {
        min-height: 110px;
        padding: var(--space-4) var(--space-3);
    }

    .stat-number {
        font-size: var(--font-size-2xl);
    }

    .back-btn {
        top: 16px;
        left: 16px;
        padding: var(--space-2) var(--space-4);
        font-size: var(--font-size-xs);
    }

    .footer-main {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }

    footer {
        padding: var(--space-8) 0 0;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: var(--space-4);
    }

    .footer-bottom-left,
    .footer-bottom-right {
        flex-direction: column;
        gap: var(--space-3);
    }

    .newsletter-signup {
        flex-direction: column;
    }

    .social-links {
        justify-content: center;
    }

    .filters {
        gap: var(--space-2);
        padding: 0 var(--space-2);
    }

    .filter-btn {
        padding: var(--space-1) var(--space-3);
        font-size: var(--font-size-xs);
        min-height: 36px;
    }

    .quote-container::before {
        font-size: 5rem;
        top: -10px;
    }
}

@media (max-width: 1024px) {
    .footer-main {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-6);
    }

    .footer-brand {
        max-width: none;
    }

    .footer-contact {
        grid-column: 1 / -1;
    }
}

@media (max-width: 480px) {
    .hero-stats {
        grid-template-columns: 1fr 1fr;
    }

    .stat-item {
        min-height: 100px;
        padding: var(--space-3);
    }

    .stat-number {
        font-size: var(--font-size-xl);
    }

    .stat-label {
        font-size: 0.6rem;
    }
}

/* ========================================
   PRINT
   ======================================== */
@media print {
    *, *::before, *::after {
        background: transparent !important;
        color: #000 !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }

    a, a:visited {
        text-decoration: underline;
    }

    a[href]::after {
        content: " (" attr(href) ")";
    }

    thead {
        display: table-header-group;
    }

    tr, img {
        page-break-inside: avoid;
    }

    p, h2, h3 {
        orphans: 3;
        widows: 3;
    }

    h2, h3 {
        page-break-after: avoid;
    }

    .back-btn, .search-nav, nav, footer, .dark-mode-toggle {
        display: none;
    }

    header {
        min-height: auto;
        padding: var(--space-6) 0;
    }
}

/* ========================================
   EXHIBIT V4 - INDEX STORY OVERHAUL
   Scoped to body.exhibit-v4 so other pages stay stable
   ======================================== */
body.exhibit-v4 {
    --font-family-primary: 'Sora', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-family-serif: 'Fraunces', 'Iowan Old Style', 'Palatino Linotype', serif;

    --color-primary: #0f3f38;
    --color-primary-light: #1d665b;
    --color-secondary: #7a4a26;
    --color-accent: #d8ab65;
    --color-accent-bright: #f5d8a2;

    --color-bg-primary: #f6efe3;
    --color-bg-secondary: #efe4d1;
    --color-bg-tertiary: #e4d7c2;
    --color-bg-card: #fffdf8;

    --color-text-primary: #1a251f;
    --color-text-secondary: #34473f;
    --color-text-muted: #6a7e73;

    --color-border-light: #d8cbb5;
    --color-border-medium: #b5a68d;

    --shadow-sm: 0 4px 12px rgba(22, 37, 33, 0.06);
    --shadow-md: 0 12px 28px rgba(22, 37, 33, 0.1);
    --shadow-lg: 0 20px 48px rgba(22, 37, 33, 0.13);
    --shadow-xl: 0 30px 72px rgba(14, 27, 24, 0.2);
    --shadow-card: 0 6px 20px rgba(14, 30, 26, 0.09);
    --shadow-card-hover: 0 20px 44px rgba(14, 30, 26, 0.16);
    --shadow-glow: 0 0 42px rgba(216, 171, 101, 0.25);

    background:
        radial-gradient(1200px 800px at 10% -10%, rgba(142, 188, 162, 0.28), transparent 68%),
        radial-gradient(1000px 700px at 100% 15%, rgba(216, 171, 101, 0.22), transparent 70%),
        linear-gradient(180deg, #f8f2e8 0%, #f2e8d8 52%, #ecdecc 100%);
}

html[data-theme="dark"] body.exhibit-v4 {
    --color-primary: #7ec5ad;
    --color-primary-light: #58a68c;
    --color-secondary: #d6a36d;
    --color-accent: #eac180;
    --color-accent-bright: #ffe1ac;

    --color-bg-primary: #0f1714;
    --color-bg-secondary: #15201c;
    --color-bg-tertiary: #1c2b25;
    --color-bg-card: #14211d;

    --color-text-primary: #e9e6dc;
    --color-text-secondary: #c8c6b8;
    --color-text-muted: #9ca69c;

    --color-border-light: #2b3b35;
    --color-border-medium: #405149;

    --shadow-sm: 0 8px 18px rgba(0, 0, 0, 0.25);
    --shadow-md: 0 16px 32px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 24px 48px rgba(0, 0, 0, 0.42);
    --shadow-card: 0 8px 20px rgba(0, 0, 0, 0.28);
    --shadow-card-hover: 0 20px 40px rgba(0, 0, 0, 0.45);

    background:
        radial-gradient(1300px 900px at 10% -10%, rgba(48, 88, 73, 0.35), transparent 70%),
        radial-gradient(1200px 900px at 100% 15%, rgba(164, 112, 58, 0.25), transparent 70%),
        linear-gradient(180deg, #0b120f 0%, #101b17 52%, #172721 100%);
}

@media (prefers-color-scheme: dark) {
    html:not([data-theme="light"]) body.exhibit-v4 {
        --color-primary: #7ec5ad;
        --color-primary-light: #58a68c;
        --color-secondary: #d6a36d;
        --color-accent: #eac180;
        --color-accent-bright: #ffe1ac;

        --color-bg-primary: #0f1714;
        --color-bg-secondary: #15201c;
        --color-bg-tertiary: #1c2b25;
        --color-bg-card: #14211d;

        --color-text-primary: #e9e6dc;
        --color-text-secondary: #c8c6b8;
        --color-text-muted: #9ca69c;

        --color-border-light: #2b3b35;
        --color-border-medium: #405149;
    }
}

body.exhibit-v4::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    background-image:
        linear-gradient(90deg, rgba(22, 52, 43, 0.035) 1px, transparent 1px),
        linear-gradient(rgba(22, 52, 43, 0.035) 1px, transparent 1px);
    background-size: 36px 36px;
    mix-blend-mode: multiply;
}

body.exhibit-v4 .container {
    max-width: 1240px;
}

body.exhibit-v4 p {
    line-height: 1.75;
}

body.exhibit-v4 h1,
body.exhibit-v4 h2,
body.exhibit-v4 h3,
body.exhibit-v4 h4,
body.exhibit-v4 h5,
body.exhibit-v4 h6 {
    letter-spacing: -0.018em;
}

body.exhibit-v4 .dark-mode-toggle {
    top: 18px;
    right: 18px;
    background: color-mix(in srgb, var(--color-bg-card) 80%, transparent);
    border-color: color-mix(in srgb, var(--color-border-light) 70%, transparent);
    box-shadow: var(--shadow-md);
}

body.exhibit-v4 header {
    min-height: clamp(620px, 92vh, 860px);
    display: flex;
    align-items: center;
    text-align: left;
    position: relative;
    isolation: isolate;
    padding: clamp(5rem, 10vw, 8rem) 0 clamp(3rem, 8vw, 5rem);
    overflow: hidden;
    background: transparent;
}

body.exhibit-v4 header::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(80% 100% at 10% 20%, rgba(120, 172, 138, 0.72), transparent 72%),
        radial-gradient(90% 120% at 95% 0%, rgba(224, 176, 98, 0.62), transparent 70%),
        linear-gradient(135deg, rgba(11, 44, 38, 0.95) 0%, rgba(19, 78, 67, 0.9) 48%, rgba(115, 64, 33, 0.84) 100%);
}

body.exhibit-v4 header::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(120deg, rgba(255, 255, 255, 0.08) 0 2px, transparent 2px 100%),
        linear-gradient(300deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 100%);
    background-size: 92px 92px, 68px 68px;
    opacity: 0.42;
}

body.exhibit-v4 .header-content {
    width: 100%;
}

body.exhibit-v4 .hero-story-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: clamp(1.8rem, 4vw, 3.5rem);
    align-items: center;
}

body.exhibit-v4 .hero-copy {
    max-width: 700px;
}

body.exhibit-v4 .hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.85rem;
    background: rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.72rem;
    font-weight: 700;
    margin-bottom: 1.1rem;
}

body.exhibit-v4 header h1 {
    color: #ffffff;
    font-size: clamp(2.8rem, 7vw, 6.2rem);
    line-height: 0.96;
    margin-bottom: 1.25rem;
    text-shadow: 0 4px 36px rgba(0, 0, 0, 0.35);
}

body.exhibit-v4 .subtitle {
    margin-inline: 0;
    max-width: 64ch;
    color: rgba(255, 255, 255, 0.92);
    font-size: clamp(1rem, 1.7vw, 1.35rem);
    margin-bottom: 2rem;
}

body.exhibit-v4 .hero-cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
}

body.exhibit-v4 .hero-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0.65rem 1.2rem;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    transition: transform var(--transition-base), box-shadow var(--transition-base), background var(--transition-base), border-color var(--transition-base);
}

body.exhibit-v4 .hero-cta-primary {
    background: linear-gradient(135deg, #f3d392 0%, #d7a45d 100%);
    color: #2e2416;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

body.exhibit-v4 .hero-cta-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.24);
}

body.exhibit-v4 .hero-cta-secondary {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.08);
}

body.exhibit-v4 .hero-cta-secondary:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.15);
}

body.exhibit-v4 .hero-art-panel {
    background: linear-gradient(155deg, rgba(16, 60, 52, 0.9) 0%, rgba(32, 84, 70, 0.78) 44%, rgba(98, 64, 36, 0.68) 100%);
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 30px;
    padding: 1.15rem 1.15rem 0.95rem;
    box-shadow: var(--shadow-xl);
    backdrop-filter: blur(12px);
}

body.exhibit-v4 .hero-art-panel svg {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 22px 34px rgba(2, 10, 8, 0.45));
    animation: v4Float 7s ease-in-out infinite;
}

body.exhibit-v4 .hero-art-caption {
    margin: 0.8rem 0 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-align: center;
}

body.exhibit-v4 .hero-stats {
    margin-top: clamp(1.8rem, 5vw, 3rem);
    padding: 1rem;
    border-radius: 20px;
    background: rgba(8, 30, 26, 0.38);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    gap: 0.7rem;
    max-width: 100%;
}

body.exhibit-v4 .stat-item {
    border-radius: 16px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.06));
    border-color: rgba(255, 255, 255, 0.2);
    min-height: 118px;
}

body.exhibit-v4 .stat-item.clickable:hover {
    transform: translateY(-4px) scale(1.01);
    border-color: rgba(255, 217, 154, 0.68);
}

body.exhibit-v4 .stat-number {
    color: #ffe2b7;
    font-size: clamp(1.8rem, 3.3vw, 2.9rem);
}

body.exhibit-v4 .search-nav {
    background: color-mix(in srgb, var(--color-bg-card) 88%, transparent);
    border-bottom-color: color-mix(in srgb, var(--color-border-light) 65%, transparent);
    backdrop-filter: blur(15px);
    box-shadow: none;
}

body.exhibit-v4 .search-nav.scrolled {
    box-shadow: var(--shadow-sm);
}

body.exhibit-v4 .search-shell {
    display: grid;
    gap: 0.7rem;
}

body.exhibit-v4 .search-meta {
    margin: 0;
    font-size: 0.82rem;
    color: var(--color-text-muted);
    letter-spacing: 0.01em;
}

body.exhibit-v4 .search-container {
    max-width: 740px;
}

body.exhibit-v4 .search-box {
    border: 1px solid color-mix(in srgb, var(--color-border-medium) 65%, transparent);
    background: color-mix(in srgb, var(--color-bg-primary) 88%, #fff 12%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

body.exhibit-v4 .search-box:focus {
    border-color: color-mix(in srgb, var(--color-primary) 80%, #fff 20%);
    box-shadow: 0 0 0 4px rgba(40, 105, 87, 0.15);
}

body.exhibit-v4 nav {
    background: color-mix(in srgb, var(--color-bg-card) 82%, transparent);
    border-bottom-color: color-mix(in srgb, var(--color-border-light) 70%, transparent);
    padding-top: 0.7rem;
    padding-bottom: 0.85rem;
}

body.exhibit-v4 .filters {
    gap: 0.48rem;
}

body.exhibit-v4 .filter-btn {
    border-radius: 9999px;
    border: 1px solid color-mix(in srgb, var(--color-border-light) 85%, transparent);
    background: color-mix(in srgb, var(--color-bg-card) 74%, transparent);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.045em;
    text-transform: uppercase;
}

body.exhibit-v4 .filter-btn.active {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 8px 18px rgba(12, 53, 45, 0.34);
}

body.exhibit-v4 .storyline-ribbon {
    padding: clamp(2.2rem, 4.5vw, 3.4rem) 0;
    position: relative;
}

body.exhibit-v4 .storyline-ribbon::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(80% 120% at 0% 0%, rgba(85, 150, 124, 0.16), transparent 70%),
        radial-gradient(80% 120% at 100% 100%, rgba(193, 133, 68, 0.16), transparent 70%);
    pointer-events: none;
}

body.exhibit-v4 .storyline-header {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin-bottom: 1.3rem;
    text-align: center;
}

body.exhibit-v4 .intro-kicker {
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.7rem;
    font-weight: 800;
    color: color-mix(in srgb, var(--color-secondary) 70%, var(--color-text-primary) 30%);
}

body.exhibit-v4 .storyline-header h2 {
    margin: 0;
    font-size: clamp(1.5rem, 2.5vw, 2.5rem);
}

body.exhibit-v4 .storyline-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

body.exhibit-v4 .storyline-card {
    background: linear-gradient(180deg, color-mix(in srgb, var(--color-bg-card) 95%, transparent), color-mix(in srgb, var(--color-bg-secondary) 92%, transparent));
    border: 1px solid color-mix(in srgb, var(--color-border-light) 85%, transparent);
    border-radius: 20px;
    padding: 1rem;
    box-shadow: var(--shadow-card);
    transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
}

body.exhibit-v4 .storyline-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-card-hover);
    border-color: color-mix(in srgb, var(--color-accent) 68%, var(--color-border-light) 32%);
}

body.exhibit-v4 .storyline-art {
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(14, 58, 50, 0.14) 0%, rgba(206, 160, 92, 0.14) 100%);
    border: 1px solid rgba(110, 90, 62, 0.2);
    margin-bottom: 0.75rem;
    min-height: 132px;
    display: grid;
    place-items: center;
}

body.exhibit-v4 .storyline-art svg {
    width: min(210px, 94%);
    height: auto;
}

body.exhibit-v4 .storyline-card h3 {
    margin-bottom: 0.45rem;
    font-size: clamp(1rem, 1.4vw, 1.22rem);
}

body.exhibit-v4 .storyline-card p {
    margin: 0;
    font-size: 0.92rem;
    color: var(--color-text-secondary);
}

body.exhibit-v4 main {
    padding-top: clamp(2.2rem, 4vw, 3.3rem);
    padding-bottom: clamp(3rem, 5vw, 4.8rem);
}

body.exhibit-v4 .timeline-intro {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    gap: clamp(1rem, 3vw, 2.3rem);
    align-items: center;
    background: linear-gradient(125deg, color-mix(in srgb, var(--color-bg-card) 95%, transparent), color-mix(in srgb, var(--color-bg-secondary) 92%, transparent));
    border: 1px solid color-mix(in srgb, var(--color-border-light) 85%, transparent);
    border-radius: 24px;
    padding: clamp(1rem, 3.2vw, 2rem);
    box-shadow: var(--shadow-md);
    margin-bottom: 1.65rem;
}

body.exhibit-v4 .timeline-intro-copy h2 {
    margin-bottom: 0.6rem;
    font-size: clamp(1.6rem, 2.8vw, 2.5rem);
}

body.exhibit-v4 .timeline-intro-copy p {
    margin-bottom: 0;
    max-width: 60ch;
}

body.exhibit-v4 .timeline-intro-art {
    border-radius: 18px;
    background: linear-gradient(140deg, rgba(36, 97, 84, 0.15), rgba(198, 140, 69, 0.14));
    border: 1px solid rgba(81, 109, 97, 0.23);
    min-height: 200px;
    display: grid;
    place-items: center;
}

body.exhibit-v4 .timeline-intro-art svg {
    width: min(300px, 92%);
    height: auto;
}

body.exhibit-v4 .timeline-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
    gap: clamp(1rem, 2.4vw, 1.6rem);
    align-items: stretch;
    margin-top: 0.65rem;
}

body.exhibit-v4 .timeline-card {
    border-radius: 22px;
    overflow: hidden;
    background: linear-gradient(180deg, color-mix(in srgb, var(--color-bg-card) 95%, transparent), color-mix(in srgb, var(--color-bg-secondary) 92%, transparent));
    border: 1px solid color-mix(in srgb, var(--color-border-light) 88%, transparent);
    box-shadow: var(--shadow-card);
    transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
}

body.exhibit-v4 .timeline-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-card-hover);
    border-color: color-mix(in srgb, var(--color-accent) 60%, var(--color-border-light) 40%);
}

body.exhibit-v4 .timeline-image {
    height: 240px;
    position: relative;
    background: linear-gradient(145deg, rgba(20, 72, 62, 0.2), rgba(196, 139, 73, 0.17));
    border-bottom: 1px solid color-mix(in srgb, var(--color-border-light) 70%, transparent);
    overflow: hidden;
}

body.exhibit-v4 .vector-scene {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.3rem;
}

body.exhibit-v4 .vector-scene svg {
    width: 100%;
    height: 100%;
    display: block;
    transform: translateZ(0);
    filter: drop-shadow(0 26px 26px rgba(3, 12, 10, 0.26));
    transition: transform var(--transition-slow), filter var(--transition-base);
}

body.exhibit-v4 .timeline-card:hover .vector-scene svg {
    transform: translateY(-4px) scale(1.03);
    filter: drop-shadow(0 32px 30px rgba(3, 12, 10, 0.34));
}

body.exhibit-v4 .vector-scene-related {
    padding: 0;
}

body.exhibit-v4 .vector-scene-related svg {
    filter: drop-shadow(0 18px 20px rgba(3, 12, 10, 0.25));
}

body.exhibit-v4 .vector-scene-detail svg {
    filter: drop-shadow(0 30px 34px rgba(3, 12, 10, 0.3));
}

body.exhibit-v4 .timeline-image-overlay {
    position: absolute;
    left: 0.8rem;
    right: 0.8rem;
    bottom: 0.8rem;
    display: flex;
    justify-content: flex-end;
}

body.exhibit-v4 .timeline-chip {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.11em;
    font-weight: 800;
    padding: 0.35rem 0.6rem;
    border-radius: 9999px;
    background: rgba(14, 43, 37, 0.76);
    color: #f7e5be;
    border: 1px solid rgba(255, 225, 167, 0.28);
}

body.exhibit-v4 .timeline-content {
    padding: 1.1rem 1.1rem 1.25rem;
}

body.exhibit-v4 .timeline-date {
    margin-bottom: 0.22rem;
    color: var(--color-primary);
    font-size: clamp(1.08rem, 1.5vw, 1.35rem);
}

body.exhibit-v4 .timeline-age {
    margin-bottom: 0.65rem;
}

body.exhibit-v4 .timeline-age span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-muted);
    font-weight: 700;
}

body.exhibit-v4 .event-title {
    font-size: clamp(1.1rem, 1.65vw, 1.36rem);
    margin-bottom: 0.3rem;
    line-height: 1.28;
}

body.exhibit-v4 .event-location {
    margin-bottom: 0.6rem;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    color: color-mix(in srgb, var(--color-text-muted) 88%, var(--color-text-primary) 12%);
}

body.exhibit-v4 .event-description {
    margin-bottom: 0.75rem;
    font-size: 0.92rem;
}

body.exhibit-v4 .event-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
}

body.exhibit-v4 .category-tag {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
}

body.exhibit-v4 .importance-level {
    color: color-mix(in srgb, var(--color-secondary) 75%, var(--color-text-primary) 25%);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

body.exhibit-v4 .loading,
body.exhibit-v4 .no-results {
    border-radius: 20px;
    border: 1px dashed color-mix(in srgb, var(--color-border-medium) 70%, transparent);
    background: color-mix(in srgb, var(--color-bg-card) 85%, transparent);
}

body.exhibit-v4 .timeline-detail {
    max-width: 1000px;
    padding-top: clamp(3.5rem, 6vw, 5rem);
}

body.exhibit-v4 .back-btn {
    top: 16px;
    left: 16px;
    border-radius: 9999px;
    background: color-mix(in srgb, var(--color-bg-card) 88%, transparent);
    box-shadow: var(--shadow-md);
}

body.exhibit-v4 .event-header {
    position: relative;
    border: 1px solid color-mix(in srgb, var(--color-border-light) 84%, transparent);
    background: linear-gradient(135deg, color-mix(in srgb, var(--color-bg-card) 96%, transparent), color-mix(in srgb, var(--color-bg-secondary) 92%, transparent));
    border-radius: 28px;
    padding: 1.5rem 1rem 1.2rem;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

body.exhibit-v4 .event-header-art {
    border-radius: 18px;
    background: linear-gradient(145deg, rgba(14, 60, 51, 0.12), rgba(207, 147, 76, 0.13));
    border: 1px solid rgba(87, 107, 97, 0.25);
    margin-bottom: 1rem;
    min-height: 190px;
}

body.exhibit-v4 .event-header-art .vector-scene {
    position: relative;
    min-height: 190px;
}

body.exhibit-v4 .event-header-art .vector-scene svg {
    width: min(560px, 100%);
    margin-inline: auto;
}

body.exhibit-v4 .event-portrait {
    width: min(220px, 70vw);
    height: min(220px, 70vw);
    border-radius: 20px;
    border: 3px solid color-mix(in srgb, var(--color-bg-card) 90%, transparent);
    box-shadow: var(--shadow-md);
}

body.exhibit-v4 .event-main-title {
    font-size: clamp(1.8rem, 4vw, 3rem);
    margin-bottom: 0.35rem;
}

body.exhibit-v4 .event-date-location {
    margin-bottom: 0;
    font-size: 1rem;
}

body.exhibit-v4 .event-highlight {
    margin-top: 1.25rem;
    border: 1px solid color-mix(in srgb, var(--color-accent) 44%, var(--color-border-light) 56%);
    background: linear-gradient(140deg, color-mix(in srgb, var(--color-bg-secondary) 85%, #fff 15%), color-mix(in srgb, var(--color-bg-card) 95%, transparent));
    border-left-width: 0;
    border-radius: 20px;
}

body.exhibit-v4 .detailed-description {
    background: color-mix(in srgb, var(--color-bg-card) 95%, transparent);
    border: 1px solid color-mix(in srgb, var(--color-border-light) 84%, transparent);
    border-radius: 18px;
    padding: 1rem;
}

body.exhibit-v4 .impact-section,
body.exhibit-v4 .context-section {
    margin-top: 1rem;
    border: 1px solid color-mix(in srgb, var(--color-border-light) 82%, transparent);
    border-radius: 18px;
    padding: 1rem;
    background: color-mix(in srgb, var(--color-bg-card) 94%, transparent);
}

body.exhibit-v4 .impact-section h3,
body.exhibit-v4 .context-section h3 {
    margin-bottom: 0.55rem;
}

body.exhibit-v4 .impact-list li {
    border-bottom-color: color-mix(in srgb, var(--color-border-light) 70%, transparent);
    padding: 0.62rem 0;
}

body.exhibit-v4 .impact-list li::before {
    width: 8px;
    height: 8px;
    margin-right: 0.65rem;
}

body.exhibit-v4 .related-events-section {
    margin-top: 1.8rem;
    padding-top: 1.2rem;
}

body.exhibit-v4 .related-events-grid {
    gap: 0.9rem;
}

body.exhibit-v4 .related-event-tile {
    border-radius: 18px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--color-bg-card) 95%, transparent), color-mix(in srgb, var(--color-bg-secondary) 92%, transparent));
    border: 1px solid color-mix(in srgb, var(--color-border-light) 82%, transparent);
    padding: 0.8rem;
}

body.exhibit-v4 .related-vector {
    border-radius: 12px;
    background: linear-gradient(140deg, rgba(21, 63, 55, 0.14), rgba(201, 145, 76, 0.13));
    border: 1px solid rgba(88, 110, 100, 0.2);
    margin-bottom: 0.7rem;
    min-height: 125px;
    overflow: hidden;
}

body.exhibit-v4 .related-vector .vector-scene {
    position: relative;
    min-height: 125px;
}

body.exhibit-v4 .related-vector .vector-scene svg {
    width: 100%;
    height: auto;
}

body.exhibit-v4 .relation-tag {
    top: 9px;
    right: 9px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    border: 1px solid rgba(255, 255, 255, 0.25);
    font-size: 0.58rem;
    letter-spacing: 0.1em;
}

body.exhibit-v4 .related-tile-date {
    font-size: 0.92rem;
}

body.exhibit-v4 .related-tile-event {
    font-size: 0.9rem;
    font-weight: 600;
}

body.exhibit-v4 .related-tile-location {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

body.exhibit-v4 .carver-quote-section {
    background:
        radial-gradient(85% 140% at 10% 0%, rgba(147, 193, 165, 0.22), transparent 74%),
        radial-gradient(80% 130% at 100% 100%, rgba(220, 165, 95, 0.2), transparent 74%),
        linear-gradient(140deg, #0e342d 0%, #175448 48%, #6f3f20 100%);
    padding: clamp(2.4rem, 5vw, 4rem) 0;
}

body.exhibit-v4 .quote-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: clamp(0.9rem, 3vw, 1.8rem);
    align-items: center;
}

body.exhibit-v4 .quote-vector {
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 20px;
    min-height: 180px;
    display: grid;
    place-items: center;
}

body.exhibit-v4 .quote-vector svg {
    width: min(220px, 88%);
}

body.exhibit-v4 .quote-container {
    max-width: none;
    text-align: left;
    padding: 0;
}

body.exhibit-v4 .quote-container::before {
    left: 0;
    transform: none;
    top: -0.75rem;
    font-size: clamp(4rem, 8vw, 6.8rem);
    color: rgba(255, 226, 172, 0.4);
}

body.exhibit-v4 .quote-text {
    margin-bottom: 0.8rem;
    font-size: clamp(1.2rem, 2.2vw, 2rem);
}

body.exhibit-v4 .quote-attribution {
    color: #ffe0ab;
}

body.exhibit-v4 footer {
    padding-top: clamp(2.2rem, 4vw, 3.5rem);
    background:
        radial-gradient(80% 130% at 0% 0%, rgba(90, 147, 122, 0.22), transparent 72%),
        linear-gradient(180deg, #0a1210 0%, #121f1a 100%);
}

body.exhibit-v4 footer::before {
    height: 5px;
    background: linear-gradient(90deg, #0f5b4d, #d9a660, #0f5b4d);
}

body.exhibit-v4 .footer-main {
    grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
    gap: clamp(1rem, 2.6vw, 2rem);
}

body.exhibit-v4 .footer-brand-art {
    border-radius: 14px;
    padding: 0.2rem;
    margin-bottom: 0.9rem;
    background: linear-gradient(135deg, rgba(116, 187, 156, 0.16), rgba(201, 146, 78, 0.17));
    border: 1px solid rgba(255, 255, 255, 0.14);
}

body.exhibit-v4 .footer-brand-art svg {
    width: min(250px, 100%);
    height: auto;
}

body.exhibit-v4 .footer-section a:hover,
body.exhibit-v4 .contact-info span a:hover,
body.exhibit-v4 .footer-bottom a:hover {
    color: var(--color-accent-bright);
}

body.exhibit-v4 .newsletter-btn {
    background: linear-gradient(135deg, #e6b66f 0%, #cc8743 100%);
    color: #1e150c;
}

body.exhibit-v4.viewing-event header,
body.exhibit-v4.viewing-event .search-nav,
body.exhibit-v4.viewing-event nav,
body.exhibit-v4.viewing-event .storyline-ribbon,
body.exhibit-v4.viewing-event .carver-quote-section,
body.exhibit-v4.viewing-event footer {
    display: none;
}

@keyframes v4Float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-7px); }
}

@media (max-width: 1100px) {
    body.exhibit-v4 .hero-story-grid {
        grid-template-columns: 1fr;
    }

    body.exhibit-v4 .hero-copy {
        max-width: none;
    }

    body.exhibit-v4 .hero-art-panel {
        max-width: 620px;
        margin-inline: auto;
    }

    body.exhibit-v4 .storyline-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.exhibit-v4 .timeline-intro {
        grid-template-columns: 1fr;
    }

    body.exhibit-v4 .quote-layout {
        grid-template-columns: 1fr;
        text-align: center;
    }

    body.exhibit-v4 .quote-container {
        text-align: center;
    }

    body.exhibit-v4 .quote-container::before {
        left: 50%;
        transform: translateX(-50%);
    }

    body.exhibit-v4 .footer-main {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.exhibit-v4 .footer-contact {
        grid-column: 1 / -1;
    }
}

@media (max-width: 760px) {
    body.exhibit-v4 {
        background:
            radial-gradient(100% 75% at 20% -8%, rgba(142, 188, 162, 0.2), transparent 70%),
            radial-gradient(100% 90% at 100% 12%, rgba(216, 171, 101, 0.18), transparent 72%),
            linear-gradient(180deg, #f8f2e7 0%, #efe4d3 100%);
    }

    body.exhibit-v4 header {
        min-height: auto;
        padding-top: 5.2rem;
        padding-bottom: 2.2rem;
        text-align: center;
    }

    body.exhibit-v4 .hero-copy {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    body.exhibit-v4 .subtitle {
        max-width: 95%;
        margin-inline: auto;
    }

    body.exhibit-v4 .hero-cta-row {
        justify-content: center;
    }

    body.exhibit-v4 .hero-stats {
        grid-template-columns: repeat(2, 1fr);
        padding: 0.65rem;
    }

    body.exhibit-v4 .stat-item {
        min-height: 102px;
    }

    body.exhibit-v4 .storyline-grid {
        grid-template-columns: 1fr;
    }

    body.exhibit-v4 .search-meta {
        font-size: 0.76rem;
    }

    body.exhibit-v4 .filter-btn {
        font-size: 0.68rem;
        padding-inline: 0.72rem;
    }

    body.exhibit-v4 .timeline-card {
        max-width: none;
    }

    body.exhibit-v4 .timeline-image {
        height: 214px;
    }

    body.exhibit-v4 .timeline-detail {
        padding-inline: 0.2rem;
    }

    body.exhibit-v4 .event-header {
        border-radius: 20px;
        padding: 1rem 0.75rem;
    }

    body.exhibit-v4 .event-header-art {
        min-height: 155px;
    }

    body.exhibit-v4 .event-header-art .vector-scene {
        min-height: 155px;
    }

    body.exhibit-v4 .event-portrait {
        width: min(190px, 72vw);
        height: min(190px, 72vw);
    }

    body.exhibit-v4 .back-btn {
        top: 10px;
        left: 10px;
        padding: 0.48rem 0.84rem;
    }

    body.exhibit-v4 .footer-main {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    body.exhibit-v4 .hero-stats {
        grid-template-columns: 1fr 1fr;
    }

    body.exhibit-v4 .timeline-content {
        padding-inline: 0.85rem;
    }

    body.exhibit-v4 .timeline-date {
        font-size: 1rem;
    }

    body.exhibit-v4 .event-title {
        font-size: 1rem;
    }

    body.exhibit-v4 .related-event-tile {
        padding: 0.7rem;
    }
}
