/* Portfolio Split Layout Styles */
.portfolio-split-layout {
    display: flex;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
}

.portfolio-content-left {
    width: 40%;
    padding: 6rem 3rem 3rem 7.5rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    position: relative;
    z-index: 10;
    height: 100vh;
    overflow: hidden;
}

.portfolio-content-left .archive-header {
    margin-bottom: 2rem;
}

.archive-label {
    display: block;
    font-size: 0.85rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 0.5rem;
}

.archive-title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 400;
    color: #fff;
    margin: 0;
}

.portfolio-content-left .portfolio-nav {
    margin-bottom: 4rem;
}

.portfolio-content-left .project-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    /* Scrollable container for many projects */
    max-height: calc(100vh - 400px);
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 20px;
    position: relative;
}

/* Custom Scrollbar for Project List */
.portfolio-content-left .project-list::-webkit-scrollbar {
    width: 6px;
}

.portfolio-content-left .project-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.portfolio-content-left .project-list::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 10px;
    transition: background 0.3s;
}

.portfolio-content-left .project-list::-webkit-scrollbar-thumb:hover {
    background: #d4af37;
}

/* Firefox Scrollbar */
.portfolio-content-left .project-list {
    scrollbar-width: thin;
    scrollbar-color: var(--accent) rgba(255, 255, 255, 0.05);
}

/* Scroll Fade Indicators */
.portfolio-content-left::before,
.portfolio-content-left::after {
    content: '';
    position: absolute;
    left: 4rem;
    right: 4rem;
    height: 60px;
    pointer-events: none;
    z-index: 15;
    opacity: 0;
    transition: opacity 0.3s;
}

.portfolio-content-left::before {
    top: 13rem;
    background: linear-gradient(to bottom, var(--bg-dark) 0%, transparent 100%);
}

.portfolio-content-left::after {
    bottom: 4rem;
    background: linear-gradient(to top, var(--bg-dark) 0%, transparent 100%);
}

.portfolio-content-left.has-scroll::before,
.portfolio-content-left.has-scroll::after {
    opacity: 1;
}

.portfolio-content-left .project-item {
    display: block;
    padding: 1.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-decoration: none;
    transition: all 0.3s;
    position: relative;
}

.portfolio-content-left .project-item:first-child {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.portfolio-content-left .project-item:hover,
.portfolio-content-left .project-item.active {
    padding-left: 20px;
    border-color: var(--accent);
}

.portfolio-content-left .project-year {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
}

.portfolio-content-left .project-name {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 400;
    color: #fff;
    margin-bottom: 0.4rem;
    transition: color 0.3s;
}

.portfolio-content-left .project-item:hover .project-name,
.portfolio-content-left .project-item.active .project-name {
    color: var(--accent);
    font-style: italic;
}

.portfolio-content-left .project-description {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-muted);
    max-width: 500px;
}

.portfolio-image-right {
    position: fixed;
    right: 0;
    top: 0;
    width: 60%;
    height: 100vh;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.5s;
}

.portfolio-image-right.active {
    opacity: 1;
}

.portfolio-image-inner {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transform: scale(1.1);
    transition: transform 0.5s;
}

.portfolio-image-right.active .portfolio-image-inner {
    transform: scale(1);
}

/* Project Detail Page Styles */
.project-detail-section {
    padding: 8rem 0 4rem;
    min-height: 100vh;
}

.project-detail-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 4rem;
}

.project-detail-header {
    margin-bottom: 4rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    margin-bottom: 2rem;
    transition: color 0.3s;
}

.back-link:hover {
    color: var(--accent);
}

.project-meta {
    max-width: 800px;
}

.project-meta .project-year {
    display: block;
    font-size: 0.9rem;
    color: var(--accent);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.project-title {
    font-family: var(--font-display);
    font-size: 4.5rem;
    font-weight: 400;
    color: #fff;
    margin-bottom: 1.5rem;
}

.project-subtitle {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--text-muted);
}

/* Four Column Interactive Gallery */
.image-gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 4rem;
    perspective: 1000px;
}

.gallery-column {
    position: relative;
    aspect-ratio: 3/4;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.gallery-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem 1.5rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.gallery-column:hover .image-overlay {
    opacity: 1;
}

.image-label {
    color: #fff;
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 1px;
}

/* Hover Effects - Bring to Front & Zoom Out Others */
.gallery-column:hover {
    transform: scale(1.15) translateZ(50px);
    z-index: 10;
}

.image-gallery-grid:hover .gallery-column:not(:hover) {
    transform: scale(0.92);
    opacity: 0.6;
}

/* Project Info Grid */
.project-info-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 3rem;
    padding: 4rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.info-item h3 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent);
    margin-bottom: 1rem;
}

.info-item p {
    font-size: 1.1rem;
    color: #fff;
}

/* Mobile Responsive for New Layouts */
@media (max-width: 992px) {
    .portfolio-split-layout {
        flex-direction: column;
    }

    .portfolio-content-left {
        width: 100%;
        padding: 5rem 2rem;
    }

    .portfolio-content-left .project-name {
        font-size: 2rem;
    }

    .portfolio-image-right {
        position: relative;
        width: 100%;
        height: 400px;
        margin-top: 2rem;
    }

    .image-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .gallery-column:hover {
        transform: scale(1.05);
    }

    .image-gallery-grid:hover .gallery-column:not(:hover) {
        transform: scale(0.98);
    }

    .project-title {
        font-size: 2.5rem;
    }

}

