:root {
    --bg: #fbfbf8;
    --text: #121212;
    --muted: #6f6f6f;
    --line: rgba(18, 18, 18, 0.08);

    --container: 44rem;

    --font-sans: Inter, system-ui, -apple-system, sans-serif;
}

/* ---------- base ---------- */

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

html {
    -webkit-text-size-adjust: 100%;
    text-rendering: optimizeLegibility;
}

body {
    margin: 0 20%;
    margin-top: 25px;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    font-feature-settings: "cv02","cv03","cv04","cv11";
    line-height: 1.75;

    /* font smoothing */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;

    /* subtle sharpening */
    text-shadow: 0 0 1px rgba(255,255,255,0.6);
}
img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ---------- layout container ---------- */

.container {
    width: min(calc(100% - 2rem), var(--container));
    margin: 0 auto;
}

/* ---------- header ---------- */

.site-header {
    border-bottom: 1px solid var(--line);
    background: rgba(251,251,248,.95);
    top: 0;
    z-index: 10;
}

.site-header-inner {
    composes: container;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 4rem;
}

.site-title {
    font-size: .95rem;
    font-weight: 600;
}

.site-nav {
    display: flex;
    gap: 1.25rem;
}

.site-nav a {
    font-size: .95rem;
    color: var(--muted);
}

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

/* ---------- sections ---------- */

.notes-index,
.note-body,
.projects-index,
.project-page {
    composes: container;
    padding: 3rem 0 5rem;
}

/* ---------- titles ---------- */

.page-title,
.article-title,
.project-title {
    margin: 0 0 .75rem;
    font-size: clamp(1.6rem, 2.6vw, 2.2rem);
    line-height: 1.1;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--muted);
}

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

/* ---------- notes list ---------- */

.note-item {
    padding: 1.4rem 0;
    border-bottom: 1px solid var(--line);
}

.note-title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 600;
}

.note-title a:hover {
    text-decoration: underline;
}

.note-excerpt {
    margin: .4rem 0 0;
    color: var(--muted);
}

/* ---------- projects ---------- */

.project-item {
    padding: 1.4rem 0;
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.project-item-title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 600;
}

.project-item-title a:hover {
    text-decoration: underline;
}

.project-item-description {
    margin-top: .35rem;
    color: var(--muted);
}

.project-year {
    color: var(--muted);
    font-size: .9rem;
}

/* ---------- article typography ---------- */

.prose {
    font-size: 1.12rem;
    line-height: 1.9;
}

.prose h2 {
    margin-top: 2.4rem;
    margin-bottom: .6rem;
    font-size: 1.6rem;
    letter-spacing: -0.03em;
}

.prose h3 {
    margin-top: 2rem;
    margin-bottom: .6rem;
    font-size: 1.3rem;
}

.prose p {
    margin: 1.2rem 0;
}

.prose ul {
    margin: 1.2rem 0;
    padding-left: 1.3rem;
}

.prose li + li {
    margin-top: .4rem;
}

.prose a {
    text-decoration: underline;
}

.prose code {
    font-family: ui-monospace, monospace;
    background: rgba(0,0,0,.06);
    padding: .15rem .35rem;
    border-radius: 4px;
}

.site-footer {
    border-top: 1px solid var(--line);
    margin-top: 4rem;
    padding: 1.25rem 0 2rem;
}

.site-footer-inner {
    width: 100%;
    margin: 0 auto;

    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.site-footer-copy {
    margin: 0;
    font-size: 0.75rem;
    color: var(--muted);
}

.site-footer-nav {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.site-footer-nav a {
    font-size: 0.75rem;
    color: var(--muted);
}

.site-footer-nav a:hover {
    color: var(--text);
}

/* ---------- media ---------- */

.media {
    margin: 2rem 0;
}

.media img {
    width: 100%;
    height: auto;
}

/* ---------- responsive ---------- */

@media (max-width:720px) {

body {
    margin: 0 5%;
    margin-top: 25px;
}
    .site-header-inner {
        flex-direction: column;
        align-items: flex-start;
        height: auto;
        padding: 1rem 0;
        gap: .75rem;
    }

    .project-item {
        flex-direction: column;
    }

    .prose {
        font-size: 1.05rem;
    }

    .site-footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }
}