:root {
    --bg: #fafaf7;
    --fg: #1f2328;
    --muted: #57606a;
    --accent: #2f6feb;
    --accent-fg: #ffffff;
    --surface: #ffffff;
    --border: #d0d7de;
    --radius: 10px;
    --max-content: 42rem;
    --max-prose: 48rem;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
}

html {
    min-height: 100%;
}

body {
    background: var(--bg);
    color: var(--fg);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover,
a:focus-visible {
    text-decoration: underline;
}

/* ------------- Hero landing (homepage) ------------- */

.stage {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem 1.25rem;
    gap: 1.25rem;
    max-width: var(--max-content);
    margin: 0 auto;
}

.logo {
    width: clamp(96px, 20vw, 160px);
    height: auto;
}

.name {
    font-size: clamp(2rem, 6vw, 3rem);
    font-weight: 600;
    letter-spacing: -0.01em;
    margin: 0;
}

.tagline {
    color: var(--muted);
    font-size: clamp(1rem, 2.2vw, 1.125rem);
    margin: 0;
    max-width: 36rem;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    margin-top: 0.5rem;
}

.actions-secondary {
    margin-top: 0.25rem;
    font-size: 0.95rem;
}

.actions-secondary a {
    color: var(--muted);
}

.btn {
    display: inline-block;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius);
    font-weight: 500;
    text-decoration: none;
    border: 1px solid transparent;
    transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}

.btn-primary {
    background: var(--accent);
    color: var(--accent-fg);
}

.btn-primary:hover,
.btn-primary:focus-visible {
    background: #1f58c7;
    text-decoration: none;
}

.btn-secondary {
    background: var(--surface);
    color: var(--fg);
    border-color: var(--border);
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
    border-color: var(--muted);
    text-decoration: none;
}

.btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* ------------- Content pages (developers, education) ------------- */

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
    flex-wrap: wrap;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--fg);
    font-weight: 600;
}

.brand:hover,
.brand:focus-visible {
    text-decoration: none;
}

.brand-logo {
    width: 28px;
    height: 28px;
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.95rem;
}

.site-nav a {
    color: var(--muted);
}

.site-nav a:hover,
.site-nav a:focus-visible {
    color: var(--fg);
    text-decoration: none;
}

.page {
    flex: 1;
    padding: 2rem 1.25rem 3rem;
    max-width: var(--max-prose);
    width: 100%;
    margin: 0 auto;
}

.prose h1 {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    margin: 0 0 0.75rem;
    letter-spacing: -0.01em;
}

.prose h2 {
    font-size: 1.4rem;
    margin: 2rem 0 0.5rem;
    letter-spacing: -0.005em;
}

.prose h3 {
    font-size: 1.1rem;
    margin: 1.5rem 0 0.4rem;
}

.prose p,
.prose ul,
.prose ol {
    margin: 0.5rem 0 1rem;
}

.prose ul,
.prose ol {
    padding-left: 1.4rem;
}

.prose li {
    margin: 0.25rem 0;
}

.prose code {
    background: #f1f3f5;
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.05rem 0.3rem;
    font-size: 0.95em;
}

.prose pre {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.9rem 1rem;
    overflow-x: auto;
    font-size: 0.9rem;
}

.prose pre code {
    background: transparent;
    border: 0;
    padding: 0;
}

.prose table {
    border-collapse: collapse;
    width: 100%;
    margin: 1rem 0 1.5rem;
    font-size: 0.95rem;
}

.prose th,
.prose td {
    text-align: left;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

.prose th {
    background: #f1f3f5;
    font-weight: 600;
}

.mermaid {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    margin: 1rem 0 1.5rem;
    overflow-x: auto;
    text-align: center;
}

/* ------------- Footer ------------- */

.site-footer {
    padding: 1.25rem;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.9rem;
    text-align: center;
}

.site-footer a {
    color: var(--muted);
}

.site-footer a:hover,
.site-footer a:focus-visible {
    color: var(--fg);
    text-decoration: none;
}
