/* ==========================================================================
   Clon Blog – Premium Design System
   Matches Apple-style main site with Inter font + Bootstrap 5
   ========================================================================== */

:root {
    --accent: #F59E0B;
    --accent-hover: #D97706;
    --accent-light: rgba(245, 158, 11, 0.08);
    --accent-border: rgba(245, 158, 11, 0.2);
    --bg-primary: #FBFBFD;
    --bg-secondary: #F5F5F7;
    --bg-dark: #1D1D1F;
    --text-primary: #1D1D1F;
    --text-secondary: #6E6E73;
    --text-tertiary: #AEAEB2;
    --shadow-card: 0 2px 12px rgba(0,0,0,0.06), 0 0 1px rgba(0,0,0,0.04);
    --shadow-card-hover: 0 8px 30px rgba(0,0,0,0.10), 0 0 1px rgba(0,0,0,0.06);
    --shadow-elevated: 0 20px 60px rgba(0,0,0,0.12), 0 0 1px rgba(0,0,0,0.06);
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --transition-fast: 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-smooth: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-spring: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    --max-content: 720px;
    --max-wide: 1120px;
}

* { box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.6;
}

/* ==========================================================================
   Navbar (matching main site)
   ========================================================================== */
.navbar-custom {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    padding: 0;
    height: 52px;
    display: flex;
    align-items: center;
    background: transparent;
    border-bottom: 0.5px solid transparent;
    transition: background var(--transition-fast);
}

.navbar-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.brand-icon img {
    width: 56px;
    height: 45px;
    object-fit: contain;
}

.nav-link-custom {
    color: rgba(255, 255, 255, 0.88) !important;
    font-weight: 400;
    font-size: 0.82rem;
    letter-spacing: 0;
    padding: 0 1.2rem !important;
    transition: color var(--transition-fast);
    position: relative;
}

.nav-link-custom:hover,
.nav-link-custom.active {
    color: var(--accent) !important;
}

.nav-link-custom.active::after {
    display: none;
}

.btn-nav-cta {
    background: var(--accent);
    color: var(--bg-dark) !important;
    border: none;
    padding: 0.45rem 1.4rem;
    border-radius: 980px;
    font-size: 0.82rem;
    font-weight: 600;
    transition: all var(--transition-fast);
    letter-spacing: -0.01em;
    text-decoration: none;
}

.btn-nav-cta:hover {
    background: var(--accent-hover);
    color: #fff !important;
    transform: scale(1.02);
}

/* Mobile toggle */
.navbar-toggler {
    border: none;
    padding: 8px;
    background: transparent;
}

.navbar-toggler:focus { box-shadow: none; }

.toggler-bar {
    display: block;
    width: 22px;
    height: 2px;
    background: rgba(255, 255, 255, 0.9);
    margin: 5px 0;
    border-radius: 2px;
    transition: var(--transition-fast);
}

/* Mobile Drawer */
.mobile-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(4px);
    z-index: 1050;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-smooth);
}

.mobile-drawer-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.mobile-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 300px;
    max-width: 85vw;
    height: 100vh;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(40px);
    z-index: 1060;
    padding: 80px 28px 28px;
    transform: translateX(100%);
    transition: transform var(--transition-smooth);
    display: flex;
    flex-direction: column;
}

.mobile-drawer.active {
    transform: translateX(0);
}

.drawer-nav { display: flex; flex-direction: column; gap: 4px; }

.drawer-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    border-radius: var(--radius-sm);
    transition: background var(--transition-fast);
}

.drawer-link:hover { background: var(--bg-secondary); }
.drawer-link i { font-size: 1.1rem; color: var(--accent); }

.drawer-cta {
    margin-top: auto;
    padding-top: 20px;
}

.drawer-cta-btn {
    width: 100%;
    padding: 14px;
    font-size: 1rem;
    border-radius: 980px;
    background: var(--text-primary);
    color: #fff;
    border: none;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.blog-hero {
    padding: 140px 0 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
    background: url('/hero-bg-5.webp') center center / cover no-repeat;
    min-height: 380px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.blog-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.45) 60%, rgba(0,0,0,0.65) 100%);
    pointer-events: none;
}

.blog-hero .container {
    position: relative;
    z-index: 2;
}

.blog-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: var(--accent);
    padding: 6px 16px;
    border-radius: 980px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    margin-bottom: 24px;
    backdrop-filter: blur(8px);
}

.blog-hero h1 {
    font-size: clamp(2.5rem, 5vw, 3.8rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.08;
    margin-bottom: 16px;
    color: #fff;
}

.blog-hero p {
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    color: rgba(255, 255, 255, 0.8);
    max-width: 540px;
    margin: 0 auto;
    line-height: 1.6;
    font-weight: 400;
}

/* ==========================================================================
   Search & Filters
   ========================================================================== */
.blog-controls {
    padding: 48px 0;
    position: relative;
    z-index: 10;
}

.blog-search-wrap {
    max-width: 560px;
    margin: 0 auto 36px;
    position: relative;
}

.blog-search-wrap i {
    position: absolute;
    left: 22px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--accent);
    font-size: 1.1rem;
    pointer-events: none;
    transition: color var(--transition-fast);
}

