/* ─── Post Content Typography ─────────────────────────────────────────────────
   Scoped to .post-content so it only applies inside the single post body area.
   Mirrors the project's clamp-based type scale from main.css.
   ─────────────────────────────────────────────────────────────────────────── */

.post-content {
  /* Base spacing unit */
  --pc-gap: clamp(1rem, 2vw, .2rem);
  color: #262626;
}

/* ── Block spacing ────────────────────────────────────────── */
.post-content>*+* {
  margin-top: var(--pc-gap);
}

/* Headings own their spacing (em = the heading's own size) */
.post-content> :is(h1, h2, h3, h4, h5, h6) {
  margin-top: 0.6em;
  margin-bottom: 0.5em;
}

.post-content> :is(h1, h2, h3, h4, h5, h6)+* {
  margin-top: 0;
}

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

/* ── Headings ─────────────────────────────────────────────── */
.post-content h1 {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 2.1359rem + 1.5534vw, 4rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: #000;
}

.post-content h2 {
  font-family: var(--font-sans);
  font-size: clamp(1.625rem, 1.4rem + 1.1vw, 2rem);
  /* 26 → 32px */
  line-height: 1.2;
  letter-spacing: -0.015em;
  font-weight: 500;
  color: #000;
}

.post-content h3 {
  font-family: var(--font-sans);
  font-size: clamp(1.375rem, 1.25rem + 0.6vw, 1.625rem);
  /* 22 → 26px */
  line-height: 1.25;
  letter-spacing: -0.01em;
  font-weight: 500;
  color: #000;
}

.post-content h4 {
  font-family: var(--font-sans);
  font-size: clamp(1.1875rem, 1.125rem + 0.3vw, 1.3125rem);
  /* 19 → 21px */
  line-height: 1.35;
  letter-spacing: -0.005em;
  font-weight: 500;
  color: #000;
}

.post-content h5 {
  font-family: var(--font-sans);
  font-size: clamp(1.0625rem, 1.03rem + 0.15vw, 1.125rem);
  /* 17 → 18px */
  line-height: 1.45;
  letter-spacing: 0;
  font-weight: 500;
  color: #000;
}

.post-content h6 {
  font-family: var(--font-sans);
  font-size: clamp(1rem, 0.9697rem + 0.1294vw, 1.125rem);
  font-weight: 500;
  line-height: 1.4;
  color: #000;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── Paragraphs ───────────────────────────────────────────── */
.post-content p {
  font-family: var(--font-sans);
  font-size: clamp(1rem, 0.3697rem + 0.1294vw, 1.125rem);
  line-height: 1.7;
  color: #404040;
}

/* ── Links ────────────────────────────────────────────────── */
.post-content a {
  color: #083602;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: opacity 200ms ease;
}

.post-content a:hover {
  opacity: 0.7;
}

/* ── Lists ────────────────────────────────────────────────── */
.post-content ul,
.post-content ol {
  font-family: var(--font-sans);
  font-size: clamp(1rem, 0.9697rem + 0.1294vw, 1.125rem);
  line-height: 1.7;
  color: #404040;
  padding-left: 1.5rem;
}

.post-content ul {
  list-style-type: disc;
}

.post-content ol {
  list-style-type: decimal;
}

.post-content li + li {
  margin-top: 0.35em;
}

.post-content li > ul,
.post-content li > ol {
  margin-top: 0.35em;
}

/* ── Blockquote ───────────────────────────────────────────── */
.post-content blockquote {
  border-left: 3px solid #083602;
  padding: clamp(1rem, 2vw, 1.5rem) clamp(1.25rem, 3vw, 2rem);
  background: #f9f9f7;
  margin-left: 0;
  margin-right: 0;
}

.post-content blockquote p {
  font-family: var(--font-heading);
  font-size: clamp(1.375rem, 1.2536rem + 0.5178vw, 1.875rem);
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: #000;
  font-style: normal;
}

.post-content blockquote cite {
  display: block;
  margin-top: 0.75rem;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  color: #737373;
  font-style: normal;
}

/* ── Images ───────────────────────────────────────────────── */
.post-content img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 0;
}

.post-content figure {
  margin: 0;
}

.post-content figcaption {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  color: #737373;
  margin-top: 0.5rem;
  text-align: center;
}

/* ── Horizontal Rule ──────────────────────────────────────── */
.post-content hr {
  border: none;
  border-top: 1px solid #e5e5e5;
  margin: calc(var(--pc-gap) * 2) 0;
}

/* ── Tables ───────────────────────────────────────────────── */
.post-content table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-sans);
  font-size: clamp(0.875rem, 0.85rem + 0.1294vw, 1rem);
  color: #404040;
}

.post-content th,
.post-content td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid #e5e5e5;
}

.post-content th {
  font-weight: 600;
  color: #000;
  background: #f9f9f7;
  border-bottom-color: #d4d4d4;
}

/* ── Code ─────────────────────────────────────────────────── */
.post-content code {
  font-family: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, monospace;
  font-size: 0.875em;
  background: #f4f4f4;
  color: #083602;
  padding: 0.1em 0.35em;
  border-radius: 3px;
}

.post-content pre {
  background: #1a1a1a;
  color: #e5e5e5;
  padding: clamp(1rem, 2vw, 1.5rem);
  overflow-x: auto;
  border-radius: 4px;
}

.post-content pre code {
  background: transparent;
  color: inherit;
  padding: 0;
  font-size: 0.875rem;
  line-height: 1.6;
}

/* ── Strong / Em ──────────────────────────────────────────── */
.post-content strong,
.post-content b {
  font-weight: 600;
  color: #000;
}

.post-content em,
.post-content i {
  font-style: italic;
}

/* ── WP Gutenberg align classes ───────────────────────────── */
.post-content .alignleft {
  float: left;
  margin-right: clamp(1rem, 2vw, 1.5rem);
  margin-bottom: 0.5rem;
  max-width: 50%;
}

.post-content .alignright {
  float: right;
  margin-left: clamp(1rem, 2vw, 1.5rem);
  margin-bottom: 0.5rem;
  max-width: 50%;
}

.post-content .aligncenter {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.post-content .alignfull,
.post-content .alignwide {
  width: 100%;
}

/* ── Clearfix after floated images ───────────────────────── */
.post-content::after {
  content: "";
  display: table;
  clear: both;
}

/* ── WP embed / video ─────────────────────────────────────── */
.post-content .wp-block-embed,
.post-content .wp-block-video {
  margin: 0;
}

.post-content .wp-block-embed iframe,
.post-content .wp-block-video video {
  max-width: 100%;
  display: block;
}

/* ── WP separator block ───────────────────────────────────── */
.post-content .wp-block-separator {
  border: none;
  border-top: 1px solid #e5e5e5;
  margin: calc(var(--pc-gap) * 2) 0;
}
