/**
 * Blog Styles
 * 
 * Styles for blog listing, single posts, and related components
 *
 * @package OpenClawHive
 */

/* === GLOBAL LINK RESET FOR BLOG === */
.blog-main a,
.category-archive a,
.single-post a:not(.article-content a) {
    text-decoration: none;
}

.blog-main a:hover,
.category-archive a:hover {
    text-decoration: none;
}

/* === BLOG HERO === */
.blog-hero {
    padding: 160px 0 60px;
    text-align: center;
}

.blog-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent-blue);
    margin-bottom: 20px;
    font-family: var(--font-mono);
    animation: fadeInUp 0.5s ease both;
}

.blog-hero-eyebrow::before {
    content: '';
    width: 8px; height: 8px;
    background: var(--accent-blue);
    border-radius: 2px;
}

.blog-hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.05;
    margin-bottom: 16px;
    animation: fadeInUp 0.5s 0.1s ease both;
}

.blog-hero p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 520px;
    margin: 0 auto;
    line-height: 1.7;
    animation: fadeInUp 0.5s 0.2s ease both;
}

/* === CATEGORY ARCHIVE === */
.category-archive {
    background: var(--bg-base);
}

.category-archive a {
    text-decoration: none;
}

.category-archive .blog-card .card-link {
    text-decoration: none;
    color: inherit;
}

.category-hero {
    padding: 160px 0 60px;
    text-align: center;
}

.category-hero-inner {
    max-width: 680px;
    margin: 0 auto;
}

.category-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent-blue);
    margin-bottom: 20px;
    font-family: var(--font-mono);
    animation: fadeInUp 0.5s ease both;
}

.category-eyebrow .dot {
    width: 8px; height: 8px;
    background: var(--accent-blue);
    border-radius: 2px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.category-hero h1 {
    font-size: clamp(2.2rem, 4.5vw, 3.5rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.1;
    margin-bottom: 16px;
    animation: fadeInUp 0.5s 0.1s ease both;
}

.category-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    animation: fadeInUp 0.5s 0.2s ease both;
}

.category-hero + .filters-bar {
    padding-top: 0;
}

/* No posts */
.no-posts {
    text-align: center;
    padding: 80px 24px;
}

.no-posts-icon {
    width: 80px; height: 80px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--text-muted);
    margin: 0 auto 24px;
}

.no-posts h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.no-posts p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* === NO RESULTS (Empty Blog State) === */
.no-results.not-found {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
    animation: fadeInUp 0.5s ease both;
}

.no-results-inner {
    text-align: center;
    max-width: 480px;
}

.no-results-icon {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 28px;
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.no-results-icon:hover {
    border-color: var(--accent-blue);
    color: var(--accent-blue);
    transform: scale(1.05);
}

.no-results-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.no-results-description {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 32px;
}

.no-results-description a {
    color: var(--accent-blue);
    text-decoration: none;
    transition: color 0.2s;
}

.no-results-description a:hover {
    color: var(--accent-purple);
}

.no-results-search {
    margin-bottom: 28px;
}

.no-results-search .search-box {
    position: relative;
    max-width: 360px;
    margin: 0 auto;
}

.no-results-search .search-field {
    width: 100%;
    padding: 14px 52px 14px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 100px;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
    transition: all 0.25s ease;
}

.no-results-search .search-field::placeholder {
    color: var(--text-muted);
}

.no-results-search .search-field:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(45,122,255,0.1);
}

.no-results-search .search-submit {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    background: var(--accent-blue);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.no-results-search .search-submit:hover {
    background: var(--accent-purple);
    transform: translateY(-50%) scale(1.05);
}

.no-results-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.no-results-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.no-results-actions .btn svg {
    width: 16px;
    height: 16px;
}

/* === SEARCH & FILTERS === */
.filters-bar {
    padding: 0 0 48px;
    animation: fadeInUp 0.5s 0.3s ease both;
}

.filters-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    flex: 0 0 320px;
}

.search-box input,
.search-box .search-field {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 100px;
    color: var(--text-primary);
    font-size: 0.88rem;
    font-family: inherit;
    outline: none;
    transition: all 0.25s ease;
}

.search-box input::placeholder,
.search-box .search-field::placeholder {
    color: var(--text-muted);
}

.search-box input:focus,
.search-box .search-field:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(45,122,255,0.1);
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.9rem;
    pointer-events: none;
}

