/* Single Post - Professional & Readable */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Merriweather:wght@300;400;700;900&display=swap');
@import url('/css/shared-header.css');

:root {
    --bg: #fafafa;
    --surface: #ffffff;
    --text: #1a1a1a;
    --text-secondary: #4a4a4a;
    --text-light: #737373;
    --border: #e5e5e5;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --serif: 'Merriweather', Georgia, serif;
    --sans: 'Inter', -apple-system, sans-serif;
}

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

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Header styles now in shared-header.css */

/* Post Container - Clean Layout */
.post-container {
    max-width: 780px;
    margin: 3rem auto;
    padding: 0 2rem;
}

/* Post Header */
.post-header {
    margin-bottom: 2.5rem;
}

.post-title {
    font-family: var(--serif);
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1.1;
    color: #000;
    margin-bottom: 2rem;
    letter-spacing: -0.03em;
}

.post-meta {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-light);
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.post-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.post-meta svg {
    opacity: 0.6;
}

/* Post Content - Readable Typography */
.article-content {
    font-family: var(--serif);
    font-size: 1.125rem;
    line-height: 1.75;
    color: var(--text-secondary);
}

.article-content > *:not(:last-child) {
    margin-bottom: 1.75rem;
}

.article-content h2 {
    font-family: var(--sans);
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.article-content h3 {
    font-family: var(--sans);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

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

.article-content a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid rgba(37, 99, 235, 0.3);
    transition: all 0.2s;
}

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

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

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

.article-content blockquote {
    padding: 1.5rem 2rem;
    margin: 2.5rem 0;
    background: rgba(37, 99, 235, 0.05);
    border-left: 4px solid var(--accent);
    font-style: italic;
    color: var(--text-secondary);
}

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

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

.article-content code {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 0.9em;
    padding: 0.2em 0.4em;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
    color: var(--text);
}

.article-content pre {
    margin: 2rem 0;
    padding: 1.5rem;
    background: #f6f8fa;
    border-radius: 8px;
    overflow-x: auto;
    border: 1px solid var(--border);
}

.article-content pre code {
    background: none;
    padding: 0;
}

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

.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    font-size: 1rem;
}

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

.article-content th {
    background: rgba(37, 99, 235, 0.05);
    font-weight: 600;
    color: var(--text);
}

/* Reading Progress Bar */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), #60a5fa);
    z-index: 9999;
    transition: width 0.1s ease;
}

/* Table of Contents */
.toc {
    background: rgba(37, 99, 235, 0.05);
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--accent);
    margin: 2rem 0;
    font-family: var(--sans);
}

.toc h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text);
}

.toc ul {
    list-style: none;
    padding-left: 0;
}

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

.toc a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s;
}

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

/* Footer (matching homepage) */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 2rem;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
    background: var(--surface);
}

.footer-nav {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-top: 1rem;
}

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

.footer-nav a:hover {
    color: var(--accent);
}

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

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

    .article-content {
        font-size: 1rem;
    }

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

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