:root {
    --primary: #059669;
    --secondary: #64748b;
    --accent: #10b981;
    --bg: #ffffff;
    --surface: #f8fafc;
    --text: #1e293b;
    --text-light: #64748b;
    --border: #e2e8f0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
}

/* Navigation */
header {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-menu a:hover {
    color: var(--primary);
}

/* Main content */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    min-height: calc(100vh - 140px);
}

/* Hero section */
.hero {
    text-align: center;
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--surface) 0%, var(--bg) 100%);
    margin: 0 -2rem 4rem;
}

.hero-content h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: #047857;
}

.btn-secondary {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background: var(--primary);
    color: white;
}

/* Posts */
.recent-posts, .posts-list {
    margin-bottom: 4rem;
}

.recent-posts h2, .page-header h1 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--text);
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.post-card, .post-summary {
    background: var(--surface);
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border);
}

.post-card h3, .post-summary h2 {
    margin-bottom: 0.5rem;
}

.post-card h3 a, .post-summary h2 a {
    color: var(--text);
    text-decoration: none;
}

.post-card h3 a:hover, .post-summary h2 a:hover {
    color: var(--primary);
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

.post-meta time {
    display: flex;
    align-items: center;
}

.post-meta time:before {
    content: '📅';
    margin-right: 0.5rem;
}

.read-more {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

/* Post layout - clean typography focused */
.post-layout {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
}

.post {
    margin: 3rem 0;
    line-height: 1.7;
}

.post-header {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.post-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text);
}

.post-meta {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 0;
}

.post-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.post-content h2 {
    font-size: 1.75rem;
    margin: 3rem 0 1.5rem;
    font-weight: 600;
    color: var(--text);
}

.post-content h3 {
    font-size: 1.4rem;
    margin: 2.5rem 0 1rem;
    font-weight: 600;
    color: var(--text);
}

.post-content p {
    margin-bottom: 1.5rem;
    max-width: 70ch;
}

.post-content blockquote {
    border-left: 4px solid var(--primary);
    padding-left: 2rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--text-light);
}

.post-content code {
    border-radius: 0.25rem;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
    font-size: 0.85em;
}

.post-content pre {
    background: var(--surface);
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 1rem 0;
    font-size: 0.9rem;
}

/* Compact TOC - top right corner */
.toc-container {
    position: fixed;
    top: 50%;
    right: 2rem;
    transform: translateY(-50%);
    width: 220px;
    max-height: 80vh;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 50;
    opacity: 0.9;
    transition: opacity 0.2s;
    display: flex;
    flex-direction: column;
}

.toc-container:hover {
    opacity: 1;
}
    margin-top: 2rem;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .toc-container {
        flex: 0 0 200px;
    }
}

@media (max-width: 1024px) {
    .post-header.floating {
        padding: 0.5rem 1rem;
    }
    
    .post-header.floating .post-meta {
        display: block;
        margin-left: 0;
        margin-top: 0.25rem;
    }
    
    .post-header.floating .tags {
        margin-left: 0;
    }
}

.post-content {
    line-height: 1.8;
}

.post-content h2, .post-content h3 {
    margin: 2rem 0 1rem;
    color: var(--text);
}

.post-content p {
    margin-bottom: 1rem;
}

    margin: 1rem 0;
}

/* Footer */
footer {
    background: var(--surface);
    text-align: center;
    padding: 2rem;
    margin-top: 4rem;
    border-top: 1px solid var(--border);
    color: var(--text-light);
}

