/* ===== Projects page ===== */

main {
    width: min(1200px, 100%);
    margin: 0 auto;
    padding: 140px 24px 80px;
}

main section + section {
    margin-top: 48px;
}

main h1 {
    margin: 0 0 12px;
    color: var(--text);
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 800;
    letter-spacing: -0.02em;
}

main section > div > p {
    color: var(--muted);
    line-height: 1.7;
}

/* ===== Filter buttons ===== */
[data-filter] {
    padding: 10px 20px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

[data-filter]:hover {
    border-color: #facc15;
    color: #facc15;
}

[data-filter].active {
    background: #facc15;
    color: #050505;
    border-color: #facc15;
}

/* Filter bar container */
.project-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 12px;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.project-filters::-webkit-scrollbar {
    display: none;
}

/* Ensure buttons don't shrink when scrolling horizontally */
.project-filters [data-filter] {
    flex-shrink: 0;
    white-space: nowrap;
}

/* ===== Projects grid ===== */
main section:nth-of-type(3) > div {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

/* ===== Project card ===== */
[data-category] > div {
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 26px;
    background: #0d0d0d;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

[data-category] > div:hover {
    transform: translateY(-6px);
    border-color: rgba(250, 204, 21, 0.5);
    box-shadow: 0 24px 50px -20px rgba(0, 0, 0, 0.6);
}

[data-category] h2 {
    margin: 0 0 12px;
    color: #f5f5f5;
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1.3;
}

[data-category] > div > p {
    margin: 0 0 16px;
    color: #9ca3af;
    line-height: 1.65;
}

/* tech stack row (first div child inside the card) */
[data-category] > div > div:first-of-type {
    margin-top: auto;
    padding-top: 16px;
    color: #9ca3af;
}

[data-category] span {
    display: inline-block;
    margin: 0 6px 8px 0;
    padding: 4px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #cccccc;
    font-size: 0.78rem;
    font-weight: 600;
}

[data-category] a {
    display: inline-block;
    margin-top: 14px;
    color: #facc15;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
}

[data-category] a:hover {
    text-decoration: underline;
}

/* ===== Call to action ===== */
main section:last-of-type > div {
    text-align: center;
    padding: 48px 32px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
}

main section:last-of-type h2 {
    margin: 0 0 10px;
    color: var(--text);
    font-size: 1.8rem;
    font-weight: 800;
}

main section:last-of-type p {
    margin: 0 0 22px;
    color: var(--muted);
}

main section:last-of-type a {
    display: inline-block;
    padding: 13px 32px;
    border-radius: 999px;
    background: #facc15;
    color: #050505;
    font-weight: 700;
    text-decoration: none;
}

main section:last-of-type a:hover {
    background: #eab308;
}

@media (max-width: 768px) {
    main {
        padding: 120px 16px 60px;
    }
}
