/*
Theme Name: DeVirgiliis
Author: Matt DeVirgiliis
Description: Shore layout for mattdevirgiliis.com. Uses the essays already published on the site.
Version: 1.9.16
Requires at least: 6.0
Text Domain: devirgiliis
*/
:root {
  --ink: #0b1c2c;
  --ink-soft: #1a3347;
  --foam: #f2f6f8;
  --mist: #dce8ee;
  --sea: #2f7d8c;
  --sea-bright: #4fa3b3;
  --sand-cool: #c5d0d6;
  --white: #ffffff;
  --paper: var(--foam);
  --paper-deep: var(--mist);
  --rule: var(--sand-cool);
  --max: 68rem;
  --measure: 38rem;
  --font: 'Newsreader', 'Iowan Old Style', Palatino, Georgia, serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  font-family: var(--font);
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

button,
input,
textarea,
select {
  font: inherit;
}

::selection {
  background: #c5dde3;
}

#root {
  min-height: 100vh;
}

.site-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-main {
  flex: 1;
}

.container {
  width: min(100% - 2.75rem, var(--max));
  margin-inline: auto;
}

.skip-link:focus {
  left: 1rem !important;
  top: 1rem;
  z-index: 80;
  background: var(--paper);
  padding: 0.4rem 0.6rem;
}

/* —— Nav —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}

.nav {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.05rem 0 0.9rem;
}

.nav-brand {
  font-weight: 500;
  font-size: 1.15rem;
  font-variant: small-caps;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.nav-links {
  display: none;
  align-items: baseline;
  gap: 1.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  font-size: 1rem;
  font-style: italic;
  color: var(--ink-soft);
}

.nav-links a:hover,
.nav-links a[aria-current='page'] {
  color: var(--ink);
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 1.15rem;
  height: 1px;
  background: var(--ink);
  position: relative;
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: '';
  position: absolute;
  left: 0;
}

.nav-toggle span::before {
  top: -6px;
}

.nav-toggle span::after {
  top: 6px;
}

.nav-drawer {
  display: none;
  border-top: 1px solid var(--rule);
  padding: 0.85rem 0 1.1rem;
}

.nav-drawer.open {
  display: block;
}

.nav-drawer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.nav-drawer a {
  font-style: italic;
  text-decoration: none;
  font-size: 1.15rem;
}

@media (min-width: 900px) {
  .nav-links {
    display: flex;
  }

  .nav-toggle {
    display: none;
  }

  .nav-drawer {
    display: none !important;
  }
}

/* —— Block buttons —— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.2rem;
  font-weight: 500;
  font-size: 1.05rem;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  background: var(--white);
  color: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 0;
  cursor: pointer;
}

.btn:hover {
  background: var(--paper-deep);
}

.btn-primary,
.btn-ink {
  background: var(--sea);
  color: var(--white);
  border-color: var(--sea);
}

.btn-primary:hover,
.btn-ink:hover {
  background: var(--ink);
  color: var(--white);
  border-color: var(--ink);
}

.btn-secondary {
  background: var(--white);
  color: var(--ink);
  border-color: var(--ink);
}

.btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}

.btn-outline:hover {
  background: var(--white);
}

.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
  border-color: var(--rule);
}

.btn-ghost:hover {
  background: var(--white);
  color: var(--ink);
  border-color: var(--ink);
}

.home-ctas {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.home-ctas .btn-primary {
  padding: 1rem 1.35rem;
  font-size: 1.12rem;
}

.text-link {
  font-size: 1.05rem;
  font-style: italic;
  text-decoration: underline;
  text-underline-offset: 0.22em;
  text-decoration-thickness: 1px;
}

.text-link:hover {
  color: var(--ink-soft);
}

/* —— Opening —— */
.opening {
  padding: 1.35rem 0 0;
}

.opening-grid {
  display: grid;
  gap: 2.75rem;
  align-items: end;
}

@media (min-width: 880px) {
  .opening-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(16rem, 0.78fr);
    gap: 4.5rem;
  }
}

.opening h1 {
  font-weight: 500;
  font-size: clamp(2.7rem, 6.4vw, 4.35rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin: 0 0 1.1rem;
  max-width: 12ch;
}

.lede {
  margin: 0;
  max-width: 34rem;
  font-size: 1.28rem;
  line-height: 1.45;
}

.quiet-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1.35rem;
  margin-top: 1.25rem;
}

.quiet-actions .btn {
  padding: 0.45rem 0.85rem;
  font-size: 1rem;
}