.search-box .search-submit {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--accent-blue);
    border: none;
    border-radius: 100px;
    padding: 6px 12px;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-box .search-submit:hover {
    background: var(--accent-purple);
}

.filter-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-tag {
    padding: 8px 16px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-color);
    border-radius: 100px;
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    text-decoration: none;
}

.filter-tag:hover {
    color: var(--text-primary);
    border-color: var(--border-hover);
    background: rgba(255,255,255,0.06);
}

.filter-tag.active {
    color: #fff;
    background: var(--accent-blue);
    border-color: var(--accent-blue);
}

/* === FEATURED POST === */
.featured-post {
    margin-bottom: 64px;
}

.featured-card {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: all 0.35s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.featured-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-3px);
    box-shadow: 0 16px 48px -12px rgba(0,0,0,0.5);
}

.featured-image {
    position: relative;
    min-height: 380px;
    overflow: hidden;
}

.featured-image-inner {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s ease;
}

.featured-card:hover .featured-image-inner {
    transform: scale(1.03);
}

.featured-image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(45,122,255,0.2), rgba(139,92,246,0.2));
}

/* Generative art pattern for featured image */
.featured-art {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.featured-art .grid-pattern {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-template-rows: repeat(5, 1fr);
    gap: 6px;
    width: 85%;
    height: 75%;
    opacity: 0.7;
}

.featured-art .grid-pattern .cell {
    border-radius: 6px;
    transition: all 0.5s ease;
}

.featured-content {
    padding: 48px 44px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 20px;
}

.featured-label .badge {
    background: var(--gradient-main);
    color: #fff;
    padding: 4px 12px;
    border-radius: 100px;
}

.featured-label .date {
    color: var(--text-muted);
    font-weight: 500;
}

.featured-content h2 {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.2;
    margin-bottom: 14px;
    transition: color 0.2s;
}

.featured-card:hover .featured-content h2 {
    color: var(--accent-blue);
}

.featured-content .excerpt {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 28px;
}

.featured-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.author-chip {
    display: flex;
    align-items: center;
    gap: 10px;
}

.author-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--gradient-subtle);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent-blue);
}

.author-name {
    font-size: 0.85rem;
    font-weight: 600;
}

.author-role {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.read-time {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Arrow link */
.read-arrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--accent-blue);
    transition: gap 0.2s;
}

.featured-card:hover .read-arrow {
    gap: 10px;
}

/* === BLOG GRID === */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 64px;
}

.blog-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: all 0.35s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.blog-card .card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-card .card-link:hover {
    text-decoration: none;
}

.blog-card .card-link * {
    text-decoration: none;
}

.blog-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px -12px rgba(0,0,0,0.5);
}

.blog-card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.blog-card-art {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--bg-elevated);
}

.blog-card-art .pattern {
    width: 80%;
    height: 70%;
    position: relative;
}

.blog-card-art .card-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blog-card:hover .blog-card-art .card-thumbnail {
    transform: scale(1.05);
}

.blog-card:hover .blog-card-image {
    opacity: 0.9;
}

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

.blog-card-body .excerpt {
    color: var(--text-secondary);
}

.blog-card-body .card-footer {
    color: var(--text-muted);
}

.blog-card-body .card-footer .author-n {
    color: var(--text-primary);
}

.card-tag {
    display: inline-flex;
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 14px;
    align-self: flex-start;
}

.tag-guide {
    background: rgba(45,122,255,0.1);
    color: var(--accent-blue);
    border: 1px solid rgba(45,122,255,0.2);
}

.tag-engineering {
    background: rgba(139,92,246,0.1);
    color: var(--accent-purple);
    border: 1px solid rgba(139,92,246,0.2);
}

.tag-security {
    background: rgba(16,185,129,0.1);
    color: var(--accent-green);
    border: 1px solid rgba(16,185,129,0.2);
}

.tag-usecases {
    background: rgba(245,158,11,0.1);
    color: var(--accent-orange);
    border: 1px solid rgba(245,158,11,0.2);
}

.tag-updates {
    background: rgba(236,72,153,0.1);
    color: var(--accent-pink);
    border: 1px solid rgba(236,72,153,0.2);
}

.tag-devops {
    background: rgba(6,182,212,0.1);
    color: var(--accent-cyan);
    border: 1px solid rgba(6,182,212,0.2);
}