/* Professional tag styling */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.tag {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    background: linear-gradient(135deg, var(--primary), #10b981);
    color: white;
    text-decoration: none;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.025em;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.tag:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(5, 150, 105, 0.3);
    background: linear-gradient(135deg, #047857, var(--primary));
}

/* Tags cloud */
.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.tag-cloud-item {
    background: var(--surface);
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    text-decoration: none;
    color: var(--text);
    border: 1px solid var(--border);
    transition: all 0.2s;
}

.tag-cloud-item:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.tag-count {
    color: var(--text-light);
    font-size: 0.875rem;
}

.tag-cloud-item:hover .tag-count {
    color: rgba(255, 255, 255, 0.8);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 3rem 0;
    padding: 2rem 0;
    border-top: 1px solid var(--border);
}

.pagination-link {
    background: var(--primary);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s;
}

.pagination-link:hover {
    background: #1d4ed8;
}

.pagination-info {
    color: var(--text-light);
    font-weight: 500;
}

/* Blog layout with sidebar */
.blog-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
    margin-top: 2rem;
}

.blog-content {
    min-width: 0;
}

.blog-sidebar {
    background: var(--surface);
    padding: 2rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.sidebar-section {
    margin-bottom: 2rem;
}

.sidebar-section:last-child {
    margin-bottom: 0;
}

.sidebar-section h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--text);
    border-bottom: 2px solid var(--primary);
    padding-bottom: 0.5rem;
}

.tag-list, .recent-list, .archive-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-tag, .recent-post, .archive-year {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    text-decoration: none;
    color: var(--text);
    transition: all 0.2s;
    background: rgba(5, 150, 105, 0.05);
    border: 1px solid rgba(5, 150, 105, 0.1);
}

.sidebar-tag:hover, .recent-post:hover, .archive-year:hover {
    background: var(--primary);
    color: white;
    transform: translateX(2px);
}

.sidebar-tag span, .archive-year span {
    font-size: 0.7rem;
    background: rgba(5, 150, 105, 0.1);
    color: var(--primary);
    padding: 0.15rem 0.4rem;
    border-radius: 0.75rem;
    font-weight: 600;
}

.sidebar-tag:hover span, .archive-year:hover span {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.recent-title {
    font-weight: 500;
    flex: 1;
    margin-right: 0.5rem;
}

.recent-date {
    font-size: 0.75rem;
    color: var(--text-light);
}

.recent-post:hover .recent-date {
    color: rgba(255, 255, 255, 0.8);
}

/* Floating TOC */
.toc-content {
    padding: 0;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.toc-content h4 {
    font-size: 0.8rem;
    margin: 0;
    padding: 1rem 1rem 0.75rem;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    background: var(--surface);
    position: sticky;
    top: 0;
    z-index: 1;
}

.toc-content ul {
    list-style: none;
    padding: 0 0.2rem 0.5rem;
    margin: 0;
}

.toc-content li {
    margin: 0.2rem 0;
}

.toc-content a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.8rem;
    display: block;
    padding: 0.3rem 0.5rem;
    transition: all 0.2s;
    line-height: 1.3;
    border-radius: 0.25rem;
}

.toc-content a:hover {
    color: var(--primary);
    background: rgba(37, 99, 235, 0.1);
}

.toc-content a.active {
    color: var(--primary);
    font-weight: 600;
    background: rgba(37, 99, 235, 0.15);
    border-left: 3px solid var(--primary);
    padding-left: 0.4rem;
}

/* Post layout adjustments */
.post-layout {
    position: relative;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .post-layout {
        flex-direction: column;
        padding: 0 1rem;
    }
    
    .toc-container {
        flex: none;
        position: static;
        margin-top: 0;
        order: -1;
    }
    
    .blog-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .blog-sidebar {
        position: static;
        order: -1;
    }
}

@media (max-width: 768px) {
    .toc-container {
        display: none;
    }
    
    .blog-sidebar {
        padding: 1rem;
    }
    
    .sidebar-section h3 {
        font-size: 1rem;
    }
}
/* Homepage specific styles */
.featured-content {
    max-width: 1200px;
    margin: 4rem auto;
    padding: 0 2rem;
}

.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
}

.featured-posts h2 {
    font-size: 1.75rem;
    margin-bottom: 2rem;
    color: var(--text);
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.post-card {
    background: var(--surface);
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border);
    transition: all 0.2s;
}

