/* ==========================================================================
   DEVELOPER HUB THEME - Modern Flat Design
   ========================================================================== */

:root {
    --font-heading: 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    --bg: #0c1222;
    --bg-alt: #111827;
    --bg-card: #1e293b;
    --bg-hover: #334155;
    
    --text: #f9fafb;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    
    --border: #1e293b;
    --accent: #6b7280;
    
    --header-h: 64px;
}

[data-theme="light"] {
    --bg: #ffffff;
    --bg-alt: #f9fafb;
    --bg-card: #f3f4f6;
    --bg-hover: #e5e7eb;
    --text: #111827;
    --text-secondary: #4b5563;
    --text-muted: #9ca3af;
    --border: #e5e7eb;
}

/* Performance optimizations */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; overflow-x: hidden; }
body { font-family: var(--font-body); background: var(--bg); color: var(--text); line-height: 1.6; text-rendering: optimizeSpeed; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* CLS Prevention - Reserve space for images */
.hero-large-img,
.hero-medium-img,
.news-img,
.post-card-img,
.about-article-img {
    aspect-ratio: 16/9;
    background: var(--bg-alt);
    overflow: hidden;
}

.hero-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

/* Content visibility for below-the-fold sections */
.news-section:nth-of-type(n+3),
.related-posts,
.site-footer {
    content-visibility: auto;
    contain-intrinsic-size: auto 500px;
}

/* GPU acceleration for animations */
.hero-large-img img,
.nav-dropdown,
.mobile-menu {
    will-change: transform;
    transform: translateZ(0);
}
button { font: inherit; cursor: pointer; background: none; border: none; color: inherit; }
ul { list-style: none; }

/* Screen reader only - visually hidden but accessible */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ==========================================================================
   HEADER - CENTERED NAVBAR
   ========================================================================== */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-h);
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    z-index: 100;
}

.header-wrap {
    max-width: 1400px;
    height: 100%;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-logo {
    font-size: 1.25rem;
    font-weight: 700;
    flex-shrink: 0;
}
.site-logo img { height: 32px; width: auto; }

/* Main Navigation - CENTERED */
.main-nav {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}
.main-nav > ul {
    display: flex;
    align-items: center;
    gap: 4px;
}
.main-nav > ul > li { position: relative; }
.main-nav > ul > li > a {
    display: block;
    padding: 8px 14px;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color 0.15s;
}
.main-nav > ul > li > a:hover { color: var(--text); }

/* Dropdown */
.main-nav > ul > li.nav-has-child > a {
    display: flex;
    align-items: center;
    gap: 4px;
}
.main-nav > ul > li.nav-has-child > a::after {
    content: '';
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid currentColor;
}

.main-nav .nav-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 180px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 6px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
}
.main-nav > ul > li.nav-has-child:hover .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.main-nav .nav-dropdown a {
    display: block;
    padding: 8px 16px;
    font-size: 0.875rem;
    color: var(--text-secondary);
    transition: background 0.1s, color 0.1s;
}
.main-nav .nav-dropdown a:hover {
    background: var(--bg-hover);
    color: var(--text);
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}
.header-actions button {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: color 0.15s;
}
.header-actions button:hover { color: var(--text); }

/* Member button */
.header-signin-btn {
    padding: 8px 16px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 6px;
    transition: opacity 0.2s, transform 0.2s;
}
.header-signin-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.header-member-btn {
    display: flex;
    align-items: center;
    justify-content: center;
}

.member-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
    transition: border-color 0.2s;
}
.header-member-btn:hover .member-avatar {
    border-color: #6366f1;
}

.member-avatar-placeholder {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
}

@media (max-width: 600px) {
    .header-signin-btn {
        padding: 6px 12px;
        font-size: 0.8125rem;
    }
    .member-avatar,
    .member-avatar-placeholder {
        width: 32px;
        height: 32px;
    }
}

.theme-toggle .moon { display: none; }
[data-theme="dark"] .theme-toggle .sun { display: none; }
[data-theme="dark"] .theme-toggle .moon { display: block; }

.menu-toggle { 
    display: none !important; 
}

@media (max-width: 768px) {
    .main-nav { display: none !important; }
    .menu-toggle { display: flex !important; }
}

/* ==========================================================================
   MOBILE MENU (Improved)
   ========================================================================== */

.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s, visibility 0.25s;
}
.mobile-menu-overlay.active { opacity: 1; visibility: visible; }

.mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 320px;
    max-width: 90vw;
    background: var(--bg);
    z-index: 201;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
}
.mobile-menu.active { transform: translateX(0); }

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-alt);
}
.mobile-menu-title { 
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--text);
}
.mobile-menu-close { 
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    line-height: 1;
    color: var(--text-muted);
    background: var(--bg);
    border-radius: 8px;
    transition: background 0.15s, color 0.15s;
}
.mobile-menu-close:hover {
    background: var(--bg-hover);
    color: var(--text);
}

.mobile-nav { 
    flex: 1;
    overflow-y: auto;
    padding: 16px 0;
}
.mobile-nav > ul > li { 
    margin: 0 16px;
}
.mobile-nav > ul > li > a {
    display: flex;
    align-items: center;
    padding: 14px 12px;
    font-weight: 500;
    font-size: 1rem;
    color: var(--text-secondary);
    border-radius: 8px;
    transition: background 0.15s, color 0.15s;
}
.mobile-nav > ul > li > a:hover {
    background: var(--bg-alt);
    color: var(--text);
}

.mobile-nav > ul > li.nav-has-child > a {
    justify-content: space-between;
}
.mobile-nav > ul > li.nav-has-child > a::after {
    content: '';
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--text-muted);
    border-bottom: 2px solid var(--text-muted);
    transform: rotate(45deg);
    transition: transform 0.2s;
}
.mobile-nav > ul > li.nav-has-child.open > a::after { 
    transform: rotate(-135deg);
}

.mobile-nav .nav-dropdown {
    display: none;
    margin: 4px 0 8px;
    padding: 8px 0;
    background: var(--bg-alt);
    border-radius: 8px;
}
.mobile-nav > ul > li.nav-has-child.open .nav-dropdown { display: block; }
.mobile-nav .nav-dropdown a {
    display: block;
    padding: 10px 16px 10px 24px;
    font-size: 0.9375rem;
    color: var(--text-muted);
    transition: color 0.15s, padding-left 0.15s;
}
.mobile-nav .nav-dropdown a:hover { 
    color: var(--text);
    padding-left: 28px;
}

/* Mobile menu footer */
.mobile-menu-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    background: var(--bg-alt);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Mobile signin button */
.mobile-signin-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 20px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #fff;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: 8px;
    transition: opacity 0.2s;
}
.mobile-signin-btn:hover {
    opacity: 0.9;
}

/* Mobile member link */
.mobile-member-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.mobile-member-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.mobile-member-avatar-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
}

.mobile-member-name {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text);
}

.mobile-menu-footer .theme-toggle-mobile {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
}
.mobile-menu-footer .theme-toggle-mobile span {
    font-size: 0.875rem;
    color: var(--text-secondary);
}
.mobile-menu-footer .theme-toggle-mobile button {
    width: 44px;
    height: 24px;
    background: var(--border);
    border-radius: 12px;
    position: relative;
    transition: background 0.2s;
}
.mobile-menu-footer .theme-toggle-mobile button::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: var(--text);
    border-radius: 50%;
    transition: transform 0.2s;
}
[data-theme="dark"] .mobile-menu-footer .theme-toggle-mobile button::after {
    transform: translateX(20px);
}

/* ==========================================================================
   MAIN
   ========================================================================== */

main { padding-top: var(--header-h); min-height: calc(100vh - 300px); }

/* ==========================================================================
   HERO SECTION (2 Medium Left + 1 Large Center + Latest News Right)
   ========================================================================== */

.hero-section {
    padding: 32px 24px 48px;
    background: var(--bg);
}

.hero-wrap {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 280px 1fr 280px;
    gap: 24px;
    align-items: start;
}

@media (max-width: 1100px) {
    .hero-wrap {
        grid-template-columns: 1fr 260px;
    }
    .hero-left { display: none; }
}

@media (max-width: 768px) {
    .hero-wrap {
        grid-template-columns: 1fr;
    }
    .hero-right { display: none; }
}