.blog-search {
    width: 100%;
    padding: 16px 22px 16px 52px;
    border: 1.5px solid rgba(0,0,0,0.06);
    border-radius: 980px;
    font-size: 1rem;
    font-family: inherit;
    background: #fff;
    color: var(--text-primary);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 2px 12px rgba(0,0,0,0.04), 0 0 0 0 rgba(245, 158, 11, 0);
}

.blog-search:hover {
    border-color: rgba(0,0,0,0.12);
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.blog-search:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 4px 24px rgba(245, 158, 11, 0.1), 0 0 0 3px rgba(245, 158, 11, 0.08);
    transform: scale(1.01);
}

.blog-search:focus + .blog-search-wrap i,
.blog-search-wrap:focus-within i {
    color: var(--accent-hover);
}

.blog-search::placeholder {
    color: var(--text-tertiary);
    font-weight: 400;
}

/* Category Pills */
.category-pills {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}

.category-pill {
    padding: 8px 20px;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 980px;
    background: #fff;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.category-pill:hover {
    border-color: rgba(0,0,0,0.15);
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.category-pill.active {
    background: var(--text-primary);
    color: #fff;
    border-color: var(--text-primary);
}

/* ==========================================================================
   Blog Grid & Cards
   ========================================================================== */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    padding-bottom: 60px;
}

@media (max-width: 991px) {
    .blog-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 575px) {
    .blog-grid { grid-template-columns: 1fr; gap: 20px; }
}

.blog-card {
    background: #fff;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: all var(--transition-smooth);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    border: 1px solid rgba(0,0,0,0.04);
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card-hover);
    color: inherit;
    text-decoration: none;
}

.blog-card:hover .blog-card-img img {
    transform: scale(1.04);
}

.blog-card-img {
    aspect-ratio: 16/10;
    overflow: hidden;
    position: relative;
    background: var(--bg-secondary);
}

.blog-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-smooth);
}

.blog-card-img .img-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, #e8e8ed 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.blog-card-img .img-placeholder i {
    font-size: 2rem;
    color: var(--text-tertiary);
}

.blog-card-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.blog-card-category {
    display: inline-flex;
    align-self: flex-start;
    padding: 4px 12px;
    background: var(--accent-light);
    color: var(--accent-hover);
    border-radius: 980px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.blog-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.35;
    margin-bottom: 8px;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-excerpt {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid rgba(0,0,0,0.05);
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

.blog-card-meta .author-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.blog-card-meta .meta-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.blog-card-meta .author-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.8rem;
}

.blog-card-meta .meta-info {
    display: flex;
    align-items: center;
    gap: 6px;
}

.blog-card-meta .meta-dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--text-tertiary);
}

/* ==========================================================================
   Skeleton Loaders
   ========================================================================== */
@keyframes shimmer {
    0% { background-position: -400px 0; }
    100% { background-position: 400px 0; }
}

.skeleton {
    background: linear-gradient(90deg, var(--bg-secondary) 25%, #eaeaef 37%, var(--bg-secondary) 63%);
    background-size: 800px 100%;
    animation: shimmer 1.8s infinite ease-in-out;
    border-radius: var(--radius-sm);
}

.skeleton-card {
    background: #fff;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(0,0,0,0.04);
}

.skeleton-img { aspect-ratio: 16/10; }
.skeleton-body { padding: 24px; }

.skeleton-badge {
    width: 80px;
    height: 22px;
    margin-bottom: 12px;
    border-radius: 980px;
}

.skeleton-title {
    height: 20px;
    margin-bottom: 8px;
    width: 90%;
}

.skeleton-title-2 {
    height: 20px;
    margin-bottom: 12px;
    width: 65%;
}

.skeleton-text {
    height: 14px;
    margin-bottom: 6px;
    width: 100%;
}

.skeleton-text-short {
    height: 14px;
    width: 70%;
    margin-bottom: 16px;
}

.skeleton-meta {
    height: 28px;
    width: 60%;
    margin-top: 16px;
    border-radius: 980px;
}

/* ==========================================================================
   Pagination
   ========================================================================== */
.blog-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 20px 0 80px;
}

.page-btn {
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition-fast);
    padding: 0 4px;
}

.page-btn:hover:not(:disabled) {
    border-color: var(--text-primary);
    color: var(--text-primary);
}

.page-btn.active {
    background: var(--text-primary);
    color: #fff;
    border-color: var(--text-primary);
}

