/* style.css - Blog Nexus */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&family=Lora:ital,wght@0,400;0,700;1,400&display=swap');

:root {
    --bg-color: #fdfdfd;
    --text-main: #111827;
    --text-muted: #6b7280;
    --accent: #2563eb;
    --line-color: #e5e7eb;
    --font-ui: 'Inter', sans-serif;
    --font-content: 'Lora', serif;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-ui);
    line-height: 1.6;
    padding: 2rem 1rem;
    min-height: 100vh;
}

.container {
    max-width: 800px;
    margin: 0 auto;
}

/* Header */
header {
    margin-bottom: 4rem;
    text-align: center;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

header p {
    color: var(--text-muted);
    font-size: 1.1rem;
    font-style: italic;
}

/* Article List */
.article-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.article-card {
    padding: 1.5rem;
    border-bottom: 1px solid var(--line-color);
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.article-card:hover {
    opacity: 0.8;
}

.article-card h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

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

.article-card .excerpt {
    color: #4b5563;
}

/* Article Detail */
.article-detail {
    animation: fadeIn 0.4s ease-out;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    margin-bottom: 2rem;
    cursor: pointer;
}

.back-btn:hover {
    color: var(--accent);
}

.article-header {
    margin-bottom: 3rem;
}

.article-header h1 {
    font-size: 3rem;
    line-height: 1.2;
    margin-bottom: 1rem;
    font-family: var(--font-content);
}

.article-content {
    font-family: var(--font-content);
    font-size: 1.25rem;
    line-height: 1.8;
    color: #1f2937;
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content h2, .article-content h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-family: var(--font-ui);
}

.article-content blockquote {
    border-left: 4px solid var(--accent);
    padding-left: 1.5rem;
    font-style: italic;
    color: var(--text-muted);
    margin: 2rem 0;
}

.article-content ul, .article-content ol {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Markdown Specific Fixes */
pre {
    background: #f3f4f6;
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

@media (max-width: 640px) {
    header h1 { font-size: 2rem; }
    .article-header h1 { font-size: 2.25rem; }
    .article-content { font-size: 1.125rem; }
}
