html {
    scroll-behavior: smooth;
    overflow: hidden;
    height: 100%;
    background: #0a0a0a;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    margin: 0;
    padding: 0;
    background: transparent;
    user-select: none;
    font-family: Arial, sans-serif;
    overflow: hidden;
    height: 100%;
    transition: background-color 0.5s ease;
}


.scroll-container {
    height: 100vh;
    overflow-y: scroll;
    overflow-x: hidden;
    scroll-padding: 0;
    opacity: 1;
    display: block;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}


.section {
    position: relative;
    scroll-snap-align: start;
    /* Ensure sections take full viewport */
    width: 100%;
    box-sizing: border-box;
}

.section-home {
    height: auto;
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 80px 0 40px 0;
}

.section-bio {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 100px 0 200px 0;
    min-height: 100vh;
}

.section-works {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 0 100px 0;
    min-height: auto;
}


.credit {
    color: #666;
    font-size: 26px;
    font-family: "freight-display-pro", serif;
    font-weight: 400;
    font-style: normal;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-smooth: always;
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
}

.tagline-corner {
    position: absolute;
    top: 40px;
    right: 80px;
    color: #666;
    font-size: 18px;
    font-family: "freight-text-pro", serif;
    font-weight: 400;
    font-style: normal;
    z-index: 1000;
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
}

.outlined-link {
    color: white;
    text-decoration: none;
    font-family: "freight-display-pro", serif;
    font-weight: 400;
    font-style: normal;
    transition: all 0.3s ease;
}

.menu-link {
    font-weight: 400;
}

.outlined-link:hover {
    background-color: white;
    color: black;
}


.separator {
    color: #999;
    font-weight: 400;
}

.mobile-header {
    position: absolute;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    color: #666;
    font-size: 22.5px;
    font-family: "freight-text-pro", serif;
    font-weight: 400;
    font-style: normal;
    z-index: 1000;
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    display: none;
}

/* Desktop styles */
@media (min-width: 768px) {
    .credit {
        position: absolute;
        bottom: 120px;
        left: 50%;
        transform: translateX(-50%);
        text-align: center;
        width: 400px;
        z-index: 1000;
    }
    .credit .bio {
        margin: 0;
        font-size: 26px;
        line-height: 1.5;
        color: #666;
    }
}

/* Top navigation */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 40px;
    color: #666;
    font-size: 26px;
    font-family: "freight-display-pro", serif;
    font-weight: 400;
    font-style: normal;
    z-index: 1000;
    background: #0a0a0a;
    transition: background-color 0.3s ease;
    box-sizing: border-box;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-family: "freight-display-pro", serif;
    font-weight: 400;
    font-style: normal;
    transition: all 0.3s ease;
    margin-right: 8px;
}

.nav-link:hover {
    background-color: white;
    color: black;
}

.nav-link.active {
    background-color: white;
    color: black;
}

.nav-separator {
    color: #999;
    font-weight: 400;
    margin: 0 8px;
}

.nav-name {
    color: #666;
    font-weight: 400;
}

/* Hide mobile-only elements on desktop */
.mobile-only {
    display: none;
}

/* Show desktop-only elements on desktop */
.desktop-only {
    display: inline;
}

/* Mobile styles */
@media (max-width: 767px) {
    .mobile-header {
        display: block;
    }
    
    .top-nav {
        padding: 35px 20px 20px 20px; /* More top padding */
        font-size: 24px; /* Slightly larger font */
        line-height: 1.4;
    }
    
    .nav-link {
        margin-right: 4px;
    }
    
    .nav-separator {
        margin: 0 4px;
    }
    
    /* Show mobile line break */
    .mobile-only {
        display: block;
    }
    
    /* Hide desktop separator after name */
    .desktop-only {
        display: none;
    }
    
    .credit {
        position: absolute;
        bottom: 180px;
        left: 50%;
        transform: translateX(-50%);
        text-align: center;
        width: 90%;
        z-index: 1000;
    }
    .credit .bio {
        font-size: 24px;
        line-height: 1.4;
    }
}

.bio-content {
    width: 35%;
    max-width: none;
    color: #aaa;
    font-family: "freight-text-pro", serif;
    font-size: 21px;
    font-weight: 400;
    font-style: normal;
    line-height: 1.4;
    text-align: left;
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    margin: 0;
    position: relative;
    padding: 40px; /* Match navigation padding */
}

/* Removed the invisible placeholder - no longer needed */

.bio-content p {
    margin: 0 0 1.5em 0;
    position: relative;
    width: 100%;
    min-height: 2.8em; /* Reserve space for 2 lines of text */
}

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

.works-content {
    width: 100%;
    max-width: none;
    color: #666;
    font-family: "freight-text-pro", serif;
    font-size: 24px;
    line-height: 1.5;
    text-align: left;
    padding: 0 40px;
}

.works-content h2 {
    margin-top: 0;
    margin-bottom: 2rem;
    padding-top: 1rem;
}

.works-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    margin-top: 2rem;
    grid-auto-flow: dense; /* Help fill gaps in the grid */
}

@media (min-width: 1440px) {
    .works-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* For 3-column grid, adjust large items */
@media (max-width: 1439px) {
    .work-item.large {
        grid-column: span 2;
        grid-row: span 2;
    }
}

.work-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    position: relative; /* For absolute positioning of tooltip */
}

.work-item.animate {
    opacity: 1;
    transform: translateY(0);
}

.work-item.large,
.work-item.large-left,
.work-item.large-right {
    grid-column: span 2;
    grid-row: span 2;
}

.work-item video {
    width: 100%;
    height: auto;
    object-fit: cover;
    aspect-ratio: 1/1;
}

.video-title {
    display: none;
}

/* Video tooltip - overlay inside video */
.video-tooltip {
    position: absolute;
    background: rgba(10, 10, 10, 0.9);
    color: white;
    padding: 8px 12px;
    font-family: "freight-text-pro", serif;
    font-size: 16px;
    font-weight: 400;
    pointer-events: none;
    z-index: 100;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    left: 12px;
    top: 12px;
    max-width: calc(100% - 24px);
    box-sizing: border-box;
    white-space: pre-line;
    line-height: 1.3;
}


/* Removed debug overlays */

@media (max-width: 767px) {
    .bio-content {
        font-size: 24px;
        width: 100%;
        padding: 20px; /* Match mobile navigation padding */
        box-sizing: border-box;
    }
    
    .section-works {
        padding: 40px 0 0 0;
    }
    
    .works-content {
        width: 100%;
        padding: 0 20px; /* Match menu padding */
        margin: 0;
        box-sizing: border-box;
    }
    
    .works-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0;
    }
    
    .work-item {
        opacity: 1 !important;
        transform: translateY(0) !important;
    }
    
    .work-item.large,
    .work-item.large-left,
    .work-item.large-right {
        grid-column: span 2;
        grid-row: span 2;
    }
    
}