.portfolio-image-inner {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transform: scale(1.1);
    transition: transform 0.5s;
}

.portfolio-image-right.active .portfolio-image-inner {
    transform: scale(1);
}

/* Project Detail Page Styles */
.project-detail-section {
    padding: 8rem 0 4rem;
    min-height: 100vh;
}

.project-detail-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 4rem;
}

.project-detail-header {
    margin-bottom: 4rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    margin-bottom: 2rem;
    transition: color 0.3s;
}

.back-link:hover {
    color: var(--accent);
}

.project-meta {
    max-width: 800px;
}

.project-meta .project-year {
    display: block;
    font-size: 0.9rem;
    color: var(--accent);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.project-title {
    font-family: var(--font-display);
    font-size: 4.5rem;
    font-weight: 400;
    color: #fff;
    margin-bottom: 1.5rem;
}

.project-subtitle {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--text-muted);
}

/* Four Column Interactive Gallery */
.image-gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 4rem;
    perspective: 1000px;
}

.gallery-column {
    position: relative;
    aspect-ratio: 3/4;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.gallery-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem 1.5rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.gallery-column:hover .image-overlay {
    opacity: 1;
}

.image-label {
    color: #fff;
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 1px;
}

/* Hover Effects - Bring to Front & Zoom Out Others */
.gallery-column:hover {
    transform: scale(1.15) translateZ(50px);
    z-index: 10;
}

.image-gallery-grid:hover .gallery-column:not(:hover) {
    transform: scale(0.92);
    opacity: 0.6;
}

/* Project Info Grid */
.project-info-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 3rem;
    padding: 4rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.info-item h3 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent);
    margin-bottom: 1rem;
}

.info-item p {
    font-size: 1.1rem;
    color: #fff;
}

/* Mobile Responsive for New Layouts */
@media (max-width: 992px) {
    .portfolio-split-layout {
        flex-direction: column;
    }

    .portfolio-content-left {
        width: 100%;
        padding: 5rem 2rem;
    }

    .portfolio-content-left .project-name {
        font-size: 2rem;
    }

    .portfolio-image-right {
        position: relative;
        width: 100%;
        height: 400px;
        margin-top: 2rem;
    }

    .image-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .gallery-column:hover {
        transform: scale(1.05);
    }

    .image-gallery-grid:hover .gallery-column:not(:hover) {
        transform: scale(0.98);
    }

    .project-title {
        font-size: 2.5rem;
    }

    .project-info-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    .project-detail-container {
        padding: 0 2rem;
    }
}

/* Mobile Carousel Effect (Max Width 768px) */

/* Mobile Responsive Styles - Side Peek Slider */
@media (max-width: 768px) {
    .portfolio-split-layout {
        flex-direction: column;
        height: auto;
        position: relative;
    }

    .portfolio-content-left {
        display: none;
        /* Hide project list on mobile */
    }

    /* Mobile slider container */
    .portfolio-image-right {
        position: relative;
        width: 100%;
        height: auto;
        opacity: 1 !important;
        overflow: visible;
    }

    .portfolio-image-inner {
        display: none;
        /* Hide the old image display */
    }

    /* Side-peek slider */
    .mobile-portfolio-slider {
        position: relative;
        width: 100%;
        padding: 2rem 0;
        overflow: hidden;
    }

    .mobile-slider-track {
        display: flex;
        gap: 1rem;
        padding: 0 1rem;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .mobile-slider-track::-webkit-scrollbar {
        display: none;
    }

    .mobile-project-card {
        flex: 0 0 85%;
        scroll-snap-align: center;
        background: rgba(255, 255, 255, 0.03);
        border-radius: 12px;
        overflow: hidden;
        border: 1px solid rgba(212, 175, 55, 0.2);
    }

    .mobile-project-image {
        width: 100%;
        height: 50vh;
        background-size: cover;
        background-position: center;
    }

    .mobile-project-info {
        padding: 1.5rem;
    }

    .mobile-project-year {
        font-size: 0.85rem;
        color: var(--accent);
        text-transform: uppercase;
        letter-spacing: 2px;
        margin-bottom: 0.5rem;
    }

    .mobile-project-name {
        font-family: var(--font-display);
        font-size: 1.8rem;
        color: #fff;
        margin-bottom: 0.75rem;
    }

    .mobile-project-description {
        font-size: 0.9rem;
        color: rgba(255, 255, 255, 0.7);
        line-height: 1.6;
        margin-bottom: 1rem;
    }

    .mobile-view-project {
        display: inline-block;
        padding: 0.75rem 1.5rem;
        background: transparent;
        border: 1px solid var(--accent);
        color: var(--accent);
        text-decoration: none;
        border-radius: 4px;
        font-size: 0.9rem;
        transition: all 0.3s;
    }

    .mobile-view-project:active {
        background: var(--accent);
        color: #0a0a0a;
    }

    /* Slider dots */
    .mobile-slider-dots {
        display: flex;
        justify-content: center;
        gap: 0.5rem;
        margin-top: 1rem;
    }

    .slider-dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.3);
        transition: all 0.3s;
    }

    .slider-dot.active {
        background: var(--accent);
        width: 24px;
        border-radius: 4px;
    }
}