/* ================================================================
   STEVEN TROTTER BLOG — main.css
   WCAG 2.2 AAA compliant
   Contrast verified:
     Dark  primary:   #f0ede8 on #221e15 → ~12:1
     Dark  secondary: #a8a5a0 on #221e15 → ~6.8:1 — used only for UI labels
     Light primary:   #0c0b09 on #f0ede8 → ~17:1
     Light secondary: #4e4b48 on #f0ede8 → ~7.5:1
================================================================ */

/* ── Tokens ──────────────────────────────────────────────────── */
:root {
  --bg:      #221e15;
  --bg-2:    #2d2719;
  --text:    #f0ede8;
  --text-2:  #b0ada8;
  --text-3:  #5a5244;
  --border:  #3d3527;
  --focus:   #f0ede8;
  --accent:  #dab228;
}
/* White light theme — pure B&W, maximum contrast, no warmth */
[data-theme="light"] {
  --bg:      #ffffff;
  --bg-2:    #f0f0f0;
  --text:    #000000;
  --text-2:  #444444;
  --text-3:  #aaaaaa;
  --border:  #dddddd;
  --focus:   #000000;
  --accent:  #000000;
}

/* Brown dark theme (explicit - same as :root default) */
[data-theme="brown"] {
  --bg:      #221e15;
  --bg-2:    #2d2719;
  --text:    #f0ede8;
  --text-2:  #b0ada8;
  --text-3:  #5a5244;
  --border:  #3d3527;
  --focus:   #f0ede8;
  --accent:  #dab228;
}
/* Black dark theme — pure B&W, maximum contrast, no warmth */
[data-theme="black"] {
  --bg:      #000000;
  --bg-2:    #111111;
  --text:    #ffffff;
  --text-2:  #aaaaaa;
  --text-3:  #444444;
  --border:  #222222;
  --focus:   #ffffff;
  --accent:  #ffffff;
}

/* ── Reset ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  font-size: 100%;
  scroll-behavior: smooth;
  overflow-x: clip; /* prevents horizontal scroll from full-bleed elements */
}
body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background 0.2s ease, color 0.2s ease;
}

