/* ==========================================================================
   NaturEnergie — "Herbier Éditorial" Theme
   A refined French editorial aesthetic crossed with botanical warmth.
   ========================================================================== */

/* 1. CSS Custom Properties
   ========================================================================== */

:root {
  /* Colors */
  --ne-ink:           #1C1917;
  --ne-paper:         #FAF8F5;
  --ne-paper-alt:     #F3EFE8;
  --ne-forest:        #2D4A3E;
  --ne-forest-light:  #3D6B5A;
  --ne-terracotta:    #C26A3A;
  --ne-sage:          #8B9E8B;
  --ne-stone:         #78716C;

  /* Category accents */
  --cat-sante:        #3A7D5C;
  --cat-bienetre:     #7C6B8A;
  --cat-alimentation: #B8860B;
  --cat-beaute:       #C08080;
  --cat-maison:       #5B8C5A;
  --cat-actualites:   #3B5998;

  /* Typography */
  --font-display:     'Cormorant Garamond', Georgia, serif;
  --font-body:        'Source Serif 4', Georgia, serif;
  --font-ui:          'DM Sans', system-ui, sans-serif;

  /* Sizing */
  --content-width:    720px;
  --grid-width:       1200px;
  --radius:           6px;
  --radius-lg:        12px;

  /* Spacing scale */
  --sp-xs:  0.25rem;
  --sp-sm:  0.5rem;
  --sp-md:  1rem;
  --sp-lg:  1.5rem;
  --sp-xl:  2.5rem;
  --sp-2xl: 4rem;
  --sp-3xl: 6rem;
}

/* 2. Reset & Base
   ========================================================================== */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 100%;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--ne-ink);
  background-color: var(--ne-paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background-color: var(--ne-forest);
  color: var(--ne-paper);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--ne-forest);
  text-decoration-color: var(--ne-sage);
  text-underline-offset: 0.15em;
  transition: color 0.2s, text-decoration-color 0.2s;
}

a:hover {
  color: var(--ne-forest-light);
  text-decoration-color: var(--ne-forest-light);
}

button {
  font-family: var(--font-ui);
  cursor: pointer;
  border: none;
  background: none;
}

ul, ol {
  list-style: none;
}

/* 3. Typography
   ========================================================================== */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  color: var(--ne-ink);
}

h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  letter-spacing: -0.01em;
}

h3 {
  font-size: clamp(1.25rem, 2.5vw, 1.625rem);
}

h4 {
  font-size: 1.25rem;
}

.font-display { font-family: var(--font-display); }
.font-body    { font-family: var(--font-body); }
.font-ui      { font-family: var(--font-ui); }

.text-stone { color: var(--ne-stone); }

small, .text-sm {
  font-size: 0.875rem;
}

/* 4. Layout
   ========================================================================== */

.container {
  width: 100%;
  max-width: var(--grid-width);
  margin-inline: auto;
  padding-inline: var(--sp-md);
}

.container--narrow {
  max-width: var(--content-width);
}

.section {
  padding-block: var(--sp-2xl);
}

/* Article grid */
.article-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-lg);
}

@media (min-width: 768px) {
  .article-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .article-grid--asymmetric > :first-child {
    grid-column: 1 / -1;
  }
}

@media (min-width: 1024px) {
  .article-grid {
    gap: var(--sp-xl);
  }
}

/* Post layout with sidebar */
.post-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-xl);
  max-width: calc(var(--content-width) + 280px);
  margin-inline: auto;
}

@media (min-width: 1024px) {
  .post-layout {
    grid-template-columns: 220px 1fr;
  }
}

/* 5. Components
   ========================================================================== */

/* --- Reading Progress Bar --- */

.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: var(--ne-forest);
  z-index: 1000;
  transition: width 0.1s linear;
}

/* --- Site Header --- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--ne-paper);
  border-bottom: 1px solid var(--ne-sage);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.site-logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ne-forest);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.site-logo:hover {
  color: var(--ne-forest-light);
}

/* Desktop nav */
.nav-desktop {
  display: none;
  align-items: center;
  gap: var(--sp-lg);
}

.nav-desktop a {
  font-family: var(--font-ui);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ne-stone);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: color 0.2s;
}

.nav-desktop a:hover,
.nav-desktop a[aria-current="page"] {
  color: var(--ne-forest);
}

/* Hamburger (mobile only) */
.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 28px;
  padding: 0;
}

