/* ============================================
   BLOG STYLESHEET — mubi.me/blog
   Matches the CV site design system
   ============================================ */

/* --- CSS Variables & Design Tokens --- */
:root {
    /* Colors - technical dossier palette */
    --bg-primary: #f3f5f1;
    --bg-secondary: #e7ece3;
    --bg-card: #fffdfa;
    --bg-card-hover: #f8fbf6;
    --bg-header: #101312;

    /* Accent Colors */
    --accent-primary: #d1495b;
    --accent-secondary: #0f8b8d;
    --accent-tertiary: #f4d35e;

    /* Text */
    --text-primary: #171918;
    --text-secondary: #414741;
    --text-muted: #6e756d;
    --text-accent: #0f6f72;

    /* Borders */
    --border-subtle: rgba(20, 27, 23, 0.14);
    --border-glow: rgba(209, 73, 91, 0.34);

    /* Spacing */
    --section-gap: 24px;
    --card-radius: 8px;

    /* Typography */
    --font-display: 'Sora', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-main: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;
}

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

html {
    font-size: 15px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background:
        linear-gradient(90deg, rgba(16, 19, 18, 0.045) 1px, transparent 1px),
        linear-gradient(rgba(16, 19, 18, 0.045) 1px, transparent 1px),
        var(--bg-primary);
    background-size: 38px 38px;
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--accent-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

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

a:focus-visible,
button:focus-visible {
    outline: 3px solid rgba(244, 211, 94, 0.85);
    outline-offset: 3px;
}

/* --- Reading Progress Bar --- */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-tertiary), var(--accent-primary), var(--accent-secondary));
    z-index: 10000;
    transition: width 0.1s linear;
    pointer-events: none;
}

/* --- Navigation --- */
.blog-nav {
    background: var(--bg-header);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.blog-nav::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-tertiary), var(--accent-primary), var(--accent-secondary));
    pointer-events: none;
}

.nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 58px;
}

.nav-logo {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 800;
    color: #fffdfa;
    text-decoration: none;
    letter-spacing: -0.5px;
    transition: all 0.3s ease;
}

.nav-logo:hover {
    color: var(--accent-tertiary);
}

.nav-logo .logo-dot {
    color: var(--accent-primary);
}

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

.nav-links a {
    font-family: var(--font-display);
    font-size: 0.82rem;
    font-weight: 600;
    color: #aeb8ac;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.25s ease;
    position: relative;
}

.nav-links a:hover {
    color: #fffdfa;
    background: rgba(255, 253, 250, 0.06);
}

.nav-links a.active {
    color: var(--accent-tertiary);
    background: rgba(244, 211, 94, 0.08);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 18px;
    height: 2px;
    background: var(--accent-tertiary);
    border-radius: 1px;
}

/* --- Main Container --- */
.blog-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px 24px;
}

/* --- Blog Hero --- */
.blog-hero {
    text-align: center;
    padding: 48px 0 36px;
    animation: fadeInUp 0.6s ease-out;
}

.blog-hero h1 {
    font-family: var(--font-display);
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

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

.blog-hero p {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.7;
}

/* --- Tag Filter Bar --- */
.tag-filter-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 32px;
    animation: fadeInUp 0.6s ease-out 0.1s both;
}

.tag-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    font-family: var(--font-main);
    font-size: 0.78rem;
    font-weight: 600;
    border-radius: 20px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-card);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 2px 2px 0 rgba(16, 19, 18, 0.04);
}

.tag-filter-btn:hover {
    border-color: var(--accent-secondary);
    color: var(--accent-secondary);
    transform: translateY(-1px);
    box-shadow: 3px 3px 0 rgba(16, 19, 18, 0.06);
}

.tag-filter-btn.active {
    background: var(--accent-secondary);
    color: #fffdfa;
    border-color: var(--accent-secondary);
    box-shadow: 3px 3px 0 rgba(15, 139, 141, 0.2);
}

.tag-filter-btn .tag-count {
    font-size: 0.68rem;
    opacity: 0.7;
    font-family: var(--font-mono);
}

/* --- Post Cards Grid --- */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-bottom: 36px;
}

.post-card {
    background: var(--bg-card);
    border-radius: var(--card-radius);
    padding: 28px;
    border: 1px solid var(--border-subtle);
    box-shadow: 4px 4px 0 rgba(16, 19, 18, 0.05);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    display: flex;
    flex-direction: column;
}

.post-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-tertiary), var(--accent-primary));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.post-card:hover {
    border-color: var(--border-glow);
    box-shadow: 8px 8px 0 rgba(16, 19, 18, 0.08);
    transform: translate(-2px, -2px);
}