/* Hero Left - 2 Medium Articles */
.hero-left {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.hero-medium { }
.hero-medium a { display: block; }
.hero-medium-img {
    aspect-ratio: 16/10;
    overflow: hidden;
    margin-bottom: 10px;
}
.hero-medium-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.hero-medium:hover .hero-medium-img img {
    transform: scale(1.03);
}
.hero-medium-content { }
.hero-cat {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 6px;
}
.hero-medium-content h3 {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: 6px;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.hero-meta {
    font-size: 0.6875rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}
.hero-author {
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.hero-sep { opacity: 0.5; }

/* Hero Center - Large Featured */
.hero-center { }
.hero-large { }
.hero-large a { display: block; }
.hero-large-img {
    aspect-ratio: 4/3;
    overflow: hidden;
    margin-bottom: 16px;
}
.hero-large-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.hero-large:hover .hero-large-img img {
    transform: scale(1.02);
}
.hero-large-content { }
.hero-large-content h2 {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 12px;
    color: var(--text);
}
@media (max-width: 600px) {
    .hero-large-content h2 { font-size: 1.375rem; }
}
.hero-excerpt {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.55;
    margin-bottom: 16px;
}
.hero-meta-avatar {
    display: flex;
    align-items: center;
    gap: 10px;
}
.hero-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

/* Hero Right - Latest News List */
.hero-right {
    background: var(--bg-alt);
    border: 1px solid var(--border);
}

.latest-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
}
.latest-header span {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text);
}
.latest-header a {
    font-size: 1rem;
    color: var(--text-muted);
    transition: color 0.15s;
}
.latest-header a:hover { color: var(--text); }

.latest-list { }

.latest-item {
    border-bottom: 1px solid var(--border);
}
.latest-item:last-child { border-bottom: none; }
.latest-item a {
    display: block;
    padding: 14px 16px;
    transition: background 0.15s;
}
.latest-item a:hover {
    background: var(--bg-hover);
}
.latest-cat {
    display: inline-block;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 6px;
}
.latest-item h4 {
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: 8px;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.latest-meta {
    font-size: 0.6875rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ==========================================================================
   QUICK GUIDES SECTION
   ========================================================================== */

.quick-guides-section {
    padding: 48px 24px;
    background: var(--bg-alt);
}

.quick-guides-section .section-header .section-line {
    background: #10b981;
}

.quick-guides-section .view-all {
    background: #10b981;
}

.quick-guides-wrap {
    max-width: 1200px;
    margin: 0 auto;
}

.quick-guides-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

@media (max-width: 1000px) {
    .quick-guides-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 750px) {
    .quick-guides-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 450px) {
    .quick-guides-grid { grid-template-columns: 1fr; }
}

/* Guide Card */
.guide-card {
    background: var(--bg);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: border-color 0.2s, transform 0.2s;
}
.guide-card:hover {
    border-color: var(--text-muted);
    transform: translateY(-4px);
}
.guide-card a { display: block; }

.guide-card-img {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
}
.guide-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.guide-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 4px 8px;
    font-size: 0.5625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #fff;
    background: var(--accent, #10b981);
    border-radius: 2px;
}

.guide-card-content {
    padding: 14px;
}
.guide-cat {
    display: inline-block;
    font-size: 0.5625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 6px;
}
.guide-card-content h3 {
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: 8px;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.guide-meta {
    font-size: 0.6875rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}
.guide-time {
    display: flex;
    align-items: center;
    gap: 4px;
}
.guide-time::before {
    content: '';
    width: 12px;
    height: 12px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%236b7280' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 6v6l4 2'/%3E%3C/svg%3E");
    background-size: contain;
}

/* ==========================================================================
   TAGS SECTION - PILLS (Justified 2 lines)
   ========================================================================== */

.tags-section { 
    padding: 48px 24px; 
    background: var(--bg-alt); 
}

.tags-wrap { max-width: 1200px; margin: 0 auto; }

.section-title {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.tag-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: var(--bg);
    border: 1px solid var(--border);
    font-size: 0.875rem;
    font-weight: 500;
    transition: border-color 0.15s, transform 0.15s;
}
.tag-pill:hover {
    border-color: var(--tag-color, var(--text-muted));
    transform: translateY(-2px);
}

.tag-dot {
    width: 8px;
    height: 8px;
    flex-shrink: 0;
    background: var(--text-muted);
}

.tag-name { }

/* ==========================================================================
   TAG PAGE - FEATURED ROW
   ========================================================================== */

.tag-featured {
    padding: 32px 24px 48px;
    background: var(--bg);
}

.tag-featured-wrap {
    max-width: 1200px;
    margin: 0 auto;
}

.featured-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}
@media (max-width: 1100px) { .featured-row { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 900px) { .featured-row { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) { .featured-row { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 400px) { .featured-row { grid-template-columns: 1fr; } }

.featured-card-small {
    background: var(--bg-card);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: border-color 0.15s, transform 0.15s;
}
.featured-card-small:hover {
    border-color: var(--text-muted);
    transform: translateY(-3px);
}
.featured-card-small a { display: block; }

.featured-card-img {
    aspect-ratio: 16/10;
    overflow: hidden;
}
.featured-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-card-content {
    padding: 12px;
}
.featured-card-content h3 {
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.featured-card-content time {
    font-size: 0.6875rem;
    color: var(--text-muted);
}

/* ==========================================================================
   NEWS SECTION LAYOUT (Large + Medium + Small list)
   ========================================================================== */

.news-section {
    padding: 48px 24px;
    background: var(--bg);
}

.news-section.alt {
    background: var(--bg-alt);
}

.news-section-wrap {
    max-width: 1200px;
    margin: 0 auto;
}

/* Section Header */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.section-header h2 {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
}

.section-line {
    flex: 1;
    height: 3px;
    background: var(--border);
    max-width: 100px;
}

.view-all {
    padding: 8px 16px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #fff;
    background: var(--text-muted);
    transition: opacity 0.15s;
}
.view-all:hover { opacity: 0.85; }

/* News Grid - 3 columns */
.news-grid {
    display: grid;
    grid-template-columns: 1fr 240px 280px;
    gap: 20px;
    align-items: start;
}
@media (max-width: 1100px) {
    .news-grid { grid-template-columns: 1fr 220px; }
    .news-small-col { display: none; }
}
@media (max-width: 768px) {
    .news-grid { grid-template-columns: 1fr; }
    .news-medium-col { display: none; }
}

/* Large Article (Left) */
.news-large { }
.news-large a { display: block; }
.news-large-img {
    aspect-ratio: 16/10;
    overflow: hidden;
    margin-bottom: 16px;
}
.news-large-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.news-large:hover .news-large-img img {
    transform: scale(1.03);
}
.news-large-content h3 {
    font-size: 1.375rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 12px;
    color: var(--text);
}
.news-large-content p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 12px;
}

/* Medium Articles (Middle) - Compact */
.news-medium-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.news-medium { }
.news-medium a { display: block; }
.news-medium-img {
    aspect-ratio: 16/9;
    overflow: hidden;
    margin-bottom: 10px;
}
.news-medium-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.news-medium:hover .news-medium-img img {
    transform: scale(1.03);
}
.news-medium-content h4 {
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 6px;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.news-medium-content p {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Small Articles List (Right) */
.news-small-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.news-small { }
.news-small a {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}
.news-small:hover .news-small-content h5 {
    color: var(--text);
}
.news-small-img {
    width: 80px;
    height: 55px;
    flex-shrink: 0;
    overflow: hidden;
}
.news-small-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.news-small-content {
    flex: 1;
    min-width: 0;
}
.news-small-content h5 {
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: 6px;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.15s;
}

/* News Meta */
.news-meta {
    font-size: 0.6875rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}
.news-author {
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* ==========================================================================
   POSTS GRID (for tag/author pages)
   ========================================================================== */

.posts-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
@media (max-width: 1100px) { .posts-grid-4 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 800px) { .posts-grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .posts-grid-4 { grid-template-columns: 1fr; } }

/* Card with title overlay */
.card-overlay {
    background: var(--bg-card);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: border-color 0.2s, transform 0.2s;
}
.card-overlay:hover {
    border-color: var(--text-muted);
    transform: translateY(-4px);
}
.card-overlay a { display: block; }

.card-img {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
}
.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.card-img-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.2) 60%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 16px;
}
.card-cat {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 10px;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #fff;
    background: var(--tag-color, var(--text-muted));
    letter-spacing: 0.5px;
}
.card-img-overlay h3 {
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.3;
    color: #fff;
}

.card-bottom { padding: 16px; }
.card-excerpt {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.card-meta { font-size: 0.6875rem; color: var(--text-muted); }

/* ==========================================================================
   NEWSLETTER
   ========================================================================== */

.newsletter-bar {
    background: var(--bg-alt);
    padding: 64px 24px;
    text-align: center;
}
.newsletter-wrap { max-width: 480px; margin: 0 auto; }
.newsletter-wrap h2 { font-size: 1.25rem; font-weight: 700; margin-bottom: 8px; }
.newsletter-desc { color: var(--text-secondary); font-size: 0.9375rem; margin-bottom: 24px; }
.newsletter-wrap form { display: flex; gap: 8px; }
@media (max-width: 500px) { .newsletter-wrap form { flex-direction: column; } }
.newsletter-wrap input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    font-size: 0.9375rem;
}
.newsletter-wrap input:focus { outline: none; border-color: var(--text-muted); }
.newsletter-wrap button {
    padding: 12px 24px;
    background: var(--text);
    color: var(--bg);
    font-weight: 600;
    transition: opacity 0.15s;
}
.newsletter-wrap button:hover { opacity: 0.9; }

/* Accessibility */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ==========================================================================
   CATEGORY SECTIONS
   ========================================================================== */

.category-sections { padding: 48px 24px; max-width: 1200px; margin: 0 auto; }

.cat-section { margin-bottom: 48px; }
.cat-section:last-child { margin-bottom: 0; }

.cat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}
.cat-header h2 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.cat-header a { font-size: 0.8125rem; font-weight: 500; color: var(--text-muted); transition: color 0.15s; }
.cat-header a:hover { color: var(--text); }

.accent-bar { width: 4px; height: 20px; background: var(--text-muted); }

/* ==========================================================================
   TAG PAGE - HERO (Image Left, Content Right)
   ========================================================================== */

.tag-hero {
    padding: 48px 24px;
    background: var(--bg-alt);
}

.tag-hero-inner {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
    align-items: center;
}
@media (max-width: 800px) {
    .tag-hero-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

.tag-hero-image {
    aspect-ratio: 1;
    overflow: hidden;
}
.tag-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
@media (max-width: 800px) {
    .tag-hero-image {
        max-width: 200px;
        margin: 0 auto;
    }
}

.tag-hero-content { }

.tag-accent-bar {
    display: inline-block;
    width: 40px;
    height: 4px;
    background: var(--text-muted);
    margin-bottom: 16px;
}
@media (max-width: 800px) {
    .tag-accent-bar { margin-left: auto; margin-right: auto; }
}

.tag-hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 16px;
}
@media (max-width: 600px) { .tag-hero h1 { font-size: 1.75rem; } }

.tag-description {
    font-size: 1.0625rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 20px;
}

.tag-count {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Tag Posts */
.tag-posts { padding: 48px 24px; }
.tag-posts-wrap { max-width: 1200px; margin: 0 auto; }
.tag-posts .section-title { margin-bottom: 24px; }

.posts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
@media (max-width: 1100px) { .posts-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 800px) { .posts-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .posts-grid { grid-template-columns: 1fr; } }

.pagination { display: flex; justify-content: center; gap: 12px; padding: 32px 0 0; }
.pagination a { 
    padding: 10px 20px; 
    background: var(--bg-card); 
    border: 1px solid var(--border); 
    font-size: 0.875rem; 
    font-weight: 500; 
    transition: border-color 0.15s, transform 0.15s; 
}
.pagination a:hover { 
    border-color: var(--text-muted); 
    transform: translateY(-2px);
}

/* ==========================================================================
   POST PAGE
   ========================================================================== */

.post-single { padding-bottom: 64px; }

.post-header { max-width: 800px; margin: 0 auto; padding: 48px 24px 32px; text-align: center; }
@media (max-width: 600px) { .post-header { padding: 32px 16px 24px; } }

.post-tags { margin-bottom: 16px; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.post-tag {
    display: inline-block;
    padding: 6px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-secondary);
    transition: border-color 0.15s, color 0.15s;
}
.post-tag:hover { border-color: var(--text-muted); color: var(--text); }

.post-title { font-size: 2.25rem; font-weight: 700; line-height: 1.2; margin-bottom: 16px; }
@media (max-width: 768px) { .post-title { font-size: 1.75rem; } }
@media (max-width: 480px) { .post-title { font-size: 1.5rem; } }
.post-meta { color: var(--text-secondary); font-size: 0.9375rem; }
.post-meta span { margin: 0 8px; }
@media (max-width: 480px) { 
    .post-meta { font-size: 0.8125rem; }
    .post-meta span { margin: 0 4px; }
}
.post-meta a { color: var(--text); }

.post-feature-image { max-width: 1000px; margin: 0 auto 40px; padding: 0 24px; }
@media (max-width: 600px) { 
    .post-feature-image { 
        padding: 0 16px; 
        margin-bottom: 24px;
    } 
}
.post-feature-image img { width: 100%; height: auto; }

/* Post Layout */
.post-layout {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr) 50px;
    gap: 40px;
}
@media (max-width: 1100px) {
    .post-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
        padding: 0 16px;
    }
}

/* TOC */
.post-toc { }
@media (max-width: 1100px) { .post-toc { display: none; } }
.toc-container { position: sticky; top: calc(var(--header-h) + 24px); }
.toc-header { font-size: 0.625rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--text-muted); margin-bottom: 12px; }
.toc-nav { max-height: calc(100vh - 200px); overflow-y: auto; }
.toc-list { }
.toc-item { margin-bottom: 2px; }
.toc-item.h3 { padding-left: 12px; }
.toc-link { display: block; padding: 6px 10px; font-size: 0.8125rem; color: var(--text-muted); border-left: 2px solid transparent; transition: color 0.1s, border-color 0.1s; }
.toc-link:hover { color: var(--text-secondary); }
.toc-link.active { color: var(--text); border-left-color: var(--text); }

.toc-progress { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.progress-bar { height: 3px; background: var(--border); margin-bottom: 6px; }
.progress-fill { height: 100%; background: var(--text-muted); width: 0%; transition: width 0.1s; }
.progress-text { font-size: 0.625rem; color: var(--text-muted); }

/* Mobile TOC */
.mobile-toc { display: none; background: var(--bg-alt); border: 1px solid var(--border); margin-bottom: 24px; }
@media (max-width: 1100px) { .mobile-toc { display: block; } }
.mobile-toc-toggle { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 14px 16px; font-size: 0.75rem; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; }
.mobile-toc-toggle::after { content: '+'; font-size: 16px; }
.mobile-toc.open .mobile-toc-toggle::after { content: '−'; }
.mobile-toc-content { display: none; padding: 0 16px 16px; }
.mobile-toc.open .mobile-toc-content { display: block; }

/* Share */
.post-share { }
@media (max-width: 1100px) { .post-share { display: none; } }
.share-sticky { position: sticky; top: calc(var(--header-h) + 24px); display: flex; flex-direction: column; gap: 6px; }
.share-btn { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--border); color: var(--text-muted); transition: color 0.15s, border-color 0.15s; }
.share-btn:hover { color: var(--text); border-color: var(--text-muted); }

/* Post Content */
.post-content-wrap { max-width: 680px; width: 100%; min-width: 0; }
.post-content { font-size: 1.0625rem; line-height: 1.8; color: var(--text-secondary); overflow-wrap: break-word; word-wrap: break-word; }
.post-content > * + * { margin-top: 1.5em; }
.post-content h2 { font-size: 1.5rem; font-weight: 700; color: var(--text); margin-top: 2.5em; }
.post-content h3 { font-size: 1.25rem; font-weight: 600; color: var(--text); margin-top: 2em; }
.post-content a { color: var(--text); text-decoration: underline; }
.post-content blockquote { padding: 16px 20px; border-left: 3px solid var(--text-muted); background: var(--bg-alt); font-style: italic; }
.post-content pre { background: #0d1117; border: 1px solid var(--border); padding: 20px; overflow-x: auto; font-size: 0.875rem; font-family: var(--font-mono); }
.post-content code { font-family: var(--font-mono); background: var(--bg-alt); padding: 2px 6px; font-size: 0.9em; }
.post-content pre code { background: none; padding: 0; }
.post-content ul, .post-content ol { 
    padding-left: 1.5em; 
    margin: 1em 0;
}
.post-content ul {
    list-style-type: disc;
}
.post-content ol {
    list-style-type: decimal;
}
.post-content li {
    margin-bottom: 0.5em;
    padding-left: 0.25em;
}
.post-content li::marker {
    color: var(--text-muted);
}

/* ==========================================================================
   QUICK GUIDE POST STYLING (with #quick-guides tag)
   ========================================================================== */

/* Guide header badge */
.post-guide .post-header::after {
    content: 'Step-by-Step Guide';
    display: inline-block;
    margin-top: 12px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 4px;
}

/* Section Headers (H2) */
.post-guide .post-content h2 {
    font-size: 1.375rem;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border);
    margin-top: 3em;
    margin-bottom: 1.5em;
}

/* Step Cards - Applied by JavaScript to H3s that are steps */
.post-guide .step-card {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-left: 4px solid #10b981;
    border-radius: 0 8px 8px 0;
    padding: 20px 24px;
    margin: 2em 0;
}

.post-guide .step-card .step-number {
    display: inline-block;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #10b981;
    margin-bottom: 8px;
}

.post-guide .step-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 16px 0;
    padding: 0;
}

.post-guide .step-card .step-content {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
}

.post-guide .step-card .step-content > * + * {
    margin-top: 1em;
}

/* Non-step H3s (Troubleshooting items, etc.) */
.post-guide .post-content h3:not(.in-step-card):not(.in-trouble-card) {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text);
    margin-top: 2em;
    margin-bottom: 0.75em;
    padding-left: 0;
}

/* Troubleshooting Cards */
.post-guide .trouble-card {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px 24px;
    margin: 1.5em 0;
}

.post-guide .trouble-card .trouble-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}

.post-guide .trouble-card .trouble-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.post-guide .trouble-card .trouble-icon::before {
    content: '!';
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
}

.post-guide .trouble-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin: 0;
    padding: 0;
    line-height: 1.4;
    padding-top: 4px;
}

.post-guide .trouble-card .trouble-content {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.6;
}

.post-guide .trouble-card .trouble-content > * + * {
    margin-top: 0.75em;
}

.post-guide .trouble-card .trouble-label {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 8px;
    border-radius: 3px;
    margin-right: 6px;
}

