/* Minimal & Professional Stylesheet for Blog */

:root {
    --bg: #ffffff;
    --bg-alt: #f9fafb;
    --border: #e5e7eb;
    
    --text: #111827;
    --text-muted: #4b5563;
    --text-light: #9ca3af;
    
    --accent: #1d4ed8;
    --accent-hover: #1e40af;
    --accent-soft: rgba(29, 78, 216, 0.05);

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: 'Fira Code', monospace;
    
    --radius: 6px;
    --max-width: 820px;
    --transition: all 0.2s ease;
}

body.dark-mode {
    --bg: #0f172a;
    --bg-alt: #1e293b;
    --border: #334155;
    
    --text: #f8fafc;
    --text-muted: #94a3b8;
    --text-light: #64748b;
    
    --accent: #60a5fa;
    --accent-hover: #93c5fd;
    --accent-soft: rgba(96, 165, 250, 0.1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    line-height: 1.7;
    font-size: 1.05rem;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.article-container {
    max-width: 760px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

/* Header */
header {
    border-bottom: 1px solid var(--border);
    background: var(--bg);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
}

.logo {
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.3px;
}

.logo span {
    font-weight: 400;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-left: 0.3rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition);
}

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

.theme-toggle {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.4rem;
    display: flex;
    align-items: center;
    border-radius: var(--radius);
}

.theme-toggle:hover {
    color: var(--accent);
}

.theme-toggle svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.sun-icon { display: none; }
.moon-icon { display: block; }
body.dark-mode .sun-icon { display: block; }
body.dark-mode .moon-icon { display: none; }

/* Main layout */
main {
    padding: 3rem 0;
}

.hero {
    margin-bottom: 3rem;
}

.hero h1 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
}

.hero p {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-bottom: 1.25rem;
}

.social-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.social-btn {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
}

.social-btn:hover {
    text-decoration: underline;
}

.section-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    letter-spacing: -0.3px;
}

/* Posts List */
.posts-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.post-card {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-decoration: none;
    color: var(--text);
    transition: var(--transition);
}

.post-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.post-date-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 0.4rem;
}

.post-tag {
    background: var(--accent-soft);
    color: var(--accent);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.78rem;
    font-weight: 600;
}

.post-card h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    color: var(--text);
}

.post-card p {
    color: var(--text-muted);
    font-size: 0.98rem;
    margin-bottom: 0.75rem;
}

.read-more-link {
    color: var(--accent);
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

/* Article Detail View */
.post-header {
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1.5rem;
}

.back-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.back-link:hover {
    text-decoration: underline;
}

.post-header h1 {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 0.75rem;
    letter-spacing: -0.5px;
}

.post-meta-details {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.article-body {
    line-height: 1.8;
    color: var(--text);
}

.article-body h1, .article-body h2, .article-body h3 {
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.article-body p {
    margin-bottom: 1.25rem;
}

.article-body code {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.9em;
}

.article-body pre {
    background: #0f172a;
    color: #f8fafc;
    padding: 1.25rem;
    border-radius: var(--radius);
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

.article-body pre code {
    background: transparent;
    border: none;
    padding: 0;
    color: inherit;
}

/* Footer */
footer {
    padding: 2.5rem 0;
    color: var(--text-light);
    font-size: 0.9rem;
    border-top: 1px solid var(--border);
}

.footer-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-links {
    display: flex;
    gap: 1.25rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--accent);
}
