/* Project Details Overlay Styles */

.back-nav {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 260;
    /* Above modal content */
}

.back-nav__link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    background: rgba(0, 0, 0, 0.8) !important;
    border: 1px solid var(--accent-color) !important;
    color: var(--accent-color) !important;
    border-radius: 2rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    cursor: pointer;
}

.back-nav__link:hover {
    background: var(--accent-color) !important;
    color: #000 !important;
    box-shadow: 0 0 15px var(--accent-color);
}

.project-detail-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-primary);
    /* Ensure variable is correct */
    z-index: 250;
    /* Above nav (200), below password modal (300) */
    overflow-y: auto;
    display: block;
    animation: fadeIn 0.3s ease-out;
}

.project-detail-modal.hidden {
    display: none !important;
}

.project-detail__header {
    margin-top: 4rem;
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeInDown 0.8s ease-out;
}

.project-detail__title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #fff 0%, #a5f3fc 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.project-detail__category {
    color: var(--accent-color);
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Image */
.project-detail__image-wrapper {
    width: 100%;
    max-width: 900px;
    /* Limit width */
    margin: 0 auto 3rem;
    /* Center horizontally */
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.1);
    border: 1px solid var(--border-color);
    animation: zoomIn 0.8s ease-out;
}

.project-detail__image {
    width: 100%;
    height: 100%;
    max-height: 400px;
    /* Limit height */
    object-fit: cover;
    /* Maintain aspect ratio */
    display: block;
    transition: transform 0.5s ease;
}

.project-detail__description {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    padding: 2rem;
    background: var(--card-bg);
    border-radius: 1rem;
    border: 1px solid var(--border-color);
}

.project-detail__tech-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-bottom: 3rem;
}

.tech-badge {
    padding: 0.5rem 1rem;
    background: rgba(0, 240, 255, 0.1);
    color: var(--accent-color);
    border: 1px solid rgba(0, 240, 255, 0.2);
    border-radius: 2rem;
    font-size: 0.9rem;
}

.project-detail__readme {
    background: #0d1117;
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 3rem;
}

.readme-content {
    color: #c9d1d9;
    line-height: 1.6;
}

.readme-content h1,
.readme-content h2,
.readme-content h3 {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    color: #fff;
}

.readme-content pre {
    background: #161b22;
    padding: 1rem;
    border-radius: 6px;
    overflow-x: auto;
    margin: 1rem 0;
}

.readme-content code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9em;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}