.blog-hero {
    padding: 140px 24px 60px;
    text-align: center;
    position: relative;
    overflow: hidden
}

.blog-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to top, var(--bg), transparent);
    pointer-events: none
}

.blog-hero h1 {
    font-size: clamp(2.4rem, 6vw, 4.2rem);
    font-weight: 900;
    line-height: 1.12;
    letter-spacing: -.02em;
    color: var(--text-bright);
    margin-bottom: 16px;
    animation: fadeUp .8s cubic-bezier(.16, 1, .3, 1) both
}

.blog-hero h1 .gradient {
    background: linear-gradient(135deg, var(--accent), var(--accent2), #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text
}

.blog-hero p {
    font-size: clamp(1rem, 2vw, 1.15rem);
    color: var(--text-dim);
    max-width: 560px;
    margin: 0 auto 40px;
    line-height: 1.75;
    animation: fadeUp .8s .1s cubic-bezier(.16, 1, .3, 1) both
}

.category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    animation: fadeUp .8s .2s cubic-bezier(.16, 1, .3, 1) both
}

.category-tab {
    padding: 8px 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dim);
    cursor: pointer;
    transition: all .25s cubic-bezier(.16, 1, .3, 1);
    font-family: inherit;
    white-space: nowrap
}

.category-tab:hover {
    border-color: var(--border-hover);
    color: var(--text);
    background: rgba(255, 255, 255, .06)
}

.category-tab.active {
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 16px var(--accent-glow)
}

.blog-grid-section {
    padding: 40px 0 120px;
    position: relative
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px
}

.article-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all .4s cubic-bezier(.16, 1, .3, 1);
    cursor: pointer;
    display: flex;
    flex-direction: column
}

.article-card a {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%
}

.article-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-6px);
    box-shadow: 0 24px 64px rgba(0, 0, 0, .4)
}

.article-card:hover .article-card-cover img {
    transform: scale(1.03)
}

.article-card-cover {
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a, #1e293b);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative
}

.article-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s cubic-bezier(.16, 1, .3, 1)
}

.article-card-cover .cover-placeholder {
    font-size: 48px;
    opacity: .3
}

.article-card-body {
    padding: 20px 24px 24px;
    display: flex;
    flex-direction: column;
    flex: 1
}

.article-card-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 12px;
    line-height: 1
}

.article-category-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .02em;
    line-height: 1;
    margin: 0
}

.article-category-tag.tutorial {
    background: rgba(59, 130, 246, .12);
    color: var(--accent)
}

.article-category-tag.knowledge {
    background: rgba(139, 92, 246, .12);
    color: var(--accent2)
}

.article-category-tag.comparison {
    background: rgba(245, 158, 11, .12);
    color: var(--amber)
}

.article-category-tag.use-case {
    background: rgba(6, 182, 212, .12);
    color: var(--cyan)
}

.article-category-tag.update {
    background: rgba(16, 185, 129, .12);
    color: var(--green)
}

.article-card-reading-time {
    color: var(--text-dim);
    font-weight: 500
}

.article-card-body h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-bright);
    margin-bottom: 8px;
    letter-spacing: -.01em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4
}

.article-card-excerpt {
    font-size: 14px;
    color: var(--text-dim);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 16px;
    flex: 1
}

.article-card-date {
    font-size: 12px;
    color: var(--text-dim);
    margin-top: auto
}

.article-card-more {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    margin-top: auto;
    display: inline-block
}

.article-card-more:hover {
    color: var(--accent2)
}

.blog-empty {
    text-align: center;
    padding: 80px 24px;
    color: var(--text-dim);
    font-size: 15px
}

.article-header {
    padding: 120px 24px 40px;
    position: relative
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-dim);
    margin-bottom: 24px
}

.breadcrumb a {
    color: var(--accent);
    transition: color .2s
}

.breadcrumb a:hover {
    color: var(--accent2)
}

.breadcrumb-sep {
    opacity: .4
}

.article-header h1 {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 900;
    color: var(--text-bright);
    letter-spacing: -.02em;
    line-height: 1.2;
    margin-bottom: 20px;
    max-width: 780px
}

