/* ============================================
   RESET & BASE STYLES
   ============================================ */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    color: #111111;
    background-color: #ffffff;
    overflow-x: hidden;
}

/* Smooth scrolling globally */
html {
    scroll-behavior: smooth;
}

* {
    scroll-behavior: smooth;
}

/* Space Grotesk for landing typography */
.landing-title,
.landing-subtitle,
.landing-credit {
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ============================================
   MAIN LAYOUT - SPLIT SCREEN
   ============================================ */

.container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* ============================================
   LEFT PANEL - Navigation & Project List
   ============================================ */

.left-panel {
    width: 28%;
    min-width: 300px;
    max-width: 480px;
    background-color: #ffffff;
    padding: 60px 15px 60px 20px;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 100;
    border-right: 1px solid #f0f0f0;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* Navigation */
.navigation {
    display: flex;
    flex-wrap: nowrap;
    gap: clamp(2px, 0.6vw, 20px);
    margin-bottom: 60px;
    padding-bottom: 20px;
    padding-right: 5px;
    position: relative;
    z-index: 50;
}

.nav-link {
    font-size: clamp(11px, 1.4vw, 24px);
    font-weight: 500;
    color: #aaaaaa;
    transition: color 0.3s ease;
    position: relative;
    white-space: nowrap;
    flex-shrink: 1;
    min-width: 0;
}

.nav-link:hover,
.nav-link.active {
    color: #111111;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #111111;
}

/* Project List */
.project-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    overflow-y: auto;
    padding-right: 10px;
    scroll-behavior: smooth;
}

.project-item {
    padding: 0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-height: 140px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.project-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.97) 0%,
        rgba(255, 255, 255, 0.92) 100%
    );
    transition: all 0.3s ease;
    z-index: 1;
}

.project-item:hover::before {
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.85) 0%,
        rgba(255, 255, 255, 0.75) 100%
    );
}

.project-item:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.project-item.active::before {
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.88) 0%,
        rgba(255, 255, 255, 0.8) 100%
    );
}

.project-content-wrapper {
    position: relative;
    z-index: 2;
    padding: 16px 20px;
}

.project-title {
    font-size: 18px;
    font-weight: 600;
    color: #111111;
    margin-bottom: 4px;
}

.project-year {
    font-size: 14px;
    color: #666666;
}

.project-description {
    font-size: 13px;
    color: #555555;
    margin-top: 6px;
    line-height: 1.4;
}

/* ============================================
   RIGHT PANEL - Preview Area
   ============================================ */

.right-panel {
    width: 75%;
    background: transparent;
    position: relative;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-behavior: smooth;
    z-index: 1;
}

.right-panel.no-scroll {
    overflow: hidden;
}

/* Landing Animation */
.landing-animation {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 1;
    transition: opacity 0.5s ease;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    pointer-events: none;
}

.landing-animation.hidden {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

.landing-animation canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

/* Landing Content - Typography Overlay */
.landing-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    opacity: 1;
    transition: opacity 0.5s ease;
    pointer-events: none;
    padding: 80px;
}

.landing-content.hidden {
    opacity: 0;
}

.landing-text {
    max-width: 900px;
    text-align: center;
    animation: fadeInUp 1.2s ease-out;
}

/* Main Title */
.landing-title {
    font-size: 56px;
    font-weight: 500;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: #111111;
    margin: 0 0 40px 0;
    animation: fadeInUp 1s ease-out 0.2s both;
}

/* Subtitle */
.landing-subtitle {
    font-size: 20px;
    font-weight: 300;
    line-height: 1.7;
    letter-spacing: 0.01em;
    color: #444444;
    margin: 0 0 50px 0;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 1s ease-out 0.4s both;
}

/* Credit Line */
.landing-credit {
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #888888;
    margin: 0;
    animation: fadeInUp 1s ease-out 0.6s both;
}