.blog-card-body h3 {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.3;
    margin-bottom: 10px;
    transition: color 0.2s;
    color: var(--text-primary);
}

.blog-card:hover .blog-card-body h3 {
    color: var(--accent-blue);
}

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

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.card-footer .author {
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-footer .author-av {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: var(--gradient-subtle);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--accent-purple);
}

.card-footer .author-n {
    font-size: 0.8rem;
    font-weight: 600;
}

.card-footer .meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

/* === TOPICS STRIP === */
.topics-strip {
    padding: 48px 0 0;
    margin-bottom: -20px;
}

.topics-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 16px;
    font-family: var(--font-mono);
}

.topics-list {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.topic-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.topic-chip:hover {
    text-decoration: none;
}

.topic-chip:hover {
    border-color: var(--border-hover);
    color: var(--text-primary);
    background: var(--bg-elevated);
}

.topic-chip .count {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    background: rgba(255,255,255,0.04);
    padding: 2px 8px;
    border-radius: 100px;
}

/* === NEWSLETTER === */
.newsletter-section {
    padding: 80px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 0;
}

.newsletter-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 32px;
    padding: 64px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.newsletter-box::before {
    content: '';
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 50%;
    height: 1px;
    background: var(--gradient-main);
}

.newsletter-box::after {
    content: '';
    position: absolute;
    top: -80px; left: 50%;
    transform: translateX(-50%);
    width: 300px; height: 200px;
    background: radial-gradient(circle, rgba(45,122,255,0.08), transparent 70%);
    pointer-events: none;
}

.newsletter-box h2 {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 12px;
    position: relative;
}

.newsletter-box p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    max-width: 420px;
    margin: 0 auto 28px;
    line-height: 1.6;
    position: relative;
}

.newsletter-form {
    display: flex;
    gap: 10px;
    max-width: 440px;
    margin: 0 auto;
    position: relative;
}

.newsletter-form input {
    flex: 1;
    padding: 14px 20px;
    background: var(--bg-base);
    border: 1px solid var(--border-color);
    border-radius: 100px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    outline: none;
    transition: all 0.25s ease;
}

.newsletter-form input::placeholder {
    color: var(--text-muted);
}

.newsletter-form input:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(45,122,255,0.1);
}

.newsletter-form .btn {
    flex-shrink: 0;
}

.newsletter-note {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 14px;
    position: relative;
}

/* === PAGINATION === */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding-bottom: 40px;
}

.pagination .nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
}

.pagination ul {
    display: flex;
    align-items: center;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.pagination li {
    display: flex;
}

.page-btn,
.pagination a,
.pagination span {
    width: 42px; height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.page-btn:hover,
.pagination a:hover {
    border-color: var(--border-hover);
    color: var(--text-primary);
    background: rgba(255,255,255,0.03);
}

.page-btn.active,
.pagination .current {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
    color: #fff;
}

.page-btn.arrow,
.pagination .prev,
.pagination .next {
    font-size: 1rem;
}

.page-dots {
    color: var(--text-muted);
    padding: 0 4px;
    font-size: 0.85rem;
}

/* === ART GENERATORS (CSS generative patterns for post images) === */
.art-grid {
    display: grid;
    gap: 4px;
    width: 100%;
    height: 100%;
    padding: 20px;
}

.art-grid.g1 {
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(4, 1fr);
}

.art-grid.g2 {
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(4, 1fr);
}

.art-grid.g3 {
    grid-template-columns: repeat(6, 1fr);
    grid-template-rows: repeat(3, 1fr);
}

.art-cell {
    border-radius: 4px;
    opacity: 0.6;
    transition: opacity 0.3s, transform 0.3s;
}

.blog-card:hover .art-cell,
.featured-card:hover .art-cell {
    opacity: 0.8;
}

/* === SINGLE POST === */
.single-post {
    padding-top: 120px;
}

/* === READING PROGRESS === */
.reading-progress {
    position: fixed;
    top: 72px;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--gradient-main);
    z-index: 1001;
    transition: width 0.1s linear;
}

/* === ARTICLE HERO === */
.article-hero {
    padding: 70px 0 48px;
    max-width: 780px;
    margin: 0 auto;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 28px;
    animation: fadeInUp 0.5s ease both;
}

.breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: var(--text-primary);
}

.breadcrumb .sep {
    opacity: 0.4;
}

.breadcrumb .current {
    color: var(--text-secondary);
}

