/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #8b5cf6;
    --accent-color: #ec4899;
    --bg-dark: #0f172a;
    --bg-darker: #020617;
    --bg-card: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --border-color: #334155;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
        'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    background: var(--bg-darker);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    padding: 1rem 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.5rem;
}

.logo {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-weight: 800;
}

.brand-text {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

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

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

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 1001;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

@media (max-width: 640px) {
    .mobile-menu-toggle {
        display: flex;
    }
}

/* Hero Section */
.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 80px;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero .container {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    text-align: center;
}

.hero-content {
    z-index: 1;
    max-width: 800px;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.1;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-weight: 600;
}

.hero-description {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    max-width: 500px;
}

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

.btn {
    padding: 0.875rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6);
}

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

.btn-secondary:hover {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.1);
}


/* Sections */
section {
    padding: 6rem 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* About Section */
.about {
    background: var(--bg-dark);
}

.about-content {
    max-width: 900px;
    margin: 0 auto;
}

.about-intro {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 3rem;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.about-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    text-align: center;
    transition: all 0.3s;
}

.about-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.2);
}

.about-card .icon {
    margin-bottom: 1rem;
}

.about-card .icon svg {
    width: 48px;
    height: 48px;
    color: var(--primary-color);
}

.about-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.about-card p {
    color: var(--text-muted);
}

