/* Public website */

.preview-bar {
  position: sticky; top: 0; z-index: 30; padding: .5rem 1rem; text-align: center;
  background: var(--brass); color: #fff; font-size: .98rem;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: var(--paper);
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--rule);
}
.preview-bar + .site-header { top: 2.4rem; }
.header-inner { max-width: 1080px; margin: 0 auto; padding: .7rem 1.25rem; display: flex; align-items: center; gap: .5rem 1.5rem; flex-wrap: wrap; }
.brand { font-family: var(--display); font-size: 1.35rem; color: var(--ink); text-decoration: none; margin-right: auto; line-height: 1.2; }
.site-nav { display: flex; gap: .25rem 1.5rem; flex-wrap: wrap; }
.site-nav a { color: var(--ink); text-decoration: none; border-bottom: 1px solid transparent; }
.site-nav a:hover { border-bottom-color: var(--brass); }
@media (max-width: 700px) {
  .site-nav { order: 3; width: 100%; gap: .25rem 1.1rem; }
  html { scroll-padding-top: 7rem; }
}

/* ---------- Title page ---------- */
.hero { padding: clamp(2rem, 6vw, 4.5rem) 1.25rem 1rem; }
.titlepage {
  max-width: 640px; margin: 0 auto; text-align: center;
  padding: clamp(2.25rem, 6vw, 3.75rem) clamp(1.25rem, 5vw, 3.25rem) clamp(2rem, 5vw, 3rem);
  border: 1px solid var(--ink-soft);
  box-shadow: inset 0 0 0 7px var(--paper), inset 0 0 0 8px var(--ink-soft);
}
.titlepage .orn { max-width: 12rem; margin: 0 auto 1.75rem; }
.titlepage h1 { margin: 0; font-size: clamp(2.7rem, 9vw, 4.8rem); line-height: 1.02; letter-spacing: -.01em; }
.hero-role { margin: 1rem 0 0; font-style: italic; color: var(--ink-soft); font-size: 1.2rem; }
.hero-tag { margin: 1.5rem auto 0; max-width: 32ch; }
.contents { margin: 2.5rem auto 0; max-width: 24rem; text-align: left; }
.contents h2 { margin: 0 0 .6rem; text-align: center; font-style: italic; font-size: 1.15rem; color: var(--ink-soft); }
.contents ul { list-style: none; margin: 0; padding: 0; }
.contents a { display: flex; align-items: baseline; gap: .5rem; padding: .3rem 0; color: var(--ink); text-decoration: none; }
.contents a:hover .c-name { color: var(--accent); text-decoration: underline; text-underline-offset: .18em; }
.c-name { font-family: var(--display); font-size: 1.3rem; }
.c-count { color: var(--ink-soft); font-size: 1rem; }
.latest { max-width: 640px; margin: 1.5rem auto 0; text-align: center; color: var(--ink-soft); font-size: 1rem; }

/* ---------- Sections ---------- */
.section { max-width: 1080px; margin: 0 auto; padding: clamp(3rem, 8vw, 5.5rem) 1.25rem 0; }
.section-head { display: flex; align-items: baseline; gap: 1.25rem; }
.section-head h2 { margin: 0; font-size: clamp(2rem, 4.5vw, 2.7rem); line-height: 1.1; }
.section-head::after { content: ""; flex: 1; height: 1px; background: var(--rule); }
.section-intro { margin: .75rem 0 0; color: var(--ink-soft); max-width: 56ch; }
.more { margin: 1.5rem 0 0; }
.crumb { margin: 0 0 1.25rem; font-size: 1rem; }
.empty { color: var(--ink-soft); font-style: italic; }

/* Books */
.shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 3rem 2.25rem; margin-top: 2.25rem; align-items: start; }
.book { display: flex; flex-direction: column; gap: 1.1rem; }
.cover-link { display: block; max-width: 230px; }
.book-text { display: flex; flex-direction: column; gap: .35rem; }
.book-text h3 { margin: 0; font-size: 1.55rem; line-height: 1.15; }
.book-text h3 a { color: var(--ink); text-decoration: none; }
.book-text h3 a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: .15em; }
.book-text p { margin: 0; }
.book-text .sub { font-style: italic; color: var(--ink-soft); }
.book-text .meta { color: var(--ink-soft); font-size: .98rem; }
.book-text .blurb { margin-top: .35rem; }
.book-text .btn { align-self: flex-start; margin-top: .6rem; }

/* Writings: a table of contents */
.filters { display: flex; flex-wrap: wrap; gap: .2rem 1.4rem; margin: 1.5rem 0 .25rem; }
.filters a { padding: .2rem 0; color: var(--ink-soft); text-decoration: none; border-bottom: 2px solid transparent; }
.filters a:hover { color: var(--ink); }
.filters a[aria-current] { color: var(--ink); border-bottom-color: var(--brass); }
.toc { list-style: none; margin: 1rem 0 0; padding: 0; }
.toc-item { padding: 1.15rem 0; border-bottom: 1px solid var(--rule); }
.toc-item:first-child { padding-top: .5rem; }
.toc-row { display: flex; align-items: baseline; gap: .7rem; }
.toc-title { font-family: var(--display); font-size: 1.5rem; line-height: 1.2; color: var(--ink); text-decoration: none; }
.toc-title:hover { color: var(--accent); text-decoration: underline; text-underline-offset: .15em; }
.toc-date { color: var(--ink-soft); font-size: 1rem; white-space: nowrap; }
.toc-sum { margin: .3rem 0 0; color: var(--ink-soft); font-style: italic; max-width: 62ch; }

