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

body {
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
    color: #f2f2f2;
    background-color: #0a0a0a;
    overflow: hidden;
    height: 100vh;
}

/* ===== INTRO — SOFT FADE + GLIDE ===== */
#intro-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0a0a0a;
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0, 1);
}

#intro-overlay.exit {
    opacity: 0;
}

.intro-logo {
    width: 1024px;
    height: auto;
    opacity: 0;
    filter: invert(0);
    transform: translateY(8px);
    animation: intro-glide-in 0.5s cubic-bezier(0.4, 0, 0, 1) 0.1s forwards;
}

@keyframes intro-glide-in {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#intro-overlay.exit .intro-logo {
    opacity: 0;
    transform: translateY(-12px) scale(1.02);
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0, 1),
        transform 0.5s cubic-bezier(0.4, 0, 0, 1);
}

#app {
    display: flex;
    width: 100vw;
    height: 100vh;
}

/* SIDEBAR */
.sidebar {
    width: 280px;
    height: 100vh;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    background: #0a0a0a;
    z-index: 10;
}

.sidebar-header {
    padding: 24px;
}

.logo {
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 0.1em;
    margin-bottom: 32px;
    color: #f2f2f2;
    text-transform: uppercase;
}

.main-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 40px;
}

.nav-item {
    text-decoration: none;
    color: #f2f2f2;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.05em;
    padding: 6px 8px;
    display: inline-block;
    align-self: flex-start;
}

.nav-item.active {
    background-color: #ff00ff;
    color: #0a0a0a;
}

.sub-nav {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sub-item {
    text-decoration: none;
    color: #f2f2f2;
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0.6;
    letter-spacing: 0.05em;
}

.sub-item:hover {
    opacity: 1;
}

.project-list-container {
    flex: 1;
    overflow-y: auto;
    padding: 0 24px 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.project-list-container::-webkit-scrollbar {
    width: 4px;
}

.project-list-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
}

.sidebar-list-item {
    cursor: pointer;
    font-size: 12px;
    color: #f2f2f2;
    opacity: 0.6;
    transition: opacity 0.2s, background-color 0.2s;
    padding: 6px 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    align-self: flex-start;
}

.sidebar-list-item:hover {
    opacity: 1;
}

.sidebar-list-item.active {
    opacity: 1;
    background-color: #ff00ff;
    color: #0a0a0a;
}


/* MAIN CONTENT */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    height: 100vh;
}

.content-header {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    font-size: 12px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #f2f2f2;
}

.header-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 8px;
}

.project-counter {
    width: 100px;
    text-align: center;
    opacity: 0.6;
}

.header-right {
    flex: 1;
}

.details-btn {
    text-align: left;
    padding: 0;
    margin: 0;
    background: none;
    border: none;
    font-size: 12px;
    letter-spacing: 0.05em;
    cursor: pointer;
    opacity: 0.6;
    color: #f2f2f2;
}

.details-btn:hover {
    opacity: 1;
}

.image-viewer-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.4);
    color: rgba(255, 255, 255, 0.8);
    border: none;
    font-size: 24px;
    padding: 16px 20px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    font-family: inherit;
    font-weight: 300;
    user-select: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.nav-arrow:hover {
    color: #fff;
    background: rgba(0, 0, 0, 0.8);
}

.left-arrow {
    left: 20px;
}

.right-arrow {
    right: 20px;
}

.image-viewer {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    padding: 0;
    overflow-x: hidden;
    /* Hide scrollbar entirely */
    overflow-y: hidden;
    position: relative;
    gap: 0;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
}

.image-slide {
    height: 100%;
    width: 100%;
    flex: 0 0 100%;
    scroll-snap-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.image-viewer img {
    width: 100%;
    max-width: 1200px;
    height: 100%;
    max-height: calc(100vh - 160px);
    aspect-ratio: 16 / 9;
    object-fit: contain;
    transition: opacity 0.4s ease;
    opacity: 0;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    border-radius: 4px;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    will-change: opacity, transform;
}

.details-panel {
    position: absolute;
    top: 80px;
    left: 0;
    width: 100%;
    background: rgba(10, 10, 10, 0.95);
    padding: 40px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(5px);
    z-index: 5;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
}

.details-panel.active {
    opacity: 1;
    pointer-events: auto;
}

.details-inner {
    max-width: 800px;
}

.details-meta {
    font-size: 11px;
    letter-spacing: 0.05em;
    margin-bottom: 24px;
    opacity: 0.6;
    display: flex;
    gap: 24px;
    color: #f2f2f2;
}

.details-panel p {
    font-size: 14px;
    line-height: 1.6;
    max-width: 600px;
    color: #f2f2f2;
}

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

    .sidebar {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .project-list-container {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        white-space: nowrap;
        padding: 10px 20px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .project-list-container::-webkit-scrollbar {
        display: none;
    }

    .sidebar-list-item {
        flex: 0 0 auto;
    }

    .main-content {
        height: calc(100vh - 160px);
    }

    .content-header {
        padding: 0 20px;
    }

    .image-viewer {
        padding: 20px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .image-viewer::-webkit-scrollbar {
        display: none;
    }

}