/* ========================================
   ThienLV Blog - Complete Theme Styles
   Modern, Minimal, Fast
   ======================================== */

/* --- CSS Variables --- */
:root {
    --color-bg: #fafafa;
    --color-surface: #ffffff;
    --color-text: #1a1a2e;
    --color-text-secondary: #555;
    --color-text-muted: #888;
    --color-accent: #2563eb;
    --color-accent-hover: #1d4ed8;
    --color-highlight: #60a5fa;
    --color-border: #e5e7eb;
    --color-code-bg: #1e293b;
    --color-error: #ef4444;
    --color-success: #22c55e;
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --max-width: 720px;
    --max-width-wide: 1200px;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.1);
    --transition: 0.2s ease;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-main);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-accent-hover); }

.container {
    max-width: var(--max-width-wide);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.7rem 1.75rem;
    font-family: var(--font-main);
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: var(--color-accent);
    color: #fff;
    border-color: var(--color-accent);
}

.btn-primary:hover {
    background: var(--color-accent-hover);
    border-color: var(--color-accent-hover);
    color: #fff;
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    color: var(--color-text-secondary);
    border-color: var(--color-border);
}

.btn-outline:hover {
    border-color: var(--color-text-secondary);
    color: var(--color-text);
    transform: translateY(-1px);
}

/* --- Search Form --- */
.search-form {
    display: flex;
    gap: 0;
    max-width: 480px;
    margin: 0 auto;
}

.search-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--color-border);
    border-right: none;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    font-family: var(--font-main);
    font-size: 0.95rem;
    color: var(--color-text);
    background: var(--color-surface);
    outline: none;
    transition: border-color var(--transition);
}

.search-input:focus {
    border-color: var(--color-accent);
}

.search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    padding: 0;
    background: var(--color-accent);
    color: #fff;
    border: none;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    cursor: pointer;
    transition: background var(--transition);
}

.search-btn:hover {
    background: var(--color-accent-hover);
}

/* --- Header --- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.site-logo { text-decoration: none; }
.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text);
    letter-spacing: -0.02em;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-list a {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color var(--transition);
}

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

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    flex-direction: column;
    gap: 5px;
}
.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-text);
    border-radius: 2px;
    transition: var(--transition);
}

@media (max-width: 768px) {
    .menu-toggle { display: flex; }
    .main-nav {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--color-surface);
        border-bottom: 1px solid var(--color-border);
        padding: 1rem 1.5rem;
    }
    .main-nav.active { display: block; }
    .nav-list { flex-direction: column; gap: 0.75rem; }
    .menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
    .menu-toggle.active span:nth-child(2) { opacity: 0; }
    .menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }
}

/* --- Hero Section --- */
.hero {
    padding: 4rem 0 2rem;
    text-align: center;
}

.hero-title {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.2;
    margin-bottom: 0.75rem;
}

.highlight {
    background: linear-gradient(120deg, var(--color-accent), #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-sub {
    font-size: 1.1rem;
    color: var(--color-text-secondary);
    max-width: 500px;
    margin: 0 auto;
}

/* --- Blog Grid --- */
.blog-section, .archive-section { padding: 2rem 0 4rem; }

/* ========================================
   Blog Grid
   ======================================== */

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.5rem;
}


/* --- Archive Header --- */
.archive-header {
    text-align: center;
    padding: 2rem 0 2.5rem;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 2rem;
}

