/* Projects Section - Hexagon Pattern Theme */
#projects {
    background: 
        linear-gradient(rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.9)),
        repeating-linear-gradient(60deg, transparent, transparent 1px, rgba(255, 255, 255, 0.03) 1px, rgba(255, 255, 255, 0.03) 29px),
        repeating-linear-gradient(120deg, transparent, transparent 1px, rgba(255, 255, 255, 0.03) 1px, rgba(255, 255, 255, 0.03) 29px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

body.light-theme #projects {
    background: 
        linear-gradient(rgba(245, 245, 245, 0.9), rgba(245, 245, 245, 0.9)),
        repeating-linear-gradient(60deg, transparent, transparent 1px, rgba(0, 0, 0, 0.03) 1px, rgba(0, 0, 0, 0.03) 29px),
        repeating-linear-gradient(120deg, transparent, transparent 1px, rgba(0, 0, 0, 0.03) 1px, rgba(0, 0, 0, 0.03) 29px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.project-card {
    background-color: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
    position: relative;
    cursor: pointer;
}

body.light-theme .project-card {
    background-color: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.project-card:hover {
    transform: translateY(-5px) rotate(1deg);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

body.light-theme .project-card:hover {
    border-color: rgba(0, 0, 0, 0.1);
}

.project-img {
    height: 200px;
    position: relative;
    overflow: hidden;
}

.project-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.project-card:hover .project-img img {
    transform: scale(1.1);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

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

.view-details {
    padding: 10px 20px;
    background: var(--text-primary);
    color: var(--primary-bg);
    border: none;
    border-radius: 4px;
    font-family: 'Orbitron', sans-serif;
    cursor: pointer;
    transition: var(--transition);
}

.view-details:hover {
    transform: scale(1.1);
}

.project-content {
    padding: 1.5rem;
}

.project-content h3 {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    font-family: 'Orbitron', sans-serif;
}

.project-content p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Project Modal */
.project-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

body.light-theme .project-modal {
    background: rgba(255, 255, 255, 0.9);
}

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

.modal-content {
    background: var(--secondary-bg);
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 10px;
    position: relative;
    padding: 2rem;
}

body.light-theme .modal-content {
    background: var(--primary-bg);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
}

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

.modal-header {
    margin-bottom: 2rem;
}

.modal-header h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
}

.modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.modal-image img {
    width: 100%;
    border-radius: 8px;
}

.modal-details h3 {
    font-family: 'Orbitron', sans-serif;
    margin-bottom: 1rem;
    margin-top: 1.5rem;
}

.modal-details p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.tech-stack {
    margin-bottom: 2rem;
}

.tech-item {
    margin-bottom: 1rem;
}

.tech-name {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
}

.tech-bar {
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    overflow: hidden;
}

body.light-theme .tech-bar {
    background: rgba(0, 0, 0, 0.1);
}

.tech-progress {
    height: 100%;
    background: var(--accent);
    border-radius: 5px;
    width: 0;
    transition: width 1.5s ease-in-out;
}

.project-links {
    display: flex;
    gap: 1rem;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    background: var(--accent);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 4px;
    font-family: 'Orbitron', sans-serif;
    transition: var(--transition);
}

.project-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Responsive Design for Projects Page */
@media screen and (max-width: 968px) {
    .modal-body {
        grid-template-columns: 1fr;
    }
    
    .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media screen and (max-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        padding: 1.5rem;
    }
    
    .project-links {
        flex-direction: column;
    }
}