:root {
    --bg: #faf9f6;
    --text: #2d2d2d;
    --text-light: #5a5a5a;
    --accent: #b34700;
    --accent-hover: #8a3600;
    --border: #e0dcd6;
    --code-bg: #f0ede8;
    --max-width: 640px;
}

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

html {
    font-size: 18px;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
        Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.7;
    color: var(--text);
    background-color: var(--bg);
    padding: 0 1.5rem;
}

body::before {
    content: "";
    display: block;
    height: 3px;
    background: var(--accent);
    margin: 0 -1.5rem;
}

.site-wrapper {
    max-width: var(--max-width);
    margin: 0 auto;
}

/* --- Header --- */

header {
    padding: 2.5rem 0 1.5rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 2.5rem;
}

.site-title {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.site-title a {
    color: var(--text);
    text-decoration: none;
}

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

nav {
    margin-top: 0.5rem;
}

nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

nav a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.9rem;
}

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

/* --- Typography --- */

main {
    padding-bottom: 3rem;
}

h1 {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
}

h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

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

blockquote {
    border-left: 3px solid var(--border);
    padding-left: 1rem;
    margin: 1.5rem 0;
    color: var(--text-light);
    font-style: italic;
}

hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 2.5rem 0;
}

ul,
ol {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

li {
    margin-bottom: 0.3rem;
}

code {
    background: var(--code-bg);
    padding: 0.15em 0.35em;
    border-radius: 3px;
    font-size: 0.85em;
}

pre {
    background: var(--code-bg);
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
    margin: 1.5rem 0;
}

pre code {
    background: none;
    padding: 0;
}

/* --- Project cards --- */

.projects {
    margin-top: 1.5rem;
}

.project {
    margin-bottom: 1.25rem;
    padding: 1.25rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: #fff;
    transition: border-color 0.2s ease;
}

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

.project h3 {
    margin: 0 0 0.35rem;
}

.project h3 a {
    color: var(--text);
    text-decoration: none;
    font-weight: 700;
}

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

.project p {
    color: var(--text-light);
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* --- Closing section --- */

.closing {
    margin-top: 2.5rem;
    font-size: 0.95rem;
    color: var(--text-light);
}

.closing p {
    margin-bottom: 0.75rem;
}

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

/* --- Footer --- */

footer {
    border-top: 1px solid var(--border);
    padding: 1.5rem 0 2.5rem;
    color: var(--text-light);
    font-size: 0.85rem;
}

footer a {
    color: var(--text-light);
}

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

.footer-links {
    display: flex;
    gap: 1.5rem;
    margin-top: 0.3rem;
}

/* --- 404 --- */

.four-oh-four {
    text-align: center;
    padding: 3rem 0;
}

.four-oh-four h1 {
    font-size: 4rem;
    margin-bottom: 0.5rem;
}

/* --- Responsive --- */

@media (max-width: 480px) {
    html {
        font-size: 16px;
    }

    body::before {
        margin: 0 -1.5rem;
    }

    header {
        padding: 1.5rem 0 1rem;
        margin-bottom: 2rem;
    }

    nav ul {
        gap: 1rem;
    }

    .project {
        padding: 1rem;
    }
}
