/* ==========================================================================
   Celestial Voyance — Blog Theme
   Shares the design system with the main Vite app. Unified celestial dark
   theme with layered surfaces, soft gold accents, subtle cosmic animation.
   ========================================================================== */

/* Self-hosted Material Symbols — same variable font as the Vite app, served
   from the theme's own assets so there's no Google Fonts round-trip and no
   ligature flash on slow networks. font-display:block hides the text until
   the font has actually loaded. */
@font-face {
  font-family: "Material Symbols Outlined";
  font-style: normal;
  font-weight: 100 700;
  font-display: block;
  src: url("../fonts/material-symbols-outlined.woff2") format("woff2");
}
.material-symbols-outlined {
  font-family: "Material Symbols Outlined";
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "liga";
}

:root {
  /* Base surfaces — same tokens as the main app */
  --background: #10151f;
  --surface: #10151f;
  --surface-dim: #0b0f17;
  --surface-bright: #323848;
  --surface-container-lowest: #080c14;
  --surface-container-low: #151a25;
  --surface-container: #1a202c;
  --surface-container-high: #232938;
  --surface-container-highest: #2c3342;

  --primary: #e9c349;
  --primary-fixed: #ffe088;
  --primary-container: #1f1705;
  --on-primary: #3c2f00;

  --on-surface: #e3e5f0;
  --on-surface-variant: #b8bcc9;
  --on-background: #e3e5f0;

  --secondary: #c2c9e3;
  --secondary-container: #3b4360;

  --outline: #8a8e99;
  --outline-variant: #3a3f4d;

  --error: #ffb4ab;

  --gold-soft: rgba(233, 195, 73, 0.55);
  --gold-dim: rgba(233, 195, 73, 0.18);
  --gold-faint: rgba(233, 195, 73, 0.06);
  --nebula-violet: rgba(78, 50, 140, 0.3);
  --nebula-indigo: rgba(38, 30, 96, 0.35);
  --star-white: rgba(220, 215, 255, 0.55);
  --star-faint: rgba(220, 215, 255, 0.22);

  --radius-card: 20px;
  --radius-lg: 16px;
  --radius-md: 12px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);

  --font-headline: "Noto Serif", serif;
  --font-body: "Manrope", sans-serif;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  background: var(--background);
}

body {
  background: var(--background);
  color: var(--on-surface);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100dvh;
  position: relative;
}

::selection {
  background: var(--primary);
  color: var(--on-primary);
}

*:focus-visible {
  outline: 1px solid rgba(233, 195, 73, 0.55);
  outline-offset: 2px;
  border-radius: 6px;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.25s var(--ease-out);
}

a:hover {
  color: var(--primary-fixed);
}

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

/* ==========================================================================
   Ambient celestial background — same as the main app
   ========================================================================== */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 20% 10%, rgba(56, 36, 112, 0.28) 0%, transparent 60%),
    radial-gradient(ellipse 70% 60% at 85% 25%, rgba(38, 30, 96, 0.25) 0%, transparent 60%),
    radial-gradient(ellipse 90% 60% at 50% 95%, rgba(30, 22, 70, 0.3) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 15% 80%, rgba(233, 195, 73, 0.04) 0%, transparent 55%),
    linear-gradient(180deg, #10151f 0%, #0d121c 50%, #10151f 100%);
  background-size: 200% 200%;
  animation: nebulaDrift 40s ease-in-out infinite;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(1px 1px at 12% 18%, var(--star-white), transparent 55%),
    radial-gradient(1px 1px at 28% 62%, var(--star-faint), transparent 55%),
    radial-gradient(1px 1px at 48% 14%, var(--star-white), transparent 55%),
    radial-gradient(1.2px 1.2px at 62% 78%, var(--star-faint), transparent 55%),
    radial-gradient(1px 1px at 76% 32%, var(--star-white), transparent 55%),
    radial-gradient(1px 1px at 86% 70%, var(--star-faint), transparent 55%),
    radial-gradient(1px 1px at 8% 88%, var(--star-faint), transparent 55%),
    radial-gradient(1px 1px at 38% 38%, var(--star-faint), transparent 55%),
    radial-gradient(1.2px 1.2px at 92% 12%, var(--star-white), transparent 55%),
    radial-gradient(1px 1px at 56% 48%, var(--star-faint), transparent 55%);
  opacity: 0.65;
  animation: starTwinkle 6s ease-in-out infinite;
}

