.container-fluid {
    padding: 40px 20px;
    background-color: #34343D;
    padding-left: 15%;
    padding-right: 15%;
    padding-top: 20px;
}

.main-title {
    color: white;
}

/* ── Filter bar ──────────────────────────────────────────── */
.blog-filter-bar {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 2rem;
}

.blog-filter-bar .form-control,
.blog-filter-bar .form-select {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.15);
    color: #fff;
    font-family: 'Open Sans', sans-serif;
    font-size: 0.9rem;
}

.blog-filter-bar .form-control::placeholder { color: rgba(255,255,255,0.4); }

.blog-filter-bar .form-control:focus,
.blog-filter-bar .form-select:focus {
    border-color: #387FC8;
    box-shadow: 0 0 0 3px rgba(56,127,200,0.2);
    background: rgba(255,255,255,0.1);
    color: #fff;
}

.blog-filter-bar .form-select option { background: #393943; color: #fff; }

.blog-filter-bar .input-group-text {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.5);
}

/* ── Category pills ──────────────────────────────────────── */
.category-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.category-pill {
    font-family: 'Open Sans', sans-serif;
    font-size: 0.8rem;
    padding: 0.3rem 0.9rem;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    transition: all 0.2s;
}

.category-pill:hover,
.category-pill.active {
    background: #387FC8;
    border-color: #387FC8;
    color: #fff;
    text-decoration: none;
}

/* ── Active tag banner ───────────────────────────────────── */
.active-filter-banner {
    background: rgba(56,127,200,0.1);
    border: 1px solid rgba(56,127,200,0.3);
    border-radius: 8px;
    padding: 0.6rem 1rem;
    font-size: 0.875rem;
    color: #387FC8;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* ── Featured post ───────────────────────────────────────── */
.featured-post {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-left: 4px solid #387FC8;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 2.5rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 320px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.featured-post:hover {
    transform: translateY(-3px);
    color: inherit;
    text-decoration: none;
    border-color: #387FC8;
}

.featured-post__img { width: 100%; height: 100%; object-fit: cover; display: block; }

.featured-post__img-placeholder {
    background: rgba(255,255,255,0.03);
    display: flex;
    align-items: center;
    justify-content: center;
}

.featured-post__body {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-badge {
    display: inline-block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.68rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #387FC8;
    border: 1px solid #387FC8;
    border-radius: 4px;
    padding: 0.2rem 0.6rem;
    margin-bottom: 0.75rem;
    width: fit-content;
}

.featured-post__category {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #A6DF56;
    margin-bottom: 0.4rem;
}

.featured-post__title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.45rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
    margin-bottom: 0.65rem;
}

.featured-post__sub {
    color: rgba(255,255,255,0.5);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1.1rem;
}

.featured-post__meta {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.3);
    font-family: 'Open Sans', sans-serif;
}

.featured-post__meta span + span::before { content: '·'; margin: 0 0.5rem; }

/* ── Post grid ───────────────────────────────────────────── */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.post-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-top: 3px solid transparent;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

.post-card:hover {
    transform: translateY(-4px);
    border-top-color: #387FC8;
    border-color: rgba(56,127,200,0.35);
    color: inherit;
    text-decoration: none;
}

.post-card__thumb { width: 100%; height: 185px; object-fit: cover; display: block; }

.post-card__thumb-placeholder {
    height: 185px;
    background: rgba(255,255,255,0.03);
    display: flex;
    align-items: center;
    justify-content: center;
}

.post-card__body {
    padding: 1.2rem 1.4rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-card__category {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #A6DF56;
    margin-bottom: 0.4rem;
}

.post-card__title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.92rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.45;
    margin-bottom: 0.5rem;
}

.post-card__excerpt {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.45);
    line-height: 1.6;
    flex: 1;
    margin-bottom: 0.9rem;
}

.post-card__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.28);
    border-top: 1px solid rgba(255,255,255,0.06);
    padding-top: 0.7rem;
}

