/* Portfolio cards, shared by the homepage and /portfolio/ */
.folio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.folio-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e6e8f5;
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.folio-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 40px rgba(22, 26, 46, 0.12);
}

.folio-card[hidden] { display: none; }

.folio-img {
    display: block;
    aspect-ratio: 4 / 3;
    background: #161a2e;
    overflow: hidden;
}

.folio-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s;
}

.folio-card:hover .folio-img img { transform: scale(1.03); }

.folio-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 1.35rem 1.4rem 1.4rem;
}

.folio-tag {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #4338ca;
    margin-bottom: 0.45rem;
}

.folio-title {
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    font-size: 1.12rem;
    font-weight: 700;
    color: #0d1117;
    line-height: 1.3;
    margin: 0 0 0.55rem;
}

.folio-desc {
    color: #555;
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0 0 1rem;
}

.folio-result {
    font-size: 0.85rem;
    font-weight: 600;
    color: #2a2c63;
    background: #eef0ff;
    border-radius: 8px;
    padding: 0.55rem 0.75rem;
    margin-bottom: 1rem;
}

.folio-link {
    margin-top: auto;
    font-size: 0.9rem;
    font-weight: 600;
    color: #4338ca;
    text-decoration: none;
}

.folio-link:hover { text-decoration: underline; }

.folio-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin: 0 0 2rem;
}

.folio-filters button {
    font: 600 0.88rem/1 Inter, system-ui, sans-serif;
    color: #2a2c63;
    background: #fff;
    border: 1px solid #dfe2f3;
    border-radius: 999px;
    padding: 0.6rem 1.05rem;
    cursor: pointer;
}

.folio-filters button[aria-pressed="true"] {
    background: #161a2e;
    border-color: #161a2e;
    color: #fff;
}

@media (max-width: 991px) {
    .folio-grid { grid-template-columns: repeat(2, 1fr); }
}

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

/* "A small slice" card: closes the grid, says there is more than shown */
.folio-more {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1.5rem;
    border-radius: 16px;
    padding: 2rem;
    color: #f7f7ff;
    background:
        radial-gradient(480px 320px at 90% 0%, rgba(99, 102, 241, .45), transparent 70%),
        radial-gradient(360px 260px at 100% 100%, rgba(196, 181, 253, .25), transparent 70%),
        linear-gradient(115deg, #161a2e 0%, #161a2e 35%, #2a2c63 100%);
}

.folio-more h3 {
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: #f7f7ff;
    margin: 0 0 0.6rem;
}

.folio-more p {
    color: #bfc4e6;
    font-size: 0.95rem;
    line-height: 1.65;
    margin: 0;
    max-width: 620px;
}

.folio-more-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1.1rem;
}

.folio-more-stats span {
    font-size: 0.82rem;
    color: #bfc4e6;
    padding: 0.5rem 0.75rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.folio-more-stats strong {
    font-family: 'Sora', sans-serif;
    color: #f7f7ff;
    margin-right: 0.25rem;
}

.folio-more-btns { display: flex; flex-wrap: wrap; gap: 0.6rem; }

.folio-more-link {
    display: inline-block;
    margin-top: 0.9rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: #e0d4ff;
    text-decoration: none;
}

.folio-more-link:hover { color: #fff; text-decoration: underline; }

.folio-btn {
    display: inline-block;
    padding: 0.8rem 1.4rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    background: #f7f7ff;
    color: #161a2e;
    border: 1px solid #f7f7ff;
}

.folio-btn:hover { background: #e0d4ff; border-color: #e0d4ff; color: #161a2e; text-decoration: none; }

.folio-btn-ghost { background: transparent; color: #f7f7ff; border-color: rgba(255, 255, 255, .35); }

.folio-btn-ghost:hover { background: rgba(255, 255, 255, .08); color: #f7f7ff; border-color: rgba(255, 255, 255, .6); }

.folio-grid .folio-more { grid-column: span 2; }

.folio-more-wide { margin-top: 1.5rem; flex-direction: row; align-items: center; }

@media (max-width: 991px) {
    .folio-more-wide { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 600px) {
    .folio-grid .folio-more { grid-column: auto; }
    .folio-more-btns { flex-direction: column; width: 100%; }
    .folio-more-btns .folio-btn { text-align: center; }
}
