@font-face {
  font-family: "Walter Turncoat";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/walter-turncoat-latin.woff2") format("woff2");
}

:root {
  color-scheme: light;
  --text: #111;
  --muted: #333;
  --faint: #666;
  --rule: #bbb;
  --code-bg: #f5f5f3;
  --bg: #fff;
  --hand: "Walter Turncoat", "Comic Sans MS", cursive;
  --read: Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, Menlo, monospace;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0 auto;
  max-width: calc(40em + 32px);
  padding: 2.5rem 16px 4rem;
  background: var(--bg);
  color: var(--text);
  font-family: var(--hand);
  line-height: 1.5;
}

a { color: var(--text); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--muted); }
a:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; border-radius: 2px; }

/* Header */
.site-header { margin-bottom: 2.5rem; }
.site-title { margin: 0; font-size: 1.25rem; font-weight: 400; line-height: 1; }
.site-title a { text-decoration: none; }
.home .site-title { font-size: 2.4rem; }
.tagline { margin: 0.4rem 0 0; color: var(--muted); font-size: 1.1rem; }
nav { display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; margin-top: 1.2rem; }
nav a {
  text-decoration-line: underline;
  text-decoration-style: wavy;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

/* Home list */
.post-list { list-style: none; margin: 0; padding: 0; }
.post-row { display: flex; gap: 1rem; align-items: flex-start; margin-bottom: 1.6rem; }
.post-row > div { min-width: 0; }
.ch { flex: 0 0 64px; width: 64px; height: 64px; object-fit: contain; }
.date { margin: 0; color: var(--faint); font-size: 0.9rem; }
.post-title { margin: 0.1rem 0 0; font-size: 1.2rem; font-weight: 400; line-height: 1.3; }
.summary { margin: 0.2rem 0 0; color: var(--muted); font-size: 1rem; }
.empty { color: var(--muted); }

/* Posts and pages */
.post-header { margin-bottom: 1.8rem; }
.post-header h1 { margin: 0 0 0.3rem; font-size: 1.9rem; font-weight: 400; line-height: 1.25; }

.prose {
  font-family: var(--read);
  font-size: 1.15rem;
  line-height: 1.7;
  overflow-wrap: break-word;
}
.prose h2, .prose h3, .prose h4 { font-family: var(--hand); font-weight: 400; line-height: 1.3; margin: 2.2rem 0 0.6rem; }
.prose h2 { font-size: 1.45rem; }
.prose h3 { font-size: 1.2rem; }
.prose h4 { font-size: 1.05rem; }
.prose p, .prose ul, .prose ol, .prose blockquote, .prose pre, .prose figure { margin: 0 0 1.2rem; }
.prose li + li { margin-top: 0.3rem; }
.prose blockquote { margin-left: 0; padding-left: 1rem; border-left: 3px solid var(--rule); color: var(--muted); }
.prose hr { border: 0; border-top: 2px dashed var(--rule); margin: 2rem 0; }
.prose img, .prose video { max-width: 100%; height: auto; }
.prose figure { margin-left: 0; margin-right: 0; }
.prose figcaption { margin-top: 0.4rem; color: var(--faint); font-size: 0.9rem; }
.prose code { font-family: var(--mono); font-size: 0.88em; background: var(--code-bg); padding: 0.1em 0.3em; border-radius: 3px; }
.prose pre { background: var(--code-bg); padding: 0.9rem 1rem; overflow-x: auto; border-radius: 4px; line-height: 1.5; }
.prose pre code { background: none; padding: 0; font-size: 0.85em; }
.prose table { border-collapse: collapse; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--rule); padding: 0.3rem 0.6rem; }

/* Byline */
.byline { display: flex; align-items: center; gap: 0.75rem; }
.byline p { margin: 0; line-height: 1.3; }
.byline .date { display: inline; }
.avatar { flex: 0 0 44px; width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.author { text-decoration: none; }
.author:hover { text-decoration: underline; }

.cover { margin: 0 0 1.8rem; }
.cover img { display: block; width: 100%; height: auto; border-radius: 4px; }

/* Share */
.share { margin-top: 2.5rem; padding-top: 1.2rem; border-top: 2px dashed var(--rule); }
.share h2 { margin: 0 0 0.6rem; font-size: 1.05rem; font-weight: 400; }
.share ul { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; margin: 0; padding: 0; }
.share [hidden] { display: none; }
.share a, .share button {
  display: inline-block;
  min-height: 2.5rem;
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--text);
  border-radius: 4px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  line-height: 1.4;
  text-decoration: none;
  cursor: pointer;
}
.share a:hover, .share button:hover { background: var(--code-bg); }
.share button:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }

.signoff { margin: 2.5rem 0 0; }
.post-footer { margin-top: 2rem; padding-top: 1.2rem; border-top: 2px dashed var(--rule); }