/* Subtle parchment noise overlay */
.parchment-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* ==========================================================================
   Header — glass bar with golden hairline
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(180deg, rgba(16, 21, 31, 0.82) 0%, rgba(16, 21, 31, 0.68) 100%);
  backdrop-filter: blur(18px) saturate(130%);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
  border-bottom: none;
  isolation: isolate;
}

.site-header::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(233, 195, 73, 0.35) 30%,
    rgba(198, 198, 205, 0.18) 55%,
    rgba(233, 195, 73, 0.32) 80%,
    transparent 100%
  );
  pointer-events: none;
}

.site-header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1536px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  gap: 1rem;
}

@media (min-width: 768px) {
  .site-header-inner {
    padding: 1rem 2.5rem;
  }
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-headline);
  font-style: italic;
  font-size: 1.35rem;
  color: var(--primary-fixed);
  letter-spacing: -0.03em;
  text-decoration: none;
  line-height: 1;
}

@media (min-width: 768px) {
  .site-logo {
    font-size: 1.5rem;
  }
}

.site-logo::before {
  content: "";
  display: inline-block;
  width: 22px;
  height: 22px;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='16' cy='16' r='13.5' fill='none' stroke='%23e9c349' stroke-opacity='0.4' stroke-width='0.6'/%3E%3Cpath d='M16 3 L18.2 13.8 L29 16 L18.2 18.2 L16 29 L13.8 18.2 L3 16 L13.8 13.8 Z' fill='%23e9c349' fill-opacity='0.85'/%3E%3Ccircle cx='16' cy='16' r='1.4' fill='%230b0f17'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
  filter: drop-shadow(0 0 6px rgba(233, 195, 73, 0.35));
  transition: filter 0.4s var(--ease-out);
}

.site-logo:hover::before {
  filter: drop-shadow(0 0 10px rgba(233, 195, 73, 0.55));
}

.site-nav {
  display: flex;
  gap: 2.25rem;
  align-items: center;
}

.site-nav a {
  position: relative;
  color: var(--on-surface-variant);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-family: var(--font-body);
  font-weight: 500;
  transition: color 0.3s var(--ease-out);
  padding-bottom: 6px;
}

.site-nav a:not(.lang-btn)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(233, 195, 73, 0.7), transparent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.45s var(--ease-out);
}

.site-nav a:hover:not(.lang-btn),
.site-nav a.active:not(.lang-btn) {
  color: var(--primary);
}

.site-nav a:hover:not(.lang-btn)::after,
.site-nav a.active:not(.lang-btn)::after {
  transform: scaleX(1);
}

/* Language Switcher */
.lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  background: rgba(21, 26, 37, 0.75);
  border: 1px solid rgba(233, 195, 73, 0.1);
  border-radius: 9999px;
  padding: 0.25rem;
  margin-left: 1rem;
}

.site-nav .lang-switcher a.lang-btn,
.lang-btn {
  padding: 0.28rem 0.7rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 600;
  font-family: var(--font-body);
  color: var(--on-surface-variant);
  text-decoration: none;
  text-transform: none;
  letter-spacing: 0;
  border: none;
  transition: all 0.3s var(--ease-out);
}
.site-nav .lang-switcher a.lang-btn::after,
.lang-btn::after { display: none !important; }

.site-nav .lang-switcher a.lang-btn:hover,
.lang-btn:hover {
  color: var(--primary);
}

.site-nav .lang-switcher a.lang-btn.active,
.lang-btn.active {
  background: var(--primary);
  color: var(--on-primary);
  box-shadow: 0 2px 10px rgba(233, 195, 73, 0.3);
  font-family: var(--font-body);
  font-size: 0.7rem;
  letter-spacing: 0;
  text-transform: none;
  padding-bottom: 0.28rem;
}