.post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.post-card h3 {
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
    line-height: 1.4;
}

.post-card h3 a {
    color: var(--text);
    text-decoration: none;
}

.post-card h3 a:hover {
    color: var(--primary);
}

.post-excerpt {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.read-more {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
}

.sidebar-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.stats-section, .popular-topics, .recent-activity {
    background: var(--surface);
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border);
}

.stats-section h3, .popular-topics h3, .recent-activity h3 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: var(--text);
}

.stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.topic-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.topic-tag {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: rgba(5, 150, 105, 0.05);
    border-radius: 0.5rem;
    text-decoration: none;
    color: var(--text);
    font-size: 0.9rem;
    transition: all 0.2s;
}

.topic-tag:hover {
    background: var(--primary);
    color: white;
}

.topic-tag span {
    font-size: 0.75rem;
    color: var(--text-light);
}

.topic-tag:hover span {
    color: rgba(255, 255, 255, 0.8);
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.activity-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.activity-item a {
    color: var(--text);
    text-decoration: none;
    font-size: 0.9rem;
    line-height: 1.4;
    flex: 1;
}

.activity-item a:hover {
    color: var(--primary);
}

.activity-date {
    font-size: 0.75rem;
    color: var(--text-light);
    white-space: nowrap;
}

.expertise-areas {
    background: var(--surface);
    padding: 4rem 2rem;
    margin-top: 4rem;
}

.expertise-areas h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 3rem;
    color: var(--text);
}

.expertise-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.expertise-card {
    background: var(--bg);
    padding: 2rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border);
    text-align: center;
    transition: all 0.2s;
}

.expertise-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}

.expertise-card h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.expertise-card p {
    color: var(--text-light);
    line-height: 1.6;
}

@media (max-width: 1024px) {
    .toc-container {
        display: none;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
    }
    
    .expertise-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    .stats {
        grid-template-columns: 1fr;
    }
    
    .expertise-areas {
        padding: 3rem 1rem;
    }
}
/* Professional Footer */
.site-footer {
    background: var(--text);
    color: rgba(255, 255, 255, 0.9);
    margin-top: 6rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand h3 {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.025em;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    font-size: 0.95rem;
    max-width: 300px;
}

.footer-section h4 {
    color: white;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.85rem;
}

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

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
    line-height: 1.4;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-links span {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
}

.footer-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-meta p {
    margin: 0;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
}

.footer-stats {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8) !important;
}

@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
    
    .footer-brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .footer-content {
        padding: 3rem 1rem 2rem;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-meta {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
}
/* Articles page styles */
.articles-content {
    max-width: 1200px;
    margin: 4rem auto;
    padding: 0 2rem;
}

.articles-main {
    flex: 1;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.article-card {
    background: var(--surface);
    padding: 2rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border);
    transition: all 0.2s;
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}

.article-card h2 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
    line-height: 1.4;
}

.article-card h2 a {
    color: var(--text);
    text-decoration: none;
}

.article-card h2 a:hover {
    color: var(--primary);
}

.article-meta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

.article-meta time {
    font-size: 0.9rem;
}

.article-meta .tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(5, 150, 105, 0.1);
    color: var(--primary);
    text-decoration: none;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.2s;
    border: 1px solid rgba(5, 150, 105, 0.2);
}

.tag:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-1px);
}