@media (min-width: 768px) {
  .nav-desktop {
    display: flex;
  }

  .nav-toggle {
    display: none;
  }
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--ne-ink);
  border-radius: 1px;
  transition: transform 0.3s, opacity 0.3s;
}

body.nav-open .nav-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
body.nav-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}
body.nav-open .nav-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile nav panel */
.nav-mobile {
  position: fixed;
  top: 64px;
  right: 0;
  bottom: 0;
  width: 280px;
  background: var(--ne-paper);
  border-left: 1px solid var(--ne-sage);
  padding: var(--sp-xl) var(--sp-lg);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  z-index: 99;
  overflow-y: auto;
}

body.nav-open .nav-mobile {
  transform: translateX(0);
}

.nav-mobile a {
  display: block;
  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 500;
  color: var(--ne-ink);
  text-decoration: none;
  padding-block: var(--sp-sm);
  border-bottom: 1px solid var(--ne-paper-alt);
}

.nav-mobile a:hover {
  color: var(--ne-forest);
}

.nav-overlay {
  position: fixed;
  inset: 0;
  top: 64px;
  background: rgba(28, 25, 23, 0.3);
  z-index: 98;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

body.nav-open .nav-overlay {
  opacity: 1;
  pointer-events: auto;
}

/* --- Site Footer --- */

.site-footer {
  border-top: 1px solid var(--ne-sage);
  padding-block: var(--sp-2xl);
  margin-top: var(--sp-3xl);
}

.footer-botanical {
  display: flex;
  justify-content: center;
  margin-bottom: var(--sp-xl);
  color: var(--ne-sage);
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-lg);
  text-align: center;
}

.footer-links {
  display: flex;
  gap: var(--sp-lg);
}

.footer-links a {
  font-family: var(--font-ui);
  font-size: 0.875rem;
  color: var(--ne-stone);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--ne-forest);
}

.footer-copy {
  font-family: var(--font-ui);
  font-size: 0.8125rem;
  color: var(--ne-stone);
}

/* Newsletter CTA */
.newsletter {
  background: var(--ne-paper-alt);
  border-radius: var(--radius-lg);
  padding: var(--sp-xl);
  text-align: center;
  max-width: 480px;
  margin-inline: auto;
  margin-bottom: var(--sp-xl);
}

.newsletter h3 {
  margin-bottom: var(--sp-sm);
}

.newsletter p {
  font-size: 0.9375rem;
  color: var(--ne-stone);
  margin-bottom: var(--sp-md);
}

.newsletter-form {
  display: flex;
  gap: var(--sp-sm);
}

.newsletter-form input[type="email"] {
  flex: 1;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--ne-sage);
  border-radius: var(--radius);
  font-family: var(--font-ui);
  font-size: 0.875rem;
  background: var(--ne-paper);
  color: var(--ne-ink);
}

.newsletter-form input[type="email"]:focus {
  outline: 2px solid var(--ne-forest);
  outline-offset: 1px;
  border-color: transparent;
}

.newsletter-form button {
  padding: 0.625rem 1.25rem;
  background: var(--ne-terracotta);
  color: white;
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: var(--radius);
  transition: background 0.2s;
  white-space: nowrap;
}

.newsletter-form button:hover {
  background: #A8572E;
}

/* --- Category Pill --- */

.cat-pill {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.2em 0.7em;
  border-radius: 100px;
  text-decoration: none;
  color: white;
  background: var(--ne-forest);
  transition: opacity 0.2s;
}

.cat-pill:hover {
  opacity: 0.85;
  color: white;
}

.cat-pill--sante         { background: var(--cat-sante); }
.cat-pill--bienetre      { background: var(--cat-bienetre); }
.cat-pill--alimentation  { background: var(--cat-alimentation); }
.cat-pill--beaute        { background: var(--cat-beaute); }
.cat-pill--maison        { background: var(--cat-maison); }
.cat-pill--actualites    { background: var(--cat-actualites); }