/* ==========================================================================
   Mobile breakpoint — hide the desktop primary nav, lean on the bottom pill.
   ========================================================================== */
@media (max-width: 767px) {
  .site-nav {
    display: none;
  }

  .site-logo {
    gap: 0.5rem;
  }

  .lang-switcher {
    margin-left: 0;
    padding: 0.2rem;
    gap: 0.1rem;
  }

  .lang-btn,
  .site-nav .lang-switcher a.lang-btn {
    padding: 0.24rem 0.55rem;
    font-size: 0.66rem;
  }

  /* Make sure floating bottom pill never overlaps page footer / content */
  body {
    padding-bottom: 5rem;
  }
}

/* ==========================================================================
   Floating bottom pill nav — mirrors src/components/BottomNav.tsx
   Visible only on mobile.
   ========================================================================== */
.blog-bottom-nav {
  display: none;
}

@media (max-width: 767px) {
  .blog-bottom-nav {
    display: block;
    position: fixed;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 50;
    width: calc(100% - 2rem);
    max-width: 28rem;
    pointer-events: none;
  }
}

.blog-bottom-nav-inner {
  position: relative;
  display: flex;
  justify-content: space-around;
  align-items: stretch;
  gap: 0.25rem;
  padding: 0.5rem 0.75rem;
  border-radius: 9999px;
  pointer-events: auto;
  background: linear-gradient(180deg, rgba(22, 28, 40, 0.88) 0%, rgba(16, 21, 31, 0.88) 100%);
  backdrop-filter: blur(18px) saturate(135%);
  -webkit-backdrop-filter: blur(18px) saturate(135%);
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(233, 195, 73, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.blog-bottom-nav-item {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  padding: 0.35rem 0.4rem;
  border-radius: 9999px;
  color: rgba(184, 188, 201, 0.7);
  text-decoration: none;
  transition: color 0.4s var(--ease-out), background 0.4s var(--ease-out);
}

.blog-bottom-nav-item:hover {
  color: var(--primary);
}

.blog-bottom-nav-item.active {
  color: var(--primary);
  background: radial-gradient(ellipse at center, rgba(233, 195, 73, 0.14) 0%, transparent 75%);
}

.blog-bottom-nav-icon {
  font-size: 22px;
  line-height: 1;
  /* Lock the icon's box so the fallback word ("menu_book", "auto_awesome", etc.)
     can't widen the column while the icon font is still loading. */
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: filter 0.3s var(--ease-out), font-variation-settings 0.3s var(--ease-out);
}

.blog-bottom-nav-item.active .blog-bottom-nav-icon {
  filter: drop-shadow(0 0 6px rgba(233, 195, 73, 0.55));
}

.blog-bottom-nav-label {
  font-family: var(--font-body);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
  line-height: 1;
}

/* ==========================================================================
   Main Content Layout
   ========================================================================== */
.site-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 3.5rem 2rem 7rem;
  position: relative;
  z-index: 1;
}

/* Page Header — eyebrow + title + subtitle */
.page-header {
  text-align: center;
  padding: 2.5rem 0 3rem;
  position: relative;
  z-index: 1;
}

.page-header::after {
  content: "";
  display: block;
  width: 96px;
  height: 1px;
  margin: 2rem auto 0;
  background: linear-gradient(90deg, transparent, rgba(233, 195, 73, 0.55), transparent);
  animation: meridianShift 14s ease-in-out infinite;
  background-size: 220% 100%;
}

.page-header-label {
  display: block;
  color: var(--primary);
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.35em;
  font-size: 0.72rem;
  font-weight: 500;
  margin-bottom: 1.25rem;
}

.page-header h1 {
  font-family: var(--font-headline);
  font-size: 2.6rem;
  color: var(--on-surface);
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin-bottom: 1.25rem;
}

.page-header p {
  color: var(--on-surface-variant);
  font-style: italic;
  font-size: 1.02rem;
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.8;
}

@media (min-width: 768px) {
  .page-header h1 { font-size: 3.2rem; }
}

/* ==========================================================================
   Post Cards — modern tarot artifacts, cleaner than before
   ========================================================================== */
.post-list {
  display: flex;
  flex-direction: column;
  gap: 2.25rem;
}

.post-card {
  position: relative;
  border-radius: var(--radius-card);
  overflow: hidden;
  isolation: isolate;
  cursor: pointer;
  background: linear-gradient(155deg, #171d2a 0%, #131825 48%, #161227 100%);
  transition: transform 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out),
    border-color 0.5s var(--ease-out);
  border: 1px solid transparent;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45), 0 0 40px rgba(233, 195, 73, 0.08);
}

