:root {
  --bg: #FBFCFD;
  --ink: #16233A;
  --muted: #5F6B7E;
  --rule: #E1E5EB;
  --link: #2453B8;
  --code-bg: #F0F3F7;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131A26;
    --ink: #E6EAF0;
    --muted: #97A2B4;
    --rule: #2A3446;
    --link: #8DB0F2;
    --code-bg: #1C2534;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0 auto;
  max-width: 40rem;
  padding: 0 1.25rem;
  background: var(--bg);
  color: var(--ink);
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.1875rem;
  line-height: 1.65;
  font-optical-sizing: auto;
}

a { color: var(--link); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; }

/* header and footer */
header.site, footer.site {
  display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; align-items: baseline;
  padding: 2rem 0;
}
header.site .name { font-weight: 600; color: var(--ink); text-decoration: none; margin-right: auto; }
header.site nav { display: flex; gap: 1.25rem; }
header.site nav a, footer.site a { color: var(--muted); text-decoration: none; }
header.site nav a:hover, footer.site a:hover,
header.site nav a[aria-current] { color: var(--ink); }
footer.site { margin-top: 5rem; border-top: 1px solid var(--rule); font-size: 1rem; }

/* type */
h1 { font-size: 2.25rem; line-height: 1.15; font-weight: 600; letter-spacing: -.015em; margin: 2.5rem 0 .5rem; }
h2 { font-size: 1.3rem; line-height: 1.3; font-weight: 600; margin: 3rem 0 .75rem; }
h3 { font-size: 1.1rem; font-weight: 600; margin: 2rem 0 .5rem; }
.meta, time, .list span { color: var(--muted); font-size: 1rem; }
.meta { margin-top: 0; }

/* home */
.intro h1 { margin-top: 3.5rem; }
.trace { display: block; width: 100%; height: 3rem; margin: 1rem 0 1.25rem; }
.trace path { fill: none; stroke: var(--link); stroke-width: 1.5; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.intro p { font-size: 1.3rem; line-height: 1.5; margin: 0; }

/* lists */
.list, .projects { list-style: none; padding: 0; margin: 0; }
.list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 1rem; padding: .45rem 0; border-bottom: 1px solid var(--rule); }
.list li span { flex-basis: 100%; }
.list a, .projects a { text-decoration: none; }
.list a:hover, .projects a:hover { text-decoration: underline; }
.more { margin-top: .75rem; font-size: 1rem; }
.year { color: var(--muted); font-size: 1rem; font-weight: 400; margin-top: 2rem; }
.projects li { padding: 1.25rem 0; border-bottom: 1px solid var(--rule); }
.projects li p { margin: .25rem 0 0; }

/* articles */
.prose p, .prose ul, .prose ol, .prose blockquote, .prose pre { margin: 0 0 1.2em; }
.prose img { max-width: 100%; height: auto; }
.prose blockquote { margin-left: 0; padding-left: 1.1rem; border-left: 2px solid var(--rule); color: var(--muted); font-style: italic; }
.prose code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .85em; background: var(--code-bg); padding: .1em .3em; border-radius: 3px; }
.prose pre { background: var(--code-bg); padding: 1rem; overflow-x: auto; border-radius: 4px; line-height: 1.45; }
.prose pre code { background: none; padding: 0; }
.back { margin-top: 3rem; font-size: 1rem; }
