/* Layout: one reading column (max 880px) under a quiet header; books shown as cloth-bound covers on a shelf grid. */
:root {
  --paper: #EDE7DA; --surface: #F8F4EC; --ink: #1C1B19; --ink-soft: #57534A; --line: rgba(28,27,25,0.14);
  --brass: #94681A; --petrol: #234E4A; --focus: #234E4A;
  --cloth-1: #2F4A45; --cloth-2: #6E3528; --cloth-3: #2A3A5E; --cloth-4: #7C5E24; --cloth-5: #474C37; --cloth-6: #56364F; --cover-ink: #F3EBDD;
  --display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --body: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #171511; --surface: #211E19; --ink: #EFEAE0; --ink-soft: #ABA597; --line: rgba(239,234,224,0.15);
    --brass: #D4A94A; --petrol: #7FB6AC; --focus: #7FB6AC; color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { scroll-padding-top: 80px; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -0.01em; margin: 0; text-wrap: balance; }
a { color: inherit; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
.wrap { max-width: 880px; margin: 0 auto; padding-inline: 20px; }
.muted { color: var(--ink-soft); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; background: var(--surface); padding: 8px 12px; z-index: 20; }

/* Header */
.site-head { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.head-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 16px; }
.mark { font-family: var(--display); font-weight: 700; font-size: 1.15rem; text-decoration: none; white-space: nowrap; }
.top-nav { display: flex; align-items: center; gap: 22px; font-size: 0.95rem; }
.top-nav a { text-decoration: none; color: var(--ink-soft); padding-block: 4px; border-bottom: 2px solid transparent; }
.top-nav a:hover, .top-nav a[aria-current="page"] { color: var(--ink); border-color: var(--brass); }

main { padding-block: 8px 72px; min-height: 60vh; }

/* Page heads */
.page-head { padding-block: 44px 28px; display: grid; gap: 10px; }
.page-head h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); }
.lede { color: var(--ink-soft); max-width: 60ch; margin: 0; }
.lede a { color: var(--brass); text-underline-offset: 3px; }

/* Chronological feed */
.feed, .book-list, .book-grid, .strip { list-style: none; margin: 0; padding: 0; }
.feed-row { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 20px; padding-block: 18px; border-bottom: 1px solid var(--line); }
.feed-row:first-child { border-top: 1px solid var(--line); }
.feed-row .when { color: var(--ink-soft); font-size: 0.85rem; font-variant-numeric: tabular-nums; padding-top: 3px; }
.feed-body, .book-row-body { display: grid; gap: 3px; min-width: 0; }
.kind { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--brass); font-weight: 600; }
.feed-title { font-family: var(--display); font-weight: 600; font-size: 1.15rem; line-height: 1.3; text-decoration: none; }
.feed-title:hover { color: var(--brass); }
.byline { color: var(--ink-soft); font-size: 0.9rem; }
.excerpt { color: var(--ink-soft); font-size: 0.93rem; margin: 4px 0 0; }
.empty { padding-block: 40px; color: var(--ink-soft); border-top: 1px solid var(--line); }