.article-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 14px;
    color: var(--text-dim)
}

.article-meta-sep {
    opacity: .4;
    margin: 0 4px
}

.article-body-section {
    padding: 0 0 80px
}

.article-layout {
    display: flex;
    gap: 48px;
    align-items: flex-start
}

.article-content {
    flex: 1;
    min-width: 0;
    max-width: 780px;
    font-size: 17px;
    line-height: 1.8;
    color: var(--text)
}

.article-content h2 {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-bright);
    margin: 2em 0 .8em;
    padding-left: 16px;
    border-left: 3px solid var(--accent);
    line-height: 1.3
}

.article-content h3 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-bright);
    margin: 1.5em 0 .6em;
    line-height: 1.35
}

.article-content h4 {
    font-size: 19px;
    font-weight: 700;
    color: var(--text-bright);
    margin: 1.2em 0 .5em
}

.article-content p {
    margin-bottom: 1.2em
}

.article-content ul,
.article-content ol {
    margin: 0 0 1.2em;
    padding-left: 1.5em
}

.article-content li {
    margin-bottom: .5em
}

.article-content li::marker {
    color: var(--accent)
}

.article-content blockquote {
    margin: 1.5em 0;
    padding: 1em 1.2em;
    border-left: 3px solid var(--accent2);
    background: var(--surface);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-style: italic;
    color: var(--text-dim)
}

.article-content blockquote p:last-child {
    margin-bottom: 0
}

.article-content code {
    background: var(--surface);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 15px;
    color: var(--accent);
    font-family: 'Inter', 'Consolas', monospace
}

.article-content pre {
    margin: 1.5em 0;
    padding: 1.2em;
    background: #0d1529;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow-x: auto;
    font-size: 14px;
    line-height: 1.7
}

.article-content pre code {
    background: none;
    padding: 0;
    border-radius: 0;
    font-size: inherit;
    color: var(--text)
}

.article-content table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 1.5em 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    font-size: 15px
}

.article-content th,
.article-content td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border)
}

.article-content th {
    font-weight: 600;
    color: var(--text-dim);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .04em;
    background: rgba(255, 255, 255, .02)
}

.article-content tr:last-child td {
    border-bottom: none
}

.article-content a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color .2s
}

.article-content a:hover {
    color: var(--accent2)
}

.article-content img {
    border-radius: var(--radius-sm);
    margin: 1.5em auto
}

.article-content hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 2em 0
}

.article-content strong {
    color: var(--text-bright);
    font-weight: 700
}

.inline-cta {
    margin: 2em 0;
    padding: 24px 28px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 4px solid;
    border-image: linear-gradient(180deg, var(--accent), var(--accent2)) 1;
    border-radius: 0 var(--radius) var(--radius) 0;
    position: relative
}

.inline-cta h4 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-bright);
    margin: 0 0 8px
}

.inline-cta p {
    font-size: 14px;
    color: var(--text-dim);
    line-height: 1.6;
    margin: 0 0 16px
}

.inline-cta .btn-primary {
    font-size: 14px;
    padding: 10px 24px
}

.article-sidebar {
    width: 260px;
    flex-shrink: 0;
    position: sticky;
    top: 88px;
    max-height: calc(100vh - 104px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent
}

.toc-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 24px
}

.toc-card h4 {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--text-dim);
    margin-bottom: 16px
}

.toc-list {
    max-height: 60vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent
}

.toc-list::-webkit-scrollbar {
    width: 4px
}

.toc-list::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 2px
}

.toc-item {
    display: block;
    padding: 6px 0;
    font-size: 13px;
    color: var(--text-dim);
    line-height: 1.5;
    transition: all .2s;
    text-decoration: none;
    border-left: 2px solid transparent;
    padding-left: 12px
}

.toc-item:hover {
    color: var(--text);
    border-left-color: var(--border-hover)
}

.toc-item.active {
    color: var(--accent);
    border-left-color: var(--accent);
    font-weight: 600
}