.post-card:hover::before {
    transform: scaleX(1);
}

.post-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.post-card-date {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0;
}

.post-card-readtime {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 500;
    color: var(--accent-secondary);
    padding: 2px 8px;
    background: rgba(15, 139, 141, 0.08);
    border-radius: 4px;
}

.post-card-title {
    font-family: var(--font-display);
    font-size: 1.12rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
    line-height: 1.35;
    transition: color 0.25s;
}

.post-card:hover .post-card-title {
    color: var(--accent-primary);
}

.post-card-desc {
    font-size: 0.85rem;
    line-height: 1.65;
    color: var(--text-secondary);
    margin-bottom: 16px;
    flex-grow: 1;
}

.post-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: auto;
}

.post-card-tag {
    display: inline-block;
    padding: 3px 10px;
    font-size: 0.7rem;
    font-weight: 500;
    border-radius: 6px;
    background: #f4f6ef;
    color: #303631;
    border: 1px solid rgba(20, 27, 23, 0.12);
    transition: all 0.2s;
}

.post-card:hover .post-card-tag {
    border-color: rgba(20, 27, 23, 0.2);
}

/* Card entrance animation */
.post-card.animate-in {
    animation: fadeInUp 0.5s ease-out both;
}

/* --- In-Feed Ad Slot --- */
.ad-slot-infeed {
    background: var(--bg-card);
    border-radius: var(--card-radius);
    padding: 20px;
    border: 1px dashed var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 250px;
    position: relative;
}

.ad-slot-infeed::after {
    content: 'Advertisement';
    position: absolute;
    top: 6px;
    right: 10px;
    font-size: 0.62rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.5;
}

/* --- Pagination --- */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 40px 0;
    animation: fadeInUp 0.5s ease-out 0.3s both;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    font-family: var(--font-display);
    font-size: 0.82rem;
    font-weight: 600;
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    background: var(--bg-card);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 3px 3px 0 rgba(16, 19, 18, 0.04);
}

.pagination-btn:hover:not(:disabled) {
    border-color: var(--accent-secondary);
    color: var(--accent-secondary);
    transform: translate(-1px, -1px);
    box-shadow: 5px 5px 0 rgba(16, 19, 18, 0.06);
}

.pagination-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.pagination-info {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* --- Blog Layout (Post View) --- */
.blog-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 32px;
    align-items: start;
}

/* --- Sidebar --- */
.blog-sidebar {
    position: sticky;
    top: 80px;
}

.sidebar-card {
    background: var(--bg-card);
    border-radius: var(--card-radius);
    padding: 24px;
    border: 1px solid var(--border-subtle);
    box-shadow: 4px 4px 0 rgba(16, 19, 18, 0.05);
    margin-bottom: 20px;
}

.sidebar-card-title {
    font-family: var(--font-display);
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-accent);
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-subtle);
}

.sidebar-card .post-card-tag {
    margin: 3px;
    cursor: pointer;
}

.sidebar-ad-slot {
    background: var(--bg-card);
    border-radius: var(--card-radius);
    border: 1px dashed var(--border-subtle);
    padding: 16px;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.sidebar-ad-slot::after {
    content: 'Advertisement';
    position: absolute;
    top: 6px;
    right: 10px;
    font-size: 0.62rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.5;
}

/* --- Back to Blog Button --- */
.back-to-blog {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-display);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    padding: 8px 0;
    margin-bottom: 24px;
    transition: all 0.25s ease;
}

.back-to-blog:hover {
    color: var(--accent-primary);
    gap: 12px;
}

.back-to-blog svg {
    transition: transform 0.25s ease;
}

.back-to-blog:hover svg {
    transform: translateX(-3px);
}

/* --- Article Header --- */
.article-header {
    margin-bottom: 36px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--border-subtle);
    animation: fadeInUp 0.6s ease-out;
}

.article-header .post-card-meta {
    margin-bottom: 16px;
}

.article-title {
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 14px;
    letter-spacing: -0.5px;
}

.article-desc {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 16px;
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* --- Article Body (Markdown Content) --- */
.article-body {
    animation: fadeInUp 0.6s ease-out 0.1s both;
}

.article-body h1 {
    font-family: var(--font-display);
    font-size: 1.9rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-top: 48px;
    margin-bottom: 18px;
    line-height: 1.25;
    letter-spacing: -0.3px;
}

.article-body h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 42px;
    margin-bottom: 14px;
    line-height: 1.3;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-subtle);
}

.article-body h3 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 32px;
    margin-bottom: 12px;
    line-height: 1.35;
}