/* Category pill bar (horizontal scroll) */
.cat-bar {
  display: flex;
  gap: var(--sp-sm);
  overflow-x: auto;
  padding-block: var(--sp-sm);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.cat-bar::-webkit-scrollbar {
  display: none;
}

.cat-bar .cat-pill {
  flex-shrink: 0;
  font-size: 0.8125rem;
  padding: 0.35em 1em;
}

/* --- Article Card --- */

.article-card {
  display: flex;
  flex-direction: column;
  background: var(--ne-paper);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow 0.3s, transform 0.2s;
}

.article-card:hover {
  box-shadow: 0 8px 30px rgba(28, 25, 23, 0.08);
  transform: translateY(-2px);
}

.article-card__image {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.article-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.article-card:hover .article-card__image img {
  transform: scale(1.03);
}

.article-card__body {
  padding: var(--sp-lg);
  display: flex;
  flex-direction: column;
  flex: 1;
}

.article-card__cat {
  margin-bottom: var(--sp-sm);
}

.article-card__title {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: var(--sp-sm);
}

.article-card__title a {
  color: var(--ne-ink);
  text-decoration: none;
}

.article-card__title a:hover {
  color: var(--ne-forest);
}

.article-card__excerpt {
  font-size: 0.9375rem;
  color: var(--ne-stone);
  line-height: 1.6;
  margin-bottom: var(--sp-md);
  flex: 1;
}

.article-card__meta {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  font-family: var(--font-ui);
  font-size: 0.8125rem;
  color: var(--ne-stone);
}

.article-card__meta img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

.article-card__meta span::before {
  content: "\00B7";
  margin-right: var(--sp-sm);
}

.article-card__meta span:first-of-type::before {
  content: none;
}

/* Hero card variant */
.article-card--hero {
  position: relative;
  min-height: 420px;
}

.article-card--hero .article-card__image {
  position: absolute;
  inset: 0;
  aspect-ratio: auto;
}

.article-card--hero .article-card__image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(28, 25, 23, 0.75) 0%, rgba(28, 25, 23, 0.1) 60%, transparent 100%);
}

.article-card--hero .article-card__body {
  position: relative;
  z-index: 1;
  justify-content: flex-end;
  min-height: 420px;
  padding: var(--sp-xl);
}

.article-card--hero .article-card__title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  color: white;
}

.article-card--hero .article-card__title a {
  color: white;
}

.article-card--hero .article-card__excerpt {
  color: rgba(255, 255, 255, 0.85);
  flex: unset;
}

.article-card--hero .article-card__meta {
  color: rgba(255, 255, 255, 0.75);
}

/* --- Author Card (compact, used in posts) --- */

.author-card {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
}

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

.author-card__info {
  font-family: var(--font-ui);
  font-size: 0.875rem;
}

.author-card__name {
  font-weight: 600;
  color: var(--ne-ink);
}

.author-card__name a {
  color: inherit;
  text-decoration: none;
}

.author-card__name a:hover {
  color: var(--ne-forest);
}

.author-card__detail {
  color: var(--ne-stone);
  font-size: 0.8125rem;
}

/* Author card — large variant (author page) */
.author-hero {
  text-align: center;
  padding-block: var(--sp-2xl);
}

.author-hero__avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin-inline: auto;
  margin-bottom: var(--sp-lg);
  border: 3px solid var(--ne-sage);
}

.author-hero__name {
  margin-bottom: var(--sp-sm);
}

.author-hero__badge {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.25em 0.75em;
  border-radius: 100px;
  background: var(--ne-paper-alt);
  color: var(--ne-stone);
  margin-bottom: var(--sp-md);
}

.author-hero__bio {
  max-width: var(--content-width);
  margin-inline: auto;
  color: var(--ne-stone);
  font-size: 1rem;
  line-height: 1.7;
}

/* --- Author Bio Box (end of post) --- */

.author-bio-box {
  display: flex;
  gap: var(--sp-lg);
  padding: var(--sp-xl);
  background: var(--ne-paper-alt);
  border-radius: var(--radius-lg);
  margin-top: var(--sp-2xl);
}

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

.author-bio-box__name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: var(--sp-xs);
}

.author-bio-box__name a {
  color: var(--ne-ink);
  text-decoration: none;
}

.author-bio-box__name a:hover {
  color: var(--ne-forest);
}

.author-bio-box__text {
  font-size: 0.9375rem;
  color: var(--ne-stone);
  line-height: 1.6;
}

@media (max-width: 600px) {
  .author-bio-box {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

/* Authors grid (authors listing page) */
.authors-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-lg);
}

@media (min-width: 768px) {
  .authors-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .authors-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.author-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
  color: var(--ne-ink);
  padding: var(--sp-xl);
  background: var(--ne-paper-alt);
  border-radius: var(--radius-lg);
  transition: box-shadow 0.3s, transform 0.2s;
}

.author-preview:hover {
  box-shadow: 0 8px 30px rgba(28, 25, 23, 0.08);
  transform: translateY(-2px);
  color: var(--ne-ink);
}