.toc-item.h3 {
    padding-left: 28px;
    font-size: 12px
}

.sidebar-cta {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center
}

.sidebar-cta p {
    font-size: 13px;
    color: var(--text-dim);
    line-height: 1.6;
    margin-bottom: 16px
}

.sidebar-cta .btn-primary {
    width: 100%;
    font-size: 13px;
    padding: 10px 16px;
    justify-content: center
}

.mobile-toc {
    display: none;
    margin: 0 auto 32px;
    max-width: 780px
}

.mobile-toc-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all .2s
}

.mobile-toc-toggle:hover {
    border-color: var(--border-hover)
}

.mobile-toc-toggle svg {
    width: 18px;
    height: 18px;
    stroke: var(--text-dim);
    transition: transform .25s ease
}

.mobile-toc.open .mobile-toc-toggle svg {
    transform: rotate(180deg)
}

.mobile-toc-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s cubic-bezier(.16, 1, .3, 1);
    background: var(--surface);
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    padding: 0 20px
}

.mobile-toc.open .mobile-toc-content {
    max-height: 400px;
    padding: 16px 20px
}

.article-footer-section {
    padding: 0 0 60px;
    border-bottom: 1px solid var(--border)
}

.article-footer-inner {
    max-width: 780px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 24px
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px
}

.article-tag {
    padding: 5px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-dim);
    transition: all .2s
}

.article-tag:hover {
    border-color: var(--accent);
    color: var(--accent)
}

.article-share {
    display: flex;
    align-items: center;
    gap: 10px
}

.article-share-label {
    font-size: 13px;
    color: var(--text-dim);
    font-weight: 500
}

.share-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all .2s;
    color: var(--text-dim)
}

.share-btn:hover {
    border-color: var(--border-hover);
    color: var(--text);
    background: rgba(255, 255, 255, .06)
}

.share-btn svg {
    width: 16px;
    height: 16px
}

.copy-toast {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    padding: 10px 24px;
    background: rgba(16, 185, 129, .9);
    color: #fff;
    border-radius: 100px;
    font-size: 14px;
    font-weight: 600;
    opacity: 0;
    transition: all .3s cubic-bezier(.16, 1, .3, 1);
    z-index: 9999;
    pointer-events: none
}

.copy-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0)
}

.related-section {
    padding: 80px 0;
    position: relative
}

.related-section h2 {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    font-weight: 800;
    color: var(--text-bright);
    margin-bottom: 40px
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px
}

.related-card {
    padding: 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all .35s cubic-bezier(.16, 1, .3, 1);
    text-decoration: none
}

.related-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, .3)
}

.related-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 12px
}

.related-card h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-bright);
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden
}

.related-card-excerpt {
    font-size: 13px;
    color: var(--text-dim);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden
}

.related-card-date {
    font-size: 12px;
    color: var(--text-dim);
    margin-top: 12px
}

@media(max-width:900px) {
    .blog-grid {
        grid-template-columns: 1fr 1fr
    }

    .article-layout {
        flex-direction: column
    }

    .article-sidebar {
        display: none
    }

    .mobile-toc {
        display: block
    }

    .article-content {
        max-width: 100%
    }

    .article-footer-inner {
        flex-direction: column
    }

    .related-grid {
        grid-template-columns: 1fr 1fr
    }
}

@media(max-width:600px) {
    .blog-grid {
        grid-template-columns: 1fr
    }

    .blog-hero {
        padding: 120px 16px 40px
    }

    .category-filter {
        gap: 6px
    }

    .category-tab {
        padding: 6px 14px;
        font-size: 12px
    }

    .article-header {
        padding: 100px 16px 32px
    }

    .article-header h1 {
        font-size: 1.75rem
    }

    .article-content {
        font-size: 16px
    }

    .article-content h2 {
        font-size: 22px
    }

    .article-content h3 {
        font-size: 19px
    }

    .related-grid {
        grid-template-columns: 1fr
    }

    .article-share-label {
        display: none
    }

    .article-meta {
        font-size: 12px
    }
}