.article-tag {
    display: inline-flex;
    padding: 5px 14px;
    border-radius: 100px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 20px;
    animation: fadeInUp 0.5s 0.05s ease both;
}

.article-hero h1 {
    font-size: clamp(2rem, 4.5vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.12;
    margin-bottom: 24px;
    animation: fadeInUp 0.5s 0.1s ease both;
}

.article-excerpt {
    font-size: 1.15rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 32px;
    animation: fadeInUp 0.5s 0.15s ease both;
}

.article-meta-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    animation: fadeInUp 0.5s 0.2s ease both;
}

.meta-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.author-avatar-lg {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: var(--gradient-subtle);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent-blue);
}

.author-info .name {
    font-size: 0.9rem;
    font-weight: 600;
}

.author-info .details {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

.author-info .details .dot {
    width: 3px; height: 3px;
    background: var(--text-muted);
    border-radius: 50%;
}

.meta-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.share-btn {
    width: 38px; height: 38px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.share-btn:hover {
    border-color: var(--border-hover);
    color: var(--text-primary);
    background: rgba(255,255,255,0.03);
}

/* === COVER IMAGE === */
.article-cover {
    max-width: 780px;
    margin: 40px auto;
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid var(--border-color);
    position: relative;
    height: 380px;
    animation: fadeInUp 0.6s 0.25s ease both;
}

.article-cover .cover-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cover-art {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.cover-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(45,122,255,0.15), rgba(139,92,246,0.15));
}

/* === ARTICLE LAYOUT === */
.article-layout {
    display: grid;
    grid-template-columns: 1fr 780px 1fr;
    gap: 0;
    position: relative;
}

/* === TABLE OF CONTENTS (LEFT SIDEBAR) === */
.toc-sidebar {
    position: relative;
}

.toc-sticky {
    position: sticky;
    top: 110px;
    padding-right: 40px;
    max-width: 220px;
    margin-left: auto;
}

.toc-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 16px;
    font-family: var(--font-mono);
}

.toc-list {
    list-style: none;
}

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

.toc-list a {
    display: block;
    padding: 6px 12px;
    font-size: 0.78rem;
    color: var(--text-muted);
    text-decoration: none;
    border-left: 2px solid transparent;
    transition: all 0.2s ease;
    line-height: 1.4;
}

.toc-list a:hover {
    color: var(--text-secondary);
    border-left-color: var(--border-hover);
}

.toc-list a.active {
    color: var(--accent-blue);
    border-left-color: var(--accent-blue);
    background: rgba(45,122,255,0.05);
    border-radius: 0 4px 4px 0;
}

/* === ARTICLE CONTENT === */
.article-content {
    padding: 48px 0 80px;
}

.article-content h2 {
    font-size: 1.65rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin: 56px 0 20px;
    padding-top: 8px;
    scroll-margin-top: 100px;
}

.article-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 40px 0 16px;
    scroll-margin-top: 100px;
}

.article-content p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.article-content strong {
    color: var(--text-primary);
    font-weight: 600;
}

.article-content a {
    color: var(--accent-blue);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: rgba(45,122,255,0.3);
    transition: text-decoration-color 0.2s;
}

.article-content a:hover {
    text-decoration-color: var(--accent-blue);
}

.article-content ul,
.article-content ol {
    margin: 0 0 24px 24px;
    color: var(--text-secondary);
}

.article-content li {
    font-size: 1.02rem;
    line-height: 1.75;
    margin-bottom: 10px;
}

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

/* Code blocks */
.code-block {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin: 28px 0;
}

.code-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(255,255,255,0.02);
}

.code-lang {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.copy-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 4px 12px;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}

.copy-btn:hover {
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.code-body {
    padding: 20px 24px;
    font-family: var(--font-mono);
    font-size: 0.84rem;
    line-height: 1.75;
    overflow-x: auto;
    color: var(--text-secondary);
}

/* Inline code */
.article-content code {
    font-family: var(--font-mono);
    font-size: 0.88em;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border-color);
    padding: 2px 7px;
    border-radius: 5px;
    color: var(--accent-cyan);
}

.article-content pre {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    overflow-x: auto;
    margin: 32px 0;
}

.article-content pre code {
    background: none;
    border: none;
    padding: 0;
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.7;
}

