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

:root {
  color-scheme: light;
  --bg: #ffffff;
  --ink: #1a1a1a;
  --soft: #6b6b6b;
  --rule: #d8d8d8;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #121212;
  --ink: #e9e9e7;
  --soft: #9b9b9b;
  --rule: #35353a;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  font-size: 15.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.page { max-width: 580px; margin: 0 auto; padding: 34px 24px 64px; }

a { color: var(--ink); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 2px; }

/* header, identical on every page */
.top { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 30px; }
.name { font-size: 16px; font-weight: 500; text-decoration: none; }
.top nav { display: flex; align-items: center; gap: 22px; }
.top nav a { font-size: 15px; color: var(--soft); text-decoration: none; }
.top nav a:hover, .top nav a[aria-current="page"] { color: var(--ink); }

.theme { background: none; border: 0; padding: 2px; cursor: pointer; color: var(--soft); display: inline-flex; line-height: 0; }
.theme:hover { color: var(--ink); }
.theme svg { width: 17px; height: 17px; fill: currentColor; display: block; }
.theme .moon { display: none; }
:root[data-theme="dark"] .theme .moon { display: block; }
:root[data-theme="dark"] .theme .sun { display: none; }

/* home banner */
.banner { width: 100%; height: auto; aspect-ratio: 21 / 10; object-fit: cover; object-position: 50% 42%; display: block; border-radius: 3px; }

/* prose */
.prose { margin-top: 30px; }
.prose p + p { margin-top: 20px; }
.prose a { text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose a:hover { text-decoration-color: var(--ink); }

/* social row */
.social { display: flex; gap: 20px; margin-top: 34px; }
.social a { color: var(--soft); display: inline-flex; }
.social a:hover { color: var(--ink); }
.social svg { width: 19px; height: 19px; fill: currentColor; display: block; }

/* subpages */
h1 { font-size: 22px; font-weight: 500; line-height: 1.3; }
.lede { color: var(--soft); margin-top: 8px; }

.project { margin-top: 44px; padding-top: 28px; border-top: 1px solid var(--rule); }
.project h2 { font-size: 17px; font-weight: 500; line-height: 1.4; }
.project p { margin-top: 12px; }
.project .tools { color: var(--soft); font-size: 14px; margin-top: 12px; }
.project a { text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 3px; text-decoration-thickness: 1px; }
.project a:hover { text-decoration-color: var(--ink); }

figure { margin-top: 18px; }
figure a { display: block; }
figure img { width: 100%; height: auto; display: block; border: 1px solid var(--rule); border-radius: 3px; background: #fff; }
figcaption { color: var(--soft); font-size: 13.5px; line-height: 1.5; margin-top: 8px; }

@media (max-width: 520px) {
  .top { flex-direction: column; align-items: flex-start; gap: 10px; }
  .top nav { gap: 18px; }
}
