/* =============================================
   PROJECTS-MODAL.CSS – Project Detail Modal
   ============================================= */

/* ---- Overlay ---- */
#proj-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(5, 0, 18, 0.82);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

#proj-modal.active {
    opacity: 1;
    pointer-events: all;
}

/* ---- Dialog box ---- */
.proj-modal-box {
    background: #12001f;
    border: 1px solid var(--color-accent-border);
    border-radius: 16px;
    width: 100%;
    max-width: 780px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7),
        0 0 0 1px var(--color-accent-glow);
    transform: translateY(24px) scale(0.97);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
        opacity 0.3s ease;
    opacity: 0;

    scrollbar-width: thin;
    scrollbar-color: rgba(var(--color-accent-rgb), 0.4) transparent;
}

#proj-modal.active .proj-modal-box {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.proj-modal-box::-webkit-scrollbar {
    width: 5px;
}

.proj-modal-box::-webkit-scrollbar-track {
    background: transparent;
}

.proj-modal-box::-webkit-scrollbar-thumb {
    background: rgba(var(--color-accent-rgb), 0.4);
    border-radius: 99px;
}

/* ---- Modal header (name banner) ---- */
.proj-modal-header {
    position: relative;
    width: 100%;
    height: 260px;
    overflow: hidden;
    flex-shrink: 0;
    border-radius: 16px 16px 0 0;
    background: linear-gradient(135deg, #0d001a 0%, #1e0040 50%, #0a001a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Mesh grid background */
.proj-modal-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(var(--color-accent-rgb), 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(var(--color-accent-rgb), 0.1) 1px, transparent 1px);
    background-size: 32px 32px;
    pointer-events: none;
}

/* Glow orb */
.proj-modal-header::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(var(--color-accent-rgb), 0.4) 0%, transparent 65%);
    pointer-events: none;
}

/* Modal name text */
.proj-modal-name {
    position: relative;
    z-index: 3;
    text-align: center;
    padding: 0 32px;
    pointer-events: none;
}

.proj-modal-name-main {
    display: block;
    font-size: 2rem;
    font-weight: 900;
    color: #fff;
    letter-spacing: -0.5px;
    line-height: 1.15;
    text-shadow: 0 0 40px rgba(var(--color-accent-rgb), 0.9), 0 0 80px rgba(var(--color-accent-rgb), 0.4), 0 4px 12px rgba(0, 0, 0, 0.7);
}

.proj-modal-name-sub {
    display: block;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: rgba(200, 140, 255, 0.8);
    margin-top: 12px;
}

/* Gradient overlay at bottom */
.proj-modal-header-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to top, #12001f 0%, transparent 100%);
    pointer-events: none;
    z-index: 4;
}

/* Close button */
#proj-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 10;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(10, 0, 25, 0.7);
    backdrop-filter: blur(4px);
    color: #fff;
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

#proj-modal-close:hover {
    background: var(--color-accent);
    border-color: var(--color-accent);
    transform: rotate(90deg) scale(1.1);
}

/* Badge inside header */
.proj-modal-header .proj-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 10;
    pointer-events: none;
}

/* ---- Modal body ---- */
.proj-modal-body {
    padding: 24px 28px 32px;
}

#proj-modal-title {
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--color-text);
    margin: 0 0 10px;
    line-height: 1.25;
}

#proj-modal-summary {
    font-size: 0.92rem;
    color: var(--color-text-secondary);
    line-height: 1.75;
    margin: 0 0 16px;
}

/* ---- Divider & label ---- */
.proj-divider {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    margin: 20px 0 16px;
}

.proj-details-label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--color-accent);
    opacity: 0.85;
    margin-bottom: 14px;
}

/* ---- Bullet list ---- */
.proj-bullets {
    list-style: none;
    padding: 0;
    margin: 0 0 22px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.proj-bullets li {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    line-height: 1.75;
    padding-left: 20px;
    position: relative;
}

.proj-bullets li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--color-accent);
    font-size: 0.9rem;
    line-height: 1.75;
}

/* ---- Action buttons ---- */
.proj-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.proj-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 10px 22px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.25s ease;
    letter-spacing: 0.3px;
    cursor: pointer;
    border: none;
}

.proj-btn svg {
    width: 15px;
    height: 15px;
    stroke: currentColor;
    fill: none;
    flex-shrink: 0;
}

.proj-btn-primary {
    background: var(--color-accent);
    color: #fff;
}

.proj-btn-primary:hover {
    background: var(--color-accent-hover);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(var(--color-accent-rgb), 0.4);
}

.proj-btn-ghost {
    background: transparent;
    color: var(--color-text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.proj-btn-ghost:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .proj-modal-header {
        height: 200px;
    }

    .proj-modal-name-main {
        font-size: 1.5rem;
    }

    .proj-modal-body {
        padding: 18px 20px 28px;
    }

    #proj-modal-title {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    #proj-modal {
        padding: 0;
        align-items: flex-end;
    }

    .proj-modal-box {
        border-radius: 20px 20px 0 0;
        max-height: 92vh;
    }
}