.archive-title {
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.archive-title span {
    color: var(--color-accent);
}

.archive-count {
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.archive-desc {
    font-size: 1rem;
    color: var(--color-text-secondary);
    max-width: 600px;
    margin: 0.75rem auto 0;
    line-height: 1.7;
}


/* ========================================
   Blog Grid - Enhanced (no-image cards)
   ======================================== */

.blog-card {
    background: var(--color-surface);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--color-border);
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.blog-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: transparent;
}

/* Cards WITH image */
.blog-card:has(.card-image) {
    border: none;
    box-shadow: var(--shadow-sm);
}

.card-image {
    display: block;
    aspect-ratio: 3/2;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.blog-card:hover .card-image img { transform: scale(1.05); }

.card-body { padding: 1.25rem; }

.card-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-bottom: 0.75rem;
}

.card-cat {
    background: #eff6ff;
    color: var(--color-accent);
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 500;
    font-size: 0.75rem;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 0.6rem;
    letter-spacing: -0.01em;
}

.card-title a { color: var(--color-text); }
.card-title a:hover { color: var(--color-accent); }

.card-excerpt {
    font-size: 0.88rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-read-more {
    font-size: 0.83rem;
    font-weight: 500;
    color: var(--color-accent);
    transition: gap var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.card-read-more:hover {
    gap: 0.5rem;
}

/* Placeholder thumbnail */
.card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.card-placeholder::after {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0H22v4h14V4zM0 22h4v-4H0v4zm0 14h4v-4H0v4zm0-7h4v-4H0v4zm56-7h4v-4h-4v4zm0 14h4v-4h-4v4zm0-7h4v-4h-4v4zM22 4v4h14V4H22z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.placeholder-letter {
    font-size: 3.5rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.25);
    font-family: 'Inter', sans-serif;
    z-index: 1;
    user-select: none;
    text-transform: uppercase;
}

.blog-card:hover .card-placeholder .placeholder-letter {
    color: rgba(255, 255, 255, 0.4);
    transition: color 0.3s ease;
}

/* Cards WITHOUT image - clean fallback (placeholder handles it now) */
.blog-card:not(:has(.card-image)) .card-body {
    padding: 1.25rem;
}

.blog-card:not(:has(.card-image)) {
    border-left: none;
}

/* ========================================
   Taxonomy Pages - Polished
   ======================================== */

.taxonomy-header {
    text-align: center;
    padding: 3rem 1rem 2.5rem;
    margin-bottom: 2.5rem;
    border-bottom: 1px solid var(--color-border);
    position: relative;
}

.taxonomy-header .yoast-breadcrumb {
    max-width: 100%;
    margin: 0 auto 1.25rem;
    text-align: left;
}

.taxonomy-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    color: var(--color-accent);
    margin: 0 auto 1rem;
}

.taxonomy-icon--tag {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    color: #16a34a;
    border-radius: 50%;
    width: 56px;
    height: 56px;
}

.taxonomy-title {
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
    color: var(--color-text);
}

.taxonomy-description {
    font-size: 1rem;
    color: var(--color-text-secondary);
    max-width: 560px;
    margin: 0.5rem auto 0;
    line-height: 1.7;
}

.taxonomy-count {
    display: block;
    font-size: 0.82rem;
    color: var(--color-text-muted);
    margin-top: 0.75rem;
    background: #f1f5f9;
    padding: 3px 12px;
    border-radius: 12px;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

/* Tag archive body fix */
body.tag {
    display: block;
}

/* Taxonomy archive layout */
.taxonomy-archive .container {
    max-width: var(--max-width-wide);
}

.taxonomy-archive .content-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2.5rem;
    align-items: start;
}

.taxonomy-archive .content-main {
    min-width: 0;
}

.taxonomy-archive .content-sidebar {
    position: sticky;
    top: 2rem;
}

.taxonomy-archive .blog-grid {
    margin-top: 0.5rem;
}

/* ========================================
   Archive Header (search, date)
   ======================================== */

.archive-header {
    text-align: center;
    padding: 2.5rem 0 2rem;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 2rem;
}

.archive-title {
    font-size: clamp(1.3rem, 3vw, 1.85rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.4rem;
}

.archive-title span {
    color: var(--color-accent);
}

.archive-count {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.archive-desc {
    font-size: 0.95rem;
    color: var(--color-text-secondary);
    max-width: 560px;
    margin: 0.5rem auto 0;
    line-height: 1.7;
}


/* --- Single Post --- */
.single-post { padding: 2rem 0 4rem; }
.single-post .container { max-width: var(--max-width-wide); }

.single-post .content-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2.5rem;
    align-items: start;
}

.single-post .content-main {
    min-width: 0;
}

.single-post .content-sidebar {
    position: sticky;
    top: 2rem;
}

.post-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--color-border);
}

.post-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-bottom: 1rem;
}

.post-cat {
    display: inline-block;
    background: #eff6ff;
    color: var(--color-accent);
    padding: 2px 10px;
    border-radius: 4px;
    font-weight: 500;
    font-size: 0.82rem;
    text-decoration: none;
    transition: var(--transition);
}

.post-cat:hover {
    background: var(--color-accent);
    color: #fff;
}

.post-title {
    font-size: clamp(1.5rem, 3.5vw, 2.25rem);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.02em;
    margin-bottom: 0.75rem;
}

