:root {
  --bg: #0c0c0d;
  --ink: #ecebe7;
  --muted: #8d8c88;
  --gutter: clamp(16px, 4vw, 48px);
  --measure: 34rem;
  --title-size: clamp(40px, 6vw, 88px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Spectral", serif;
  min-height: 100vh;
}
body p, body h1 { margin: 0; }
a { color: inherit; }
.pun { font-weight: 800; }

/* Header */
.top {
  position: relative;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px var(--gutter);
  font-size: 18px;
}
.top a { text-decoration: none; display: inline-block; padding: 10px 0; }
.top .home { font-weight: 500; font-size: inherit; }
.top .about-link { color: var(--muted); }
.top a:hover, .top a:focus-visible { text-decoration: underline; text-underline-offset: 4px; }

.site-main { padding: 0 var(--gutter) 96px; }

/* Home: the intro, then the ash */
.intro { position: relative; z-index: 2; max-width: 32rem; padding: 40px 0 0; pointer-events: none; }
.intro h1 { font-size: clamp(34px, 4vw, 54px); font-weight: 400; line-height: 1; }
.intro p { font-size: 19px; color: var(--muted); margin-top: 10px; }
.intro .verse { font-style: italic; color: #bdbcb7; margin-top: 18px; }
.ash-home { padding-bottom: 0; }
.ash { position: relative; margin: 0 calc(-1 * var(--gutter)); }
.ash-canvas { position: fixed; inset: 0; width: 100vw; height: 100vh; display: none; z-index: 1; }
.ash.live .ash-canvas { display: block; }

/* Without JavaScript (and for search engines) the poems are a plain list of links */
.ash-index { list-style: none; margin: 0; padding: 48px var(--gutter) 96px; columns: 18rem; column-gap: 48px; }
.ash-index li { break-inside: avoid; }
.ash-index a { display: block; padding: 8px 0; font-size: 24px; text-decoration: none; }
.ash-index a:hover { text-decoration: underline; text-underline-offset: 5px; }
.ash-index .n { font-size: 13px; font-weight: 500; color: var(--muted); margin-right: 8px; }
/* With the ash running, the list stays for keyboards and screen readers but is not drawn */
.ash.live .ash-index { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* A poem: the title large, the poem rises out of the ash */
.poem h1, .turn .next .t {
  display: block;
  font-size: var(--title-size);
  font-weight: 300;
  line-height: 1.02;
  letter-spacing: -.015em;
  text-wrap: balance;
  max-width: 14em;
  padding-top: 40px;
}
.turn .next .t { padding-top: 0; }
.pun { display: inline-block; transition: letter-spacing .45s cubic-bezier(.2, .8, .2, 1), margin .45s cubic-bezier(.2, .8, .2, 1); }
.poem h1.split .pun, .turn .next:hover .pun, .turn .next:focus-visible .pun { letter-spacing: .06em; margin: 0 .14em; }
.pun.lead { margin-left: 0 !important; }
.meta, .body { max-width: var(--measure); }
.meta { font-size: 16px; color: var(--muted); margin: 18px 0 40px; }
.body p { font-size: 20px; font-weight: 300; line-height: 1.7; margin-bottom: 1.4em; }
.body .wp-block-spacer:last-child { display: none; }
.rise .w { display: inline-block; transform: translate(var(--ax), var(--ay)) rotate(var(--r)); opacity: .22; color: #8a8985;
  transition: transform 1.1s cubic-bezier(.2, .8, .2, 1), opacity 1.1s, color 1.1s; transition-delay: var(--d); }
.rise.up .w { transform: none; opacity: 1; color: inherit; }

/* Like and share: hairline icons, no boxes until hover */
.react { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 20px; max-width: var(--measure); margin-top: 8px; }
.react button, .react a { display: inline-flex; align-items: center; gap: 8px; min-width: 44px; min-height: 44px; justify-content: center; padding: 0 8px; margin: 0; border: 0; border-radius: 22px; background: none; color: var(--ink); font: inherit; font-size: 16px; cursor: pointer; text-decoration: none; }
.react svg { fill: none; stroke: currentColor; stroke-width: 1.25; stroke-linecap: round; stroke-linejoin: round; transition: fill .25s ease, transform .25s cubic-bezier(.2, .8, .2, 1); }
.react button:hover, .react a:hover { background: rgb(255 255 255 / .08); }
.react :focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.react .like { margin-left: -8px; }
.react .like[aria-pressed="true"] svg { fill: currentColor; transform: scale(1.08); }
.react .count { color: var(--muted); min-width: 1ch; }
.react .share { display: inline-flex; align-items: center; gap: 2px; }
.react .copied { font-size: 15px; color: var(--muted); margin-left: 6px; }
.body .sharedaddy, .body .jp-relatedposts, .body .wpl-likebox, .body #jp-post-flair { display: none !important; }

.turn { margin-top: 88px; }
.turn .next { display: inline-block; text-decoration: none; }
.turn .next > span:first-child { display: block; font-size: 16px; color: var(--muted); margin-bottom: 8px; }
.turn .next:hover { color: #fff; }
.turn .next:focus-visible { outline: 2px solid var(--ink); outline-offset: 6px; }
.all { margin-top: 32px; font-size: 17px; display: flex; flex-wrap: wrap; gap: 0 28px; }
.all a { display: inline-block; padding: 10px 0; text-underline-offset: 4px; }

/* The title lifts and thins as you read down, like smoke */
@supports (animation-timeline: scroll()) {
  .poem h1 { animation: drift linear both; animation-timeline: scroll(root); animation-range: 0 50vh; }
}
@keyframes drift { to { transform: translateY(-.35em); opacity: .4; } }

/* Plain pages, and About: photo left, words right */
.page-main h1, .about h1 {
  font-size: 56px;
  font-weight: 300;
  letter-spacing: -.015em;
  line-height: 1;
  padding: 40px 0 24px;
}
.page-main .body, .about p { font-size: 19px; line-height: 1.6; }
.about p { margin-bottom: 1em; max-width: var(--measure); }
.about { display: grid; grid-template-columns: minmax(0, 22rem) minmax(0, var(--measure)); column-gap: 48px; align-items: start; }
.about h1 { grid-column: 2; }
.about .wp-block-post-content { display: contents; }
.about .wp-block-image { grid-column: 1; grid-row: 1 / span 20; margin: 40px 0 0; }
.about .wp-block-post-content > :not(.wp-block-image) { grid-column: 2; }
.about img { width: 100%; height: auto; display: block; filter: grayscale(1); }

@media (max-width: 720px) {
  .about { grid-template-columns: 1fr; }
  .about h1, .about .wp-block-post-content > :not(.wp-block-image) { grid-column: 1; }
  .about .wp-block-image { grid-row: auto; max-width: 18rem; margin: 0 0 28px; }
  .about h1 { order: -1; }
}


/* Home: Morph. One screen; the canvas draws the titles, the list of links stays for keyboards,
   screen readers and visitors without JavaScript. */
.morph-title { position: absolute; left: var(--gutter); top: 70px; font-size: 17px; font-weight: 400; font-style: italic; color: var(--muted); z-index: 3; }
.morph-canvas, .morph-open, .morph-meta, .morph-dial { display: none; }
.morph-index { list-style: none; margin: 0; padding: 110px 0 96px; columns: 18rem; column-gap: 48px; }
.morph-index li { break-inside: avoid; }
.morph-index a { display: block; padding: 8px 0; font-size: 24px; font-weight: 300; text-decoration: none; }
.morph-index a:hover { text-decoration: underline; text-underline-offset: 5px; }
.morph-index .n { font-size: 13px; font-weight: 500; color: var(--muted); margin-right: 8px; }
.morph-live, .morph-live body { overflow: hidden; height: 100%; }
.morph-live .morph-canvas { display: block; position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 1; }
.morph-live .morph-open { display: block; position: fixed; z-index: 2; }
.morph-live .morph-open:focus-visible { outline: 1px solid var(--ink); outline-offset: 10px; }
.morph-live .morph-meta { display: block; position: fixed; left: 50%; transform: translateX(-50%); z-index: 2; color: var(--muted); font-size: 16px; }
.morph-live .morph-dial { display: flex; position: fixed; left: 0; right: 0; bottom: 18px; z-index: 3; justify-content: center; flex-wrap: wrap; gap: 2px; padding: 0 12px; }
.morph-dial button { background: none; border: 0; color: #6c6b67; font: 500 13px "Spectral", serif; min-width: 28px; min-height: 36px; cursor: pointer; }
.morph-dial button[aria-current="true"] { color: var(--ink); }
.morph-dial button:hover, .morph-dial button:focus-visible { color: var(--ink); outline: none; text-decoration: underline; text-underline-offset: 4px; }
.morph-live .morph-index { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 720px) { .morph-dial button { min-width: 26px; font-size: 12px; } }
