/* ---- Colours: light by default, dark if the OS prefers it ---- */
:root {
    --bg: #fdfdfc;
    --text: #1f2328;
    --muted: #5d646d;
    --accent: #1a5fb4;
    --border: #e3e5e8;
    --tag-bg: #eef1f4;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #15171a;
        --text: #e6e8eb;
        --muted: #9aa1a9;
        --accent: #78aeed;
        --border: #2c3036;
        --tag-bg: #23272c;
    }
}

/* ---- Base ---- */
* {
    box-sizing: border-box;
}

body {
    margin: 0 auto;
    max-width: 42rem;
    padding: 0 1.25rem;
    background: var(--bg);
    color: var(--text);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 1.0625rem;
    line-height: 1.65;
}

a {
    color: var(--accent);
    text-underline-offset: 0.15em;
}

h1,
h2 {
    line-height: 1.25;
}

h1 {
    font-size: 2rem;
    margin: 2.5rem 0 0.5rem;
}

h2 {
    font-size: 1.25rem;
    margin: 2.25rem 0 0.5rem;
}

.lead {
    font-size: 1.15rem;
    color: var(--muted);
    margin-top: 0;
}

/* ---- Header & navigation ---- */
.site-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.5rem 1.5rem;
    padding: 1.5rem 0 1rem;
    border-bottom: 1px solid var(--border);
}

.site-name {
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
}

nav {
    display: flex;
    gap: 1.25rem;
}

nav a {
    color: var(--muted);
    text-decoration: none;
}

nav a:hover,
nav a[aria-current="page"] {
    color: var(--text);
}

/* ---- Skill tags ---- */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.tags li {
    background: var(--tag-bg);
    border-radius: 999px;
    padding: 0.15rem 0.75rem;
    font-size: 0.9rem;
}

/* ---- Projects ---- */
.project {
    border-top: 1px solid var(--border);
    padding: 0.25rem 0 0.75rem;
}

.project h2 {
    margin-top: 1.5rem;
    margin-bottom: 0.15rem;
}

.project h2 a {
    color: var(--text);
    text-decoration: none;
}

.project h2 a:hover {
    color: var(--accent);
    text-decoration: underline;
}
h3 {
    font-size: 1.05rem;
    margin: 1.5rem 0 0.4rem;
}
.meta {
    color: var(--muted);
    font-size: 0.9rem;
    margin: 0 0 0.5rem;
}

/* ---- Images ---- */
img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
}

/* ---- Footer ---- */
.site-footer {
    margin-top: 3rem;
    padding: 1rem 0 2rem;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.875rem;
}