.author-preview__avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: var(--sp-md);
  border: 2px solid var(--ne-sage);
}

.author-preview__name {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 600;
  margin-bottom: var(--sp-xs);
}

.author-preview__bio {
  font-size: 0.9375rem;
  color: var(--ne-stone);
  line-height: 1.6;
  margin-top: var(--sp-sm);
}

/* --- Table of Contents --- */

.toc {
  font-family: var(--font-ui);
  font-size: 0.8125rem;
}

.toc__title {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ne-stone);
  margin-bottom: var(--sp-md);
  font-size: 0.75rem;
}

.toc__list {
  border-left: 2px solid var(--ne-paper-alt);
}

.toc__list a {
  display: block;
  padding: var(--sp-xs) var(--sp-md);
  color: var(--ne-stone);
  text-decoration: none;
  border-left: 2px solid transparent;
  margin-left: -2px;
  transition: color 0.2s, border-color 0.2s;
  line-height: 1.4;
}

.toc__list a:hover {
  color: var(--ne-forest);
}

.toc__list a.active {
  color: var(--ne-forest);
  border-left-color: var(--ne-forest);
  font-weight: 600;
}

.toc__list a[data-level="3"] {
  padding-left: calc(var(--sp-md) + var(--sp-md));
  font-size: 0.75rem;
}

/* Desktop: sticky sidebar */
@media (min-width: 1024px) {
  .toc--sidebar {
    position: sticky;
    top: 84px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
  }
}

/* Mobile: collapsible */
.toc--mobile {
  background: var(--ne-paper-alt);
  border-radius: var(--radius);
  padding: var(--sp-md);
  margin-bottom: var(--sp-xl);
}

.toc--mobile .toc__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  font-family: var(--font-ui);
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ne-stone);
  padding: 0;
}

.toc--mobile .toc__toggle svg {
  transition: transform 0.2s;
}

.toc--mobile[open] .toc__toggle svg {
  transform: rotate(180deg);
}

.toc--mobile .toc__list {
  margin-top: var(--sp-md);
}

@media (min-width: 1024px) {
  .toc--mobile {
    display: none;
  }
}

@media (max-width: 1023px) {
  .toc--sidebar {
    display: none;
  }
}

/* --- Related Articles --- */

.related {
  margin-top: var(--sp-2xl);
  padding-top: var(--sp-2xl);
  border-top: 1px solid var(--ne-paper-alt);
}

.related__title {
  text-align: center;
  margin-bottom: var(--sp-xl);
}

.related__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-lg);
}

@media (min-width: 768px) {
  .related__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* --- Section Header --- */

.section-header {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: var(--sp-xl);
  padding-bottom: var(--sp-sm);
  border-bottom: 2px solid var(--ne-paper-alt);
}

/* --- Category Page Header --- */

.category-header {
  padding-block: var(--sp-2xl);
  border-top: 4px solid var(--ne-forest);
}

.category-header__name {
  margin-bottom: var(--sp-sm);
}

.category-header__description {
  color: var(--ne-stone);
  font-size: 1.0625rem;
  max-width: var(--content-width);
}

/* Dynamic accent border per category */
.category-header--sante         { border-top-color: var(--cat-sante); }
.category-header--bienetre      { border-top-color: var(--cat-bienetre); }
.category-header--alimentation  { border-top-color: var(--cat-alimentation); }
.category-header--beaute        { border-top-color: var(--cat-beaute); }
.category-header--maison        { border-top-color: var(--cat-maison); }
.category-header--actualites    { border-top-color: var(--cat-actualites); }

/* --- Pagination --- */

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--sp-sm);
  margin-top: var(--sp-2xl);
  font-family: var(--font-ui);
  font-size: 0.875rem;
}

.pagination a,
.pagination span {
  padding: 0.5em 0.85em;
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--ne-stone);
  transition: background 0.2s, color 0.2s;
}

.pagination a:hover {
  background: var(--ne-paper-alt);
  color: var(--ne-ink);
}

.pagination .active {
  background: var(--ne-forest);
  color: white;
}

/* 6. Article Content (prose)
   ========================================================================== */

.prose {
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--ne-ink);
}

.prose > * + * {
  margin-top: 1.5em;
}

.prose h2 {
  margin-top: 2.5em;
  padding-left: var(--sp-md);
  border-left: 3px solid var(--ne-forest);
}

