:root {
    --background: #fbfaf7;
    --surface: #ffffff;
    --text: #1d1d1b;
    --muted: #6b6a65;
    --border: #dedbd2;
    --accent: #d64e2b;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--background);
    color: var(--text);
    font-family: Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
}

a {
    color: inherit;
}

header,
main {
    margin: auto;
    max-width: 860px;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

header {
    align-items: center;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    padding-bottom: 1.25rem;
    padding-top: 1.25rem;
}

header h1 {
    font-size: 1.5rem;
    margin: 0;
}

nav {
    display: flex;
    gap: 1rem;
}

nav a {
    text-underline-offset: 0.2em;
}

section {
    padding: 4rem 0;
}

.profile {
    align-items: center;
    display: grid;
    gap: 3.5rem;
    grid-template-columns: minmax(220px, 0.8fr) minmax(280px, 1.2fr);
}

.profile-pic-container {
    text-align: center;
}

.profile-pic-container > p {
    font-size: 0.9rem;
    margin: 0 0 0.8rem;
}

.profile-pic {
    border-radius: 16px;
    display: block;
    margin: 0 auto 1rem;
    max-width: 250px;
    width: 100%;
}

.contact-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.contact-links a {
    border-radius: 4px;
    display: block;
}

.contact-links img {
    display: block;
    height: 28px;
    width: 28px;
}

.bio h2,
.section-heading h2 {
    font-size: clamp(2rem, 5vw, 3rem);
    letter-spacing: -0.04em;
    line-height: 1.05;
    margin: 0 0 1rem;
}

.bio p {
    color: var(--muted);
    font-size: 1.1rem;
    margin: 0;
}

#blog {
    border-top: 1px solid var(--border);
}

.section-heading {
    align-items: end;
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.section-heading h2 {
    margin-bottom: 0;
}

.post-list {
    border-top: 1px solid var(--border);
}

.post-card {
    align-items: baseline;
    border-bottom: 1px solid var(--border);
    display: grid;
    gap: 1.5rem;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 1.75rem 0;
}

.post-card:hover {
    border-color: #aaa69d;
}

.post-date {
    color: var(--muted);
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    white-space: nowrap;
    text-transform: uppercase;
}

.post-card h3 {
    font-size: 1.3rem;
    line-height: 1.25;
    margin: 0;
}

.post-card h3 a {
    text-decoration: none;
}

.post-card h3 a:hover {
    text-decoration: underline;
    text-decoration-color: var(--accent);
    text-underline-offset: 0.15em;
}

.loading-message,
.error-message {
    color: var(--muted);
}

@media (max-width: 660px) {
    header {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.75rem;
    }

    .profile {
        gap: 2rem;
        grid-template-columns: 1fr;
    }

    .bio {
        text-align: center;
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 1rem;
    }

    .post-card {
        gap: 0.5rem;
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}
