/* ==========================================================================
   Arsolia — Blog listing + single article
   ========================================================================== */

/* Shared meta line: Category · Date · Read time */
.blog-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-mute);
}

.blog-meta a {
  color: var(--color-sage);
  text-decoration: none;
}

.blog-meta a:hover {
  text-decoration: underline;
}

/* ---------- Listing hero ---------- */
.blog-hero {
  padding: clamp(8.5rem, 16vh, 11rem) 0 clamp(3rem, 6vw, 4.5rem);
}

.blog-hero__content {
  max-width: 48rem;
  margin-inline: auto;
  text-align: center;
}

.blog-hero__title {
  margin-top: 1rem;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -0.01em;
}

.blog-hero__title em {
  font-style: italic;
  color: var(--color-sage);
}

.blog-hero__lead {
  margin: 1.25rem auto 0;
  max-width: 36rem;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--color-mute);
}

.blog-topics {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
}

.blog-topic {
  display: inline-flex;
  align-items: center;
  height: 2.1rem;
  padding: 0 1rem;
  border: 1px solid var(--color-line-strong);
  border-radius: 999px;
  font-size: 0.8rem;
  color: var(--color-paper);
  text-decoration: none;
  transition: background-color 0.3s var(--ease-out), color 0.3s var(--ease-out), border-color 0.3s var(--ease-out);
}

.blog-topic:hover {
  background: rgb(255 255 255 / 0.6);
}

.blog-topic.is-active {
  background: var(--color-paper);
  border-color: var(--color-paper);
  color: var(--color-ink);
}

/* ---------- Cards ---------- */
.blog-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 700px) {
  .blog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1000px) {
  .blog-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.blog-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--color-line);
  border-radius: 1.25rem;
  background: rgb(255 255 255 / 0.48);
  transition: transform 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out);
}

.blog-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px -24px rgb(28 26 23 / 0.35);
}

.blog-card__media {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--color-ink-deep);
}

.blog-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s var(--ease-out);
}

.blog-card:hover .blog-card__media img {
  transform: scale(1.03);
}

.blog-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 1.4rem 1.4rem 1.5rem;
}

.blog-card__title {
  margin-top: 0.8rem;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.45rem;
  line-height: 1.15;
}

.blog-card__title a {
  color: inherit;
  text-decoration: none;
}

.blog-card__title a::after {
  /* Whole card clickable */
  content: "";
  position: absolute;
  inset: 0;
}

.blog-card {
  position: relative;
}

.blog-card__excerpt {
  margin-top: 0.75rem;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--color-mute);
}

.blog-card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: auto;
  padding-top: 1.25rem;
  font-size: 0.82rem;
  color: var(--color-paper);
}

/* Featured (latest) article spans the full row */
@media (min-width: 700px) {
  .blog-card--featured {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  }

  .blog-card--featured .blog-card__media {
    aspect-ratio: auto;
    min-height: 22rem;
  }

  .blog-card--featured .blog-card__body {
    justify-content: center;
    padding: clamp(1.75rem, 4vw, 3rem);
  }

  .blog-card--featured .blog-card__title {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    line-height: 1.08;
  }

  .blog-card--featured .blog-card__excerpt {
    font-size: 0.95rem;
  }

  .blog-card--featured .blog-card__link {
    margin-top: 0;
    padding-top: 1.75rem;
  }
}

.blog-empty {
  text-align: center;
  color: var(--color-mute);
}

.blog-pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2.5rem;
}

.blog-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 0.8rem;
  border: 1px solid var(--color-line-strong);
  border-radius: 999px;
  font-size: 0.82rem;
  color: var(--color-paper);
  text-decoration: none;
}

.blog-pagination .page-numbers.current {
  background: var(--color-paper);
  color: var(--color-ink);
}

/* ---------- Single article ---------- */
.post-hero {
  padding: clamp(8rem, 15vh, 10rem) 0 0;
}

.post-hero__content {
  max-width: 50rem;
  margin-inline: auto;
  text-align: center;
}

.post-hero__content .blog-meta {
  justify-content: center;
  margin-top: 1.75rem;
}

.post-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--color-mute);
  text-decoration: none;
}

.post-back:hover {
  color: var(--color-paper);
}

.post-hero__title {
  margin-top: 1rem;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.2rem, 4.6vw, 3.6rem);
  line-height: 1.06;
  letter-spacing: -0.01em;
}

