/* Blog Post Styles - Maximum Readability */
/* Standalone stylesheet - no dependencies */

/* ============================================
   CSS Variables
   ============================================ */
:root {
    --bg: #fff;
    --text: #333;
    --text-secondary: #666;
    --heading: #111;
    --link: #0066cc;
    --link-hover: #004499;
    --border: #e5e5e5;
    --border-light: #eee;
    --code-bg: #f8f8f8;
}

/* ============================================
   Base Reset
   ============================================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ============================================
   Body - Optimal reading font
   ============================================ */
body {
    font-family: 'Charter', 'Bitstream Charter', 'Sitka Text', Cambria, serif;
    font-size: 16px;
    line-height: 1.4;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   Zoom Controls - Fixed right side
   ============================================ */
.zoom-controls {
    position: fixed;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    z-index: 100;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.25rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.zoom-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: var(--text);
    font-size: 1.25rem;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.zoom-btn:hover {
    background: #f0f0f0;
}

.zoom-btn:active {
    background: #e0e0e0;
}

#zoom-reset {
    font-size: 0.875rem;
    font-weight: 600;
}

/* ============================================
   Article Container - Responsive width
   ============================================ */
.article-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 6rem 1rem 2rem 1rem;
}

/* ============================================
   Breadcrumb
   ============================================ */
.article-breadcrumb {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.article-breadcrumb a {
    color: var(--link);
    text-decoration: none;
}

.article-breadcrumb a:hover {
    text-decoration: underline;
}

.article-breadcrumb .separator {
    margin: 0 0.5rem;
    color: #ccc;
}

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

/* ============================================
   Article Header
   ============================================ */
.article-header {
    margin-bottom: 2rem;
}

.article-meta {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.article-meta .category {
    background: var(--link);
    color: #fff;
    padding: 0.15rem 0.5rem;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 500;
}

.article-author {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.article-author strong {
    color: var(--text);
}

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

.article-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    line-height: 1.4;
    font-style: italic;
}

/* ============================================
   Featured Image
   ============================================ */
.featured-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 2rem;
}

/* ============================================
   Article Content - Readable Typography
   ============================================ */
.article-content {
    font-size: 16px;
    line-height: 1.4;
    color: var(--text);
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4 {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--heading);
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.article-content h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.article-content h2 {
    font-size: 2rem;
    margin-top: 3rem;
    margin-bottom: 1rem;
    font-weight: 600;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--border-light);
}

.article-content h3 {
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

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

.article-content p {
    margin-bottom: 1.25rem;
}

.article-content a {
    color: var(--link);
    text-decoration: underline;
}

.article-content a:hover {
    color: var(--link-hover);
}

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

.article-content li {
    margin-bottom: 0.4rem;
}

.article-content blockquote {
    border-left: 3px solid var(--link);
    padding-left: 1rem;
    margin: 1.5rem 0;
    color: var(--text-secondary);
    font-style: italic;
}

.article-content code {
    font-family: 'SF Mono', Monaco, Consolas, monospace;
    background: var(--code-bg);
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
    font-size: 0.9em;
}

.article-content pre {
    background: var(--code-bg);
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
    margin: 1.5rem 0;
    border: 1px solid var(--border);
}

.article-content pre code {
    background: none;
    padding: 0;
    font-size: 0.875rem;
    line-height: 1.5;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 1.5rem 0;
}

.article-content hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 2rem 0;
}

/* ============================================
   Article Footer - Tags
   ============================================ */
.article-footer {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

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

.article-tags .tag {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #f5f5f5;
    color: var(--text-secondary);
    padding: 0.25rem 0.6rem;
    border-radius: 3px;
    font-size: 0.8rem;
}

/* ============================================
   Back to Blog Navigation
   ============================================ */
.article-navigation {
    padding: 1.5rem 0;
    margin-top: 1rem;
}

.back-to-blog {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--link);
    text-decoration: none;
    font-size: 0.9rem;
}

.back-to-blog:hover {
    text-decoration: underline;
}

/* ============================================
   Footer - Black/white version of main footer
   ============================================ */
footer {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #1a1a1a;
    color: #ccc;
    padding: 3rem 1.5rem 1.5rem;
    margin-top: 3rem;
}

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

.footer-section h3 {
    color: #fff;
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

.footer-section p {
    font-size: 0.875rem;
    line-height: 1.6;
    color: #aaa;
}

.footer-section a {
    color: #ccc;
    text-decoration: none;
}

.footer-section a:hover {
    color: #fff;
    text-decoration: underline;
}

.footer-bottom {
    max-width: 900px;
    margin: 2rem auto 0;
    padding-top: 1.5rem;
    border-top: 1px solid #333;
    text-align: center;
}

.footer-bottom p {
    font-size: 0.8rem;
    color: #888;
}

/* ============================================
   Mobile Responsive
   ============================================ */
@media (max-width: 768px) {
    body {
        font-size: 16px;
    }

    .article-container {
        padding: 1.5rem 1rem 2rem;
    }

    .article-header h1 {
        font-size: 1.5rem;
    }

    .article-content {
        font-size: 16px;
        line-height: 1.65;
    }

    .article-content h1 { font-size: 1.4rem; }
    .article-content h2 { font-size: 1.25rem; }
    .article-content h3 { font-size: 1.1rem; }

    .zoom-controls {
        right: 0.5rem;
        top: auto;
        bottom: 1rem;
        transform: none;
    }

    .zoom-btn {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .article-container {
        padding: 1rem 0.75rem 1.5rem;
    }

    .article-header h1 {
        font-size: 1.35rem;
    }

    .article-content {
        font-size: 15px;
    }

    .article-breadcrumb {
        font-size: 0.8rem;
    }

    .article-meta {
        font-size: 0.8rem;
    }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    .zoom-controls {
        display: none;
    }

    .article-container {
        max-width: 100%;
        padding: 0;
    }

    footer {
        display: none;
    }
}