.article-body h4 {
    font-family: var(--font-display);
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--text-accent);
    margin-top: 24px;
    margin-bottom: 10px;
}

.article-body p {
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 18px;
}

.article-body strong {
    color: var(--text-primary);
    font-weight: 600;
}

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

/* Lists */
.article-body ul,
.article-body ol {
    margin-bottom: 18px;
    padding-left: 8px;
}

.article-body ul {
    list-style: none;
}

.article-body ul li {
    position: relative;
    padding-left: 20px;
    font-size: 0.92rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.article-body ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.75em;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent-primary);
}

.article-body ol {
    counter-reset: ol-counter;
    list-style: none;
}

.article-body ol li {
    position: relative;
    padding-left: 28px;
    font-size: 0.92rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 6px;
    counter-increment: ol-counter;
}

.article-body ol li::before {
    content: counter(ol-counter);
    position: absolute;
    left: 0;
    top: 0.15em;
    width: 20px;
    height: 20px;
    background: var(--accent-secondary);
    color: #fff;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Blockquotes */
.article-body blockquote {
    margin: 24px 0;
    padding: 20px 24px;
    border-left: 4px solid var(--accent-primary);
    background: linear-gradient(90deg, rgba(209, 73, 91, 0.06), transparent 80%);
    border-radius: 0 8px 8px 0;
    font-style: italic;
}

.article-body blockquote p {
    color: var(--text-primary);
    font-size: 0.95rem;
    margin-bottom: 0;
}

.article-body blockquote p:not(:last-child) {
    margin-bottom: 10px;
}

/* Code */
.article-body code {
    font-family: var(--font-mono);
    font-size: 0.85em;
}

.article-body p code,
.article-body li code,
.article-body td code {
    padding: 2px 7px;
    background: rgba(15, 139, 141, 0.08);
    border: 1px solid rgba(15, 139, 141, 0.15);
    border-radius: 4px;
    color: var(--text-accent);
    font-size: 0.82em;
}

.article-body pre {
    margin: 24px 0;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 6px 6px 0 rgba(16, 19, 18, 0.12);
    position: relative;
}

.article-body pre code {
    display: block;
    padding: 24px;
    overflow-x: auto;
    font-size: 0.82rem;
    line-height: 1.7;
    -webkit-overflow-scrolling: touch;
}

/* Code block language label */
.article-body pre::before {
    content: attr(data-lang);
    position: absolute;
    top: 0;
    right: 0;
    padding: 4px 12px;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.06);
    border-radius: 0 10px 0 6px;
    letter-spacing: 0.5px;
}

/* Images */
.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 24px 0;
    border: 1px solid var(--border-subtle);
    box-shadow: 6px 6px 0 rgba(16, 19, 18, 0.06);
    transition: all 0.3s ease;
}

.article-body img:hover {
    box-shadow: 10px 10px 0 rgba(16, 19, 18, 0.08);
    transform: translate(-2px, -2px);
}

/* Tables */
.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    font-size: 0.88rem;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-subtle);
    box-shadow: 4px 4px 0 rgba(16, 19, 18, 0.04);
}

.article-body thead {
    background: var(--bg-header);
}

.article-body th {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    color: #fffdfa;
    padding: 12px 16px;
    text-align: left;
    letter-spacing: 0;
}

.article-body td {
    padding: 12px 16px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-subtle);
}

.article-body tbody tr:hover {
    background: rgba(15, 139, 141, 0.04);
}

.article-body tbody tr:last-child td {
    border-bottom: none;
}

/* Horizontal rules */
.article-body hr {
    border: none;
    height: 1px;
    background: var(--border-subtle);
    margin: 36px 0;
}

/* Links in article */
.article-body a {
    color: var(--accent-secondary);
    text-decoration: underline;
    text-decoration-color: rgba(15, 139, 141, 0.3);
    text-underline-offset: 3px;
    transition: all 0.2s ease;
}

.article-body a:hover {
    color: var(--accent-primary);
    text-decoration-color: var(--accent-primary);
}

/* Mermaid diagrams */
.article-body .mermaid {
    margin: 24px 0;
    text-align: center;
    background: var(--bg-card);
    border-radius: 10px;
    padding: 24px;
    border: 1px solid var(--border-subtle);
    box-shadow: 4px 4px 0 rgba(16, 19, 18, 0.04);
}

