/* ============================================
   Blog Post Template Styles
   ============================================ */

.post {
    padding: calc(var(--nav-height) + 60px) 0 80px;
}

.post .container {
    max-width: 800px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    transition: color var(--transition-fast);
    margin-bottom: 32px;
}

.back-link:hover {
    color: var(--text-primary);
}

/* Post Header */
.post-header {
    margin-bottom: 48px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border);
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.post-title {
    font-size: clamp(28px, 5vw, 42px);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
}

.post-author {
    font-size: 15px;
    color: var(--text-secondary);
}

/* Post Body */
.post-body h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 48px 0 16px;
    letter-spacing: -0.01em;
}

.post-body h3 {
    font-size: 20px;
    font-weight: 700;
    margin: 36px 0 12px;
    letter-spacing: -0.01em;
}

.post-body h4 {
    font-size: 17px;
    font-weight: 600;
    margin: 24px 0 8px;
    color: var(--accent);
}

.post-body p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 16px;
    font-size: 16px;
}

.post-body strong {
    color: var(--text-primary);
    font-weight: 600;
}

.post-body a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color var(--transition-fast);
}

.post-body a:hover {
    color: var(--accent-hover);
}

.post-body a.btn {
    text-decoration: none;
}

.post-body a.btn-primary {
    color: white;
}

.post-body a.btn-ghost {
    color: var(--text-secondary);
}

.post-body ul, .post-body ol {
    margin: 16px 0;
    padding-left: 24px;
}

.post-body li {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 8px;
    font-size: 16px;
}

.post-body li strong {
    color: var(--text-primary);
}

.post-body li p {
    margin: 4px 0 12px;
}

/* Code blocks */
.post-body pre {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    margin: 20px 0;
    overflow-x: auto;
}

.post-body pre code {
    font-family: var(--font-mono);
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.post-body code {
    font-family: var(--font-mono);
    font-size: 14px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 2px 6px;
    color: var(--accent);
}

.post-body pre code {
    background: none;
    border: none;
    padding: 0;
    color: var(--text-secondary);
}

/* Blockquote */
.post-body blockquote {
    border-left: 3px solid var(--accent);
    margin: 32px 0;
    padding: 20px 24px;
    background: var(--bg-surface);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.post-body blockquote p {
    font-size: 18px;
    font-style: italic;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.post-body blockquote cite {
    font-size: 14px;
    color: var(--text-muted);
    font-style: normal;
}

/* Images */
.post-image {
    width: 100%;
    border-radius: var(--radius-lg);
    margin: 32px 0;
    border: 1px solid var(--border);
}

/* Video containers */
.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    margin: 24px 0 8px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-caption {
    text-align: center;
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 32px;
}

/* Embed containers (PDFs etc) */
.embed-container {
    margin: 24px 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
}

.embed-container iframe {
    display: block;
}

/* Tech badges (for family tree post) */
.tech-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0 20px;
}

/* Feature grid (for family tree post) */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin: 20px 0;
}

.feature-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    transition: border-color var(--transition-base);
}

.feature-card:hover {
    border-color: var(--border-light);
}

.feature-card h4 {
    color: var(--accent);
    margin: 0 0 8px;
    font-size: 15px;
}

.feature-card p {
    font-size: 14px;
    margin: 0;
}

/* App buttons */
.app-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin: 16px 0 32px;
}

/* Resume page */
.resume-content {
    padding: calc(var(--nav-height) + 60px) 0 80px;
}

.resume-content .container {
    max-width: 900px;
}

.resume-embed {
    margin: 32px 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
}

.resume-embed iframe {
    display: block;
    width: 100%;
}

.resume-actions {
    text-align: center;
    margin-top: 32px;
}

/* Responsive */
@media (max-width: 768px) {
    .post {
        padding: calc(var(--nav-height) + 40px) 0 60px;
    }

    .post-body h2 {
        font-size: 22px;
    }

    .post-body h3 {
        font-size: 18px;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .app-buttons {
        flex-direction: column;
    }

    .app-buttons .btn {
        width: 100%;
        justify-content: center;
    }
}