.post-card-base {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(155deg, #171d2a 0%, #131825 48%, #161227 100%);
}

/* Nebula wash — calmer, less saturated than before */
.post-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(ellipse 120% 80% at 20% 20%, rgba(60, 38, 116, 0.28) 0%, transparent 60%),
    radial-gradient(ellipse 80% 60% at 80% 80%, rgba(40, 22, 82, 0.22) 0%, transparent 55%);
  background-size: 220% 220%;
  animation: nebulaDrift 24s ease-in-out infinite;
  z-index: 1;
  opacity: 0.7;
}

/* Animated gold hairline border */
.post-card-border {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  z-index: 4;
  pointer-events: none;
  padding: 1px;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  background: linear-gradient(
    135deg,
    rgba(233, 195, 73, 0.04) 0%,
    rgba(233, 195, 73, 0.3) 25%,
    rgba(255, 224, 136, 0.14) 45%,
    rgba(198, 198, 205, 0.1) 65%,
    rgba(233, 195, 73, 0.25) 85%,
    rgba(233, 195, 73, 0.04) 100%
  );
  background-size: 320% 320%;
  animation: borderGlow 16s linear infinite;
  opacity: 0.85;
  transition: opacity 0.5s var(--ease-out);
}

.post-card:hover .post-card-border {
  opacity: 1;
  background: linear-gradient(
    135deg,
    rgba(233, 195, 73, 0.1) 0%,
    rgba(233, 195, 73, 0.5) 25%,
    rgba(255, 224, 136, 0.3) 45%,
    rgba(198, 198, 205, 0.18) 65%,
    rgba(233, 195, 73, 0.4) 85%,
    rgba(233, 195, 73, 0.1) 100%
  );
  background-size: 320% 320%;
  animation: borderGlow 10s linear infinite;
}

.post-card:nth-child(2) .post-card-border { animation-delay: -5s; }
.post-card:nth-child(3) .post-card-border { animation-delay: -9s; }
.post-card:nth-child(4) .post-card-border { animation-delay: -3s; }
.post-card:nth-child(5) .post-card-border { animation-delay: -11s; }
.post-card:nth-child(6) .post-card-border { animation-delay: -7s; }

.post-card:nth-child(2)::before { animation-delay: -6s; }
.post-card:nth-child(3)::before { animation-delay: -12s; }
.post-card:nth-child(4)::before { animation-delay: -4s; }
.post-card:nth-child(5)::before { animation-delay: -10s; }
.post-card:nth-child(6)::before { animation-delay: -15s; }

/* Twinkling stars inside the card */
.post-card-stars {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}
.post-card-stars span {
  position: absolute;
  width: 1.5px;
  height: 1.5px;
  background: rgba(220, 215, 255, 0.5);
  border-radius: 50%;
  animation: starTwinkle 4s ease-in-out infinite;
}

/* Warm hover glow */
.post-card-glow {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s var(--ease-out);
  background: radial-gradient(ellipse 60% 60% at 50% 50%, rgba(233, 195, 73, 0.07) 0%, transparent 70%);
}
.post-card:hover .post-card-glow { opacity: 1; }

