/* =====================================================================
   Posts — individual articles + writing index
   Loaded after styles.css; same palette and typography.
   ===================================================================== */

.post-body {
  background: var(--c-bg);
}

/* ---------- POST PAGE ---------- */
.post-main {
  padding-block: clamp(2rem, 5vw, 3.5rem) clamp(2.5rem, 6vw, 4.5rem);
}
.post {
  max-width: 44rem;
  margin: 0 auto;
  padding-inline: var(--pad-x);
}
.post-header {
  margin-bottom: 2rem;
}
.post-meta {
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .78rem;
  color: var(--c-leaf);
  margin: 0 0 1rem;
}
.post-meta a {
  color: var(--c-leaf);
  text-decoration: none;
}
.post-meta a:hover { color: var(--c-leaf-2); }
.post-meta-sep {
  margin: 0 .65rem;
  opacity: .5;
}
.post-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 4.4vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--c-ink);
  margin: 0;
}

.post-hero {
  margin: 0 0 2.5rem;
}
.post-hero img {
  width: 100%;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-1);
}

.post-body-content {
  font-size: 1.08rem;
  line-height: 1.75;
  color: var(--c-ink);
}
.post-body-content p {
  margin: 0 0 1.4rem;
}
.post-body-content p:first-child::first-letter {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 3.6rem;
  float: left;
  line-height: 0.95;
  margin: .15em .12em 0 0;
  color: var(--c-leaf);
}
.post-body-content a {
  color: var(--c-leaf-2);
  text-decoration: underline;
  text-decoration-color: var(--c-leaf-soft);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}
.post-body-content a:hover {
  color: var(--c-leaf);
  text-decoration-color: var(--c-leaf);
}
.post-body-content h2,
.post-body-content h3 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--c-ink);
  margin: 2.25rem 0 1rem;
  line-height: 1.25;
}
.post-body-content h2 { font-size: 1.6rem; }
.post-body-content h3 { font-size: 1.3rem; }
.post-body-content blockquote {
  border-left: 3px solid var(--c-leaf);
  margin: 1.75rem 0;
  padding: .35rem 0 .35rem 1.25rem;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--c-ink-2);
}
.post-body-content ul,
.post-body-content ol {
  margin: 1.4rem 0;
  padding-left: 1.4rem;
}
.post-body-content li {
  margin-bottom: .65rem;
}
.post-body-content li::marker {
  color: var(--c-leaf);
}
.post-body-content img,
.post-body-content figure img {
  max-width: 100%;
  height: auto;
  border-radius: var(--r-md);
  margin: 1.5rem 0;
}
.post-body-content em { font-style: italic; }
.post-body-content strong, .post-body-content b { font-weight: 600; }

.post-footer {
  margin-top: 3rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--c-rule);
}
.post-back a {
  font-family: var(--font-display);
  font-weight: 600;
  text-decoration: none;
  color: var(--c-leaf-2);
}
.post-back a:hover { color: var(--c-leaf); }


/* ---------- POSTS INDEX ---------- */
.posts-index-main {
  padding-block: 0 clamp(2.5rem, 5vw, 4rem);
}
.posts-index-hero {
  background: linear-gradient(180deg, #fbf6e8 0%, #f6ecc9 100%);
  padding-block: clamp(3rem, 6vw, 4.5rem) clamp(2.5rem, 5vw, 3.5rem);
  border-bottom: 1px solid var(--c-rule);
  text-align: center;
}
.posts-index-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 4.4vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--c-ink);
  margin: 0 auto .75rem;
  max-width: 28ch;
}
.posts-index-lede {
  max-width: 50ch;
  margin: 0 auto;
  color: var(--c-ink-2);
  font-size: 1.05rem;
}

.posts-list {
  padding-block: clamp(2.5rem, 5vw, 4rem);
}

.posts-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
@media (min-width: 760px) {
  .posts-grid { grid-template-columns: 1fr 1fr; gap: 2rem 2.5rem; }
}
@media (min-width: 1080px) {
  .posts-grid { grid-template-columns: 1fr 1fr 1fr; }
}

.post-card {
  background: var(--c-surface);
  border: 1px solid var(--c-rule);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  display: flex;
  flex-direction: column;
}
.post-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-1);
  border-color: var(--c-leaf-soft);
}
.post-card-img-link {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--c-leaf-soft);
}
.post-card-img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.post-card:hover .post-card-img { transform: scale(1.03); }
.post-card-body {
  padding: 1.4rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  flex: 1;
}
.post-card-meta {
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .72rem;
  color: var(--c-leaf);
  margin: 0;
}
.post-card-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0;
}
.post-card-title a {
  color: var(--c-ink);
  text-decoration: none;
}
.post-card-title a:hover { color: var(--c-leaf-2); }
.post-card-excerpt {
  color: var(--c-ink-2);
  font-size: .98rem;
  line-height: 1.55;
  margin: 0;
  flex: 1;
}
.post-card-cta {
  margin: .25rem 0 0;
}
.post-card-cta a {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .92rem;
  color: var(--c-leaf-2);
  text-decoration: none;
}
.post-card-cta a:hover { color: var(--c-leaf); }
