/* ═══════════════════════════════════════════════════════════════════════════
   Public Blog Pages — BlogsPage + BlogPostPage
   All colors via design tokens in styling.css :root / [data-theme="dark"]
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Blogs listing page ──────────────────────────────────────────────────── */

.bp-page {
    padding-bottom: 80px;
}

.bp-page-header {
    text-align: center;
    margin-bottom: 36px;
}

.bp-page-title {
    font-size: 38px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 10px;
    letter-spacing: -0.02em;
    font-family: var(--font-heading);
}

.bp-page-sub {
    font-size: 16px;
    color: var(--text-secondary);
    margin: 0;
}

/* ── Tag filter row ──────────────────────────────────────────────────────── */
.bp-tags-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 36px;
}

.bp-tag-btn {
    font-size: 13px;
    font-weight: 500;
    padding: 6px 16px;
    border-radius: 999px;
    border: 1.5px solid var(--border);
    background: var(--bg-primary);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s;
    font-family: var(--font-ui);
}
.bp-tag-btn:hover { border-color: var(--accent); color: var(--accent); }
.bp-tag-btn--active {
    background: var(--text-primary);
    border-color: var(--text-primary);
    color: var(--bg-primary);
    font-weight: 600;
}

/* ── Blog grid ───────────────────────────────────────────────────────────── */
.bp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

/* ── Blog card ───────────────────────────────────────────────────────────── */
.bp-card {
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--bg-primary);
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
    display: flex;
    flex-direction: column;
}
.bp-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.bp-card-img {
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: var(--bg-muted);
    flex-shrink: 0;
}
.bp-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.bp-card:hover .bp-card-img img { transform: scale(1.03); }

.bp-card-img--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-light);
}

.bp-card-img-icon { font-size: 40px; }

.bp-card-body {
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.bp-card-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.bp-card-tag {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent);
    background: var(--accent-light);
    border-radius: 999px;
    padding: 2px 9px;
}

.bp-card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.35;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bp-card-excerpt {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.bp-card-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: auto;
    padding-top: 4px;
}

.bp-card-meta-dot { color: var(--border); }

/* ── Skeleton cards ──────────────────────────────────────────────────────── */
.bp-card--skeleton {
    cursor: default;
    pointer-events: none;
}

.bp-card-img-skel {
    width: 100%;
    height: 180px;
    background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--bg-muted) 50%, var(--bg-secondary) 75%);
    background-size: 200% 100%;
    animation: bp-shimmer 1.4s infinite;
}

.bp-skel {
    border-radius: 6px;
    background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--bg-muted) 50%, var(--bg-secondary) 75%);
    background-size: 200% 100%;
    animation: bp-shimmer 1.4s infinite;
}
.bp-skel--tag  { height: 16px; width: 70px; }
.bp-skel--title { height: 22px; width: 90%; margin-top: 4px; }
.bp-skel--sub   { height: 14px; width: 100%; }
.bp-skel--meta  { height: 12px; width: 140px; margin-top: 4px; }

@keyframes bp-shimmer {
    0%   { background-position:  200% 0; }
    100% { background-position: -200% 0; }
}

/* ── Error / empty ───────────────────────────────────────────────────────── */
.bp-error {
    text-align: center;
    padding: 40px;
    color: #ef4444;
    font-size: 14px;
}

.bp-empty {
    text-align: center;
    padding: 60px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
.bp-empty-icon  { font-size: 44px; }
.bp-empty-title { font-size: 20px; font-weight: 700; color: var(--text-primary); }
.bp-empty-sub   { font-size: 14px; color: var(--text-secondary); max-width: 360px; }

.bp-clear-filter {
    background: none;
    border: 1.5px solid var(--border);
    border-radius: 999px;
    padding: 7px 18px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    margin-top: 4px;
    font-family: var(--font-ui);
}
.bp-clear-filter:hover { border-color: var(--accent); color: var(--accent); }

/* ═════════════════════════════════════════════════════════════════════════════
   Blog Post Page
   ═════════════════════════════════════════════════════════════════════════════ */

.bp-post-page {
    padding-bottom: 80px;
    max-width: 780px !important;
}

.bp-post-back-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    padding: 0;
    transition: color 0.15s;
    margin-bottom: 24px;
    display: inline-block;
    align-self: flex-start;
    font-family: var(--font-ui);
}
.bp-post-back-btn:hover { color: var(--text-primary); }

