/* ==========================================================
   ALCHEMY SINGLE POST — single.php scoped styles
   Same design tokens as blog.css for visual continuity.
   ========================================================== */

.alchemy-single {
  --navy: #0D1B2A;
  --gold: #B8972E;
  --gold-hover: #D4AF5A;
  --cream: #F7F4EE;
  --paper: #F6F5F4;
  --teal: #1B3A4B;
  --ink: #141413;
  background: var(--paper);
}

.alchemy-single * { box-sizing: border-box; }

.alchemy-single h1, .alchemy-single h2, .alchemy-single h3, .alchemy-single h4 {
  font-family: 'Cormorant Garamond', serif;
  color: var(--navy);
}

.alchemy-single p, .alchemy-single span, .alchemy-single a, .alchemy-single li, .alchemy-single button {
  font-family: 'DM Sans', sans-serif;
}

/* ---------- READING PROGRESS BAR ---------- */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, #B8972E, #D4AF5A);
  z-index: 999;
}

/* ---------- POST HERO ---------- */
.post-hero {
  background: #0D1B2A;
  padding: 6rem 1.5rem 0;
}

.post-hero__inner {
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
  padding-bottom: 3rem;
}

.post-hero__cat {
  display: inline-block;
  background: #B8972E;
  color: #0D1B2A;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.4rem 1rem;
  border-radius: 100px;
  text-decoration: none;
  margin-bottom: 1.5rem;
}

.post-hero .post-hero__title {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  color: #F7F4EE !important;
  line-height: 1.15;
  font-weight: 500;
  margin-bottom: 1.75rem;
}

.kinetic-word {
  display: inline-block;
  overflow: hidden;
}

.post-hero__meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: rgba(247,244,238,0.7);
  font-size: 0.92rem;
}

.post-hero__avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 0.3rem;
}

.post-hero__author { color: #D4AF5A; font-weight: 600; }
.post-hero__dot { opacity: 0.5; }

.post-hero__media {
  max-width: 1100px;
  margin: 0 auto;
  border-radius: 18px 18px 0 0;
  overflow: hidden;
  aspect-ratio: 16/8;
  transform: translateY(2px);
}

.post-hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.15);
  animation: heroImgReveal 1.4s cubic-bezier(0.16,1,0.3,1) forwards;
}

@keyframes heroImgReveal {
  to { transform: scale(1); }
}

/* ---------- LAYOUT: RAIL + CONTENT ---------- */
.post-layout {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3.5rem 1.5rem 2rem;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 3.5rem;
  align-items: start;
}

.post-rail {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.post-toc__label, .post-share__label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.9rem;
}

.post-toc__list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 2px solid rgba(13,27,42,0.08);
}

.post-toc__link {
  display: block;
  padding: 0.45rem 0 0.45rem 1rem;
  margin-left: -2px;
  border-left: 2px solid transparent;
  color: #6a6a67;
  text-decoration: none;
  font-size: 0.88rem;
  line-height: 1.4;
  transition: color 0.25s ease, border-color 0.25s ease;
}

.post-toc__link:hover { color: var(--navy); }

.post-toc__link.is-active {
  color: var(--navy);
  border-left-color: var(--gold);
  font-weight: 600;
}

.post-share {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.post-share__label { width: 100%; margin-bottom: 0.4rem; }

.post-share__btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid rgba(13,27,42,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--navy);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.post-share__btn:hover {
  background: var(--gold);
  color: var(--navy);
  transform: translateY(-3px);
}

.post-share__copy.is-copied { background: var(--teal); color: #fff; }

/* ---------- POST CONTENT (the_content output) ---------- */
.post-content {
  font-size: 1.1rem;
  line-height: 1.85;
  color: #2a2a28;
  max-width: 720px;
}

.post-content h2 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  margin: 3rem 0 1.2rem;
  scroll-margin-top: 110px;
}

.post-content h3 {
  font-size: 1.4rem;
  margin: 2.2rem 0 1rem;
  color: var(--teal);
}

.post-content p { margin: 0 0 1.4rem; }

.post-content a { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }

.post-content img {
  width: 100%;
  border-radius: 14px;
  margin: 2rem 0;
}

.post-content blockquote {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1.5rem;
  color: var(--navy);
  border-left: 3px solid var(--gold);
  padding: 0.5rem 0 0.5rem 1.6rem;
  margin: 2.4rem 0;
}

.post-content ul, .post-content ol {
  margin: 0 0 1.4rem 1.4rem;
  padding: 0;
}

.post-content li { margin-bottom: 0.5rem; }

.post-content code {
  background: rgba(184,151,46,0.12);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.92em;
}

/* ---------- AUTHOR BIO ---------- */
.author-bio {
  max-width: 820px;
  margin: 4rem auto;
  padding: 0 1.5rem;
}

.author-bio__inner {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  background: #fff;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 8px 24px rgba(13,27,42,0.06);
}

.author-bio__avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.author-bio__label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.3rem;
}

