/* Premium Tech Blog Styling */
:root {
    --bg-main: #f8fafc;
    --text-main: #0f172a;
    --text-muted: #475569;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --surface: #ffffff;
    --border: #e2e8f0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Header & Nav */
.site-header {
    background-color: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    text-decoration: none;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

.logo span {
    color: var(--primary);
}

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    margin-left: 20px;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--primary);
}

/* Main Content Area */
.main-container {
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 20px;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 10px;
    letter-spacing: -1px;
}

.page-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 40px;
}

/* Post Grid (Homepage) */
.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.post-card {
    background: var(--surface);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    border: 1px solid var(--border);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.post-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: #e2e8f0;
}

.post-content {
    padding: 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.post-date {
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.post-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.3;
}

.post-title a {
    color: var(--text-main);
    text-decoration: none;
}

.post-title a:hover {
    color: var(--primary);
}

.post-excerpt {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 20px;
    flex-grow: 1;
}

.read-more {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
}

.read-more:hover {
    text-decoration: underline;
}

/* Single Post Article */
.article-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
}

.article-header {
    text-align: center;
    margin-bottom: 40px;
}

.article-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -1px;
    margin-bottom: 16px;
}

.article-meta {
    color: var(--text-muted);
    font-size: 1rem;
}

.article-hero-image {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    border-radius: 16px;
    margin-bottom: 40px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.article-body {
    font-size: 1.15rem;
    line-height: 1.8;
    color: #334155;
}

.article-body h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-top: 40px;
    margin-bottom: 16px;
    color: var(--text-main);
}

.article-body h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 30px;
    margin-bottom: 12px;
}

.article-body p {
    margin-bottom: 24px;
}

.article-body a {
    color: var(--primary);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s;
}

.article-body a:hover {
    border-color: var(--primary);
}

.article-body ul, .article-body ol {
    margin-bottom: 24px;
    padding-left: 24px;
}

.article-body li {
    margin-bottom: 8px;
}

.article-body strong {
    color: var(--text-main);
}

/* Footer */
.site-footer {
    background-color: var(--surface);
    border-top: 1px solid var(--border);
    padding: 40px 20px;
    text-align: center;
    color: var(--text-muted);
    margin-top: 60px;
}

@media (max-width: 768px) {
    .article-title {
        font-size: 2.2rem;
    }
    .page-title {
        font-size: 2rem;
    }
}