.article-excerpt {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.articles-sidebar {
    width: 300px;
    margin-left: 3rem;
}

.topic-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.topic-card {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    background: rgba(5, 150, 105, 0.05);
    border: 1px solid rgba(5, 150, 105, 0.1);
    border-radius: 0.5rem;
    text-decoration: none;
    color: var(--text);
    transition: all 0.2s;
}

.topic-card:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

.topic-name {
    font-weight: 500;
    font-size: 0.9rem;
}

.topic-count {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 0.25rem;
}

.topic-card:hover .topic-count {
    color: rgba(255, 255, 255, 0.8);
}

.featured-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.featured-article {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    text-decoration: none;
    color: var(--text);
    transition: all 0.2s;
}

.featured-article:hover {
    background: var(--primary);
    color: white;
    transform: translateX(4px);
}

.featured-title {
    font-weight: 500;
    font-size: 0.9rem;
    line-height: 1.4;
}

.featured-date {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 0.5rem;
}

.featured-article:hover .featured-date {
    color: rgba(255, 255, 255, 0.8);
}

@media (max-width: 1024px) {
    .articles-sidebar {
        width: 100%;
        margin-left: 0;
        margin-top: 3rem;
    }
    
    .topic-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
}

@media (max-width: 768px) {
    .articles-grid {
        grid-template-columns: 1fr;
    }
    
    .topic-grid {
        grid-template-columns: 1fr;
    }
}
/* Enhanced Search Modal */
.search-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 2rem;
    color: var(--text-light);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    width: 320px;
}

.search-shortcut {
    display: flex;
    gap: 0.125rem;
    margin-left: auto;
    margin-right: 0.5rem;
}

.search-shortcut kbd {
    background: var(--border);
    color: var(--text-light);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 0.25rem;
    padding: 0.125rem 0.375rem;
    font-size: 0.75rem;
    font-family: inherit;
    line-height: 1;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.search-trigger:hover {
    border-color: var(--primary);
    color: var(--text);
}

.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 10vh;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

.search-modal.active {
    opacity: 1;
    visibility: visible;
}

.search-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.search-modal-content {
    position: relative;
    width: 90%;
    max-width: 600px;
    max-height: 70vh;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 1rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    transform: translateY(-20px);
    transition: transform 0.2s ease;
}

.search-modal.active .search-modal-content {
    transform: translateY(0);
}

.search-modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.search-input-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    margin-bottom: 1rem;
}

.search-icon {
    color: var(--text-light);
    flex-shrink: 0;
}

#search-modal-input {
    flex: 1;
    border: none;
    background: none;
    color: var(--text);
    font-size: 1rem;
    outline: none;
}

#search-modal-input::placeholder {
    color: var(--text-light);
}

.search-close {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: all 0.2s;
}

.search-close:hover {
    background: var(--border);
    color: var(--text);
}

.search-filters {
    display: flex;
    gap: 0.5rem;
}

.filter-btn {
    padding: 0.5rem 1rem;
    background: none;
    border: 1px solid var(--border);
    border-radius: 2rem;
    color: var(--text-light);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.search-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.5rem 1.5rem;
}

.search-placeholder {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-light);
}

.search-placeholder svg {
    margin-bottom: 1rem;
    opacity: 0.5;
}

.search-shortcuts {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
    font-size: 0.8rem;
}

.search-shortcuts kbd {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 0.25rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.7rem;
    margin: 0 0.125rem;
}

.search-section h3 {
    margin-bottom: 1rem;
    color: var(--text);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.search-result-item {
    display: block;
    padding: 1rem;
    border: 1px solid transparent;
    border-radius: 0.5rem;
    text-decoration: none;
    color: var(--text);
    margin-bottom: 0.5rem;
    transition: all 0.2s;
}

.search-result-item:hover,
.search-result-item.selected {
    background: var(--surface);
    border-color: var(--primary);
}

.result-title {
    font-weight: 500;
    margin-bottom: 0.25rem;
    color: var(--primary);
}

.result-snippet {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.4;
    margin-bottom: 0.25rem;
}

.result-meta {
    font-size: 0.8rem;
    color: var(--text-light);
}

.tags-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.75rem;
}

.tag-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    text-decoration: none;
    color: var(--text);
    transition: all 0.2s;
}

.tag-item:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

.tag-name {
    font-weight: 500;
}

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

.tag-item:hover .tag-count {
    color: rgba(255, 255, 255, 0.8);
}

.no-results {
    text-align: center;
    padding: 2rem;
    color: var(--text-light);
}

mark {
    background: rgba(5, 150, 105, 0.2);
    color: var(--primary);
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
}

