/* Typography-focused blog styles inspired by Medium/Substack */

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

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: #1C1C1E;
    background-color: #FAFAFA;
    font-size: 17px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Navigation */
.blog-nav {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #e6e6e6;
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 0 20px;
}

.blog-nav .container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.blog-nav .logo {
    display: flex;
    align-items: center;
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
    text-decoration: none;
}

.blog-nav .logo span {
    margin-right: 8px;
    font-size: 24px;
}

.blog-nav .nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
}

.blog-nav .nav-links a {
    color: #666;
    text-decoration: none;
    font-size: 16px;
    transition: color 0.2s ease;
}

.blog-nav .nav-links a:hover,
.blog-nav .nav-links a.active {
    color: #1a1a1a;
}

/* Article typography */
.article-container {
    max-width: 680px;
    margin: 0 auto;
    padding: 48px 20px 96px;
}

.article-header {
    margin-bottom: 40px;
    padding-bottom: 32px;
    border-bottom: 1px solid #e6e6e6;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    font-size: 14px;
    color: #48484A;
}

.article-category {
    background: #F1F1F1;
    color: #48484A;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.article-title {
    font-size: 36px;
    font-weight: 600;
    line-height: 1.2;
    color: #1C1C1E;
    margin-bottom: 20px;
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.02em;
}

.article-subtitle {
    font-size: 20px;
    line-height: 1.5;
    color: #48484A;
    font-weight: 400;
    font-family: 'Inter', sans-serif;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 32px;
}

.author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 16px;
}

.author-details h4 {
    font-size: 16px;
    font-weight: 600;
    color: #1C1C1E;
    margin-bottom: 2px;
}

.author-details p {
    font-size: 14px;
    color: #48484A;
}

/* Article content */
.article-content {
    font-family: 'Inter', sans-serif;
    font-size: 17px;
    line-height: 1.6;
    color: #1C1C1E;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4 {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    color: #1C1C1E;
    margin-top: 48px;
    margin-bottom: 20px;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.article-content h1 { font-size: 32px; }
.article-content h2 { font-size: 28px; }
.article-content h3 { font-size: 24px; }
.article-content h4 { font-size: 20px; }

.article-content p {
    margin-bottom: 28px;
}

.article-content ul,
.article-content ol {
    margin: 32px 0;
    padding-left: 32px;
}

.article-content li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.article-content strong {
    font-weight: 600;
    color: #1a1a1a;
}

.article-content em {
    font-style: italic;
}

/* Blockquotes */
.article-content blockquote {
    margin: 32px 0;
    padding: 24px 32px;
    background: #f8f8f8;
    border-left: 4px solid #ddd;
    font-style: italic;
    font-size: 22px;
    color: #555;
}

/* Code blocks */
.article-content code {
    background: #f4f4f4;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 16px;
    color: #e74c3c;
}

.article-content pre {
    background: #2d3748;
    color: #e2e8f0;
    padding: 24px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 32px 0;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 14px;
    line-height: 1.5;
}

.article-content pre code {
    background: none;
    padding: 0;
    color: inherit;
    font-size: inherit;
}

/* Special content blocks */
.highlight-box {
    margin: 32px 0;
    padding: 24px;
    border-radius: 8px;
    font-size: 18px;
}

.highlight-box.info {
    background: #f8f8f8;
    border-left: 4px solid #666;
    color: #333;
}

.highlight-box.success {
    background: #f8f8f8;
    border-left: 4px solid #333;
    color: #333;
}

.highlight-box.warning {
    background: #f8f8f8;
    border-left: 4px solid #666;
    color: #333;
}

.highlight-box.error {
    background: #f8f8f8;
    border-left: 4px solid #333;
    color: #333;
}

/* Diagrams and charts */
.diagram-container {
    margin: 40px 0;
    text-align: center;
}

.diagram-title {
    font-size: 16px;
    font-weight: 600;
    color: #666;
    margin-bottom: 16px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Simple progress bars for metrics */
.metric-bar {
    background: #F1F1F1;
    height: 2px;
    border-radius: 1px;
    overflow: hidden;
    margin: 8px 0;
    position: relative;
}

.metric-bar .fill {
    background: #1C1C1E;
    height: 100%;
    transition: width 0.8s ease;
}

.metric-label {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #48484A;
    margin-bottom: 6px;
    font-weight: 500;
}

/* Inline metrics - Notion style */
.metric {
    background: #F1F1F1;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
    color: #1C1C1E;
    font-size: 0.95em;
}

/* Simple metrics table */
.metrics-table {
    width: 100%;
    border-collapse: collapse;
    margin: 32px 0;
    font-size: 16px;
}

.metrics-table td {
    padding: 12px 0;
    border-bottom: 1px solid #F1F1F1;
}

.metrics-table td:first-child {
    color: #48484A;
    width: 50%;
}

.metrics-table td.metric {
    font-weight: 600;
    color: #1C1C1E;
    text-align: right;
    background: none;
    padding: 12px 0;
    border-radius: 0;
}

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

/* Mermaid diagram styling */
.mermaid {
    margin: 40px 0;
    background: white;
    padding: 24px;
    border-radius: 8px;
    border: 1px solid #e6e6e6;
}

/* Expert CTA Section */
.expert-cta {
    margin-top: 64px;
    padding: 40px 32px;
    background: #2a2a2a;
    color: white;
    border-radius: 12px;
    text-align: center;
}

.expert-cta h3 {
    font-size: 24px;
    margin-bottom: 8px;
    font-weight: 600;
}

.expert-cta .subtitle {
    font-size: 16px;
    color: #B0B0B0;
    margin-bottom: 24px;
}

.expert-cta p {
    font-size: 17px;
    opacity: 0.9;
    margin-bottom: 32px;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
}

.cta-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: white;
    color: #2a2a2a;
    padding: 14px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.2s ease;
}

.cta-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    color: white;
    padding: 14px 28px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.3);
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    transition: all 0.2s ease;
}

.cta-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.cta-secondary:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.5);
}

@media (max-width: 768px) {
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-primary,
    .cta-secondary {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
}

/* Footer */
.blog-footer {
    background: #1a1a1a;
    color: white;
    text-align: center;
    padding: 48px 20px;
    margin-top: 80px;
}

.blog-footer .logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    font-size: 20px;
    font-weight: 600;
}

.blog-footer .logo span {
    margin-right: 8px;
    font-size: 24px;
}

.blog-footer p {
    color: #999;
    font-size: 16px;
    margin-bottom: 32px;
}

.blog-footer .copyright {
    padding-top: 32px;
    border-top: 1px solid #333;
    color: #666;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
    .article-container {
        padding: 24px 16px 60px;
    }
    
    .article-title {
        font-size: 28px;
    }
    
    .article-content {
        font-size: 18px;
    }
    
    .article-content h2 {
        font-size: 24px;
    }
    
    .blog-nav .nav-links {
        display: none;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}