/* ==========================================================================
   Certificate Modal
   ========================================================================== */
.certificate-modal {
    display: none;
    position: fixed;
    z-index: 1002;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.85);
    justify-content: center;
    align-items: center;
    transition: opacity 0.2s;
}

.certificate-modal.open {
    display: flex;
}

.certificate-modal-content {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: var(--border-radius);
    box-shadow: 0 8px 32px var(--shadow-color);
    object-fit: contain;
}

.certificate-modal-close {
    position: absolute;
    top: 24px;
    right: 36px;
    color: var(--text-secondary);
    font-size: 2.5rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 1003;
    transition: color 0.2s;
}

.certificate-modal-close:hover {
    color: var(--accent-color);
}

/* ==========================================================================
   Project Modal
   ========================================================================== */
.project-modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
}

.project-modal.open {
    display: flex;
}

.project-modal-content {
    background: #2c2c33;
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    max-width: 800px;
    width: 90vw;
    max-height: 85vh;
    overflow-y: auto;
    padding: 2rem 2rem 1.5rem;
    position: relative;
    box-shadow: 0 20px 60px var(--shadow-color);
}

.project-modal-close {
    position: fixed;
    top: 24px;
    right: 36px;
    color: var(--text-secondary);
    font-size: 2.5rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 1002;
    line-height: 1;
    transition: color 0.2s;
}

.project-modal-close:hover {
    color: var(--accent-color);
}

.project-modal-title {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0 0 1.25rem;
}

.project-modal-description {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 0.9375rem;
    margin-bottom: 1.5rem;
    white-space: pre-line;
    display: block;
    -webkit-line-clamp: none;
}

.project-modal-screenshots {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding-bottom: 0.75rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.project-modal-screenshots img {
    height: 220px;
    border-radius: var(--border-radius-sm);
    flex-shrink: 0;
    scroll-snap-align: start;
    box-shadow: 0 4px 12px var(--shadow-color);
    background: var(--glass-bg);
}

.project-modal-action {
    text-align: center;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--glass-border);
}

.project-modal-open-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.5rem;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: var(--border-radius-sm);
    font-size: 0.9375rem;
    font-weight: 500;
    transition: var(--transition);
}

.project-modal-open-link:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.project-modal-coming-soon {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: var(--warning-color);
    color: white;
    border-radius: var(--border-radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@media (max-width: 600px) {
    .project-modal-content {
        padding: 1.5rem 1rem 1rem;
    }

    .project-modal-title {
        font-size: 1.25rem;
    }

    .project-modal-screenshots img {
        height: 160px;
    }
}
