:root {
    --bg: #f5f6f8;
    --surface: #ffffff;
    --surface-alt: #eef0f4;
    --text: #1f2933;
    --text-muted: #52606d;
    --accent: #4c51bf;
    --hero-from: #4c51bf;
    --hero-to: #6b46c1;
    --on-hero: #ffffff;
    --router: #3182ce;
    --controller: #4c51bf;
    --model: #2f855a;
    --view: #c05621;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #12141a;
        --surface: #1b1e26;
        --surface-alt: #252a35;
        --text: #e4e7eb;
        --text-muted: #9aa5b1;
        --accent: #a3a8f0;
        --hero-from: #2d3176;
        --hero-to: #44287a;
    }
}

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

body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
}

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

code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.9em;
    background: var(--surface-alt);
    padding: 2px 6px;
    border-radius: 4px;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 16px;
}

.site-nav {
    background: var(--surface);
    border-bottom: 1px solid var(--surface-alt);
}

.site-nav .container {
    display: flex;
    gap: 24px;
    padding-top: 14px;
    padding-bottom: 14px;
}

.site-nav a {
    font-weight: 600;
    text-decoration: none;
}

.hero {
    background: linear-gradient(135deg, var(--hero-from), var(--hero-to));
    color: var(--on-hero);
    padding: 72px 0;
    text-align: center;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 0.75rem;
}

.hero-subtitle {
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
}

.hero-description {
    max-width: 680px;
    margin: 0 auto;
    opacity: 0.9;
}

.architecture-section,
.posts-section,
.page {
    padding: 56px 0;
}

.architecture-section {
    background: var(--surface);
}

.section-title {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 2rem;
}

.section-note {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.mvc-diagram {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
}

.mvc-box {
    background: var(--bg);
    border: 3px solid var(--accent);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
}

.mvc-box.router {
    border-color: var(--router);
}

.mvc-box.controller {
    border-color: var(--controller);
}

.mvc-box.model {
    border-color: var(--model);
}

.mvc-box.view {
    border-color: var(--view);
}

.mvc-box h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.mvc-box p {
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.post-card {
    background: var(--surface);
    border-left: 4px solid var(--accent);
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 20px;
}

.post-card h3 {
    margin-bottom: 0.5rem;
}

.page h1 {
    margin-bottom: 1rem;
}

.page p {
    max-width: 720px;
    margin-bottom: 1rem;
}

.site-footer {
    background: var(--surface);
    border-top: 1px solid var(--surface-alt);
    padding: 32px 0;
    text-align: center;
    color: var(--text-muted);
}

@media (max-width: 640px) {
    .hero-title {
        font-size: 2.5rem;
    }
}