/* Fade in up animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Content Placeholder */
.content-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #cccccc;
    font-size: 18px;
    font-weight: 300;
    pointer-events: none;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.content-placeholder.visible {
    opacity: 1;
}

.content-placeholder.hidden {
    opacity: 0;
}

/* Content View - Full Blog Style */
.content-view {
    width: 100%;
    min-height: 100%;
    background: transparent;
    padding: 80px 100px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
    position: relative;
    z-index: 3;
}

.content-view.active {
    opacity: 1;
    pointer-events: auto;
}

/* Content Article Styles */
.content-article {
    max-width: 980px;
    margin: 0 auto;
    animation: fadeInContent 0.5s ease-out;
    position: relative;
}

/* Back to Gallery Button */
.back-to-gallery-btn {
    position: absolute;
    top: 0;
    right: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid #e0e0e0;
    background: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.back-to-gallery-btn:hover {
    background: #111111;
    border-color: #111111;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.back-to-gallery-btn:hover svg {
    stroke: #ffffff;
}

.back-to-gallery-btn svg {
    transition: stroke 0.3s ease;
}

@keyframes fadeInContent {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.content-header {
    margin-bottom: 40px;
}

.content-title {
    font-size: 42px;
    font-weight: 700;
    color: #111111;
    margin-bottom: 16px;
    line-height: 1.2;
}

.content-meta {
    display: flex;
    gap: 20px;
    font-size: 15px;
    color: #888888;
}

.content-body {
    font-size: 17px;
    line-height: 1.8;
    color: #333333;
}

.content-body p {
    margin-bottom: 24px;
}

.content-body h2 {
    font-size: 28px;
    font-weight: 600;
    color: #111111;
    margin: 48px 0 20px;
}

.content-body h3 {
    font-size: 22px;
    font-weight: 600;
    color: #111111;
    margin: 36px 0 16px;
}

.content-image {
    margin: 40px 0 10px 0;
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
    animation: fadeInImage 0.6s ease-out;
}

@keyframes fadeInImage {
    from {
        opacity: 0;
        transform: scale(0.98);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.content-image img,
.content-image video {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.content-image.full-width {
    margin-left: -100px;
    margin-right: -100px;
    width: calc(100% + 200px);
    max-width: none;
}

.content-caption {
    text-align: center;
    font-size: 14px;
    color: #888888;
    margin-top: 8px;
    margin-bottom: 40px;
    font-style: italic;
}


/* ============================================
   RESPONSIVE DESIGN - MOBILE
   ============================================ */

/* Medium screens - narrow desktops/large tablets */
@media (max-width: 1280px) {
    .left-panel {
        width: 35%;
        min-width: 300px;
        max-width: 440px;
        padding: 40px 15px 40px 20px;
        z-index: 100;
    }

    .navigation {
        gap: clamp(2px, 0.5vw, 10px);
        margin-bottom: 35px;
        padding-right: 10px;
    }

    .nav-link {
        font-size: clamp(10px, 1.2vw, 16px);
    }

    .project-item {
        min-height: 130px;
    }
    
    .project-content-wrapper {
        padding: 14px 16px;
    }

    .project-title {
        font-size: 17px;
    }

    .right-panel {
        width: 65%;
    }

    .content-view {
        padding: 60px 40px;
    }
}

/* Small desktops / large tablets - keep vertical layout */
@media (max-width: 900px) {
    .container {
        flex-direction: column;
        height: auto;
        overflow: auto;
    }

    .left-panel {
        width: 100%;
        min-width: auto;
        padding: 30px 25px;
        border-right: none;
        border-bottom: 1px solid #f0f0f0;
        height: auto;
        overflow-y: visible;
        position: sticky;
        top: 0;
        z-index: 100;
        background-color: #ffffff;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    }

    .navigation {
        margin-bottom: 25px;
        gap: 12px;
    }

    .nav-link {
        font-size: 16px;
    }

    /* Horizontal scrolling projects for tablets and mobile */
    .project-list {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        gap: 12px;
        padding-bottom: 10px;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
    }

    .project-list::-webkit-scrollbar {
        height: 6px;
    }

    .project-list::-webkit-scrollbar-track {
        background: #f5f5f5;
        border-radius: 3px;
    }

    .project-list::-webkit-scrollbar-thumb {
        background: #d0d0d0;
        border-radius: 3px;
    }

    .project-item {
        flex: 0 0 300px;
        min-width: 300px;
        min-height: 140px;
        scroll-snap-align: start;
    }
    
    .project-content-wrapper {
        padding: 14px 16px;
    }

    .right-panel {
        width: 100%;
        min-height: 60vh;
        height: auto;
        padding: 40px 30px;
        overflow-y: visible;
    }

    .content-view {
        padding: 50px 30px;
    }
}

@media (max-width: 768px) {
    .left-panel {
        padding: 25px 20px;
        position: relative;
        top: auto;
        box-shadow: none;
        border-bottom: 2px solid #f0f0f0;
    }

    .navigation {
        gap: 10px;
        margin-bottom: 20px;
    }

    .nav-link {
        font-size: 15px;
    }

    .project-list {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        gap: 12px;
        padding-bottom: 10px;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
    }

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

    .project-list::-webkit-scrollbar-track {
        background: #f5f5f5;
        border-radius: 2px;
    }

    .project-list::-webkit-scrollbar-thumb {
        background: #d0d0d0;
        border-radius: 2px;
    }

    .project-item {
        flex: 0 0 280px;
        min-width: 280px;
        min-height: 140px;
        scroll-snap-align: start;
    }
    
    .project-content-wrapper {
        padding: 14px 18px;
    }

    .project-title {
        font-size: 17px;
    }

    .project-year {
        font-size: 13px;
    }

    .project-description {
        font-size: 14px;
    }

    .right-panel {
        padding: 30px 20px;
    }

    /* Content View Mobile */
    .content-view {
        padding: 40px 20px;
    }

    .content-title {
        font-size: 28px;
        line-height: 1.3;
    }

    .content-body {
        font-size: 16px;
        line-height: 1.7;
    }

    .content-body h2 {
        font-size: 24px;
        margin: 36px 0 16px;
    }

    .content-body h3 {
        font-size: 20px;
        margin: 28px 0 12px;
    }

    .content-image {
        margin: 30px 0;
    }

    .content-image.full-width {
        margin-left: -20px;
        margin-right: -20px;
        width: calc(100% + 40px);
    }

    /* Landing Content Mobile */
    .landing-content {
        padding: 40px 25px;
    }

    .landing-title {
        font-size: 28px;
        margin-bottom: 25px;
        line-height: 1.3;
    }

    .landing-subtitle {
        font-size: 15px;
        margin-bottom: 35px;
        line-height: 1.6;
    }

    .landing-credit {
        font-size: 11px;
        letter-spacing: 0.1em;
    }
}

/* ============================================
   ANIMATIONS & TRANSITIONS
   ============================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -45%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.preview-media.fade-in {
    animation: fadeIn 0.4s ease forwards;
}

/* Smooth scrollbar styling */
.project-list::-webkit-scrollbar,
.left-panel::-webkit-scrollbar,
.right-panel::-webkit-scrollbar {
    width: 6px;
}

.project-list::-webkit-scrollbar-track,
.left-panel::-webkit-scrollbar-track,
.right-panel::-webkit-scrollbar-track {
    background: transparent;
}

.project-list::-webkit-scrollbar-thumb,
.left-panel::-webkit-scrollbar-thumb,
.right-panel::-webkit-scrollbar-thumb {
    background: #e0e0e0;
    border-radius: 10px;
}

.project-list::-webkit-scrollbar-thumb:hover,
.left-panel::-webkit-scrollbar-thumb:hover,
.right-panel::-webkit-scrollbar-thumb:hover {
    background: #cccccc;
}

