/* Override global style.css centering */
html,
body {
    display: block !important;
    height: 100vh !important;
    overflow: hidden !important;
    margin: 0;
    padding: 0;
    background-color: #ffffff;
}

/* Place visual behind all content, no pointer interaction */
#canvas-container {
    z-index: 0 !important;
    pointer-events: none !important;
    opacity: 0.5;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

.proj-nav-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: none;
    border: none;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.8rem;
    flex-shrink: 0;
    cursor: pointer;
    white-space: nowrap;
}

.proj-nav-disabled {
    opacity: 0.25;
    pointer-events: none;
    cursor: default;
}

/* Split Layout */
.split-layout {
    display: flex;
    width: 100%;
    min-height: 100vh;
    padding-top: 0;
    pointer-events: auto;
    align-items: flex-start;
    position: relative;
    z-index: 1;
}

/* Logo Hero (no-media left pane) */
#logo-hero-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding: 4rem;
    width: 100%;
}

#logo-hero-container #comparison-slider {
    width: 75%;
    max-width: 420px;
}

#logo-hero-container #canvas-pixelated {
    width: 100%;
    height: auto;
    display: block;
}

.logo-hero-text {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.logo-hero-caption {
    font-size: 0.8rem;
    color: var(--text-muted);
    opacity: 0.5;
}

/* Left Pane (Fixed) */
.left-pane {
    width: 50%;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border-right: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 10;
}

.main-media {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    animation: fadeInUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.05s forwards;
}

.main-media img,
.main-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Right Pane (Scrollable) */
.right-pane {
    width: 50%;
    margin-left: 50%;
    height: 100vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    background: transparent;
}

.project-header {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 5rem 0.75rem 4rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    opacity: 0;
    animation: fadeInDown 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0s forwards;
}

.header-center-area {
    position: relative;
    flex: 1;
    max-width: 400px;
    /* Allow more room for long titles */
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 1rem;
}

#logo-back-link {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#logo-back-link.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-5px);
}

.header-title-text {
    position: absolute;
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: translateY(5px);
    white-space: nowrap;
    text-align: center;
    width: 100%;
    color: var(--text-color);
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-title-text.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}



/* Section styling */
.hero-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-start;
    padding: 4rem 5rem 0 4rem;
    animation: fadeInUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.25s forwards;
    opacity: 0;
}

.project-title {
    font-size: 1.25rem;
    font-weight: 400;
    line-height: 1.3;
    letter-spacing: -0.5px;
    color: var(--text-color);
}

.project-artists {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 400;
}

.project-tech {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-color);
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 400;
    color: rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
}

/* Content blocks */
.content-sections {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 4rem 5rem 0 4rem;
    animation: fadeInUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.45s forwards;
    opacity: 0;
}

.section-title {
    font-size: 0.9rem;
    font-weight: 400;
    margin-top: 1rem;
    margin-bottom: 1rem;
    color: rgba(0, 0, 0, 0.3);
    letter-spacing: -0.5px;
    display: block;
}

.text-content {
    font-size: 0.9rem;
    line-height: 1.8;
    color: #334155;
    white-space: pre-wrap;
}

.short-desc {
    font-weight: 400;
    font-style: italic;
    font-size: 0.95rem;
    color: var(--text-color);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* Artist Profile */
.artist-profile {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
}

.artist-photo {
    flex: none;
    width: 150px;
    overflow: hidden;
    background: #f1f5f9;
}

.artist-photo img {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    display: block;
}

.artist-info {
    flex: 1;
}

/* Gallery */
.gallery-section {
    padding: 4rem 0 6rem 4rem;
    /* No right padding for scroll overflow */
    animation: fadeInUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.65s forwards;
    opacity: 0;
}

.scroll-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-right: 4rem;
}

.scroll-btn {
    background: rgba(0, 0, 0, 0.1);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-color);
}

.gallery-scroll {
    display: flex;
    overflow-x: auto;
    gap: 1.5rem;
    align-items: stretch;
    padding-bottom: 1rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.gallery-scroll::-webkit-scrollbar {
    display: none;
}

.gallery-item {
    flex: 0 0 auto;
    overflow: hidden;
    background: #f1f5f9;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.gallery-item img,
.gallery-item video {
    height: 320px;
    width: auto;
    max-width: 85vw;
    object-fit: contain;
    display: block;
}

.loading-state {
    text-align: center;
    font-size: 1rem;
    color: var(--text-muted);
    padding: 4rem;
    width: 100%;
}

/* Mobile responsive */
@media (max-width: 900px) {
    .left-pane--no-media {
        display: none !important;
    }

    .right-pane {
        margin-left: 0 !important;
        width: 100% !important;
    }

    .left-pane--no-media~.right-pane {
        padding-top: 60px;
    }

    .gallery-item img,
    .gallery-item video {
        height: 240px;
    }

    html,
    body {
        overflow-y: auto !important;
        /* restore body scroll */
    }

    .split-layout {
        flex-direction: column;
        height: auto;
    }

    .left-pane,
    .right-pane {
        width: 100%;
        height: auto;
        overflow-y: visible;
        /* no internal scroll */
    }

    .left-pane {
        position: relative;
        top: 0;
        left: 0;
        width: 100%;
        height: auto;
        padding: 60px 0 0 0;
        /* offset for fixed header */
        border-right: none;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }

    html,
    body {
        height: auto !important;
        overflow-y: auto !important;
    }

    .right-pane {
        width: 100%;
        margin-left: 0;
        height: auto;
        overflow-y: visible;
        padding: 0;
    }

    .project-header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        z-index: 200;
        padding: 1rem 1.5rem;
        box-shadow: none;
    }

    /* Offset content so it doesn't hide under the fixed header */
    .right-pane {
        padding-top: 0;
    }

    .hero-section,
    .content-sections {
        padding: 1rem 1.5rem 0 1.5rem;
    }

    .gallery-section {
        padding: 2rem 0 4rem 1.5rem;
    }

    .scroll-controls {
        padding-right: 1.5rem;
    }

    .main-media img,
    .main-media video {
        max-height: 50vh;
    }

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

    .artist-photo {
        flex: none;
        width: 150px;
    }
}

/* Project Footer */
.project-footer {
    margin-top: auto;
    padding: 2.5rem 4rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.project-footer-inner {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
    text-align: center;
}

.project-footer-logo {
    display: inline-block;
    margin-bottom: 0.3rem;
}

.project-footer-logo img {
    height: 40px;
    width: auto;
    opacity: 0.4;
    display: block;
}

.project-footer-meta {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    font-size: 0.73rem;
    opacity: 0.35;
}

.project-footer-links {
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
    margin-top: 0.4rem;
}

.project-footer-links a {
    font-size: 0.73rem;
    color: inherit;
    text-decoration: none;
    opacity: 0.45;
    border-bottom: 1px solid currentColor;
    padding-bottom: 1px;
    transition: opacity 0.2s;
}

.project-footer-links a:hover {
    opacity: 0.9;
}

.project-footer-copy {
    margin-top: 0.8rem;
    font-size: 0.68rem;
    opacity: 0.25;
}

@media (max-width: 900px) {
    .project-footer {
        padding: 2rem 1.5rem;
    }
}

/* Exhibition Committee */
.committee-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 0.5rem;
    margin-bottom: 4rem;
}

.committee-group {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.committee-row {
    display: flex;
    gap: 2rem;
    font-size: 0.9rem;
    line-height: 1.6;
}

.committee-role {
    color: var(--text-muted);
    flex: 0 0 180px;
}

.committee-name {
    font-weight: 400;
    color: var(--text-color);
}