.page-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* ==========================================================================
   Empty State
   ========================================================================== */
.blog-empty {
    text-align: center;
    padding: 80px 20px;
    grid-column: 1 / -1;
}

.blog-empty i {
    font-size: 3rem;
    color: var(--text-tertiary);
    margin-bottom: 16px;
    display: block;
}

.blog-empty h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.blog-empty p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ==========================================================================
   Post Page – Cover
   ========================================================================== */
.post-cover {
    position: relative;
    width: 100%;
    min-height: 420px;
    max-height: 560px;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    background: var(--bg-dark);
}

.post-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
}

.post-cover-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(29,29,31,0.95) 0%, rgba(29,29,31,0.4) 50%, rgba(29,29,31,0.15) 100%);
}

.post-cover-content {
    position: relative;
    z-index: 2;
    padding: 60px 0;
    width: 100%;
}

.post-cover .post-category-badge {
    display: inline-flex;
    padding: 5px 14px;
    background: var(--accent);
    color: #fff;
    border-radius: 980px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.post-cover h1 {
    font-size: clamp(2rem, 4.5vw, 3.2rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.1;
    color: #fff;
    margin-bottom: 20px;
    max-width: 800px;
}

.post-cover-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
}

.post-cover-meta .author-block {
    display: flex;
    align-items: center;
    gap: 10px;
}

.post-cover-meta .author-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
}

.post-cover-meta .author-name {
    font-weight: 600;
    color: #fff;
}

.post-cover-meta .meta-sep {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
}

/* ==========================================================================
   Post Page – Layout
   ========================================================================== */
.post-layout {
    display: grid;
    grid-template-columns: 1fr minmax(0, var(--max-content)) 240px;
    gap: 48px;
    max-width: var(--max-wide);
    margin: 0 auto;
    padding: 48px 24px 80px;
    position: relative;
}

@media (max-width: 1024px) {
    .post-layout {
        grid-template-columns: 1fr;
        max-width: var(--max-content);
        gap: 0;
    }
}

/* Share sidebar */
.post-share-sidebar {
    position: sticky;
    top: 100px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-self: start;
    padding-top: 8px;
}

@media (max-width: 1024px) {
    .post-share-sidebar {
        position: static;
        flex-direction: row;
        justify-content: flex-start;
        padding: 0 0 24px;
        margin-bottom: 24px;
        border-bottom: 1px solid rgba(0,0,0,0.06);
        order: -1;
    }
}

.share-btn {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--text-secondary);
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.share-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-light);
}

.share-btn.copied {
    border-color: #34C759;
    color: #34C759;
    background: rgba(52, 199, 89, 0.08);
}

/* ==========================================================================
   Post Page – Article Content (rich typography)
   ========================================================================== */
.post-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-primary);
}

.post-content h1 {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin: 56px 0 20px;
    color: var(--text-primary);
}

.post-content h2 {
    font-size: 1.7rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.2;
    margin: 48px 0 16px;
    color: var(--text-primary);
}

.post-content h3 {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.3;
    margin: 40px 0 12px;
    color: var(--text-primary);
}

.post-content h4 {
    font-size: 1.15rem;
    font-weight: 600;
    margin: 32px 0 10px;
}

.post-content h5 { font-size: 1rem; font-weight: 600; margin: 28px 0 8px; }
.post-content h6 { font-size: 0.9rem; font-weight: 600; margin: 24px 0 8px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.04em; }

.post-content p { margin: 0 0 24px; }

.post-content a {
    color: var(--accent-hover);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: rgba(217, 119, 6, 0.3);
    transition: text-decoration-color var(--transition-fast);
}

.post-content a:hover { text-decoration-color: var(--accent-hover); }
.post-content strong { font-weight: 700; }

.post-content ul,
.post-content ol {
    margin: 0 0 24px;
    padding-left: 24px;
}

.post-content li {
    margin-bottom: 8px;
    padding-left: 4px;
}

.post-content li::marker { color: var(--accent); }

.post-content blockquote {
    margin: 32px 0;
    padding: 24px 28px;
    border-left: 4px solid var(--accent);
    background: var(--accent-light);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-style: italic;
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.7;
}

.post-content blockquote p:last-child { margin-bottom: 0; }

.post-content code {
    background: var(--bg-secondary);
    padding: 2px 7px;
    border-radius: 6px;
    font-size: 0.88em;
    font-family: 'SF Mono', 'Fira Code', 'Fira Mono', Menlo, Consolas, monospace;
    color: #c7254e;
}

.post-content pre {
    background: var(--bg-dark);
    color: #e5e5ea;
    padding: 24px 28px;
    border-radius: var(--radius-md);
    overflow-x: auto;
    margin: 32px 0;
    font-size: 0.88rem;
    line-height: 1.7;
}

