@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display&family=Inter:wght@400;500;600&display=swap');

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

:root {
    --text: #2b2b2b;
    --text-muted: #6b6b6b;
    --bg: #fdf8f4;
    --bg-card: #ffffff;
    --accent: #e07a5f;
    --accent-light: #f4d1c1;
    --accent-dark: #c45a3c;
    --green: #81b29a;
    --green-light: #d4e9df;
    --tag-text: #4a7c67;
    --border: #ebe3db;
    --max-width: 680px;
    --serif: 'DM Serif Display', Georgia, serif;
    --sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

[data-theme="dark"] {
    --text: #e8e2dc;
    --text-muted: #9a9490;
    --bg: #1a1816;
    --bg-card: #242120;
    --accent: #e8916f;
    --accent-light: #5a3a2e;
    --accent-dark: #f0a68a;
    --green: #81b29a;
    --green-light: #2a3d33;
    --tag-text: #a0d4bb;
    --border: #352f2b;
}

body {
    font-family: var(--sans);
    color: var(--text);
    background: var(--bg);
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background 0.3s, color 0.3s;
}

/* Theme Toggle */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background: rgba(0,0,0,0.04);
    border: 1px solid var(--border);
    border-radius: 50%;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1;
    transition: all 0.2s;
    flex-shrink: 0;
    margin-left: 0.5rem;
}

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

[data-theme="dark"] .theme-toggle {
    background: rgba(255,255,255,0.06);
}

a {
    color: var(--accent-dark);
    text-decoration: none;
    transition: color 0.2s;
}

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

/* Header */
header {
    padding: 1.5rem 2rem;
    background: var(--bg);
}

nav {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-title {
    font-family: var(--serif);
    font-size: 1.4rem;
    color: var(--text);
    letter-spacing: -0.01em;
}

.site-title span {
    color: var(--accent);
}

.site-title:hover {
    color: var(--accent);
}

.nav-links {
    display: flex;
    gap: 1.8rem;
}

.nav-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    border-radius: 1px;
    transition: width 0.25s ease;
}

.nav-links a:hover {
    color: var(--text);
    text-decoration: none;
}

.nav-links a:hover::after {
    width: 100%;
}

/* Hero / Intro */
.hero {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 4rem 2rem 3rem;
    width: 100%;
}

.hero h1 {
    font-family: var(--serif);
    font-size: 2.8rem;
    font-weight: 400;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text);
}

.hero h1 span {
    color: var(--accent);
}

.hero p {
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1.8;
    max-width: 520px;
}

/* Divider */
.divider {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
}

.divider hr {
    border: none;
    height: 1px;
    background: var(--border);
}

/* Posts Section */
.posts-section {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2.5rem 2rem;
    flex: 1;
    width: 100%;
}

.section-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    margin-bottom: 2rem;
}

.posts {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.post-preview {
    padding: 1.8rem 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    gap: 1.5rem;
    align-items: baseline;
}

.post-preview:first-child {
    padding-top: 0;
}

.post-preview:last-child {
    border-bottom: none;
}

.post-date {
    font-size: 0.82rem;
    color: var(--text-muted);
    white-space: nowrap;
    min-width: 100px;
    font-variant-numeric: tabular-nums;
}

.post-content h2 {
    font-family: var(--serif);
    font-size: 1.35rem;
    font-weight: 400;
    margin-bottom: 0.35rem;
    line-height: 1.3;
}

.post-content h2 a {
    color: var(--text);
}

.post-content h2 a:hover {
    color: var(--accent);
}

.post-content p {
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.6;
}

.post-tag {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.2rem 0.6rem;
    border-radius: 99px;
    background: var(--green-light);
    color: var(--tag-text);
    margin-top: 0.5rem;
}

/* Footer */
footer {
    padding: 2.5rem 2rem;
    text-align: center;
    background: var(--bg);
}

footer p {
    max-width: var(--max-width);
    margin: 0 auto;
    color: var(--text-muted);
    font-size: 0.82rem;
}

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

footer a {
    color: var(--text-muted);
    text-decoration: underline;
    text-underline-offset: 2px;
}

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

/* About Page */
.about-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 4rem 2rem;
    flex: 1;
    width: 100%;
}

.about-content h1 {
    font-family: var(--serif);
    font-size: 2.4rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
    color: var(--text);
}

.about-content p {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.85;
    margin-bottom: 1.2rem;
}

/* Responsive */
@media (max-width: 600px) {
    .hero h1 {
        font-size: 2rem;
    }

    .post-preview {
        flex-direction: column;
        gap: 0.3rem;
    }

    .post-date {
        min-width: auto;
    }

    header {
        padding: 1.2rem 1.2rem;
    }

    .hero,
    .posts-section,
    .divider,
    .about-content {
        padding-left: 1.2rem;
        padding-right: 1.2rem;
    }
}