/* Blockquote */
.article-content blockquote {
    border-left: 3px solid var(--accent-blue);
    padding: 20px 24px;
    margin: 28px 0;
    background: rgba(45,122,255,0.04);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.article-content blockquote p {
    color: var(--text-primary);
    font-size: 1.05rem;
    font-style: italic;
    margin-bottom: 0;
}

/* Callout */
.callout {
    display: flex;
    gap: 16px;
    padding: 24px;
    border-radius: var(--radius-lg);
    margin: 32px 0;
    border: 1px solid;
}

.callout-info {
    background: rgba(45,122,255,0.05);
    border-color: rgba(45,122,255,0.15);
}

.callout-warning {
    background: rgba(245,158,11,0.05);
    border-color: rgba(245,158,11,0.15);
}

.callout-success {
    background: rgba(16,185,129,0.05);
    border-color: rgba(16,185,129,0.15);
}

.callout-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.callout-body h4 {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: -0.01em;
}

.callout-body p {
    font-size: 0.9rem;
    margin-bottom: 0;
    line-height: 1.6;
}

/* Image */
.article-image {
    margin: 36px 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.article-image-placeholder {
    height: 320px;
    position: relative;
    overflow: hidden;
}

.article-image figcaption {
    padding: 12px 16px;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
    border-top: 1px solid var(--border-color);
    background: var(--bg-card);
}

/* Separator */
.article-content hr {
    border: none;
    height: 1px;
    background: var(--border-color);
    margin: 48px 0;
}

/* === RIGHT SIDEBAR === */
.right-sidebar {
    position: relative;
}

.sidebar-sticky {
    position: sticky;
    top: 110px;
    padding-left: 40px;
    max-width: 240px;
}

.sidebar-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 20px;
}

.sidebar-card h4 {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 14px;
    font-family: var(--font-mono);
}

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

.sidebar-tag {
    padding: 4px 10px;
    font-size: 0.72rem;
    font-weight: 500;
    border-radius: 100px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.2s;
}

.sidebar-tag:hover {
    color: var(--text-primary);
    border-color: var(--border-hover);
}

.sidebar-resources {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-resources .sidebar-tag {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.sidebar-newsletter input {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-base);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.82rem;
    font-family: inherit;
    outline: none;
    margin-bottom: 10px;
    transition: border-color 0.2s;
}

.sidebar-newsletter input::placeholder {
    color: var(--text-muted);
}

.sidebar-newsletter input:focus {
    border-color: var(--accent-blue);
}

.sidebar-newsletter .btn {
    width: 100%;
    padding: 10px;
    font-size: 0.8rem;
}

.sidebar-newsletter p {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 8px;
    line-height: 1.4;
}

/* === ARTICLE FOOTER === */
.article-footer {
    max-width: 780px;
    margin: 0 auto;
    padding: 0 24px;
}

.article-tags-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 24px 0;
    border-top: 1px solid var(--border-color);
}

.article-tags-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-right: 4px;
}

.article-tag-link {
    padding: 5px 12px;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 100px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s;
}

.article-tag-link:hover {
    color: var(--text-primary);
    border-color: var(--border-hover);
}

/* Author Card */
.author-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 36px;
    margin: 40px 0;
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.author-card-avatar {
    width: 64px; height: 64px;
    border-radius: 50%;
    background: var(--gradient-subtle);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent-blue);
    flex-shrink: 0;
}

.author-card-info h3 {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 4px;
}

.author-card-info .role {
    font-size: 0.82rem;
    color: var(--accent-blue);
    font-weight: 500;
    margin-bottom: 10px;
}

.author-card-info p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 14px;
}

.author-links {
    display: flex;
    gap: 10px;
}

.author-link {
    padding: 6px 14px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 100px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.2s;
}

.author-link:hover {
    color: var(--text-primary);
    border-color: var(--border-hover);
}

/* Post Navigation */
.post-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding: 40px 0;
    border-top: 1px solid var(--border-color);
}

.post-nav-item {
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.post-nav-item:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.post-nav-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.post-nav-item h4 {
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.35;
    transition: color 0.2s;
}

.post-nav-item:hover h4 {
    color: var(--accent-blue);
}

.post-nav-item.next {
    text-align: right;
}

.post-nav-item.next .post-nav-label {
    justify-content: flex-end;
}

/* === RELATED POSTS === */
.related-section {
    padding: 80px 0;
    border-top: 1px solid var(--border-color);
}

.related-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
}

