/* ==========================================================================
   Blog index — toolbar, chips, the featured story and the card grid.
   Shared with blog-post.css, which reuses .blog-card and .blog-meta for the
   related-reading row.
   ========================================================================== */

.blog-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--sp-4);
    margin-bottom: var(--sp-5);
}
.blog-search { flex: 1; min-width: 260px; max-width: 480px; }
.blog-search .icon { color: var(--ink-3); flex: none; }
.blog-search input[type="search"] { appearance: none; }
.blog-search input::-webkit-search-cancel-button { appearance: none; }
.blog-clear .icon { width: 14px; height: 14px; }

.blog-chips { margin-bottom: var(--sp-6); }
.chip-count {
    display: inline-grid;
    place-items: center;
    min-width: 18px;
    height: 18px;
    padding-inline: 5px;
    border-radius: var(--r-pill);
    background: var(--paper-3);
    /* --ink-2, not --ink-3: at 11px on --paper-3 the lighter step measures
       4.36:1 and this is real text a reader uses to judge a topic. */
    color: var(--ink-2);
    font-size: 0.6875rem;
    font-weight: var(--fw-semi);
}
.chip.is-active .chip-count { background: rgba(255, 255, 255, .2); color: #fff; }

.blog-category-intro {
    max-width: 62ch;
    color: var(--ink-3);
    font-size: var(--fs-sm);
    margin-bottom: var(--sp-5);
}
.blog-result-count {
    font-size: var(--fs-sm);
    color: var(--ink-3);
    margin-bottom: var(--sp-6);
}

/* ==========================================================================
   The featured story
   ========================================================================== */
/* ==========================================================================
   The featured story
   ========================================================================== */
.blog-featured {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: clamp(1.5rem, 1rem + 3vw, 3.5rem);
    align-items: center;
    padding: clamp(1.25rem, 0.8rem + 2vw, 2rem);
    margin-bottom: var(--sp-8);
    background: #ffffff;
    border: 1px solid rgba(6, 18, 47, 0.1);
    border-radius: var(--r-2xl);
    box-shadow: inset 0 1px 0 #ffffff, 0 8px 28px rgba(6, 18, 47, 0.05);
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}
.blog-featured:hover {
    transform: translateY(-4px);
    border-color: rgba(10, 99, 255, 0.3);
    box-shadow: inset 0 1px 0 #ffffff, 0 16px 40px rgba(10, 99, 255, 0.12);
}
.blog-featured-visual {
    aspect-ratio: 16 / 10;
    border-radius: var(--r-xl);
    overflow: hidden;
    background:
        radial-gradient(110% 100% at 15% 0%, rgba(238, 244, 255, 0.9) 0%, rgba(220, 232, 255, 0.6) 60%, #ffffff 100%);
    border: 1px solid rgba(10, 99, 255, 0.12);
}
.blog-featured-visual img { width: 100%; height: 100%; object-fit: cover; }

.blog-featured-body { display: flex; flex-direction: column; gap: var(--sp-4); }
.blog-featured-title { font-family: var(--font-display); font-size: var(--fs-h2); font-weight: 800; color: #06122f; }
.blog-featured-title a { color: inherit; text-decoration: none; transition: color 0.3s ease; }
.blog-featured-title a:hover { color: #0a63ff; }
.blog-featured-excerpt { color: #475569; margin: 0; line-height: 1.6; }

@media (max-width: 900px) {
    .blog-featured { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Cards
   ========================================================================== */
.blog-grid { gap: var(--sp-5); }
.blog-card {
    background: #ffffff;
    border: 1px solid rgba(6, 18, 47, 0.1);
    border-radius: var(--r-xl);
    box-shadow: inset 0 1px 0 #ffffff, 0 4px 16px rgba(6, 18, 47, 0.04);
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}
.blog-card:hover {
    transform: translateY(-4px);
    border-color: rgba(10, 99, 255, 0.28);
    box-shadow: inset 0 1px 0 #ffffff, 0 12px 32px rgba(10, 99, 255, 0.1);
}
.blog-card .card-body { gap: var(--sp-3); padding: 1.5rem; }
.blog-card .card-title { font-family: var(--font-display); font-size: var(--fs-h4); font-weight: 800; color: #06122f; line-height: 1.3; }

.blog-card-media {
    display: grid;
    place-items: center;
    background:
        radial-gradient(110% 100% at 20% 0%, rgba(238, 244, 255, 0.9) 0%, rgba(220, 232, 255, 0.6) 62%, #ffffff 100%);
    border-bottom: 1px solid rgba(10, 99, 255, 0.1);
}
.blog-card-plate {
    font-family: var(--font-mono, monospace);
    font-size: 3rem;
    font-weight: 800;
    color: rgba(10, 99, 255, 0.25);
    letter-spacing: 0.08em;
}

.blog-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--sp-2);
    font-family: var(--font-mono, monospace);
    font-size: 0.75rem;
    color: #64748b;
    margin: 0;
}

.blog-empty {
    padding: var(--sp-9) var(--sp-6);
    text-align: center;
    color: #475569;
    background: #ffffff;
    border-radius: var(--r-lg);
    box-shadow: 0 4px 16px rgba(6, 18, 47, 0.04);
}
.blog-empty a { text-decoration: underline; color: #0a63ff; }
