/* ===== PROJECTS PAGE STYLES ===== */

/* ===== HERO SECTION ===== */
.projects-hero {
    margin-top: var(--nav-height);
    padding: 80px 0 60px;
    text-align: center;
}

.projects-hero .hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.projects-hero .hero-subtitle {
    font-size: 1.3rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 40px;
    line-height: 1.6;
}

/* ===== PROJECT FILTERS ===== */
.project-filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 40px;
}

.filter-btn {
    padding: 12px 25px;
    border: 2px solid var(--glass-border);
    border-radius: 25px;
    background: transparent;
    color: var(--text-secondary);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.95rem;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--accent-gradient);
    border-color: #3498db;
    color: white;
    transform: translateY(-2px);
}

/* ===== PROJECTS GRID ===== */
.projects-content {
    padding: 60px 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 40px;
    max-width: 1400px;
    margin: 0 auto;
}

/* ===== PROJECT CARDS ===== */
.project-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-radius: 25px;
    border: 1px solid var(--glass-border);
    overflow: hidden;
    transition: var(--transition);
    position: relative;
    display: flex;
    flex-direction: column;
    height: fit-content;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
    border-color: var(--hover-border);
}

.project-card.filtered {
    opacity: 0.3;
    transform: scale(0.95);
    pointer-events: none;
}