.related-header h2 {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.related-header a {
    font-size: 0.85rem;
    color: var(--accent-blue);
    text-decoration: none;
    font-weight: 600;
    transition: gap 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.related-header a:hover {
    gap: 10px;
}

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

.related-grid .blog-card {
    text-decoration: none;
    color: inherit;
}

.related-grid .blog-card a {
    text-decoration: none;
    color: inherit;
}

/* === CTA BANNER === */
.cta-banner {
    padding: 80px 0;
}

.cta-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 32px;
    padding: 72px 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-box::before {
    content: '';
    position: absolute;
    top: -2px; left: -2px; right: -2px; bottom: -2px;
    background: var(--gradient-main);
    border-radius: 33px;
    z-index: -1;
    opacity: 0.12;
}

.cta-box::after {
    content: '';
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 50%;
    height: 1px;
    background: var(--gradient-main);
}

.cta-box h2 {
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 14px;
}

.cta-box p {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 460px;
    margin: 0 auto 28px;
    line-height: 1.7;
}

.cta-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* === MOBILE TOC === */
.mobile-toc {
    max-width: 780px;
    margin: 0 auto 32px;
    padding: 0 24px;
    display: none;
}

.mobile-toc-toggle {
    width: 100%;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s;
}

.mobile-toc-toggle:hover {
    border-color: var(--border-hover);
}

.mobile-toc-icon {
    transition: transform 0.3s;
    font-size: 0.9rem;
}

.mobile-toc.open .mobile-toc-icon {
    transform: rotate(180deg);
}

.mobile-toc-list {
    list-style: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.mobile-toc.open .mobile-toc-list {
    max-height: 400px;
}

.mobile-toc-list li {
    border-bottom: 1px solid var(--border-color);
}

.mobile-toc-list li:last-child {
    border-bottom: none;
}

.mobile-toc-list a {
    display: block;
    padding: 12px 20px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s;
}

.mobile-toc-list a:hover {
    color: var(--text-primary);
    background: rgba(255,255,255,0.03);
}

/* === RESPONSIVE === */
@media (max-width: 1100px) {
    .article-layout {
        grid-template-columns: 1fr;
        max-width: 780px;
        margin: 0 auto;
        padding: 0 24px;
    }
    .toc-sidebar,
    .right-sidebar {
        display: none;
    }
    .mobile-toc {
        display: block;
    }
}

@media (max-width: 1024px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .featured-card {
        grid-template-columns: 1fr;
    }
    .featured-image {
        min-height: 260px;
    }
}

@media (max-width: 768px) {
    .blog-hero {
        padding: 130px 0 40px;
    }
    .blog-hero h1 {
        font-size: 2.2rem;
    }

    .filters-inner {
        flex-direction: column;
        align-items: stretch;
    }
    .search-box {
        flex: 1;
    }
    .filter-tags {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 4px;
    }

    .blog-grid {
        grid-template-columns: 1fr;
    }
    .related-grid {
        grid-template-columns: 1fr;
    }
    .featured-content {
        padding: 28px 24px;
    }

    .newsletter-box {
        padding: 40px 24px;
    }
    .newsletter-form {
        flex-direction: column;
    }

    .topics-list {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 8px;
    }

    .article-hero {
        padding: 120px 0 32px;
    }
    .article-hero h1 {
        font-size: 1.8rem;
    }
    .article-excerpt {
        font-size: 1rem;
    }
    .article-cover {
        height: 240px;
        margin: 24px auto;
    }

    .article-meta-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }
    .meta-right {
        align-self: flex-start;
    }

    .author-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .author-links {
        justify-content: center;
    }

    .post-nav {
        grid-template-columns: 1fr;
    }
    .post-nav-item.next {
        text-align: left;
    }
    .post-nav-item.next .post-nav-label {
        justify-content: flex-start;
    }

    .cta-box {
        padding: 48px 24px;
    }
    .cta-actions {
        flex-direction: column;
        align-items: center;
    }

    /* No Results Mobile */
    .no-results.not-found {
        padding: 40px 16px;
    }
    .no-results-icon {
        width: 80px;
        height: 80px;
    }
    .no-results-title {
        font-size: 1.5rem;
    }
    .no-results-description {
        font-size: 0.9rem;
    }
    .no-results-search .search-field {
        padding: 12px 48px 12px 16px;
        font-size: 0.9rem;
    }
    .no-results-actions {
        flex-direction: column;
    }
}