/* Override plugin-injected body backgrounds */
html[data-theme="brown"] body { background-color: #221e15 !important; }
html[data-theme="black"] body { background-color: #000000 !important; }
html[data-theme="light"] body { background-color: #ffffff !important; }
img { display: block; max-width: 100%; height: auto; }
ul  { list-style: none; }
a   { color: var(--text); text-underline-offset: 3px; text-decoration-thickness: 1px; }

/* ── Accessibility ───────────────────────────────────────────── */
.skip-link {
  position: absolute; top: -9999px; left: 1rem;
  background: var(--text); color: var(--bg);
  font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  text-decoration: none; padding: 0.5rem 1rem; z-index: 9999;
}
.skip-link:focus { top: 0; outline: 3px solid var(--focus); }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 2px;
}
:focus:not(:focus-visible) { outline: none; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border-width: 0;
}

/* ── Layout ──────────────────────────────────────────────────── */
.wrap      { max-width: 1160px; margin: 0 auto; padding: 0 2.5rem; }
.wrap--mid { max-width: 900px;  margin: 0 auto; padding: 0 2.5rem; }
.wrap--sm  { max-width: 720px;  margin: 0 auto; padding: 0 2.5rem; }

/* ── Header ──────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  z-index: 200;
  transition: background 0.2s ease;
}
/* Account for WP admin bar */
.admin-bar .site-header { top: 32px; }
@media screen and (max-width: 782px) {
  .admin-bar .site-header { top: 46px; }
}

.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 3.25rem;
}

.site-logo {
  display: flex; align-items: center; gap: 0.5rem;
  text-decoration: none; color: var(--text);
  transition: opacity 0.15s;
}
.site-logo:hover { opacity: 0.6; text-decoration: none; }
/* Logo bee - gold in all dark modes, matches brand */
:root .site-logo__bee,
[data-theme="brown"] .site-logo__bee,
[data-theme="black"] .site-logo__bee { color: var(--accent); width: 1.5rem; height: 1.3rem; flex-shrink: 0; }
[data-theme="light"] .site-logo__bee { color: var(--text); }

.site-logo__name {
  font-family: 'Caveat', cursive; font-weight: 700;
  font-size: 1.375rem; line-height: 1;
}

/* Active nav item uses accent underline in dark mode */
.site-nav .site-nav__list .current-menu-item > a,
.site-nav .site-nav__list .current-menu-ancestor > a,
.site-nav .site-nav__list .current_page_item > a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

/* Uploaded logo switching */
.site-logo__img {
  height: 32px; width: auto; display: block; flex-shrink: 0;
}
.site-logo__img--dark  { display: block; }
.site-logo__img--light { display: none; }
[data-theme="light"] .site-logo__img--dark  { display: none; }
[data-theme="light"] .site-logo__img--light { display: block; }
.site-logo__img--only  { display: block !important; }

.site-nav { display: flex; align-items: center; gap: 0.125rem; }
.site-nav .site-nav__list {
  display: flex; align-items: center; list-style: none;
  margin: 0; padding: 0;
}
.site-nav .site-nav__list li { margin: 0; padding: 0; }
.site-nav .site-nav__list a,
.site-nav .site-nav__list a:visited {
  font-size: 0.8125rem; font-weight: 500;
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  padding: 0.375rem 0.625rem;
  border-radius: 2px;
  transition: opacity 0.15s;
  display: block;
}
.site-nav .site-nav__list a:hover { opacity: 0.6; text-decoration: underline; }

/* Three-dot theme switcher */
.theme-switcher {
  display: flex; align-items: center; gap: 0;
  margin-left: 0.375rem;
}
.theme-dot {
  background: none; border: none; cursor: pointer;
  padding: 0.375rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  transition: background 0.15s;
}
.theme-dot:hover { background: rgba(128,128,128,0.12); }
.theme-dot__circle {
  width: 0.6875rem; height: 0.6875rem;
  border-radius: 50%; display: block; flex-shrink: 0;
  transition: transform 0.15s;
}
.theme-dot:hover .theme-dot__circle { transform: scale(1.2); }
.theme-dot--brown .theme-dot__circle {
  background: #3d3020;
  box-shadow: 0 0 0 1.5px #7a6a54;
}
.theme-dot--black .theme-dot__circle {
  background: #0d0c0a;
  box-shadow: 0 0 0 1.5px #555250;
}
.theme-dot--white .theme-dot__circle {
  background: #ffffff;
  box-shadow: 0 0 0 1.5px #a8a5a0;
}
/* Active: gap + outer ring using background as spacer */
.theme-dot[aria-pressed="true"] .theme-dot__circle {
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--text);
}

/* Hamburger - hidden on desktop */
.nav-toggle { display: none; }

/* Footer navigation */
.site-footer .footer-nav__list {
  display: flex; gap: 1.5rem; list-style: none;
  margin: 0; padding: 0;
}
.site-footer .footer-nav__list a {
  color: var(--text); text-decoration: none; font-size: inherit;
}
.site-footer .footer-nav__list a:hover { color: var(--text-2); }

/* ── Hero (home.php latest post) ─────────────────────────────── */
.hero {
  padding: 4rem 0 3.5rem;
  border-bottom: 1px solid var(--border);
}
.hero__inner {
  display: grid;
  grid-template-columns: 1fr 38%;
  gap: 0 3rem;
  align-items: end;
}
.hero__eyebrow {
  font-family: 'DM Mono', monospace;
  font-size: 0.625rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-2); display: block; margin-bottom: 1.5rem;
}
.hero__cat-link {
  color: var(--text-2);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.hero__cat-link:hover { color: var(--text); }
.hero__title {
  font-size: clamp(2.5rem, 6vw, 5.5rem);
  font-weight: 700; line-height: 0.96;
  letter-spacing: -0.03em; color: var(--text);
  text-decoration: none; display: block;
  max-width: 14ch; margin-bottom: 2rem;
  transition: opacity 0.2s;
}
.hero__title:hover { opacity: 0.65; text-decoration: none; }
.hero__meta {
  font-family: 'DM Mono', monospace;
  font-size: 0.6875rem; color: var(--text-2);
  display: flex; gap: 1.5rem;
}
.hero__image-wrap {
  aspect-ratio: 4 / 5; overflow: hidden; align-self: stretch;
}
.hero__image-wrap img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.6s ease;
}
.hero:hover .hero__image-wrap img { transform: scale(1.02); }

