/* --- Project Detail Page Styles --- */

.project-hero {
    width: 100%;
    height: 24vh;
    background-color: var(--bg-color); /* Default, overridden via JS */
    transition: background-color 0.5s ease;
    margin-top: 0;
}

.project-content {
    padding-top: 6rem;
}

.project-layout {
    display: grid;
    grid-template-columns: 1fr 2.5fr;
    gap: 6rem;
    align-items: start;
}

/* --- Left Column (Sticky) --- */
.project-left-col {
    position: sticky;
    top: 120px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 1rem;
    scrollbar-width: none; /* Firefox */
}
.project-left-col::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.project-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.project-title {
    font-size: clamp(2rem, 3vw, 2.625rem);
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: -0.04em;
    color: var(--text-primary);
    text-wrap: balance;
}

.project-desc {
    font-size: 1rem;
    line-height: 1.6;
}

/* --- Accordion --- */
.project-accordion {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.accordion-item {
    border-bottom: 1px solid #151922; /* Thin black border */
}

.accordion-btn {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: none;
    border: none;
    padding: 1.2rem 0;
    font-family: var(--font-main);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    text-align: left;
}

.accordion-btn .chevron {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    transform: rotate(0deg); /* Pointing up by default matching the image */
}

.accordion-btn.active .chevron {
    transform: rotate(180deg); /* Pointing down when open */
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.16, 1, 0.3, 1), padding 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 0;
}

.accordion-content p {
    color: var(--text-fixed);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

/* --- Right Column (Bento Grid) --- */
.project-right-col {
    width: 100%;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.bento-item {
    background-color: var(--nav-bg); /* Use theme color instead of hardcoded grey */
    border-radius: 12px;
    width: 100%;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.5s ease;
    animation: skeletonPulse 1.5s infinite ease-in-out alternate;
}

@keyframes skeletonPulse {
    0% { filter: brightness(1); }
    100% { filter: brightness(0.95); }
}

.bento-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.bento-item.loaded {
    animation: none;
}

/* Grid Spans */
.bento-item.span-1 {
    grid-column: span 1;
    aspect-ratio: 4 / 3;
}

.bento-item.span-2 {
    grid-column: span 2;
    aspect-ratio: 16 / 9;
}

.bento-item.square {
    aspect-ratio: 1 / 1;
}

.bento-item.tall {
    aspect-ratio: 3 / 4;
}

/* Responsive */
@media (max-width: 1024px) {
    .project-layout {
        grid-template-columns: 1fr;
        gap: 4rem;
    }
    
    .project-left-col {
        position: relative;
        top: 0;
        max-height: none;
    }
}

/* --- Lightbox Styles --- */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(10, 10, 10, 0.95);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

.lightbox-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    z-index: 10000;
    opacity: 0.7;
    transition: opacity 0.2s;
    padding: 10px;
}

.lightbox-close:hover {
    opacity: 1;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    justify-content: center;
    align-items: center;
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, opacity;
}

.lightbox-overlay.active .lightbox-content {
    transform: scale(1);
}

#lightbox-img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.bento-item img {
    cursor: zoom-in;
    transition: transform 0.3s ease;
    will-change: transform;
}

.bento-item img:hover {
    transform: scale(1.02);
}
