*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', sans-serif; color: #1a1a2e; background: #fafafa; line-height: 1.7; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.container-narrow { max-width: 800px; margin: 0 auto; padding: 0 1.5rem; }

/* Header */
.site-header { background: #fff; border-bottom: 1px solid #e5e7eb; padding: 1rem 0; position: sticky; top: 0; z-index: 50; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; }
.site-logo { font-size: 1.5rem; font-weight: 700; color: #1a1a2e; }
.site-nav { display: flex; gap: 1.5rem; align-items: center; }
.site-nav a { font-size: 0.95rem; color: #6b7280; transition: color 0.2s; }
.site-nav a:hover { color: #1a1a2e; }

/* Hero */
.hero { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: #fff; padding: 4rem 0; text-align: center; }
.hero h1 { font-size: 2.5rem; font-weight: 700; margin-bottom: 0.5rem; }
.hero p { font-size: 1.2rem; opacity: 0.9; }

/* Post Grid */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); gap: 2rem; padding: 3rem 0; }

/* Post Card */
.post-card { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.08); transition: transform 0.2s, box-shadow 0.2s; }
.post-card:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(0,0,0,0.1); }
.post-card-image { aspect-ratio: 16/9; background: #e5e7eb; overflow: hidden; }
.post-card-image img { width: 100%; height: 100%; object-fit: cover; }
.post-card-body { padding: 1.5rem; }
.post-card-meta { display: flex; gap: 0.75rem; align-items: center; font-size: 0.85rem; color: #6b7280; margin-bottom: 0.75rem; }
.post-card-category { background: #ede9fe; color: #7c3aed; padding: 0.15rem 0.6rem; border-radius: 999px; font-size: 0.8rem; font-weight: 500; }
.post-card h2 { font-size: 1.25rem; font-weight: 600; margin-bottom: 0.5rem; line-height: 1.4; }
.post-card h2 a:hover { color: #7c3aed; }
.post-card p { color: #6b7280; font-size: 0.95rem; }

/* Single Post */
.post-header { padding: 3rem 0 1.5rem; }
.post-header h1 { font-size: 2.5rem; font-weight: 700; line-height: 1.3; margin-bottom: 1rem; }
.post-meta { display: flex; gap: 1rem; align-items: center; color: #6b7280; font-size: 0.95rem; flex-wrap: wrap; }
.post-featured-image { border-radius: 12px; overflow: hidden; margin-bottom: 2rem; }
.post-content { font-size: 1.1rem; line-height: 1.8; padding-bottom: 3rem; }
.post-content h2 { font-size: 1.75rem; font-weight: 600; margin: 2rem 0 1rem; }
.post-content h3 { font-size: 1.4rem; font-weight: 600; margin: 1.5rem 0 0.75rem; }
.post-content p { margin-bottom: 1.25rem; }
.post-content ul, .post-content ol { margin-bottom: 1.25rem; padding-left: 1.5rem; }
.post-content blockquote { border-left: 4px solid #7c3aed; padding-left: 1.5rem; margin: 1.5rem 0; color: #4b5563; font-style: italic; }
.post-content img { border-radius: 8px; margin: 1.5rem 0; }
.post-content pre { background: #1a1a2e; color: #e5e7eb; padding: 1.5rem; border-radius: 8px; overflow-x: auto; margin: 1.5rem 0; }
.post-content code { font-size: 0.9em; }
.post-content a { color: #7c3aed; text-decoration: underline; }

/* Tags */
.tag-list { display: flex; gap: 0.5rem; flex-wrap: wrap; margin: 1rem 0; }
.tag { background: #f3f4f6; color: #4b5563; padding: 0.25rem 0.75rem; border-radius: 999px; font-size: 0.85rem; transition: background 0.2s; }
.tag:hover { background: #e5e7eb; }

/* Comments */
.comments-section { border-top: 1px solid #e5e7eb; padding: 2rem 0; }
.comments-section h3 { font-size: 1.5rem; font-weight: 600; margin-bottom: 1.5rem; }
.comment { background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; padding: 1.25rem; margin-bottom: 1rem; }
.comment-header { display: flex; justify-content: space-between; margin-bottom: 0.5rem; }
.comment-author { font-weight: 600; }
.comment-date { color: #6b7280; font-size: 0.85rem; }
.comment-body { color: #4b5563; }

/* Comment Form */
.comment-form { background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; padding: 1.5rem; margin-top: 1.5rem; }
.comment-form h4 { font-size: 1.25rem; font-weight: 600; margin-bottom: 1rem; }
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-weight: 500; margin-bottom: 0.35rem; font-size: 0.95rem; }
.form-group input, .form-group textarea { width: 100%; padding: 0.6rem 0.75rem; border: 1px solid #d1d5db; border-radius: 6px; font-size: 0.95rem; font-family: inherit; transition: border-color 0.2s; }
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: #7c3aed; box-shadow: 0 0 0 3px rgba(124,58,237,0.1); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.btn { display: inline-block; padding: 0.6rem 1.5rem; background: #7c3aed; color: #fff; border: none; border-radius: 6px; font-size: 0.95rem; font-weight: 500; cursor: pointer; transition: background 0.2s; }
.btn:hover { background: #6d28d9; }
.error { color: #dc2626; font-size: 0.85rem; margin-top: 0.25rem; }
.success-msg { background: #d1fae5; color: #065f46; padding: 0.75rem 1rem; border-radius: 6px; margin-bottom: 1rem; }

/* Sidebar */
.content-with-sidebar { display: grid; grid-template-columns: 1fr 320px; gap: 3rem; padding: 3rem 0; }
.sidebar-widget { background: #fff; border-radius: 12px; padding: 1.5rem; box-shadow: 0 1px 3px rgba(0,0,0,0.08); margin-bottom: 1.5rem; }
.sidebar-widget h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 1rem; padding-bottom: 0.5rem; border-bottom: 2px solid #ede9fe; }
.sidebar-widget ul { list-style: none; }
.sidebar-widget li { padding: 0.4rem 0; }
.sidebar-widget li a { color: #4b5563; transition: color 0.2s; }
.sidebar-widget li a:hover { color: #7c3aed; }

/* Pagination */
.pagination { display: flex; justify-content: center; gap: 0.5rem; padding: 2rem 0; }
.pagination a, .pagination span { padding: 0.5rem 0.9rem; border-radius: 6px; font-size: 0.9rem; }
.pagination a { background: #fff; border: 1px solid #d1d5db; color: #4b5563; transition: all 0.2s; }
.pagination a:hover { background: #7c3aed; color: #fff; border-color: #7c3aed; }
.pagination .active { background: #7c3aed; color: #fff; border: 1px solid #7c3aed; }

/* Category / Tag Header */
.archive-header { background: #f9fafb; padding: 2.5rem 0; border-bottom: 1px solid #e5e7eb; }
.archive-header h1 { font-size: 2rem; font-weight: 700; }
.archive-header p { color: #6b7280; margin-top: 0.5rem; }

/* Footer */
.site-footer { background: #1a1a2e; color: #9ca3af; padding: 2.5rem 0; margin-top: 3rem; text-align: center; }
.site-footer a { color: #c4b5fd; }

/* Responsive */
@media (max-width: 768px) {
    .post-grid { grid-template-columns: 1fr; }
    .content-with-sidebar { grid-template-columns: 1fr; }
    .hero h1 { font-size: 1.75rem; }
    .post-header h1 { font-size: 1.75rem; }
    .form-row { grid-template-columns: 1fr; }
    .site-nav { gap: 1rem; }
}
