/* Design System */
:root {
    --bg-color: #f6f3f0;
    --text-color: #1a1a1a;
    --text-muted: #555;
    --accent-color: #8c7851;
    --hero-bg: #000;
    --nav-bg: rgba(246, 243, 240, 0.95);
    --font-serif: "Libre Baskerville", serif;
    --font-sans: "Bricolage Grotesque", sans-serif;
    --section-padding: 80px 20px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-sans);
    line-height: 1.3;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

/* Typography */
h1,
h2,
h3,
.serif {
   font-family: var(--font-sans);
    font-size: 36pt;
}

.title-main {
    font-family: var(--font-sans);
    font-size: 5rem;
    font-weight: 700;
    letter-spacing: -2px;
    margin: 0;
    color: var(--bg-color);
    text-transform: none;
    line-height: 0.74;
    /* Ensures tight box without overflow */
}

.subtitle {
    font-size: 1.4rem;
    font-style: italic;
    color: var(--text-color);
}

/* Layout */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: #000;
    color: #fff;
    z-index: 1000;
    padding: 15px 0;
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-sans);
    font-size: 1.2rem;
    font-weight: 700;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-size: 0.9rem;
    text-transform: lowercase;
    font-weight: 500;
    color: #fff;
}

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

/* Mobile Menu Toggle */
.nav-toggle {
    display: none;
}

.nav-toggle-label {
    display: none;
    cursor: pointer;
    padding: 10px;
}

.nav-toggle-label span,
.nav-toggle-label span::before,
.nav-toggle-label span::after {
    display: block;
    background: #fff;
    height: 2px;
    width: 25px;
    position: relative;
    transition: all 0.3s ease;
}

.nav-toggle-label span::before,
.nav-toggle-label span::after {
    content: '';
    position: absolute;
}

.nav-toggle-label span::before {
    bottom: 8px;
}

.nav-toggle-label span::after {
    top: 8px;
}

/* Hero Section */
.hero {
    margin-top: 54px;
    /* Space for fixed nav */
    text-align: center;
}

.banner-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    background-color: #000;
}

.banner-img {
    width: 100%;
    height: auto;
    max-height: 80vh;
    display: block;
    object-fit: cover;
}

.banner-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    background: transparent;
}

/* Exhibition Details */
.exhibition-info {
    padding: var(--section-padding);
    text-align: center;
    background-color: #f2eee9;
}

.main-amicorum {
    margin-bottom: 3rem;
}

.title-amicorum {
    font-family: var(--font-sans);
    font-size: 3.5rem;
    font-weight: 900;
    letter-spacing: -1px;
    margin-bottom: 0.2rem;
    color: #111;
    line-height: 0.8;
}

.subtitle-small {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-transform: capitalize;
}

.subtitle-bold {
    font-size: 1.2rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
}

.fw-black {
    font-weight: 900;
}

.info-block {
    margin-bottom: 2rem;
}

.info-block p {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.contact-info {
    font-weight: 600;
}

/* Gallery */
.gallery {
    padding: var(--section-padding);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.gallery-item {
    display: flex;
    flex-direction: column;
}

.img-wrapper {
    overflow: hidden;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    height: 400px;
    /* Fixed height for consistency in rows */
}

.gallery-item img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.item-caption {
    font-size: 0.9rem;
    text-align: center;
    max-width: 280px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.item-title {
    font-weight: bold;
    display: block;
    margin-bottom: 2px;
}

.item-details {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.item-date {
    font-weight: 500;
}

/* Artist Section */
.artist-section {
    padding: var(--section-padding);
    background-color: #f2eee9;
}

.artist-flex {
    display: flex;
    gap: 50px;
    align-items: center;
    flex-wrap: wrap;
}

.artist-photo {
    flex: 1;
    min-width: 300px;
}

.artist-photo img {
    width: 100%;
    filter: grayscale(1);
    border-radius: 2px;
}

.quote-block {
    flex: 1;
    min-width: 300px;
    padding: 20px;
}

.quote-text {
    font-size: 1.45rem;
    margin-bottom: 1.5rem;
    position: relative;
    line-height: 1.6;
}

.quote-author {
    font-weight: bold;
    font-size: 1.15rem;
}

/* Reveal Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.info-block,
.gallery-item,
.artist-flex {
    animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.exhibition-info {
    animation-delay: 0.2s;
}

/* Stagger gallery items */
.gallery-item:nth-child(1) {
    animation-delay: 0.1s;
}

.gallery-item:nth-child(2) {
    animation-delay: 0.2s;
}

.gallery-item:nth-child(3) {
    animation-delay: 0.3s;
}

.gallery-item:nth-child(4) {
    animation-delay: 0.4s;
}

.gallery-item:nth-child(5) {
    animation-delay: 0.5s;
}

.gallery-item:nth-child(6) {
    animation-delay: 0.6s;
}

/* Lightbox */
.lightbox {
    display: none;
    opacity: 0;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.92);
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90vh;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    border-radius: 4px;
}

.lightbox-close {
    position: absolute;
    top: 25px;
    right: 40px;
    color: #f1f1f1;
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.lightbox-close:hover {
    color: var(--accent-color);
}

/* Footer */
footer {
    padding: 60px 20px;
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-muted);
    background-color: var(--bg-color);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

footer a {
    font-weight: 500;
}

footer a:hover {
    color: var(--text-color);
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 900px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }

    .img-wrapper {
        height: 300px;
    }
}

@media (max-width: 600px) {
    .nav-toggle-label {
        display: block;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #000;
        display: none;
        flex-direction: column;
        padding: 20px;
        text-align: center;
    }

    .nav-toggle:checked~.nav-links {
        display: flex;
    }

    .nav-toggle:checked+.nav-toggle-label span {
        background: transparent;
    }

    .nav-toggle:checked+.nav-toggle-label span::before {
        transform: rotate(45deg);
        bottom: 0;
    }

    .nav-toggle:checked+.nav-toggle-label span::after {
        transform: rotate(-45deg);
        top: 0;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .title-main {
        font-size: 2.5rem;
    }

    .img-wrapper {
        height: auto;
        aspect-ratio: auto;
    }

    .artist-flex {
        flex-direction: column;
        text-align: center;
    }
}