/* Tabs and chips */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; padding-bottom: 22px; margin-bottom: 26px; border-bottom: 1px solid var(--line); }
.tabs a, .chip { font: inherit; font-size: 0.88rem; padding: 7px 14px; border-radius: 100px; border: 1px solid var(--line); color: var(--ink-soft); text-decoration: none; background: transparent; }
.tabs a[aria-current="page"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip:hover, .tabs a:hover { color: var(--ink); }
.count { opacity: 0.7; font-variant-numeric: tabular-nums; margin-left: 2px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }

/* Book rows */
.book-row { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 18px; align-items: start; padding-block: 16px; border-bottom: 1px solid var(--line); }
.book-row:first-child { border-top: 1px solid var(--line); }
.thumb, .strip a, .stack-item, .single-cover a { display: block; text-decoration: none; border-radius: 4px; }

/* Covers: a real image, or a designed cloth cover with title and author */
.cover { position: relative; aspect-ratio: 2 / 3; width: 100%; max-width: 100%; border-radius: 2px 4px 4px 2px; overflow: hidden; background: var(--cloth-1); box-shadow: 0 1px 0 rgba(0,0,0,0.06), 0 10px 18px -12px rgba(0,0,0,0.55); container-type: inline-size; }
.cover img { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; object-fit: cover; }
.cover { display: flex; flex-direction: column; justify-content: space-between; padding: 14% 10% 11% 16%; color: var(--cover-ink); }
.cover::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 7%; background: rgba(0,0,0,0.2); }
.cover::after { content: ""; position: absolute; inset: 0 auto 0 7%; width: 1px; background: rgba(255,255,255,0.12); }
.gen-title { font-family: var(--display); font-weight: 600; font-size: 14px; font-size: 12.5cqw; line-height: 1.08; display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.cover.long .gen-title { font-size: 12px; font-size: 10cqw; }
.gen-foot { display: grid; gap: 7%; }
.gen-rule { display: block; height: 1px; width: 34%; background: currentColor; opacity: 0.55; }
.gen-author { font-size: 8px; font-size: 6.4cqw; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.85; line-height: 1.3; }
.c1 { background: var(--cloth-1); } .c2 { background: var(--cloth-2); } .c3 { background: var(--cloth-3); }
.c4 { background: var(--cloth-4); } .c5 { background: var(--cloth-5); } .c6 { background: var(--cloth-6); }
.thumb .gen-author, .thumb .gen-rule { display: none; }

/* Shelf grid */
.book-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 30px 22px; }
.book-grid.small { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
.tile { display: grid; gap: 8px; text-decoration: none; border-radius: 4px; }
.tile .cover, .strip .cover, .single-cover .cover { transition: transform .18s ease; }
.tile:hover .cover, .strip a:hover .cover, .single-cover a:hover .cover { transform: translateY(-4px); }
.tile-title { font-size: 0.86rem; line-height: 1.3; font-weight: 500; }
.tile-author { font-size: 0.78rem; color: var(--ink-soft); margin-top: -4px; }
.shelf { margin-bottom: 48px; }
.shelf-h { font-size: 1.25rem; margin-bottom: 20px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.notes-foot { margin-top: 24px; }
.notes-foot a { color: var(--brass); }

/* Home strip */
.shelf-strip { margin-bottom: 40px; }
.strip-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.strip-head h2 { font-size: 1.1rem; }
.strip-head a { font-size: 0.9rem; color: var(--brass); text-underline-offset: 3px; }
.strip { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 14px; }

/* Posts */
.back { display: inline-block; margin-block: 28px 20px; font-size: 0.9rem; color: var(--ink-soft); text-decoration: none; }
.back:hover { color: var(--ink); }
.post-head { display: grid; gap: 6px; }
.post-head h1 { font-size: clamp(1.8rem, 4.2vw, 2.6rem); line-height: 1.12; }
.post-head.center { text-align: center; justify-items: center; }
.post-head time, .facts { color: var(--ink-soft); font-size: 0.88rem; }
.subtitle { margin: 0; font-family: var(--display); font-size: 1.1rem; color: var(--ink-soft); }
.post-head .byline { font-size: 1rem; color: var(--ink); margin: 0; }
.facts { display: flex; gap: 22px; margin: 8px 0 0; flex-wrap: wrap; }
.facts dt { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; }
.facts dd { margin: 0; color: var(--ink); font-variant-numeric: tabular-nums; }
.facts dd a { color: inherit; text-underline-offset: 3px; }
.single-grid { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 36px; align-items: end; margin-bottom: 36px; }
.single-cover { max-width: 190px; }
.prose { max-width: 66ch; font-size: 1.06rem; line-height: 1.75; }
.prose p { margin: 0 0 1.1em; }
.prose a { color: var(--brass); text-underline-offset: 3px; }
.prose h2, .prose h3 { margin: 1.4em 0 0.5em; }
.prose img { border-radius: 4px; margin-block: 1em; }
.prose blockquote { margin: 1.2em 0; padding-left: 18px; border-left: 3px solid var(--line); color: var(--ink-soft); }
.post .prose { margin-top: 28px; }
.post.group .prose { margin-inline: auto; }
.verdict { font-family: var(--display); font-size: clamp(1.25rem, 2.6vw, 1.55rem); line-height: 1.4; max-width: 40ch; margin: 4px 0 0; padding-left: 18px; border-left: 3px solid var(--brass); text-wrap: pretty; }
.prompt { margin-top: 32px; }
.prompt h2 { font-family: var(--body); font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--brass); }
.post .prompt .prose { margin-top: 8px; }
.stack { display: flex; justify-content: center; align-items: flex-end; padding-block: 12px 30px; }
.stack-item { width: 104px; position: relative; transition: transform .18s ease; }
.stack-item:not(:first-child) { margin-left: -34px; }
.stack-item:nth-child(odd) .cover { transform: rotate(-4deg); }
.stack-item:nth-child(even) .cover { transform: rotate(3deg); }
.stack-item:hover { transform: translateY(-6px); z-index: 3; }
.members { margin-top: 44px; padding-top: 28px; border-top: 1px solid var(--line); }
.members h2 { font-size: 1.15rem; margin-bottom: 20px; }
.also { color: var(--ink-soft); font-size: 0.92rem; margin-top: 28px; }
.also a { color: var(--brass); }

/* About */
.bio { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 44px; padding-block: 48px; align-items: start; }
.bio-photo img, .photo-empty { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 4px; }
.photo-empty { display: grid; place-items: center; background: var(--cloth-1); color: var(--cover-ink); font-family: var(--display); font-size: 3.2rem; font-weight: 600; letter-spacing: 0.04em; }
.bio-text { display: grid; gap: 18px; min-width: 0; }
.bio-text h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); }

