.projects {
    padding-top: 6rem;
    min-height: 100vh;

    background-color: var(--fallback-bg);
    background-image:
        linear-gradient(
            rgba(15, 23, 42, 0.6),
            rgba(15, 23, 42, 0.8)
        ),
        url("../img/tree.jpg");

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}


.projects-box {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.projects-title {
    text-align: center;
    font-size: 3.5rem;
    margin-bottom: 50px;
    color: var(--light);
    font-weight: bold;
}

.project-title {
    color: var(--light);
    padding: 0.75rem 1rem 0.25rem;
    text-align: center;
    font-weight: 600;
}


.project-paragraph {
    color: var(--muted);
    padding: 0 1rem;
    line-height: 1.6;
}

.project-card {
    position: relative;
    padding-bottom: 3rem;

    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    border-radius: 18px;
    border: 1px solid var(--glass-border);

    overflow: hidden;
    cursor: pointer;

    transition:
        transform 0.35s ease,
        box-shadow 0.35s ease;
}

.project-card:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow:
        0 25px 50px rgba(0, 0, 0, 0.45),
        0 0 0 1px rgba(99, 102, 241, 0.25);
}


.project-img {
    height: 200px;
    width: 100%;
    object-fit: cover;

    filter: saturate(0.95) contrast(1.05);
}

.github-button {
    position: absolute;
    bottom: 14px;
    right: 14px;

    display: inline-flex;
    align-items: center;
    gap: 6px;

    padding: 7px 14px;

    background: rgba(15, 23, 42, 0.8);
    color: var(--light);

    border-radius: 8px;
    border: 1px solid var(--glass-border);

    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;

    transition:
        background 0.3s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}


.github-button:hover {
    background: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}


.github-button:focus {
    outline: 2px solid #58a6ff;
    outline-offset: 3px;
}

.github-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
    filter: invert(1); /* makes icon white if it's black */
}