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

/* Detail Page Layout */
.detail-page {
    min-height: 100vh;
    padding-top: 80px;
}

/* Back Navigation */
.back-nav {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent-green);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-bottom: 2rem;
    padding: 0.5rem 0;
}

.back-nav:hover {
    color: var(--text-primary);
    transform: translateX(-4px);
}

.back-nav svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.back-nav:hover svg {
    transform: translateX(-4px);
}

/* Project Detail Hero */
.detail-hero {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.detail-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.detail-date {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: var(--accent-green);
    font-weight: 500;
    background: rgba(0, 255, 136, 0.08);
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    border: 1px solid rgba(0, 255, 136, 0.15);
}

.detail-org {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.detail-role {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.detail-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.detail-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.04);
    padding: 0.35rem 0.8rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.2s ease;
}

.detail-tag:hover {
    color: var(--accent-green);
    border-color: rgba(0, 255, 136, 0.3);
}

/* Content Grid */
.detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

/* Description Section */
.detail-section {
    margin-bottom: 2.5rem;
}

.detail-section-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-green);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.detail-section-title::before {
    content: '//';
    opacity: 0.5;
}

.detail-description {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.8;
}

/* Tech Stack Grid */
.tech-stack-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tech-badge {
    background: rgba(0, 255, 136, 0.06);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid rgba(0, 255, 136, 0.12);
    transition: all 0.3s ease;
}

.tech-badge:hover {
    border-color: rgba(0, 255, 136, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 255, 136, 0.1);
}

/* Highlights List */
.highlights-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.highlights-list li {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    padding-left: 1.5rem;
    position: relative;
}

.highlights-list li::before {
    content: '▹';
    color: var(--accent-green);
    position: absolute;
    left: 0;
    font-size: 1.1rem;
}

/* Screenshot Gallery */
.gallery-section {
    margin-bottom: 3rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
}

.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.06);
    cursor: pointer;
    transition: all 0.3s ease;
    aspect-ratio: 16 / 10;
    background: rgba(15, 20, 25, 0.5);
}

.gallery-item:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 255, 136, 0.3);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4), 0 0 20px rgba(0, 255, 136, 0.1);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

.gallery-item-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: flex-end;
    padding: 1rem;
}

.gallery-item:hover .gallery-item-overlay {
    opacity: 1;
}

.gallery-item-caption {
    color: white;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Empty Gallery State */
.gallery-empty {
    padding: 3rem;
    text-align: center;
    color: var(--text-muted);
    border: 2px dashed rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
}

.gallery-empty svg {
    width: 48px;
    height: 48px;
    margin: 0 auto 1rem;
    opacity: 0.3;
}

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 85vh;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.2s ease;
}

.lightbox-close:hover {
    color: var(--accent-green);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lightbox-nav:hover {
    background: rgba(0, 255, 136, 0.2);
    border-color: var(--accent-green);
}

.lightbox-nav.prev {
    left: -60px;
}

.lightbox-nav.next {
    right: -60px;
}

.lightbox-nav svg {
    width: 20px;
    height: 20px;
}

.lightbox-counter {
    text-align: center;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    margin-top: 1rem;
}

/* GitHub Link Button */
.detail-github-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: transparent;
    border: 1px solid var(--accent-green);
    color: var(--accent-green);
    padding: 0.875rem 1.5rem;
    border-radius: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.detail-github-btn:hover {
    background: var(--accent-green);
    color: var(--primary-dark);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
    transform: translateY(-2px);
}

.detail-github-btn svg {
    width: 20px;
    height: 20px;
}

/* Project Not Found */
.project-not-found {
    text-align: center;
    padding: 6rem 2rem;
}

.project-not-found h2 {
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.project-not-found p {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

/* View Details hint on cards */
.project-view-detail {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--accent-green);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    font-weight: 500;
    margin-top: 1rem;
    opacity: 0;
    transform: translateY(4px);
    transition: all 0.3s ease;
}

.project-card-v2:hover .project-view-detail {
    opacity: 1;
    transform: translateY(0);
}

.project-view-detail svg {
    width: 14px;
    height: 14px;
    transition: transform 0.2s ease;
}

.project-card-v2:hover .project-view-detail svg {
    transform: translateX(4px);
}

/* Clickable card wrapper */
.project-card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
}

.project-card-link .project-card-v2 {
    width: 100%;
}

/* Responsive */
@media (max-width: 1024px) {
    .detail-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .lightbox-nav.prev {
        left: 10px;
    }

    .lightbox-nav.next {
        right: 10px;
    }
}

@media (max-width: 768px) {
    .detail-title {
        font-size: 1.75rem;
    }

    .detail-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .lightbox-content {
        max-width: 95vw;
    }

    .lightbox-nav {
        width: 36px;
        height: 36px;
    }

    .lightbox-nav.prev {
        left: 5px;
    }

    .lightbox-nav.next {
        right: 5px;
    }
}