:root {
    --text: #222;
    --muted: #777;
    --border: #ececec;
    --background: #ffffff;

    --content-width: 620px;
    --image-width: 900px;
}

* {
    box-sizing: border-box;
}

html {
    font-size: 18px;
}

body {
    margin: 0;
    background: var(--background);
    color: var(--text);

    font-family: Georgia, "Times New Roman", serif;
    line-height: 1.8;
}

.container {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ---------------- Header ---------------- */

header {
    margin-bottom: 3rem;
}

nav {
    max-width: var(--content-width);
    margin: 0 auto;

    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 1.5rem;

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

nav > a {
    color: inherit;
    text-decoration: none;
    font-weight: 600;
}

.menu {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

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

.menu a:hover {
    text-decoration: underline;
}

/* ---------------- Archive ---------------- */

h1 {
    font-size: 2.2rem;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h2 {
    margin-top: 3rem;
    margin-bottom: 1rem;

    font-family:
        Inter,
        system-ui,
        sans-serif;

    font-size: 1rem;
    color: var(--muted);

    border-top: 1px solid var(--border);
    padding-top: 1rem;
}

.entry {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 1rem;

    padding: .45rem 0;
}

.date {
    color: var(--muted);

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

/* ---------------- Typography ---------------- */

article {
    font-size: 1.05rem;
}

article p {
    margin: 1.4rem 0;
}

article ul,
article ol {
    margin: 1.4rem 0;
    padding-left: 1.4rem;
}

article blockquote {
    margin: 2rem 0;
    padding-left: 1.25rem;

    border-left: 3px solid var(--border);

    color: var(--muted);
}

.meta {
    color: var(--muted);

    font-family:
        Inter,
        system-ui,
        sans-serif;

    font-size: .9rem;
}

/* ---------------- Links ---------------- */

a {
    color: inherit;
}

article a {
    text-decoration-thickness: 1px;
}

article a:hover {
    text-decoration: underline;
}

/* ---------------- Images ---------------- */

article img {
    display: block;

    width: auto;
    max-width: 100%;

    max-height: 75vh;

    height: auto;

    margin: 2.5rem auto;

}

/* Portrait images stay smaller */
article img[width] {
    max-width: min(100%, 500px);
}

/* Figures */

figure {
    margin: 2.5rem auto;
    text-align: center;
}

figure img {
    margin: 0 auto;
}

figcaption {
    margin-top: .75rem;

    color: var(--muted);

    font-size: .9rem;

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

/* ---------------- Code ---------------- */

pre {
    overflow-x: auto;

    padding: 1rem;

    background: #f6f6f6;

    border-radius: 8px;
}

code {
    font-family:
        ui-monospace,
        SFMono-Regular,
        Consolas,
        monospace;
}

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

footer {
    max-width: var(--content-width);

    margin: 5rem auto;

    padding: 0 1.5rem;

    color: var(--muted);

    font-size: .9rem;

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

/* ---------------- Mobile ---------------- */

@media (max-width: 700px) {

    html {
        font-size: 17px;
    }

    nav {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .menu {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .entry {
        grid-template-columns: 70px 1fr;
    }

    article img {
        max-height: 60vh;
    }
}

/* ========================================
   Carousel
======================================== */

.carousel {
    position: relative;
    margin: 2.5rem 0;
}

.carousel .track {
    display: flex;
    gap: 1rem;

    overflow-x: auto;

    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;

    scrollbar-width: none;
}

.carousel .track::-webkit-scrollbar {
    display: none;
}

.carousel .track img {
    flex: 0 0 100%;

    scroll-snap-align: center;

    width: 100%;
    height: auto;

    object-fit: contain;

}

.carousel button {
    position: absolute;

    top: 50%;
    transform: translateY(-50%);

    width: 40px;
    height: 40px;

    border: none;
    border-radius: 999px;

    background: rgba(255,255,255,.85);

    cursor: pointer;

    font-size: 1.25rem;

    transition: opacity .2s;
}

.carousel .prev {
    left: .5rem;
}

.carousel .next {
    right: .5rem;
}

.carousel button:hover {
    opacity: .9;
}

@media (max-width:700px) {

    .carousel button {
        width: 34px;
        height: 34px;
    }

}