@media (max-width: 768px) {
    .search-trigger {
        width: auto;
        padding: 0.5rem;
    }
    
    .search-trigger span,
    .search-shortcut {
        display: none;
    }
    
    .search-modal-content {
        width: 95%;
        max-height: 80vh;
    }
    
    .search-modal-header {
        padding: 1rem;
    }
    
    .search-modal-body {
        padding: 0.5rem 1rem 1rem;
    }
    
    .tags-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Additional sidebar styles */
.stats-mini {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.stat-mini {
    text-align: center;
    padding: 1rem;
    background: rgba(5, 150, 105, 0.05);
    border-radius: 0.5rem;
}

.stat-mini .stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-mini .stat-label {
    font-size: 0.75rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.series-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.series-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    text-decoration: none;
    color: var(--text);
    transition: all 0.2s;
}

.series-item:hover {
    background: var(--primary);
    color: white;
    transform: translateX(4px);
}

.series-name {
    font-weight: 500;
}

.series-count {
    font-size: 0.75rem;
    color: var(--text-light);
}

.series-item:hover .series-count {
    color: rgba(255, 255, 255, 0.8);
}

@media (max-width: 768px) {
    .nav-search {
        display: none;
    }
    
    .stats-mini {
        grid-template-columns: 1fr;
    }
}
.post-meta {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.post-meta time {
    color: var(--text-light);
    font-size: 0.9rem;
}

.post-meta .tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Post Header Redesign */
.post-header {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.post-title-section h1 {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text);
    margin: 0 0 1rem 0;
    letter-spacing: -0.02em;
}

.post-meta-inline {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.meta-separator {
    color: var(--border);
    font-weight: 300;
}

.post-meta-inline time {
    font-weight: 500;
    color: var(--primary);
}

.word-count,
.reading-time,
.last-modified {
    font-weight: 400;
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.post-tags .tag {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.875rem;
    background: rgba(5, 150, 105, 0.08);
    color: var(--primary);
    text-decoration: none;
    border-radius: 1.5rem;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid rgba(5, 150, 105, 0.15);
}

.post-tags .tag:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.2);
}

@media (max-width: 768px) {
    .post-title-section h1 {
        font-size: 2rem;
        line-height: 1.3;
    }
    
    .post-meta-inline {
        font-size: 0.85rem;
        gap: 0.5rem;
    }
    
    .post-tags .tag {
        font-size: 0.75rem;
        padding: 0.3rem 0.7rem;
    }
}

/* Article Content Typography */
.article-content {
    line-height: 1.7;
    color: var(--text);
    max-width: none;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
    color: var(--text);
    font-weight: 600;
    line-height: 1.3;
    margin: 2rem 0 1rem 0;
}

.article-content h1 {
    font-size: 2.25rem;
    border-bottom: 2px solid var(--border);
    padding-bottom: 0.5rem;
}

.article-content h2 {
    font-size: 1.875rem;
    color: var(--primary);
}

.article-content h3 {
    font-size: 1.5rem;
}

.article-content h4 {
    font-size: 1.25rem;
}

.article-content p {
    margin: 1.5rem 0;
    line-height: 1.7;
}

.article-content ul,
.article-content ol {
    margin: 1.5rem 0;
    padding-left: 0;
}

.article-content ul {
    list-style: none;
}

.article-content ul li {
    position: relative;
    padding-left: 2rem;
    margin: 0.75rem 0;
    line-height: 1.6;
}

.article-content ul li::before {
    content: "•";
    color: var(--primary);
    font-size: 1.2rem;
    position: absolute;
    left: 0.5rem;
    top: 0;
}

.article-content ol {
    counter-reset: item;
    padding-left: 0;
    list-style: none;
}

.article-content ol li {
    position: relative;
    padding-left: 2.5rem;
    margin: 0.75rem 0;
    line-height: 1.6;
    counter-increment: item;
}

.article-content ol li::before {
    content: counter(item) ".";
    color: var(--primary);
    font-weight: 600;
    position: absolute;
    left: 0;
    top: 0;
    width: 2rem;
}

.article-content blockquote {
    margin: 2rem 0;
    padding: 1.5rem 2rem;
    background: var(--surface);
    border-left: 4px solid var(--primary);
    border-radius: 0 0.5rem 0.5rem 0;
    font-style: italic;
    color: var(--text-light);
}

.article-content blockquote p {
    margin: 0.5rem 0;
}

.article-content code {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    color: #1e293b;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.9em;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.article-content pre {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border: 1px solid #334155;
    border-radius: 0.75rem;
    padding: 2rem;
    margin: 2rem 0;
    overflow-x: auto;
    line-height: 1.6;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    position: relative;
}

.article-content pre::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #06b6d4, #3b82f6, #8b5cf6);
    border-radius: 0.75rem 0.75rem 0 0;
}

.article-content pre code {
    background: none;
    color: #e2e8f0;
    padding: 0;
    border-radius: 0;
    font-size: 0.9rem;
    border: none;
    box-shadow: none;
}

/* Enhanced syntax highlighting */
.article-content pre code .hljs-keyword,
.article-content pre code .hljs-built_in {
    color: #f472b6;
    font-weight: 500;
}

.article-content pre code .hljs-string,
.article-content pre code .hljs-attr {
    color: #34d399;
}

.article-content pre code .hljs-number,
.article-content pre code .hljs-literal {
    color: #fbbf24;
}

.article-content pre code .hljs-function,
.article-content pre code .hljs-title {
    color: #60a5fa;
    font-weight: 500;
}

.article-content pre code .hljs-variable,
.article-content pre code .hljs-name {
    color: #a78bfa;
}

.article-content pre code .hljs-comment {
    color: #64748b;
    font-style: italic;
}

.article-content pre code .hljs-tag {
    color: #f87171;
}

.article-content pre code .hljs-operator,
.article-content pre code .hljs-punctuation {
    color: #cbd5e1;
}

.article-content .highlight {
    margin: 2rem 0;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.article-content .highlight pre {
    margin: 0;
    border: none;
    border-radius: 0;
}

.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background: var(--surface);
    border-radius: 0.5rem;
    overflow: hidden;
    border: 1px solid var(--border);
}

.article-content th,
.article-content td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.article-content th {
    background: var(--primary);
    color: white;
    font-weight: 600;
}

.article-content tr:last-child td {
    border-bottom: none;
}

.article-content a {
    color: var(--primary);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.2s;
}

.article-content a:hover {
    border-bottom-color: var(--primary);
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 2rem 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.article-content hr {
    border: none;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
    margin: 3rem 0;
}

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

.article-content em {
    color: var(--text-light);
    font-style: italic;
}

.article-content .highlight {
    margin: 2rem 0;
    border-radius: 0.5rem;
    overflow: hidden;
}

.article-content .highlight pre {
    margin: 0;
    border: none;
    border-radius: 0;
}

/* Nested lists */
.article-content ul ul,
.article-content ol ol,
.article-content ul ol,
.article-content ol ul {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

/* Definition lists */
.article-content dl {
    margin: 1.5rem 0;
}

.article-content dt {
    font-weight: 600;
    color: var(--primary);
    margin-top: 1rem;
}

.article-content dd {
    margin: 0.5rem 0 0 1.5rem;
    color: var(--text-light);
}

@media (max-width: 768px) {
    .article-content h1 {
        font-size: 1.875rem;
    }
    
    .article-content h2 {
        font-size: 1.5rem;
    }
    
    .article-content h3 {
        font-size: 1.25rem;
    }
    
    .article-content ul li,
    .article-content ol li {
        padding-left: 1.5rem;
    }
    
    .article-content blockquote {
        padding: 1rem 1.5rem;
        margin: 1.5rem 0;
    }
    
    .article-content pre {
        padding: 1rem;
        font-size: 0.85rem;
    }
    
    .article-content th,
    .article-content td {
        padding: 0.75rem 0.5rem;
        font-size: 0.9rem;
    }
}
.reading-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 0.5rem 0;
    font-size: 0.85rem;
    color: var(--text-light);
}

.reading-stats span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.reading-stats span::before {
    content: "";
    width: 4px;
    height: 4px;
    background: var(--primary);
    border-radius: 50%;
}

.word-count::before {
    content: "📄";
    width: auto;
    height: auto;
    background: none;
    font-size: 0.9rem;
}

.reading-time::before {
    content: "⏱️";
    width: auto;
    height: auto;
    background: none;
    font-size: 0.9rem;
}

.last-modified::before {
    content: "✏️";
    width: auto;
    height: auto;
    background: none;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .reading-stats {
        gap: 0.75rem;
        font-size: 0.8rem;
    }
}
/* Tags Pages */
.tags-content {
    max-width: 1200px;
    margin: 4rem auto;
    padding: 0 2rem;
}

.tags-main {
    flex: 1;
}

.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    justify-content: flex-start;
    line-height: 1.6;
    margin-bottom: 3rem;
}

.tag-cloud-item {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 1rem;
    background: rgba(5, 150, 105, 0.08);
    color: var(--primary);
    text-decoration: none;
    border-radius: 2rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid rgba(5, 150, 105, 0.15);
    white-space: nowrap;
}

.tag-cloud-item:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.2);
}