.prose h3 {
  margin-top: 2em;
  padding-left: var(--sp-md);
  border-left: 3px solid var(--ne-sage);
}

/* Category-specific heading borders via parent class */
.prose--sante h2         { border-left-color: var(--cat-sante); }
.prose--bienetre h2      { border-left-color: var(--cat-bienetre); }
.prose--alimentation h2  { border-left-color: var(--cat-alimentation); }
.prose--beaute h2        { border-left-color: var(--cat-beaute); }
.prose--maison h2        { border-left-color: var(--cat-maison); }
.prose--actualites h2    { border-left-color: var(--cat-actualites); }

.prose p {
  hyphens: auto;
}

.prose ul,
.prose ol {
  padding-left: 1.5em;
}

.prose ul {
  list-style: disc;
}

.prose ol {
  list-style: decimal;
}

.prose li + li {
  margin-top: 0.5em;
}

.prose blockquote {
  background: var(--ne-paper-alt);
  border-left: 3px solid var(--ne-sage);
  padding: var(--sp-lg);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--ne-stone);
}

.prose blockquote p {
  margin: 0;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.prose th {
  font-family: var(--font-ui);
  font-weight: 600;
  text-align: left;
  padding: 0.75em;
  border-bottom: 2px solid var(--ne-paper-alt);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ne-stone);
}

.prose td {
  padding: 0.75em;
  border-bottom: 1px solid var(--ne-paper-alt);
}

.prose figure {
  margin-block: 2em;
}

.prose figure img {
  border-radius: var(--radius);
}

.prose figcaption {
  font-family: var(--font-ui);
  font-size: 0.8125rem;
  color: var(--ne-stone);
  text-align: center;
  margin-top: var(--sp-sm);
}

.prose code {
  font-size: 0.875em;
  background: var(--ne-paper-alt);
  padding: 0.15em 0.4em;
  border-radius: 3px;
}

.prose pre {
  background: var(--ne-ink);
  color: var(--ne-paper);
  padding: var(--sp-lg);
  border-radius: var(--radius);
  overflow-x: auto;
  font-size: 0.875rem;
  line-height: 1.5;
}

.prose pre code {
  background: none;
  padding: 0;
  color: inherit;
}

.prose iframe,
.prose .embed {
  width: 100%;
  border-radius: var(--radius);
  margin-block: 2em;
}

.prose a {
  text-decoration: underline;
  text-decoration-color: var(--ne-sage);
}

.prose strong {
  font-weight: 700;
}

/* 7. Botanical Accents
   ========================================================================== */

.botanical-divider {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-block: var(--sp-2xl);
  color: var(--ne-sage);
  opacity: 0.6;
}

.botanical-divider svg {
  width: 80px;
  height: auto;
}

/* 8. Post Hero
   ========================================================================== */

.post-hero {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 520px;
  overflow: hidden;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.post-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-hero::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40%;
  background: linear-gradient(to top, rgba(28, 25, 23, 0.3), transparent);
}

.post-title-block {
  text-align: center;
  padding: var(--sp-2xl) var(--sp-md);
  max-width: var(--content-width);
  margin-inline: auto;
}

.post-title-block .cat-pill {
  margin-bottom: var(--sp-md);
}

.post-title-block h1 {
  margin-bottom: var(--sp-md);
}

.post-title-block__excerpt {
  font-style: italic;
  color: var(--ne-stone);
  font-size: 1.1875rem;
  line-height: 1.6;
  margin-bottom: var(--sp-lg);
}

.post-title-block .author-card {
  justify-content: center;
}

/* 9. 404 Page
   ========================================================================== */

.page-404 {
  text-align: center;
  padding: var(--sp-3xl) var(--sp-md);
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.page-404__illustration {
  color: var(--ne-sage);
  margin-bottom: var(--sp-xl);
}

.page-404 h1 {
  margin-bottom: var(--sp-md);
}

.page-404 p {
  color: var(--ne-stone);
  margin-bottom: var(--sp-xl);
  max-width: 420px;
}

.page-404__home {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.75em 1.5em;
  background: var(--ne-forest);
  color: white;
  text-decoration: none;
  border-radius: var(--radius);
  transition: background 0.2s;
}

.page-404__home:hover {
  background: var(--ne-forest-light);
  color: white;
}

/* 10. Utilities
   ========================================================================== */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 767px) {
  .hide-mobile { display: none !important; }
}

@media (min-width: 768px) {
  .hide-desktop { display: none !important; }
}