/* ── Post index list ─────────────────────────────────────────── */
.post-index { padding: 0 0 5rem; }
.post-index__header {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 1.75rem 0 0; margin-bottom: 0;
}
.post-index__label {
  font-family: 'DM Mono', monospace;
  font-size: 0.625rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-2);
}

/* Individual post list item - used on home, archive, search */
.post-item {
  display: grid;
  grid-template-columns: 3.25rem 1fr auto 5.5rem;
  gap: 0 1.75rem;
  align-items: center;
  padding: 1.375rem 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none; color: var(--text);
}
.post-item:first-of-type { border-top: 1px solid var(--border); margin-top: 1.25rem; }
.post-item:hover { text-decoration: none; }

.post-item__num {
  font-size: 2.75rem; font-weight: 200; line-height: 1;
  color: var(--text-3); text-align: right;
  font-variant-numeric: tabular-nums;
  transition: color 0.25s;
  user-select: none;
}
.post-item:hover .post-item__num { color: var(--text-2); }

.post-item__info { min-width: 0; }
.post-item__title {
  font-size: 1.125rem; font-weight: 600; line-height: 1.3;
  margin-bottom: 0.3rem; transition: opacity 0.15s;
}
.post-item:hover .post-item__title { opacity: 0.65; }
.post-item__cat {
  font-family: 'DM Mono', monospace;
  font-size: 0.625rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-2);
}

.post-item__date {
  font-family: 'DM Mono', monospace;
  font-size: 0.6875rem; color: var(--text-2);
  white-space: nowrap; text-align: right;
}

.post-item__thumb {
  width: 5.5rem; aspect-ratio: 4 / 3; overflow: hidden;
}
.post-item__thumb img {
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(100%);
  transition: filter 0.45s ease, transform 0.45s ease;
}
.post-item:hover .post-item__thumb img {
  filter: none;
  transform: scale(1.08);
}

.post-pagination {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 2rem; margin-top: 0.5rem;
  border-top: 1px solid var(--border);
}
.post-pagination a {
  font-size: 0.8125rem; font-weight: 500; color: var(--text);
  text-decoration: underline; text-underline-offset: 3px;
}
.post-pagination a:hover { opacity: 0.6; }
.post-pagination span {
  font-family: 'DM Mono', monospace;
  font-size: 0.625rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-2);
}

/* ── Archive page heading ─────────────────────────────────────── */
.archive-page { padding: 4rem 0 5rem; }
.archive-heading {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 700; letter-spacing: -0.03em; line-height: 1.0;
  margin-bottom: 3rem;
}

/* ── Search form ─────────────────────────────────────────────── */
.search-form {
  display: flex; align-items: stretch;
  border-bottom: 2px solid var(--text);
  margin-bottom: 2.5rem;
}
.search-input {
  flex: 1; background: transparent; border: none;
  font-family: 'Outfit', sans-serif; font-size: 1.125rem; font-weight: 400;
  color: var(--text); padding: 0.75rem 0; outline: none;
}
.search-input::placeholder { color: var(--text-2); }
.search-form:focus-within { border-color: var(--text); }
.search-input:focus { outline: none; }
.search-submit {
  background: none; border: none; cursor: pointer;
  font-family: 'DM Mono', monospace; font-size: 0.6875rem;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text); padding: 0.75rem 0 0.75rem 1rem;
  transition: opacity 0.15s;
}
.search-submit:hover { opacity: 0.6; }
.search-submit:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

/* ── Single post ─────────────────────────────────────────────── */
.post-wrap { padding: 3rem 0 2rem; }

.back {
  display: inline-block; font-size: 0.8125rem; font-weight: 500;
  color: var(--text-2);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  margin-bottom: 3rem;
  transition: color 0.15s;
}
.back:hover { color: var(--text); text-decoration: underline; }