.post-guide .trouble-card .trouble-label.symptom {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.post-guide .trouble-card .trouble-label.diagnosis {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.post-guide .trouble-card .trouble-label.resolution {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

/* Code blocks in guides */
.post-guide .post-content pre {
    position: relative;
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 8px;
    padding: 36px 20px 20px;
    margin: 1.25em 0;
    overflow-x: auto;
}

.post-guide .post-content pre::before {
    content: 'PowerShell';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 6px 16px;
    background: #161b22;
    border-bottom: 1px solid #30363d;
    color: #8b949e;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 8px 8px 0 0;
}

.post-guide .post-content pre code {
    display: block;
    color: #c9d1d9;
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Lists in guides */
.post-guide .post-content ul li {
    position: relative;
    margin-bottom: 0.5em;
}

.post-guide .post-content ul li::marker {
    color: #10b981;
}

/* Bold text styling for labels like "Symptom:", "Diagnosis:" */
.post-guide .post-content strong {
    color: var(--text);
}

/* Horizontal rules */
.post-guide .post-content hr {
    margin: 2.5em 0;
    border: none;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--border), transparent);
}

/* Blockquotes for tips */
.post-guide .post-content blockquote {
    background: rgba(16, 185, 129, 0.08);
    border-left: 3px solid #10b981;
    padding: 16px 20px;
    border-radius: 0 8px 8px 0;
    font-style: normal;
}

.post-guide .post-content blockquote strong:first-child {
    color: #10b981;
}

/* Table Responsive */
.post-content figure.kg-card { margin: 0; }
.post-content .kg-card { max-width: 100%; }
.post-content table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    margin: 1.5em 0;
}
.post-content th,
.post-content td {
    padding: 12px 16px;
    border: 1px solid var(--border);
    text-align: left;
}
.post-content th {
    background: var(--bg-alt);
    font-weight: 600;
    color: var(--text);
}
.post-content tr:nth-child(even) {
    background: var(--bg-alt);
}

/* Table container for horizontal scroll on mobile */
.post-content .table-wrapper,
.post-content figure.kg-card {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1.5em 0;
}

@media (max-width: 700px) {
    .post-content table {
        font-size: 0.8125rem;
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    .post-content th,
    .post-content td {
        padding: 10px 12px;
    }
}

/* Images responsive */
.post-content img {
    max-width: 100%;
    height: auto;
}
.post-content .kg-image-card img,
.post-content .kg-gallery-image img {
    display: block;
    margin: 0 auto;
}

/* You Might Also Like - 4 columns flat design */
.also-like-container {
    max-width: 1000px;
    margin: 0 auto 40px;
    padding: 0 24px;
}

@media (max-width: 700px) {
    .also-like-container {
        padding: 0 16px;
    }
}

.also-like-section {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    padding: 24px;
}

@media (max-width: 500px) {
    .also-like-section {
        padding: 16px;
    }
}

.also-like-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.also-like-bar {
    width: 4px;
    height: 16px;
    background: var(--text-muted);
}

.also-like-label {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.also-like-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
@media (max-width: 1000px) {
    .also-like-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 550px) {
    .also-like-grid { grid-template-columns: 1fr; gap: 12px; }
}

.also-like-card {
    display: block;
    background: var(--bg);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: border-color 0.15s, transform 0.15s;
}

.also-like-card:hover {
    border-color: var(--text-muted);
    transform: translateY(-2px);
}

.also-like-img {
    aspect-ratio: 16/10;
    overflow: hidden;
}

.also-like-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.also-like-content {
    padding: 12px;
}

.also-like-content h4 {
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: 6px;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.also-like-content span {
    font-size: 0.6875rem;
    color: var(--text-muted);
}

/* Author Box - Improved */
.author-box { 
    margin-top: 48px; 
    padding: 28px; 
    background: var(--bg-alt); 
    border: 1px solid var(--border); 
    border-radius: 12px;
    display: flex; 
    gap: 24px; 
}
@media (max-width: 600px) { 
    .author-box { 
        flex-direction: column; 
        text-align: center; 
        padding: 24px 20px;
        margin-top: 32px;
    } 
}

.author-avatar-link {
    flex-shrink: 0;
}

.author-avatar { 
    width: 80px; 
    height: 80px; 
    overflow: hidden; 
    border-radius: 50%; 
    border: 3px solid var(--border);
    transition: border-color 0.2s;
}
.author-avatar-link:hover .author-avatar {
    border-color: var(--text-muted);
}

.author-avatar-placeholder {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}
.author-avatar-placeholder span {
    color: #fff;
    font-size: 1.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

@media (max-width: 600px) { 
    .author-avatar-link {
        margin: 0 auto;
    }
    .author-avatar { 
        width: 72px;
        height: 72px;
    } 
}
.author-avatar img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
}
.author-info { 
    flex: 1; 
    min-width: 0; 
}
.author-label { 
    font-size: 0.625rem; 
    font-weight: 700; 
    text-transform: uppercase; 
    letter-spacing: 0.5px; 
    color: var(--text-muted); 
    margin-bottom: 4px; 
}
.author-name-link {
    display: inline-block;
}
.author-name { 
    font-size: 1.25rem; 
    font-weight: 700; 
    margin-bottom: 10px;
    color: var(--text);
    transition: color 0.15s;
}
.author-name-link:hover .author-name {
    color: var(--text-secondary);
}
.author-bio { 
    color: var(--text-secondary); 
    font-size: 0.9375rem; 
    margin-bottom: 16px; 
    line-height: 1.55; 
}
@media (max-width: 600px) { 
    .author-bio { font-size: 0.875rem; } 
}
.author-links { 
    display: flex; 
    gap: 8px; 
}
@media (max-width: 600px) { .author-links { justify-content: center; } }
.author-links a { 
    width: 36px; 
    height: 36px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    border: 1px solid var(--border); 
    border-radius: 8px;
    color: var(--text-muted); 
    transition: all 0.2s; 
}
.author-links a:hover { 
    color: var(--text); 
    border-color: var(--text-muted); 
    background: var(--bg);
}

/* LinkedIn specific color on hover */
.author-links a[title="LinkedIn"]:hover {
    color: #0077b5;
    border-color: #0077b5;
}

/* Hide LinkedIn by default, shown by JS if detected */
.author-links a[data-linkedin-detect] {
    display: none;
}
.author-links a[data-linkedin-detect].visible {
    display: flex;
}

/* Related Posts */
.related-posts { background: var(--bg-alt); padding: 64px 24px; border-top: 1px solid var(--border); }
@media (max-width: 600px) { 
    .related-posts { padding: 40px 16px; } 
}
.related-wrap { max-width: 1200px; margin: 0 auto; }
.related-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}
.related-header h2 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}
.related-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 1000px) { .related-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 550px) { .related-grid { grid-template-columns: 1fr; gap: 16px; } }
@media (max-width: 600px) { .related-grid { grid-template-columns: 1fr; } }

/* Related Posts for Guides - Green accent */
.post-guide ~ .related-posts .accent-bar,
.related-posts.guide-related .accent-bar {
    background: #10b981;
}

.post-guide ~ .related-posts .card-cat,
.related-posts.guide-related .card-cat {
    background: #10b981 !important;
}

/* ==========================================================================
   AUTHOR PAGE
   ========================================================================== */

.author-hero {
    padding: 80px 24px;
    background: var(--bg-alt);
    text-align: center;
}

.author-hero-content {
    max-width: 600px;
    margin: 0 auto;
}

.author-avatar-large {
    width: 120px;
    height: 120px;
    margin: 0 auto 24px;
    overflow: hidden;
}
.author-avatar-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-hero h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.author-bio-text {
    color: var(--text-secondary);
    font-size: 1.0625rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

.author-social {
    display: flex;
    justify-content: center;
    gap: 8px;
}
.author-social a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    color: var(--text-muted);
    transition: color 0.15s, border-color 0.15s;
}
.author-social a:hover {
    color: var(--text);
    border-color: var(--text-muted);
}

.page-header { padding: 64px 24px; text-align: center; background: var(--bg-alt); }
.page-header h1 { font-size: 2rem; font-weight: 700; margin-bottom: 12px; }
.page-header p { color: var(--text-secondary); max-width: 560px; margin: 0 auto; }
.page-header .meta { margin-top: 16px; color: var(--text-muted); font-size: 0.875rem; }

.page-header.author-header .author-avatar.large { width: 100px; height: 100px; margin: 0 auto 20px; overflow: hidden; }
.page-header.author-header .author-avatar.large img { width: 100%; height: 100%; object-fit: cover; }

/* ==========================================================================
   FOOTER - 4 COLUMNS
   ========================================================================== */

.site-footer { background: var(--bg-alt); border-top: 1px solid var(--border); }

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 64px 24px 40px;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 48px;
}
@media (max-width: 900px) {
    .footer-inner { grid-template-columns: 1fr 1fr; gap: 40px; }
}
@media (max-width: 600px) {
    .footer-inner { 
        grid-template-columns: 1fr 1fr; 
        gap: 24px 16px; 
        padding: 40px 20px 32px;
    }
    .footer-inner > .footer-brand {
        grid-column: 1 / -1;
        text-align: center;
        padding-bottom: 16px;
        border-bottom: 1px solid var(--border);
        margin-bottom: 8px;
    }
}

/* Footer Brand (first column) */
.footer-brand { }
.footer-logo { font-size: 1.25rem; font-weight: 700; margin-bottom: 12px; }
.footer-desc { color: var(--text-secondary); max-width: 280px; margin-bottom: 20px; font-size: 0.9375rem; line-height: 1.5; }
@media (max-width: 600px) { 
    .footer-desc { 
        max-width: none; 
        font-size: 0.875rem;
        margin-bottom: 16px;
    } 
}

.footer-social { display: flex; gap: 8px; }
@media (max-width: 600px) { .footer-social { justify-content: center; } }
.footer-social a { 
    width: 36px; 
    height: 36px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    border: 1px solid var(--border); 
    border-radius: 8px;
    color: var(--text-muted); 
    transition: all 0.15s; 
}
.footer-social a:hover { color: var(--text); border-color: var(--text-muted); background: var(--bg); }

/* Footer Columns */
.footer-col { }
.footer-col h4 { 
    font-size: 0.625rem; 
    font-weight: 700; 
    letter-spacing: 1px; 
    text-transform: uppercase; 
    color: var(--text-muted); 
    margin-bottom: 16px; 
}
@media (max-width: 600px) {
    .footer-col h4 {
        font-size: 0.6875rem;
        margin-bottom: 12px;
    }
}
.footer-col ul { }
.footer-col li { margin-bottom: 10px; }
@media (max-width: 600px) { .footer-col li { margin-bottom: 8px; } }
.footer-col a { color: var(--text-secondary); font-size: 0.875rem; transition: color 0.15s; }
@media (max-width: 600px) { .footer-col a { font-size: 0.8125rem; } }
.footer-col a:hover { color: var(--text); }

/* Latest Posts in Footer (no thumbnail) */
.footer-posts-list {
    list-style: none;
}
.footer-posts-list li {
    margin-bottom: 12px;
}
@media (max-width: 600px) { .footer-posts-list li { margin-bottom: 10px; } }
.footer-post-link {
    display: block;
}
.footer-post-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.4;
    color: var(--text-secondary);
    transition: color 0.15s;
    margin-bottom: 2px;
}
@media (max-width: 600px) { 
    .footer-post-title { 
        font-size: 0.75rem; 
        -webkit-line-clamp: 2;
    } 
}
.footer-post-link:hover .footer-post-title {
    color: var(--text);
}
.footer-post-link time {
    font-size: 0.6875rem;
    color: var(--text-muted);
}
@media (max-width: 600px) { .footer-post-link time { font-size: 0.625rem; } }

/* Popular Tags in Footer */
.footer-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
@media (max-width: 600px) { 
    .footer-tags { 
        gap: 6px; 
    }
    .footer-col:last-child {
        grid-column: 1 / -1;
        padding-top: 16px;
        border-top: 1px solid var(--border);
        margin-top: 8px;
    }
    .footer-col:last-child h4 {
        text-align: center;
    }
    .footer-col:last-child .footer-tags {
        justify-content: center;
    }
}
.footer-tag {
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: 500;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-secondary);
    transition: border-color 0.15s, color 0.15s;
}
@media (max-width: 600px) { 
    .footer-tag { 
        padding: 5px 10px; 
        font-size: 0.6875rem; 
    } 
}
.footer-tag:hover {
    border-color: var(--text-muted);
    color: var(--text);
}

.footer-nav h4 { font-size: 0.625rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 16px; }
.footer-nav ul { }
.footer-nav li { margin-bottom: 10px; }
.footer-nav a { color: var(--text-muted); font-size: 0.875rem; transition: color 0.15s; }
.footer-nav a:hover { color: var(--text); }

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 24px;
    border-top: 1px solid var(--border);
    text-align: center;
    font-size: 0.8125rem;
    color: var(--text-muted);
}
@media (max-width: 600px) {
    .footer-bottom {
        padding: 16px 20px;
        font-size: 0.75rem;
    }
}

/* ==========================================================================
   ERROR PAGE
   ========================================================================== */

.error-page { min-height: 50vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 48px 24px; }
.error-code { font-size: 6rem; font-weight: 900; color: var(--text-muted); line-height: 1; }
.error-page h1 { font-size: 1.25rem; margin: 16px 0; }
.error-page p { color: var(--text-secondary); margin-bottom: 24px; }
.error-page a { padding: 12px 24px; background: var(--text); color: var(--bg); font-weight: 600; }

/* Ghost Cards */
.kg-width-wide { max-width: 960px; margin-left: auto; margin-right: auto; }
.kg-width-full { max-width: none; width: 100vw; margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); }
.kg-bookmark-card { background: var(--bg-alt); border: 1px solid var(--border); }
.kg-bookmark-container { display: flex; }
.kg-bookmark-content { flex: 1; padding: 20px; }
.kg-bookmark-title { font-weight: 600; margin-bottom: 8px; }
.kg-bookmark-description { font-size: 0.875rem; color: var(--text-secondary); }
.kg-bookmark-thumbnail { width: 180px; flex-shrink: 0; }
.kg-bookmark-thumbnail img { width: 100%; height: 100%; object-fit: cover; }
.kg-callout-card { display: flex; gap: 12px; padding: 16px; background: var(--bg-alt); border-left: 3px solid var(--text-muted); }
.kg-callout-emoji { font-size: 1.25rem; }
.kg-button-card { display: flex; justify-content: center; }
.kg-button-card a { padding: 12px 24px; background: var(--text); color: var(--bg); font-weight: 600; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); }

/* ==========================================================================
   ABOUT PAGE
   ========================================================================== */

.about-page {
    min-height: 100vh;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

/* About Hero */
.about-hero {
    padding: 80px 24px 60px;
    background: linear-gradient(180deg, var(--bg-alt) 0%, var(--bg) 100%);
    text-align: center;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
    overflow-x: hidden;
}

@media (max-width: 600px) {
    .about-hero {
        padding: 60px 16px 40px;
    }
}

.about-hero-content {
    max-width: 700px;
    margin: 0 auto;
    padding: 0 16px;
    box-sizing: border-box;
}

.about-label {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 20px;
    margin-bottom: 20px;
}

.about-hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 16px;
}

@media (max-width: 600px) {
    .about-hero h1 { font-size: 1.5rem; }
    .about-tagline { font-size: 1rem; }
    .about-label { font-size: 0.6875rem; padding: 5px 12px; }
}

.about-tagline {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* About Main */
.about-main {
    padding: 60px 24px;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
    overflow-x: hidden;
}

@media (max-width: 600px) {
    .about-main {
        padding: 40px 16px;
    }
}

.about-container {
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 48px;
    box-sizing: border-box;
    overflow: hidden;
}

@media (max-width: 1024px) {
    .about-container {
        grid-template-columns: 1fr 300px;
        gap: 32px;
    }
}

@media (max-width: 900px) {
    .about-container {
        grid-template-columns: 1fr;
        gap: 40px;
        max-width: 100%;
    }
}

@media (max-width: 600px) {
    .about-container {
        gap: 32px;
        padding: 0;
    }
}

/* About Content */
.about-content {
    font-size: 1.0625rem;
    line-height: 1.75;
    color: var(--text-secondary);
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    width: 100%;
}

.about-content * {
    max-width: 100%;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.about-content img {
    height: auto;
}

.about-content pre {
    overflow-x: auto;
    max-width: 100%;
}

@media (max-width: 600px) {
    .about-content {
        font-size: 1rem;
        padding-right: 0;
    }
}

.about-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    margin-top: 2.5em;
    margin-bottom: 0.75em;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border);
}

@media (max-width: 600px) {
    .about-content h2 {
        font-size: 1.25rem;
    }
}

.about-content h2:first-child {
    margin-top: 0;
}

.about-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
    margin-top: 2em;
    margin-bottom: 0.5em;
}

@media (max-width: 600px) {
    .about-content h3 {
        font-size: 1.125rem;
    }
}

.about-content p {
    margin-bottom: 1.25em;
}

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

.about-content ul,
.about-content ol {
    margin: 1.25em 0;
    padding-left: 1.25em;
}

@media (max-width: 600px) {
    .about-content ul,
    .about-content ol {
        padding-left: 1em;
    }
}

.about-content li {
    margin-bottom: 0.5em;
}

.about-content a {
    color: #818cf8;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.about-content a:hover {
    color: #a5b4fc;
}

/* About Sidebar */
.about-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