/* Cover image */
.bp-post-cover {
    width: 100%;
    height: 420px;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 32px;
}
.bp-post-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Post header */
.bp-post-header {
    margin-bottom: 36px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bp-post-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.bp-post-tag {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent);
    background: var(--accent-light);
    border-radius: 999px;
    padding: 3px 10px;
    cursor: pointer;
    transition: background 0.15s;
}
.bp-post-tag:hover { background: var(--accent); color: #fff; }

.bp-post-title {
    font-size: 34px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin: 0;
    font-family: var(--font-heading);
}

.bp-post-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
    font-style: italic;
}

.bp-post-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
    flex-wrap: wrap;
}
.bp-post-meta-dot { color: var(--border-subtle); }

/* ── Post body typography ────────────────────────────────────────────────── */
.bp-post-body {
    color: var(--text-primary);
    line-height: 1.8;
    font-size: 16px;
    padding-bottom: 48px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 36px;
}

.bp-post-p {
    margin: 0 0 20px;
}

.bp-post-h1 {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 32px 0 14px;
    letter-spacing: -0.01em;
    line-height: 1.25;
    font-family: var(--font-heading);
}

.bp-post-h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 28px 0 12px;
    letter-spacing: -0.01em;
    line-height: 1.3;
    font-family: var(--font-heading);
}

.bp-post-h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-secondary);
    margin: 22px 0 10px;
    line-height: 1.35;
    font-family: var(--font-heading);
}

.bp-post-ul,
.bp-post-ol {
    margin: 0 0 20px;
    padding-left: 24px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.bp-post-ul li,
.bp-post-ol li {
    line-height: 1.7;
}

.bp-post-hr {
    border: none;
    border-top: 2px solid var(--border);
    margin: 32px 0;
}

/* Code — intentionally dark regardless of theme */
.bp-post-code-inline {
    background: var(--bg-muted);
    color: var(--accent);
    border-radius: 5px;
    padding: 2px 6px;
    font-family: var(--font-mono);
    font-size: 0.88em;
}

.bp-post-code-block {
    background: var(--color-charcoal);
    color: #e5e7eb;
    border-radius: 12px;
    padding: 18px 20px;
    font-family: var(--font-mono);
    font-size: 13px;
    overflow-x: auto;
    margin: 20px 0;
    line-height: 1.6;
    white-space: pre;
}

/* ── Post footer ─────────────────────────────────────────────────────────── */
.bp-post-footer {
    display: flex;
    justify-content: flex-start;
}

/* ── Post skeleton ───────────────────────────────────────────────────────── */
.bp-post-skeleton {
    padding-top: 48px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.bp-post-skel {
    border-radius: 10px;
    background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--bg-muted) 50%, var(--bg-secondary) 75%);
    background-size: 200% 100%;
    animation: bp-shimmer 1.4s infinite;
}

.bp-post-skel--cover  { height: 360px; border-radius: 16px; }
.bp-post-skel--title  { height: 40px; width: 80%; }
.bp-post-skel--meta   { height: 16px; width: 220px; }
.bp-post-skel--body   { height: 120px; }

/* ── Not found ───────────────────────────────────────────────────────────── */
.bp-post-not-found {
    text-align: center;
    padding: 80px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.bp-post-nf-icon  { font-size: 48px; }
.bp-post-nf-title { font-size: 26px; font-weight: 800; color: var(--text-primary); margin: 0; }
.bp-post-nf-sub   { font-size: 15px; color: var(--text-secondary); margin: 0; }

.bp-post-error {
    padding: 40px;
    text-align: center;
    color: #ef4444;
    font-size: 14px;
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
/* NOTE: additional responsive rules go in stylingMedias.css per project rules */