.post-card__read-time {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.68rem;
    color: #387FC8;
    background: rgba(56,127,200,0.12);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
}

/* ── Empty state ─────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 5rem 1rem;
    color: rgba(255,255,255,0.4);
}

.empty-state i { font-size: 4rem; margin-bottom: 1rem; display: block; opacity: 0.25; }
.empty-state h3 { color: rgba(255,255,255,0.45); }

/* ── Pagination ──────────────────────────────────────────── */
.blog-pagination .page-link {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: #387FC8;
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.1);
}

.blog-pagination .page-link:hover {
    background: rgba(56,127,200,0.15);
    border-color: #387FC8;
}

.blog-pagination .page-item.active .page-link {
    background: #387FC8;
    border-color: #387FC8;
    color: #fff;
}

/* ── Detail: two-column layout ───────────────────────────── */
.blog-detail-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 2rem;
    align-items: start;
}

/* ── Detail: post meta ───────────────────────────────────── */
.post-meta-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    font-size: 0.82rem;
    color: rgba(255,255,255,0.4);
    font-family: 'Open Sans', sans-serif;
    margin-bottom: 1.75rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.post-meta-bar span { display: flex; align-items: center; gap: 0.35rem; }
.post-meta-bar i { color: #387FC8; }

.post-category-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #A6DF56;
    margin-bottom: 0.5rem;
    display: block;
}

/* ── Detail: featured image ──────────────────────────────── */
.blog-featured-image {
    width: 100%;
    max-height: 460px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 2rem;
    display: block;
    border: 1px solid rgba(255,255,255,0.08);
}

/* ── Detail: prose ───────────────────────────────────────── */
.blog-prose {
    font-family: 'Open Sans', sans-serif;
    font-size: 1rem;
    line-height: 1.85;
    color: rgba(255,255,255,0.82);
}

.blog-prose h2 {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.35rem;
    font-weight: 700;
    color: #fff;
    margin: 2.25rem 0 0.9rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.blog-prose h3 {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    margin: 1.75rem 0 0.65rem;
}

.blog-prose p { margin-bottom: 1.3rem; }
.blog-prose a { color: #387FC8; text-decoration: underline; text-underline-offset: 3px; }
.blog-prose a:hover { color: #5ea0e0; }
.blog-prose strong { font-weight: 700; color: #fff; }
.blog-prose em { font-style: italic; color: rgba(255,255,255,0.7); }

.blog-prose code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.87em;
    background: rgba(56,127,200,0.12);
    color: #387FC8;
    padding: 0.15em 0.4em;
    border-radius: 4px;
}

.blog-prose pre {
    background: rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.08);
    padding: 1.4rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.5rem 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.87rem;
    line-height: 1.65;
}

.blog-prose pre code { background: none; color: rgba(255,255,255,0.85); padding: 0; }

.blog-prose blockquote {
    border-left: 3px solid #387FC8;
    margin: 1.5rem 0;
    padding: 0.75rem 1.5rem;
    background: rgba(56,127,200,0.06);
    border-radius: 0 8px 8px 0;
    color: rgba(255,255,255,0.6);
    font-style: italic;
}

.blog-prose ul, .blog-prose ol {
    margin-bottom: 1.3rem;
    padding-left: 1.5rem;
    color: rgba(255,255,255,0.75);
}

.blog-prose li { margin-bottom: 0.35rem; }

.blog-prose table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: 0.9rem; }

.blog-prose th {
    background: rgba(56,127,200,0.2);
    color: #fff;
    padding: 0.65rem 1rem;
    text-align: left;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    letter-spacing: 0.05em;
}

.blog-prose td {
    padding: 0.6rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.7);
}

.blog-prose tr:nth-child(even) td { background: rgba(255,255,255,0.02); }

/* ── Detail: tags ────────────────────────────────────────── */
.tag-chip {
    display: inline-block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    color: #387FC8;
    background: rgba(56,127,200,0.1);
    border: 1px solid rgba(56,127,200,0.25);
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.2s;
    margin-right: 0.35rem;
    margin-bottom: 0.35rem;
}