/* --- Article Ad Slot --- */
.article-ad-slot {
    margin: 36px 0;
    padding: 20px;
    background: var(--bg-card);
    border-radius: var(--card-radius);
    border: 1px dashed var(--border-subtle);
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.article-ad-slot::after {
    content: 'Advertisement';
    position: absolute;
    top: 6px;
    right: 10px;
    font-size: 0.62rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.5;
}

/* --- Comments Section --- */
.comments-section {
    margin-top: 48px;
    padding-top: 36px;
    border-top: 1px solid var(--border-subtle);
}

.comments-section-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.comments-section-title svg {
    color: var(--accent-secondary);
}

/* --- 404 / Not Found --- */
.not-found {
    text-align: center;
    padding: 80px 20px;
    animation: fadeInUp 0.5s ease-out;
}

.not-found-code {
    font-family: var(--font-mono);
    font-size: 6rem;
    font-weight: 800;
    color: var(--accent-primary);
    opacity: 0.15;
    line-height: 1;
    margin-bottom: 16px;
}

.not-found h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.not-found p {
    color: var(--text-muted);
    margin-bottom: 24px;
}

.not-found-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 600;
    background: var(--accent-secondary);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 4px 4px 0 rgba(15, 139, 141, 0.2);
    text-decoration: none;
}

.not-found-btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 rgba(15, 139, 141, 0.25);
    color: #fff;
}

/* --- Scroll to Top --- */
.scroll-top-btn {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--bg-header);
    color: #fffdfa;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 4px 4px 0 rgba(209, 73, 91, 0.18);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    z-index: 999;
}

.scroll-top-btn.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top-btn:hover {
    transform: translateY(-2px);
    box-shadow: 6px 6px 0 rgba(209, 73, 91, 0.22);
    background: var(--accent-primary);
}

/* --- Footer --- */
.blog-footer {
    text-align: center;
    margin-top: 48px;
    padding: 28px 24px;
    font-size: 0.78rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-subtle);
}

.footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-muted);
    font-weight: 500;
    transition: color 0.2s;
}

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

.footer-sep {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--border-subtle);
}

.footer-copy {
    margin-top: 8px;
    opacity: 0.7;
}

/* --- Loading Skeleton --- */
.skeleton-card {
    background: var(--bg-card);
    border-radius: var(--card-radius);
    padding: 28px;
    border: 1px solid var(--border-subtle);
}

.skeleton-line {
    height: 14px;
    background: linear-gradient(90deg, var(--bg-secondary) 25%, rgba(255,253,250,0.6) 50%, var(--bg-secondary) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 6px;
    margin-bottom: 12px;
}

.skeleton-line.short { width: 40%; }
.skeleton-line.medium { width: 70%; }
.skeleton-line.long { width: 100%; }
.skeleton-line.title { height: 22px; width: 80%; margin-bottom: 16px; }

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* --- Animations --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* --- View transitions --- */
.view-fade-enter {
    animation: fadeIn 0.35s ease-out;
}

/* --- Responsive --- */
@media (max-width: 900px) {
    .blog-layout {
        grid-template-columns: 1fr;
    }

    .blog-sidebar {
        position: static;
        order: -1;
    }

    .blog-hero h1 {
        font-size: 1.8rem;
    }

    .article-title {
        font-size: 1.7rem;
    }

    .blog-container {
        padding: 20px 16px;
    }

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

@media (max-width: 500px) {
    html {
        font-size: 14px;
    }

    .nav-inner {
        height: 50px;
        padding: 0 16px;
    }

    .blog-hero {
        padding: 28px 0 20px;
    }

    .blog-hero h1 {
        font-size: 1.5rem;
    }

    .article-title {
        font-size: 1.4rem;
    }

    .article-body pre code {
        font-size: 0.76rem;
        padding: 16px;
    }

    .post-card {
        padding: 20px;
    }

    .tag-filter-bar {
        gap: 6px;
    }

    .tag-filter-btn {
        padding: 5px 10px;
        font-size: 0.72rem;
    }

    .pagination-btn {
        padding: 8px 14px;
        font-size: 0.76rem;
    }

    .scroll-top-btn {
        bottom: 16px;
        right: 16px;
        width: 38px;
        height: 38px;
    }
}

/* --- Print Styles --- */
@media print {
    .no-print,
    .blog-nav,
    .scroll-top-btn,
    .reading-progress,
    .ad-slot-infeed,
    .sidebar-ad-slot,
    .article-ad-slot,
    .comments-section,
    .pagination,
    .tag-filter-bar,
    .back-to-blog {
        display: none !important;
    }

    body {
        background: white;
        font-size: 11px;
    }

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

    .article-body pre {
        box-shadow: none;
        border: 1px solid #ddd;
    }

    .article-body img {
        box-shadow: none;
    }

    .blog-layout {
        grid-template-columns: 1fr;
    }

    .blog-sidebar {
        display: none;
    }
}