/* Featured image */
.post-card-image {
  position: relative;
  z-index: 3;
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  opacity: 0.9;
  transition: opacity 0.45s var(--ease-out), transform 0.9s var(--ease-out);
}
.post-card:hover .post-card-image { opacity: 1; transform: scale(1.02); }

/* Card content */
.post-card-body {
  position: relative;
  z-index: 3;
  padding: 2rem 1.85rem;
}

.post-card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
  font-size: 0.72rem;
  color: rgba(198, 198, 205, 0.7);
  letter-spacing: 0.05em;
}

.post-card-category {
  background: rgba(233, 195, 73, 0.1);
  color: var(--primary);
  padding: 0.25rem 0.7rem;
  border-radius: 9999px;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 500;
  border: 1px solid rgba(233, 195, 73, 0.18);
}

.post-card-title {
  font-family: var(--font-headline);
  font-size: 1.45rem;
  color: var(--on-surface);
  margin-bottom: 0.7rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.post-card-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s var(--ease-out);
}

.post-card-title a:hover { color: var(--primary); }

.post-card-excerpt {
  color: rgba(198, 198, 205, 0.8);
  font-size: 0.92rem;
  line-height: 1.78;
  margin-bottom: 1.4rem;
}

.post-card-read-more {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--primary);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 500;
  text-decoration: none;
  transition: gap 0.35s var(--ease-out), color 0.3s var(--ease-out);
}

.post-card:hover .post-card-read-more {
  gap: 0.85rem;
  color: var(--primary-fixed);
}

.post-card-read-more .arrow {
  display: inline-block;
  font-size: 0.95rem;
  transition: transform 0.35s var(--ease-out);
}

.post-card:hover .post-card-read-more .arrow {
  transform: translateX(3px);
}

/* ==========================================================================
   Single Post Page — calmer cosmos
   ========================================================================== */
.post-page-wrapper { position: relative; }

.post-cosmos {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.post-cosmos-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  animation: postNebulaFloat 26s ease-in-out infinite;
}

.post-cosmos-orb:nth-child(1) {
  width: 520px; height: 520px;
  top: -12%; left: -15%;
  background: radial-gradient(circle, rgba(42, 24, 98, 0.38) 0%, transparent 70%);
  animation-duration: 28s;
}
.post-cosmos-orb:nth-child(2) {
  width: 400px; height: 400px;
  top: 28%; right: -10%;
  background: radial-gradient(circle, rgba(58, 26, 104, 0.32) 0%, transparent 70%);
  animation-duration: 22s;
  animation-delay: -8s;
}
.post-cosmos-orb:nth-child(3) {
  width: 360px; height: 360px;
  bottom: 8%; left: 10%;
  background: radial-gradient(circle, rgba(20, 30, 88, 0.35) 0%, transparent 70%);
  animation-duration: 30s;
  animation-delay: -14s;
}
.post-cosmos-orb:nth-child(4) {
  width: 260px; height: 260px;
  top: 60%; right: 20%;
  background: radial-gradient(circle, rgba(233, 195, 73, 0.05) 0%, transparent 70%);
  animation-duration: 20s;
  animation-delay: -5s;
}

.post-cosmos-stars {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.post-cosmos-stars span {
  position: absolute;
  width: 2px;
  height: 2px;
  background: rgba(220, 215, 255, 0.45);
  border-radius: 50%;
  animation: starTwinkle 5s ease-in-out infinite;
}

/* Post Header */
.post-header {
  text-align: center;
  margin-bottom: 2.75rem;
  position: relative;
  padding-top: 1rem;
}

.post-header::before {
  content: "";
  position: absolute;
  top: -0.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: 140px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(233, 195, 73, 0.55), transparent);
  background-size: 220% 100%;
  animation: meridianShift 14s ease-in-out infinite;
}

.post-header h1 {
  font-family: var(--font-headline);
  font-size: 2.3rem;
  color: var(--on-surface);
  line-height: 1.22;
  margin-bottom: 1.1rem;
  letter-spacing: -0.015em;
}

@media (min-width: 768px) {
  .post-header h1 { font-size: 2.75rem; }
}