/* Posts Section */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.post-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 12px 32px rgba(99, 102, 241, 0.2);
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.post-category {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.category-experiment {
    background: rgba(139, 92, 246, 0.2);
    color: var(--secondary-color);
    border: 1px solid var(--secondary-color);
}

.category-study {
    background: rgba(99, 102, 241, 0.2);
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.category-discovery {
    background: rgba(236, 72, 153, 0.2);
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
}

.category-project {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success-color);
    border: 1px solid var(--success-color);
}

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

.post-title {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    line-height: 1.3;
}

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

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

.tag {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.875rem;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.post-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: gap 0.3s;
}

.post-link:hover {
    gap: 1rem;
}

/* Newsletter Section */
.newsletter {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    padding: 4rem 0;
}

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

.newsletter-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.newsletter-description {
    color: var(--text-secondary);
    font-size: 1.125rem;
    margin-bottom: 2rem;
}

.newsletter-form {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.newsletter-input {
    flex: 1;
    padding: 0.875rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s;
}

.newsletter-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

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

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

/* Contact Section */
.contact {
    background: var(--bg-dark);
    text-align: center;
}

.contact-description {
    color: var(--text-muted);
    font-size: 1.125rem;
    margin-bottom: 2rem;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.contact-btn {
    padding: 1rem 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

.contact-btn svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.contact-btn:hover {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.1);
    transform: translateY(-2px);
}

/* Footer */
.footer {
    background: var(--bg-darker);
    padding: 3rem 0 1.5rem;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    text-align: center;
    margin-bottom: 2rem;
}

.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.footer-text {
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Responsive Design */
@media (max-width: 968px) {
    .hero-title {
        font-size: 3rem;
    }

    .nav-links {
        gap: 1rem;
    }

    .newsletter-form {
        flex-direction: column;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .container {
        padding: 0 1rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.25rem;
    }

    .hero-cta {
        flex-direction: column;
    }

    .btn {
        text-align: center;
    }

    .nav-links {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--bg-darker);
        flex-direction: column;
        padding: 2rem;
        transition: left 0.3s ease;
        border-top: 1px solid var(--border-color);
        z-index: 999;
    }

    .nav-links.active {
        left: 0;
    }

    .nav-links li {
        margin: 0;
        width: 100%;
    }

    .nav-links a {
        display: block;
        padding: 1rem;
        font-size: 1.25rem;
        border-bottom: 1px solid var(--border-color);
    }

    .posts-grid {
        grid-template-columns: 1fr;
    }

    .contact-links {
        flex-direction: column;
    }

    .newsletter-form {
        flex-direction: column;
    }
}

/* ============================================
   POST CONTENT STYLES
   ============================================ */

/* Post Container */
.post-content {
    padding-top: 100px;
    min-height: 100vh;
    background: var(--bg-darker);
}

.post-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem 4rem;
}

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

.post-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.post-meta time,
.reading-time {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.post-content-title {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.post-lead {
    font-size: 1.25rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.post-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-info {
    display: flex;
    flex-direction: column;
}

.author-info strong {
    color: var(--text-primary);
    font-size: 0.875rem;
}

.author-info strong a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s;
}

.author-info strong a:hover {
    color: var(--primary-color);
}

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

/* Post Sections */
.post-section {
    margin-bottom: 3rem;
}

.post-section h2 {
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    margin-top: 2rem;
    color: var(--text-primary);
}

.post-section h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    margin-top: 2rem;
    color: var(--text-primary);
}

.post-section p {
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.post-section ul,
.post-section ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.post-section li {
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

/* Abstract */
.abstract {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary-color);
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.abstract h2 {
    margin-top: 0;
    font-size: 1.25rem;
    color: var(--primary-color);
}

.keywords {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Table of Contents */
.toc {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.toc h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1rem;
    color: var(--text-primary);
}

.toc ol {
    margin: 0;
    padding-left: 1.5rem;
}

.toc li {
    margin-bottom: 0.5rem;
}

.toc a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s;
}

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

/* Info Boxes */
.info-box,
.warning-box,
.success-box {
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
    border-left: 4px solid;
}

.info-box {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--primary-color);
}

.warning-box {
    background: rgba(245, 158, 11, 0.1);
    border-color: var(--warning-color);
}

.success-box {
    background: rgba(16, 185, 129, 0.1);
    border-color: var(--success-color);
}

.info-box strong,
.warning-box strong,
.success-box strong {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.info-box p,
.warning-box p,
.success-box p {
    margin: 0;
}

/* Code Blocks */
.code-block {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin: 1.5rem 0;
    overflow: hidden;
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid var(--border-color);
}

.code-lang {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
}

.code-copy {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.3s;
}

.code-copy:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.code-block pre {
    margin: 0;
    padding: 1.5rem;
    overflow-x: auto;
}

.code-block code {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--text-primary);
}

/* Inline Code */
.inline-code {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875em;
}

/* Tables */
.table-wrapper {
    overflow-x: auto;
    margin: 2rem 0;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.data-table caption {
    padding: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: left;
    background: rgba(0, 0, 0, 0.2);
}

.data-table thead {
    background: rgba(99, 102, 241, 0.1);
}

.data-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-color);
}

.data-table td {
    padding: 1rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.data-table tbody tr:hover {
    background: rgba(99, 102, 241, 0.05);
}

.data-table .positive {
    color: var(--success-color);
    font-weight: 600;
}

.data-table .negative {
    color: #ef4444;
    font-weight: 600;
}

/* Charts */
.chart-container {
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.chart-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    text-align: center;
}

.bar-chart {
    width: 100%;
}

.chart-bars {
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    height: 250px;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.bar-group {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    padding: 0 0.5rem;
}

.bar {
    width: 60px;
    min-height: 20px;
    border-radius: 4px 4px 0 0;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.3s;
}

.bar:hover {
    opacity: 0.8;
}

.bar-primary {
    background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
}

.bar-secondary {
    background: linear-gradient(180deg, var(--warning-color), #f59e0b);
}

.bar-label {
    position: absolute;
    bottom: -30px;
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.bar-value {
    position: absolute;
    top: -25px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.chart-axis {
    margin-top: 2.5rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Diagrams */
.diagram {
    margin: 2rem 0;
    padding: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-align: center;
}

.architecture-diagram {
    max-width: 100%;
    height: auto;
}

.diagram-caption {
    margin-top: 1rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Blockquotes */
blockquote {
    margin: 2rem 0;
    padding: 1.5rem;
    border-left: 4px solid var(--accent-color);
    background: rgba(236, 72, 153, 0.05);
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: var(--text-secondary);
}

.key-finding {
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* References */
.references {
    list-style: none;
    counter-reset: reference-counter;
    padding-left: 0;
}

.references li {
    counter-increment: reference-counter;
    margin-bottom: 1rem;
    padding-left: 2.5rem;
    position: relative;
    color: var(--text-secondary);
}

.references li::before {
    content: "[" counter(reference-counter) "]";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: 600;
}

.references em {
    color: var(--text-muted);
}

.references a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s;
}

.references a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* Post Footer */
.post-footer {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

.post-tags-section h3,
.post-share h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.post-tags-section {
    margin-bottom: 2rem;
}

.share-buttons {
    display: flex;
    gap: 1rem;
}

.share-btn {
    padding: 0.5rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.3s;
}

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

/* Related Posts */
.related-posts {
    margin-top: 4rem;
    padding: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.related-posts h2 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

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

.related-post-card {
    background: var(--bg-darker);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.3s;
}

.related-post-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.related-post-card h3 {
    font-size: 1.125rem;
    margin: 1rem 0 0.5rem;
    color: var(--text-primary);
}

.related-post-card p {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin: 0;
}

/* Mermaid Diagrams */
.diagram pre.mermaid {
    background: transparent;
    border: none;
    padding: 0;
    margin: 2rem 0;
    text-align: center;
}

.diagram .mermaid {
    display: flex;
    justify-content: center;
    align-items: center;
}

.diagram .mermaid svg {
    max-width: 100%;
    height: auto;
}

/* Responsive Post Content */
@media (max-width: 768px) {
    .post-container {
        padding: 0 1rem 2rem;
    }

    .post-content-title {
        font-size: 2rem;
    }

    .post-lead {
        font-size: 1.125rem;
    }

    .chart-bars {
        height: 200px;
    }

    .bar {
        width: 40px;
    }

    .related-posts-grid {
        grid-template-columns: 1fr;
    }

    .share-buttons {
        flex-direction: column;
    }

    .diagram .mermaid svg {
        font-size: 12px;
    }
}

/* Latency Chart Styles */
.latency-chart-container {
    margin: 2rem 0;
    padding: 2rem;
    background: rgba(30, 30, 45, 0.6);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.latency-chart-title {
    margin: 0 0 1rem 0;
    font-size: 1rem;
    color: #a0a0b0;
}

.latency-chart-legend {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 0.75rem;
    color: #a0a0b0;
    flex-wrap: wrap;
}

.latency-chart-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem;
    overflow-x: auto;
}

.latency-chart-y-axis {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 300px;
    font-size: 0.75rem;
    color: #808090;
    text-align: right;
    padding-right: 0.5rem;
}

.latency-chart-bars {
    height: 300px;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: flex-end;
    justify-content: space-evenly;
    gap: 2rem;
    padding: 0 2rem;
}

.latency-chart-bar-group {
    display: flex;
    gap: 2px;
    align-items: flex-end;
    min-width: 80px;
    justify-content: center;
    flex-shrink: 0;
}

.latency-chart-bar {
    width: 20px;
    border-radius: 2px 2px 0 0;
    flex-shrink: 0;
}

.latency-chart-labels {
    display: flex;
    justify-content: space-evenly;
    gap: 2rem;
    padding: 1rem 2rem 0 2rem;
}

.latency-chart-label-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    min-width: 80px;
    flex-shrink: 0;
}

/* Responsive Latency Chart */
@media (max-width: 768px) {
    .latency-chart-container {
        padding: 1rem;
        margin: 1.5rem 0;
    }

    .latency-chart-title {
        font-size: 0.875rem;
        text-align: center;
    }

    .latency-chart-legend {
        gap: 1rem;
        font-size: 0.65rem;
    }

    .latency-chart-grid {
        gap: 0.5rem;
    }

    .latency-chart-y-axis {
        height: 250px;
        font-size: 0.65rem;
        padding-right: 0.25rem;
    }

    .latency-chart-bars {
        height: 250px;
        gap: 0.75rem;
        padding: 0 0.75rem;
        min-width: 320px;
    }

    .latency-chart-bar-group {
        min-width: 50px;
        gap: 1px;
    }

    .latency-chart-bar {
        width: 14px;
    }

    .latency-chart-labels {
        gap: 0.75rem;
        padding: 0.75rem 0.75rem 0 0.75rem;
        min-width: 320px;
    }

    .latency-chart-label-item {
        min-width: 50px;
        font-size: 0.8rem;
    }

    .latency-chart-label-item span:first-child {
        font-size: 0.75rem;
    }

    .latency-chart-label-item span:last-child {
        font-size: 0.65rem;
    }
}

@media (max-width: 480px) {
    .latency-chart-container {
        padding: 0.75rem;
    }

    .latency-chart-legend {
        gap: 0.5rem;
        font-size: 0.6rem;
    }

    .latency-chart-y-axis {
        height: 200px;
        font-size: 0.6rem;
    }

    .latency-chart-bars {
        height: 200px;
        gap: 0.5rem;
        padding: 0 0.5rem;
        min-width: 280px;
    }

    .latency-chart-bar-group {
        min-width: 40px;
    }

    .latency-chart-bar {
        width: 12px;
    }

    .latency-chart-labels {
        gap: 0.5rem;
        padding: 0.5rem 0.5rem 0 0.5rem;
        min-width: 280px;
    }

    .latency-chart-label-item {
        min-width: 40px;
    }

    .latency-chart-label-item span:first-child {
        font-size: 0.7rem;
    }

    .latency-chart-label-item span:last-child {
        font-size: 0.6rem;
    }
}