/* ===== PROJECT HEADER ===== */
.project-header {
    padding: 30px;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.project-image {
    position: relative;
}

.project-icon {
    font-size: 4rem;
    line-height: 1;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.project-status {
    position: absolute;
    top: -10px;
    right: -15px;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-completed {
    background: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
    border: 1px solid rgba(46, 204, 113, 0.4);
}

.status-active {
    background: rgba(52, 152, 219, 0.2);
    color: #3498db;
    border: 1px solid rgba(52, 152, 219, 0.4);
}

.status-research {
    background: rgba(155, 89, 182, 0.2);
    color: #9b59b6;
    border: 1px solid rgba(155, 89, 182, 0.4);
}

.project-meta {
    text-align: right;
    flex-shrink: 0;
}

.project-date {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 15px;
    font-weight: 500;
}

.project-tags {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
}

.tag {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.tag-ai { background: rgba(231, 76, 60, 0.2); color: #e74c3c; }
.tag-security { background: rgba(46, 204, 113, 0.2); color: #2ecc71; }
.tag-python { background: rgba(241, 196, 15, 0.2); color: #f1c40f; }
.tag-incident { background: rgba(230, 126, 34, 0.2); color: #e67e22; }
.tag-automation { background: rgba(52, 152, 219, 0.2); color: #3498db; }
.tag-java { background: rgba(211, 84, 0, 0.2); color: #d35400; }
.tag-quantum { background: rgba(155, 89, 182, 0.2); color: #9b59b6; }
.tag-crypto { background: rgba(149, 165, 166, 0.2); color: #95a5a6; }
.tag-research { background: rgba(52, 73, 94, 0.2); color: #34495e; }
.tag-cloud { background: rgba(46, 204, 113, 0.2); color: #27ae60; }
.tag-analytics { background: rgba(142, 68, 173, 0.2); color: #8e44ad; }
.tag-dashboard { background: rgba(41, 128, 185, 0.2); color: #2980b9; }
.tag-realtime { background: rgba(231, 76, 60, 0.2); color: #c0392b; }

/* ===== PROJECT CONTENT ===== */
.project-content {
    padding: 30px;
    flex-grow: 1;
}

.project-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 15px;
    line-height: 1.3;
}

.project-description {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 25px;
    font-size: 1rem;
}

.project-highlights {
    margin-bottom: 25px;
}

.project-highlights h4 {
    color: var(--text-primary);
    font-size: 1rem;
    margin-bottom: 12px;
    font-weight: 600;
}

.project-highlights ul {
    list-style: none;
    padding: 0;
}

.project-highlights li {
    color: var(--text-muted);
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
    font-size: 0.95rem;
}

.project-highlights li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #2ecc71;
    font-weight: bold;
}

.project-tech {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
    background: rgba(255, 255, 255, 0.02);
    padding: 15px;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
}

.project-tech strong {
    color: var(--text-primary);
}

/* ===== PROJECT FOOTER ===== */
.project-footer {
    padding: 25px 30px;
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.project-metrics {
    display: flex;
    gap: 25px;
}

.metric {
    text-align: center;
}

.metric-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.metric-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

.project-actions {
    display: flex;
    gap: 10px;
}

.project-actions .btn {
    padding: 10px 20px;
    font-size: 0.9rem;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn:disabled:hover {
    transform: none;
}

/* ===== PROJECT STATS SECTION ===== */
.project-stats {
    margin: 80px 0;
}

.stats-container {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.stats-title {
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 50px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.stat-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px 30px;
    border: 1px solid var(--glass-border);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(52, 152, 219, 0.1), transparent);
    transition: left 0.5s;
}

.stat-card:hover::before {
    left: 100%;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-heavy);
    border-color: var(--hover-border);
}

.stat-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 10px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.stat-description {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* ===== CTA SECTION ===== */
.projects-cta {
    margin-bottom: 40px;
}

/* ===== PROJECT MODAL ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    max-width: 800px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.9);
    transition: var(--transition);
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-header {
    padding: 30px 40px 20px;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.modal-body {
    padding: 30px 40px;
    color: var(--text-muted);
    line-height: 1.6;
}

.modal-footer {
    padding: 20px 40px 30px;
    border-top: 1px solid var(--glass-border);
    text-align: right;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
    .projects-content {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .projects-hero .hero-title {
        font-size: 2.5rem;
    }

    .projects-hero .hero-subtitle {
        font-size: 1.1rem;
    }

    .project-filters {
        gap: 10px;
    }

    .filter-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .projects-content {
        grid-template-columns: 1fr;
        gap: 25px;
        padding: 40px 0;
    }

    .project-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 15px;
    }

    .project-meta {
        text-align: center;
    }

    .project-tags {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
    }

    .project-footer {
        flex-direction: column;
        gap: 20px;
        align-items: center;
    }

    .project-metrics {
        justify-content: center;
    }

    .project-actions {
        justify-content: center;
    }

    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 20px;
    }

    .stat-card {
        padding: 30px 25px;
    }

    .modal-content {
        width: 95%;
        margin: 20px;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding-left: 25px;
        padding-right: 25px;
    }
}

@media (max-width: 480px) {
    .projects-hero .hero-title {
        font-size: 2rem;
    }

    .project-filters {
        flex-direction: column;
        align-items: center;
    }

    .filter-btn {
        width: 200px;
        text-align: center;
    }

    .project-header,
    .project-content {
        padding: 25px 20px;
    }

    .project-footer {
        padding: 20px;
    }

    .project-icon {
        font-size: 3rem;
    }

    .project-title {
        font-size: 1.3rem;
    }

    .project-metrics {
        flex-direction: column;
        gap: 15px;
    }

    .project-actions {
        flex-direction: column;
        width: 100%;
    }

    .project-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .stats-title {
        font-size: 2rem;
    }

    .stat-number {
        font-size: 2.5rem;
    }

    .modal-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .modal-title {
        font-size: 1.5rem;
    }
}

/* ===== ANIMATIONS ===== */
@keyframes projectCardIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.project-card {
    animation: projectCardIn 0.6s ease-out;
    animation-fill-mode: both;
}

.project-card:nth-child(1) { animation-delay: 0.1s; }
.project-card:nth-child(2) { animation-delay: 0.2s; }
.project-card:nth-child(3) { animation-delay: 0.3s; }
.project-card:nth-child(4) { animation-delay: 0.4s; }
.project-card:nth-child(5) { animation-delay: 0.5s; }

/* ===== FILTER TRANSITIONS ===== */
.projects-content {
    position: relative;
}

.project-card {
    transition: opacity 0.4s ease, transform 0.4s ease, filter 0.4s ease;
}

.project-card.hidden {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
    position: absolute;
    z-index: -1;
}

/* ===== ACCESSIBILITY ===== */
.filter-btn:focus,
.modal-close:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

.project-card:focus-within {
    outline: 2px solid #3498db;
    outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
    .project-card,
    .stat-card,
    .modal-overlay,
    .modal-content {
        animation: none;
        transition: none;
    }
}