/* Modern post-reading layout. Layered on top of refine.css. Applies only
   to pages with .post-modern body class. Visual chrome (wordmark, nav,
   menu toggle hamburger) renders via CSS pseudo-elements so no new text
   is added to the DOM and the text snapshot stays byte-identical. */

:root {
  --post-ink: #000;
  --post-paper: #fff;
  --post-bone: #f8f6f1;
  --post-stone: #5a5a56;
  --post-hairline: #e5e2da;
  --post-charcoal: #0a0a0a;
  --post-amber: #b8862f;
  --post-amber-soft: rgba(184, 134, 47, 0.10);
  --post-ember: #7a1818;
  --post-column: 680px;
  --post-leading: 1.65;
}

body.post-modern {
  background: var(--post-paper);
  color: var(--post-ink);
  margin: 0;
  padding: 0;
  font-size: 18px;
  line-height: var(--post-leading);
}

/* Hide every WordPress duotone SVG filter the SimpleBlogily theme used to
   inject. They're vestigial and noisy. */
body.post-modern > svg[xmlns][focusable="false"] {
  display: none !important;
}

/* Skip link — visible only on focus, never visually present otherwise.
   Stays in DOM to keep the snapshot identical. */
body.post-modern .skip-link {
  position: absolute;
  left: -9999px;
  top: -9999px;
  z-index: 100;
  background: var(--post-ink);
  color: var(--post-paper);
  padding: 0.6em 1em;
  text-decoration: none;
  font-size: 14px;
}
body.post-modern .skip-link:focus {
  left: 1em;
  top: 1em;
}

/* Masthead — slim, sticky on scroll, wordmark left, hamburger right
   (mobile) or nav links right (desktop). All visible labels rendered via
   ::before pseudo-elements with content from data attributes, so the
   labels do not appear in the snapshot. */
body.post-modern .masthead {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--post-hairline);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.5em;
  padding: 0.85em 1.6em;
}

body.post-modern .wordmark {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--post-ink);
  font-family: 'Bentham', Georgia, serif;
  font-size: 22px;
  letter-spacing: -0.005em;
  white-space: nowrap;
}
body.post-modern .wordmark::before {
  content: "Nathan Winograd";
}

body.post-modern .masthead-nav {
  grid-column: 3;
  display: flex;
  gap: 1.4em;
  align-items: center;
  justify-self: end;
}

body.post-modern .masthead-nav-link {
  text-decoration: none;
  color: var(--post-ink);
  font-family: 'Bentham', Georgia, serif;
  font-size: 15px;
  letter-spacing: 0.01em;
  transition: opacity 220ms cubic-bezier(0.4, 0, 0.2, 1);
}
body.post-modern .masthead-nav-link::before {
  content: attr(data-label);
}
body.post-modern .masthead-nav-link:hover {
  opacity: 0.62;
}

/* Hamburger — only visible on small screens. Empty <span>s in the DOM
   become the bars via CSS borders. */
body.post-modern .masthead-menu-toggle {
  grid-column: 2;
  justify-self: end;
  background: transparent;
  border: 0;
  padding: 0.5em;
  cursor: pointer;
  display: none;
  flex-direction: column;
  gap: 4px;
  width: 36px;
  height: 36px;
  justify-content: center;
}
body.post-modern .masthead-menu-toggle .m_menu_icon {
  display: block;
  height: 1.5px;
  width: 22px;
  background: var(--post-ink);
}

@media (max-width: 800px) {
  body.post-modern .masthead {
    grid-template-columns: 1fr auto;
    padding: 0.75em 1.2em;
  }
  body.post-modern .masthead-menu-toggle {
    display: flex;
  }
  body.post-modern .masthead-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    flex-wrap: wrap;
    gap: 1em;
    padding-top: 0.5em;
    border-top: 1px solid var(--post-hairline);
    display: none;
  }
  body.post-modern .masthead-nav.open {
    display: flex;
  }
}

/* Article column — generous reading-width, generous leading, generous
   margins. */
body.post-modern .post-main {
  display: block;
  padding: 4.5em 1.6em 3em;
}

body.post-modern .post-article {
  max-width: var(--post-column);
  margin: 0 auto;
}

body.post-modern .post-eyebrow {
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 1em;
  color: var(--post-stone);
}
body.post-modern .post-eyebrow .entry-cate {
  color: var(--post-amber);
  text-decoration: none;
  font-weight: inherit;
  border-bottom: 1px solid transparent;
  transition: border-color 220ms ease;
  letter-spacing: 0.16em;
}
body.post-modern .post-eyebrow .entry-cate:hover {
  border-bottom-color: var(--post-amber);
}