.post-content pre code {
    background: transparent;
    color: inherit;
    padding: 0;
    border-radius: 0;
    font-size: inherit;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    margin: 32px 0;
    box-shadow: var(--shadow-card);
}

.post-content hr {
    border: none;
    height: 1px;
    background: rgba(0,0,0,0.08);
    margin: 40px 0;
}

.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 32px 0;
    font-size: 0.95rem;
}

.post-content th,
.post-content td {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    text-align: left;
}

.post-content th {
    font-weight: 600;
    background: var(--bg-secondary);
}

/* ==========================================================================
   Table of Contents (desktop sidebar)
   ========================================================================== */
.post-toc {
    position: sticky;
    top: 100px;
    align-self: start;
}

@media (max-width: 1024px) {
    .post-toc { display: none; }
}

.post-toc h4 {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-tertiary);
    margin-bottom: 16px;
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-list li { margin-bottom: 4px; }

.toc-list a {
    display: block;
    padding: 5px 12px;
    font-size: 0.82rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-left: 2px solid transparent;
    border-radius: 0 6px 6px 0;
    transition: all var(--transition-fast);
    line-height: 1.4;
}

.toc-list a:hover {
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.toc-list a.active {
    color: var(--accent-hover);
    border-left-color: var(--accent);
    background: var(--accent-light);
    font-weight: 500;
}

.toc-list .toc-h3 { padding-left: 24px; }

/* ==========================================================================
   Related Posts
   ========================================================================== */
.related-posts {
    padding: 80px 0;
    background: var(--bg-secondary);
}

.related-posts h2 {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    text-align: center;
    margin-bottom: 40px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

@media (max-width: 767px) {
    .related-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    background: var(--bg-dark);
    padding: 40px 0 28px;
    color: rgba(255,255,255,0.5);
}

.footer-content { margin-bottom: 16px; }

.footer-brand .brand-icon img {
    width: 40px;
    height: 32px;
    filter: brightness(0) invert(1);
}

.footer-tagline {
    font-size: 0.9rem;
    margin-top: 8px;
    color: rgba(255,255,255,0.4);
}

.footer-copyright {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.3);
}

/* ==========================================================================
   Animations
   ========================================================================== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-in {
    animation: fadeInUp 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.fade-up {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.stagger-children .fade-up:nth-child(1) { transition-delay: 0s; }
.stagger-children .fade-up:nth-child(2) { transition-delay: 0.06s; }
.stagger-children .fade-up:nth-child(3) { transition-delay: 0.06s; }
.stagger-children .fade-up:nth-child(4) { transition-delay: 0.12s; }
.stagger-children .fade-up:nth-child(5) { transition-delay: 0.15s; }
.stagger-children .fade-up:nth-child(6) { transition-delay: 0.18s; }
.stagger-children .fade-up:nth-child(7) { transition-delay: 0.21s; }
.stagger-children .fade-up:nth-child(8) { transition-delay: 0.24s; }
.stagger-children .fade-up:nth-child(9) { transition-delay: 0.27s; }

/* Post skeleton (full post page) */
.post-skeleton-cover {
    min-height: 420px;
    background: var(--bg-secondary);
}

.post-skeleton-title { height: 40px; width: 80%; margin-bottom: 12px; }
.post-skeleton-title-2 { height: 40px; width: 55%; margin-bottom: 24px; }
.post-skeleton-line { height: 18px; width: 100%; margin-bottom: 14px; }
.post-skeleton-line-short { height: 18px; width: 60%; margin-bottom: 14px; }

/* ==========================================================================
   Toast notification
   ========================================================================== */
.blog-toast {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: var(--bg-dark);
    color: #fff;
    padding: 12px 24px;
    border-radius: 980px;
    font-size: 0.875rem;
    font-weight: 500;
    z-index: 9999;
    opacity: 0;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
    box-shadow: var(--shadow-elevated);
}

.blog-toast.visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* ==========================================================================
   Back to blog link (post page)
   ========================================================================== */
.back-to-blog {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 12px 0;
    margin-bottom: 16px;
    transition: color var(--transition-fast);
}

.back-to-blog:hover { color: #fff; }

/* ==========================================================================
   Responsive tweaks
   ========================================================================== */
@media (max-width: 767px) {
    .blog-hero { padding: 100px 0 50px; min-height: 300px; }
    .blog-card-body { padding: 20px; }
    .post-cover { min-height: 320px; }
    .post-cover h1 { font-size: 1.8rem; }
    .post-layout { padding: 32px 16px 60px; }
    .post-content { font-size: 1rem; }
    .blog-pagination { padding-bottom: 60px; }
    .related-posts { padding: 48px 0; }
}

@media (max-width: 575px) {
    .category-pills { gap: 6px; }
    .category-pill { padding: 6px 14px; font-size: 0.8rem; }
}
