:root {
    --bg: #ffffff;
    --bg-muted: #f7f7f7;
    --border: #e8e8e8;
    --text: #1a1a1a;
    --text-muted: #7a7a7a;
    --text-light: #b0b0b0;
    --accent: #f59e0b;
    --accent-hover: #d97706;
    --accent-light: #fef3c7;
    --radius: 10px;
    --radius-sm: 6px;
    --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
    --font-mono: "JetBrains Mono", "SF Mono", "Fira Code", Consolas, monospace;
    --max-w: 700px;
    --max-w-wide: 900px;
}

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

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

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 20px; }
.container-wide { max-width: var(--max-w-wide); margin: 0 auto; padding: 0 20px; }

/* ===== NAVBAR ===== */
.navbar {
    border-bottom: 1px solid var(--border);
    background: var(--bg);
    position: sticky; top: 0; z-index: 100;
}
.navbar-inner {
    max-width: var(--max-w-wide); margin: 0 auto; padding: 0 20px;
    display: flex; justify-content: space-between; align-items: center;
    height: 56px;
}
.navbar .brand { display: flex; align-items: center; text-decoration: none; gap: 10px; }
.navbar .brand img { display: block; }
.navbar .brand span {
    font-size: 1rem; font-weight: 700; color: var(--text);
    letter-spacing: -0.3px;
}
.nav-right { display: flex; align-items: center; gap: 4px; }
.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-links a {
    color: var(--text-muted); text-decoration: none;
    padding: 6px 12px; border-radius: var(--radius-sm);
    font-size: 0.88rem; font-weight: 500;
    transition: color 0.15s;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--text); font-weight: 600; }

.lang-switcher {
    margin-left: 8px; padding-left: 12px;
    border-left: 1px solid var(--border);
}
.lang-switcher select {
    appearance: none; -webkit-appearance: none;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 5px;
    padding: 4px 22px 4px 8px;
    font-size: 0.78rem; font-family: inherit; font-weight: 500;
    color: var(--text-muted);
    cursor: pointer; outline: none;
    transition: border-color 0.15s;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23b0b0b0'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 6px center;
}
.lang-switcher select:hover { border-color: var(--accent); }
.lang-switcher select:focus { border-color: var(--accent); }

/* ===== HERO (Ali Abdaal style) ===== */
.hero {
    padding: 48px 0 32px;
}
.hero-inner {
    display: flex; align-items: center; gap: 48px;
}
.hero-text { flex: 1; min-width: 0; }
.hero-greeting {
    font-size: 1rem; font-weight: 600; color: var(--text-muted);
    margin-bottom: 4px;
}
.hero h1 {
    font-size: 2.4rem; font-weight: 800; line-height: 1.2;
    color: var(--text); margin-bottom: 12px;
    letter-spacing: -0.8px;
}
.hero p {
    font-size: 1.05rem; color: var(--text-muted);
    line-height: 1.65; margin-bottom: 24px;
    max-width: 520px;
}
.hero-avatar {
    flex-shrink: 0;
}
.hero-avatar img {
    width: 120px; height: 120px; border-radius: 50%;
    object-fit: cover;
}
.avatar-placeholder {
    width: 120px; height: 120px; border-radius: 50%;
    background: var(--bg-muted); color: var(--text-muted);
    display: flex; align-items: center; justify-content: center;
    font-size: 2.6rem; font-weight: 700;
}

/* hero inline newsletter */
.hero-newsletter {
    margin-top: 4px;
}
.hero-newsletter p {
    font-size: 0.9rem; color: var(--text-muted);
    margin-bottom: 12px; max-width: 100%;
}
.newsletter-form {
    display: flex; gap: 8px; max-width: 420px;
}
.newsletter-form input {
    flex: 1; padding: 10px 16px;
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    font-size: 0.9rem; font-family: inherit;
    background: var(--bg); color: var(--text);
    outline: none; transition: border-color 0.15s;
}
.newsletter-form input:focus { border-color: var(--accent); }
.newsletter-form button {
    padding: 10px 22px; border: none; border-radius: var(--radius-sm);
    background: var(--accent); color: #fff;
    font-size: 0.88rem; font-weight: 600; cursor: pointer;
    transition: background 0.15s; white-space: nowrap;
}
.newsletter-form button:hover { background: var(--accent-hover); }