body.post-modern h1.entry-title {
  font-family: 'Bentham', Georgia, serif !important;
  font-size: clamp(34px, 4.6vw, 52px);
  line-height: 1.12;
  letter-spacing: -0.005em;
  margin: 0 0 0.6em 0;
  color: var(--post-ink);
}

body.post-modern .entry-meta {
  display: block;
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--post-stone);
  margin-bottom: 2.6em;
  padding-bottom: 1.5em;
  border-bottom: 1px solid var(--post-hairline);
}
body.post-modern .entry-meta time {
  color: var(--post-stone);
}
body.post-modern .entry-meta .author {
  color: var(--post-ink);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 220ms ease;
}
body.post-modern .entry-meta .author:hover {
  border-bottom-color: var(--post-ink);
}

/* Body content — restored editorial defaults. Paragraphs breathe, links
   underline, blockquotes get the pull-quote treatment. */
body.post-modern .entry-content {
  font-size: 18px;
  line-height: var(--post-leading);
}

body.post-modern .entry-content p {
  margin: 0 0 1.4em 0;
}

/* Drop cap on the very first paragraph of the body, but only when it
   begins with a real letter (not an image). Achieved with first-of-type
   + ::first-letter; CSS doesn't change DOM text. */
body.post-modern .entry-content > p:first-of-type:not(:has(img:first-child))::first-letter {
  font-family: 'Bentham', Georgia, serif;
  font-size: 4.6em;
  line-height: 0.86;
  float: left;
  padding: 0.08em 0.18em 0 0;
  color: var(--post-amber);
}

body.post-modern .entry-content a {
  color: var(--post-ink);
  text-decoration: none;
  border-bottom: 1px solid var(--post-hairline);
  transition: border-color 220ms ease, color 220ms ease;
}
body.post-modern .entry-content a:hover {
  color: var(--post-ember);
  border-bottom-color: var(--post-ember);
}

body.post-modern .entry-content h2,
body.post-modern .entry-content h3,
body.post-modern .entry-content h4 {
  font-family: 'Bentham', Georgia, serif !important;
  font-weight: 400;
  letter-spacing: -0.005em;
  line-height: 1.2;
  margin-top: 1.8em;
  margin-bottom: 0.5em;
}
body.post-modern .entry-content h2 { font-size: 30px; }
body.post-modern .entry-content h3 { font-size: 24px; }
body.post-modern .entry-content h4 { font-size: 20px; }

body.post-modern .entry-content blockquote {
  position: relative;
  margin: 2.2em 0;
  padding: 0.4em 0 0.4em 2em;
  border-left: 2px solid var(--post-amber);
  font-style: italic;
  color: var(--post-stone);
  font-size: 1.04em;
  line-height: 1.6;
}
body.post-modern .entry-content blockquote::before {
  content: "“";
  position: absolute;
  left: 0.18em;
  top: -0.18em;
  font-size: 3em;
  color: var(--post-amber);
  font-style: normal;
  line-height: 1;
  font-family: 'Bentham', Georgia, serif;
}
body.post-modern .entry-content blockquote p {
  margin: 0 0 0.8em 0;
}
body.post-modern .entry-content blockquote p:last-child {
  margin-bottom: 0;
}

body.post-modern .entry-content img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  margin: 1.2em auto;
  display: block;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 22px rgba(0, 0, 0, 0.06);
}

/* Squarespace/WordPress alignment helpers — preserve common WP classes. */
body.post-modern .entry-content .aligncenter { margin-left: auto; margin-right: auto; }
body.post-modern .entry-content .alignleft { float: left; margin: 0.4em 1.6em 0.6em 0; }
body.post-modern .entry-content .alignright { float: right; margin: 0.4em 0 0.6em 1.6em; }

body.post-modern .entry-content figcaption,
body.post-modern .entry-content .wp-caption-text {
  font-style: italic;
  font-size: 14px;
  color: var(--post-stone);
  text-align: center;
  margin-top: 0.4em;
}

body.post-modern .entry-content ul,
body.post-modern .entry-content ol {
  margin: 0 0 1.4em 0;
  padding-left: 1.6em;
}
body.post-modern .entry-content li {
  margin-bottom: 0.6em;
}