@media (max-width: 900px) {
    .about-sidebar {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 600px) {
    .about-sidebar {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

/* About Card */
.about-card {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
}

@media (max-width: 600px) {
    .about-card {
        padding: 20px;
        border-radius: 10px;
    }
}

.about-card h3 {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

@media (max-width: 600px) {
    .about-card h3 {
        margin-bottom: 16px;
    }
}

/* Stats Card */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    text-align: center;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-number {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1;
}

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

/* Topics Card */
.topics-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.topic-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.topic-tag:hover {
    border-color: var(--tag-color, var(--text-muted));
    color: var(--tag-color, var(--text));
}

.topic-count {
    font-size: 0.6875rem;
    padding: 2px 6px;
    background: var(--border);
    border-radius: 10px;
    color: var(--text-muted);
}

/* Team Card */
.team-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.team-member {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 8px;
    transition: background 0.2s;
}

.team-member:hover {
    background: var(--bg);
}

.team-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.team-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.team-avatar span {
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
}

.team-info {
    min-width: 0;
}

.team-name {
    display: block;
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--text);
}

.team-role {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Contact Card */
.about-contact p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.contact-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.contact-btn:hover {
    border-color: var(--text-muted);
    color: var(--text);
}

.contact-btn svg {
    flex-shrink: 0;
}

/* Latest Section */
.about-latest {
    padding: 60px 24px 80px;
    background: var(--bg-alt);
    border-top: 1px solid var(--border);
    width: 100%;
    box-sizing: border-box;
}

.about-latest .about-container {
    display: block;
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
}

.about-latest-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    gap: 16px;
    flex-wrap: wrap;
}

.about-latest-header h2 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin: 0;
}

.view-all {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: 6px;
    transition: all 0.2s;
}

.view-all:hover {
    color: var(--text);
    border-color: var(--text-muted);
    background: var(--bg);
}

@media (max-width: 600px) {
    .about-latest {
        padding: 40px 16px 60px;
    }
    .about-latest-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .view-all {
        width: 100%;
        justify-content: center;
    }
}

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

@media (max-width: 900px) {
    .about-latest-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 600px) {
    .about-latest-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

.about-article {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.2s, transform 0.2s;
}

.about-article:hover {
    border-color: var(--text-muted);
}

@media (min-width: 601px) {
    .about-article:hover {
        transform: translateY(-2px);
    }
}

.about-article-img {
    aspect-ratio: 16/9;
    overflow: hidden;
}

.about-article-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.about-article:hover .about-article-img img {
    transform: scale(1.03);
}

.about-article-content {
    padding: 20px;
}

@media (max-width: 600px) {
    .about-article-content {
        padding: 16px;
    }
}

.about-article-cat {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.about-article-content h3 {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    margin: 8px 0 10px;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.about-article-content p {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.about-article-content time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ==========================================================================
   ACCOUNT PAGE
   ========================================================================== */

.account-page {
    min-height: calc(100vh - var(--header-h));
}

/* Account Header */
.account-header {
    padding: 80px 24px 60px;
    background: linear-gradient(180deg, var(--bg-alt) 0%, var(--bg) 100%);
    text-align: center;
}

.account-header-content {
    max-width: 600px;
    margin: 0 auto;
}

.account-avatar-wrap {
    margin-bottom: 20px;
}

.account-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--border);
}

.account-avatar-placeholder {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #fff;
    font-size: 2.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    text-transform: uppercase;
}

.account-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.account-email {
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.account-badge {
    display: inline-block;
    padding: 6px 14px;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.account-badge-pro {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
    border-color: rgba(99, 102, 241, 0.3);
    color: #818cf8;
}

.account-signin-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #fff;
    font-weight: 600;
    border-radius: 8px;
    margin-top: 8px;
}

/* Account Main */
.account-main {
    padding: 48px 24px 80px;
}

.account-container {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 40px;
}

@media (max-width: 800px) {
    .account-container {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

/* Account Sidebar */
.account-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

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

.account-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.account-nav-item:hover {
    background: var(--bg-alt);
    color: var(--text);
}

.account-nav-item.active {
    background: rgba(99, 102, 241, 0.1);
    color: #818cf8;
}

.account-signout {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: all 0.2s;
    margin-top: auto;
}

.account-signout:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* Account Content */
.account-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.account-card {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
}

.account-card h2 {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

/* Membership Info */
.membership-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.membership-status {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px;
    border-radius: 8px;
}

.membership-status svg {
    flex-shrink: 0;
    margin-top: 2px;
}

.membership-status strong {
    display: block;
    font-size: 1rem;
    margin-bottom: 4px;
}

.membership-status span {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.membership-pro {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.membership-free {
    background: rgba(234, 179, 8, 0.1);
    color: #eab308;
}

.upgrade-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #fff;
    font-weight: 600;
    border-radius: 8px;
    transition: opacity 0.2s;
}

.upgrade-btn:hover {
    opacity: 0.9;
}

/* Quick Actions */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

@media (max-width: 600px) {
    .quick-actions {
        grid-template-columns: 1fr;
    }
}

.quick-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 24px 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-align: center;
    transition: all 0.2s;
}

.quick-action:hover {
    border-color: var(--text-muted);
    color: var(--text);
}

.quick-action svg {
    color: var(--text-muted);
}

/* ==========================================================================
   GHOST PORTAL CUSTOMIZATION
   ========================================================================== */

/* Portal Frame Container */
.gh-portal-popup-wrapper {
    background: rgba(12, 18, 34, 0.9) !important;
    backdrop-filter: blur(8px) !important;
}

/* Main Portal Container */
.gh-portal-popup-container {
    background: var(--bg) !important;
    border: 1px solid var(--border) !important;
    border-radius: 16px !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5) !important;
}

/* Close Button */
.gh-portal-closeicon-container {
    background: var(--bg-alt) !important;
    border: 1px solid var(--border) !important;
}

.gh-portal-closeicon-container:hover {
    background: var(--border) !important;
}

.gh-portal-closeicon {
    color: var(--text-muted) !important;
}

/* Input Fields */
.gh-portal-input {
    background: var(--bg-alt) !important;
    border: 1px solid var(--border) !important;
    color: var(--text) !important;
    border-radius: 8px !important;
}

.gh-portal-input:focus {
    border-color: #6366f1 !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15) !important;
}

.gh-portal-input::placeholder {
    color: var(--text-muted) !important;
}

/* Labels */
.gh-portal-input-label {
    color: var(--text-secondary) !important;
}

/* Primary Button */
.gh-portal-btn-main {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%) !important;
    border: none !important;
    border-radius: 8px !important;
}

.gh-portal-btn-main:hover {
    opacity: 0.9 !important;
}

/* Secondary Buttons */
.gh-portal-btn-secondary,
.gh-portal-btn-outline {
    background: transparent !important;
    border: 1px solid var(--border) !important;
    color: var(--text) !important;
    border-radius: 8px !important;
}

.gh-portal-btn-secondary:hover,
.gh-portal-btn-outline:hover {
    background: var(--bg-alt) !important;
}

/* Links */
.gh-portal-link {
    color: #818cf8 !important;
}

.gh-portal-link:hover {
    color: #a5b4fc !important;
}

/* Text colors */
.gh-portal-header-title,
.gh-portal-account-data,
.gh-portal-plan-name,
.gh-portal-plan-price {
    color: var(--text) !important;
}

.gh-portal-header-subtitle,
.gh-portal-signup-message,
.gh-portal-signin-message,
.gh-portal-plan-currency,
.gh-portal-plan-featurename,
.gh-portal-account-data-label {
    color: var(--text-secondary) !important;
}

/* Plans */
.gh-portal-plan-section {
    background: var(--bg-alt) !important;
    border: 1px solid var(--border) !important;
    border-radius: 12px !important;
}

.gh-portal-plan-section.checked {
    border-color: #6366f1 !important;
    background: rgba(99, 102, 241, 0.1) !important;
}

.gh-portal-plan-checkbox {
    border-color: var(--border) !important;
}

.gh-portal-plan-section.checked .gh-portal-plan-checkbox {
    background: #6366f1 !important;
    border-color: #6366f1 !important;
}

/* Toggle */
.gh-portal-toggle-container {
    background: var(--bg-alt) !important;
}

.gh-portal-toggle input:checked + .gh-portal-toggle-track {
    background: #6366f1 !important;
}

/* Dividers */
.gh-portal-divider {
    background: var(--border) !important;
}

/* Powered by */
.gh-portal-powered {
    opacity: 0.5 !important;
}

.gh-portal-powered a {
    color: var(--text-muted) !important;
}

/* ==========================================================================
   NEW HOMEPAGE DESIGN - Clean & Modern
   ========================================================================== */

/* ===== HERO SECTION ===== */
.hero {
    padding: 32px 24px 48px;
    background: var(--bg);
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 24px;
}

@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
    }
}

/* Featured Article */
.hero-featured {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: var(--bg-card);
}

.hero-featured-link {
    display: block;
}

.hero-featured-image {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.hero-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.hero-featured:hover .hero-featured-image img {
    transform: scale(1.03);
}

.hero-featured-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.2) 50%, transparent 100%);
}

.hero-featured-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 32px;
    color: #fff;
}

.hero-featured-content h2 {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 12px 0;
}

@media (max-width: 600px) {
    .hero-featured-content h2 {
        font-size: 1.25rem;
    }
    .hero-featured-content {
        padding: 20px;
    }
}

.hero-excerpt {
    font-size: 1rem;
    color: rgba(255,255,255,0.8);
    line-height: 1.5;
    margin-bottom: 12px;
}

@media (max-width: 600px) {
    .hero-excerpt {
        display: none;
    }
}

.tag-pill {
    display: inline-block;
    padding: 4px 12px;
    background: #6366f1;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 20px;
}

.hero-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: rgba(255,255,255,0.7);
}

.author-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.meta-sep {
    opacity: 0.5;
}

/* Secondary Articles */
.hero-secondary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 600px) {
    .hero-secondary {
        grid-template-columns: 1fr;
    }
}

.hero-card {
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.hero-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

.hero-card-image {
    aspect-ratio: 16/10;
    overflow: hidden;
}

.hero-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-card-content {
    padding: 16px;
}

.tag-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6366f1;
}

.hero-card-content h3 {
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.4;
    margin: 8px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

/* ===== CATEGORY NAV ===== */
.category-nav {
    padding: 0 24px 32px;
    background: var(--bg);
}

.category-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.category-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
}

.category-pills {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
}

.category-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
    transition: all 0.2s;
}

.category-pill:hover {
    background: var(--bg-hover);
    color: var(--text);
    border-color: var(--pill-color, #6366f1);
}

/* ===== POSTS SECTION ===== */
.posts-section,
.guides-section,
.trending-section,
.more-posts-section {
    padding: 48px 24px;
    background: var(--bg);
}

.posts-container,
.guides-container,
.trending-container,
.more-posts-container {
    max-width: 1200px;
    margin: 0 auto;
}

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

.section-header h2 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 700;
}

.accent-line {
    width: 4px;
    height: 24px;
    background: #6366f1;
    border-radius: 2px;
}

.view-all-link {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #6366f1;
    transition: gap 0.2s;
}

.view-all-link:hover {
    gap: 8px;
}

/* Posts Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

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

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

.post-card {
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

.post-card-image {
    aspect-ratio: 16/10;
    overflow: hidden;
}

.post-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.post-card:hover .post-card-image img {
    transform: scale(1.05);
}

.post-card-content {
    padding: 20px;
}

.post-tag {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6366f1;
}

.post-card-content h3 {
    font-size: 1.0625rem;
    font-weight: 600;
    line-height: 1.4;
    margin: 8px 0 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-excerpt {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

/* ===== GUIDES SECTION ===== */
.guides-section {
    background: var(--bg-alt);
}

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

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

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

.guide-card {
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s;
}

.guide-card:hover {
    transform: translateY(-4px);
}

.guide-image {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
}

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

.guide-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: #10b981;
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 600;
    border-radius: 6px;
}

.guide-content {
    padding: 16px;
}

.guide-content h3 {
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.guide-time {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ===== TRENDING SECTION ===== */
.trending-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

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

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

.trending-card {
    display: flex;
    gap: 16px;
    padding: 20px;
    background: var(--bg-card);
    border-radius: 12px;
    transition: transform 0.2s;
}

.trending-card:hover {
    transform: translateY(-2px);
}

.trending-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--border);
    line-height: 1;
}

.trending-content {
    flex: 1;
    min-width: 0;
}

.trending-tag {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6366f1;
}

.trending-content h3 {
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.4;
    margin: 6px 0 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

/* ===== MORE POSTS ===== */
.more-posts-section {
    background: var(--bg-alt);
}

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

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

@media (max-width: 600px) {
    .more-posts-grid {
        grid-template-columns: 1fr;
    }
}

.more-post-card {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: var(--bg-card);
    border-radius: 10px;
    transition: transform 0.2s;
}

.more-post-card:hover {
    transform: translateY(-2px);
}

.more-post-image {
    width: 100px;
    height: 70px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
}

.more-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.more-post-content {
    flex: 1;
    min-width: 0;
}

.more-post-tag {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #6366f1;
}

.more-post-content h3 {
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.4;
    margin: 4px 0 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.more-post-content time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.load-more {
    text-align: center;
    margin-top: 40px;
}

.load-more-btn {
    display: inline-block;
    padding: 12px 32px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text);
    transition: all 0.2s;
}

.load-more-btn:hover {
    background: var(--bg-hover);
    border-color: #6366f1;
}

/* ===== NEWSLETTER ===== */
.newsletter-section {
    padding: 64px 24px;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

.newsletter-container {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.newsletter-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    display: block;
}

.newsletter-container h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #fff;
}

.newsletter-container > p {
    color: rgba(255,255,255,0.7);
    margin-bottom: 24px;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.form-group {
    display: flex;
    gap: 8px;
}

@media (max-width: 500px) {
    .form-group {
        flex-direction: column;
    }
}

.newsletter-form input {
    flex: 1;
    padding: 14px 18px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    font-size: 1rem;
    color: #fff;
}

.newsletter-form input::placeholder {
    color: rgba(255,255,255,0.5);
}

.newsletter-form input:focus {
    outline: none;
    border-color: #6366f1;
    background: rgba(255,255,255,0.15);
}

.newsletter-form button {
    padding: 14px 28px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    transition: opacity 0.2s;
}

.newsletter-form button:hover {
    opacity: 0.9;
}

.newsletter-note {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.5);
    margin-top: 4px;
}

/* Hide old hero section */
.hero-section {
    display: none !important;
}

/* Hide old news sections */
.news-section {
    display: none !important;
}

/* Hide old quick guides */
.quick-guides-section {
    display: none !important;
}

/* Hide old newsletter bar */
.newsletter-bar {
    display: none !important;
}

/* ==========================================================================
   HOMEPAGE V3 - Clean Magazine Style
   ========================================================================== */

/* Hide old sections */
.hero-section,
.news-section,
.quick-guides-section,
.newsletter-bar,
.hero,
.category-nav,
.posts-section,
.guides-section,
.trending-section,
.more-posts-section,
.newsletter-section {
    display: none !important;
}

/* Container */
.hp-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

@media (max-width: 600px) {
    .hp-container {
        padding: 0 16px;
    }
}

/* ===== HERO FEATURED ===== */
.hp-hero {
    padding: 32px 0 48px;
    background: var(--bg);
}

.hp-featured a {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 32px;
    align-items: center;
}

@media (max-width: 900px) {
    .hp-featured a {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

.hp-featured-img {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--bg-alt);
}

.hp-featured-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.hp-featured:hover .hp-featured-img img {
    transform: scale(1.02);
}

.hp-featured-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(0,0,0,0.3) 0%, transparent 100%);
    pointer-events: none;
}

.hp-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    padding: 6px 12px;
    background: #6366f1;
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hp-featured-body h2 {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 16px;
}

@media (max-width: 600px) {
    .hp-featured-body h2 {
        font-size: 1.5rem;
    }
}

