/* Project Page Styles */
.projects-body {
    background-color: rgb(17, 24, 39);
    /* Dark mode */
    min-height: 100vh;
    padding: 1rem;
}

.projects-container {
    max-width: 72rem;
    margin-left: auto;
    margin-right: auto;
}

.projects-title {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: rgb(239, 68, 68);
    /* Dark mode red */
    text-align: center;
}

.projects-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
}

.project-card {
    flex: 1;
    min-width: 300px;
    max-width: 28rem;
    background-color: rgb(31, 41, 55);
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    border-radius: 0.5rem;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    color: rgb(209, 213, 219);
}

.project-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: rgb(248, 113, 113);
}

.project-description {
    color: rgb(209, 213, 219);
    margin-bottom: 1rem;
    flex-grow: 1;
    word-wrap: break-word;
    overflow-wrap: break-word;
    overflow: hidden;
    text-overflow: ellipsis;
}

.project-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
}

.project-link {
    color: rgb(239, 68, 68);
    border: 1px solid rgb(239, 68, 68);
    border-radius: 0.5rem;
    padding: 0.25rem 0.75rem;
    transition: all 300ms;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

.project-link:hover {
    background-color: rgb(239, 68, 68);
    color: white;
}

.project-buttons {
    display: flex;
    flex-wrap: nowrap;
    gap: 1rem;
    justify-content: space-between;
    max-width: 100%;
}

.project-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.project-language {
    color: rgb(156, 163, 175);
    font-size: 0.875rem;
}

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: rgb(31, 41, 55);
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    overflow-y: auto;
    padding: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    margin: 0 auto;
}

@media (max-width: 1024px) {
    .modal-content {
        width: 95%;
        max-width: 450px;
        font-size: 14px;
    }
}

.modal-content a {
    color: rgb(239, 68, 68);
    text-decoration: underline;
    font-weight: bold;
    transition: color 0.3s ease;
}

.modal-content a:hover {
    color: rgb(248, 113, 113);
    text-decoration: none;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

body.light-mode .projects-body {
    background-color: rgb(240, 243, 247);
    color: rgb(51, 51, 51);
}

body.light-mode .projects-title {
    color: rgb(0, 102, 204);
}

body.light-mode .project-description {
    color: rgb(0, 102, 204);
}

body.light-mode .project-card {
    background-color: rgb(255, 255, 255);
    color: rgb(51, 51, 51);
    border: 1px solid rgb(200, 200, 200);
}

body.light-mode .project-link {
    color: rgb(0, 102, 204);
    border: 1px solid rgb(0, 102, 204);
}

body.light-mode .project-link:hover {
    background-color: rgb(220, 230, 240);
    color: rgb(0, 51, 102);
}

body.light-mode .modal-content {
    background: rgb(240, 243, 247);
    color: rgb(51, 51, 51);
}
