/* Blog listing — single-column story list.
 *
 * The previous layout was a two-up card grid showing six posts a page. With
 * 120+ articles that is twenty pages, which buries everything and gives a
 * reader no sense that the archive is deep. News sites solve this with a
 * single column of wide rows at roughly 18 per page: more posts visible, more
 * of each one readable, and the thumbnail earns its place instead of forcing
 * the text into a narrow column.
 *
 * Everything here uses the existing theme tokens — no new colours.
 */

/* ---------------------------------------------------------- category nav */
.blog-cats {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: var(--space-4);
    padding-bottom: var(--space-3);
    border-bottom: 1px solid var(--border);
}
.blog-cats a {
    display: inline-block;
    padding: .38rem .85rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: .84rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    white-space: nowrap;
    transition: border-color var(--transition), color var(--transition), background var(--transition);
}
.blog-cats a:hover { color: var(--accent); border-color: var(--border-strong); }
.blog-cats a.is-active {
    color: var(--text-on-accent);
    background: var(--accent);
    border-color: transparent;
}

.blog-count {
    font-size: .86rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-3);
}

/* -------------------------------------------------------------- the list */
.blog-list { display: flex; flex-direction: column; gap: 0; }

.blog-item {
    display: grid;
    grid-template-columns: 210px 1fr;
    gap: var(--space-3);
    padding: var(--space-3) 0;
    border-bottom: 1px solid var(--border);
    align-items: start;
}
.blog-item:first-child { padding-top: 0; }

.blog-item__thumb {
    border-radius: 10px;
    overflow: hidden;
    /* The generated cover is an SVG with its own aspect ratio; pinning the box
       keeps every row the same height so the list does not jitter. */
    aspect-ratio: 16 / 10;
    background: var(--bg-secondary);
}
.blog-item__thumb .blog-cover,
.blog-item__thumb img,
.blog-item__thumb svg {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.blog-item__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
    font-size: .78rem;
    color: var(--text-secondary);
    margin-bottom: .45rem;
}
.blog-item__meta .sep { opacity: .45; }
.blog-item__cat { color: var(--accent); font-weight: 600; }

.blog-item__title {
    font-size: 1.22rem;
    line-height: 1.35;
    margin: 0 0 .45rem;
}
.blog-item__title a { color: var(--text); text-decoration: none; }
.blog-item__title a:hover { color: var(--accent); }

.blog-item__excerpt {
    color: var(--text-secondary);
    font-size: .94rem;
    line-height: 1.65;
    margin: 0 0 .5rem;
}
.blog-item__more {
    font-size: .85rem;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
}
.blog-item__more:hover { text-decoration: underline; }

@media (max-width: 720px) {
    .blog-item { grid-template-columns: 1fr; gap: .9rem; }
    .blog-item__thumb { aspect-ratio: 16 / 7; }
    .blog-item__title { font-size: 1.1rem; }
}

/* ------------------------------------------------------------- sidebar */
.blog-side__list { list-style: none; margin: 0; padding: 0; }
.blog-side__list li {
    padding: .55rem 0;
    border-bottom: 1px solid var(--border);
}
.blog-side__list li:last-child { border-bottom: 0; padding-bottom: 0; }
.blog-side__list a {
    color: var(--text);
    font-size: .89rem;
    line-height: 1.5;
    text-decoration: none;
    display: block;
}
.blog-side__list a:hover { color: var(--accent); }
.blog-side__rank {
    display: inline-block;
    min-width: 1.35rem;
    font-weight: 700;
    color: var(--accent);
    font-size: .82rem;
}
.blog-side__sub {
    display: block;
    font-size: .74rem;
    color: var(--text-secondary);
    margin-top: .15rem;
}

/* --------------------------------------------------------- pagination */
.pagination .pg-step { font-weight: 600; }
.pagination .pg-gap {
    border: 0;
    background: none;
    color: var(--text-secondary);
    padding: .4rem .2rem;
}

/* ------------------------------------------------------- post meta bar */
/* Reading time sits in the existing .post__meta row on the article page. */
.post__meta .post__rt { white-space: nowrap; }