.post-author { font-size: 0.9rem; color: var(--color-text-secondary); }

.post-featured-image {
    margin-bottom: 2rem;
    border-radius: var(--radius);
    overflow: hidden;
}

.post-featured-image img { width: 100%; }

/* Post Content Typography */
.post-content {
    font-size: 1.05rem;
    line-height: 1.85;
    color: var(--color-text);
}

.post-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 2rem 0 1rem;
    letter-spacing: -0.02em;
}

.post-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 1.5rem 0 0.75rem;
}

.post-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 1.25rem 0 0.5rem;
}

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

.post-content ul, .post-content ol {
    margin: 1rem 0 1.25rem 1.5rem;
}

.post-content li { margin-bottom: 0.5rem; }

.post-content blockquote {
    border-left: 3px solid var(--color-accent);
    padding: 0.75rem 1.25rem;
    margin: 1.5rem 0;
    background: #f8fafc;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: var(--color-text-secondary);
}

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

.post-content code {
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
}

.post-content pre {
    background: var(--color-code-bg);
    color: #e2e8f0;
    padding: 1.25rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.5rem 0;
    font-size: 0.9rem;
    line-height: 1.6;
}

.post-content pre code {
    background: none;
    padding: 0;
    color: inherit;
}

.post-content img {
    border-radius: 8px;
    margin: 1.5rem 0;
}

.post-content a {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.post-content a:hover { text-decoration: none; }

.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.95rem;
}

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

.post-content th {
    background: #f8fafc;
    font-weight: 600;
}

.post-content thead tr {
    border-bottom: 2px solid var(--color-border);
}

/* Post Tags */
.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
}

.tag {
    display: inline-block;
    background: #f1f5f9;
    color: var(--color-text-secondary);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: var(--transition);
}

.tag:hover { background: #e2e8f0; color: var(--color-text); }

/* Post Footer */
.post-footer {
    margin-top: 1rem;
}

/* Post Navigation */
.post-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
    font-size: 0.9rem;
}

.post-nav-prev { text-align: left; }
.post-nav-next { text-align: right; }
.post-nav a { color: var(--color-text-secondary); }
.post-nav a:hover { color: var(--color-accent); }

/* --- 404 Page --- */
.error-404 {
    min-height: 60vh;
    display: flex;
    align-items: center;
    padding: 3rem 0;
}

.error-404 .container {
    text-align: center;
    max-width: 600px;
}

.error-content {
    margin-bottom: 2rem;
}

.error-title {
    font-size: clamp(5rem, 15vw, 8rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.04em;
    background: linear-gradient(135deg, var(--color-accent), #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.error-subtitle {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 0.5rem;
}

.error-desc {
    font-size: 1rem;
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
}

.error-actions {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.error-search {
    margin-bottom: 2.5rem;
}

.error-recent {
    text-align: left;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1.5rem;
}

.error-recent h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--color-text);
}

.error-recent-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.error-recent-list a {
    display: block;
    padding: 0.5rem 0;
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    border-bottom: 1px solid var(--color-border);
    transition: color var(--transition);
}

.error-recent-list li:last-child a {
    border-bottom: none;
}

.error-recent-list a:hover {
    color: var(--color-accent);
}

/* --- Page --- */
.page-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 3rem 0;
}

.page-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

/* --- No Posts --- */
.no-posts {
    text-align: center;
    padding: 4rem 0;
    color: var(--color-text-muted);
}

.no-posts h2 { font-size: 1.5rem; margin-bottom: 0.5rem; color: var(--color-text-secondary); }

.no-posts .search-form {
    margin-top: 1.5rem;
}

/* --- Pagination --- */
.pagination {
    margin-top: 3rem;
    text-align: center;
}

/* Hide screen reader heading "Phân trang bài viết" */
.pagination .screen-reader-text {
    display: none;
}

.pagination .nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.35rem;
}

.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.5rem;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    transition: all 0.2s ease;
    text-decoration: none;
}

