:root {
    --bg: #fafafa;
    --fg: #111111;
    --muted: #6b6b6b;
    --line: #e4e4e4;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0e0e0e;
        --fg: #ededed;
        --muted: #8a8a8a;
        --line: #262626;
    }
}

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

html {
    font-family: "Switzer", system-ui, -apple-system, sans-serif;
    font-weight: 500;
    font-size: 15px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--fg);
}

h1, h2, p, ul {
    font-size: 1rem;
    margin: 0;
}

h1, h2 {
    font-weight: 500;
}

main {
    max-width: 560px;
    margin: 0 auto;
    padding: 96px 24px;
}

a {
    color: inherit;
    text-decoration: underline;
    text-decoration-color: transparent;
    text-underline-offset: 3px;
    transition: opacity 0.2s ease, text-decoration-color 0.2s ease;
}

a:hover {
    opacity: 0.55;
    text-decoration-color: currentColor;
}

.bio a,
.essay-body a {
    text-decoration-color: var(--muted);
}

.bio p,
.essays p,
.links .label,
.essays li > span:first-child,
.essay header p,
.essay-body p,
.essay-body li {
    font-family: "Gambetta", Georgia, serif;
    font-weight: 400;
}

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

.links {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    margin-top: 8px;
}

.links a {
    display: inline-grid;
    grid-template-columns: auto 0fr;
    justify-content: start;
    align-items: center;
    color: var(--muted);
    text-decoration: none;
    transition: grid-template-columns 0.3s ease, color 0.2s ease;
}

.links a:hover,
.links a:focus-visible {
    grid-template-columns: auto 1fr;
    color: var(--fg);
    opacity: 1;
}

.links .label {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
}

.links .label span {
    padding-left: 6px;
}

.links svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.links svg.filled {
    width: 14px;
    height: 14px;
    margin: 0 1px;
    fill: currentColor;
    stroke: none;
}

.bio {
    margin-top: 28px;
}

.bio p + p {
    margin-top: 16px;
}

.essays {
    margin-top: 28px;
}

.essays ul {
    list-style: none;
    padding: 0;
    margin-top: 16px;
}

.essays li {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 16px;
    padding: 6px 0;
}

@media (max-width: 480px) {
    main {
        padding: 64px 16px;
    }
}

/* Essays */

.back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: -22px;
    color: var(--muted);
    text-decoration: none;
}

@media (max-width: 480px) {
    .back {
        margin-left: 0;
    }
}

.back svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.essay header {
    margin-top: 40px;
}

.essay-body {
    margin-top: 40px;
}

.essay-body > * + * {
    margin-top: 16px;
}

.essay-body h3 {
    font-size: 1rem;
    font-weight: 500;
    margin-top: 32px;
}

.essay-body ol,
.essay-body ul {
    padding-left: 20px;
}

.essay-body img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 12px;
    border: 1px solid var(--line);
}

.essay-body figure {
    margin: 32px 0 0;
}

.essay-body figure + p,
.essay-body figure + h3 {
    margin-top: 32px;
}

.essay-body figcaption {
    margin-top: 8px;
    color: var(--muted);
}

.essay-body .hero {
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}

.essay-body .pair {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 32px;
}

.essay-body .pair figure {
    margin: 0;
}

.essay-body .pair img {
    aspect-ratio: 1;
    object-fit: contain;
}
