:root {
    --bg: #f1f5f9;
    --bg-alt: #eef2f7;
    --text: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --card-bg: #ffffff;
    --header-bg: rgba(255,255,255,0.97);
    --primary: #0f172a;
    --secondary: #3b82f6;
}
html.dark {
    --bg: #0f172a;
    --bg-alt: #1e293b;
    --text: #f1f5f9;
    --text-muted: #94a3b8;
    --border: #334155;
    --card-bg: #1e293b;
    --header-bg: rgba(15,23,42,0.95);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font-body); background: var(--bg); color: var(--text); line-height: 1.7; transition: background 0.3s, color 0.3s; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.site-header { position: sticky; top: 0; z-index: 100; background: var(--header-bg); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 1rem 0; }
.logo { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; color: var(--text); font-weight: 700; font-size: 1.25rem; }
.logo-mark { width: 36px; height: 36px; background: linear-gradient(135deg, var(--primary), var(--secondary)); border-radius: 8px; display: flex; align-items: center; justify-content: center; color: white; font-size: 0.8rem; }
.main-nav { display: flex; gap: 1.5rem; }
.main-nav a { color: var(--text-muted); text-decoration: none; font-weight: 500; font-size: 0.95rem; transition: color 0.2s; }
.main-nav a:hover { color: var(--primary); }
.theme-toggle { background: var(--bg-alt); border: 1px solid var(--border); border-radius: 8px; padding: 0.5rem; cursor: pointer; color: var(--text); }
.site-main { min-height: 60vh; }
.hero-section { padding: 5rem 0; text-align: center; background: linear-gradient(135deg, var(--primary), var(--secondary)); color: white; }
.hero-section h1 { font-family: var(--font-heading); font-size: 3rem; font-weight: 700; margin-bottom: 1rem; }
.hero-subtitle { font-size: 1.25rem; opacity: 0.9; max-width: 600px; margin: 0 auto 2rem; }
.hero-badge {
    display: inline-block; padding: 0.35rem 1rem; border-radius: 999px;
    font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 1.25rem;
}
.visual-homepage, .visual-page { width: 100%; }
.visual-homepage img, .visual-page img { max-width: 100%; height: auto; }
.hero-search { display: flex; max-width: 500px; margin: 0 auto; gap: 0.5rem; }
.hero-search input { flex: 1; padding: 0.85rem 1.25rem; border: none; border-radius: 12px; font-size: 1rem; }
.hero-search button { padding: 0.85rem 1.5rem; background: var(--text); color: var(--bg); border: none; border-radius: 12px; font-weight: 600; cursor: pointer; }
.content-section { padding: 4rem 0; }
.section-header { text-align: center; margin-bottom: 2.5rem; }
.section-header h2 { font-family: var(--font-heading); font-size: 2rem; font-weight: 700; }
.section-header p { color: var(--text-muted); margin-top: 0.5rem; }
.posts-grid, .posts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 2rem; }
.posts-list { display: flex; flex-direction: column; gap: 1.5rem; }
.post-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; transition: transform 0.2s, box-shadow 0.2s; }
.post-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0,0,0,0.1); }
.post-card-link { text-decoration: none; color: inherit; display: block; }
.post-card-image { aspect-ratio: 16/10; overflow: hidden; background: var(--bg-alt); }
.post-card-image img { width: 100%; height: 100%; object-fit: cover; }
.post-card-placeholder { display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--primary), var(--secondary)); }
.post-card-placeholder span { font-size: 2rem; font-weight: 700; color: white; opacity: 0.5; }
.post-card-body { padding: 1.5rem; }
.post-card-body h3 { font-family: var(--font-heading); font-size: 1.15rem; font-weight: 600; margin-bottom: 0.5rem; line-height: 1.4; }
.post-card-body p { color: var(--text-muted); font-size: 0.9rem; }
.post-meta { display: flex; gap: 1rem; margin-top: 1rem; font-size: 0.8rem; color: var(--text-muted); }
.article-page { padding: 3rem 0; max-width: 800px; }
.article-header { margin-bottom: 2rem; }
.article-category { display: inline-block; background: var(--primary); color: white; padding: 0.25rem 0.75rem; border-radius: 20px; font-size: 0.8rem; text-decoration: none; margin-bottom: 1rem; }
.article-header h1 { font-family: var(--font-heading); font-size: 2.5rem; font-weight: 700; line-height: 1.2; }
.article-meta { display: flex; gap: 1.5rem; margin-top: 1rem; color: var(--text-muted); font-size: 0.9rem; }
.article-featured { margin-bottom: 2rem; border-radius: 16px; overflow: hidden; }
.featured-img { width: 100%; height: auto; }
.article-content { font-size: 1.1rem; line-height: 1.8; }
.article-content h2 { font-family: var(--font-heading); margin: 2rem 0 1rem; font-size: 1.5rem; }
.article-content h3 { margin: 1.5rem 0 0.75rem; }
.article-content p { margin-bottom: 1.25rem; }
.article-content a { color: var(--primary); }
.article-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 2rem; padding-top: 2rem; border-top: 1px solid var(--border); }
.tag { background: var(--bg-alt); padding: 0.3rem 0.75rem; border-radius: 20px; font-size: 0.85rem; }
.related-posts { margin-top: 4rem; padding-top: 3rem; border-top: 1px solid var(--border); }
.related-posts h2 { font-family: var(--font-heading); margin-bottom: 2rem; }
.page-header { padding: 3rem 0 2rem; text-align: center; }
.page-header h1 { font-family: var(--font-heading); font-size: 2.5rem; }
.page-content { padding: 3rem 0; max-width: 800px; margin: 0 auto; }
.page-content h1 { font-family: var(--font-heading); margin-bottom: 2rem; }
.block-cta { background: linear-gradient(135deg, var(--primary), var(--secondary)); color: white; padding: 2rem; border-radius: 16px; text-align: center; margin: 2rem 0; }
.block-cta .btn { display: inline-block; background: white; color: var(--primary); padding: 0.75rem 1.5rem; border-radius: 8px; text-decoration: none; font-weight: 600; margin-top: 1rem; }
.block-faq details { border: 1px solid var(--border); border-radius: 8px; margin-bottom: 0.5rem; padding: 1rem; }
.site-footer { background: var(--bg-alt); border-top: 1px solid var(--border); padding: 3rem 0 1.5rem; margin-top: 4rem; }
.footer-grid { display: flex; justify-content: space-between; margin-bottom: 2rem; }
.footer-nav { display: flex; gap: 1.5rem; }
.footer-nav a { color: var(--text-muted); text-decoration: none; }
.copyright { text-align: center; color: var(--text-muted); font-size: 0.85rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.no-posts { text-align: center; color: var(--text-muted); grid-column: 1/-1; padding: 3rem; }
.lazy { opacity: 0; transition: opacity 0.3s; }
.lazy.loaded { opacity: 1; }
@media (max-width: 768px) {
    .hero-section h1 { font-size: 2rem; }
    .main-nav { display: none; }
    .posts-grid { grid-template-columns: 1fr; }
    .footer-grid { flex-direction: column; gap: 1.5rem; }
}
