/* ============================================================
   ALIFY — blog-single.css · article template
   ============================================================ */

.read-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  z-index: calc(var(--z-header) - 1);
  background: linear-gradient(90deg, var(--teal-2), var(--green));
  transform: scaleX(0);
  transform-origin: left;
}

.post-hero { padding-top: calc(var(--header-h) + clamp(2.5rem, 7vw, 5rem)); }
.post-hero__inner { max-width: 880px; }
.post-hero__title { margin-block: 1.75rem; font-size: clamp(2.25rem, 4.8vw, 3.9rem); }

.post-hero__meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem;
  padding-block: 1.5rem;
  border-block: 1px solid var(--line);
  font-family: var(--ff-mono); font-size: .76rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
}
.post-hero__meta .dot { color: var(--teal-2); }
.post-hero__author { display: inline-flex; align-items: center; gap: .7rem; }
.post-hero__avatar {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--sand); color: #17170E;
  font-family: var(--ff-display); font-weight: 700; font-size: .8rem;
}

/* layout: sticky share rail + article */
.article-wrap { display: grid; gap: 3rem; }
@media (min-width: 1100px) {
  .article-wrap { grid-template-columns: 72px 1fr; }
  .share-rail { position: sticky; top: calc(var(--header-h) + 3rem); align-self: start; }
}
.share-rail { display: flex; gap: .7rem; }
@media (min-width: 1100px) { .share-rail { flex-direction: column; } }

.article { max-width: 780px; margin-inline: auto; width: 100%; }
@media (min-width: 1100px) { .article { margin-inline: 0; } }
.article .lede { font-family: var(--ff-accent); font-style: italic; font-size: 1.35rem; line-height: 1.55; color: var(--sand); margin-bottom: 2.25rem; }

.article-figure { margin-block: 2.5rem; }
.article-figure figcaption { font-family: var(--ff-mono); font-size: .72rem; letter-spacing: .12em; color: var(--faint); margin-top: .8rem; text-transform: uppercase; }

/* author card */
.author-card {
  display: flex; gap: 1.5rem; align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--panel);
  padding: 1.75rem;
  flex-wrap: wrap;
}
.author-card__avatar {
  width: 72px; height: 72px; flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--navy); color: var(--off);
  font-family: var(--ff-display); font-weight: 700; font-size: 1.4rem;
  border: 2px solid var(--teal-2);
}
.author-card__name { font-family: var(--ff-display); font-weight: 600; font-size: 1.15rem; color: var(--off); }
.author-card__role { font-family: var(--ff-mono); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--sage-2); margin: .25rem 0 .5rem; }
.author-card__bio { color: var(--muted); font-size: .9rem; max-width: 52ch; }

/* tag row */
.post-tags { display: flex; flex-wrap: wrap; gap: .6rem; }

/* featured figure under the hero meta */
.post-hero__fig { margin: clamp(2rem, 4vw, 3rem) 0 0; }

/* ---------------- layout: article + sidebar ---------------- */
.post-layout { display: grid; gap: 3.5rem; }
@media (min-width: 1100px) {
  .post-layout { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; }
}

.post-sidebar { display: grid; gap: 1.25rem; align-content: start; }
@media (min-width: 1100px) {
  .post-sidebar { position: sticky; top: calc(var(--header-h) + 1.5rem); }
}

.side-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 1.4rem 1.4rem 1.5rem;
}
.side-card__label {
  font-family: var(--ff-mono); font-size: .66rem; font-weight: 500;
  letter-spacing: .18em; text-transform: uppercase; color: var(--faint);
  margin-bottom: 1rem;
}
.side-card--cta { background: linear-gradient(160deg, rgba(12,220,42,.1), var(--panel) 55%); border-color: rgba(12,220,42,.28); }
.side-cta__title { font-family: var(--ff-display); font-weight: 600; font-size: 1.25rem; line-height: 1.15; color: var(--off); margin-bottom: .5rem; }
.side-cta__text { font-size: .85rem; color: var(--muted); line-height: 1.55; margin-bottom: 1.1rem; }

/* author card (sidebar) */
.side-author { display: flex; gap: 1rem; align-items: flex-start; }
.side-author__avatar {
  flex: none; width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--ff-display); font-weight: 600; color: #0D0D0D;
  background: linear-gradient(135deg, var(--green), var(--teal-2));
}
.side-author__name { display: block; font-weight: 600; color: var(--off); }
.side-author__role { display: block; font-family: var(--ff-mono); font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; color: var(--teal-2); margin-top: .2rem; }
.side-author__bio { font-size: .8rem; color: var(--muted); line-height: 1.55; margin-top: .55rem; }

/* table of contents */
.side-toc__list { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.side-toc__list li { counter-increment: toc; border-top: 1px solid var(--line); }
.side-toc__list li:first-child { border-top: 0; }
.side-toc__list a {
  display: flex; gap: .7rem; align-items: baseline;
  padding: .6rem 0;
  font-size: .85rem; line-height: 1.35; color: var(--muted);
  text-decoration: none; transition: color .25s;
}
.side-toc__list a::before {
  content: counter(toc, decimal-leading-zero);
  font-family: var(--ff-mono); font-size: .66rem; color: var(--faint); letter-spacing: .06em;
}
.side-toc__list a:hover { color: var(--green); }
.side-toc__list a:hover::before { color: var(--green); }

/* popular / more-in-category links */
.side-poplist { display: grid; }
.side-pop { display: block; text-decoration: none; padding: .7rem 0; border-top: 1px solid var(--line); }
.side-pop:first-child { border-top: 0; padding-top: 0; }
.side-pop__cat { display: block; font-family: var(--ff-mono); font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; color: var(--teal-2); margin-bottom: .25rem; }
.side-pop__title { display: block; font-size: .88rem; font-weight: 600; line-height: 1.3; color: var(--off); transition: color .25s; }
.side-pop:hover .side-pop__title { color: var(--green); }

@media (max-width: 1099px) {
  .post-sidebar { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
}