.post-hd { margin-bottom: 2.5rem; }
.post-hd__cat {
  font-family: 'DM Mono', monospace;
  font-size: 0.625rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-2);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  display: inline-block; margin-bottom: 1.125rem;
}
.post-hd__cat:hover { color: var(--text); }
.post-hd__title {
  font-size: clamp(2.25rem, 5.5vw, 4rem);
  font-weight: 700; line-height: 1.0; letter-spacing: -0.03em;
  margin-bottom: 1.75rem;
}
.post-hd__meta {
  font-family: 'DM Mono', monospace;
  font-size: 0.6875rem; color: var(--text-2);
  display: flex; flex-wrap: wrap; gap: 0.25rem 1.75rem;
  padding-bottom: 2.5rem; border-bottom: 1px solid var(--border);
}

/* Full-bleed featured image */
.post-hero-wrap {
  width: 100vw;
  position: relative; left: 50%; right: 50%;
  margin-left: -50vw; margin-right: -50vw;
  aspect-ratio: 16 / 8; overflow: hidden;
  margin-bottom: 3.5rem;
}
.post-hero-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ── Entry content (post body) ───────────────────────────────── */
/*
   !important on font-family and color is necessary here because
   Spectra injects its own global style rules for block content
   that would otherwise override our theme styles.
*/
.entry-content { max-width: 64ch; padding-bottom: 1rem; }

.entry-content,
.entry-content p,
.entry-content li,
.entry-content td,
.entry-content th,
.entry-content dd,
.entry-content dt {
  font-family: 'Outfit', sans-serif !important;
  color: var(--text) !important;
}

.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
  font-family: 'Outfit', sans-serif !important;
  color: var(--text) !important;
  font-weight: 700 !important;
}

.entry-content p,
.entry-content li { font-size: 1.0625rem; line-height: 1.85; }
.entry-content p { margin-bottom: 1.625rem; }

.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
  line-height: 1.2; letter-spacing: -0.02em;
}
.entry-content h2 { font-size: 1.5rem; margin: 2.5rem 0 0.875rem; }
.entry-content h3 { font-size: 1.25rem; margin: 2rem 0 0.75rem; }
.entry-content h4 { font-size: 1.0625rem; margin: 1.75rem 0 0.625rem; }

.entry-content ul,
.entry-content ol { padding-left: 1.5rem; margin-bottom: 1.5rem; }
.entry-content ul { list-style: disc; }
.entry-content ol { list-style: decimal; }
.entry-content li { margin-bottom: 0.5rem; }

.entry-content blockquote {
  border-left: 2px solid var(--border);
  padding: 0.5rem 0 0.5rem 1.5rem;
  margin: 2rem 0; color: var(--text-2);
}
.entry-content blockquote p { font-size: 1.125rem; font-style: italic; margin-bottom: 0; }

.entry-content strong { font-weight: 700; }
.entry-content em     { font-style: italic; }
.entry-content a      { text-decoration: underline; }
.entry-content a:hover { opacity: 0.7; }

.entry-content hr {
  border: none; border-top: 1px solid var(--border);
  margin: 3rem 0;
}

/* WordPress image blocks inside entry-content */
.entry-content figure { margin: 2rem 0; }
.entry-content .wp-block-image img { max-width: 100%; height: auto; }
.entry-content .wp-block-image figcaption {
  font-family: 'DM Mono', monospace;
  font-size: 0.625rem; letter-spacing: 0.06em;
  color: var(--text-2); margin-top: 0.625rem;
  text-align: center;
}

/* Alignment classes */
.entry-content .alignfull {
  width: 100vw;
  position: relative; left: 50%;
  margin-left: -50vw; margin-right: -50vw;
  max-width: none;
}
.entry-content .alignwide {
  width: calc(100% + 8rem);
  margin-left: -4rem; margin-right: -4rem;
}
.entry-content .aligncenter { margin-left: auto; margin-right: auto; text-align: center; }
.entry-content .alignleft  { float: left; margin-right: 1.5rem; margin-bottom: 1rem; }
.entry-content .alignright { float: right; margin-left: 1.5rem; margin-bottom: 1rem; }