.pagination .page-numbers:hover {
    background: var(--color-accent);
    color: #fff;
    border-color: var(--color-accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.pagination .page-numbers.current {
    background: var(--color-accent);
    color: #fff;
    border-color: var(--color-accent);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.pagination .page-numbers.dots {
    border: none;
    background: transparent;
    color: var(--color-text-secondary);
    min-width: auto;
    cursor: default;
}

.pagination .page-numbers.dots:hover {
    transform: none;
    box-shadow: none;
    background: transparent;
    color: var(--color-text-secondary);
}

/* --- Comments --- */
.post-comments {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
}

.comments-area {
    max-width: 100%;
}

.comments-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
    color: var(--color-text);
}

.comment-list {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem;
}

.comment-list .children {
    list-style: none;
    padding-left: 2rem;
    margin-top: 1rem;
    border-left: 2px solid var(--color-border);
}

.comment-body {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 1rem;
    transition: box-shadow var(--transition);
}

.comment-body:hover {
    box-shadow: var(--shadow-sm);
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.comment-author img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.comment-author .fn {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--color-text);
}

.comment-author .fn a {
    color: var(--color-text);
    text-decoration: none;
}

.comment-author .fn a:hover {
    color: var(--color-accent);
}

.comment-metadata {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-left: auto;
}

.comment-metadata a {
    color: var(--color-text-muted);
    text-decoration: none;
}

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

.comment-content {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--color-text-secondary);
}

.comment-content p {
    margin-bottom: 0.5rem;
}

.reply {
    margin-top: 0.75rem;
}

.reply a {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--color-accent);
    padding: 4px 10px;
    border-radius: 6px;
    background: #eff6ff;
    transition: var(--transition);
    text-decoration: none;
}

.reply a:hover {
    background: var(--color-accent);
    color: #fff;
}

.no-comments {
    text-align: center;
    padding: 1.5rem;
    color: var(--color-text-muted);
    font-size: 0.9rem;
    background: #f8fafc;
    border-radius: var(--radius);
}

/* Comment Form */
.comment-respond {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
}

#reply-title,
.comment-reply-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
    color: var(--color-text);
}

#cancel-comment-reply-link {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text-muted);
    margin-left: 0.5rem;
}

#cancel-comment-reply-link:hover {
    color: var(--color-error);
}

.comment-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.comment-form p {
    margin: 0;
}

.comment-form-comment,
.comment-form-author,
.comment-form-email,
.comment-form-url {
    display: flex;
    flex-direction: column;
}

.comment-form label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    margin-bottom: 0.35rem;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 0.7rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: var(--font-main);
    font-size: 0.95rem;
    color: var(--color-text);
    background: var(--color-surface);
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
}

.comment-form input:focus,
.comment-form textarea:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.comment-form textarea {
    min-height: 120px;
    resize: vertical;
}

.comment-form .form-submit {
    margin-top: 0.5rem;
}

.comment-form .submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 1.75rem;
    background: var(--color-accent);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-main);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition), transform var(--transition);
}

.comment-form .submit:hover {
    background: var(--color-accent-hover);
    transform: translateY(-1px);
}

.comment-form .submit:active {
    transform: translateY(0);
}

.comment-notes,
.logged-in-as {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.logged-in-as a {
    color: var(--color-accent);
}

.comment-navigation {
    display: flex;
    justify-content: space-between;
    margin: 1rem 0;
    font-size: 0.85rem;
}

.comment-navigation a {
    color: var(--color-accent);
    font-weight: 500;
}

/* --- Widgets --- */
.widget {
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    background: var(--color-surface);
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
}

.widget-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-accent);
    display: inline-block;
}

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

.widget ul li {
    padding: 0.4rem 0;
    font-size: 0.88rem;
    border-bottom: 1px solid var(--color-border);
}

.widget ul li:last-child {
    border-bottom: none;
}

.widget ul li a {
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: color var(--transition);
}

.widget ul li a:hover {
    color: var(--color-accent);
}

.widget ul li .post-date {
    display: block;
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-top: 2px;
}

/* Tag cloud widget */
.widget_tag_cloud .tagcloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.widget_tag_cloud .tagcloud a {
    display: inline-block;
    padding: 3px 10px;
    background: #f1f5f9;
    color: var(--color-text-secondary);
    border-radius: 4px;
    font-size: 0.8rem !important;
    text-decoration: none;
    transition: var(--transition);
}

.widget_tag_cloud .tagcloud a:hover {
    background: var(--color-accent);
    color: #fff;
}