/* ===== SECTION HEADER ===== */
.section-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 20px;
}
.section-header h2 {
    font-size: 1.2rem; font-weight: 700; color: var(--text);
}
.section-header a {
    color: var(--accent); font-size: 0.88rem;
    text-decoration: none; font-weight: 600; transition: opacity 0.15s;
}
.section-header a:hover { opacity: 0.7; }

/* ===== POST LIST (Ali style: date + title) ===== */
.post-list { margin: 16px 0 32px; }
.post-item {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; gap: 14px;
}
.post-thumb {
    width: 44px; height: 44px; border-radius: 8px; object-fit: cover;
    flex-shrink: 0;
}
.post-item-text {
    flex: 1; min-width: 0;
    display: flex; align-items: baseline; gap: 14px;
}
.post-item:last-of-type { border-bottom: none; }
.post-date {
    color: var(--text-muted); font-size: 0.85rem;
    flex-shrink: 0; min-width: 85px;
    font-family: var(--font-mono);
}
.post-item a {
    color: var(--text); text-decoration: none;
    font-size: 1rem; font-weight: 500;
    transition: color 0.15s; line-height: 1.4;
}
.post-item a:hover { color: var(--accent); }
.post-item .post-arrow {
    color: var(--text-light); margin-left: auto;
    font-size: 0.88rem; flex-shrink: 0;
}
.post-item:hover .post-arrow { color: var(--accent); }

/* ===== PAGINATION ===== */
.pagination {
    display: flex; justify-content: center; align-items: center;
    gap: 6px; margin: 36px 0 16px;
}
.pagination a, .pagination span {
    padding: 7px 16px; border-radius: var(--radius-sm);
    font-size: 0.85rem; text-decoration: none;
}
.pagination a {
    color: var(--text); border: 1px solid var(--border);
    transition: all 0.15s; font-weight: 500;
}
.pagination a:hover { border-color: var(--accent); color: var(--accent); }
.pagination span { color: var(--text-muted); }