.tag-cloud-item .tag-count {
    font-size: 0.8em;
    opacity: 0.7;
}

.tag-cloud-item:hover .tag-count {
    opacity: 0.9;
}

.tags-sidebar {
    width: 300px;
    margin-left: 3rem;
}

.popular-tags {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.popular-tag {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    text-decoration: none;
    color: var(--text);
    transition: all 0.2s;
}

.popular-tag:hover {
    background: var(--primary);
    color: white;
    transform: translateX(4px);
}

.popular-tag .tag-name {
    font-weight: 500;
}

.popular-tag .tag-count {
    font-size: 0.8rem;
    color: var(--text-light);
}

.popular-tag:hover .tag-count {
    color: rgba(255, 255, 255, 0.8);
}

@media (max-width: 1024px) {
    .tags-sidebar {
        width: 100%;
        margin-left: 0;
        margin-top: 3rem;
    }
}

@media (max-width: 768px) {
    .tags-cloud {
        gap: 0.75rem;
    }
    
    .tag-cloud-item {
        font-size: 0.9rem !important;
        padding: 0.4rem 0.8rem;
    }
}

/* Guide-specific list styling */
.guide-part ul,
.guide-part ol {
    margin: 1.5rem 0;
    padding-left: 0;
}

.guide-part ul {
    list-style: none;
}

.guide-part ul li {
    position: relative;
    padding-left: 1.5rem;
    margin: 0.5rem 0;
    line-height: 1.6;
}

.guide-part ul li::before {
    content: "•";
    color: var(--primary);
    font-size: 1.1rem;
    position: absolute;
    left: 0;
    top: 0;
    line-height: 1.6;
}

.guide-part ol {
    counter-reset: item;
    padding-left: 0;
    list-style: none;
}

.guide-part ol li {
    position: relative;
    padding-left: 2rem;
    margin: 0.5rem 0;
    line-height: 1.6;
    counter-increment: item;
}

.guide-part ol li::before {
    content: counter(item) ".";
    color: var(--primary);
    font-weight: 600;
    position: absolute;
    left: 0;
    top: 0;
    width: 1.5rem;
    line-height: 1.6;
}

/* Guide nested lists */
.guide-part ul ul,
.guide-part ol ol,
.guide-part ul ol,
.guide-part ol ul {
    margin: 0.25rem 0;
    padding-left: 1.5rem;
}

.guide-part ul ul li {
    padding-left: 1.5rem;
}

.guide-part ol ol li {
    padding-left: 2rem;
}
