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

body {
    font-family: 'Manrope', sans-serif;
    background-color: #f2f2f2;
    color: #000000;
    text-transform: uppercase;
}

/* App Container - Fixed Viewport */
.app {
    height: 100vh;
    width: 100vw;
    position: relative;
    overflow: hidden;
}

/* Content Wrapper - Key: align-items: flex-start */
.content-wrapper {
    padding: 30px;
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    /* THIS IS CRUCIAL - prevents content from extending off top */
    justify-content: space-between;
    gap: 60px;
}

/* Bio Container (Left) */
.bio-container {
    max-width: 35%;
    max-height: calc(100vh - 60px);
    overflow-y: auto;
    padding-right: 40px;
    padding-left: 60px;
    padding-top: 80px;
}

.bio-text {
    font-size: 24px;
    font-weight: 400;
    line-height: 1.4;
    letter-spacing: 0.3px;
    margin-bottom: 20px;
}

#longBio .bio-text {
    font-size: 16px;
    margin-bottom: 15px;
}

#longBio {
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
}

.bio-label {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    letter-spacing: 0.5px;
}

.more-link,
.back-link {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 1px;
    margin-top: 30px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    text-decoration: underline;
}

.more-link:hover,
.back-link:hover {
    opacity: 1;
}

.back-link {
    margin-bottom: 30px;
    margin-top: 0;
}

/* Project Index (Right) - Takes up right 25% */
.project-index {
    position: absolute;
    left: 75%;
    right: 30px;
    bottom: 130px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.index-label {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 1.5px;
    margin-bottom: 10px;
    opacity: 0;
    /* Changed from 0.7 for animation */
    transition: opacity 0.5s ease;
}

.index-label.reveal-item {
    opacity: 0.7;
}

.project-link {
    font-size: 24px;
    font-weight: 400;
    line-height: 1.4;
    letter-spacing: 0.3px;
    text-decoration: none;
    color: #000000;
    transition: opacity 0.2s ease;
    opacity: 0;
    /* Changed from 0.8 for animation */
}

.project-link.reveal-item {
    opacity: 0.8;
}

.project-link.reveal-item:hover {
    opacity: 1;
}

/* Portrait Image above Projects */
.portrait-container {
    max-width: 196px;
    margin-bottom: 25px;
    border-radius: 4px;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.portrait-container picture {
    display: block;
    width: 100%;
}

.portrait-img {
    width: 100%;
    height: auto;
    display: block;
    filter: grayscale(100%) contrast(1.1);
    transition: filter 0.3s ease;
}

.portrait-img:hover {
    filter: grayscale(0%) contrast(1.0);
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 30px;
    left: 30px;
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 50px;
    backdrop-filter: blur(10px);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    z-index: 100;
}

.bottom-nav a {
    text-decoration: none;
    color: #000000;
    transition: opacity 0.2s ease;
}

.bottom-nav a:hover {
    opacity: 0.6;
}

.bottom-nav span {
    opacity: 0.3;
}

/* Scrollbar Styling */
.bio-container::-webkit-scrollbar {
    width: 6px;
}

.bio-container::-webkit-scrollbar-track {
    background: transparent;
}

.bio-container::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.bio-container::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

/* Top Bar */
.top-bar {
    position: fixed;
    top: 30px;
    left: 30px;
    right: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
}

/* Back to Home Button */
.back-home {
    position: fixed;
    /* Fixed to stay in place */
    top: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid #333333;
    padding: 8px 16px;
    font-family: 'Manrope', sans-serif;
    /* Keeping site font */
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    color: #ffffff;
    z-index: 1000;
}

.back-home:hover {
    background: rgba(0, 0, 0, 0.95);
    border-color: #666666;
    opacity: 1;
}

.visitor-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 1.5px;
    margin-bottom: 40px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #ffb3d9;
    box-shadow: 0 0 8px rgba(255, 179, 217, 0.6);
}

.status-dot-blue {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #00ccff;
    /* Bright blue to match */
    box-shadow: 0 0 8px rgba(0, 204, 255, 0.6);
}

/* Bio Actions (BIO / REEL) */
.bio-actions {
    display: flex;
    gap: 30px;
    margin-top: 30px;
    opacity: 0;
    /* Handled by JS fade-in */
    transition: opacity 0.5s ease;
}

.bio-action-link {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 1px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.bio-action-link:hover {
    opacity: 1;
}

.bio-action-link .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1px solid #000;
    display: inline-block;
}

.bio-action-link .dot.filled {
    background-color: #000;
}

.bio-action-link .dot.hollow {
    background-color: transparent;
}

/* Reel Section */
#reelSection {
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
    width: 100%;
}

/* Reel Slideshow */
.reel-slideshow {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    /* Updated to 16:9 */
    background-color: #000;
    /* Black rectangle */
    overflow: hidden;
    margin-top: 20px;
}

.reel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    /* transition: opacity 0.1s; */
    /* Removed for hard cut, or very fast */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #fff;
    /* White text for contrast */
    font-weight: 500;
}

.reel-slide.active {
    opacity: 1;
}

/* Mobile Responsiveness */
@media screen and (max-width: 768px) {
    .app {
        height: auto;
        min-height: 100vh;
        overflow-y: visible;
        overflow-x: hidden;
    }

    .content-wrapper {
        position: relative;
        flex-direction: column;
        padding: 24px;
        padding-top: 80px;
        height: auto;
        gap: 40px;
    }

    .bio-container {
        max-width: 100% !important;
        padding: 0 !important;
        max-height: none;
        overflow-y: visible;
    }

    .bio-text {
        font-size: 18px;
    }

    #longBio .bio-text {
        font-size: 15px;
    }

    .project-index {
        position: relative;
        left: 0;
        right: 0;
        bottom: 0;
        padding-bottom: 40px;
    }

    .project-link {
        font-size: 18px;
    }
}