/* Projects Page Styling */

.projects-hero {
    height: 50vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    padding: 50px;
    z-index: 1;
    opacity: 0;
    transition: opacity 1s ease;
}

.projects-hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    font-weight: 600;
}

.projects-hero p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.projects-hero.visible {
    opacity: 1;
}

/* Projects Section */
.projects-section {
    padding: 80px 100px;
    opacity: 0;
    transition: opacity 1s ease;
    z-index: 2;
}

.projects-section.visible {
    opacity: 1;
}

.section-title {
    font-size: 2rem;
    font-weight: 600;
    color: white;
    margin-bottom: 50px;
    text-align: left;
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 50px;
}

.project-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 20px;
    color: white;
    text-decoration: none;
}

.project-card:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.project-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.3);
}

.project-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.project-card p {
    font-size: 0.95rem;
    line-height: 1.6;
    opacity: 0.8;
    flex-grow: 1;
}

.project-links {
    display: flex;
    gap: 15px;
}

.project-links a {
    color: white;
    font-size: 1.5rem;
    transition: transform 0.3s ease;
    text-decoration: none;
}

.project-links a:hover {
    transform: scale(1.2);
}

/* Project Modal */
.project-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.95);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.project-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-modal-content {
    background: rgba(20, 20, 30, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    width: 90%;
    max-width: 1000px;
    max-height: 85vh;
    overflow-y: auto;
    padding: 50px;
    color: white;
    position: relative;
}

.project-close {
    position: absolute;
    right: 30px;
    top: 30px;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    color: white;
    transition: color 0.3s ease;
    z-index: 2001;
}

.project-close:hover {
    color: #ccc;
}

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

.project-modal-header h2 {
    font-size: 2rem;
    margin: 0;
}

.github-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.github-button:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

.readme-content {
    font-size: 0.95rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.85);
    word-wrap: break-word;
}

.readme-content h1,
.readme-content h2,
.readme-content h3 {
    color: white;
    margin-top: 20px;
    margin-bottom: 10px;
}

.readme-content code {
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
}

.readme-content pre {
    background: rgba(0, 0, 0, 0.3);
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 10px 0;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .projects-section {
        padding: 60px 50px;
    }
}

@media (max-width: 680px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }

    .projects-section {
        padding: 40px 30px;
    }

    .projects-hero {
        height: 40vh;
        padding: 30px;
    }

    .projects-hero h1 {
        font-size: 2.5rem;
    }

    .project-modal-content {
        width: 95%;
        max-height: 90vh;
        padding: 30px;
    }

    .project-modal-header {
        flex-direction: column;
        gap: 20px;
        align-items: flex-start;
    }

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