.hp-featured-body p {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.hp-featured-meta {
    font-size: 0.8125rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.hp-author {
    color: var(--text);
    font-weight: 500;
}

.hp-sep {
    opacity: 0.4;
}

/* ===== SECTIONS ===== */
.hp-section {
    padding: 48px 0;
    background: var(--bg);
}

.hp-section-alt {
    background: var(--bg-alt);
}

.hp-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.hp-section-header h2 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.hp-accent {
    width: 3px;
    height: 18px;
    background: #6366f1;
}

.hp-see-all {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: color 0.2s;
}

.hp-see-all:hover {
    color: var(--text);
}

/* ===== GRID ===== */
.hp-grid {
    display: grid;
    gap: 24px;
}

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

@media (max-width: 1024px) {
    .hp-grid-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .hp-grid-4 {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

@media (max-width: 500px) {
    .hp-grid-4 {
        grid-template-columns: 1fr;
    }
}

/* ===== CARDS ===== */
.hp-card {
    background: var(--bg-card);
    transition: transform 0.2s ease;
}

.hp-card:hover {
    transform: translateY(-4px);
}

.hp-card a {
    display: block;
}

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

.hp-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.hp-card:hover .hp-card-img img {
    transform: scale(1.05);
}

.hp-card-body {
    padding: 16px;
}

.hp-card-body h3 {
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hp-card-body p {
    font-size: 0.8125rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hp-card-body time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ===== CATEGORIES ROW ===== */
.hp-categories {
    padding: 24px 0;
    background: var(--bg-alt);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.hp-cat-list {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
}

.hp-cat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
    transition: all 0.2s;
}

.hp-cat-item:hover {
    background: var(--bg-hover);
    color: var(--text);
    border-color: var(--cat-color, var(--text-muted));
}

.hp-cat-count {
    padding: 2px 8px;
    background: var(--bg-alt);
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--text-muted);
}

/* ===== LOAD MORE ===== */
.hp-load-more {
    text-align: center;
    margin-top: 40px;
}

.hp-load-more a {
    display: inline-block;
    padding: 14px 40px;
    background: transparent;
    border: 1px solid var(--border);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
    transition: all 0.2s;
}

.hp-load-more a:hover {
    background: var(--bg-card);
    border-color: var(--text-muted);
}

/* ===== NEWSLETTER ===== */
.hp-newsletter {
    padding: 64px 0;
    background: var(--bg-alt);
}

.hp-newsletter-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    padding: 40px;
    background: var(--bg-card);
    border: 1px solid var(--border);
}

@media (max-width: 768px) {
    .hp-newsletter-box {
        flex-direction: column;
        text-align: center;
        padding: 32px 24px;
    }
}

.hp-newsletter-text h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.hp-newsletter-text p {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.hp-newsletter-form {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

@media (max-width: 500px) {
    .hp-newsletter-form {
        flex-direction: column;
        width: 100%;
    }
}

.hp-newsletter-form input {
    padding: 12px 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    font-size: 0.875rem;
    color: var(--text);
    min-width: 260px;
}

@media (max-width: 500px) {
    .hp-newsletter-form input {
        min-width: auto;
        width: 100%;
    }
}

.hp-newsletter-form input:focus {
    outline: none;
    border-color: #6366f1;
}

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

.hp-newsletter-form button {
    padding: 12px 24px;
    background: #6366f1;
    border: none;
    font-size: 0.875rem;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s;
}

.hp-newsletter-form button:hover {
    background: #4f46e5;
}

/* ==========================================================================
   BREADCRUMB
   ========================================================================== */

.post-breadcrumb {
    padding: 16px 0;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
}

.breadcrumb-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    font-size: 0.8125rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.breadcrumb-inner a {
    color: var(--text-secondary);
    transition: color 0.2s;
}

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

.breadcrumb-sep {
    opacity: 0.5;
}

.breadcrumb-current {
    color: var(--text);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 300px;
}

/* ==========================================================================
   POST IMPROVEMENTS
   ========================================================================== */

.post-author-link {
    display: flex;
    align-items: center;
    gap: 8px;
}

.post-author-img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.post-meta-sep {
    opacity: 0.4;
}

.post-footer-tags {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 0.875rem;
}

.post-footer-tags span {
    color: var(--text-muted);
}

.post-footer-tags a {
    padding: 6px 12px;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    font-size: 0.8125rem;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.post-footer-tags a:hover {
    background: var(--bg-card);
    color: var(--text);
}

.share-label {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

/* Post Newsletter */
.post-newsletter {
    padding: 48px 0;
    background: var(--bg-alt);
}

.post-newsletter-wrap {
    max-width: 700px;
    margin: 0 auto;
    padding: 0 24px;
}

.post-newsletter-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 40px;
    background: var(--bg-card);
    border: 1px solid var(--border);
}

.post-newsletter-text h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.post-newsletter-text p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.post-newsletter-form {
    display: flex;
    gap: 8px;
    width: 100%;
    max-width: 400px;
}

.post-newsletter-form input {
    flex: 1;
    padding: 12px 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    font-size: 0.875rem;
    color: var(--text);
}

.post-newsletter-form input:focus {
    outline: none;
    border-color: #6366f1;
}

.post-newsletter-form button {
    padding: 12px 20px;
    background: #6366f1;
    border: none;
    font-size: 0.875rem;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s;
}

.post-newsletter-form button:hover {
    background: #4f46e5;
}

@media (max-width: 500px) {
    .post-newsletter-form {
        flex-direction: column;
    }
}

/* ==========================================================================
   GUIDE TEMPLATE STYLES
   ========================================================================== */

.guide-single {
    padding-top: 0;
}

.guide-header {
    padding: 32px 0 48px;
    background: var(--bg);
}

.guide-header-inner {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 24px;
}

.guide-breadcrumb {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.guide-breadcrumb a {
    color: var(--text-secondary);
    transition: color 0.2s;
}

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

.guide-tags {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.guide-tag {
    padding: 4px 10px;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.guide-tag:hover {
    border-color: var(--tag-color, var(--text-muted));
    color: var(--text);
}

.guide-title {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 16px;
}

@media (max-width: 768px) {
    .guide-title {
        font-size: 1.75rem;
    }
}

.guide-excerpt {
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.guide-meta-bar {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.guide-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.guide-meta-item a {
    color: var(--text-secondary);
}

.guide-meta-item a:hover {
    color: var(--text);
}

.guide-difficulty {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 600;
}

.guide-difficulty.beginner {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.guide-difficulty.intermediate {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.guide-difficulty.advanced {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.guide-feature-image {
    max-width: 1200px;
    margin: 0 auto 48px;
    padding: 0 24px;
}

.guide-feature-image img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
}

.guide-feature-image figcaption {
    margin-top: 12px;
    font-size: 0.8125rem;
    color: var(--text-muted);
    text-align: center;
}

/* Guide Layout */
.guide-layout {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px 64px;
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 48px;
}

@media (max-width: 1024px) {
    .guide-layout {
        grid-template-columns: 1fr;
    }
}

/* Guide Sidebar */
.guide-sidebar {
    position: relative;
}

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

.guide-sidebar-inner {
    position: sticky;
    top: 88px;
}

.guide-progress-box {
    padding: 16px;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    margin-bottom: 16px;
}

.guide-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
}

.guide-progress-pct {
    color: #6366f1;
}

.guide-progress-bar {
    height: 4px;
    background: var(--border);
}

.guide-progress-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    transition: width 0.2s;
}

.guide-toc {
    padding: 16px;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    margin-bottom: 16px;
}

.guide-toc-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

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

.guide-toc-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    border-left: 2px solid transparent;
    transition: all 0.2s;
}

.guide-toc-link:hover {
    color: var(--text);
    background: var(--bg-card);
}

.guide-toc-link.active {
    color: #6366f1;
    border-left-color: #6366f1;
    background: rgba(99, 102, 241, 0.1);
}

.guide-toc-link.guide-toc-sub {
    padding-left: 32px;
    font-size: 0.75rem;
}

.guide-toc-step {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    font-size: 0.6875rem;
    font-weight: 700;
    color: var(--text-muted);
    flex-shrink: 0;
}

.guide-toc-link.active .guide-toc-step {
    background: #6366f1;
    border-color: #6366f1;
    color: #fff;
}

.guide-info-box {
    padding: 16px;
    background: var(--bg-alt);
    border: 1px solid var(--border);
}

.guide-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

.guide-info-item:last-child {
    border-bottom: none;
}

.guide-info-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.guide-info-value {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text);
}

/* Guide Content */
.guide-content-wrap {
    min-width: 0;
}

.guide-mobile-toc {
    display: none;
    margin-bottom: 24px;
}

@media (max-width: 1024px) {
    .guide-mobile-toc {
        display: block;
    }
}

.guide-mobile-toc-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text);
}

.guide-mobile-toc-btn .chevron {
    margin-left: auto;
    transition: transform 0.2s;
}

.guide-mobile-toc-btn.open .chevron {
    transform: rotate(180deg);
}

.guide-mobile-toc-content {
    display: none;
    padding: 16px;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-top: none;
}

.guide-mobile-toc-content.open {
    display: block;
}

.guide-content {
    font-size: 1.0625rem;
    line-height: 1.8;
}

/* Guide Share Box */
.guide-share-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 48px;
    padding: 20px 24px;
    background: var(--bg-alt);
    border: 1px solid var(--border);
}

@media (max-width: 500px) {
    .guide-share-box {
        flex-direction: column;
        text-align: center;
    }
}

.guide-share-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
}

.guide-share-btns {
    display: flex;
    gap: 8px;
}

.guide-share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    transition: all 0.2s;
}

.guide-share-btn:hover {
    color: var(--text);
    border-color: var(--text-muted);
}

.guide-share-btn.twitter:hover { color: #1da1f2; }
.guide-share-btn.linkedin:hover { color: #0a66c2; }
.guide-share-btn.facebook:hover { color: #1877f2; }

/* Guide Author Box */
.guide-author-box {
    display: flex;
    gap: 20px;
    margin-top: 32px;
    padding: 24px;
    background: var(--bg-alt);
    border: 1px solid var(--border);
}

.guide-author-avatar {
    flex-shrink: 0;
}

.guide-author-avatar img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
}

.guide-author-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    font-size: 1.5rem;
    font-weight: 700;
}

.guide-author-info {
    flex: 1;
}

.guide-author-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.guide-author-name {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text);
    display: inline-block;
    margin-bottom: 8px;
}

.guide-author-bio {
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

/* Related Guides */
.related-guides {
    padding: 64px 0;
    background: var(--bg-alt);
}

.related-guides-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.related-guides-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 32px;
}

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

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

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

.guide-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    transition: transform 0.2s;
}

.guide-card:hover {
    transform: translateY(-4px);
}

.guide-card a {
    display: block;
}

.guide-card-img {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
}

.guide-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.guide-card:hover .guide-card-img img {
    transform: scale(1.05);
}

.guide-card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 10px;
    background: #10b981;
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
}

.guide-card-body {
    padding: 16px;
}

.guide-card-body h3 {
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.guide-card-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ==========================================================================
   CONTACT PAGE STYLES
   ========================================================================== */

.contact-page {
    padding-bottom: 64px;
}

.contact-header {
    padding: 48px 0;
    background: var(--bg);
    text-align: center;
}

.contact-header-inner {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 24px;
}

.contact-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 16px;
}

.contact-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.contact-layout {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 48px;
}

@media (max-width: 900px) {
    .contact-layout {
        grid-template-columns: 1fr;
    }
}

.contact-form-box {
    padding: 32px;
    background: var(--bg-alt);
    border: 1px solid var(--border);
}

.contact-form-box h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.contact-form-box > p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text);
}

.form-group input,
.form-group textarea {
    padding: 12px 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    font-size: 0.9375rem;
    color: var(--text);
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #6366f1;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.contact-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    background: #6366f1;
    border: none;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s;
}

.contact-submit-btn:hover {
    background: #4f46e5;
}

/* Contact Info Sidebar */
.contact-info-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-info-box {
    padding: 24px;
    background: var(--bg-alt);
    border: 1px solid var(--border);
}

.contact-info-box h3 {
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.contact-info-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-info-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    transition: all 0.2s;
}

.contact-info-item:hover {
    border-color: var(--text-muted);
}

.contact-info-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--bg-alt);
    color: #6366f1;
    flex-shrink: 0;
}

.contact-info-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.contact-info-text .contact-info-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.contact-info-text .contact-info-value {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text);
}

.contact-social-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.contact-social-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    font-size: 0.875rem;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.contact-social-item:hover {
    color: var(--text);
    border-color: var(--text-muted);
}

.contact-quick-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.contact-quick-links a {
    padding: 10px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    font-size: 0.875rem;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.contact-quick-links a:hover {
    color: var(--text);
    border-color: var(--text-muted);
}

/* ==========================================================================
   AUTHOR PAGE IMPROVEMENTS
   ========================================================================== */

.author-hero {
    padding: 48px 0;
    background: var(--bg);
}

.author-hero-inner {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    gap: 32px;
    align-items: center;
}

@media (max-width: 600px) {
    .author-hero-inner {
        flex-direction: column;
        text-align: center;
    }
}

.author-avatar-wrap {
    flex-shrink: 0;
}

.author-avatar-large {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--border);
}

.author-avatar-placeholder-large {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    font-size: 3rem;
    font-weight: 700;
}

.author-hero-content h1 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.author-bio-text {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.author-stats {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 16px;
}

@media (max-width: 600px) {
    .author-stats {
        justify-content: center;
    }
}

.author-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.author-stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: #6366f1;
}

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

.author-stat-location {
    flex-direction: row;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.author-social {
    display: flex;
    gap: 8px;
}

@media (max-width: 600px) {
    .author-social {
        justify-content: center;
    }
}

.author-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    transition: all 0.2s;
}

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

.author-posts {
    padding: 48px 0;
    background: var(--bg-alt);
}

.author-posts-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.author-posts-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.author-posts-header h2 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.author-posts-count {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

/* ==========================================================================
   TAG PAGE IMPROVEMENTS
   ========================================================================== */

.tag-hero {
    padding: 48px 0;
    background: var(--bg);
}

.tag-hero-inner {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
    align-items: center;
}

@media (max-width: 768px) {
    .tag-hero-inner {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

.tag-hero-image {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
}

.tag-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tag-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.2), transparent);
}

.tag-hero-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tag-accent-bar {
    width: 40px;
    height: 4px;
    background: #6366f1;
}

.tag-hero-content h1 {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
}

@media (max-width: 768px) {
    .tag-hero-content h1 {
        font-size: 2rem;
    }
}

.tag-description {
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

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

.tag-count {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.tag-featured {
    padding: 48px 0;
    background: var(--bg-alt);
}

.tag-featured-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.accent-bar {
    width: 3px;
    height: 18px;
    background: #6366f1;
}

.featured-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}

@media (max-width: 1024px) {
    .featured-row {
        grid-template-columns: repeat(3, 1fr);
    }
}

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

.featured-card-small {
    background: var(--bg-card);
    border: 1px solid var(--border);
    transition: transform 0.2s;
}

.featured-card-small:hover {
    transform: translateY(-2px);
}

.featured-card-small a {
    display: block;
}

.featured-card-img {
    aspect-ratio: 16/10;
    overflow: hidden;
}

.featured-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.featured-card-small:hover .featured-card-img img {
    transform: scale(1.05);
}

.featured-card-content {
    padding: 12px;
}

.featured-card-content h3 {
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.featured-card-content time {
    font-size: 0.6875rem;
    color: var(--text-muted);
}

.tag-posts {
    padding: 48px 0;
    background: var(--bg);
}

.tag-posts-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.tag-posts-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.tag-posts-info {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
}

.pagination-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text);
    transition: all 0.2s;
}

.pagination-btn:hover {
    background: var(--bg-hover);
    border-color: var(--text-muted);
}

.pagination-info {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Related Tags */
.related-tags {
    padding: 48px 0;
    background: var(--bg-alt);
}

.related-tags-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.related-tags-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
}

@media (max-width: 1024px) {
    .related-tags-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

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

.related-tag-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 20px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 3px solid var(--tag-color, #6366f1);
    transition: all 0.2s;
}

.related-tag-card:hover {
    transform: translateY(-2px);
    border-color: var(--tag-color, var(--text-muted));
}

.related-tag-name {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text);
}

