/* KCB Blog - Clean & Minimal Design */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif; color: #1a1a2e; background: #f5f6fa; line-height: 1.7; }
a { color: #2563eb; text-decoration: none; transition: color .2s; }
a:hover { color: #1d4ed8; }
img { max-width: 100%; height: auto; }

/* Layout */
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header { background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%); color: #fff; padding: 20px 0; position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 20px rgba(0,0,0,.1); }
.header-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 15px; }
.site-title { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.5px; }
.site-title a { color: #fff; }
.site-title a:hover { color: #60a5fa; }
.site-desc { font-size: .85rem; color: #94a3b8; margin-top: 2px; }
.header-nav { display: flex; gap: 25px; }
.header-nav a { color: #cbd5e1; font-size: .9rem; font-weight: 500; padding: 5px 0; border-bottom: 2px solid transparent; }
.header-nav a:hover, .header-nav a.active { color: #60a5fa; border-bottom-color: #60a5fa; }

/* Main Content */
.main-grid { display: grid; grid-template-columns: 1fr 300px; gap: 40px; padding: 40px 0; }
@media (max-width: 768px) { .main-grid { grid-template-columns: 1fr; gap: 30px; } }

/* Article Cards */
.article-card { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.08); transition: transform .2s, box-shadow .2s; margin-bottom: 24px; }
.article-card:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(0,0,0,.1); }
.article-img { width: 100%; height: 220px; object-fit: cover; background: #e2e8f0; display: flex; align-items: center; justify-content: center; color: #94a3b8; font-size: 2rem; }
.article-body { padding: 24px; }
.article-category { display: inline-block; background: #e0e7ff; color: #4338ca; font-size: .75rem; font-weight: 600; padding: 3px 10px; border-radius: 20px; margin-bottom: 10px; }
.article-title { font-size: 1.2rem; font-weight: 700; margin-bottom: 8px; line-height: 1.4; }
.article-title a { color: #1a1a2e; }
.article-title a:hover { color: #2563eb; }
.article-meta { font-size: .82rem; color: #64748b; margin-bottom: 10px; }
.article-meta span { margin-right: 15px; }
.article-excerpt { color: #475569; font-size: .92rem; line-height: 1.6; }

/* Sidebar */
.sidebar { position: sticky; top: 100px; align-self: start; }
.sidebar-widget { background: #fff; border-radius: 12px; padding: 24px; margin-bottom: 20px; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.widget-title { font-size: 1rem; font-weight: 700; margin-bottom: 15px; padding-bottom: 10px; border-bottom: 2px solid #e2e8f0; }
.category-list { list-style: none; }
.category-list li { padding: 8px 0; border-bottom: 1px solid #f1f5f9; }
.category-list li:last-child { border: none; }
.category-list a { color: #475569; font-size: .9rem; display: flex; justify-content: space-between; }
.category-list a:hover { color: #2563eb; }
.category-list .count { color: #94a3b8; font-size: .8rem; }

/* Footer */
.site-footer { background: #1a1a2e; color: #94a3b8; text-align: center; padding: 30px 0; margin-top: 40px; font-size: .85rem; }
.site-footer a { color: #60a5fa; }

/* Article Single Page */
.article-single { background: #fff; border-radius: 12px; padding: 40px; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.article-single h1 { font-size: 1.8rem; font-weight: 800; line-height: 1.3; margin-bottom: 15px; }
.article-single .meta { color: #64748b; font-size: .88rem; margin-bottom: 30px; padding-bottom: 20px; border-bottom: 1px solid #e2e8f0; }
.article-single .meta span { margin-right: 20px; }
.article-single .content { font-size: 1rem; line-height: 1.8; color: #334155; }
.article-single .content p { margin-bottom: 16px; }
.article-single .content h2 { font-size: 1.35rem; font-weight: 700; margin: 28px 0 12px; }
.article-single .content h3 { font-size: 1.15rem; font-weight: 700; margin: 24px 0 10px; }
.article-single .content ul, .article-single .content ol { margin: 12px 0; padding-left: 24px; }
.article-single .content li { margin-bottom: 6px; }
.article-single .content code { background: #f1f5f9; padding: 2px 6px; border-radius: 4px; font-size: .88rem; }
.article-single .content pre { background: #1e293b; color: #e2e8f0; padding: 16px; border-radius: 8px; overflow-x: auto; margin: 16px 0; font-size: .88rem; }
.article-single .content blockquote { border-left: 4px solid #2563eb; padding: 12px 20px; margin: 16px 0; background: #f8fafc; border-radius: 0 8px 8px 0; }

/* Back link */
.back-link { display: inline-flex; align-items: center; gap: 5px; color: #64748b; font-size: .88rem; margin-bottom: 20px; }
.back-link:hover { color: #2563eb; }

/* Responsive */
@media (max-width: 480px) {
  .site-title { font-size: 1.2rem; }
  .header-nav { gap: 15px; }
  .article-body { padding: 16px; }
  .article-single { padding: 20px; }
  .article-single h1 { font-size: 1.3rem; }
}