footer.site-foot { border-top: 1px solid var(--line); padding-block: 26px 40px; color: var(--ink-soft); font-size: 0.74rem; opacity: 0.85; }
footer.site-foot p { margin: 0 0 6px; max-width: 70ch; }
footer.site-foot a { color: inherit; }

/* Tablets and below */
@media (max-width: 640px) {
  .strip { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .bio { grid-template-columns: minmax(0, 1fr); gap: 24px; } .bio-photo { max-width: 170px; }
}

/* Phones */
@media (max-width: 600px) {
  html { scroll-padding-top: 64px; }
  .wrap { padding-inline: 16px; }
  .head-inner { padding-block: 10px; }
  .mark { font-size: 1.05rem; }
  .top-nav { gap: 4px; }
  .top-nav a { padding: 10px 8px; }
  .page-head { padding-block: 26px 18px; }
  .page-head h1 { font-size: 1.9rem; }
  .lede { font-size: 0.95rem; }
  .shelf-strip { margin-bottom: 28px; }
  .feed-row { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .tabs, .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -16px; padding-inline: 16px; }
  .tabs::-webkit-scrollbar, .chips::-webkit-scrollbar { display: none; }
  .tabs a, .chip { flex: 0 0 auto; white-space: nowrap; }
  .tabs { padding-bottom: 16px; margin-bottom: 20px; }
  .chips { margin-bottom: 18px; }
  .book-grid, .book-grid.small { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px 12px; }
  .tile { gap: 6px; }
  .tile-title { font-size: 0.78rem; line-height: 1.25; }
  .tile-author { display: none; }
  .shelf { margin-bottom: 34px; }
  .shelf-h { font-size: 1.1rem; margin-bottom: 14px; padding-bottom: 8px; }
  .single-grid { grid-template-columns: 104px minmax(0, 1fr); gap: 16px; align-items: start; margin-bottom: 24px; }
  .single-cover { max-width: 104px; }
  .post-head h1 { font-size: 1.65rem; }
  .single .post-head h1 { font-size: 1.45rem; }
  .subtitle { font-size: 0.98rem; }
  .post-head .byline { font-size: 0.95rem; }
  .facts { gap: 14px; }
  .verdict { font-size: 1.2rem; padding-left: 14px; }
  .prose { font-size: 1.02rem; line-height: 1.7; }
  .stack-item { width: 88px; }
  .stack-item:not(:first-child) { margin-left: -28px; }
  .back { margin-block: 18px 14px; }
  .bio { padding-block: 28px; }
  footer.site-foot { padding-block: 22px 32px; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