.related-tag-count {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ==========================================================================
   ARTICLE PAGE - REDESIGNED v4
   ========================================================================== */

/* Reading Progress Bar - Top of page */
.reading-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: transparent;
    z-index: 1000;
}

.reading-progress-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #6366f1, #8b5cf6, #ec4899);
    transition: width 0.1s linear;
}

/* Article Container */
.article {
    padding-bottom: 0;
}

/* Article Header */
.article-header {
    padding: 40px 0 48px;
    background: var(--bg);
}

.article-header-inner {
    max-width: 780px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Breadcrumb */
.article-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.article-breadcrumb a {
    color: var(--text-secondary);
    transition: color 0.2s;
}

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

.article-breadcrumb svg {
    opacity: 0.5;
}

/* Category Badge */
.article-category {
    display: inline-block;
    padding: 6px 14px;
    background: var(--cat-color, #6366f1);
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 20px;
}

/* Title */
.article-title {
    font-size: 2.75rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .article-title {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .article-title {
        font-size: 1.625rem;
    }
}

/* Excerpt */
.article-excerpt {
    font-size: 1.25rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* Meta Row */
.article-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 0.875rem;
    color: var(--text-muted);
}

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

.article-author-img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
}

.article-author-placeholder {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

.article-author-name {
    font-weight: 600;
    color: var(--text);
}

.article-meta-divider {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--text-muted);
    opacity: 0.5;
}

.article-meta time,
.article-reading-time {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Feature Image */
.article-feature-image {
    max-width: 1100px;
    margin: 0 auto 48px;
    padding: 0 24px;
}

.article-feature-image img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
}

.article-feature-image figcaption {
    margin-top: 12px;
    font-size: 0.8125rem;
    color: var(--text-muted);
    text-align: center;
}

/* Article Body Layout - 3 columns */
.article-body {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px 64px;
    display: grid;
    grid-template-columns: 60px 1fr 280px;
    gap: 40px;
}

@media (max-width: 1200px) {
    .article-body {
        grid-template-columns: 1fr;
        max-width: 780px;
    }
}

/* Share Sidebar - Left */
.article-share-sidebar {
    position: relative;
}

@media (max-width: 1200px) {
    .article-share-sidebar {
        display: none;
    }
}

.share-sticky {
    position: sticky;
    top: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.share-title {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    margin-bottom: 8px;
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.share-btn:hover {
    transform: translateY(-2px);
    border-color: var(--text-muted);
}

.share-btn.share-twitter:hover { color: #1da1f2; background: rgba(29, 161, 242, 0.1); border-color: #1da1f2; }
.share-btn.share-facebook:hover { color: #1877f2; background: rgba(24, 119, 242, 0.1); border-color: #1877f2; }
.share-btn.share-linkedin:hover { color: #0a66c2; background: rgba(10, 102, 194, 0.1); border-color: #0a66c2; }

.share-btn .icon-check { display: none; }
.share-btn.copied .icon-link { display: none; }
.share-btn.copied .icon-check { display: block; color: #10b981; }
.share-btn.copied { border-color: #10b981; background: rgba(16, 185, 129, 0.1); }

/* Main Content Area */
.article-content-area {
    min-width: 0;
    max-width: 780px;
}

/* Mobile TOC */
.mobile-toc {
    display: none;
    margin-bottom: 32px;
}

@media (max-width: 1200px) {
    .mobile-toc {
        display: block;
    }
}

.mobile-toc-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 16px 20px;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s;
}

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

.mobile-toc-toggle .chevron {
    margin-left: auto;
    transition: transform 0.2s;
}

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

.mobile-toc-content {
    display: none;
    padding: 16px 20px;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-top: none;
}

.mobile-toc.open .mobile-toc-content {
    display: block;
}

.mobile-toc-content .toc-link {
    display: block;
    padding: 10px 12px;
    font-size: 0.875rem;
    color: var(--text-secondary);
    border-left: 2px solid var(--border);
    transition: all 0.2s;
}

.mobile-toc-content .toc-link:hover,
.mobile-toc-content .toc-link.active {
    color: #6366f1;
    border-left-color: #6366f1;
    background: rgba(99, 102, 241, 0.05);
}

.mobile-toc-content .toc-link.toc-sub {
    padding-left: 24px;
    font-size: 0.8125rem;
}

/* Article Content */
.article-content {
    font-size: 1.125rem;
    line-height: 1.85;
    color: var(--text);
}

.article-content > * {
    margin-bottom: 1.5em;
}

.article-content h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-top: 2.5em;
    margin-bottom: 0.75em;
    padding-top: 1em;
    border-top: 1px solid var(--border);
}

.article-content h3 {
    font-size: 1.375rem;
    font-weight: 600;
    margin-top: 2em;
    margin-bottom: 0.5em;
}

.article-content h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

.article-content p {
    margin-bottom: 1.5em;
}

.article-content a {
    color: #6366f1;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.article-content a:hover {
    color: #4f46e5;
}

.article-content img {
    border-radius: 4px;
    margin: 2em 0;
}

.article-content blockquote {
    margin: 2em 0;
    padding: 24px 28px;
    background: var(--bg-alt);
    border-left: 4px solid #6366f1;
    font-size: 1.0625rem;
    font-style: italic;
    color: var(--text-secondary);
}

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

.article-content ul,
.article-content ol {
    padding-left: 1.5em;
    margin-bottom: 1.5em;
}

.article-content li {
    margin-bottom: 0.5em;
}

.article-content pre {
    margin: 2em 0;
    padding: 20px 24px;
    background: #1e1e2e;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 0.9375rem;
    line-height: 1.6;
}

.article-content code {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.9em;
    padding: 2px 6px;
    background: var(--bg-alt);
    border-radius: 4px;
}

.article-content pre code {
    padding: 0;
    background: transparent;
}

.article-content hr {
    margin: 3em 0;
    border: none;
    border-top: 1px solid var(--border);
}

.article-content figure {
    margin: 2em 0;
}

.article-content figcaption {
    margin-top: 12px;
    font-size: 0.875rem;
    color: var(--text-muted);
    text-align: center;
}

.article-content table {
    width: 100%;
    margin: 2em 0;
    border-collapse: collapse;
}

.article-content th,
.article-content td {
    padding: 12px 16px;
    border: 1px solid var(--border);
    text-align: left;
}

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

/* Article Tags */
.article-tags {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
}

.article-tags-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-muted);
}

.article-tag {
    padding: 6px 14px;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    font-size: 0.8125rem;
    color: var(--text-secondary);
    transition: all 0.2s;
}

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

/* Author Card */
.author-card {
    display: flex;
    gap: 24px;
    margin-top: 48px;
    padding: 32px;
    background: linear-gradient(135deg, var(--bg-alt) 0%, var(--bg-card) 100%);
    border: 1px solid var(--border);
    border-radius: 12px;
}

@media (max-width: 500px) {
    .author-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 24px;
    }
}

.author-card-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--border);
}

.author-card-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    font-size: 2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.author-card-info {
    flex: 1;
}

.author-card-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.author-card-name {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    margin: 4px 0 12px;
}

.author-card-bio {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

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

@media (max-width: 500px) {
    .author-card-links {
        justify-content: center;
    }
}

.author-card-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text-muted);
    transition: all 0.2s;
}

.author-card-links a:hover {
    color: var(--text);
    border-color: var(--text-muted);
}

/* TOC Sidebar - Right */
.article-toc-sidebar {
    position: relative;
}

@media (max-width: 1200px) {
    .article-toc-sidebar {
        display: none;
    }
}

.toc-sticky {
    position: sticky;
    top: 100px;
    padding: 20px;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.toc-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.toc-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 20px;
    max-height: 400px;
    overflow-y: auto;
}

.toc-nav .toc-link {
    display: block;
    padding: 8px 12px;
    font-size: 0.8125rem;
    line-height: 1.4;
    color: var(--text-secondary);
    border-left: 2px solid transparent;
    transition: all 0.15s;
}

.toc-nav .toc-link:hover {
    color: var(--text);
    background: var(--bg-card);
}

.toc-nav .toc-link.active {
    color: #6366f1;
    border-left-color: #6366f1;
    background: rgba(99, 102, 241, 0.08);
}

.toc-nav .toc-link.toc-sub {
    padding-left: 24px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.toc-progress {
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.toc-progress-bar {
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 8px;
}

.toc-progress-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    border-radius: 2px;
    transition: width 0.15s;
}

.toc-progress-text {
    font-size: 0.6875rem;
    color: var(--text-muted);
}

/* Related Section */
.related-section {
    padding: 64px 0;
    background: var(--bg-alt);
}

.related-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.related-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 32px;
}

.related-title-bar {
    width: 4px;
    height: 20px;
    background: linear-gradient(180deg, #6366f1, #8b5cf6);
    border-radius: 2px;
}

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

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

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

.related-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    transition: transform 0.2s, box-shadow 0.2s;
}

.related-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.related-card a {
    display: block;
}

.related-card-img {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
}

.related-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.related-card:hover .related-card-img img {
    transform: scale(1.05);
}

.related-card-cat {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 10px;
    background: #6366f1;
    color: #fff;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.related-card-body {
    padding: 20px;
}

.related-card-body h3 {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-card-body p {
    font-size: 0.8125rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-card-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Article Newsletter */
.article-newsletter {
    padding: 64px 24px;
    background: var(--bg);
}

.article-newsletter-inner {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    padding: 48px 40px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 16px;
}

.article-newsletter-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.article-newsletter-content p {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.article-newsletter-form {
    display: flex;
    gap: 12px;
    max-width: 420px;
    margin: 0 auto;
}

@media (max-width: 500px) {
    .article-newsletter-form {
        flex-direction: column;
    }
}

.article-newsletter-form input {
    flex: 1;
    padding: 14px 18px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.9375rem;
    color: var(--text);
}

.article-newsletter-form input:focus {
    outline: none;
    border-color: #6366f1;
}

.article-newsletter-form button {
    padding: 14px 28px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border: none;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.article-newsletter-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
}


/* ==========================================================================
   ARCHIVE PAGE (Paginated)
   ========================================================================== */

.archive-section {
    padding: 48px 0 64px;
    background: var(--bg);
    min-height: 60vh;
}

.archive-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.archive-header h2 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
}

.archive-info {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Improved Load More */
.hp-load-more a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    background: transparent;
    border: 2px solid var(--border);
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text);
    transition: all 0.2s;
}

.hp-load-more a:hover {
    background: var(--bg-card);
    border-color: #6366f1;
    color: #6366f1;
}

.hp-load-more a svg {
    transform: rotate(180deg);
}


/* ==========================================================================
   POST HERO - IMMERSIVE DESIGN
   ========================================================================== */

.post-hero {
    position: relative;
    min-height: 480px;
    display: flex;
    align-items: flex-end;
    padding: 60px 0;
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .post-hero {
        min-height: 400px;
        padding: 40px 0;
    }
}

.post-hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.post-hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, 
        rgba(12, 18, 34, 0.95) 0%, 
        rgba(12, 18, 34, 0.7) 40%,
        rgba(12, 18, 34, 0.4) 100%);
}

[data-theme="light"] .post-hero-overlay {
    background: linear-gradient(to top, 
        rgba(255, 255, 255, 0.98) 0%, 
        rgba(255, 255, 255, 0.85) 40%,
        rgba(255, 255, 255, 0.6) 100%);
}

.post-hero-gradient {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4338ca 100%);
}

.post-hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 24px;
}

.post-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8125rem;
    color: rgba(255,255,255,0.6);
    margin-bottom: 20px;
}

[data-theme="light"] .post-breadcrumb {
    color: var(--text-muted);
}

.post-breadcrumb a {
    color: rgba(255,255,255,0.8);
    transition: color 0.2s;
}

[data-theme="light"] .post-breadcrumb a {
    color: var(--text-secondary);
}

.post-breadcrumb a:hover {
    color: #fff;
}

[data-theme="light"] .post-breadcrumb a:hover {
    color: var(--text);
}

.post-category {
    display: inline-block;
    padding: 8px 16px;
    background: #6366f1;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

.post-hero-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: #fff;
    margin-bottom: 20px;
}

[data-theme="light"] .post-hero-title {
    color: var(--text);
}

@media (max-width: 768px) {
    .post-hero-title {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .post-hero-title {
        font-size: 1.625rem;
    }
}

.post-hero-excerpt {
    font-size: 1.25rem;
    line-height: 1.6;
    color: rgba(255,255,255,0.8);
    margin-bottom: 28px;
    max-width: 700px;
}

[data-theme="light"] .post-hero-excerpt {
    color: var(--text-secondary);
}

@media (max-width: 768px) {
    .post-hero-excerpt {
        font-size: 1.0625rem;
    }
}

.post-hero-meta {
    display: flex;
    align-items: center;
    gap: 32px;
    flex-wrap: wrap;
}

@media (max-width: 600px) {
    .post-hero-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
}

.post-hero-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.post-hero-author img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.2);
}

.author-initial {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.author-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.author-name {
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
}

[data-theme="light"] .author-name {
    color: var(--text);
}

.author-title {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.6);
}

[data-theme="light"] .author-title {
    color: var(--text-muted);
}

.post-hero-stats {
    display: flex;
    align-items: center;
    gap: 20px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    color: rgba(255,255,255,0.7);
}

[data-theme="light"] .stat-item {
    color: var(--text-muted);
}

/* ==========================================================================
   ARTICLE CONTAINER & GRID
   ========================================================================== */

.article-container {
    background: var(--bg);
    padding: 48px 0 64px;
}

.article-grid {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 60px 1fr 280px;
    gap: 48px;
}

@media (max-width: 1200px) {
    .article-grid {
        grid-template-columns: 1fr;
        max-width: 780px;
        gap: 32px;
    }
}

/* Share Sidebar */
.share-sidebar {
    position: relative;
}

@media (max-width: 1200px) {
    .share-sidebar {
        display: none;
    }
}

