/* Shared by index.html and 404.html. */

@font-face {
    font-family: "Instrument Sans";
    font-weight: 400 700;
    font-display: swap;
    src: url("/fonts/instrument-sans.woff2") format("woff2");
}

:root {
    color-scheme: light dark;
    --ink: #171717;
    --muted: #737373;
    --underline: #d4d4d4;
    --bg: #fafafa;
    --text-title: 1.875rem;
    --text-body: 1rem;
    --text-small: 0.875rem;
}

@media (prefers-color-scheme: dark) {
    :root {
        --ink: #fafafa;
        --muted: #a3a3a3;
        --underline: #404040;
        --bg: #171717;
    }
}

* {
    box-sizing: border-box;
}

/* Everything is sized in rem: 16px up to ~1024px wide, growing to 20px at ~1920px. */
html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    font-size: clamp(1rem, 0.714rem + 0.446vw, 1.25rem);
}

body {
    min-height: 100vh;
    min-height: 100svh;
    max-width: 28rem;
    margin: 0 auto;
    padding: 3rem 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    font: var(--text-body)/1.5 "Instrument Sans", system-ui, sans-serif;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

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

a:focus-visible {
    outline: 2px solid var(--ink);
    outline-offset: 2px;
}

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

.muted a {
    color: var(--ink);
}

h1 {
    margin: 0;
    font-size: var(--text-title);
    font-weight: 600;
    letter-spacing: -0.025em;
    line-height: 1.2;
}

header p {
    margin: 0.25rem 0 0;
}

/* 44px touch targets; negative margins cancel their invisible padding so the icons line up. */
nav {
    display: flex;
    margin: 0.25rem 0 -0.75rem -0.75rem;
}

nav a {
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    color: var(--muted);
}


nav svg {
    width: 1.25rem;
    height: 1.25rem;
}

section {
    display: grid;
    grid-template-columns: 7rem minmax(0, 1fr);
    align-items: baseline;
    column-gap: 1.5rem;
    margin-top: 2rem;
}

main > section:first-child {
    margin-top: 3rem;
}

h2 {
    margin: 0;
    font: inherit;
    color: var(--muted);
}

li + li {
    margin-top: 0.5rem;
}

li > a,
p > a {
    text-decoration: underline;
    text-decoration-color: var(--underline);
    text-underline-offset: 0.25rem;
}

@media (hover: hover) {
    nav a:hover {
        color: var(--ink);
    }

    li > a:hover,
    p > a:hover {
        text-decoration-color: currentColor;
    }
}

/* A fixed name column keeps the dates aligned; widen it if a longer name is added. */
.rows li {
    display: grid;
    grid-template-columns: 5rem auto;
    column-gap: 1rem;
    align-items: baseline;
    white-space: nowrap;
}

.when {
    font-size: var(--text-small);
    color: var(--muted);
}

@media (max-width: 28rem) {
    section {
        grid-template-columns: minmax(0, 1fr);
        row-gap: 0.5rem;
    }
}
