/* ================================
   Default Theme — Main Stylesheet
================================ */
:root {
    --primary: #2563eb;
    --text: #1f2937;
    --muted: #6b7280;
    --bg: #f9fafb;
    --white: #ffffff;
    --border: #e5e7eb;
    --radius: 12px;
    --shadow: 0 1px 4px rgba(0,0,0,0.06);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: system-ui, -apple-system, sans-serif; color: var(--text); background: var(--bg); line-height: 1.6; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

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

/* Header */
.site-header { background: var(--white); border-bottom: 1px solid var(--border); padding: 16px 0; }
.site-header .container { display: flex; justify-content: space-between; align-items: center; }
.site-title { font-size: 22px; font-weight: 700; color: var(--primary); }
.site-description { font-size: 12px; color: var(--muted); }
.main-nav { display: flex; align-items: center; gap: 16px; }
.search-form { display: flex; }
.search-form input { border: 1px solid var(--border); border-radius: 8px 0 0 8px; padding: 6px 12px; font-size: 13px; outline: none; }
.search-form button { background: var(--primary); color: #fff; border: none; padding: 6px 10px; border-radius: 0 8px 8px 0; cursor: pointer; }

/* Posts Grid */
.posts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; padding: 40px 0; }
.post-card { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s; }
.post-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.1); }
.post-thumbnail img { width: 100%; height: 200px; object-fit: cover; }
.post-body { padding: 20px; }
.post-title a { font-size: 18px; font-weight: 600; color: var(--text); }
.post-title a:hover { color: var(--primary); text-decoration: none; }
.post-meta { font-size: 12px; color: var(--muted); margin: 8px 0; }
.post-excerpt { font-size: 14px; color: var(--muted); margin-top: 8px; }
.btn-read-more { display: inline-block; margin-top: 14px; color: var(--primary); font-size: 14px; font-weight: 500; }

/* Single Post */
.single-post { max-width: 780px; margin: 40px auto; background: var(--white); border-radius: var(--radius); padding: 40px; box-shadow: var(--shadow); }
.entry-title { font-size: 30px; font-weight: 700; line-height: 1.3; margin-bottom: 12px; }
.entry-meta { font-size: 13px; color: var(--muted); margin-bottom: 24px; }
.entry-content { font-size: 16px; line-height: 1.8; }
.entry-content p { margin-bottom: 16px; }
.entry-content h2,h3 { margin: 24px 0 12px; }
.featured-image { margin: 20px 0; border-radius: 8px; overflow: hidden; }
.entry-tags { margin-top: 24px; }
.tag { background: #eff6ff; color: var(--primary); padding: 4px 10px; border-radius: 20px; font-size: 12px; margin-right: 6px; }

/* Comments */
.comments-section { max-width: 780px; margin: 32px auto 60px; }
.comments-section h3 { font-size: 20px; margin-bottom: 20px; }
.comment { background: var(--white); border-radius: 8px; padding: 16px; margin-bottom: 12px; box-shadow: var(--shadow); }
.comment-author strong { font-size: 14px; }
.comment-author span { font-size: 12px; color: var(--muted); margin-left: 8px; }
.comment p { font-size: 14px; margin-top: 6px; }
.comment-form { margin-top: 32px; }
.comment-form h4 { font-size: 18px; margin-bottom: 16px; }
.comment-form input, .comment-form textarea { display: block; width: 100%; border: 1px solid var(--border); border-radius: 8px; padding: 10px 14px; font-size: 14px; margin-bottom: 10px; font-family: inherit; }
.comment-form textarea { resize: vertical; }
.comment-form button { background: var(--primary); color: #fff; border: none; border-radius: 8px; padding: 10px 24px; font-size: 14px; cursor: pointer; }
.comment-form button:hover { opacity: .9; }

/* Archive */
.archive-header { padding: 32px 0 16px; border-bottom: 1px solid var(--border); margin-bottom: 24px; }
.archive-header h1 { font-size: 26px; }
.posts-list { padding: 20px 0; }
.post-row { background: var(--white); border-radius: 8px; padding: 20px; margin-bottom: 16px; box-shadow: var(--shadow); }
.post-row h2 { font-size: 18px; }
.post-row .meta { font-size: 12px; color: var(--muted); margin: 6px 0; }
.post-row p { font-size: 14px; color: var(--muted); }

/* Pagination */
.pagination { display: flex; gap: 6px; justify-content: center; padding: 32px 0; }
.pagination a { padding: 8px 14px; border: 1px solid var(--border); border-radius: 8px; color: var(--text); font-size: 14px; }
.pagination a.active, .pagination a:hover { background: var(--primary); color: #fff; border-color: var(--primary); text-decoration: none; }

/* 404 */
.error-404 { text-align: center; padding: 80px 20px; }
.error-404 h1 { font-size: 100px; font-weight: 900; color: var(--primary); opacity: .15; line-height: 1; }
.error-404 h2 { font-size: 28px; margin: 16px 0 8px; }
.error-404 p { color: var(--muted); margin-bottom: 24px; }

/* Footer */
.site-footer { background: var(--white); border-top: 1px solid var(--border); padding: 24px 0; text-align: center; color: var(--muted); font-size: 13px; margin-top: 40px; }

/* No posts */
.no-posts { padding: 40px; text-align: center; color: var(--muted); }