.share-sticky {
    position: sticky;
    top: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.share-label {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    writing-mode: vertical-rl;
    transform: rotate(180deg);
}

.share-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.share-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.share-btn:hover {
    transform: translateY(-2px);
}

.share-btn.twitter:hover { background: #1da1f2; color: #fff; border-color: #1da1f2; }
.share-btn.facebook:hover { background: #1877f2; color: #fff; border-color: #1877f2; }
.share-btn.linkedin:hover { background: #0a66c2; color: #fff; border-color: #0a66c2; }
.share-btn.whatsapp:hover { background: #25d366; color: #fff; border-color: #25d366; }
.share-btn.copy:hover { background: #6366f1; color: #fff; border-color: #6366f1; }

.share-btn .icon-check { display: none; }
.share-btn.copied .icon-link { display: none; }
.share-btn.copied .icon-check { display: block; }
.share-btn.copied { background: #10b981; color: #fff; border-color: #10b981; }

/* Article Main */
.article-main {
    min-width: 0;
}

/* Info Bar */
.article-info-bar {
    display: flex;
    gap: 32px;
    padding: 20px 24px;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 32px;
}

@media (max-width: 600px) {
    .article-info-bar {
        flex-direction: column;
        gap: 16px;
        padding: 16px 20px;
    }
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-label {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.info-value {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text);
}

.info-link {
    color: #6366f1;
}

.info-link:hover {
    text-decoration: underline;
}

/* Mobile TOC */
.mobile-toc {
    display: none;
    margin-bottom: 32px;
}

@media (max-width: 1200px) {
    .mobile-toc {
        display: block;
    }
}

.mobile-toc-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 16px 20px;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s;
}

.mobile-toc-btn:hover {
    border-color: #6366f1;
}

.mobile-toc-btn .chevron {
    margin-left: auto;
    transition: transform 0.2s;
}

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

.mobile-toc-nav {
    display: none;
    padding: 16px 20px;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 8px 8px;
}

.mobile-toc.open .mobile-toc-nav {
    display: block;
}

.mobile-toc-nav .toc-link {
    display: block;
    padding: 10px 14px;
    font-size: 0.875rem;
    color: var(--text-secondary);
    border-left: 2px solid var(--border);
    transition: all 0.2s;
}

.mobile-toc-nav .toc-link:hover,
.mobile-toc-nav .toc-link.active {
    color: #6366f1;
    border-left-color: #6366f1;
    background: rgba(99, 102, 241, 0.05);
}

.mobile-toc-nav .toc-link.toc-sub {
    padding-left: 28px;
    font-size: 0.8125rem;
}

/* Article Tags Section */
.article-tags-section {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-top: 48px;
    padding: 24px;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 8px;
}

@media (max-width: 500px) {
    .article-tags-section {
        flex-direction: column;
        gap: 12px;
    }
}

.tags-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
}

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

.tag-pill {
    padding: 6px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 50px;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.tag-pill:hover {
    border-color: #6366f1;
    color: #6366f1;
}

/* Author Box */
.author-box {
    margin-top: 48px;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.author-box-header {
    padding: 14px 24px;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.author-box-content {
    display: flex;
    gap: 24px;
    padding: 24px;
}

@media (max-width: 500px) {
    .author-box-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

.author-box-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.author-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    font-size: 2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.author-box-info {
    flex: 1;
}

.author-box-name {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

.author-box-name:hover {
    color: #6366f1;
}

.author-box-bio {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.author-box-social {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

@media (max-width: 500px) {
    .author-box-social {
        justify-content: center;
    }
}

.author-box-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text-muted);
    transition: all 0.2s;
}

.author-box-social a:hover {
    color: #6366f1;
    border-color: #6366f1;
}

.author-more-link {
    width: auto !important;
    height: auto !important;
    padding: 8px 16px !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    font-size: 0.875rem;
    font-weight: 500;
    color: #6366f1 !important;
}

.author-more-link:hover {
    text-decoration: underline;
}

/* TOC Sidebar */
.toc-sidebar {
    position: relative;
}

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

.toc-sticky {
    position: sticky;
    top: 100px;
    padding: 20px;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.toc-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.toc-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: 350px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.toc-nav::-webkit-scrollbar {
    width: 4px;
}

.toc-nav::-webkit-scrollbar-track {
    background: var(--border);
    border-radius: 2px;
}

.toc-nav::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 2px;
}

.toc-nav .toc-link {
    display: block;
    padding: 8px 12px;
    font-size: 0.8125rem;
    line-height: 1.4;
    color: var(--text-secondary);
    border-left: 2px solid transparent;
    border-radius: 0 4px 4px 0;
    transition: all 0.15s;
}

.toc-nav .toc-link:hover {
    color: var(--text);
    background: var(--bg-card);
}

.toc-nav .toc-link.active {
    color: #6366f1;
    border-left-color: #6366f1;
    background: rgba(99, 102, 241, 0.1);
    font-weight: 500;
}

.toc-nav .toc-link.toc-sub {
    padding-left: 24px;
    font-size: 0.75rem;
}

.toc-progress {
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.toc-progress-track {
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.toc-progress-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    border-radius: 3px;
    transition: width 0.15s;
}

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

/* Related Section */
.related-section {
    padding: 80px 0;
    background: var(--bg-alt);
}

.related-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.related-header {
    margin-bottom: 40px;
}

.related-header h2 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.related-bar {
    width: 4px;
    height: 24px;
    background: linear-gradient(180deg, #6366f1, #8b5cf6);
    border-radius: 2px;
}

.related-header p {
    font-size: 1rem;
    color: var(--text-muted);
    margin-left: 16px;
}

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

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

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

.related-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.related-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.related-img {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
}

.related-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.related-card:hover .related-img img {
    transform: scale(1.05);
}

.related-cat {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 5px 12px;
    background: #6366f1;
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 4px;
}

.related-body {
    padding: 20px;
}

.related-body h3 {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-body p {
    font-size: 0.8125rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Post Newsletter */
.post-newsletter {
    padding: 80px 24px;
    background: var(--bg);
}

.newsletter-container {
    max-width: 560px;
    margin: 0 auto;
    text-align: center;
}

.newsletter-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 50%;
    color: #6366f1;
    margin: 0 auto 24px;
}

.newsletter-container h3 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.newsletter-container p {
    font-size: 1.0625rem;
    color: var(--text-secondary);
    margin-bottom: 28px;
}

.newsletter-form {
    display: flex;
    gap: 12px;
}

@media (max-width: 500px) {
    .newsletter-form {
        flex-direction: column;
    }
}

.newsletter-form input {
    flex: 1;
    padding: 16px 20px;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    color: var(--text);
}

.newsletter-form input:focus {
    outline: none;
    border-color: #6366f1;
}

.newsletter-form button {
    padding: 16px 32px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.newsletter-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
}

/* ==========================================================================
   ARTICLE CONTENT OVERRIDES - FIXED TYPOGRAPHY & READABILITY
   ========================================================================== */

/* Reduce base font size */
.article-content.gh-content,
.gh-content {
    font-size: 1rem;
    line-height: 1.75;
    color: var(--text-secondary);
}

.article-content.gh-content > * {
    margin-bottom: 1.25em;
}

/* H2 - Major sections - Very distinct */
.article-content.gh-content h2,
.gh-content h2 {
    font-size: 1.625rem;
    font-weight: 700;
    color: var(--text);
    margin-top: 3rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border);
    position: relative;
}

.article-content.gh-content h2::before,
.gh-content h2::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
}

/* H3 - Sub-sections - Smaller, no border */
.article-content.gh-content h3,
.gh-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    padding-left: 12px;
    border-left: 3px solid #6366f1;
}

/* H4 - Minor sections */
.article-content.gh-content h4,
.gh-content h4 {
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--text);
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

/* Paragraphs */
.article-content.gh-content p,
.gh-content p {
    font-size: 1rem;
    margin-bottom: 1.25em;
}

/* Links */
.article-content.gh-content a,
.gh-content a {
    color: #6366f1;
    text-decoration: underline;
    text-decoration-color: rgba(99, 102, 241, 0.3);
    text-underline-offset: 2px;
    transition: all 0.2s;
}

.article-content.gh-content a:hover,
.gh-content a:hover {
    color: #4f46e5;
    text-decoration-color: #4f46e5;
}

/* Lists - Better formatting */
.article-content.gh-content ul,
.article-content.gh-content ol,
.gh-content ul,
.gh-content ol {
    padding-left: 1.5em;
    margin-bottom: 1.25em;
}

.article-content.gh-content li,
.gh-content li {
    margin-bottom: 0.5em;
    font-size: 1rem;
}

.article-content.gh-content ul li::marker {
    color: #6366f1;
}

.article-content.gh-content ol li::marker {
    color: #6366f1;
    font-weight: 600;
}

/* Blockquotes - More subtle */
.article-content.gh-content blockquote,
.gh-content blockquote {
    margin: 1.5em 0;
    padding: 16px 20px;
    background: var(--bg-alt);
    border-left: 3px solid #6366f1;
    font-size: 0.9375rem;
    font-style: italic;
    color: var(--text-secondary);
}

/* Code blocks */
.article-content.gh-content pre,
.gh-content pre {
    margin: 1.5em 0;
    padding: 16px 20px;
    background: #1e1e2e;
    border-radius: 6px;
    overflow-x: auto;
    font-size: 0.875rem;
    line-height: 1.6;
}

.article-content.gh-content code,
.gh-content code {
    font-family: var(--font-mono);
    font-size: 0.875em;
    padding: 2px 6px;
    background: var(--bg-alt);
    border-radius: 3px;
    color: #e879f9;
}

.article-content.gh-content pre code,
.gh-content pre code {
    padding: 0;
    background: transparent;
    color: #e2e8f0;
}

/* Tables - More compact */
.article-content.gh-content table,
.gh-content table {
    width: 100%;
    margin: 1.5em 0;
    border-collapse: collapse;
    font-size: 0.9375rem;
}

.article-content.gh-content th,
.article-content.gh-content td,
.gh-content th,
.gh-content td {
    padding: 10px 14px;
    border: 1px solid var(--border);
    text-align: left;
}

.article-content.gh-content th,
.gh-content th {
    background: var(--bg-alt);
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--text-muted);
}

/* Images */
.article-content.gh-content img,
.gh-content img {
    border-radius: 4px;
    margin: 1.5em 0;
}

.article-content.gh-content figure,
.gh-content figure {
    margin: 1.5em 0;
}

.article-content.gh-content figcaption,
.gh-content figcaption {
    margin-top: 8px;
    font-size: 0.8125rem;
    color: var(--text-muted);
    text-align: center;
}

/* HR */
.article-content.gh-content hr,
.gh-content hr {
    margin: 2.5em 0;
    border: none;
    border-top: 1px solid var(--border);
}

/* ==========================================================================
   STEP-BY-STEP CARDS
   ========================================================================== */

.gh-content .step-card,
.article-content .step-card {
    display: flex;
    gap: 20px;
    margin: 1.5em 0;
    padding: 24px;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 8px;
    border-left: 4px solid #6366f1;
}

.gh-content .step-card .step-number,
.article-content .step-card .step-number {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    font-size: 1.125rem;
    font-weight: 700;
    border-radius: 50%;
}

.gh-content .step-card h3,
.article-content .step-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 8px 0;
    padding: 0;
    border: none;
}

.gh-content .step-card p,
.article-content .step-card p {
    font-size: 0.9375rem;
    margin: 0;
    color: var(--text-secondary);
}

/* ==========================================================================
   TROUBLESHOOTING CARDS
   ========================================================================== */

.gh-content .troubleshoot-card,
.article-content .troubleshoot-card {
    margin: 1.5em 0;
    padding: 20px 24px;
    background: rgba(239, 68, 68, 0.05);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 8px;
    border-left: 4px solid #ef4444;
}

.gh-content .troubleshoot-card h4,
.article-content .troubleshoot-card h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    font-weight: 600;
    color: #ef4444;
    margin: 0 0 12px 0;
    padding: 0;
}

.gh-content .troubleshoot-card h4::before,
.article-content .troubleshoot-card h4::before {
    content: '⚠';
    font-size: 1.125rem;
}

.gh-content .troubleshoot-card p,
.article-content .troubleshoot-card p {
    font-size: 0.9375rem;
    margin: 0;
    color: var(--text-secondary);
}

/* ==========================================================================
   INFO/TIP/WARNING BOXES
   ========================================================================== */

.gh-content .info-box,
.article-content .info-box {
    margin: 1.5em 0;
    padding: 16px 20px;
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 6px;
    border-left: 4px solid #3b82f6;
}

.gh-content .info-box::before,
.article-content .info-box::before {
    content: 'ℹ️ Info';
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #3b82f6;
    margin-bottom: 8px;
}

.gh-content .tip-box,
.article-content .tip-box {
    margin: 1.5em 0;
    padding: 16px 20px;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 6px;
    border-left: 4px solid #10b981;
}

.gh-content .tip-box::before,
.article-content .tip-box::before {
    content: '💡 Tip';
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #10b981;
    margin-bottom: 8px;
}

.gh-content .warning-box,
.article-content .warning-box {
    margin: 1.5em 0;
    padding: 16px 20px;
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 6px;
    border-left: 4px solid #f59e0b;
}

.gh-content .warning-box::before,
.article-content .warning-box::before {
    content: '⚠️ Warning';
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #f59e0b;
    margin-bottom: 8px;
}

/* ==========================================================================
   CARDS - SQUARED (NO BORDER-RADIUS)
   ========================================================================== */

.hp-card,
.related-card,
.hp-featured,
.tag-card,
.author-card {
    border-radius: 0 !important;
}

.hp-card-img,
.related-img,
.hp-featured-img {
    border-radius: 0 !important;
}

.hp-badge,
.related-cat,
.post-category {
    border-radius: 0 !important;
}

/* ==========================================================================
   TOC SIDEBAR - FIXED STICKY BEHAVIOR
   ========================================================================== */

.toc-sidebar {
    position: relative;
    align-self: start;
}

.toc-sticky {
    position: sticky;
    top: 80px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    padding: 20px;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 0;
}

.toc-nav {
    max-height: none;
    overflow-y: visible;
}

/* Scrollbar for TOC if needed */
.toc-sticky::-webkit-scrollbar {
    width: 4px;
}

.toc-sticky::-webkit-scrollbar-track {
    background: transparent;
}

.toc-sticky::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 2px;
}

/* ==========================================================================
   SHARE SIDEBAR - SQUARED
   ========================================================================== */

.share-btn {
    border-radius: 0 !important;
}

/* ==========================================================================
   AUTHOR BOX - SQUARED
   ========================================================================== */

.author-box {
    border-radius: 0 !important;
}

.author-box-avatar img,
.author-placeholder {
    border-radius: 0 !important;
}

/* ==========================================================================
   ARTICLE INFO BAR - SQUARED
   ========================================================================== */

.article-info-bar {
    border-radius: 0 !important;
}

.mobile-toc-btn {
    border-radius: 0 !important;
}

.mobile-toc-nav {
    border-radius: 0 !important;
}

/* ==========================================================================
   TAG PILLS - SQUARED
   ========================================================================== */

.tag-pill {
    border-radius: 0 !important;
}

.article-tags-section {
    border-radius: 0 !important;
}

/* ==========================================================================
   NEWSLETTER - SQUARED
   ========================================================================== */

.newsletter-form input,
.newsletter-form button {
    border-radius: 0 !important;
}

.newsletter-icon {
    border-radius: 0 !important;
}

/* ==========================================================================
   CODE BLOCKS - SQUARED
   ========================================================================== */

.article-content.gh-content pre,
.gh-content pre {
    border-radius: 0 !important;
}

.article-content.gh-content code,
.gh-content code {
    border-radius: 0 !important;
}

/* ==========================================================================
   BUTTONS & INPUTS GLOBAL - SQUARED
   ========================================================================== */

button,
input,
.hp-load-more a,
.pagination-btn {
    border-radius: 0 !important;
}

/* ==========================================================================
   RESPONSIVE & UX IMPROVEMENTS - COMPREHENSIVE
   ========================================================================== */

/* --------------------------------------
   GLOBAL RESPONSIVE TYPOGRAPHY
   -------------------------------------- */

html {
    font-size: 16px;
}

@media (max-width: 768px) {
    html {
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }
}

/* --------------------------------------
   CONTAINER & SPACING
   -------------------------------------- */

.hp-container,
.article-container,
.related-container,
.newsletter-container {
    padding-left: 20px;
    padding-right: 20px;
}

@media (max-width: 480px) {
    .hp-container,
    .article-container,
    .related-container,
    .newsletter-container {
        padding-left: 16px;
        padding-right: 16px;
    }
}

/* --------------------------------------
   HEADER - IMPROVED MOBILE
   -------------------------------------- */

@media (max-width: 900px) {
    .main-nav {
        display: none;
    }
    
    .header-actions .search-btn,
    .header-actions .theme-btn {
        display: none;
    }
    
    #menuToggle {
        display: flex;
    }
}

/* Mobile Menu - Full Screen */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 320px;
    height: 100vh;
    background: var(--bg);
    z-index: 1001;
    transition: right 0.3s ease;
    overflow-y: auto;
    border-left: 1px solid var(--border);
}

.mobile-menu.active {
    right: 0;
}

.mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    visibility: hidden;
    z-index: 1000;
    transition: all 0.3s;
}

.mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* --------------------------------------
   HOMEPAGE - RESPONSIVE GRIDS
   -------------------------------------- */

/* Hero Featured */
@media (max-width: 768px) {
    .hp-hero {
        padding: 24px 0;
    }
    
    .hp-featured {
        min-height: 350px;
    }
    
    .hp-featured-body h2 {
        font-size: 1.5rem;
    }
    
    .hp-featured-body p {
        display: none;
    }
}

@media (max-width: 480px) {
    .hp-featured {
        min-height: 280px;
    }
    
    .hp-featured-body h2 {
        font-size: 1.25rem;
    }
}

/* Card Grids */
.hp-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

@media (max-width: 1100px) {
    .hp-grid-4 {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

@media (max-width: 800px) {
    .hp-grid-4 {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

@media (max-width: 500px) {
    .hp-grid-4 {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

/* Section Headers */
@media (max-width: 600px) {
    .hp-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .hp-section-header h2 {
        font-size: 1.125rem;
    }
}

/* Categories Row */
@media (max-width: 768px) {
    .hp-cat-list {
        gap: 10px;
    }
    
    .hp-cat-item {
        padding: 10px 16px;
        font-size: 0.8125rem;
    }
}

@media (max-width: 480px) {
    .hp-categories {
        padding: 24px 0;
    }
    
    .hp-cat-list {
        justify-content: flex-start;
    }
    
    .hp-cat-item {
        padding: 8px 14px;
        font-size: 0.75rem;
    }
}

/* Cards */
@media (max-width: 600px) {
    .hp-card-body {
        padding: 16px;
    }
    
    .hp-card-body h3 {
        font-size: 1rem;
    }
    
    .hp-card-body p {
        font-size: 0.8125rem;
        -webkit-line-clamp: 2;
    }
}

/* Load More */
@media (max-width: 480px) {
    .hp-load-more a {
        width: 100%;
        justify-content: center;
        padding: 14px 24px;
    }
}

/* Newsletter */
@media (max-width: 600px) {
    .hp-newsletter-box {
        padding: 32px 20px;
    }
    
    .hp-newsletter-box h2 {
        font-size: 1.25rem;
    }
    
    .hp-newsletter-form {
        flex-direction: column;
    }
    
    .hp-newsletter-form input,
    .hp-newsletter-form button {
        width: 100%;
    }
}

/* --------------------------------------
   POST PAGE - RESPONSIVE
   -------------------------------------- */

/* Hero */
@media (max-width: 768px) {
    .post-hero {
        min-height: 380px;
        padding: 40px 0;
    }
    
    .post-hero-content {
        padding: 0 20px;
    }
    
    .post-hero-title {
        font-size: 1.75rem;
    }
    
    .post-hero-excerpt {
        font-size: 1rem;
        margin-bottom: 20px;
    }
    
    .post-breadcrumb {
        font-size: 0.75rem;
        margin-bottom: 16px;
    }
    
    .post-category {
        padding: 6px 12px;
        font-size: 0.6875rem;
    }
}

@media (max-width: 480px) {
    .post-hero {
        min-height: 320px;
        padding: 32px 0;
    }
    
    .post-hero-content {
        padding: 0 16px;
    }
    
    .post-hero-title {
        font-size: 1.5rem;
    }
    
    .post-hero-excerpt {
        display: none;
    }
}

/* Hero Meta */
@media (max-width: 600px) {
    .post-hero-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .post-hero-author img,
    .author-initial {
        width: 40px;
        height: 40px;
    }
    
    .post-hero-stats {
        gap: 16px;
    }
    
    .stat-item {
        font-size: 0.8125rem;
    }
}

/* Article Grid - 3 col to 1 col */
@media (max-width: 1200px) {
    .article-grid {
        grid-template-columns: 1fr;
        max-width: 720px;
        gap: 24px;
    }
    
    .share-sidebar,
    .toc-sidebar {
        display: none;
    }
}

/* Article Container */
@media (max-width: 768px) {
    .article-container {
        padding: 32px 0 48px;
    }
    
    .article-grid {
        padding: 0 20px;
    }
}

@media (max-width: 480px) {
    .article-container {
        padding: 24px 0 40px;
    }
    
    .article-grid {
        padding: 0 16px;
    }
}

/* Info Bar */
@media (max-width: 600px) {
    .article-info-bar {
        flex-direction: column;
        gap: 12px;
        padding: 16px;
    }
    
    .info-item {
        flex-direction: row;
        justify-content: space-between;
        width: 100%;
        padding-bottom: 12px;
        border-bottom: 1px solid var(--border);
    }
    
    .info-item:last-child {
        padding-bottom: 0;
        border-bottom: none;
    }
}

/* Mobile TOC - Improved */
@media (max-width: 1200px) {
    .mobile-toc {
        display: block;
        margin-bottom: 24px;
    }
    
    .mobile-toc-btn {
        padding: 14px 16px;
        font-size: 0.875rem;
    }
    
    .mobile-toc-nav {
        max-height: 300px;
        overflow-y: auto;
    }
    
    .mobile-toc-nav .toc-link {
        padding: 12px 14px;
        font-size: 0.875rem;
    }
}

/* Article Content */
@media (max-width: 768px) {
    .article-content.gh-content,
    .gh-content {
        font-size: 0.9375rem;
        line-height: 1.7;
    }
    
    .article-content.gh-content h2,
    .gh-content h2 {
        font-size: 1.375rem;
        margin-top: 2.5rem;
    }
    
    .article-content.gh-content h3,
    .gh-content h3 {
        font-size: 1.125rem;
        margin-top: 1.75rem;
    }
    
    .article-content.gh-content blockquote,
    .gh-content blockquote {
        padding: 14px 16px;
        margin: 1.25em 0;
    }
    
    .article-content.gh-content pre,
    .gh-content pre {
        padding: 14px 16px;
        font-size: 0.8125rem;
        margin: 1.25em -16px;
        border-radius: 0 !important;
    }
}

@media (max-width: 480px) {
    .article-content.gh-content,
    .gh-content {
        font-size: 0.9375rem;
    }
    
    .article-content.gh-content h2,
    .gh-content h2 {
        font-size: 1.25rem;
    }
    
    .article-content.gh-content h3,
    .gh-content h3 {
        font-size: 1.0625rem;
    }
}

/* Step Cards - Mobile */
@media (max-width: 600px) {
    .gh-content .step-card,
    .article-content .step-card {
        flex-direction: column;
        gap: 16px;
        padding: 20px;
    }
    
    .gh-content .step-card .step-number,
    .article-content .step-card .step-number {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
}

/* Troubleshooting Cards - Mobile */
@media (max-width: 600px) {
    .gh-content .troubleshoot-card,
    .article-content .troubleshoot-card {
        padding: 16px;
    }
}

/* Info/Tip/Warning Boxes - Mobile */
@media (max-width: 600px) {
    .gh-content .info-box,
    .gh-content .tip-box,
    .gh-content .warning-box,
    .article-content .info-box,
    .article-content .tip-box,
    .article-content .warning-box {
        padding: 14px 16px;
        margin: 1.25em -16px;
        border-radius: 0 !important;
        border-left-width: 3px;
    }
}

/* Tags Section */
@media (max-width: 500px) {
    .article-tags-section {
        flex-direction: column;
        gap: 12px;
        padding: 16px;
    }
    
    .tags-list {
        gap: 6px;
    }
    
    .tag-pill {
        padding: 5px 10px;
        font-size: 0.75rem;
    }
}

/* Author Box */
@media (max-width: 600px) {
    .author-box-content {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }
    
    .author-box-avatar img,
    .author-placeholder {
        width: 64px;
        height: 64px;
        margin: 0 auto;
    }
    
    .author-box-name {
        font-size: 1.125rem;
    }
    
    .author-box-bio {
        font-size: 0.875rem;
    }
    
    .author-box-social {
        justify-content: center;
    }
}

/* --------------------------------------
   RELATED SECTION - RESPONSIVE
   -------------------------------------- */

@media (max-width: 768px) {
    .related-section {
        padding: 48px 0;
    }
    
    .related-header {
        margin-bottom: 24px;
    }
    
    .related-header h2 {
        font-size: 1.25rem;
    }
}

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

@media (max-width: 1024px) {
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 500px) {
    .related-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .related-card {
        display: flex;
        flex-direction: row;
    }
    
    .related-card a {
        display: flex;
        width: 100%;
    }
    
    .related-img {
        width: 120px;
        flex-shrink: 0;
        aspect-ratio: 1;
    }
    
    .related-body {
        flex: 1;
        padding: 16px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    
    .related-body h3 {
        font-size: 0.9375rem;
        margin-bottom: 6px;
        -webkit-line-clamp: 2;
    }
    
    .related-body p {
        display: none;
    }
}

/* --------------------------------------
   NEWSLETTER SECTION - RESPONSIVE
   -------------------------------------- */

@media (max-width: 600px) {
    .post-newsletter {
        padding: 48px 16px;
    }
    
    .newsletter-container {
        padding: 0;
    }
    
    .newsletter-icon {
        width: 56px;
        height: 56px;
    }
    
    .newsletter-container h3 {
        font-size: 1.375rem;
    }
    
    .newsletter-container p {
        font-size: 0.9375rem;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .newsletter-form input,
    .newsletter-form button {
        width: 100%;
        padding: 14px 16px;
    }
}

/* --------------------------------------
   TAG PAGE - RESPONSIVE
   -------------------------------------- */

@media (max-width: 768px) {
    .tag-hero {
        padding: 48px 20px;
        min-height: auto;
    }
    
    .tag-hero h1 {
        font-size: 1.75rem;
    }
    
    .tag-description {
        font-size: 0.9375rem;
    }
}

@media (max-width: 480px) {
    .tag-hero {
        padding: 32px 16px;
    }
    
    .tag-hero h1 {
        font-size: 1.5rem;
    }
}

/* --------------------------------------
   AUTHOR PAGE - RESPONSIVE
   -------------------------------------- */

@media (max-width: 768px) {
    .author-hero {
        padding: 48px 20px;
    }
    
    .author-avatar-large {
        width: 80px;
        height: 80px;
    }
    
    .author-hero h1 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .author-hero {
        padding: 32px 16px;
    }
    
    .author-stats {
        flex-direction: column;
        gap: 8px;
    }
}

/* --------------------------------------
   PAGINATION - RESPONSIVE
   -------------------------------------- */

@media (max-width: 500px) {
    .pagination {
        flex-direction: column;
        gap: 12px;
    }
    
    .pagination-btn {
        width: 100%;
        justify-content: center;
    }
}

/* --------------------------------------
   FOOTER - RESPONSIVE
   -------------------------------------- */

@media (max-width: 768px) {
    .site-footer {
        padding: 40px 20px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

/* --------------------------------------
   TOUCH TARGETS - MINIMUM 44px
   -------------------------------------- */

@media (max-width: 768px) {
    .share-btn,
    .mobile-toc-btn,
    .hp-cat-item,
    .tag-pill,
    .pagination-btn,
    .hp-load-more a,
    .newsletter-form button,
    .author-box-social a {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Links in content - larger touch area */
    .article-content.gh-content a,
    .gh-content a {
        padding: 2px 0;
    }
}

/* --------------------------------------
   SMOOTH SCROLLING - REDUCED MOTION
   -------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* --------------------------------------
   DARK MODE CONTRAST FIXES
   -------------------------------------- */

@media (prefers-color-scheme: dark) {
    .article-content.gh-content,
    .gh-content {
        color: var(--text-secondary);
    }
}

/* --------------------------------------
   PRINT STYLES
   -------------------------------------- */

@media print {
    .site-header,
    .site-footer,
    .share-sidebar,
    .toc-sidebar,
    .mobile-toc,
    .post-newsletter,
    .related-section {
        display: none !important;
    }
    
    .post-hero {
        min-height: auto;
        padding: 20px 0;
    }
    
    .post-hero-bg {
        display: none;
    }
    
    .post-hero-content {
        position: static;
    }
    
    .post-hero-title {
        color: #000;
    }
    
    .article-content.gh-content {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
    }
}

/* ==========================================================================
   MOBILE MENU - IMPROVED UX
   ========================================================================== */

/* Overlay */
.mobile-menu-overlay,
.mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    z-index: 1000;
    transition: all 0.3s ease;
}

.mobile-menu-overlay.active,
.mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Menu Panel */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 300px;
    height: 100vh;
    height: 100dvh;
    background: var(--bg);
    border-left: 1px solid var(--border);
    z-index: 1001;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.mobile-menu.active {
    right: 0;
}

/* Header */
.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.mobile-menu-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
}

.mobile-menu-close {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s;
}

.mobile-menu-close:hover {
    background: var(--bg-hover);
}

/* Navigation */
.mobile-nav {
    flex: 1;
    overflow-y: auto;
    padding: 16px 0;
}

.mobile-nav-item {
    display: block;
}

.mobile-nav-item > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text);
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.mobile-nav-item > a:hover,
.mobile-nav-item > a:active {
    background: var(--bg-alt);
    border-left-color: #6366f1;
}

/* Dropdown */
.mobile-nav-item.nav-has-child > a::after {
    content: '';
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--text-muted);
    border-bottom: 2px solid var(--text-muted);
    transform: rotate(45deg);
    transition: transform 0.2s;
}

.mobile-nav-item.nav-has-child.open > a::after {
    transform: rotate(-135deg);
}

.mobile-dropdown {
    display: none;
    background: var(--bg-alt);
    padding: 8px 0;
}

.mobile-nav-item.nav-has-child.open .mobile-dropdown {
    display: block;
}

.mobile-dropdown a {
    display: block;
    padding: 12px 20px 12px 36px;
    font-size: 0.9375rem;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.mobile-dropdown a:hover {
    color: var(--text);
    background: var(--bg-hover);
}

/* Footer */
.mobile-menu-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
    display: flex;
    gap: 12px;
}

.mobile-menu-footer button {
    flex: 1;
    padding: 12px;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.mobile-menu-footer button:hover {
    background: var(--bg-hover);
}

/* Sign In Button */
.mobile-signin {
    display: block;
    margin: 16px 20px;
    padding: 14px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    font-size: 0.9375rem;
    font-weight: 600;
    text-align: center;
    transition: all 0.2s;
}

.mobile-signin:hover {
    opacity: 0.9;
}

/* ==========================================================================
   HAMBURGER ANIMATION
   ========================================================================== */

.menu-toggle {
    width: 44px;
    height: 44px;
    display: none;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
}

@media (max-width: 900px) {
    .menu-toggle {
        display: flex;
    }
}

.menu-toggle svg {
    width: 24px;
    height: 24px;
    color: var(--text);
}

/* ==========================================================================
   SMOOTH SCROLL OFFSET FOR FIXED HEADER
   ========================================================================== */

html {
    scroll-padding-top: 80px;
}

/* Target for anchor links */
[id] {
    scroll-margin-top: 80px;
}