/* ===== POST DETAIL ===== */
.post-detail {
    padding: 32px 0 24px;
}
.post-cover {
    width: 100%; border-radius: var(--radius);
    margin-bottom: 20px; display: block;
}
.post-detail h1 {
    font-size: 2rem; font-weight: 800; line-height: 1.3;
    letter-spacing: -0.5px;
    color: var(--text); margin-bottom: 10px;
}
.post-meta {
    font-size: 0.82rem; color: var(--text-muted);
    margin-bottom: 8px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.post-meta .sep { color: #d0d0d0; }

.post-content { margin-top: 24px; font-size: 1rem; line-height: 1.85; }
.post-content h2 {
    font-size: 1.4rem; font-weight: 700;
    margin: 36px 0 12px; color: var(--text);
}
.post-content h3 { font-size: 1.15rem; font-weight: 600; margin: 28px 0 8px; color: var(--text); }
.post-content p { margin-bottom: 20px; color: #2a2a2a; }
.post-content ul, .post-content ol { margin: 10px 0 20px 24px; }
.post-content li { margin-bottom: 6px; }
.post-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; font-weight: 500; }
.post-content a:hover { color: var(--accent-hover); }
.post-content pre {
    background: #1a1a2e;
    border-radius: var(--radius-sm);
    padding: 20px 24px;
    overflow-x: auto;
    margin: 24px 0;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.7;
    color: #e2e8f0;
}
.post-content code { font-family: var(--font-mono); font-size: 0.85em; }
.post-content :not(pre) > code {
    background: var(--bg-muted);
    color: var(--text);
    padding: 2px 7px; border-radius: 4px;
    font-size: 0.85em; font-weight: 500;
}
.post-content blockquote {
    border-left: 3px solid var(--accent);
    padding: 12px 20px; margin: 20px 0;
    background: var(--accent-light);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: var(--text-muted);
}
.post-content blockquote p:last-child { margin-bottom: 0; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag {
    display: inline-block;
    background: var(--bg-muted);
    color: var(--text-muted);
    padding: 2px 10px; border-radius: 20px;
    font-size: 0.78rem; font-weight: 500;
    transition: all 0.15s;
    text-decoration: none;
}
.tag:hover { color: var(--accent); background: var(--accent-light); }

.post-content img {
    max-width: 100%; border-radius: var(--radius-sm);
    margin: 20px 0;
}
.post-content table {
    width: 100%; border-collapse: collapse;
    margin: 20px 0; border-radius: var(--radius-sm); overflow: hidden;
}
.post-content th, .post-content td {
    border: 1px solid var(--border);
    padding: 8px 14px; text-align: left;
}
.post-content th { background: var(--bg-muted); font-weight: 600; font-size: 0.88rem; }
.post-content hr { border: none; height: 1px; background: var(--border); margin: 32px 0; }

.codehilite { background: transparent !important; }
.codehilite .c  { color: #6c7086; font-style: italic; }
.codehilite .k  { color: #c9a0dc; font-weight: 600; }
.codehilite .o  { color: var(--accent); }
.codehilite .s  { color: #95c7ae; }
.codehilite .n  { color: #e2e8f0; }
.codehilite .na { color: #e8a87c; }
.codehilite .nb { color: var(--accent); }
.codehilite .nc { color: #facc15; }
.codehilite .nf { color: #60a5fa; }
.codehilite .nd { color: #c9a0dc; }
.codehilite .nn { color: #facc15; }
.codehilite .nx { color: #e2e8f0; }
.codehilite .m  { color: #95c7ae; }

/* ===== BACK / RELATED / TOC ===== */
.post-layout { display: flex; gap: 40px; align-items: flex-start; }
.toc-sidebar { flex-shrink: 0; width: 190px; }
.toc-sticky { position: sticky; top: 76px; max-height: calc(100vh - 96px); overflow-y: auto; }
.toc-sticky h3 {
    font-size: 0.78rem; font-weight: 700;
    color: var(--text-muted); margin-bottom: 10px;
    text-transform: uppercase; letter-spacing: 0.5px;
}
.toc-nav { display: flex; flex-direction: column; gap: 3px; }
.toc-link {
    font-size: 0.8rem; color: var(--text-muted);
    text-decoration: none; padding: 3px 10px; border-radius: 5px;
    border-left: 2px solid transparent;
    transition: all 0.15s; line-height: 1.4;
}
.toc-link:hover { color: var(--text); }
.toc-link.active { color: var(--accent); border-left-color: var(--accent); }
.toc-h3 { padding-left: 18px; font-size: 0.76rem; }

.related-posts { margin: 36px 0; padding-top: 28px; border-top: 1px solid var(--border); }
.related-posts h2 { font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: 14px; }
.related-list { display: flex; flex-direction: column; gap: 2px; }
.related-link {
    display: flex; align-items: baseline; gap: 12px;
    padding: 8px 0; border-bottom: 1px solid var(--border);
    text-decoration: none; transition: color 0.15s;
}
.related-link:last-of-type { border-bottom: none; }
.related-link .related-date {
    font-size: 0.78rem; color: var(--text-muted); flex-shrink: 0; min-width: 70px;
}
.related-link span:last-child {
    font-size: 0.92rem; color: var(--text); font-weight: 500;
}
.related-link:hover span:last-child { color: var(--accent); }

.back-link {
    display: inline-flex; align-items: center; gap: 4px;
    margin-top: 20px;
    color: var(--text-muted); text-decoration: none;
    font-size: 0.88rem; font-weight: 500; transition: color 0.15s;
}
.back-link:hover { color: var(--accent); }

/* ===== PROGRESS / BACK TO TOP / COPY ===== */
.progress-bar {
    position: fixed; top: 0; left: 0; z-index: 999;
    width: 0; height: 3px; background: var(--accent);
    transition: width 0.1s ease;
}
.back-to-top {
    position: fixed; bottom: 28px; right: 28px; z-index: 99;
    width: 40px; height: 40px; border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg); color: var(--text-muted);
    font-size: 1.1rem; cursor: pointer;
    opacity: 0; transform: translateY(12px);
    pointer-events: none;
    transition: all 0.3s ease;
}
.back-to-top.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.back-to-top:hover { border-color: var(--accent); color: var(--accent); }

.copy-btn {
    position: absolute; top: 8px; right: 8px;
    padding: 3px 10px; border-radius: 5px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.4);
    font-size: 0.75rem; font-family: inherit; cursor: pointer;
    opacity: 0; transition: all 0.15s;
}
.post-content pre:hover .copy-btn { opacity: 1; }
.copy-btn:hover { background: rgba(255,255,255,0.1); color: #fff; }

/* ===== REVEAL ===== */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity 0.4s ease, transform 0.4s ease; }
.revealed { opacity: 1; transform: translateY(0); }

/* ===== LIGHTBOX ===== */
.lightbox-overlay {
    position: fixed; inset: 0; z-index: 9999;
    background: rgba(0,0,0,0.85);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none;
    transition: opacity 0.25s ease;
    cursor: zoom-out;
}
.lightbox-overlay.active { opacity: 1; pointer-events: auto; }
.lightbox-overlay img {
    max-width: 90vw; max-height: 90vh;
    border-radius: 6px; box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}
.lightbox-close {
    position: fixed; top: 20px; right: 24px;
    color: #fff; font-size: 1.6rem;
    cursor: pointer; opacity: 0.6; transition: opacity 0.15s;
    background: none; border: none; font-family: inherit; line-height: 1;
    z-index: 10000;
}
.lightbox-close:hover { opacity: 1; }
.post-cover-wrap { cursor: zoom-in; display: block; }
.post-content img { cursor: zoom-in; }

/* ===== TOAST ===== */
.toast {
    position: fixed; bottom: 24px; right: 24px;
    padding: 10px 22px; border-radius: var(--radius-sm);
    background: var(--bg); border: 1px solid var(--border);
    color: var(--text); font-size: 0.88rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08); z-index: 999;
    animation: toast-in 0.3s ease;
}
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

/* ===== FOOTER ===== */
.footer {
    border-top: 1px solid var(--border);
    padding: 20px 0; margin-top: 48px;
}
.footer-inner {
    max-width: var(--max-w-wide); margin: 0 auto; padding: 0 20px;
    display: flex; justify-content: space-between; align-items: center;
    font-size: 0.82rem; color: var(--text-muted); flex-wrap: wrap; gap: 10px;
}
.footer-links { display: flex; gap: 14px; }
.footer-links a { color: var(--text-muted); text-decoration: none; transition: color 0.15s; }
.footer-links a:hover { color: var(--text); }

/* ===== PAGE TITLES ===== */
.page-title { font-size: 1.6rem; font-weight: 800; color: var(--text); margin-bottom: 20px; letter-spacing: -0.5px; }

/* ===== ABOUT ===== */
.about-profile { padding: 32px 0; }
.about-header { display: flex; gap: 28px; align-items: flex-start; margin-bottom: 28px; }
.about-section { margin-bottom: 24px; }
.about-section h2 { font-size: 1.05rem; font-weight: 700; color: var(--text); margin-bottom: 10px; }
.about-section.post-content { border-top: 1px solid var(--border); padding-top: 20px; }

/* ===== TAGS PAGE ===== */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; padding: 16px 0; }
.tag-cloud .tag-item {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 6px 14px; border-radius: 20px;
    background: var(--bg-muted); color: var(--text-muted);
    text-decoration: none; font-size: 0.88rem; font-weight: 500;
    transition: all 0.15s;
}
.tag-cloud .tag-item:hover { color: var(--accent); background: var(--accent-light); }
.tag-cloud .tag-item .count { color: var(--text-light); font-size: 0.78rem; }

/* ===== ARCHIVE ===== */
.archive-group { margin-bottom: 28px; }
.archive-month {
    font-size: 1rem; font-weight: 700;
    color: var(--text); margin-bottom: 10px;
    display: flex; align-items: center; gap: 12px;
}
.archive-month::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.archive-list { list-style: none; }
.archive-list li {
    padding: 7px 0; border-bottom: 1px solid var(--border);
    display: flex; align-items: baseline; gap: 14px;
}
.archive-list li:last-child { border-bottom: none; }
.archive-list .date { color: var(--text-muted); font-size: 0.82rem; min-width: 50px; font-family: var(--font-mono); }
.archive-list a { color: var(--text); text-decoration: none; font-size: 0.92rem; transition: color 0.15s; font-weight: 500; }
.archive-list a:hover { color: var(--accent); }

/* ===== SEARCH ===== */
.search-form { display: flex; gap: 8px; margin-bottom: 24px; }
.search-form input {
    flex: 1; padding: 10px 16px;
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    background: var(--bg); color: var(--text); font-size: 0.9rem;
    outline: none; transition: border-color 0.15s;
}
.search-form input:focus { border-color: var(--accent); }
.search-form button {
    padding: 10px 22px; border: none; border-radius: var(--radius-sm);
    background: var(--accent); color: #fff;
    font-size: 0.88rem; font-weight: 600; cursor: pointer;
    transition: background 0.15s;
}
.search-form button:hover { background: var(--accent-hover); }

/* ===== ADMIN ===== */
.admin-header {
    display: flex; justify-content: space-between;
    align-items: center; margin-bottom: 24px; flex-wrap: wrap; gap: 12px;
}
.admin-actions { display: flex; gap: 10px; }

.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 9px 22px; border-radius: var(--radius-sm);
    text-decoration: none; border: none; cursor: pointer;
    font-size: 0.88rem; font-family: inherit;
    transition: all 0.15s; font-weight: 600;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary {
    background: var(--bg); color: var(--text);
    border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm {
    display: inline-flex; align-items: center;
    padding: 5px 12px; border-radius: 6px;
    font-size: 0.82rem; text-decoration: none; border: none; cursor: pointer;
    font-family: inherit; font-weight: 500;
    background: var(--bg-muted); color: var(--text-muted);
    transition: all 0.15s;
}
.btn-sm:hover { background: var(--accent-light); color: var(--accent); }
.btn-danger { background: #fef2f2; color: #ef4444; }
.btn-danger:hover { background: #ef4444; color: #fff; }

.admin-table {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.admin-table th, .admin-table td {
    padding: 12px 16px; text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 0.88rem;
}
.admin-table th {
    background: var(--bg-muted);
    font-weight: 600; color: var(--text-muted); font-size: 0.8rem;
    text-transform: uppercase; letter-spacing: 0.5px;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table .actions { display: flex; gap: 6px; }
.admin-table a { color: var(--text); text-decoration: none; font-weight: 500; }
.admin-table a:hover { color: var(--accent); }

.login-page {
    display: flex; justify-content: center; align-items: center;
    min-height: 100vh; background: var(--bg-muted);
}
.login-box {
    background: var(--bg); border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 36px 40px;
    width: 100%; max-width: 400px;
}
.login-box h1 { text-align: center; margin-bottom: 24px; font-size: 1.2rem; font-weight: 700; color: var(--text); }
.login-hint { text-align: center; font-size: 0.82rem; color: var(--text-muted); margin: 14px 0; }

.form-group { margin-bottom: 18px; }
.form-group label {
    display: block; font-weight: 600; margin-bottom: 5px;
    font-size: 0.88rem; color: var(--text);
}
.form-group input[type="text"],
.form-group input[type="password"],
.form-group textarea {
    width: 100%;
    padding: 9px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.92rem; font-family: inherit;
    background: var(--bg); color: var(--text);
    outline: none; transition: border-color 0.15s;
}
.form-group input:focus, .form-group textarea:focus { border-color: var(--accent); }
.form-group textarea {
    font-family: var(--font-mono);
    font-size: 0.88rem; line-height: 1.7;
}
.form-checkbox label {
    display: flex; align-items: center; gap: 8px;
    font-weight: normal; cursor: pointer; color: var(--text);
}
.form-checkbox input[type="checkbox"] { width: 18px; height: 18px; cursor: pointer; accent-color: var(--accent); }
.form-actions { display: flex; gap: 10px; margin-top: 24px; }
.alert { padding: 8px 14px; border-radius: 6px; margin-bottom: 14px; font-size: 0.88rem; }
.alert-error { background: #fef2f2; color: #ef4444; border: 1px solid #fecaca; }

.empty { text-align: center; color: var(--text-muted); padding: 48px 20px; font-size: 0.95rem; }

/* ===== GLASS NAVBAR ===== */
.navbar {
    background: rgba(255,255,255,0.82);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* ===== FEATURED POSTS ===== */
.featured-section { margin: 8px 0 24px; }
.featured-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
.featured-card {
    position: relative; border-radius: var(--radius); overflow: hidden;
    background: var(--bg-muted); text-decoration: none; display: block;
    transition: transform 0.2s;
}
.featured-card:hover { transform: translateY(-2px); }
.featured-card:first-child { grid-column: 1 / -1; }
.featured-card img {
    width: 100%; height: 200px; object-fit: cover; display: block;
}
.featured-card:first-child img { height: 280px; }
.featured-card-body { padding: 16px 18px; }
.featured-card-body h3 {
    font-size: 1rem; font-weight: 700; color: var(--text);
    line-height: 1.4; margin-bottom: 4px;
}
.featured-card:first-child .featured-card-body h3 { font-size: 1.15rem; }
.featured-card-body p {
    font-size: 0.85rem; color: var(--text-muted);
    line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
}
.featured-card-body .featured-meta {
    margin-top: 8px; font-size: 0.78rem; color: var(--text-light);
}

/* ===== TAG FILTER BAR ===== */
.tag-filter { margin: 16px 0 20px; }
.tag-filter-inner {
    display: flex; flex-wrap: wrap; gap: 6px;
}
.tag-filter-btn {
    display: inline-block; padding: 4px 14px; border-radius: 20px;
    border: 1px solid var(--border); background: var(--bg);
    color: var(--text-muted); font-size: 0.8rem; font-weight: 500;
    text-decoration: none; cursor: pointer; transition: all 0.15s;
}
.tag-filter-btn:hover, .tag-filter-btn.active {
    border-color: var(--accent); color: var(--accent);
    background: var(--accent-light);
}

/* ===== POST CARDS ===== */
.post-cards { margin: 16px 0 32px; display: flex; flex-direction: column; gap: 16px; }
.post-card {
    display: flex; gap: 18px; padding: 16px; border-radius: var(--radius);
    border: 1px solid var(--border); text-decoration: none;
    transition: all 0.2s; background: var(--bg);
}
.post-card:hover {
    border-color: var(--accent); box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
.post-card-img {
    width: 180px; min-height: 120px; border-radius: 8px;
    object-fit: cover; flex-shrink: 0;
}
.post-card-body { flex: 1; min-width: 0; }
.post-card-title {
    font-size: 1.05rem; font-weight: 700; color: var(--text);
    line-height: 1.4; margin-bottom: 6px;
    display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
}
.post-card:hover .post-card-title { color: var(--accent); }
.post-card-excerpt {
    font-size: 0.88rem; color: var(--text-muted); line-height: 1.6;
    display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 8px;
}
.post-card-meta {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    font-size: 0.78rem; color: var(--text-light);
}
.post-card-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.post-card-tags .tag-sm {
    display: inline-block; padding: 1px 8px; border-radius: 10px;
    background: var(--bg-muted); color: var(--text-muted);
    font-size: 0.72rem; font-weight: 500; text-decoration: none;
    transition: all 0.15s;
}
.post-card-tags .tag-sm:hover { color: var(--accent); background: var(--accent-light); }

/* ===== SOCIAL SHARE ===== */
.share-section { margin: 28px 0; padding-top: 20px; border-top: 1px solid var(--border); }
.share-section h3 {
    font-size: 0.88rem; font-weight: 600; color: var(--text-muted);
    margin-bottom: 10px;
}
.share-buttons { display: flex; gap: 8px; }
.share-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 18px; border-radius: var(--radius-sm);
    border: 1px solid var(--border); background: var(--bg);
    color: var(--text-muted); font-size: 0.82rem; font-weight: 500;
    text-decoration: none; cursor: pointer; transition: all 0.15s;
}
.share-btn:hover { border-color: var(--accent); color: var(--accent); }
.share-btn-twitter:hover { border-color: #1da1f2; color: #1da1f2; }
.share-btn-weibo:hover { border-color: #e6162d; color: #e6162d; }

/* ===== INLINE NEWSLETTER CTA ===== */
.newsletter-cta {
    margin: 32px 0; padding: 24px; border-radius: var(--radius);
    background: var(--accent-light); border: 1px solid var(--accent);
    text-align: center;
}
.newsletter-cta h3 {
    font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: 4px;
}
.newsletter-cta p {
    font-size: 0.85rem; color: var(--text-muted); margin-bottom: 12px;
}
.newsletter-cta .newsletter-form { margin: 0 auto; max-width: 400px; }

/* ===== FULL-WIDTH COVER ===== */
.post-cover-wrap { display: block; cursor: zoom-in; margin: 0 -999px; padding: 0 999px; background: var(--bg-muted); }
.post-cover {
    width: 100%; max-width: var(--max-w-wide); display: block;
    margin: 0 auto; border-radius: 0;
    aspect-ratio: 2 / 1; object-fit: cover;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 720px) {
    .post-layout { flex-direction: column; }
    .toc-sidebar { width: 100%; }
    .toc-sticky { position: static; max-height: none; }
    .toc-nav { flex-direction: row; flex-wrap: wrap; }
    .toc-link { border-left: none; border-bottom: 2px solid transparent; }
    .toc-link.active { border-left: none; border-bottom-color: var(--accent); }
    .toc-h3 { padding-left: 0; }
    .hero { padding: 32px 0 20px; }
    .hero-inner { flex-direction: column-reverse; align-items: center; text-align: center; gap: 24px; }
    .hero p { max-width: 100%; }
    .hero h1 { font-size: 1.8rem; }
    .hero-avatar img, .avatar-placeholder { width: 80px; height: 80px; font-size: 1.8rem; }
    .newsletter-form { max-width: 100%; }
    .post-detail h1 { font-size: 1.4rem; }
    .post-detail { padding: 24px 0; }
    .post-item { flex-wrap: wrap; gap: 8px; }
    .post-thumb { width: 36px; height: 36px; }
    .post-item-text { flex-wrap: wrap; gap: 6px; }
    .post-date { min-width: auto; }
    .post-item .post-arrow { display: none; }
    .about-header { flex-direction: column; text-align: center; align-items: center; }
    .admin-table { font-size: 0.8rem; }
    .admin-table th, .admin-table td { padding: 7px 8px; }
    .featured-grid { grid-template-columns: 1fr; }
    .featured-card img { height: 180px; }
    .featured-card:first-child img { height: 200px; }
    .post-card { flex-direction: column; }
    .post-card-img { width: 100%; height: 180px; }
    .post-cover-wrap { margin: 0 -16px; padding: 0 16px; }
    .post-cover { aspect-ratio: 16/9; }
}
@media (max-width: 600px) {
    .container, .container-wide { padding: 0 16px; }
    .navbar-inner { padding: 0 16px; }
    .nav-links a { padding: 6px 8px; font-size: 0.82rem; }
    .lang-switcher { margin-left: 4px; padding-left: 6px; }
    .lang-switcher a { padding: 2px 4px; font-size: 0.7rem; }
    .hero h1 { font-size: 1.5rem; }
    .featured-card-body { padding: 12px 14px; }
    .post-card { padding: 12px; }
    .share-buttons { flex-wrap: wrap; }
}
