:root {
  --bg: #d3d6db;
  --ink: #121418;
  --muted: #424750;
  --thin: 200;
  --gutter: clamp(16px, 4vw, 56px);
  --measure: 34rem;
  --wall-size: clamp(40px, 6.2vw, 96px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Newsreader", serif;
  font-variation-settings: "opsz" 16;
  min-height: 100vh;
}
body p, body h1 { margin: 0; }
a { color: inherit; }
.pun { font-weight: 800; }

/* Header */
.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px var(--gutter);
  font-size: 17px;
}
.top a { text-decoration: none; display: inline-block; padding: 10px 0; }
.top .home { font-weight: 700; font-size: inherit; }
.top a:hover, .top a:focus-visible { text-decoration: underline; text-underline-offset: 4px; }

.site-main { padding: 0 var(--gutter) 96px; }

/* The wall */
.intro { max-width: 40rem; padding: 40px 0 48px; }
.intro h1 { font-size: 22px; font-weight: 700; }
.intro p { font-size: 19px; color: var(--muted); margin-top: 4px; }
.intro .pick { color: var(--ink); margin-top: 20px; }

.wall .wp-block-post-template {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .08em .42em;
  font-size: var(--wall-size);
  font-weight: var(--thin);
  font-variation-settings: "opsz" 72;
  line-height: 1.02;
  letter-spacing: -.02em;
  counter-reset: poem;
}
.wall .wp-block-post { white-space: nowrap; max-width: 100%; margin: 0; counter-increment: poem; }
.wall .wp-block-post-title { font: inherit; letter-spacing: inherit; margin: 0; }
.wall a { text-decoration: none; display: inline-block; }
.wall a::before {
  content: counter(poem);
  display: inline-block;
  font-size: max(12px, .2em);
  font-weight: 400;
  letter-spacing: 0;
  color: var(--muted);
  vertical-align: top;
  margin-right: .35em;
  position: relative;
  top: .55em;
  font-variation-settings: "opsz" 16;
}
.wall a.wrap { white-space: normal; display: flex; align-items: flex-start; }
.wall a.wrap .t { text-wrap: balance; }
.wall a:focus-visible { outline: 2px solid var(--ink); outline-offset: 6px; }
.wall a:hover { color: #000; }

/* Puns pull apart on hover, focus, a first tap, and when a poem opens */
.pun { display: inline-block; transition: letter-spacing .45s cubic-bezier(.2, .8, .2, 1), margin .45s cubic-bezier(.2, .8, .2, 1); }
.wall a:hover .pun, .wall a:focus-visible .pun, .wall a.split .pun,
.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; }

/* A poem: the title stays at wall size, the poem at reading size */
.poem h1, .turn .next .t {
  display: block;
  font-size: var(--wall-size);
  font-weight: var(--thin);
  font-variation-settings: "opsz" 72;
  line-height: 1.02;
  letter-spacing: -.02em;
  text-wrap: balance;
  max-width: 14em;
  padding-top: 40px;
}
.turn .next .t { padding-top: 0; }
.meta, .body { max-width: var(--measure); }
.meta { font-size: 16px; color: var(--muted); margin: 18px 0 40px; }
.body p { font-size: 20px; line-height: 1.65; margin-bottom: 1.4em; }
.body .wp-block-spacer:last-child { display: none; }

/* Like and share: hairline icons in the wall's ink, 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: #c4c8ce; }
.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: #000; }
.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; }

/* Smoke: the title lifts and thins as you read down */
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    .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: var(--thin);
  font-variation-settings: "opsz" 72;
  letter-spacing: -.02em;
  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) {
  .wall .wp-block-post-template { flex-direction: column; gap: .26em; }
  .wall a { display: flex; align-items: flex-start; }
  .wall a::before { flex: none; width: 1.8rem; margin-right: 0; }
  .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; }
}

@media (prefers-reduced-motion: reduce) {
  .pun { transition: none; }
}
