@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url(/fonts/newsreader-normal-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url(/fonts/newsreader-normal-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Newsreader";
  font-style: italic;
  font-weight: 200 800;
  font-display: swap;
  src: url(/fonts/newsreader-italic-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Newsreader";
  font-style: italic;
  font-weight: 200 800;
  font-display: swap;
  src: url(/fonts/newsreader-italic-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Sand by day, the beach at night. Browns from the old site, warmed up. */
:root {
  --bg: #f8f1e4;
  --ink: #3d2b16;
  --muted: #7a6146;
  --accent: #8a5a2b;
  --sand: #c09a68;
  --wash: #efdfbe;
  --field: #fdf9f1;
  --line: #e0cfae;
  --grain: 0.5;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1d160e;
    --ink: #ecdec6;
    --muted: #b39d80;
    --accent: #e2b47b;
    --sand: #8f6e48;
    --wash: #3a2b18;
    --field: #241b11;
    --line: #3b2e1e;
    --grain: 0.35;
    color-scheme: dark;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.1875rem/1.6 "Newsreader", Georgia, "Times New Roman", serif;
  font-optical-sizing: auto;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 0 1rem;
}

/* Grain, so the page reads as sand rather than screen. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: var(--grain);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .36 0 0 0 0 .2 0 0 0 .32 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.top, main, .foot {
  width: 100%;
  max-width: 38rem;
  margin: 0 auto;
}

main { flex: 1; }

::selection { background: var(--wash); }

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

.skip {
  position: absolute;
  left: -999rem;
}
.skip:focus { left: 1rem; top: 1rem; background: var(--bg); padding: 0.25rem 0.5rem; }

.vh {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* --- header & footer --- */

.top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 1.5rem 0 0;
  font-size: 1.0625rem;
}
.top nav { display: flex; gap: 1.5rem; margin-left: auto; }
.top a { color: var(--muted); text-decoration: none; }
.top a:hover, .top a[aria-current] { color: var(--ink); }
.top .wordmark { color: var(--ink); font-style: italic; }

.foot {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-top: 5rem;
  padding: 1.5rem 0 2.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 1rem;
}
.foot p { margin: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--ink); }
.signoff { font-style: italic; }

/* --- type --- */

h1, h2, h3, h4, h5 {
  font-weight: 450;
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.5rem, 8vw, 3.75rem); letter-spacing: -0.025em; margin: 3.5rem 0 0.75rem; }
h2 { font-size: 1.6rem; margin: 0 0 1.5rem; }
p { margin: 0 0 1.1em; text-wrap: pretty; }

.lede {
  font-size: 1.45rem;
  line-height: 1.4;
  font-style: italic;
  margin-bottom: 1.5em;
}

.aside { color: var(--muted); font-size: 1rem; margin-top: 1.75rem; }

/* The tide line: a divider drawn like a waterline on the beach. */
hr.tide, .prose hr {
  border: 0;
  height: 10px;
  margin: 3.5rem 0;
  background: var(--sand);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='10'%3E%3Cpath d='M0 5c7-4 14-4 21 0s14 4 21 0 10-3 14-1' fill='none' stroke='%23000' stroke-width='1.3'/%3E%3C/svg%3E") left center / 56px 10px repeat-x;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='10'%3E%3Cpath d='M0 5c7-4 14-4 21 0s14 4 21 0 10-3 14-1' fill='none' stroke='%23000' stroke-width='1.3'/%3E%3C/svg%3E") left center / 56px 10px repeat-x;
}

/* --- lists of writing --- */

.featured, .posts, .earlier { list-style: none; margin: 0; padding: 0; }
.featured li, .earlier li { margin: 0 0 1.5rem; }
.featured a, .posts a, .earlier li > a:first-child {
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.3;
}
.featured a:hover, .posts a:hover, .earlier a:hover { color: var(--accent); }
.dek, .meta, .hit { display: block; }
.dek { font-style: italic; color: var(--muted); line-height: 1.4; margin-top: 0.15rem; }
.meta { color: var(--muted); font-size: 0.95rem; margin-top: 0.2rem; }
.meta a { color: inherit; }
.ext { color: var(--sand); margin-left: 0.3em; font-size: 0.9em; }
.more { margin: 2rem 0 0; }

/* --- background --- */