/* Embeds */
.entry-content .wp-block-embed { margin: 2rem 0; }
.entry-content .wp-block-embed__wrapper { position: relative; padding-top: 56.25%; }
.entry-content .wp-block-embed__wrapper iframe {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
}

/* Code */
.entry-content code {
  font-family: 'DM Mono', monospace; font-size: 0.875em;
  background: var(--bg-2); padding: 0.15em 0.4em; border-radius: 3px;
}
.entry-content pre {
  font-family: 'DM Mono', monospace; font-size: 0.875rem;
  background: var(--bg-2); padding: 1.5rem; overflow-x: auto;
  margin-bottom: 1.5rem; border-radius: 3px; line-height: 1.7;
}
.entry-content pre code { background: none; padding: 0; }

/* ── CoBlocks Masonry Gallery — full-bleed grid override ──────── */
.entry-content .wp-block-coblocks-gallery-masonry {
  /* Full-bleed breakout from .wrap--sm */
  width: 100vw !important;
  position: relative !important;
  left: 50% !important;
  margin-left: -50vw !important;
  margin-right: -50vw !important;
  max-width: none !important;

  /* Override CoBlocks masonry columns with uniform grid */
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 3px !important;
  column-count: unset !important;
  columns: unset !important;

  /* Spacing within post */
  margin-top: 2.5rem !important;
  margin-bottom: 3.5rem !important;
  padding: 0 !important;
}

.entry-content .wp-block-coblocks-gallery-masonry .masonry-brick,
.entry-content .wp-block-coblocks-gallery-masonry .wp-block-image {
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  break-inside: unset !important;
  display: block !important;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.entry-content .wp-block-coblocks-gallery-masonry .masonry-brick img,
.entry-content .wp-block-coblocks-gallery-masonry .wp-block-image img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
  margin: 0 !important;
  max-width: none !important;
  transition: opacity 0.2s ease;
}

.entry-content .wp-block-coblocks-gallery-masonry .masonry-brick:hover img {
  opacity: 0.88;
}

/* If CoBlocks uses a lightbox wrapper, make sure it fills the cell */
.entry-content .wp-block-coblocks-gallery-masonry .masonry-brick a {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
}

/* ── Post tags ───────────────────────────────────────────────── */
.post-tags {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  margin-top: 3rem; padding-top: 2.5rem;
  border-top: 1px solid var(--border);
  padding-bottom: 1rem;
}
.post-tag {
  font-family: 'DM Mono', monospace;
  font-size: 0.625rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--text);
  text-decoration: none;
  padding: 0.3em 0.75em;
  border-radius: 2px;
  display: inline-block;
  transition: background 0.15s, color 0.15s;
}
.post-tag:hover {
  background: var(--text);
  color: var(--bg);
  text-decoration: none;
}

