/* projects.css
   Simple clean grid + modal styles.
   Uses Poppins from the page head. Customize vars below.
*/

:root {
    --container-max: 1200px;
    --accent: rgb(237, 36, 78);
    /* change this to your brand color */
    --muted: #6b7280;
    --bg: #ffffff;
    --card-radius: 12px;
    --shadow-sm: 0 8px 30px rgba(2, 6, 23, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Space Grotesk', sans-serif;
    color: #0f172a;
    background: var(--bg);
    margin: 0;
}

/* Container */
.container {
    width: min(92%, var(--container-max));
    margin: 0 auto;
    padding: 48px 0;
}

/* Heading */
.projects-tag {
    color: rgb(237, 36, 78);
}
.projects-heading {
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.projects-heading h2 {
    font-size: 1.6rem;
    margin: 0;
    font-weight: 700;
}

.projects-heading .sub {
    color: var(--muted);
    font-size: 0.95rem;
    margin: 0;
}

/* Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* Card */
.project-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 250, 250, 0.98));
    border-radius: var(--card-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: transform 240ms ease, box-shadow 240ms ease;
    display: flex;
    flex-direction: column;
    min-height: 260px;
    outline: none;
}

.project-card:focus,
.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(2, 6, 23, 0.12);
}

/* Thumbnail */
.project-thumb {
    height: 160px;
    overflow: hidden;
    background: #f3f4f6;
    display: flex;
    align-items: center;
}

.project-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Meta */
.project-meta {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.project-title {
    font-size: 1.05rem;
    margin: 0;
    font-weight: 600;
    color: rgb(237, 36, 78);
}

.project-excerpt {
    color: var(--muted);
    font-size: 0.95rem;
    margin: 0;
}

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

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

    .container {
        padding: 28px 16px;
    }
}

/* Modal overlay */
.project-modal-overlay {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(6, 10, 22, 0.48);
    z-index: 12000;
    padding: 20px;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

/* Show modal when .open added by JS */
.project-modal-overlay.open {
    display: flex;
}

/* Modal card */
.project-modal {
    background: #fff;
    border-radius: 12px;
    max-width: 980px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    padding: 18px;
    box-shadow: 0 40px 80px rgba(2, 6, 23, 0.2);
    position: relative;
    max-height: 86vh;
    overflow: auto;
}

/* modal left image */
.modal-left img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    display: block;
    min-height: 320px;
}

/* modal right content */
.modal-right {
    padding: 6px 4px 16px 4px;
}

.modal-right h3 {
    margin-top: 6px;
    margin-bottom: 8px;
    font-size: 1.25rem;
}

.modal-right .meta {
    color: var(--muted);
    margin-bottom: 12px;
}

.modal-right p {
    color: #111827;
    line-height: 1.55;
}

/* tech chips */
.tech-list {
    margin-top: 12px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tech-chip {
    padding: 6px 10px;
    background: #f3f4f6;
    border-radius: 999px;
    font-size: 0.85rem;
    color: #111827;
}

/* modal actions */
.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    align-items: center;
}

.btn {
    display: inline-block;
    padding: 10px 14px;
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
    background: var(--accent);
    color: #fff;
    border: none;
    cursor: pointer;
}
.btn:hover {
    background-color: #00cc7a;
}
.btn.secondary {
    background: transparent;
    color: #0f172a;
    border: 1px solid #e6e9ef;
}

/* close button top-right */
.modal-close {
    position: absolute;
    right: 12px;
    top: 12px;
    background: transparent;
    border: none;
    font-size: 18px;
    cursor: pointer;
}

/* small screens -> stack */
@media (max-width:820px) {
    .project-modal {
        grid-template-columns: 1fr;
    }

    .modal-left img {
        min-height: 220px;
    }
}