/* === VARIABLES === */
:root {
    --primary: #0066cc;
    --dark: #1a1a1a;
    --light: #f5f5f5;
    --border: #ddd;
    --text: #333;
}

/* === RESET === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: white;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* === NAVBAR === */
.navbar {
    background: white;
    border-bottom: 1px solid var(--border);
    sticky: top 0;
    z-index: 100;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.nav-brand h1 {
    font-size: 1.5rem;
    margin: 0;
}

.nav-brand a {
    color: var(--primary);
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-menu a:hover {
    color: var(--primary);
}

/* === MAIN === */
.main {
    padding: 2rem 0;
}

/* === HERO === */
.hero {
    text-align: center;
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--primary), #0052a3);
    color: white;
    border-radius: 8px;
    margin-bottom: 3rem;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.1rem;
    opacity: 0.95;
}

/* === POSTS === */
.posts {
    display: grid;
    gap: 2rem;
    margin-bottom: 2rem;
}

.post-item {
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.3s;
}

.post-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: var(--primary);
}

.post-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 1rem;
}

.post-item h3 {
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.post-item h3 a {
    color: var(--text);
    text-decoration: none;
}

.post-item h3 a:hover {
    color: var(--primary);
}

.post-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: #999;
    margin-bottom: 1rem;
}

.post-item p {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.7;
}

.read-more {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
}

.read-more:hover {
    transform: translateX(4px);
}

/* === POST DETAIL === */
.post-detail {
    max-width: 800px;
}

.post-header {
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--border);
    padding-bottom: 2rem;
}

.post-header h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.featured-img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.post-body {
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.post-body h2 {
    font-size: 1.5rem;
    margin: 1.5rem 0 0.5rem;
}

.post-body p {
    margin-bottom: 1rem;
}

.post-body img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 1rem 0;
}

.post-body code {
    background: var(--light);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: monospace;
}

.post-body pre {
    background: var(--dark);
    color: white;
    padding: 1rem;
    border-radius: 6px;
    overflow-x: auto;
    margin-bottom: 1rem;
}

.post-body pre code {
    background: none;
    padding: 0;
    color: white;
}

/* === COMMENTS === */
.comments {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border);
}

.comments h3 {
    margin-bottom: 1rem;
}

.comment-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: var(--light);
    padding: 1.5rem;
    border-radius: 8px;
}

.comment-form input,
.comment-form textarea {
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
}

.comment-form button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
}

.comment-form button:hover {
    background: #0052a3;
}

/* === PAGINATION === */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding: 2rem 0;
}

.pagination a {
    background: var(--primary);
    color: white;
    padding: 0.5rem 1rem;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.2s;
}

.pagination a:hover {
    background: #0052a3;
}

.pagination span {
    color: #999;
    font-weight: 600;
}

/* === FOOTER === */
.footer {
    background: var(--light);
    border-top: 1px solid var(--border);
    padding: 2rem;
    text-align: center;
    color: #999;
    margin-top: 4rem;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .nav-menu {
        gap: 1rem;
        font-size: 0.9rem;
    }
    
    .hero h2 {
        font-size: 1.8rem;
    }
    
    .post-header h1 {
        font-size: 1.5rem;
    }
    
    .pagination {
        flex-wrap: wrap;
    }
}