/* Post card — the one used by home, portfolio, the post list and the related lists on a
   post page. It lived in home.css and was copied into portfolio.css; the post list loaded
   neither, so its grid cards were barely styled. One definition now, loaded for every page.

   The card is a card: a single bordered surface that lifts on hover, rather than a bordered
   thumbnail with loose text underneath and a 3% image zoom. */

.home-cards-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.home-cards-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; grid-auto-rows: 1fr; }

.home-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--color-white, #fff);
    border: 1px solid var(--s-line);
    border-radius: 14px;
    text-decoration: none;
    transition: border-color .1s ease-out, box-shadow .16s var(--s-ease), transform .16s var(--s-ease);
}
.home-card:hover { border-color: #D6E4F7; box-shadow: 0 2px 8px rgba(9, 30, 66, .05); transform: translateY(-1px); }
.home-card:hover .home-card-title { color: var(--s-blue); }

.home-card-thumb {
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--s-row);
    border-bottom: 1px solid var(--s-line);
}
.home-card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.home-card-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    padding: 16px; background: var(--s-row);
}
.home-card-placeholder span {
    font-size: 12.5px; font-weight: 600; color: var(--s-faint);
    text-align: center; line-height: 1.35;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

.home-card-body { flex: 1; display: flex; flex-direction: column; padding: 12px 14px 14px; }
.home-card-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }

.home-card-breadcrumb {
    display: inline-flex; align-items: center; gap: 5px;
    min-width: 0; font-size: 11.5px; font-weight: 600; color: var(--s-faint);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    cursor: pointer; transition: color .1s ease-out;
}
.home-card-breadcrumb:hover { color: var(--s-blue); }
.home-card-breadcrumb .breadcrumb-icon { width: 14px; height: 14px; object-fit: contain; flex: none; }

.home-card-title {
    margin: 0 0 5px;
    font-size: 14.5px; font-weight: 600; color: var(--s-text); line-height: 1.35;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    transition: color .1s ease-out;
}
.home-card-summary {
    margin: 0 0 auto;
    font-size: 12.5px; color: var(--s-sub); line-height: 1.5;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.home-card-footer {
    display: flex; align-items: center; gap: 6px; flex: none;
    font-size: 11.5px; font-weight: 500; color: var(--s-faint);
    font-variant-numeric: tabular-nums; white-space: nowrap;
}
.home-card-footer span { display: flex; align-items: center; gap: 3px; }
.home-card-footer svg { width: 12px; height: 12px; }
.home-card-footer .sep { color: var(--s-line); }

/* Tags read as one quiet family. They used to be eight assorted outline colours picked by
   hashing the tag name, which made every card a different palette. */
.home-card-tags { display: flex; flex-wrap: nowrap; gap: 4px; margin-top: 10px; overflow: hidden; }
.home-tag {
    padding: 2px 7px; border: 0; border-radius: 6px;
    background: var(--s-row); color: var(--s-sub);
    font-size: 11px; font-weight: 600; white-space: nowrap;
}
.home-tag-more { font-size: 11px; color: var(--s-faint); align-self: center; }

@media (max-width: 1400px) { .home-cards-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 1024px) { .home-cards-grid, .home-cards-grid.cols-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) {
    .home-cards-grid, .home-cards-grid.cols-3, .home-cards-list { grid-template-columns: 1fr; gap: 10px; }
    .home-card-body { padding: 10px 12px 12px; }
    .home-card-title { font-size: 14px; }
    .home-card-summary { -webkit-line-clamp: 2; }
}
@media (prefers-reduced-motion: reduce) { .home-card, .home-card-title { transition: none; } .home-card:hover { transform: none; } }