/* ── Post navigation (prev/next) ─────────────────────────────── */
.post-nav {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  padding-bottom: 5rem;
}
.post-nav__item {
  text-decoration: none;
}
.post-nav__item--next { text-align: right; }
.pn-dir {
  font-family: 'DM Mono', monospace; font-size: 0.625rem;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-2);
  display: block; margin-bottom: 0.5rem;
}
.pn-title {
  font-size: 1rem; font-weight: 600; color: var(--text);
  line-height: 1.35;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.post-nav__item:hover .pn-title { opacity: 0.7; }

/* ── Footer ──────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border); padding: 1.875rem 0;
}
.site-footer__inner {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  font-family: 'DM Mono', monospace; font-size: 0.8125rem;
  letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--text) !important;
}
.site-footer__inner * { color: var(--text) !important; }
.footer-links { display: flex; gap: 1.5rem; }
.site-footer a,
.site-footer a:visited,
.site-footer .footer-nav__list a,
.site-footer .footer-nav__list a:visited {
  color: var(--text) !important;
  text-decoration: underline !important;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.site-footer a:hover,
.site-footer .footer-nav__list a:hover { opacity: 0.6; }

/* ── Static page ─────────────────────────────────────────────── */
.page-static .entry-content {
  max-width: 64ch;
  padding-bottom: 0;
}

/* ── WordPress core blocks (tag cloud, categories, archives) ─── */
/* These appear on the /search/ page as Gutenberg blocks          */
.wp-block-categories ul,
.wp-block-archives ul,
.wp-block-latest-posts ul {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}
.wp-block-categories li,
.wp-block-archives li,
.wp-block-latest-posts li {
  padding: 0.4375rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9375rem;
}
.wp-block-categories a,
.wp-block-archives a,
.wp-block-latest-posts a {
  color: var(--text) !important;
  text-decoration: underline !important;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.wp-block-categories a:hover,
.wp-block-archives a:hover,
.wp-block-latest-posts a:hover { opacity: 0.6; }

/* Tag cloud block */
.wp-block-tag-cloud {
  display: flex !important;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  line-height: 1.8;
}
.wp-block-tag-cloud a {
  color: var(--text-2) !important;
  text-decoration: underline !important;
  text-underline-offset: 3px;
  font-size: inherit !important; /* override WP font-size inline styles */
}
.wp-block-tag-cloud a:hover { color: var(--text) !important; }

/* Two-column layout block used on search page */
.wp-block-columns { gap: 2rem; }
.wp-block-column h2,
.wp-block-column h3 {
  font-family: 'DM Mono', monospace !important;
  font-size: 0.625rem !important;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-2) !important;
  font-weight: 400 !important;
  margin-bottom: 1rem;
  padding-bottom: 0.625rem;
  border-bottom: 1px solid var(--border);
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 860px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__image-wrap { display: none; }
  .hero__title { max-width: none; }
  .entry-content .alignwide {
    width: calc(100% + 3rem);
    margin-left: -1.5rem; margin-right: -1.5rem;
  }
}

@media (max-width: 680px) {
  .wrap, .wrap--mid, .wrap--sm { padding: 0 1.25rem; }

  /* Disable sticky header on mobile */
  .site-header {
    position: relative;
    top: auto;
  }

  /* More breathing room below header on archive/category pages */
  .archive-page { padding-top: 2rem; }
  .cat-page { padding-top: 2rem; }

  /* Mobile nav - hamburger toggle */
  .nav-toggle {
    display: flex; align-items: center; justify-content: center;
    background: none; border: none; color: var(--text);
    cursor: pointer; padding: 0.375rem; margin-right: 0.25rem;
    border-radius: 2px;
  }
  .nav-toggle svg { width: 1.25rem; height: 1.25rem; }
  .icon-close { display: none; }
  .nav-toggle.is-open .icon-hamburger { display: none; }
  .nav-toggle.is-open .icon-close { display: block; }

  /* Hide nav list by default on mobile, show when open */
  .site-nav .site-nav__list {
    display: none;
    position: absolute;
    top: 3.25rem;
    left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 1.25rem 1rem;
    flex-direction: column;
    gap: 0;
    z-index: 199;
  }
  .site-nav .site-nav__list.is-open { display: flex; }
  .site-nav .site-nav__list li { display: block !important; }
  .site-nav .site-nav__list a {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
    display: block;
    font-size: 0.9375rem;
    color: var(--text) !important;
  }
  .site-nav .site-nav__list li:last-child a { border-bottom: none; }

  /* Post list mobile */
  .post-item {
    grid-template-columns: 1fr auto;
    gap: 0 1rem;
  }
  .post-item__num  { display: none; }
  .post-item__date { display: none; }
  .post-item__info { padding-right: 0; }

  .post-nav { grid-template-columns: 1fr; }
  .post-nav__item--next { text-align: left; }

  .entry-content .wp-block-coblocks-gallery-masonry {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .entry-content .alignwide {
    width: 100%; margin-left: 0; margin-right: 0;
  }

  /* Footer - stack vertically to prevent overflow */
  .site-footer__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  .footer-links .footer-nav__list {
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
  }
}

@media (max-width: 480px) {
  .entry-content .wp-block-coblocks-gallery-masonry {
    grid-template-columns: 1fr !important;
  }
}

/* ── Touch devices: show photos in full color (no hover available) ── */
@media (hover: none) {
  .post-item__thumb img { filter: none; }
}
