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

body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 11px;
    line-height: 1.6;
    color: #000;
    background-color: #fff;
    letter-spacing: 0.3px;
    overflow-x: hidden;
}

/* Right Side Header - Fixed */
.sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 200px;
    height: 100vh;
    background-color: #fff;
    border-left: 1px solid #000;
    padding: 40px 25px;
    display: flex;
    flex-direction: column;
    z-index: 100;
}

h1 {
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.5px;
    margin-bottom: 40px;
    text-transform: lowercase;
}

/* Navigation Links */
.nav-links {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.nav-link {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 10px;
    color: #000;
    text-decoration: none;
    text-transform: lowercase;
    letter-spacing: 0.3px;
    padding: 10px 0;
    border-bottom: 1px solid #000;
    transition: opacity 0.2s;
}

.nav-link:first-child {
    border-top: 1px solid #000;
}

.nav-link:hover {
    opacity: 0.5;
}

.nav-link.active {
    opacity: 0.4;
}

/* Bio hamburger menu — hidden on desktop */
.bio-menu-toggle {
    display: none;
}

.copyright {
    margin-top: auto;
    font-size: 9px;
    font-weight: 300;
    letter-spacing: 0.3px;
    color: #000;
}

/* Main Gallery - Vertical Scroll */
.gallery {
    margin-right: 200px;
    width: calc(100vw - 200px);
}

.gallery-section {
    position: relative;
}

.section-label {
    position: sticky;
    top: 0;
    background-color: rgba(255, 255, 255, 0.9);
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 0.3px;
    text-transform: lowercase;
    padding: 12px 20px;
    z-index: 10;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Gallery Items — Staggered Layout */
.gallery-item {
    cursor: pointer;
    margin: 30px 0;
}

/* Position variants */
.gallery-item.offset-right {
    margin-left: auto;
    margin-right: 5%;
}

.gallery-item.offset-left {
    margin-left: 5%;
    margin-right: auto;
}

.gallery-item.offset-center {
    margin-left: auto;
    margin-right: auto;
}

/* Width variants */
.gallery-item.w-sm {
    width: 40%;
}

.gallery-item.w-md {
    width: 55%;
}

.gallery-item.w-lg {
    width: 65%;
}

.gallery-item.w-xl {
    width: 80%;
}

/* Extra breathing room around wide/hero images */
.gallery-item.w-xl {
    margin-top: 50px;
    margin-bottom: 50px;
}

.gallery-item img,
.gallery-item video {
    width: 100%;
    height: auto;
    display: block;
}

/* Words Content */
.words-content {
    font-size: 10px;
    line-height: 1.8;
    padding: 15px 20px;
}

.words-content p {
    margin-bottom: 12px;
}

.words-content p:last-child {
    margin-bottom: 0;
}

/* Image Modal */
.image-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    cursor: pointer;
}

.image-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    max-width: 90%;
    max-height: 90%;
    border: none;
    display: block;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    font-weight: 300;
    color: #000;
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover {
    opacity: 0.5;
}

/* Layout Toggle Button */
.layout-toggle {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 200;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 10px;
    letter-spacing: 0.3px;
    text-transform: lowercase;
    background: #fff;
    color: #000;
    border: 1px solid #000;
    padding: 4px 10px;
    cursor: pointer;
    transition: opacity 0.2s;
    display: none;
}

.layout-toggle:hover {
    opacity: 0.5;
}

/* Horizontal Scroll Mode */
body.horizontal-mode {
    overflow: hidden;
}

body.horizontal-mode .gallery {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    height: 100vh;
    width: calc(100vw - 200px);
    margin-right: 200px;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
}

/* Hide native scrollbar */
body.horizontal-mode .gallery::-webkit-scrollbar {
    display: none;
}

body.horizontal-mode .gallery {
    scrollbar-width: none;
}

/* Custom scroll progress bar */
.scroll-progress-track {
    display: none;
}

body.horizontal-mode .scroll-progress-track {
    display: block;
    position: fixed;
    bottom: 12px;
    left: 0;
    right: 200px;
    height: 3px;
    z-index: 200;
    background: transparent;
}

body.horizontal-mode .scroll-progress-thumb {
    height: 100%;
    background: var(--scrollbar-color, #000);
    transition: background 0.4s ease, width 0.15s ease-out;
    width: 0%;
}

body.horizontal-mode .gallery-section {
    display: contents;
}

body.horizontal-mode .section-label {
    display: none;
}

body.horizontal-mode .gallery-item,
body.horizontal-mode .gallery-item.offset-left,
body.horizontal-mode .gallery-item.offset-right,
body.horizontal-mode .gallery-item.offset-center,
body.horizontal-mode .gallery-item.w-sm,
body.horizontal-mode .gallery-item.w-md,
body.horizontal-mode .gallery-item.w-lg,
body.horizontal-mode .gallery-item.w-xl {
    min-width: calc(100vw - 200px);
    width: calc(100vw - 200px);
    height: 100vh;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    scroll-snap-align: start;
}

body.horizontal-mode .gallery-item img,
body.horizontal-mode .gallery-item video {
    width: auto;
    max-width: calc(100vw - 250px);
    max-height: 90vh;
    object-fit: contain;
}

/* Gallery Nav Arrows — hidden by default, shown in horizontal mode */
.gallery-arrow {
    display: none;
}

body.horizontal-mode .gallery-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    z-index: 200;
    background: none;
    border: 1px solid #000;
    border-radius: 50%;
    color: #000;
    font-size: 11px;
    width: 24px;
    height: 24px;
    cursor: pointer;
    transition: opacity 0.2s, top 0.3s;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    padding: 0;
    line-height: 1;
    bottom: 40px;
    top: auto;
}

body.horizontal-mode .gallery-arrow:hover {
    opacity: 0.5;
}

body.horizontal-mode .gallery-arrow-left {
    left: 12px;
}

body.horizontal-mode .gallery-arrow-right {
    right: 212px;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        top: 0;
        right: 0;
        left: 0;
        width: 100%;
        height: auto;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        padding: 12px 15px;
        border-left: none;
        border-bottom: 1px solid #000;
        gap: 0;
    }

    h1 {
        margin-bottom: 0;
        white-space: nowrap;
    }

    .bio-menu-toggle {
        display: block;
        background: none;
        border: none;
        font-size: 16px;
        cursor: pointer;
        padding: 0 8px;
        color: #000;
        line-height: 1;
    }

    .sidebar .words-content {
        display: none;
        width: 100%;
        padding: 12px 0 4px;
    }

    .sidebar.bio-open .words-content {
        display: block;
    }

    .sidebar.bio-open .bio-menu-toggle {
        font-size: 14px;
    }

    .nav-links {
        flex-direction: row;
        gap: 0;
    }

    .nav-link {
        border-bottom: none;
        padding: 0 10px;
        border-right: 1px solid #000;
    }

    .nav-link:first-child {
        border-top: none;
        border-left: 1px solid #000;
    }

    .copyright {
        margin-top: 0;
        margin-left: auto;
    }

    .gallery {
        margin-right: 0;
        width: 100%;
        padding-top: 50px;
    }

    .modal-close {
        top: 10px;
        right: 15px;
        font-size: 30px;
    }

    /* Horizontal mode on mobile — keep top header */
    body.horizontal-mode .gallery {
        width: 100vw;
        margin-right: 0;
        padding-top: 50px;
        height: calc(100vh - 50px);
        height: calc(100dvh - 50px);
    }

    body.horizontal-mode .gallery-item,
    body.horizontal-mode .gallery-item.offset-left,
    body.horizontal-mode .gallery-item.offset-right,
    body.horizontal-mode .gallery-item.offset-center,
    body.horizontal-mode .gallery-item.w-sm,
    body.horizontal-mode .gallery-item.w-md,
    body.horizontal-mode .gallery-item.w-lg,
    body.horizontal-mode .gallery-item.w-xl {
        min-width: 100vw;
        width: 100vw;
        height: calc(100vh - 50px);
        height: calc(100dvh - 50px);
    }

    body.horizontal-mode .gallery-arrow-right {
        right: 12px;
    }

    body.horizontal-mode .gallery-item img,
    body.horizontal-mode .gallery-item video {
        max-width: 90vw;
        max-height: calc(100vh - 80px);
        max-height: calc(100dvh - 80px);
    }

    body.horizontal-mode .scroll-progress-track {
        right: 0;
    }
}
