.projects-section {
    max-width: 1500px;
    margin: 6rem auto 2rem;
    padding: 2rem;
}

.projects-section h2 {
    text-align: center;
    font-family: "Verdana", sans-serif;
    color: #52714b;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.projects-section > p {
    text-align: center;
    color: #555;
    font-family: "Quicksand", serif;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

/* Category Filters */
.category-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.category-btn {
    background: transparent;
    border: 2px solid #62b682;
    color: #52714b;
    padding: 0.4rem 1.2rem;
    border-radius: 20px;
    font-family: "Quicksand", serif;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.category-btn:hover {
    background: rgba(98, 182, 130, 0.15);
}

.category-btn.active {
    background: #62b682;
    color: #fff;
    border-color: #62b682;
}

body.dark-mode .category-btn {
    color: #62b682;
    border-color: #62b682;
}

body.dark-mode .category-btn:hover {
    background: rgba(98, 182, 130, 0.2);
}

body.dark-mode .category-btn.active {
    background: #62b682;
    color: #1b3b2e;
}

/* Card Header */
.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.project-category {
    font-family: "Quicksand", serif;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.8;
}

.project-status {
    font-family: "Quicksand", serif;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
}

.status-complete {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
}

.status-practice {
    background: rgba(249, 168, 38, 0.3);
    color: #ffd98c;
}

/* Modal meta */
.modal-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.modal-meta .project-category {
    color: #62b682;
    opacity: 1;
    font-size: 0.8rem;
}

.modal-meta .status-complete {
    background: rgba(98, 182, 130, 0.2);
    color: #1b3b2e;
}

.modal-meta .status-practice {
    background: rgba(249, 168, 38, 0.2);
    color: #c47d10;
}

body.dark-mode .modal-meta .status-complete {
    background: rgba(98, 182, 130, 0.25);
    color: #62b682;
}

body.dark-mode .modal-meta .status-practice {
    background: rgba(249, 168, 38, 0.25);
    color: #F9A826;
}

/* Main container card */
.projects-container {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

body.dark-mode .projects-container {
    background: rgba(255, 255, 255, 0.05);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.project-card {
    background: linear-gradient(to bottom right, #1b3b2e, #62b682);
    color: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.project-card h3 {
    font-family: "Verdana", sans-serif;
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
}

.project-desc {
    font-family: "Quicksand", serif;
    font-size: 0.95rem;
    line-height: 1.5;
    flex: 1;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tech-tag {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 0.25rem 0.65rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-family: "Quicksand", serif;
    font-weight: 600;
}

.project-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}

.details-btn {
    background: #F9A826;
    color: #fff;
    border: none;
    padding: 0.5rem 1.2rem;
    border-radius: 8px;
    font-family: "Quicksand", serif;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.details-btn:hover {
    background: #FFA947;
    transform: scale(1.05);
}

.github-link {
    color: #fff;
    font-size: 1.5rem;
    transition: transform 0.2s ease, opacity 0.2s ease;
    opacity: 0.8;
}

.github-link:hover {
    transform: scale(1.15);
    opacity: 1;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #333;
    cursor: pointer;
    line-height: 1;
    padding: 0.25rem;
}

.modal-close:hover {
    color: #F9A826;
}

.modal-content h2 {
    font-family: "Verdana", sans-serif;
    color: #1b3b2e;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    padding-right: 2rem;
}

.modal-content .modal-desc {
    font-family: "Quicksand", serif;
    color: #444;
    line-height: 1.7;
    font-size: 1rem;
    margin-bottom: 1.25rem;
}

.modal-content .tech-tags {
    margin-bottom: 1.5rem;
}

.modal-content .tech-tag {
    background: rgba(27, 59, 46, 0.15);
    color: #1b3b2e;
    font-weight: 700;
}

.modal-github-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #F9A826;
    color: #fff;
    text-decoration: none;
    padding: 0.65rem 1.5rem;
    border-radius: 8px;
    font-family: "Quicksand", serif;
    font-size: 1rem;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.modal-github-btn:hover {
    background: #FFA947;
    transform: scale(1.05);
}

/* Dark mode */
body.dark-mode .projects-section h2 {
    color: #62b682;
}

body.dark-mode .projects-section > p {
    color: #ccc;
}

body.dark-mode .modal-content {
    background: #2a2a2a;
}

body.dark-mode .modal-close {
    color: #eee;
}

body.dark-mode .modal-content h2 {
    color: #62b682;
}

body.dark-mode .modal-content .modal-desc {
    color: #ddd;
}

body.dark-mode .modal-content .tech-tag {
    background: rgba(98, 182, 130, 0.2);
    color: #62b682;
}

/* Intro card */
.projects-intro-card {
    background: linear-gradient(to bottom right, #1b3b2e, #62b682);
    border-radius: 10px;
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.projects-intro-card h2 {
    color: #fff;
    margin-bottom: 0.4rem;
}

.projects-intro-card p {
    color: rgba(255, 255, 255, 0.9);
    font-family: "Quicksand", serif;
    font-size: 1rem;
    margin: 0;
}

/* Live link on card */
.live-link {
    color: #fff;
    text-decoration: none;
    font-family: "Quicksand", serif;
    font-size: 0.85rem;
    font-weight: 600;
    opacity: 0.85;
    transition: opacity 0.2s ease;
}

.live-link:hover {
    opacity: 1;
}

.live-link i {
    margin-right: 0.3rem;
}

/* Modal actions */
.modal-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.modal-live-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #62b682;
    color: #fff;
    text-decoration: none;
    padding: 0.65rem 1.5rem;
    border-radius: 8px;
    font-family: "Quicksand", serif;
    font-size: 1rem;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.modal-live-btn:hover {
    background: #4fa06d;
    transform: scale(1.05);
}

/* Back link */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #F9A826;
    text-decoration: none;
    font-family: "Quicksand", serif;
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 1.5rem;
    transition: opacity 0.2s ease;
}

.back-link:hover {
    opacity: 0.8;
}

/* Responsive */
@media (max-width: 768px) {
    .projects-section {
        margin-top: 5rem;
        padding: 1rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: 95%;
        padding: 1.5rem;
    }
}
