/* =========================================================
   projects.css: "Things I've built"
   Cards with a pastel pattern cover, like the notebooks.
   ========================================================= */

/* "Fit as many columns as you can, each at least 240px."
   Laptop: 3 side by side. Phone: 1 per row. */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-top: 28px;
}

.project {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-bottom: 20px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 20px;
    overflow: hidden;
    color: var(--text);
    text-decoration: none;
    transition: transform 0.2s, border-color 0.2s;
}
.project:hover { transform: translateY(-4px); border-color: var(--coral); }

/* side padding for everything except the cover.
   "inline" = left + right, and it flips for Arabic automatically */
.project > *:not(.cover) { margin-inline: 20px; }

.project p  { margin: 0; color: var(--muted); font-size: 15px; }
.project .go { margin-top: auto; font-size: 14px; font-weight: 700; }

.tag {
    align-self: flex-start;
    padding: 3px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--bg);
    font-size: 12px;
}
[data-theme="dark"] .tag { background: #2C272E; }

/* the cover with its white icon tile */
.project .cover {
    display: flex;
    align-items: flex-end;
    height: 118px;
    padding: 16px 20px;
    margin-bottom: 6px;
}

.icon-tile {
    width: 52px; height: 52px;
    display: grid; place-items: center;
    border-radius: 16px;
    background: #FFFFFF;
    box-shadow: 0 6px 16px rgba(36, 32, 28, 0.12);
}
.icon-tile svg {
    width: 26px; height: 26px;
    fill: none; stroke: #24201C; stroke-width: 1.8;
    stroke-linecap: round; stroke-linejoin: round;
}


/* ---------- PATTERN COVERS (shared with the notebooks) ----------
   Drawn with CSS gradients, so no image files are needed. */
.cover-dots {
    background: radial-gradient(#FF6F6140 2px, transparent 2.6px) 0 0 / 14px 14px, #FFE1D8;
}
.cover-grid {
    background:
        linear-gradient(#FFFFFF80 1px, transparent 1px) 0 0 / 16px 16px,
        linear-gradient(90deg, #FFFFFF80 1px, transparent 1px) 0 0 / 16px 16px,
        #DDD5F8;
}
.cover-stripes {
    background: repeating-linear-gradient(45deg, #FFE2A6 0 10px, #FFF1D2 10px 20px);
}
.cover-blush {
    background:
        radial-gradient(circle at 30% 28%, #FFC6AE, transparent 60%),
        radial-gradient(circle at 78% 78%, #F6A08C, transparent 55%),
        #FBD9CD;
}
.cover-sky {
    background:
        radial-gradient(circle at 22% 80%, #C3D6FA, transparent 62%),
        radial-gradient(circle at 80% 20%, #FFE3CF, transparent 55%),
        #EEF3FF;
}
.cover-check {
    background: conic-gradient(#F9D4DE 25%, #FFF1E8 0 50%, #F9D4DE 0 75%, #FFF1E8 0) 0 0 / 22px 22px;
}