/* Category widget with count */
.widget_categories ul li {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.widget_categories .count {
    font-size: 0.75rem;
    background: #f1f5f9;
    padding: 1px 8px;
    border-radius: 10px;
    color: var(--color-text-muted);
}

/* --- Footer --- */
.site-footer {
    background: var(--color-text);
    color: #94a3b8;
    padding: 3rem 0 1.5rem;
    margin-top: 2rem;
}

.footer-inner {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.5rem;
}

.footer-desc { font-size: 0.9rem; line-height: 1.6; }

.footer-col h4 {
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-links a {
    color: #94a3b8;
    font-size: 0.9rem;
    transition: color var(--transition);
}

.footer-links a:hover { color: #fff; }

.footer-bottom {
    padding-top: 1.5rem;
    border-top: 1px solid #334155;
    text-align: center;
    font-size: 0.8rem;
}

/* --- Selection --- */
::selection {
    background: var(--color-accent);
    color: #fff;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--color-bg);
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }
    .footer-inner {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .hero { padding: 2.5rem 0 1.5rem; }
    .post-nav { grid-template-columns: 1fr; }
    .post-nav-next { text-align: left; }
    .comment-list .children { padding-left: 1rem; }
    .comment-body { padding: 1rem; }
    .comment-author { flex-wrap: wrap; }
    .comment-metadata { margin-left: 0; width: 100%; margin-top: 0.25rem; }
    .error-actions { flex-direction: column; align-items: center; }
    .single-post .content-layout,
    .taxonomy-archive .content-layout { grid-template-columns: 1fr; }
    .content-sidebar { display: none; }
    .single-post .container { max-width: 100%; }
}

/* --- Print --- */
@media print {
    .site-header, .site-footer, .post-nav, .post-comments, .post-tags { display: none; }
    body { background: #fff; }
    .single-post .container { max-width: 100%; }
}

/* ========================================
   Contact Form 7 Styles
   ======================================== */

.wpcf7 {
    max-width: 600px;
    margin: 0 auto;
}

.wpcf7-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.wpcf7-form p {
    margin: 0;
    display: flex;
    flex-direction: column;
}

.wpcf7-form label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    margin-bottom: 0.4rem;
}

.wpcf7-form-control-wrap {
    display: block;
}

/* Text, email, url, tel inputs */
.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="url"],
.wpcf7-form input[type="tel"],
.wpcf7-form input[type="number"],
.wpcf7-form input[type="date"] {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: var(--font-main);
    font-size: 0.95rem;
    color: var(--color-text);
    background: var(--color-surface);
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.wpcf7-form input:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Textarea */
.wpcf7-form textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: var(--font-main);
    font-size: 0.95rem;
    color: var(--color-text);
    background: var(--color-surface);
    outline: none;
    resize: vertical;
    min-height: 140px;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.wpcf7-form textarea:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Select */
.wpcf7-form select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: var(--font-main);
    font-size: 0.95rem;
    color: var(--color-text);
    background: var(--color-surface);
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 8L1 3h10z' fill='%23555'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
    transition: border-color var(--transition);
}

.wpcf7-form select:focus {
    border-color: var(--color-accent);
}

/* Submit button */
.wpcf7-form input[type="submit"],
.wpcf7-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 2rem;
    background: var(--color-accent);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-main);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition), transform var(--transition);
    width: auto;
    align-self: flex-start;
}

.wpcf7-form input[type="submit"]:hover,
.wpcf7-submit:hover {
    background: var(--color-accent-hover);
    transform: translateY(-1px);
}

.wpcf7-form input[type="submit"]:active {
    transform: translateY(0);
}

/* Checkbox / Acceptance */
.wpcf7-acceptance {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.wpcf7-acceptance input[type="checkbox"] {
    margin-top: 0.25rem;
    width: 18px;
    height: 18px;
    accent-color: var(--color-accent);
    flex-shrink: 0;
}

.wpcf7-acceptance label {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-bottom: 0;
    font-weight: 400;
}

/* Quiz field */
.wpcf7-quiz {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
}

.wpcf7-quiz input[type="text"] {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: var(--font-main);
    font-size: 0.95rem;
    color: var(--color-text);
    background: var(--color-surface);
    outline: none;
    transition: border-color var(--transition);
}

.wpcf7-quiz input:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Validation errors */
.wpcf7-not-valid-tip {
    font-size: 0.8rem;
    color: var(--color-error);
    margin-top: 0.35rem;
    display: block;
}

.wpcf7-form-control.wpcf7-not-valid {
    border-color: var(--color-error) !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

/* Response messages */
.wpcf7-response-output {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    margin: 1rem 0 0;
    line-height: 1.5;
}

.wpcf7-response-output.wpcf7-mail-sent-ok {
    background: #f0fdf4;
    border: 1px solid #86efac;
    color: #166534;
}

.wpcf7-response-output.wpcf7-validation-errors,
.wpcf7-response-output.wpcf7-spam-blocked {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #991b1b;
}

.wpcf7-response-output.wpcf7-mail-sent-ng {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #991b1b;
}

/* Spinner */
.wpcf7-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--color-border);
    border-top-color: var(--color-accent);
    border-radius: 50%;
    animation: wpcf7-spin 0.6s linear infinite;
    margin-left: 0.5rem;
    vertical-align: middle;
}

