/* Pumice + silver. No webfonts: system stacks only. */
:root {
  color-scheme: light dark;
  --bg: #e8e5df;       /* pumice */
  --bg-2: #dedad3;     /* pumice, deeper */
  --ink: #1d1f22;
  --ink-2: #55585d;
  --rule: #c3bfb7;
  --silver: #b6bbc0;
  --on-silver: #1d1f22;
  --link: #2c3b49;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17181a;
    --bg-2: #202123;
    --ink: #e6e4df;
    --ink-2: #a2a4a8;
    --rule: #34363a;
    --silver: #8b9096;
    --on-silver: #17181a;
    --link: #c9d1d9;
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 1rem; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 1.0625rem/1.7 var(--serif);
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--link); text-decoration-color: var(--silver); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; border-radius: 2px; }

.wrap { max-width: 62rem; margin-inline: auto; padding-inline: 1rem; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 1rem; top: 1rem; z-index: 10; background: var(--bg); padding: .5rem .75rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header / footer */
.site-head { border-bottom: 1px solid var(--rule); background: linear-gradient(var(--bg), var(--bg-2)); }
.site-head .wrap { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem 1.5rem; padding-block: 1.1rem; font-family: var(--sans); }
.brand { font-size: 1.35rem; font-weight: 650; letter-spacing: .02em; color: var(--ink); text-decoration: none; }
.tagline { flex: 1 1 18rem; color: var(--ink-2); font-size: .875rem; }
.site-head nav { display: flex; gap: 1.25rem; font-size: .9rem; }
.site-head nav a { color: var(--ink); }
.site-foot { margin-top: 5rem; border-top: 1px solid var(--rule); padding-block: 1.5rem 2.5rem; color: var(--ink-2); font: .8125rem var(--sans); }

main { padding-block: 2rem 0; }

/* Index */
.search { display: block; width: 100%; max-width: 24rem; margin: 0 0 .5rem; padding: .65rem .85rem; font: .95rem var(--sans); color: var(--ink); background: var(--bg-2); border: 1px solid var(--rule); border-radius: 3px; }
.year h2 { margin: 2.25rem 0 .35rem; font: 600 .78rem var(--sans); letter-spacing: .14em; color: var(--ink-2); }
.posts { list-style: none; margin: 0; padding: 0; }
.row { display: grid; grid-template-columns: 4.5rem 1fr; gap: .15rem 1rem; align-items: center; padding: .7rem 0; border-top: 1px solid var(--rule); text-decoration: none; color: var(--ink); }
.thumb { grid-row: span 2; width: 4.5rem; height: 4.5rem; object-fit: cover; background: var(--silver); border-radius: 2px; }
.thumb.empty { display: block; }
.row-title { font-size: 1.125rem; line-height: 1.35; align-self: end; }
.row:hover .row-title { text-decoration: underline; text-decoration-color: var(--silver); text-underline-offset: .2em; }
.row-meta { font: .8125rem var(--sans); color: var(--ink-2); align-self: start; }

/* Post */
.post-head { max-width: 38rem; margin: 1rem auto 2rem; }
.post-head .meta { margin: 0 0 .5rem; font: .8125rem var(--sans); color: var(--ink-2); }
.post-head h1 { margin: 0; font-size: clamp(1.7rem, 4.5vw, 2.4rem); line-height: 1.2; font-weight: 500; text-wrap: balance; }
.prose > :where(p, blockquote, h2, h3, ul, ol, hr) { max-width: 38rem; margin-inline: auto; }
.prose p { margin-block: 0 1.15em; font-size: 1.125rem; line-height: 1.75; hanging-punctuation: first; }
.prose h2 { margin-block: 2.5rem .75rem; font-size: 1.3rem; line-height: 1.3; font-weight: 600; }
.prose blockquote { margin-block: 1.5rem; padding-left: 1.1rem; border-left: 2px solid var(--silver); color: var(--ink-2); font-style: italic; }
.prose blockquote p { margin: 0 0 .6em; }
.prose hr { border: 0; border-top: 1px solid var(--rule); margin-block: 2rem; }

figure { margin: 0; }
.solo { margin-block: 1.75rem; }
.solo img { width: auto; max-height: 85vh; margin-inline: auto; background: var(--silver); }
.gallery { display: flex; flex-wrap: wrap; gap: .5rem; margin-block: 1.75rem; }
.gallery figure { flex-grow: var(--r); flex-basis: calc(var(--r) * 12rem); min-width: 0; }
.gallery::after { content: ""; flex-grow: 1000000; }
.gallery img { width: 100%; background: var(--silver); }
[data-lb] { display: block; cursor: zoom-in; }
.works [data-lb] { position: relative; }
.works .cap { position: absolute; inset: auto 0 0; padding: 1.75rem .65rem .55rem; font: .8rem/1.3 var(--sans); color: #fff; background: linear-gradient(transparent, rgb(0 0 0 / .6)); opacity: 0; transition: opacity .2s; pointer-events: none; }
.works a:hover .cap, .works a:focus-visible .cap { opacity: 1; }
@media (hover: none) { .works .cap { display: none; } }
.works figure { position: relative; }
.works .del { position: absolute; top: .4rem; right: .4rem; width: 2.1rem; height: 2.1rem; display: grid; place-items: center; padding: 0; color: #fff; background: rgb(0 0 0 / .55); border: 0; border-radius: 50%; cursor: pointer; opacity: 0; transition: opacity .2s, background .2s; }
.works figure:hover .del, .works .del:focus-visible { opacity: 1; }
.works .del:hover { background: rgb(170 30 30 / .9); }
.works .del:disabled { opacity: .6; cursor: progress; }
@media (hover: none) { .works .del { opacity: 1; } }
.admin { display: grid; gap: 1rem; max-width: 30rem; margin: 3rem auto 0; padding-top: 1.5rem; border-top: 1px solid var(--rule); font-family: var(--sans); }
.admin form { display: grid; gap: .6rem; }
.admin label { font-size: .85rem; color: var(--ink-2); }
.admin input { width: 100%; padding: .55rem .7rem; font: 1rem var(--sans); color: var(--ink); background: var(--bg-2); border: 1px solid var(--rule); border-radius: 3px; }
.admin .hint { margin: 0; font-size: .8rem; color: var(--ink-2); }
.admin .titles { display: grid; gap: .4rem; margin: 0; padding-left: 1.5rem; }
.admin-link { margin: 3rem 0 0; text-align: center; }
.admin-link button { font: .75rem var(--sans); color: var(--ink-2); background: none; border: 0; text-decoration: underline; text-decoration-color: var(--rule); cursor: pointer; }

.pager { display: flex; justify-content: space-between; gap: 1.5rem; margin-top: 3.5rem; padding-top: 1.25rem; border-top: 1px solid var(--rule); font-family: var(--sans); }
.pager a { display: block; max-width: 20rem; color: var(--ink); text-decoration: none; }
.pager a:hover strong { text-decoration: underline; text-decoration-color: var(--silver); }
.pager span { display: block; font-size: .78rem; color: var(--ink-2); }
.pager strong { font: 500 1rem/1.35 var(--serif); }
.pager .next { margin-left: auto; text-align: right; }

/* Comments */
.comments { max-width: 38rem; margin: 3.5rem auto 0; }
.comments h2 { font: 600 .78rem var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); margin: 0 0 .5rem; }
.comment-list { list-style: none; margin: 0 0 2rem; padding: 0; }
.comment-list li { padding: 1rem 0; border-top: 1px solid var(--rule); }
.comment-list header { font: .8125rem var(--sans); color: var(--ink-2); margin-bottom: .3rem; }
.comment-list .author { color: var(--ink); font-size: .9rem; margin-right: .5rem; }
.comment-list .body p { margin: 0 0 .6em; font-size: 1rem; line-height: 1.6; overflow-wrap: anywhere; }
.comment-form { display: grid; gap: 1rem; padding-top: 1.5rem; border-top: 1px solid var(--rule); font-family: var(--sans); }
.field { display: grid; gap: .35rem; }
.field label { font-size: .85rem; color: var(--ink-2); }
.field input, .field textarea { width: 100%; padding: .65rem .8rem; font: 1rem/1.5 var(--serif); color: var(--ink); background: var(--bg-2); border: 1px solid var(--rule); border-radius: 3px; }
.field textarea { resize: vertical; min-height: 7rem; }
.hp { position: absolute; left: -9999px; }
button.send { justify-self: start; padding: .7rem 1.25rem; font: 600 .9rem var(--sans); color: var(--on-silver); background: var(--silver); border: 0; border-radius: 3px; cursor: pointer; }
button.send:hover { filter: brightness(1.06); }
button.send:disabled { opacity: .6; cursor: progress; }
.status { margin: 0; min-height: 1.4em; font-size: .875rem; color: var(--ink-2); }

.notfound { max-width: 38rem; margin: 4rem auto; }

/* Lightbox */
dialog.lb { width: 100vw; height: 100vh; max-width: none; max-height: none; padding: 0; border: 0; background: transparent; color: #fff; }
dialog.lb::backdrop { background: rgb(10 10 11 / .92); }
.lb img { position: absolute; inset: 0; margin: auto; max-width: 96vw; max-height: 92vh; width: auto; height: auto; object-fit: contain; }
.lb button { position: absolute; width: 2.75rem; height: 2.75rem; display: grid; place-items: center; font: 1.6rem/1 var(--sans); color: #fff; background: rgb(255 255 255 / .12); border: 0; border-radius: 50%; cursor: pointer; }
.lb button:hover { background: rgb(255 255 255 / .22); }
.lb-x { top: .75rem; right: .75rem; }
.lb-p { left: .75rem; top: 50%; translate: 0 -50%; }
.lb-n { right: .75rem; top: 50%; translate: 0 -50%; }
.lb-c { position: absolute; left: 50%; bottom: .75rem; translate: -50% 0; font: .8rem var(--sans); color: #d0d2d6; }
.lb-t { position: absolute; left: 50%; top: 1.1rem; translate: -50% 0; max-width: calc(100vw - 8rem); font: .95rem/1.3 var(--serif); color: #f2f1ee; text-align: center; text-shadow: 0 1px 6px rgb(0 0 0 / .8); }

@media (max-width: 40rem) {
  body { font-size: 1.0625rem; }
  .row { grid-template-columns: 3.5rem 1fr; }
  .thumb { width: 3.5rem; height: 3.5rem; }
  .gallery figure { flex-basis: calc(var(--r) * 8rem); }
  .lb-p, .lb-n { top: auto; bottom: .75rem; translate: none; }
}

/* bio */
.bio { max-width: 34rem; margin: 1rem auto 0; text-align: center; }
.avatar { width: 10rem; height: 10rem; margin: 0 auto 1rem; border-radius: 50%; background: #000; }
.bio-name { margin: 0; font-size: 1.5rem; font-weight: 500; }
.bio-tagline { margin: .35rem 0 2rem; color: var(--ink-2); font: .9rem var(--sans); }
.bio-quote { width: 100%; max-width: 30rem; margin-inline: auto; border-radius: 4px; background: #000; }
.bio-text { max-width: 30rem; margin: 2rem auto 0; text-align: left; }

/* splash: always dark, the avatar's black background blends into the page */
body.splash { height: 100vh; height: 100dvh; color: #f2f1ee; background: #000; }
.splash main { height: 100%; display: flex; flex-direction: column; align-items: center; gap: 1.25rem; padding: 1.5rem 1rem; text-align: center; }
.splash-art { flex: 1 1 0; min-height: 0; width: 100%; max-width: 1024px; object-fit: contain; }
.splash h1 { margin: 0; font-size: clamp(2rem, 7vw, 3.25rem); font-weight: 500; letter-spacing: .03em; text-shadow: 0 1px 12px #000; }
.splash nav { display: flex; width: 100%; max-width: 34rem; gap: clamp(.5rem, 2.5vw, 1rem); }
.door { flex: 1 1 0; min-width: 0; padding: .9rem .4rem; font: 600 clamp(.75rem, 3.6vw, 1rem) var(--sans); letter-spacing: .06em; white-space: nowrap; text-transform: uppercase; color: var(--on-silver); background: var(--silver); border-radius: 3px; text-decoration: none; }
.door:hover { filter: brightness(1.06); }

.empty-section { margin: 3rem 0; text-align: center; color: var(--ink-2); font-family: var(--sans); }