.post-meta {
  color: var(--on-surface-variant);
  font-size: 0.82rem;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  letter-spacing: 0.04em;
}

.post-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.post-meta span::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(233, 195, 73, 0.45);
}

.post-meta span:first-child::before { display: none; }

.post-featured-image {
  width: 100%;
  border-radius: var(--radius-lg);
  margin-bottom: 2.75rem;
  border: 1px solid rgba(233, 195, 73, 0.12);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

/* ==========================================================================
   Post Content (prose)
   ========================================================================== */
.post-content {
  font-size: 1.04rem;
  line-height: 1.88;
  color: var(--on-surface);
  position: relative;
}

.post-content h2 {
  font-family: var(--font-headline);
  font-size: 1.55rem;
  color: var(--on-surface);
  margin: 2.75rem 0 1.1rem;
  padding-bottom: 0.85rem;
  border-bottom: none;
  position: relative;
  letter-spacing: -0.005em;
}

.post-content h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 64px;
  height: 1px;
  background: linear-gradient(90deg, rgba(233, 195, 73, 0.7), rgba(233, 195, 73, 0.08));
  border-radius: 2px;
}

.post-content h3 {
  font-family: var(--font-headline);
  font-size: 1.25rem;
  color: var(--on-surface);
  margin: 2rem 0 0.75rem;
  letter-spacing: -0.005em;
}

.post-content p { margin-bottom: 1.3rem; }

.post-content blockquote {
  border-left: 2px solid rgba(233, 195, 73, 0.55);
  padding: 1.35rem 1.85rem 1.35rem 1.85rem;
  margin: 2rem 0;
  background: linear-gradient(
    135deg,
    rgba(26, 32, 44, 0.72) 0%,
    rgba(21, 26, 37, 0.68) 100%
  );
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  font-style: italic;
  color: var(--on-surface-variant);
  position: relative;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
}

.post-content blockquote::before {
  content: "\201C";
  position: absolute;
  top: -0.35rem;
  left: 0.85rem;
  font-size: 3rem;
  color: rgba(233, 195, 73, 0.2);
  font-family: var(--font-headline);
  line-height: 1;
}

.post-content code {
  background: var(--surface-container-high);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-size: 0.9em;
  color: var(--primary-fixed);
}

.post-content pre {
  background: var(--surface-container-lowest);
  border: 1px solid rgba(233, 195, 73, 0.1);
  border-radius: var(--radius-md);
  padding: 1.3rem;
  overflow-x: auto;
  margin: 1.5rem 0;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.post-content pre code { background: none; padding: 0; color: var(--on-surface); }

.post-content ul,
.post-content ol {
  padding-left: 1.65rem;
  margin-bottom: 1.3rem;
}

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

.post-content li::marker { color: rgba(233, 195, 73, 0.6); }

.post-content img {
  border-radius: var(--radius-md);
  border: 1px solid rgba(233, 195, 73, 0.1);
  margin: 1.75rem 0;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.3);
}

.post-content a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: rgba(233, 195, 73, 0.32);
  transition: text-decoration-color 0.3s var(--ease-out);
}

.post-content a:hover { text-decoration-color: var(--primary); }

/* ==========================================================================
   Post Footer (back button)
   ========================================================================== */
.post-footer {
  text-align: center;
  margin-top: 4.5rem;
  padding-top: 2.75rem;
  position: relative;
}

.post-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 220px;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(233, 195, 73, 0.4),
    rgba(198, 198, 205, 0.18),
    transparent
  );
  background-size: 220% 100%;
  animation: meridianShift 14s ease-in-out infinite;
}

.post-footer .post-card-read-more {
  transition: gap 0.35s var(--ease-out), color 0.3s var(--ease-out);
}

.post-footer .post-card-read-more:hover {
  gap: 0.85rem;
  color: var(--primary-fixed);
}

