/* Shared by the site's own pages (about, work, projects, writing). The homepage keeps its own styles. */
* { box-sizing: border-box; margin: 0; }
body {
  background: #fff;
  color: #000;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.5;
}
header, main { width: min(900px, 100%); margin: 0 auto; padding: 24px 16px; }
header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 24px; }
header a { color: inherit; text-underline-offset: 3px; }
.home { font-weight: 600; text-decoration: none; }
nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
nav a[aria-current] { text-decoration: none; font-weight: 600; }
main { padding-top: 48px; }
h1 { font-size: 2rem; font-weight: 600; line-height: 1.2; margin-bottom: 12px; }
p { font-size: 1.1rem; }
/* No one-word last lines where the browser can rebalance the paragraph. */
p, li { text-wrap: pretty; }
.posts { list-style: none; padding: 0; display: grid; gap: 12px; font-size: 1.1rem; }
.posts a { color: inherit; text-underline-offset: 3px; }
.projects { list-style: none; padding: 0; margin-top: 8px; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 36px 24px; }
.projects a { display: flex; flex-direction: column; gap: 4px; color: inherit; text-decoration: none; }
.projects img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; margin-bottom: 8px; border: 1px solid rgba(0, 0, 0, .15); border-radius: 6px; }
.project-title { font-size: 1.1rem; font-weight: 600; line-height: 1.3; text-underline-offset: 3px; }
.projects a:hover .project-title { text-decoration: underline; }
.project-subtitle { color: #555; font-size: .95rem; line-height: 1.45; }

/* Writing pages: an <article class="prose"> of paragraphs, headings, lists and tables. */
.prose { display: flex; flex-direction: column; gap: 18px; }
.prose h1 { margin-bottom: 6px; }
.prose p, .prose li { font-size: 1.1rem; line-height: 1.6; }
.prose h2 { font-size: 1.35rem; font-weight: 600; line-height: 1.3; margin-top: 18px; }
.prose h3 { font-size: 1.1rem; font-weight: 600; font-style: italic; margin-top: 6px; }
.prose a { color: inherit; text-underline-offset: 3px; }
.prose ol, .prose ul { padding-left: 1.4em; display: grid; gap: 12px; }
.prose li p { margin-top: 4px; }
/* A table wider than a phone scrolls sideways on its own; the page doesn't. */
.table-wrap { overflow-x: auto; }
.prose table { width: 100%; border-collapse: collapse; font-size: .95rem; line-height: 1.4; font-variant-numeric: tabular-nums; }
.prose table.wide { min-width: 600px; }
.prose th, .prose td { padding: 8px 12px 8px 0; border-bottom: 1px solid rgba(0, 0, 0, .15); text-align: left; vertical-align: top; }
.prose th { font-weight: 600; }
.prose thead th { border-bottom-color: rgba(0, 0, 0, .4); }