/* Updates */
.updates { margin-top: 2.25rem; display: grid; gap: 2rem; }
.update { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: 1.5rem; }
.update time { font-style: italic; color: var(--ink-soft); padding-top: .2rem; }
.update h3 { margin: 0 0 .3rem; font-size: 1.45rem; line-height: 1.2; }
.update h3 a { color: var(--ink); text-decoration: none; }
.update h3 a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: .15em; }
.update p { margin: 0 0 .5rem; max-width: 62ch; }

/* About */
.about { display: grid; grid-template-columns: minmax(0, 250px) minmax(0, 1fr); gap: 3rem; margin-top: 2.25rem; align-items: start; }
.portrait { border: 1px solid var(--ink-soft); padding: 8px; width: 100%; }
.portrait img { display: block; width: 100%; height: auto; }
.portrait .mono { aspect-ratio: 4 / 5; display: grid; place-items: center; background: var(--paper-2); font-family: var(--display); font-size: 4.5rem; color: var(--ink-soft); }
.bio p { margin: 0 0 1.1em; max-width: 62ch; }
.bio p:first-child::first-letter {
  font-family: var(--display); float: left; font-size: 4.2em; line-height: .78;
  padding: .06em .1em 0 0; color: var(--accent);
}

/* Contact */
.contact { max-width: 620px; margin: 0 auto; text-align: center; }
.contact .section-head { justify-content: center; }
.contact .section-head::before { content: ""; flex: 1; height: 1px; background: var(--rule); }
.contact p { margin: 1rem 0 1.5rem; }
.elsewhere { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem 1.6rem; padding: 0; margin: 1.5rem 0 0; }

/* ---------- Reading pages ---------- */
.reader-page { max-width: 720px; }
.reader-page h1, .book-page h1 { margin: 0 0 .25rem; font-size: clamp(2.2rem, 6vw, 3.4rem); line-height: 1.06; }
.reader-meta { margin: 0; font-style: italic; color: var(--ink-soft); }
.post-image { margin: 2rem 0 0; }
.post-image img { display: block; width: 100%; height: auto; border: 1px solid var(--rule); }
.reader-body { margin-top: 2rem; font-size: 1.22rem; line-height: 1.78; }
.reader-body p { margin: 0 0 1.15em; }
.reader-body.poem { line-height: 1.6; }
.reader-body.poem p { white-space: pre-line; margin-bottom: 1.6em; }
.reader-page .btn { margin-top: .5rem; }
.pager { display: flex; justify-content: space-between; gap: 1.5rem; margin-top: 3.5rem; padding-top: 1.5rem; border-top: 1px solid var(--rule); }
.pager a { display: flex; flex-direction: column; max-width: 46%; color: var(--ink); text-decoration: none; font-family: var(--display); font-size: 1.25rem; line-height: 1.25; }
.pager a span { font-family: var(--text); font-style: italic; font-size: .95rem; color: var(--ink-soft); }
.pager a:hover { color: var(--accent); }
.pager .next { text-align: right; margin-left: auto; }

.book-page { max-width: 900px; }
.book-page-grid { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: 3rem; align-items: start; }
.book-page .cover { max-width: 260px; }
.book-page .sub { margin: .25rem 0 0; font-style: italic; font-size: 1.25rem; color: var(--ink-soft); }
.book-page .meta { margin: .75rem 0 0; color: var(--ink-soft); }
.book-page .prose { margin: 1.5rem 0; }
.book-page .prose p { margin: 0 0 1.1em; max-width: 62ch; }

.notfound { text-align: center; max-width: 560px; }
.notfound .code { font-family: var(--display); font-size: 4rem; margin: 0; color: var(--brass); }

/* ---------- Footer ---------- */
.site-footer { max-width: 1080px; margin: 0 auto; padding: 5rem 1.25rem 3rem; text-align: center; color: var(--ink-soft); font-size: .98rem; }
.site-footer .orn { max-width: 14rem; margin: 0 auto 1.25rem; }
.site-footer p { margin: 0 0 .35rem; }

@media (max-width: 760px) {
  .about, .book-page-grid { grid-template-columns: 1fr; gap: 2rem; }
  .portrait { max-width: 220px; }
}
@media (max-width: 640px) {
  .update { grid-template-columns: 1fr; gap: .25rem; }
}
@media (max-width: 520px) {
  .toc-row { flex-wrap: wrap; gap: .1rem .7rem; }
  .toc-row .leader { display: none; }
  .toc-date { width: 100%; }
}