.quiet-actions a:not(.btn) {
  color: var(--ink-soft);
  font-style: italic;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.quiet-actions a:not(.btn):hover {
  color: var(--ink);
  border-bottom-color: var(--sea);
}

.reading-links {
  display: grid;
  gap: 1.15rem;
  margin-top: 2.25rem;
}

.reading-links a {
  display: grid;
  gap: 0.15rem;
  width: fit-content;
  max-width: 28rem;
  text-decoration: none;
  font-size: 1.2rem;
  line-height: 1.25;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 0.35rem;
}

.reading-links a span {
  font-size: 0.98rem;
  font-style: italic;
  color: var(--ink-soft);
  font-weight: 400;
}

.reading-links a.quiet {
  font-size: 1.05rem;
  font-style: italic;
  border-bottom-color: var(--rule);
  color: var(--ink-soft);
}

.reading-links a:hover {
  border-bottom-color: var(--ink);
  color: var(--ink);
}

/* —— Pictures —— */
.plate {
  margin: 0;
}

.plate img {
  width: 100%;
  height: auto;
  object-fit: cover;
  background: var(--paper-deep);
}

.plate figcaption {
  margin-top: 0.55rem;
  font-size: 0.98rem;
  font-style: italic;
  color: var(--ink-soft);
  line-height: 1.4;
}

.opening .plate img {
  aspect-ratio: 4 / 5;
}

.plate-wide {
  margin-top: 2.25rem;
}

.plate-wide img {
  width: 100%;
  aspect-ratio: 3 / 2;
  max-height: 34rem;
}

.art-well {
  padding: 1rem 0 3.5rem;
}

.plate-art {
  width: min(100% - 2.75rem, 76rem);
  margin-inline: auto;
}

.plate-art img {
  width: 100%;
  aspect-ratio: 2 / 1;
  max-height: 38rem;
  object-fit: cover;
}

@media (max-width: 700px) {
  .opening .plate img,
  .plate-wide img,
  .plate-art img {
    aspect-ratio: 4 / 3;
    max-height: none;
  }
}

/* —— Sections —— */
.section {
  padding: 3.75rem 0;
}

.section-rule {
  border-top: 1px solid var(--rule);
}

.section-head {
  display: grid;
  gap: 0.55rem;
  margin-bottom: 1.75rem;
  max-width: var(--measure);
}

.section-kicker,
.dateline {
  margin: 0 0 0.65rem;
  font-size: 1rem;
  font-style: italic;
  color: var(--ink-soft);
}

.section-title {
  font-weight: 500;
  font-size: clamp(1.85rem, 3.5vw, 2.45rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 1.25rem;
}

.section-lede {
  margin: 0;
  color: var(--ink-soft);
  font-size: 1.15rem;
  max-width: var(--measure);
}

.section-muted {
  background: transparent;
  border-top: 1px solid var(--rule);
}

.section-ink {
  background: transparent;
  color: var(--ink);
  border-top: 1px solid var(--rule);
}

.section-ink .section-kicker,
.section-ink .section-lede,
.work-cta p {
  color: var(--ink-soft);
}

/* —— Latest piece —— */
.piece {
  max-width: 52rem;
}

.piece h2 {
  font-weight: 500;
  font-size: clamp(2rem, 4vw, 2.85rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
  max-width: 18ch;
}

.piece h2 a {
  text-decoration: none;
}

.piece h2 a:hover {
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

.piece-text {
  margin: 0;
  max-width: var(--measure);
  font-size: 1.28rem;
  line-height: 1.5;
}

.reading-column {
  max-width: 46rem;
}

.after-list {
  margin: 1.5rem 0 0;
}

/* —— Earlier writing —— */
.index-list {
  display: grid;
  border-top: 1px solid var(--rule);
}

.index-row {
  display: grid;
  gap: 0.35rem;
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
}

@media (min-width: 720px) {
  .index-row {
    grid-template-columns: 14rem 1fr;
    gap: 2rem;
    align-items: baseline;
  }
}

.index-row h3 {
  font-weight: 500;
  font-size: 1.45rem;
  line-height: 1.2;
  margin: 0 0 0.35rem;
}

.index-row p {
  margin: 0;
  color: var(--ink-soft);
  max-width: 42rem;
}

.index-row:hover h3 {
  text-decoration: underline;
  text-underline-offset: 0.14em;
}

/* —— Latest three posts —— */
.posts-home {
  padding-top: 1.75rem;
  padding-bottom: 3rem;
}

.home-columns {
  display: grid;
  gap: 2.75rem;
  align-items: start;
}

@media (min-width: 760px) {
  .home-columns {
    grid-template-columns: minmax(0, 28rem) minmax(14rem, 18rem);
    justify-content: space-between;
    column-gap: 3rem;
  }

  .home-book {
    position: sticky;
    top: 5.75rem;
    justify-self: end;
  }
}

.home-book a {
  display: grid;
  gap: 0.7rem;
  max-width: 16rem;
  color: inherit;
  text-decoration: none;
}

.home-book h2 {
  margin: 0;
  font-weight: 500;
  font-size: 1.45rem;
  line-height: 1.2;
}

.home-book p {
  margin: 0;
  color: var(--ink-soft);
}

.home-book a:hover h2 {
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

.home-book a:hover .btn-primary {
  background: var(--ink);
  border-color: var(--ink);
}

.post-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  max-width: 28rem;
}

.post-item {
  display: grid;
  gap: 0.4rem;
  text-decoration: none;
  color: inherit;
}

.post-item img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  object-position: center;
  margin-bottom: 0.2rem;
  background: var(--paper-deep);
}

.post-title {
  margin: 0;
  font-weight: 500;
  font-size: 1.45rem;
  line-height: 1.2;
  color: var(--ink);
}

.post-item:hover .post-title {
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

.post-meta {
  margin: 0;
  color: var(--ink-soft);
}

.post-excerpt {
  margin: 0;
  color: var(--ink-soft);
}

.home-signal {
  margin-top: 3.25rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--rule);
}

.home-signal-head {
  max-width: var(--measure);
  margin-bottom: 1.5rem;
}

.home-signal h2 {
  font-weight: 500;
  font-size: 1.35rem;
  line-height: 1.2;
  margin: 0 0 0.35rem;
}

.home-signal h2 a {
  color: inherit;
  text-decoration: none;
}

.home-signal h2 a:hover {
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

.home-signal-head p {
  margin: 0;
  color: var(--ink-soft);
}

.home-signal-list {
  margin-top: 1.75rem;
}

.home-signal-list-title {
  font-weight: 500;
  font-size: 1.05rem;
  margin: 0 0 0.85rem;
}

.home-signal-more {
  margin: 1.25rem 0 0;
}

.home-signal-more a {
  font-style: italic;
  text-underline-offset: 0.18em;
}

/* —— Shore chart (nautical map) —— */
.shore-map-shell {
  position: relative;
  border: 1px solid color-mix(in srgb, var(--ink) 18%, var(--rule));
  background:
    radial-gradient(ellipse at 20% 10%, color-mix(in srgb, #d4b896 35%, transparent), transparent 55%),
    radial-gradient(ellipse at 80% 90%, color-mix(in srgb, #8fa9a0 25%, transparent), transparent 50%),
    #e8d9c0;
  box-shadow:
    inset 0 0 0 6px color-mix(in srgb, #c4a574 55%, transparent),
    inset 0 0 40px color-mix(in srgb, #6b4f2e 18%, transparent);
}

.shore-map-shell--home .shore-map-canvas {
  height: min(52vw, 22rem);
  min-height: 16rem;
}

.shore-map-shell--full .shore-map-canvas {
  height: min(62vw, 28rem);
  min-height: 20rem;
}

.shore-map-frame {
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 450;
  color: color-mix(in srgb, var(--ink) 70%, #5c3d1e);
}

.shore-map-corner {
  position: absolute;
  width: 1.35rem;
  height: 1.35rem;
  border-color: currentColor;
  border-style: solid;
  opacity: 0.55;
}

.shore-map-corner--tl {
  top: 0.65rem;
  left: 0.65rem;
  border-width: 2px 0 0 2px;
}

.shore-map-corner--tr {
  top: 0.65rem;
  right: 0.65rem;
  border-width: 2px 2px 0 0;
}

.shore-map-corner--bl {
  bottom: 0.65rem;
  left: 0.65rem;
  border-width: 0 0 2px 2px;
}

.shore-map-corner--br {
  bottom: 0.65rem;
  right: 0.65rem;
  border-width: 0 2px 2px 0;
}

.shore-compass {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 3.25rem;
  height: 3.25rem;
  opacity: 0.72;
  filter: drop-shadow(0 1px 0 color-mix(in srgb, #fff8e8 55%, transparent));
}

.shore-map-canvas {
  width: 100%;
  z-index: 1;
  isolation: isolate;
}

.shore-map-canvas .shore-tiles-parchment {
  filter: sepia(0.35) saturate(0.85) contrast(1.06) brightness(1.03) hue-rotate(-6deg);
}

.shore-map-canvas .leaflet-control-attribution {
  background: color-mix(in srgb, #f3e6cf 88%, transparent);
  color: var(--ink-soft);
  font-size: 0.65rem;
  max-width: 70%;
}

.shore-map-canvas .leaflet-control-zoom a {
  background: #f3e6cf;
  color: var(--ink);
  border-color: color-mix(in srgb, var(--ink) 20%, transparent);
}

.shore-map-canvas .leaflet-control-zoom a:hover {
  background: #ebe0c4;
}

.shore-pin-wrap {
  background: none;
  border: none;
}

.shore-pin {
  display: block;
  width: 28px;
  height: 36px;
  filter: drop-shadow(0 1px 1px color-mix(in srgb, #1a1208 35%, transparent));
  transform-origin: 4px 34px;
  transition: transform 0.18s ease;
}

.shore-pin-flag {
  display: block;
  overflow: visible;
}

.shore-pin-pole {
  fill: none;
  stroke: #3d2914;
  stroke-width: 1.7;
  stroke-linecap: round;
}

.shore-pin-finial {
  fill: #3d2914;
}

.shore-pin-cloth {
  fill: #1a1a1a;
  stroke: #0b0b0b;
  stroke-width: 0.5;
}

.shore-pin-x {
  fill: none;
  stroke: #f2e6cf;
  stroke-width: 1.5;
  stroke-linecap: round;
}

.shore-pin-base {
  fill: color-mix(in srgb, #3d2914 55%, transparent);
}

.shore-pin--surf .shore-pin-cloth {
  fill: var(--sea);
  stroke: color-mix(in srgb, var(--ink) 40%, var(--sea));
}

.shore-pin--brewery .shore-pin-cloth {
  fill: #8b2e1f;
  stroke: #5c1c12;
}

.shore-pin--coffee .shore-pin-cloth {
  fill: #5c3d1e;
  stroke: #3d2914;
}

.shore-pin--town .shore-pin-cloth {
  fill: var(--ink);
  stroke: #061018;
}

.shore-pin--other .shore-pin-cloth {
  fill: #6b5a3e;
  stroke: #3d2914;
}

.shore-pin.is-active {
  transform: scale(1.18);
}

.shore-pin.is-active .shore-pin-cloth {
  animation: shore-flag-wave 1.1s ease-in-out infinite alternate;
  transform-origin: 5px 9px;
}

@keyframes shore-flag-wave {
  from {
    transform: skewY(0deg);
  }
  to {
    transform: skewY(-6deg);
  }
}

.shore-leaflet-popup .leaflet-popup-content-wrapper {
  background: #f6ead2;
  color: var(--ink);
  border-radius: 2px;
  border: 1px solid color-mix(in srgb, #5c3d1e 35%, transparent);
  box-shadow: 0 8px 24px color-mix(in srgb, #1a1208 22%, transparent);
}

.shore-leaflet-popup .leaflet-popup-tip {
  background: #f6ead2;
}

.shore-leaflet-popup .leaflet-popup-content {
  margin: 0.75rem 0.85rem;
  font-family: var(--font);
}

.shore-popup-kind {
  margin: 0 0 0.2rem;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.shore-popup-name {
  margin: 0 0 0.35rem;
  font-weight: 600;
  font-size: 1.05rem;
}

.shore-popup-blurb {
  margin: 0 0 0.65rem;
  font-size: 0.92rem;
  line-height: 1.4;
  color: var(--ink-soft);
}

.shore-popup-link {
  font-style: italic;
  color: var(--sea);
  text-underline-offset: 0.15em;
}

/* —— Location list —— */
.location-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.location-list--compact {
  gap: 0.55rem;
}

@media (min-width: 800px) {
  .location-list:not(.location-list--compact) {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem 1.5rem;
  }
}

.location-item {
  border: none;
  border-top: 1px solid var(--rule);
  background: transparent;
  padding: 0.95rem 0 0.35rem;
  transition: background 0.2s ease;
}

.location-item.is-active {
  border-color: color-mix(in srgb, var(--sea) 45%, var(--rule));
  background: transparent;
}

.location-item.is-active .location-item-select h3 {
  color: var(--sea);
}

.location-item-select {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.location-item-top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 0.75rem;
  margin-bottom: 0.25rem;
}

.location-item-top time {
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.location-kind {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.location-item h3 {
  font-weight: 500;
  font-size: 1.15rem;
  line-height: 1.25;
  margin: 0 0 0.15rem;
}

.location-town {
  margin: 0 0 0.45rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.location-blurb {
  margin: 0 0 0.55rem;
  color: var(--ink-soft);
  font-size: 0.98rem;
}

.location-read {
  font-style: italic;
  font-size: 0.95rem;
  text-underline-offset: 0.15em;
  color: var(--sea);
}

.location-list--compact .location-item {
  padding: 0.8rem 0 0.25rem;
}

.location-list--compact .location-item h3 {
  font-size: 1.05rem;
}

.shore-signal-page .shore-map-shell {
  margin-bottom: 2.5rem;
}

.shore-signal-list-block h2 {
  font-weight: 500;
  font-size: 1.35rem;
  margin: 0 0 0.35rem;
}

.shore-signal-list-lede {
  margin: 0 0 1.25rem;
  color: var(--ink-soft);
  max-width: var(--measure);
}

/* —— Simple rows used on inner pages —— */
.pillar-row {
  display: grid;
  gap: 1.75rem;
  border-top: 1px solid var(--rule);
  padding-top: 1.5rem;
}

@media (min-width: 700px) {
  .pillar-row {
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
  }
}

.pillar h3,
.service-list h3,
.stack-item h3,
.signal-item h3 {
  font-weight: 500;
  font-size: 1.35rem;
  line-height: 1.2;
  margin: 0 0 0.35rem;
}

.pillar p,
.service-list p,
.stack-item p,
.signal-item p,
.about-strip p {
  margin: 0 0 0.75rem;
  color: var(--ink-soft);
}

.pillar a {
  font-style: italic;
  text-underline-offset: 0.18em;
}

.about-strip {
  display: grid;
  gap: 2rem;
  align-items: start;
}

@media (min-width: 800px) {
  .about-strip {
    grid-template-columns: 0.8fr 1.15fr;
    gap: 3.5rem;
  }
}

.about-strip img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.fact-list {
  margin: 0 0 1.25rem;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.45rem;
}

.fact-list li {
  padding-left: 0;
}

.work-cta h2 {
  font-weight: 500;
  font-size: clamp(1.85rem, 4vw, 2.5rem);
  line-height: 1.12;
  margin: 0 0 0.75rem;
}

.work-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.town-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0;
  margin: 0;
  padding: 0;
  list-style: none;
  font-style: italic;
  color: var(--ink-soft);
}

.town-list li {
  font-weight: 400;
}

.town-list li:not(:last-child)::after {
  content: ',';
  margin-right: 0.4rem;
}

.stack-list {
  display: grid;
}

.stack-item {
  display: grid;
  gap: 0.45rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--rule);
  text-decoration: none;
  color: inherit;
  scroll-margin-top: 5.5rem;
}

.stack-item:last-child {
  border-bottom: 1px solid var(--rule);
}

@media (min-width: 720px) {
  .stack-item {
    grid-template-columns: 9rem 1fr auto;
    align-items: baseline;
    gap: 1.5rem;
  }
}

.stack-meta,
.signal-kind {
  margin: 0;
  font-style: italic;
  color: var(--ink-soft);
  font-size: 1rem;
}

.stack-link {
  font-style: italic;
  color: var(--ink-soft);
}

.stack-item:hover h3,
.signal-item:hover h3 {
  text-decoration: underline;
  text-underline-offset: 0.14em;
}

/* —— Inner page title —— */
.page-hero {
  padding: 3.25rem 0 0.5rem;
}

.page-hero h1 {
  font-weight: 500;
  font-size: clamp(2.4rem, 6vw, 3.8rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 0 0 0.85rem;
  max-width: 16ch;
}

.page-hero p {
  margin: 0;
  max-width: 36rem;
  font-size: 1.22rem;
  line-height: 1.45;
  color: var(--ink-soft);
}

.cadence-strip {
  display: grid;
  gap: 2rem;
}

@media (min-width: 760px) {
  .cadence-strip {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }
}

.cadence-title {
  font-weight: 500;
  font-size: 1.6rem;
  line-height: 1.15;
  margin: 0 0 0.45rem;
}

.cadence-strip p {
  margin: 0 0 0.75rem;
  color: var(--ink-soft);
}

.signal-week + .signal-week {
  margin-top: 3rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--rule);
}

.signal-list {
  display: grid;
  border-top: 1px solid var(--rule);
}

.signal-item {
  display: grid;
  gap: 0.25rem;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
  color: inherit;
}

@media (min-width: 720px) {
  .signal-item {
    grid-template-columns: 8rem 1fr;
    gap: 1.25rem;
    align-items: baseline;
  }
}

.signal-source {
  margin: 0 0 0.25rem !important;
  font-style: italic;
}

/* —— Contact —— */
.contact-layout {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 860px) {
  .contact-layout {
    grid-template-columns: 0.9fr 1.1fr;
    gap: 4rem;
    align-items: start;
  }
}

.service-list {
  display: grid;
  gap: 1.35rem;
  margin: 1.25rem 0 0;
}

.contact-form {
  display: grid;
  gap: 1.15rem;
}

.field {
  display: grid;
  gap: 0.3rem;
}

.field label {
  font-style: italic;
  color: var(--ink-soft);
  font-size: 1rem;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.55rem 0;
  border: none;
  border-bottom: 1px solid var(--rule);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
}

.field textarea {
  min-height: 8rem;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-bottom-color: var(--ink);
}

.form-note,
.direct-email {
  margin: 0.5rem 0 0;
  color: var(--ink-soft);
  font-size: 1rem;
}

.direct-email a,
.form-note a {
  color: var(--ink);
}

.form-success {
  padding-top: 0.25rem;
  border-top: 1px solid var(--rule);
}

/* —— FAQ —— */
.faq {
  display: grid;
  max-width: var(--measure);
}

.faq details {
  border-top: 1px solid var(--rule);
  padding: 0.9rem 0;
}

.faq details:last-child {
  border-bottom: 1px solid var(--rule);
}

.faq summary {
  font-size: 1.15rem;
  cursor: pointer;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq p {
  margin: 0.55rem 0 0;
  color: var(--ink-soft);
}

/* —— Footer —— */
.site-footer {
  background: var(--paper);
  color: var(--ink-soft);
  padding: 2.5rem 0 2rem;
  margin-top: auto;
  border-top: 1px solid var(--rule);
}

.footer-grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 700px) {
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

.site-footer h2 {
  font-weight: 500;
  font-size: 1.25rem;
  font-variant: small-caps;
  letter-spacing: 0.04em;
  color: var(--ink);
  margin: 0 0 0.55rem;
}

.site-footer p {
  margin: 0 0 0.85rem;
  max-width: 28rem;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.3rem;
}

.footer-links a {
  text-decoration: none;
  font-style: italic;
}

.footer-links a:hover {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.footer-bottom {
  margin-top: 2.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  font-size: 0.98rem;
  font-style: italic;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* —— WordPress additions —— */
.skip-link {
  position: absolute;
  left: -999px;
}

.nav-links .current-menu-item > a,
.nav-drawer .current-menu-item > a {
  color: var(--ink);
}

.home-stage {
  display: grid;
  gap: 2.5rem;
  align-items: start;
}

.post-feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.85rem 2.5rem;
  align-items: center;
  min-width: 0;
}

@media (min-width: 760px) {
  .post-feature {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.2fr);
    gap: 0 2.75rem;
  }
}

/* Homepage posts: contained split (not full-bleed) */
.home-stage .post-figure {
  display: block;
  grid-column: auto;
  width: 100%;
  max-width: none;
  margin: 0;
  min-width: 0;
}

.home-stage .post-figure img {
  width: 100%;
  max-width: none;
  height: auto;
  object-fit: contain;
  object-position: center;
  background: var(--paper-deep);
}

@media (min-width: 760px) {
  .home-stage .post-figure img {
    height: auto;
    max-height: none;
  }

  .home-stage .post-copy .post-title {
    font-size: clamp(1.65rem, 2.5vw, 2.15rem);
  }

  .home-stage .post-copy .post-excerpt {
    font-size: 1.1rem;
    line-height: 1.45;
  }
}

.post-figure,
.bleed {
  grid-column: 1 / -1;
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.post-figure img,
.bleed img {
  width: 100%;
  max-width: none;
  height: min(78vh, 42rem);
  object-fit: cover;
  object-position: center;
  background: var(--paper-deep);
}

.entry-content .wp-block-image,
.entry-content figure:has(img.size-full),
.entry-content figure:has(img.size-large),
.entry-content img.size-full,
.entry-content img.size-large {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.entry-content .wp-block-image img,
.entry-content figure img.size-full,
.entry-content figure img.size-large {
  width: 100%;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
  height: min(78vh, 42rem);
  object-fit: cover;
  object-position: center;
}

.entry-content > img.size-full,
.entry-content > img.size-large,
.entry-content p > img.size-full,
.entry-content p > img.size-large {
  height: min(78vh, 42rem);
  object-fit: cover;
  object-position: center;
}

/* Phones: keep the photo’s real shape so wide shots (e.g. surf) aren’t side-cropped */
@media (max-width: 700px) {
  .bleed img,
  .entry-content .wp-block-image img,
  .entry-content figure img.size-full,
  .entry-content figure img.size-large,
  .entry-content > img.size-full,
  .entry-content > img.size-large,
  .entry-content p > img.size-full,
  .entry-content p > img.size-large {
    height: auto;
    max-height: none;
    object-fit: contain;
    object-position: center;
  }

  .home-stage .post-figure img {
    height: auto;
    object-fit: contain;
  }
}

.post-copy {
  display: grid;
  gap: 0.45rem;
  max-width: 40rem;
  margin: 0;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.home-stage .post-copy {
  max-width: 36rem;
}

.post-copy:hover .post-title {
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

.entry-content {
  max-width: var(--measure);
}

.entry-content > *:first-child {
  margin-top: 0;
}

.entry-content p,
.entry-content ul,
.entry-content ol,
.entry-content blockquote {
  margin: 0 0 1rem;
}

.entry-content h2,
.entry-content h3 {
  font-weight: 500;
  line-height: 1.2;
  margin: 1.75rem 0 0.5rem;
}

.entry-content a {
  text-decoration: underline;
  text-underline-offset: 0.14em;
}

.entry-content blockquote {
  margin-left: 0;
  padding-left: 1rem;
  border-left: 1px solid var(--rule);
  color: var(--ink-soft);
}

#breakfast,
#unbound,
#fiction {
  scroll-margin-top: 5.5rem;
  margin-top: 2.75rem;
}

.posts-nav {
  margin-top: 2rem;
}

.posts-nav a {
  font-style: italic;
}

/* —— Smoother layout —— */
body {
  line-height: 1.65;
}

.site-header {
  border-bottom-color: transparent;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: blur(14px);
}

.nav-links a,
.nav-drawer a,
.footer-links a,
.quiet-actions a,
.post-title,
.stack-item h3 {
  transition: color 0.2s ease;
}

.nav-links a[aria-current='page'],
.nav-links .current-menu-item > a,
.nav-drawer a[aria-current='page'],
.nav-drawer .current-menu-item > a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--sea);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.38em;
}

.btn,
.btn-primary,
.btn-ink,
.quiet-actions .btn {
  display: inline;
  width: auto;
  padding: 0;
  background: none;
  border: none;
  border-radius: 0;
  color: var(--sea);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.32em;
  text-decoration-color: var(--sea-bright);
}

.btn:hover,
.btn-primary:hover,
.btn-ink:hover {
  background: none;
  border: none;
  color: var(--ink);
}

.quiet-actions {
  gap: 0.35rem 1.65rem;
  margin-top: 1.65rem;
}

.opening-title {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.35rem 1.75rem;
}

.opening-title h1 {
  margin-bottom: 0;
}

.book-note {
  display: grid;
  gap: 0.2rem;
  margin: 0.2rem 0 0 auto;
  max-width: 13.5rem;
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.3;
  text-align: right;
  text-decoration: none;
}

.book-note strong {
  font-weight: 500;
  font-size: 1.05rem;
  color: var(--ink);
}

.book-note em {
  font-style: italic;
}

.book-note span {
  color: var(--sea);
  font-style: normal;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.28em;
  text-decoration-color: var(--sea-bright);
}

.book-note:hover strong,
.book-note:hover span {
  color: var(--ink);
}

.entry-content .wp-block-image img,
.entry-content figure img.size-full,
.entry-content figure img.size-large,
.bleed img {
  height: min(64vh, 34rem);
  -webkit-mask-image: linear-gradient(to bottom, #000 82%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 82%, transparent 100%);
}

@media (max-width: 700px) {
  .bleed img,
  .entry-content .wp-block-image img,
  .entry-content figure img.size-full,
  .entry-content figure img.size-large {
    height: auto;
    max-height: none;
    object-fit: contain;
  }
}

.site-footer .btn,
.site-footer .btn-primary {
  text-align: left;
  justify-self: start;
}

.stack-item,
.stack-item:last-child,
.signal-item {
  display: block;
  border: none;
  padding: 1.35rem 0 0.15rem;
}

.signal-list {
  border-top: none;
}

.stack-link {
  color: var(--sea);
}

.site-footer {
  border-top: none;
  padding-top: 1rem;
}

.footer-grid {
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
}

@media (min-width: 700px) {
  .footer-grid {
    grid-template-columns: none;
  }
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.35rem;
}

.footer-bottom {
  border-top: none;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-bottom-color: var(--sea);
}

.page-hero .page-answer {
  max-width: 40rem;
}

.published-work {
  padding-top: 1.5rem;
}

.pub-feature {
  display: grid;
  gap: 1.5rem 2.5rem;
  align-items: start;
  margin-bottom: 2.75rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--rule);
}

@media (min-width: 720px) {
  .pub-feature {
    grid-template-columns: minmax(9rem, 12rem) minmax(0, 1fr);
  }
}

.pub-cover {
  display: block;
  max-width: 12rem;
  text-decoration: none;
}

.pub-cover img {
  width: 100%;
  height: auto;
  background: var(--paper-deep);
}

.pub-feature-copy {
  display: grid;
  gap: 0.45rem;
  max-width: 36rem;
}

.pub-feature-copy h2 {
  margin: 0;
  font-weight: 500;
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  line-height: 1.15;
}

.pub-feature-copy h2 a,
.pub-row h2 a {
  color: inherit;
  text-decoration: none;
}

.pub-feature-copy h2 a:hover,
.pub-row h2 a:hover {
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

.pub-kicker {
  margin: 0;
  font-size: 0.92rem;
  font-style: italic;
  color: var(--ink-soft);
}

.pub-meta {
  margin: 0;
  font-size: 0.98rem;
  color: var(--ink-soft);
}

.pub-feature-copy > p,
.pub-row > p {
  margin: 0;
  color: var(--ink-soft);
}

.pub-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.55rem 1.35rem;
  margin-top: 0.45rem !important;
}

.pub-actions a:not(.btn) {
  font-style: italic;
  color: var(--ink);
}

.pub-series {
  display: grid;
  gap: 2rem;
  margin-bottom: 2.75rem;
}

@media (min-width: 760px) {
  .pub-series {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem 3rem;
  }
}

.pub-row {
  display: grid;
  gap: 0.4rem;
  align-content: start;
}

.pub-row h2 {
  margin: 0;
  font-weight: 500;
  font-size: 1.45rem;
  line-height: 1.2;
}

.pub-also {
  margin-bottom: 2.75rem;
  max-width: 40rem;
}

.pub-also p {
  margin: 0;
  color: var(--ink-soft);
}

.pub-also a {
  color: var(--ink);
}

.pub-faq {
  max-width: 42rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--rule);
}

.pub-faq-list {
  margin: 0;
  display: grid;
  gap: 1.35rem;
}

.pub-faq-item dt {
  margin: 0 0 0.3rem;
  font-weight: 500;
  font-size: 1.12rem;
  line-height: 1.3;
  color: var(--ink);
}

.pub-faq-item dd {
  margin: 0;
  color: var(--ink-soft);
}

/* —— Single posts (essays) —— */
.single-post .single-hero {
  padding-bottom: 0.25rem;
}

.single-post .single-series {
  margin: 0 0 0.45rem;
  font-size: 0.92rem;
  font-style: italic;
}

.single-post .single-series a {
  color: var(--sea);
  text-decoration: underline;
  text-underline-offset: 0.28em;
  text-decoration-color: var(--sea-bright);
}

.single-post .single-series a:hover {
  color: var(--ink);
}

.single-post .single-date {
  margin: 0 0 0.55rem;
  font-size: 0.98rem;
  color: var(--ink-soft);
}

.single-post .page-hero h1 {
  max-width: min(36rem, 100%);
  margin-bottom: 0;
}

.single-body {
  padding-top: 1.35rem;
  padding-bottom: 3rem;
}

.single-post .single-figure {
  margin: 0 0 2rem;
  max-width: var(--measure);
}

.single-post .single-figure img {
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center;
  background: var(--paper-deep);
}

.single-post .single-content {
  max-width: var(--measure);
  font-size: 1.125rem;
  line-height: 1.65;
}

.single-post .single-content > p:first-child {
  font-size: 1.2rem;
  line-height: 1.55;
}

/* In-post images: full column width, no legacy align-left floats. */
.single-post .single-content .wp-block-image,
.single-post .single-content figure:has(img),
.single-post .single-content .wp-caption,
.single-post .single-content img.size-full,
.single-post .single-content img.size-large {
  float: none !important;
  clear: both;
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 1.75rem 0;
  margin-left: 0 !important;
  margin-right: 0 !important;
  text-align: center;
}

.single-post .single-content .alignleft,
.single-post .single-content .alignright,
.single-post .single-content .aligncenter,
.single-post .single-content .alignwide,
.single-post .single-content .alignfull {
  float: none !important;
  width: 100%;
  max-width: 100%;
  margin-left: 0 !important;
  margin-right: 0 !important;
  text-align: center;
}

.single-post .single-content .wp-block-image img,
.single-post .single-content figure img,
.single-post .single-content .wp-caption img,
.single-post .single-content p img,
.single-post .single-content img.size-full,
.single-post .single-content img.size-large {
  float: none !important;
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: none;
  margin-inline: auto;
  object-fit: contain;
  object-position: center;
  -webkit-mask-image: none;
  mask-image: none;
  background: var(--paper-deep);
}

.single-post--has-hero .single-content > .wp-block-image:first-child,
.single-post--has-hero .single-content > figure.wp-block-image:first-child,
.single-post--has-hero .single-content > p:first-child:has(> img:only-child) {
  display: none;
}

.single-post .single-content figcaption,
.single-post .single-content .wp-element-caption,
.single-post .single-content .wp-caption-text {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 0.55rem 0 0;
  padding: 0;
  overflow: visible;
  white-space: normal;
  overflow-wrap: anywhere;
  font-size: 0.95rem;
  line-height: 1.45;
  font-style: italic;
  color: var(--ink-soft);
  text-align: center;
}

.single-post .single-content p:has(> img) {
  float: none;
  clear: both;
  margin: 1.75rem 0;
  text-align: center;
}

.single-post .single-content p:has(> img) + p {
  clear: both;
  max-width: 100%;
  text-align: center;
  font-size: 0.95rem;
  font-style: italic;
  color: var(--ink-soft);
}

.single-post .single-end {
  margin-top: 2.75rem;
  padding-top: 1.35rem;
  border-top: 1px solid var(--rule);
  max-width: var(--measure);
}

.single-post .single-end a {
  font-style: italic;
  color: var(--sea);
  text-decoration: underline;
  text-underline-offset: 0.32em;
  text-decoration-color: var(--sea-bright);
}

.single-post .single-end a:hover {
  color: var(--ink);
}

/* Jetpack chrome — keep comments, hide share/like/related on posts. */
.single-post .sharedaddy,
.single-post .wp-block-jetpack-sharing-buttons,
.single-post #jp-post-flair,
.single-post .jp-relatedposts,
.single-post .sd-sharing,
.single-post .post-likes,
.single-post .wpl-likebox,
.single-post div#likes-other-gravatars,
.single-post h3.sd-title {
  display: none !important;
}