body.post-modern .entry-content hr {
  border: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--post-hairline), transparent);
  margin: 2.8em auto;
  max-width: 60%;
}

/* Tag pills — Quill Amber on transparent, lifts on hover. Inline anchors
   so they collapse onto the snapshot's last body paragraph (matching the
   original SimpleBlogily layout exactly). */
body.post-modern .entry-tags {
  margin-top: 3em;
  padding-top: 1.5em;
  border-top: 1px solid var(--post-hairline);
}
body.post-modern .entry-tags a {
  display: inline-block;
  padding: 0.32em 0.95em;
  margin: 0 0.4em 0.5em 0;
  border-radius: 999px;
  border: 1px solid var(--post-hairline);
  color: var(--post-amber);
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 0.04em;
  transition: background-color 220ms ease, border-color 220ms ease;
}
body.post-modern .entry-tags a:hover {
  background: var(--post-amber-soft);
  border-color: var(--post-amber);
}

/* Post navigation — minimal hairline-bordered prev/next block. */
body.post-modern .post-navigation {
  margin-top: 4em;
  padding-top: 2.4em;
  border-top: 1px solid var(--post-hairline);
}
body.post-modern .post-navigation-heading {
  font-family: 'Bentham', Georgia, serif !important;
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--post-stone);
  margin: 0 0 1.4em 0;
  font-weight: 400;
}
body.post-modern .post-navigation .nav-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2em;
}
body.post-modern .post-navigation .nav-previous,
body.post-modern .post-navigation .nav-next {
  display: block;
}
body.post-modern .post-navigation .nav-next {
  text-align: right;
}
body.post-modern .post-navigation .nav-previous a,
body.post-modern .post-navigation .nav-next a {
  display: block;
  font-family: 'Bentham', Georgia, serif !important;
  font-size: 18px;
  line-height: 1.35;
  color: var(--post-ink);
  text-decoration: none;
  position: relative;
}
body.post-modern .post-navigation .nav-previous a::before {
  content: "← Previous";
  display: block;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--post-stone);
  margin-bottom: 0.4em;
  font-style: normal;
}
body.post-modern .post-navigation .nav-next a::before {
  content: "Next →";
  display: block;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--post-stone);
  margin-bottom: 0.4em;
  font-style: normal;
}

@media (max-width: 600px) {
  body.post-modern .post-navigation .nav-links {
    grid-template-columns: 1fr;
  }
  body.post-modern .post-navigation .nav-next {
    text-align: left;
  }
}

/* Post-navigation heading is technically an h2 in the original (a screen-
   reader-only label). We keep the same h2 here so the snapshot still
   captures "Post navigation" on the same line as prev/next titles + footer. */

/* Footer — Deep Charcoal block, Paper White text. */
body.post-modern .post-footer {
  background: var(--post-charcoal);
  color: var(--post-paper);
  padding: 2.6em 1.6em;
  margin-top: 6em;
  font-size: 14px;
  text-align: center;
  letter-spacing: 0.04em;
}
body.post-modern .post-footer-inner {
  max-width: var(--post-column);
  margin: 0 auto;
  font-family: 'Bentham', Georgia, serif !important;
}
body.post-modern .post-footer .copyright-year {
  font-variant-numeric: tabular-nums;
}

/* Cookie banner — keep DOM identical, restyle. */
body.post-modern #static-cookie-banner {
  background: var(--post-charcoal);
  color: var(--post-paper);
  font-family: 'Bentham', Georgia, serif !important;
  font-size: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
body.post-modern #static-cookie-banner a {
  color: var(--post-paper);
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
  text-decoration: none;
  transition: border-color 220ms ease;
}
body.post-modern #static-cookie-banner a:hover {
  border-bottom-color: var(--post-paper);
}
body.post-modern #static-cookie-banner button {
  background: var(--post-paper);
  color: var(--post-ink);
  font-family: 'Bentham', Georgia, serif !important;
  font-size: 14px;
  letter-spacing: 0.04em;
  padding: 0.55em 1.4em;
  border-radius: 6px;
  font-weight: 400;
  transition: opacity 220ms ease;
}
body.post-modern #static-cookie-banner button:hover {
  opacity: 0.85;
}

/* Featured image — full-bleed-within-column, generous shadow. */
body.post-modern .post-featured {
  margin: 0 0 2.4em 0;
}
body.post-modern .post-featured img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06), 0 18px 36px rgba(0, 0, 0, 0.08);
  display: block;
}