@keyframes wpcf7-spin {
    to { transform: rotate(360deg); }
}

/* Hidden honeypot field (anti-spam already styled) */
.wpcf7-form .hp-form-field {
    position: absolute;
    left: -9999px;
    opacity: 0;
    height: 0;
    width: 0;
}

/* ========================================
   Page Styles (Giới thiệu, Liên hệ)
   ======================================== */

.page-content .entry-content {
    max-width: var(--max-width);
    margin: 0 auto;
    font-size: 1.05rem;
    line-height: 1.85;
}

.page-content .entry-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 2rem 0 1rem;
    letter-spacing: -0.02em;
}

.page-content .entry-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 1.5rem 0 0.75rem;
}

.page-content .entry-content p {
    margin-bottom: 1.25rem;
    color: var(--color-text-secondary);
}

.page-content .entry-content ul,
.page-content .entry-content ol {
    margin: 1rem 0 1.25rem 1.5rem;
    color: var(--color-text-secondary);
}

.page-content .entry-content li {
    margin-bottom: 0.5rem;
}

.page-content .entry-content a {
    color: var(--color-accent);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.page-content .entry-content a:hover {
    text-decoration: none;
}

/* ========================================
   Contact Page Specific
   ======================================== */

.contact-page-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    max-width: 900px;
    margin: 0 auto;
    align-items: start;
}

.contact-info {
    padding-top: 0.5rem;
}

.contact-info h2 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.contact-info p {
    font-size: 0.95rem;
    color: var(--color-text-secondary);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.contact-info-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.contact-info-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
    color: var(--color-text-secondary);
}

.contact-info-list li svg {
    width: 20px;
    height: 20px;
    color: var(--color-accent);
    flex-shrink: 0;
}

.contact-info-list a {
    color: var(--color-accent);
    text-decoration: none;
}

.contact-info-list a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .contact-page-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* ========================================
   About Page Specific
   ======================================== */

.about-hero {
    text-align: center;
    padding: 2rem 0;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--color-border);
}

.about-hero h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

.about-hero p {
    font-size: 1.1rem;
    color: var(--color-text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

.about-section {
    margin-bottom: 2.5rem;
}

.about-section h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--color-text);
}

.about-section p {
    font-size: 0.95rem;
    color: var(--color-text-secondary);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.about-section ul {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
}

.about-section ul li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    padding: 0.5rem 0;
}

.about-section ul li::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-accent);
    flex-shrink: 0;
}

/* ========================================
   Table of Contents (LuckyWP)
   ======================================== */

.lwptoc {
    background: #f8fafc;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
}

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

.lwptoc ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.lwptoc li {
    margin-bottom: 0.35rem;
}

.lwptoc a {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: color var(--transition);
}

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

.lwptoc .lwptoc_depth-1 { padding-left: 0; }
.lwptoc .lwptoc_depth-2 { padding-left: 1.25rem; }

/* ========================================
   Yoast Breadcrumbs
   ======================================== */

.yoast-breadcrumb {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-bottom: 1rem;
    padding: 0.5rem 0;
}

.yoast-breadcrumb a {
    color: var(--color-text-muted);
    text-decoration: none;
}

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

.yoast-breadcrumb span {
    margin: 0 0.35rem;
    color: var(--color-text-muted);
}

/* ========================================
   Page Header
   ======================================== */

.page-header-section {
    text-align: center;
    padding: 2.5rem 0 2rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--color-border);
}

.page-header-section .yoast-breadcrumb {
    text-align: left;
    margin-bottom: 1rem;
}

.page-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 0 4rem;
}

.page-content .container {
    max-width: var(--max-width);
}

