/* Newsreader (SIL Open Font License, see fonts/Newsreader-OFL.txt), self-hosted */
@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("/fonts/newsreader-latin-opsz-normal.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-latin-ext-opsz-normal.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-20C0,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-latin-opsz-italic.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-latin-ext-opsz-italic.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-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

:root {
  --bg: #f6f1e7;
  --paper: #fbf8f1;
  --ink: #2b2723;
  --muted: #6b6257;
  --line: #e2d9c8;
  --accent: #9a4b36;
  --serif: "Newsreader", Georgia, serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1b1917;
    --paper: #221f1c;
    --ink: #e7e0d4;
    --muted: #b3a999;
    --line: #36312b;
    --accent: #d98b6f;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.65;
}

.wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 48px 20px 64px;
}

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

/* header */
.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 24px;
  margin-bottom: 40px;
}
.site-title {
  font-size: 1.6rem;
  font-style: italic;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.site-header nav { display: flex; gap: 20px; font-family: var(--mono); font-size: 0.9rem; }
.site-header nav a { color: var(--muted); text-decoration: none; }
.site-header nav a:hover, .site-header nav a.active { color: var(--ink); }

/* entry list */
.entries { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.entries li { border-bottom: 1px solid var(--line); }
.entries li:last-child { border-bottom: 0; }
.entries a {
  display: grid;
  grid-template-columns: 7.25rem 1fr;
  gap: 20px;
  padding: 14px 0;
  text-decoration: none;
  color: var(--ink);
}
.entries a:hover .entry-title { color: var(--accent); }
.entries time { font-family: var(--mono); font-size: 0.85rem; color: var(--muted); padding-top: 5px; }
.entry-time { display: block; }
.entry-title { display: block; }
.entry-excerpt { display: block; color: var(--muted); font-size: 0.9rem; line-height: 1.5; margin-top: 2px; }

@media (max-width: 520px) {
  .entries a { grid-template-columns: 1fr; gap: 0; }
}

/* single post */
article {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 36px 40px 28px;
}
@media (max-width: 520px) { article { padding: 24px 20px 16px; } }
article .meta { font-family: var(--mono); font-size: 0.85rem; color: var(--muted); }
article h1 { font-size: 2rem; line-height: 1.2; margin: 6px 0 24px; font-weight: normal; }
article h2 { font-size: 1.35rem; font-weight: normal; font-style: italic; margin: 32px 0 8px; }
article h3 { font-size: 1.1rem; margin: 28px 0 6px; }
article blockquote {
  margin: 20px 0;
  padding: 2px 0 2px 20px;
  border-left: 3px solid var(--accent);
  color: var(--muted);
  font-style: italic;
}
article hr { border: 0; text-align: center; margin: 32px 0; }
article hr::after { content: "· · ·"; color: var(--muted); letter-spacing: 0.5em; }
article code { font-family: var(--mono); font-size: 0.85em; background: var(--bg); padding: 1px 5px; border-radius: 3px; }
article img { max-width: 100%; height: auto; border-radius: 3px; }

.post-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 28px;
  font-family: var(--mono);
  font-size: 0.85rem;
}
.post-nav a { text-decoration: none; }
.post-nav .next { margin-left: auto; text-align: right; }

/* comments */
.comments { margin-top: 20px; }
.comments summary {
  display: inline-block;
  cursor: pointer;
  list-style: none;
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--muted);
  padding: 4px 0;
}
.comments summary::-webkit-details-marker { display: none; }
.comments summary::before { content: "+ "; }
.comments[open] summary::before { content: "− "; }
.comments summary:hover { color: var(--ink); }
.comment-list { list-style: none; margin: 12px 0 0; padding: 0; }
.comment-list li { padding: 12px 0; border-top: 1px solid var(--line); }
.comment-list p { margin: 4px 0 0; font-size: 0.95rem; line-height: 1.55; overflow-wrap: anywhere; }
.comment-meta { font-family: var(--mono); font-size: 0.78rem; color: var(--muted); }
.comment-name { color: var(--ink); }
.comment-you { color: var(--accent); }
.comment-form { gap: 10px; margin-top: 12px; }
.comment-form input { font-size: 0.9rem; padding: 8px 10px; max-width: 260px; }
.comment-form textarea { min-height: 90px; font-size: 0.95rem; }
.comment-actions { display: flex; align-items: center; gap: 12px; }
.comment-actions button { padding: 8px 16px; font-size: 0.8rem; }

/* contact */
.contact p { margin-top: 0; }
form { display: grid; gap: 18px; margin-top: 24px; }
label { display: grid; gap: 6px; font-family: var(--mono); font-size: 0.78rem; color: var(--muted); }
input, textarea {
  font: inherit;
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 10px 12px;
  width: 100%;
}
textarea { min-height: 200px; resize: vertical; line-height: 1.6; }
input:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.hp { position: absolute; left: -9999px; }
button {
  justify-self: start;
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--paper);
  background: var(--ink);
  border: 0;
  border-radius: 4px;
  padding: 11px 22px;
  cursor: pointer;
}
button:hover { background: var(--accent); }
button:disabled { opacity: 0.5; cursor: default; }
.form-status { font-size: 0.95rem; min-height: 1.5em; margin: 0; }
.form-status.ok { color: var(--accent); }
.form-status.err { color: #c0392b; }
.small { font-size: 0.85rem; color: var(--muted); }

.empty { color: var(--muted); font-style: italic; }

.site-footer {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
}