.author-bio__name { font-size: 1.4rem; margin-bottom: 0.5rem; }

.author-bio__text { color: #5a5a57; font-size: 0.98rem; line-height: 1.6; margin-bottom: 0.75rem; }

.author-bio__link { color: var(--navy); font-weight: 700; text-decoration: none; font-size: 0.92rem; }
.author-bio__link:hover { color: var(--gold); }

.author-bio__social {
  display: flex;
  gap: 0.6rem;
  margin-top: 1.1rem;
}

.author-bio__social-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--paper);
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.author-bio__social-icon:hover {
  background: var(--gold);
  color: var(--navy);
  transform: translateY(-3px);
}

/* ---------- RELATED POSTS (reuses post-card component from blog listing) ---------- */
.related-posts {
  background: #fff;
  padding: 4rem 1.5rem;
}

.related-posts__inner { max-width: 1100px; margin: 0 auto; }

.related-posts__heading {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 2rem;
}

.related-posts__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.post-card {
  background: var(--paper);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(13,27,42,0.05);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.post-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(13,27,42,0.14);
}

.post-card__link { text-decoration: none; display: block; }
.post-card__media { overflow: hidden; aspect-ratio: 16/10; }
.post-card__img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.post-card:hover .post-card__img { transform: scale(1.06); }
.post-card__body { padding: 1.3rem 1.4rem 1.6rem; }
.post-card__cat { display: block; color: var(--gold); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; margin-bottom: 0.5rem; }
.post-card__title { font-size: 1.15rem; color: var(--navy); margin-bottom: 0.6rem; line-height: 1.3; }
.post-card__meta { color: #a0a09b; font-size: 0.78rem; }
.post-card__dot { margin: 0 0.3em; }

/* ---------- NEWSLETTER STRIP (reused from blog listing) ---------- */
.newsletter-strip { background: var(--teal); padding: 3.5rem 1.5rem; }
.newsletter-strip__inner { max-width: 1100px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.newsletter-strip__copy h3 { color: var(--cream); font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 0.5rem; }
.newsletter-strip__copy p { color: rgba(247,244,238,0.75); font-size: 0.98rem; max-width: 420px; margin: 0; }
.newsletter-strip__form-wrap { min-width: 320px; flex: 1; max-width: 420px; }

/* ---------- PREV / NEXT ---------- */
.post-pagination {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.post-pagination__item {
  display: block;
  padding: 1.5rem;
  border-radius: 12px;
  background: #fff;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(13,27,42,0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-pagination__item:hover { transform: translateY(-4px); box-shadow: 0 16px 32px rgba(13,27,42,0.12); }

.post-pagination__next { text-align: right; }

.post-pagination__label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.4rem;
}

.post-pagination__title { color: var(--navy); font-weight: 600; font-size: 0.98rem; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
  .post-layout { grid-template-columns: 1fr; }
  .post-rail { position: static; flex-direction: row; flex-wrap: wrap; gap: 1.5rem; }
  .post-toc { display: none; } /* ToC hidden on mobile to save space, share row remains */
  .related-posts__grid { grid-template-columns: 1fr; }
  .post-pagination { grid-template-columns: 1fr; }
  .post-pagination__next { text-align: left; }
}

@media (max-width: 640px) {
  .post-hero { padding: 4rem 1.25rem 0; }
  .author-bio__inner { flex-direction: column; align-items: center; text-align: center; }
  .newsletter-strip__inner { flex-direction: column; text-align: center; }
}