/* ========================================
   Global-styles override (remove WP block styles pollution)
   ======================================== */

.wp-block-image img {
    border-radius: var(--radius-sm);
}

.wp-block-quote {
    border-left: 3px solid var(--color-accent);
    padding: 0.75rem 1.25rem;
    margin: 1.5rem 0;
    background: #f8fafc;
    border-radius: 0 8px 8px 0;
}

/* ========================================
   Single Post Breadcrumbs
   ======================================== */

.single-post .yoast-breadcrumb {
    max-width: var(--max-width);
    margin: 0 auto 0;
    padding: 1rem 0 0;
}

/* ========================================
   Taxonomy Pages (Category & Tag)
   ======================================== */

/* (taxonomy styles defined earlier in file - keeping sub-categories and related tags here) */

/* Sub-categories list on category page */
.taxonomy-children {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.taxonomy-children a {
    display: inline-block;
    padding: 0.35rem 1rem;
    background: #f1f5f9;
    color: var(--color-text-secondary);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition);
}

.taxonomy-children a:hover {
    background: var(--color-accent);
    color: #fff;
}

/* Related tags on category page */
.taxonomy-related-tags {
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.taxonomy-related-tags span {
    margin-right: 0.5rem;
}

.taxonomy-related-tags a {
    display: inline-block;
    padding: 2px 8px;
    background: #f8fafc;
    color: var(--color-text-secondary);
    border-radius: 4px;
    font-size: 0.8rem;
    margin: 2px;
    transition: var(--transition);
}

.taxonomy-related-tags a:hover {
    background: var(--color-accent);
    color: #fff;
}

/* Author archive */
.author-archive {
    padding: 2rem 0;
    margin-bottom: 2rem;
}

/* Date archive */
.date-archive-header {
    text-align: center;
    padding: 2rem 0;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 2rem;
}

.date-archive-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-text);
}

/* SEO: Taxonomy meta at bottom */
.taxonomy-meta {
    margin-top: 3rem;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
}

.taxonomy-meta h3 {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    margin-bottom: 0.5rem;
}

/* ========================================
   v1.6.0 Additions
   ======================================== */

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

/* --- Back to Top --- */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--color-accent);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
    z-index: 100;
}

.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.back-to-top:hover {
    background: #4338ca;
    transform: translateY(-2px);
}

