/* ================================
   Project Page Styles
   ================================ */

/* Project Header */
.project-page {
    max-width: 900px;
    animation: fadeInUp 0.6s ease both;
}

.project-header {
    margin-bottom: var(--spacing-lg);
}

.back-link {
    display: inline-block;
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin-bottom: var(--spacing-md);
    transition: color var(--transition-fast);
}

.back-link:hover {
    color: var(--color-accent);
}

.project-header h1 {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 400;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: var(--spacing-sm);
}

.project-subtitle {
    font-size: 1.15rem;
    color: var(--color-text-light);
    margin-bottom: var(--spacing-sm);
}

.project-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.meta-divider {
    opacity: 0.5;
}

/* Project Intro */
.project-intro {
    margin-bottom: var(--spacing-lg);
}

.project-intro p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--color-text-light);
    margin-bottom: 1rem;
}

.project-intro p:last-child {
    margin-bottom: 0;
}

/* Video Section */
.project-video {
    margin-bottom: var(--spacing-lg);
}

.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background: var(--color-bg-warm);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--color-border);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
}

.video-placeholder span {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.video-placeholder p {
    font-size: 0.85rem;
    opacity: 0.7;
}

/* Gallery Section */
.project-gallery {
    margin-bottom: var(--spacing-lg);
}

.project-gallery h2,
.project-details h2 {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 400;
    margin-bottom: var(--spacing-md);
    color: var(--color-text);
}

.project-gallery h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: var(--spacing-sm);
    color: var(--color-text-light);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: var(--spacing-sm);
}

.gallery-item {
    cursor: pointer;
    border-radius: 10px;
    overflow: hidden;
    transition: all var(--transition-smooth);
}

.gallery-item:hover {
    transform: scale(1.03);
    box-shadow: 0 15px 35px var(--color-shadow);
    z-index: 10;
}

.gallery-image {
    aspect-ratio: 16 / 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--transition-smooth);
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

img.gallery-image {
    aspect-ratio: auto;
}

.gallery-item:hover .gallery-image {
    transform: scale(1.05);
}

/* Project Details */
.project-details {
    margin-bottom: var(--spacing-lg);
}

.project-details p {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--color-text-light);
    margin-bottom: 1rem;
}

.project-details p:last-child {
    margin-bottom: 0;
}

.project-details a {
    color: var(--color-accent);
    font-weight: 500;
    transition: opacity var(--transition-fast);
}

.project-details a:hover {
    opacity: 0.7;
}

/* Feature Lists */
.feature-list {
    list-style: none;
    margin-top: 1rem;
}

.feature-list li {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--color-text-light);
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    border-bottom: 1px solid var(--color-border);
}

.feature-list li:last-child {
    border-bottom: none;
}

.feature-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 1rem;
    width: 6px;
    height: 6px;
    background: var(--color-accent);
    border-radius: 50%;
}

.feature-list li strong {
    color: var(--color-text);
}

/* Placeholder images */
.placeholder-image {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16 / 10;
    border-radius: 8px;
}

/* Project Navigation */
.project-nav {
    display: flex;
    justify-content: space-between;
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--color-border);
}

.nav-prev,
.nav-next {
    display: flex;
    flex-direction: column;
    padding: var(--spacing-sm);
    border-radius: 8px;
    transition: background var(--transition-fast);
}

.nav-prev:hover,
.nav-next:hover {
    background: var(--color-accent-soft);
}

.nav-next {
    text-align: right;
}

.nav-label {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-bottom: 0.25rem;
}

.nav-title {
    font-size: 1rem;
    color: var(--color-accent);
    font-weight: 500;
}

/* ================================
   Lightbox
   ================================ */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 25px;
    background: none;
    border: none;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity var(--transition-fast);
    z-index: 1001;
}

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

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: white;
    font-size: 3rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity var(--transition-fast);
    padding: 1rem;
    z-index: 1001;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    opacity: 1;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-image-container {
    max-width: 100%;
    max-height: calc(85vh - 40px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-image-container img {
    max-width: 100%;
    max-height: calc(85vh - 40px);
    object-fit: contain;
    border-radius: 4px;
}

/* Placeholder for demo */
.lightbox-image-container .lightbox-placeholder {
    width: 80vw;
    max-width: 1000px;
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1rem;
}

.lightbox-counter {
    margin-top: 1rem;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

/* ================================
   Responsive
   ================================ */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .lightbox-prev,
    .lightbox-next {
        font-size: 2rem;
    }
    
    .lightbox-prev {
        left: 10px;
    }
    
    .lightbox-next {
        right: 10px;
    }
    
    .project-nav {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    .nav-next {
        text-align: left;
    }
}