.tag-chip:hover { background: #387FC8; color: #fff; text-decoration: none; }

/* ── Detail: share ───────────────────────────────────────── */
.share-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    padding-top: 1.5rem;
    margin-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.share-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255,255,255,0.35);
    margin-right: 0.25rem;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.8rem;
    border-radius: 6px;
    font-size: 0.78rem;
    font-family: 'Open Sans', sans-serif;
    font-weight: 600;
    text-decoration: none;
    color: #fff;
    transition: opacity 0.2s, transform 0.2s;
}

.share-btn:hover { opacity: 0.82; transform: translateY(-1px); color: #fff; text-decoration: none; }
.share-btn.fb  { background: #1877f2; }
.share-btn.tw  { background: #1da1f2; }
.share-btn.li  { background: #0077b5; }
.share-btn.em  { background: rgba(255,255,255,0.15); }

/* ── Detail: comments ────────────────────────────────────── */
.comments-section {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.comments-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1.5rem;
}

.comment-item {
    padding: 1.1rem 1.25rem;
    border-left: 3px solid #387FC8;
    background: rgba(255,255,255,0.03);
    border-radius: 0 8px 8px 0;
    margin-bottom: 1rem;
}

.comment-item.is-reply {
    margin-left: 2rem;
    border-left-color: #A6DF56;
}

.comment-author {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.82rem;
    font-weight: 700;
    color: #387FC8;
    margin-bottom: 0.15rem;
}

.comment-date { font-size: 0.75rem; color: rgba(255,255,255,0.3); margin-bottom: 0.6rem; }
.comment-text { font-size: 0.9rem; color: rgba(255,255,255,0.7); line-height: 1.65; }

/* ── Detail: comment form ────────────────────────────────── */
.comment-form-wrap {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 1.75rem;
    margin-top: 2rem;
}

.comment-form-wrap h4 {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.4rem;
}

.comment-form-wrap .form-note {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.3);
    margin-bottom: 1.2rem;
}

.comment-form-wrap .form-control {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.12);
    color: #fff;
    font-family: 'Open Sans', sans-serif;
    font-size: 0.9rem;
}

.comment-form-wrap .form-control::placeholder { color: rgba(255,255,255,0.3); }

.comment-form-wrap .form-control:focus {
    border-color: #387FC8;
    box-shadow: 0 0 0 3px rgba(56,127,200,0.2);
    background: rgba(255,255,255,0.08);
    color: #fff;
}

/* ── Detail: sidebar ─────────────────────────────────────── */
.sidebar-widget {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 1.4rem;
    margin-bottom: 1.5rem;
}

.sidebar-widget h5 {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.35);
    margin-bottom: 1rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid rgba(255,255,255,0.07);
}

.related-post-link {
    display: block;
    text-decoration: none;
    padding: 0.65rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    transition: color 0.2s;
}

.related-post-link:last-child { border-bottom: none; }
.related-post-link:hover { text-decoration: none; }

.related-post-link h6 {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.82rem;
    font-weight: 700;
    color: rgba(255,255,255,0.75);
    margin-bottom: 0.15rem;
    transition: color 0.2s;
}

.related-post-link:hover h6 { color: #387FC8; }
.related-post-link small { color: rgba(255,255,255,0.3); font-size: 0.72rem; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 992px) {
    .blog-grid { grid-template-columns: repeat(2, 1fr); }
    .blog-detail-layout { grid-template-columns: 1fr; }
    .blog-sidebar { order: -1; }
}

@media (max-width: 768px) {
    .container-fluid {
        padding-left: 5%;
        padding-right: 5%;
    }

    .blog-grid { grid-template-columns: 1fr; }

    .featured-post {
        grid-template-columns: 1fr;
    }

    .featured-post__img,
    .featured-post__img-placeholder { height: 200px; }
}