/* --- Share Bar --- */
.share-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 0;
    margin: 1rem 0;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.share-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text-muted);
    margin-right: 0.25rem;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #f1f5f9;
    color: var(--color-text-secondary);
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.share-btn:hover {
    transform: translateY(-2px);
}
.share-fb:hover { background: #1877f2; color: #fff; }
.share-tw:hover { background: #000; color: #fff; }
.share-tg:hover { background: #0088cc; color: #fff; }
.share-copy:hover { background: var(--color-accent); color: #fff; }
.share-copy.copied { background: #16a34a; color: #fff; }

/* --- Author Row (header) --- */
.post-author-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    justify-content: center;
    margin-top: 0.75rem;
}

.author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-info {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text);
}

.post-updated {
    font-size: 0.78rem;
    color: var(--color-text-muted);
}

/* --- Author Box (end of post) --- */
.author-box {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: #f8fafc;
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
    margin: 1.5rem 0;
}

.author-box-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.author-box-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-box-name {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.author-box-bio {
    font-size: 0.88rem;
    color: var(--color-text-secondary);
    line-height: 1.5;
    margin: 0;
}

/* --- Related Posts --- */
.related-posts {
    margin: 2rem 0;
}

.related-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-accent);
    display: inline-block;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.related-card {
    display: block;
    background: var(--color-surface);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--color-border);
    text-decoration: none;
    color: var(--color-text);
    transition: transform var(--transition), box-shadow var(--transition);
}

.related-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.related-thumb {
    aspect-ratio: 16/10;
    overflow: hidden;
}

.related-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-card-body {
    padding: 0.75rem 0.9rem;
}

.related-card-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
}

.related-card-meta time {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.related-cat {
    font-size: 0.7rem;
    background: #eff6ff;
    color: var(--color-accent);
    padding: 1px 6px;
    border-radius: 3px;
    font-weight: 500;
}

.related-card-body h4 {
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 0.35rem;
    color: var(--color-text);
}

.related-card:hover h4 {
    color: var(--color-accent);
}

.related-excerpt {
    font-size: 0.82rem;
    color: var(--color-text-secondary);
    line-height: 1.5;
    margin: 0 0 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-card-footer {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.related-comments {
    color: var(--color-accent);
    font-weight: 500;
}

/* --- Header Search --- */
.header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header-search-toggle {
    background: none;
    border: none;
    color: var(--color-text-secondary);
    cursor: pointer;
    padding: 0.4rem;
    border-radius: 6px;
    transition: var(--transition);
}

.header-search-toggle:hover,
.header-search-toggle.active {
    color: var(--color-accent);
    background: #f1f5f9;
}

.header-search {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.header-search.active {
    max-height: 60px;
    padding: 0.75rem 0;
}

.header-search .search-form {
    display: flex;
    max-width: 400px;
    margin: 0 auto;
}

.header-search .search-field {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    font-size: 0.9rem;
    outline: none;
}

.header-search .search-field:focus {
    border-color: var(--color-accent);
}

.header-search .search-submit {
    padding: 0.5rem 1rem;
    background: var(--color-accent);
    color: #fff;
    border: none;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
}

/* --- Footer Enhancement --- */
.footer-brand-col {
    flex: 1.2;
}

.footer-social {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(255,255,255,0.1);
    color: #94a3b8;
    transition: var(--transition);
}

.footer-social a:hover {
    background: var(--color-accent);
    color: #fff;
}

/* --- Font Optimization --- */
@font-face {
    font-display: swap;
}

/* --- Responsive for new elements --- */
@media (max-width: 768px) {
    .related-grid {
        grid-template-columns: 1fr;
    }
    .share-bar {
        flex-wrap: wrap;
    }
    .author-box {
        flex-direction: column;
        text-align: center;
    }
    .back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
    }
}

/* === Author Archive Page === */
.author-profile {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 2rem;
    margin: 1.5rem 0 2rem;
    background: var(--card-bg, #fff);
    border-radius: 12px;
    border: 1px solid var(--border-color, #e5e7eb);
}
.author-profile-avatar {
    flex-shrink: 0;
}
.author-profile-avatar img {
    border-radius: 50%;
    width: 120px;
    height: 120px;
    object-fit: cover;
    border: 3px solid var(--primary, #6366f1);
}
.author-profile-name {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    color: var(--text-primary, #1a1a2e);
}
.author-profile-bio {
    color: var(--text-secondary, #555);
    font-size: 1rem;
    line-height: 1.6;
    margin: 0 0 0.75rem;
}
.author-profile-meta {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}
.author-stat {
    font-size: 0.875rem;
    color: var(--text-secondary, #777);
}
.author-stat strong {
    color: var(--primary, #6366f1);
    font-weight: 600;
}
.author-profile-links {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.25rem;
}
.author-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    color: var(--primary, #6366f1);
    text-decoration: none;
    transition: opacity 0.2s;
}
.author-link:hover { opacity: 0.8; }

@media (max-width: 600px) {
    .author-profile {
        flex-direction: column;
        text-align: center;
    }
    .author-profile-meta,
    .author-profile-links {
        justify-content: center;
    }
}

/* Author links */
.author-name { text-decoration: none; color: inherit; transition: color 0.2s; }
.author-name:hover { color: var(--primary, #6366f1); }
.author-box-name a { text-decoration: none; color: inherit; transition: color 0.2s; }
.author-box-name a:hover { color: var(--primary, #6366f1); }
.author-box-link { display: inline-block; margin-top: 0.5rem; font-size: 0.875rem; color: var(--primary, #6366f1); text-decoration: none; }
.author-box-link:hover { text-decoration: underline; }

/* === Quick Answer Block (GEO) === */
.quick-answer {
    margin: 1.5rem 0;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, #f0f4ff, #e8f0fe);
    border-left: 4px solid var(--primary, #6366f1);
    border-radius: 0 12px 12px 0;
    font-size: 0.95rem;
    line-height: 1.7;
}
.quick-answer-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary, #6366f1);
    margin-bottom: 0.75rem;
}
.quick-answer-header svg { flex-shrink: 0; }
.quick-answer-body p { margin: 0 0 0.5rem; }
.quick-answer-body p:last-child { margin-bottom: 0; }
.quick-answer ul, .quick-answer ol { margin: 0.5rem 0; padding-left: 1.25rem; }
.quick-answer li { margin-bottom: 0.25rem; }