/* ==========================================================================
   Pagination
   ========================================================================== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 3.5rem;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.3s var(--ease-out);
}

.pagination a {
  background: rgba(26, 32, 44, 0.7);
  color: var(--on-surface-variant);
  border: 1px solid rgba(198, 198, 205, 0.1);
}

.pagination a:hover {
  background: rgba(233, 195, 73, 0.12);
  color: var(--primary);
  border-color: rgba(233, 195, 73, 0.3);
}

.pagination span.active {
  background: linear-gradient(180deg, #f1cf5d 0%, #d6ac33 100%);
  color: var(--on-primary);
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(233, 195, 73, 0.25);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  position: relative;
  padding: 2.5rem 2rem 3rem;
  text-align: center;
  color: var(--on-surface-variant);
  font-size: 0.8rem;
  z-index: 1;
}

.site-footer::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(233, 195, 73, 0.28) 35%,
    rgba(198, 198, 205, 0.15) 60%,
    rgba(233, 195, 73, 0.28) 80%,
    transparent 100%
  );
}

.site-footer a {
  color: var(--primary);
  transition: color 0.3s var(--ease-out);
}

.site-footer a:hover { color: var(--primary-fixed); }

.footer-nav {
  display: flex;
  justify-content: center;
  gap: 1.75rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.footer-nav a {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--on-surface-variant);
}

.footer-nav a:hover { color: var(--primary); }

.footer-divider {
  display: inline-block;
  width: 52px;
  height: 1px;
  background: rgba(233, 195, 73, 0.35);
  vertical-align: middle;
  margin: 0 0.85rem;
}

/* ==========================================================================
   Animations
   ========================================================================== */
@keyframes nebulaDrift {
  0% { background-position: 0% 40%, 100% 30%, 50% 90%, 20% 70%, 0 0; }
  50% { background-position: 100% 70%, 30% 80%, 70% 20%, 80% 30%, 0 0; }
  100% { background-position: 0% 40%, 100% 30%, 50% 90%, 20% 70%, 0 0; }
}

@keyframes starTwinkle {
  0%, 100% { opacity: 0.15; }
  50% { opacity: 0.55; }
}

@keyframes borderGlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes postNebulaFloat {
  0% { transform: translate(0, 0) scale(1); opacity: 0.38; }
  33% { transform: translate(28px, -18px) scale(1.04); opacity: 0.5; }
  66% { transform: translate(-18px, 14px) scale(0.98); opacity: 0.42; }
  100% { transform: translate(0, 0) scale(1); opacity: 0.38; }
}

@keyframes meridianShift {
  0%, 100% { background-position: 0% 50%; opacity: 0.65; }
  50% { background-position: 100% 50%; opacity: 1; }
}

@keyframes goldenPulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.75; }
}

/* Respect reduced-motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ==========================================================================
   Utility: empty state, misc
   ========================================================================== */
.post-list-empty {
  text-align: center;
  padding: 5rem 0;
}
.post-list-empty .material-symbols-outlined {
  font-size: 3rem;
  color: rgba(198, 198, 205, 0.35);
  margin-bottom: 1rem;
  display: block;
}
.post-list-empty p {
  color: var(--on-surface-variant);
}

/* 404 page */
.error-page {
  text-align: center;
  padding: 6rem 0;
}
.error-page .material-symbols-outlined {
  font-size: 4rem;
  color: rgba(198, 198, 205, 0.4);
  display: block;
  margin-bottom: 1.5rem;
}
.error-page h1 {
  font-family: var(--font-headline);
  font-size: 2.2rem;
  color: var(--on-surface);
  margin-bottom: 0.75rem;
  letter-spacing: -0.015em;
}
.error-page p {
  color: var(--on-surface-variant);
  margin-bottom: 2.25rem;
  font-style: italic;
}
.error-page .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.6rem;
  background: linear-gradient(180deg, #f1cf5d 0%, #d6ac33 100%);
  color: var(--on-primary);
  border-radius: 9999px;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
  box-shadow: 0 6px 20px rgba(233, 195, 73, 0.22);
  border: 1px solid rgba(255, 224, 136, 0.35);
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
}
.error-page .btn:hover {
  color: var(--on-primary);
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(233, 195, 73, 0.32);
}
