/* ============================================================
   Blog — list + article detail
   Loaded last so it wins over the older blog rules in base.css.
   Palette matches the jobs/legacy pages (blue accents).
   ============================================================ */

:root {
    --blog-ink: #0d1330;
    --blog-muted: #5c6773;
    --blog-accent: #2d51a8;
    --blog-accent-2: #4274d9;
    --blog-border: #e3ebf7;
    --blog-soft: #f6f9fe;
}

/* ── Shared bits ─────────────────────────────────────────── */
.blog-chip {
    display: inline-flex;
    align-items: center;
    width: max-content;
    max-width: 100%;
    padding: 5px 12px;
    border-radius: 999px;
    background: #eaf1fc;
    color: var(--blog-accent);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.blog-avatar {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--blog-accent), var(--blog-accent-2));
    color: #fff;
    font-weight: 900;
    font-size: 17px;
}
.blog-avatar.sm { width: 36px; height: 36px; font-size: 14px; }
.blog-byline { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.blog-byline strong { color: var(--blog-ink); font-size: 14px; font-weight: 800; }
.blog-byline span { color: var(--blog-muted); font-size: 12.5px; }

/* ── List header ─────────────────────────────────────────── */
.blog-list-head { max-width: 640px; }

/* ── List grid + cards ───────────────────────────────────── */
.blog-list-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)) !important;
    gap: 26px !important;
    align-items: stretch !important;
}
.blog-list-card {
    display: flex !important;
    flex-direction: column !important;
    min-width: 0;
    height: 100%;
    overflow: hidden;
    padding: 0 !important;
    border: 1px solid var(--blog-border) !important;
    border-radius: 18px !important;
    background: #fff !important;
    color: inherit;
    text-decoration: none;
    box-shadow: 0 6px 18px rgba(16, 24, 40, .04);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.blog-list-card:hover {
    transform: translateY(-4px);
    border-color: #bcd2f2 !important;
    box-shadow: 0 22px 46px rgba(16, 24, 40, .12);
}

.blog-list-media {
    position: relative;
    width: 100%;
    height: 190px;
    overflow: hidden;
    background: var(--blog-soft);
}
.blog-list-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}
.blog-list-card:hover .blog-list-media img { transform: scale(1.05); }

.blog-list-placeholder {
    display: grid;
    place-items: center;
    align-content: center;
    gap: 10px;
    background: linear-gradient(135deg, #eef4fc, #fff 55%, #f0fdf4);
}
.blog-list-placeholder span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: var(--blog-accent);
    color: #fff;
    font-weight: 950;
    letter-spacing: .04em;
}
.blog-list-placeholder strong { color: var(--blog-accent); font-size: 13px; text-transform: uppercase; letter-spacing: .05em; }

.blog-featured-tag {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 5px 11px;
    border-radius: 999px;
    background: rgba(13, 19, 48, .82);
    color: #fff;
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    backdrop-filter: blur(4px);
}

.blog-list-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1 1 auto;
    padding: 20px 20px 18px;
}
.blog-list-body h3 {
    margin: 2px 0 0;
    color: var(--blog-ink);
    font-size: 20px;
    line-height: 1.3;
    font-weight: 850;
}
.blog-card-excerpt {
    margin: 0;
    color: var(--blog-muted);
    font-size: 14.5px;
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--blog-border);
}
.blog-read-more {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin-left: auto;
    color: var(--blog-accent);
    font-size: 13.5px;
    font-weight: 800;
}
.blog-read-more svg { width: 15px; height: 15px; transition: transform .18s ease; }
.blog-list-card:hover .blog-read-more svg { transform: translateX(3px); }

/* ── Article detail ──────────────────────────────────────── */
.blog-detail-wrap { max-width: 1120px; margin: 0 auto; }

.blog-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 22px;
    color: var(--blog-muted);
    font-size: 14.5px;
    font-weight: 700;
    text-decoration: none;
    transition: color .15s ease;
}
.blog-back-link svg { width: 17px; height: 17px; }
.blog-back-link:hover { color: var(--blog-accent); }

.blog-article {
    padding: 40px 44px 44px;
    border: 1px solid var(--blog-border);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 12px 40px rgba(16, 24, 40, .06);
}
.blog-article-head { display: flex; flex-direction: column; gap: 16px; }
.blog-article-title {
    margin: 0 !important;
    max-width: none !important;   /* override global h1 max-width:760px */
    color: var(--blog-ink);
    font-size: clamp(30px, 3.4vw, 44px) !important;   /* override global h1 !important sizing */
    line-height: 1.16 !important;
    font-weight: 900 !important;
    letter-spacing: -.02em !important;
}
.blog-article-lead {
    margin: 0;
    color: var(--blog-muted);
    font-size: 19px;
    line-height: 1.6;
}
.blog-article-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 4px;
    padding: 18px 0;
    border-top: 1px solid var(--blog-border);
    border-bottom: 1px solid var(--blog-border);
}

.blog-article-cover {
    margin: 30px 0 6px;
    overflow: hidden;
    border-radius: 18px;
    background: var(--blog-soft);
}
.blog-article-cover img {
    display: block;
    width: 100%;
    max-height: 460px;
    object-fit: cover;
}

.blog-article-body {
    margin-top: 30px;
    color: #33415a;
    font-size: 17.5px;
    line-height: 1.85;
}
.blog-article-body p { margin: 0 0 20px; }
.blog-article-body h2,
.blog-article-body h3 { margin: 34px 0 14px; color: var(--blog-ink); line-height: 1.3; }
.blog-article-body h2 { font-size: 26px; }
.blog-article-body h3 { font-size: 21px; }
.blog-article-body ul,
.blog-article-body ol { margin: 0 0 20px 22px; padding: 0; }
.blog-article-body li { margin: 0 0 8px; }
.blog-article-body a { color: var(--blog-accent); font-weight: 700; text-underline-offset: 2px; }
.blog-article-body img { max-width: 100%; height: auto; border-radius: 14px; margin: 8px 0; }
.blog-article-body blockquote {
    margin: 24px 0;
    padding: 4px 0 4px 20px;
    border-left: 4px solid var(--blog-accent-2);
    color: var(--blog-ink);
    font-style: italic;
}

.blog-article-foot {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 36px;
    padding-top: 26px;
    border-top: 1px solid var(--blog-border);
}
.blog-article-foot .btn { min-width: 160px; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 760px) {
    .blog-list-grid { grid-template-columns: 1fr !important; }
    .blog-article { padding: 26px 20px 30px; }
    .blog-article-title { font-size: 28px; }
    .blog-article-lead { font-size: 17px; }
    .blog-article-body { font-size: 16.5px; }
    .blog-article-foot .btn { flex: 1 1 100%; }
}

/* ── Dark theme ──────────────────────────────────────────── */
body.theme-dark {
    --blog-ink: #eef2fb;
    --blog-muted: #9aa6bf;
    --blog-border: #263356;
    --blog-soft: #0d1330;
}
body.theme-dark .blog-list-card,
body.theme-dark .blog-article { background: #101a3d !important; }
body.theme-dark .blog-chip { background: #1a2a55; color: #9db8ee; }
body.theme-dark .blog-card-excerpt,
body.theme-dark .blog-article-body { color: #c4cde0; }
body.theme-dark .blog-featured-tag { background: rgba(0, 0, 0, .55); }