.post-hero__lead {
  margin: 1.25rem auto 0;
  max-width: 38rem;
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--color-mute);
}

.post-hero__media {
  max-width: 64rem;
  margin-top: clamp(2rem, 5vw, 3.25rem);
}

.post-hero__media img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 34rem;
  object-fit: cover;
  border-radius: 1.5rem;
}

.post-body-section {
  padding-top: clamp(2.5rem, 6vw, 4.5rem);
}

.post-layout {
  display: grid;
  gap: 3rem;
  max-width: 64rem;
}

@media (min-width: 1000px) {
  .post-layout {
    grid-template-columns: minmax(0, 1fr) 17rem;
    gap: 4rem;
    align-items: start;
  }
}

/* Article prose */
.post-content {
  max-width: 42rem;
  font-size: 1.02rem;
  line-height: 1.75;
  color: var(--color-stone);
}

.post-content > * + * {
  margin-top: 1.1rem;
}

.post-content h2 {
  margin-top: 3rem;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  line-height: 1.12;
  color: var(--color-paper);
  scroll-margin-top: 6rem;
}

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

.post-content h3 {
  margin-top: 2rem;
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--color-paper);
}

.post-content p {
  margin-bottom: 0;
}

.post-content strong {
  font-weight: 600;
  color: var(--color-paper);
}

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

.post-content ul,
.post-content ol {
  padding-left: 0;
  list-style: none;
}

.post-content ul li,
.post-content ol li {
  position: relative;
  padding-left: 1.5rem;
}

.post-content ul li + li,
.post-content ol li + li {
  margin-top: 0.45rem;
}

.post-content ul li::before {
  content: "";
  position: absolute;
  left: 0.2rem;
  top: 0.72em;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--color-sage);
  opacity: 0.75;
}

.post-content ul.is-style-chips,
.post-content .post-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.post-content .post-chips li {
  margin: 0;
  padding: 0.35rem 0.85rem;
  border: 1px solid var(--color-line-strong);
  border-radius: 999px;
  font-size: 0.86rem;
  background: rgb(255 255 255 / 0.5);
}

.post-content .post-chips li::before {
  display: none;
}

.post-content figure {
  margin: 2.25rem 0;
}

.post-content figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 1.25rem;
}

.post-content figcaption {
  margin-top: 0.6rem;
  font-size: 0.8rem;
  color: var(--color-mute);
  text-align: center;
}

.post-content blockquote {
  margin: 2.25rem 0;
  padding: 1.5rem 1.75rem;
  border-left: 2px solid var(--color-sage);
  border-radius: 0 1rem 1rem 0;
  background: rgb(255 255 255 / 0.5);
  font-family: var(--font-display);
  font-size: 1.45rem;
  line-height: 1.3;
  color: var(--color-paper);
}

.post-content blockquote p {
  margin: 0;
}

/* Sidebar */
.post-aside {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 1000px) {
  .post-aside {
    position: sticky;
    top: 6.5rem;
  }
}

.post-aside__label {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-mute);
}

.post-toc ol {
  margin: 0.9rem 0 0;
  padding: 0;
  list-style: none;
  border-left: 1px solid var(--color-line-strong);
}

.post-toc li a {
  display: block;
  padding: 0.35rem 0 0.35rem 0.9rem;
  margin-left: -1px;
  border-left: 1px solid transparent;
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--color-mute);
  text-decoration: none;
  transition: color 0.25s var(--ease-out), border-color 0.25s var(--ease-out);
}

.post-toc li a:hover,
.post-toc li a.is-current {
  color: var(--color-paper);
  border-left-color: var(--color-sage);
}

.post-cta {
  padding: 1.5rem;
  border: 1px solid var(--color-line);
  border-radius: 1.25rem;
  background: rgb(255 255 255 / 0.55);
}

.post-cta__title {
  margin-top: 0.7rem;
  font-family: var(--font-display);
  font-size: 1.4rem;
  line-height: 1.15;
}

.post-cta__copy {
  margin: 0.6rem 0 1.2rem;
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--color-mute);
}

.post-cta .btn {
  width: 100%;
  justify-content: center;
}

.post-cta__link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.9rem;
  font-size: 0.8rem;
  color: var(--color-paper);
}

.post-related__title {
  margin: 0.6rem 0 2rem;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.9rem, 3.5vw, 2.6rem);
}
