/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.5;
    color: #333;
    min-height: 100vh;
    background-color: #faf9f7;
}

/* =====================
   Layout
   ===================== */

.layout {
    display: flex;
    min-height: 100vh;
    align-items: stretch;
}

/* =====================
   Sidebar
   ===================== */

.sidebar {
    width: 200px;
    flex-shrink: 0;
    height: 100vh;
    position: sticky;
    top: 0;
    padding: 2rem 1.5rem;
    border-right: 1px solid #eee;
    display: flex;
    flex-direction: column;
    background: #faf9f7;
    z-index: 100;
}

.sidebar-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.site-name {
    font-size: 0.95rem;
    font-weight: 500;
    color: #111;
    text-decoration: none;
    margin-bottom: 2.5rem;
    line-height: 1.3;
    display: block;
}

.site-name:hover {
    color: #111;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.nav-link {
    font-size: 0.875rem;
    color: #555;
    text-decoration: none;
    transition: color 0.2s ease;
    display: block;
}

.nav-link:hover,
.nav-link.active {
    color: #111;
}

.sub-nav {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding-left: 0.75rem;
    margin-top: 0.1rem;
    margin-bottom: 0.1rem;
}

.sub-nav-link {
    font-size: 0.8rem;
    color: #777;
    text-decoration: none;
    transition: color 0.2s ease;
    display: block;
}

.sub-nav-link:hover,
.sub-nav-link.active {
    color: #111;
}

/* Hamburger button (mobile only) */
.hamburger-btn {
    display: none;
    position: sticky;
    top: 0;
    z-index: 1001;
    background: #faf9f7;
    border: none;
    border-bottom: 1px solid #eee;
    width: 100%;
    height: 48px;
    align-items: center;
    justify-content: flex-start;
    padding: 0 1rem;
    cursor: pointer;
    font-size: 1.1rem;
    color: #333;
    line-height: 1;
    flex-shrink: 0;
}

/* Overlay (mobile only) */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 999;
}

/* =====================
   Main Content
   ===================== */

.main-content {
    flex: 1;
    min-width: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.flex-spacer {
    flex: 1;
}

/* =====================
   Hero (Homepage)
   ===================== */

.hero-wrapper {
    padding: 2rem;
    display: flex;
    flex: 1;
    justify-content: center;
    align-items: center;
}

.hero-wrapper .gallery-item img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 70vh;
}

/* =====================
   Gallery
   ===================== */

.collection-description {
    font-size: 0.875rem;
    color: #555;
    line-height: 1.6;
    padding: 0 1.5rem 0.5rem;
    max-width: 600px;
}

.gallery-grid {
    display: flex;
    flex-direction: column;
    gap: 40px;
    padding: 1.5rem;
}

.gallery-item {
    cursor: pointer;
}

.gallery-item img {
    display: block;
    width: auto;
    max-width: 66.667%;
    height: auto;
    max-height: 100vh;
    margin: 0 auto;
    transition: opacity 0.3s ease;
}

.gallery-item:hover img {
    opacity: 0.85;
}

/* =====================
   Collection Sections (Selected Works)
   ===================== */

.collection-section {
    padding: 2.5rem 1.5rem 0;
}

.collection-section:last-of-type {
    padding-bottom: 0;
}

.collection-section-title {
    font-size: 0.95rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #555;
    margin-bottom: 1rem;
}

/* =====================
   Artist Statement Page
   ===================== */

.statement-page {
    padding: 3rem 2rem;
    max-width: 800px;
}

.statement-page h1 {
    font-size: 1.1rem;
    font-weight: 400;
    color: #111;
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.statement-image {
    margin-bottom: 2.5rem;
}

.statement-image img {
    display: block;
    width: 100%;
    max-height: 70vh;
    object-fit: cover;
    object-position: center top;
}

.statement-text p {
    font-size: 0.925rem;
    line-height: 1.7;
    color: #555;
    margin-bottom: 1rem;
}

.statement-text p:last-child {
    margin-bottom: 0;
}

/* CV sections on statement page */
.cv-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.cv-section h2 {
    font-size: 0.75rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #bbb;
    margin-bottom: 1rem;
}

.cv-section p {
    font-size: 0.875rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 0.25rem;
}

/* =====================
   Lightbox
   ===================== */

.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.92);
    z-index: 2000;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    margin: 5% auto;
    text-align: center;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 2001;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.lightbox-close:hover {
    opacity: 1;
}

#lightbox-image {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
}

.lightbox-info {
    color: white;
    padding: 1rem 0;
}

.lightbox-info h3 {
    margin-bottom: 0.4rem;
    font-size: 1rem;
    font-weight: 400;
}

.lightbox-info p {
    color: #aaa;
    margin: 0;
    font-size: 0.85rem;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    transform: translateY(-50%);
}

.lightbox-btn {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    font-size: 1.5rem;
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.lightbox-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

.lightbox-image-container {
    position: relative;
    display: inline-block;
}

.lightbox-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.3);
}

.lightbox-loading.hidden {
    display: none;
}

.loading-spinner {
    width: 36px;
    height: 36px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#lightbox-image {
    transition: opacity 0.3s ease;
}

#lightbox-image.loading {
    opacity: 0.4;
}

/* =====================
   Footer
   ===================== */

footer {
    margin-top: auto;
    padding: 2rem 1.5rem;
    border-top: 1px solid #eee;
}

footer p {
    color: #777;
    font-size: 0.8rem;
    margin: 0;
}

footer a {
    color: #777;
    text-decoration: none;
    transition: color 0.2s ease;
}

footer a:hover {
    color: #333;
}

/* =====================
   Typography (global)
   ===================== */

h1, h2, h3, h4, h5, h6 {
    font-weight: 400;
    line-height: 1.3;
}

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

/* Image lazy loading fade-in */
img {
    transition: opacity 0.3s ease;
}

img[loading="lazy"] {
    opacity: 0;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* =====================
   Responsive — Mobile
   ===================== */

@media (max-width: 768px) {
    .layout {
        flex-direction: column;
    }

    .sidebar {
        position: fixed;
        left: -220px;
        top: 0;
        width: 200px;
        height: 100vh;
        transition: left 0.25s ease;
        z-index: 1000;
    }

    .sidebar.open {
        left: 0;
    }

    .sidebar-overlay.visible {
        display: block;
    }

    .hamburger-btn {
        display: flex;
    }

    .hero-wrapper {
        padding: 1rem;
    }

    .gallery-grid {
        gap: 32px;
        padding: 1rem;
    }

    .collection-section {
        padding: 2rem 1rem 0;
    }

    .statement-page {
        padding: 1.5rem 1rem;
    }

    .artist-statement-content {
        flex-direction: column;
        gap: 1.5rem;
    }
}

@media (min-width: 769px) {
    .hamburger-btn {
        display: none !important;
    }

    .sidebar-overlay {
        display: none !important;
    }
}