.timeline { margin: 0; }
.timeline div {
  display: grid;
  grid-template-columns: 4.75rem 1fr;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.timeline dt {
  color: var(--muted);
  font-size: 1rem;
  font-variant-numeric: tabular-nums lining-nums;
  padding-top: 0.15rem;
}
.timeline dd { margin: 0; }
.timeline b { font-weight: 600; }

/* --- contact --- */

.contact { display: flex; flex-direction: column; position: relative; }
.contact label { color: var(--muted); font-size: 1rem; margin: 1rem 0 0.3rem; }
.contact input, .contact textarea {
  font: inherit;
  color: var(--ink);
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 0.55rem 0.75rem;
  width: 100%;
}
.contact textarea { resize: vertical; min-height: 9rem; }
.contact input:focus, .contact textarea:focus { border-color: var(--accent); outline: none; }
.contact button {
  align-self: flex-start;
  margin-top: 1.5rem;
  font: inherit;
  font-weight: 500;
  color: var(--bg);
  background: var(--ink);
  border: 0;
  border-radius: 3px;
  padding: 0.5rem 1.6rem;
  cursor: pointer;
}
.contact button:hover { background: var(--accent); }
.hp { position: absolute; left: -999rem; }
.notice { display: none; background: var(--wash); border-left: 3px solid var(--accent); padding: 0.75rem 1rem; }
.notice:target { display: block; }

/* --- archive --- */

.archive h1 { margin-bottom: 1rem; }
.finder { margin: 2.5rem 0 2rem; }
.finder input[type="search"] {
  width: 100%;
  font: inherit;
  font-size: 1.2rem;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--sand);
  border-radius: 0;
  padding: 0.4rem 0;
  -webkit-appearance: none;
  appearance: none;
}
.finder input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.finder input[type="search"]::placeholder { color: var(--muted); opacity: 0.8; }
.finder input[type="search"]:focus { outline: none; border-bottom-color: var(--accent); box-shadow: 0 1px 0 var(--accent); }
.pubs { border: 0; margin: 1rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; font-size: 1rem; }
.pubs input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pubs span { color: var(--muted); cursor: pointer; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 0.25em; }
.pubs input:checked + span { color: var(--ink); text-decoration-color: var(--sand); }
.pubs input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
.status { color: var(--muted); font-size: 1rem; margin: 1rem 0 0; min-height: 1.6em; }

.posts li {
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.posts .yr { color: var(--muted); font-size: 1rem; padding-top: 0.2rem; font-variant-numeric: tabular-nums lining-nums; }
.posts li[hidden] { display: none; }
.hit { font-size: 1rem; color: var(--muted); margin-top: 0.35rem; }
.hit:empty { display: none; }
mark { background: var(--wash); color: inherit; border-radius: 2px; padding: 0 0.1em; }

/* --- a post --- */

.post header { margin-bottom: 2.5rem; }
.post h1 { font-size: clamp(2.1rem, 6vw, 2.9rem); margin-bottom: 0.75rem; }
.post .dek { font-size: 1.35rem; line-height: 1.35; margin: 0 0 1rem; }

.prose h3 { font-size: 1.5rem; margin: 2.5rem 0 0.75rem; }
.prose h4 { font-size: 1.25rem; margin: 2rem 0 0.5rem; }
.prose h5 { font-size: 1.1rem; font-style: italic; margin: 1.75rem 0 0.5rem; }
.prose ul, .prose ol { padding-left: 1.4rem; margin: 0 0 1.1em; }
.prose li { margin-bottom: 0.4em; }
.prose li > p { margin-bottom: 0.4em; }
.prose blockquote { margin: 1.5rem 0; padding-left: 1.2rem; border-left: 2px solid var(--sand); color: var(--muted); }
.prose figure { margin: 2.25rem 0; }
.prose img { display: block; max-width: 100%; height: auto; border-radius: 2px; margin: 0 auto; }
.prose figcaption { color: var(--muted); font-size: 0.95rem; font-style: italic; margin-top: 0.6rem; text-align: center; }
.prose code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.85em; background: var(--wash); padding: 0.1em 0.3em; border-radius: 2px; }
.prose table { border-collapse: collapse; font-size: 1rem; margin: 1.5rem 0; display: block; overflow-x: auto; }
.prose th, .prose td { border-bottom: 1px solid var(--line); padding: 0.4rem 0.75rem 0.4rem 0; text-align: left; vertical-align: top; }
.prose .pullquote { font-size: 1.25rem; font-style: italic; margin: 2rem 0; padding-left: 1.2rem; border-left: 2px solid var(--sand); }
.prose .embed { font-style: italic; }
.prose a { overflow-wrap: anywhere; }
.prose .footnote-anchor { font-size: 0.7em; vertical-align: super; line-height: 0; text-decoration: none; padding: 0 0.1em; }
.prose > :not(.footnote) + .footnote { border-top: 1px solid var(--line); margin-top: 3rem; padding-top: 1.5rem; }
.prose .footnote { display: flex; gap: 0.6rem; font-size: 1rem; color: var(--muted); }
.prose .footnote-number { flex: none; min-width: 1.4rem; text-decoration: none; }
.prose .footnote-content p { margin-bottom: 0.6em; }

.origin { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 1rem; }

.lost { padding-top: 2rem; }

@media (max-width: 34rem) {
  body { font-size: 1.0625rem; }
  h1 { margin-top: 2.5rem; }
  .lede { font-size: 1.3rem; }
  hr.tide, .prose hr { margin: 2.75rem 0; }
  .timeline div { grid-template-columns: 4rem 1fr; gap: 0.75rem; }
  .posts li { grid-template-columns: 2.75rem 1fr; gap: 0.75rem; }
}

@media print {
  body::before, .top, .foot, .contact, .finder { display: none; }
  body { background: #fff; color: #000; }
}
