/* Projects Page Specific Styles */

/* Projects Section */
.projects-section {
    padding: 40px 0;
}

/* Project Filters */
.project-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    margin-bottom: 40px;
}

.filter-btn {
    padding: 10px 24px;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(124, 58, 237, 0.2);
    color: var(--gray);
    border-radius: 30px;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-color: transparent;
    box-shadow: var(--shadow);
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.project-card {
    background: rgba(30, 41, 59, 0.5);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid transparent;
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s ease;
}

.project-card:hover::before {
    transform: scaleX(1);
}

.project-card:hover {
    border-color: var(--primary);
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.project-image {
    height: 200px;
    background: linear-gradient(135deg, var(--dark-light), var(--darker));
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.project-image i {
    font-size: 4rem;
    color: var(--primary);
    z-index: 2;
    position: relative;
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.1), rgba(6, 182, 212, 0.1));
    opacity: 0;
    transition: var(--transition);
}

.project-card:hover .image-overlay {
    opacity: 1;
}

.project-content {
    padding: 30px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.project-title {
    font-size: 1.5rem;
    color: var(--light);
    margin-bottom: 5px;
}

.project-category {
    display: inline-block;
    padding: 5px 15px;
    background: rgba(124, 58, 237, 0.1);
    color: var(--primary);
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.project-description {
    color: var(--gray);
    margin-bottom: 20px;
    line-height: 1.6;
    flex-grow: 1;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;
}

.tech-tag {
    padding: 5px 12px;
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(124, 58, 237, 0.2);
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--gray);
    transition: var(--transition);
}

.project-card:hover .tech-tag {
    border-color: var(--primary);
    color: var(--light);
}

.project-actions {
    display: flex;
    gap: 15px;
    margin-top: auto;
}

.project-btn {
    flex: 1;
    padding: 10px 20px;
    text-align: center;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    cursor: pointer;
}

.btn-view {
    background: rgba(124, 58, 237, 0.1);
    color: var(--primary);
    border: 1px solid rgba(124, 58, 237, 0.3);
}

.btn-view:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.btn-github {
    background: rgba(30, 41, 59, 0.8);
    color: var(--light);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-github:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--light);
}

/* Project Actions Section */
.project-actions {
    text-align: center;
    margin-top: 60px;
}

.action-note {
    color: var(--gray);
    font-size: 0.9rem;
    margin-top: 15px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(2, 6, 23, 0.9);
    z-index: 1001;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(10px);
}

.modal-content {
    background: var(--dark-light);
    border-radius: var(--border-radius);
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid rgba(124, 58, 237, 0.2);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h3 {
    font-size: 1.8rem;
    color: var(--light);
}

.modal-close {
    background: none;
    border: none;
    color: var(--gray);
    font-size: 2rem;
    cursor: pointer;
    transition: var(--transition);
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: var(--primary);
    transform: rotate(90deg);
}

.modal-body {
    padding: 30px;
}

.modal-project-content h4 {
    font-size: 1.3rem;
    color: var(--light);
    margin-bottom: 15px;
}

.modal-project-content p {
    color: var(--gray);
    line-height: 1.7;
    margin-bottom: 20px;
}

.modal-tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
}

.modal-links {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.modal-links a {
    padding: 12px 25px;
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: var(--transition);
}

.modal-links .btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
}

.modal-links .btn-secondary {
    background: transparent;
    color: var(--light);
    border: 2px solid var(--gray);
}

.modal-links a:hover {
    transform: translateY(-3px);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.project-card {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.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; }
.project-card:nth-child(6) { animation-delay: 0.6s; }

/* Responsive Design */
@media (max-width: 992px) {
    .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .project-filters {
        gap: 10px;
    }
    
    .filter-btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .project-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .modal-content {
        max-height: 80vh;
    }
    
    .modal-header {
        padding: 20px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .modal-links {
        flex-direction: column;
    }
}