/* ==============================================
   WazzAPI Blog Theme — whatzap-landing Edition
   ============================================== */

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

:root {
  /* Premium Dark Palette (aligned with landing) */
  --bg-color: #030304;
  --bg-secondary: #0a0a0c;
  --bg-card: rgba(15, 15, 18, 0.6);
  --bg-card-hover: rgba(20, 20, 22, 0.88);
  --bg-glass: rgba(255, 255, 255, 0.03);
  --bg-code: #000;

  --text-primary: #ffffff;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --text-tertiary: #52525b;

  --accent-blue: #6366f1;
  --accent-blue-glow: rgba(99, 102, 241, 0.4);
  --accent-green: #22c55e;
  --accent-green-glow: rgba(34, 197, 94, 0.4);
  --brand-green: #25D366;
  --brand-indigo: #6366f1;

  --border-card: rgba(255, 255, 255, 0.06);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-highlight: rgba(255, 255, 255, 0.15);

  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-highlight: rgba(255, 255, 255, 0.15);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.36);

  --spotlight-color: rgba(255, 255, 255, 0.08);

  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-pill: 999px;

  --shadow-card: 0 8px 32px 0 rgba(0, 0, 0, 0.36);
  --shadow-glow-green: 0 0 40px -10px rgba(37, 211, 102, 0.15);
  --shadow-glow-indigo: 0 0 40px -10px rgba(99, 102, 241, 0.3);

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;

  --header-height: 64px;
  --max-width: 1000px;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  overflow-x: hidden;
  width: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-secondary);
  background-color: var(--bg-color);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  position: relative;
  width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

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

/* ---------- BACKGROUND EFFECTS ---------- */
.background-effects {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}

.hero-stage {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero-glow-spot {
  position: absolute;
  top: -250px;
  left: 50%;
  transform: translateX(-50%);
  width: 1000px;
  height: 1000px;
  background: radial-gradient(circle, rgba(94, 106, 210, 0.35) 0%, transparent 60%);
  filter: blur(80px);
  opacity: 0;
  animation: spot-intro 1.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards, spot-pulse 4s ease-in-out infinite 1.5s;
  z-index: 0;
  will-change: transform, opacity;
}

.hero-glow-line {
  position: absolute;
  top: 180px;
  left: 50%;
  transform: translateX(-50%);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.9), transparent);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
  width: 0%;
  opacity: 0;
  animation: line-expand 2s cubic-bezier(0.22, 1, 0.36, 1) forwards 0.2s;
  z-index: 1;
}

.stars {
  background-image: radial-gradient(rgba(255, 255, 255, 0.2) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.3;
  width: 100%;
  height: 100%;
  mask-image: linear-gradient(to bottom, black 20%, transparent 100%);
}

@keyframes spot-intro {
  0% {
    opacity: 0;
    transform: translateX(-50%) scale(0.4);
    filter: blur(40px);
  }

  40% {
    opacity: 0.8;
    transform: translateX(-50%) scale(1.1);
    filter: blur(60px);
  }

  100% {
    opacity: 0.5;
    transform: translateX(-50%) scale(1);
    filter: blur(80px);
  }
}

@keyframes spot-pulse {

  0%,
  100% {
    opacity: 0.5;
    transform: translateX(-50%) scale(1);
  }

  50% {
    opacity: 0.7;
    transform: translateX(-50%) scale(1.05);
  }
}

@keyframes line-expand {
  0% {
    width: 0%;
    opacity: 0;
  }

  40% {
    width: 70%;
    opacity: 1;
  }

  80% {
    width: 90%;
    opacity: 0.5;
  }

  100% {
    width: 100%;
    opacity: 0;
  }
}

/* ---------- SITE WRAPPER ---------- */
.site-wrapper {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-main {
  flex: 1;
}

/* ---------- LIQUID GLASS HEADER ---------- */
#site-header {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 100vw;
  z-index: 100;
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
  padding: 0;
  background: transparent;
  border: none;
  display: flex;
  justify-content: center;
}

#site-header.header-floating {
  margin-top: 10px;
  width: calc(100% - 32px);
  max-width: 1200px;
  border-radius: 20px;
  box-shadow: 0 6px 6px rgba(0, 0, 0, 0.2), 0 0 20px rgba(0, 0, 0, 0.1);
}

.glass-filter,
.glass-overlay,
.glass-specular {
  position: absolute;
  inset: 0;
  border-radius: 0;
  transition: border-radius 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

#site-header.header-floating .glass-filter,
#site-header.header-floating .glass-overlay,
#site-header.header-floating .glass-specular {
  border-radius: 20px;
}

.glass-filter {
  z-index: 0;
  backdrop-filter: blur(4px);
  filter: url(#lensFilter) saturate(120%) brightness(1.15);
  opacity: 1;
}

.glass-overlay {
  z-index: 1;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(0, 0, 0, 0.6);
  border-top-color: rgba(0, 0, 0, 0.4);
  border-bottom-color: rgba(0, 0, 0, 0.8);
}

.glass-specular {
  z-index: 2;
  box-shadow: inset 1.5px 1.5px 0 rgba(255, 255, 255, 0.9), inset 0 0 10px rgba(255, 255, 255, 0.3);
  opacity: 0;
  transition: opacity 0.6s;
  mix-blend-mode: overlay;
}

.glass-specular::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 50%;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.15), transparent);
  border-radius: 20px 20px 0 0;
  opacity: 0.5;
}

#site-header.header-floating .glass-specular {
  opacity: 1;
}

.glass-content {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  padding: 18px 40px;
  width: 100%;
}

#site-header.header-floating .glass-content {
  padding: 12px 32px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.5px;
  justify-self: start;
}

.logo-link {
  color: var(--text-primary);
  text-decoration: none;
}

.logo-image {
  height: 24px;
  width: auto;
}

.logo-text {
  color: var(--text-primary);
}

#header-nav {
  justify-self: center;
}

#header-nav ul {
  display: flex;
  list-style: none;
  gap: 32px;
  margin: 0;
  padding: 0;
}

#header-nav li {
  list-style: none;
}

#header-nav a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  transition: color 0.2s;
  position: relative;
}

#header-nav a:hover {
  color: var(--text-primary);
}

#header-nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent-green);
  transition: width 0.3s;
}

#header-nav a:hover::after {
  width: 100%;
}

#header-nav .nav-current a {
  color: var(--brand-green);
}

#header-nav .nav-current a::after {
  width: 100%;
}

.desktop-cta {
  display: flex;
  gap: 12px;
  justify-self: end;
}

.mobile-cta {
  display: none;
}

.mobile-menu-backdrop {
  display: none;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 101;
}

.hamburger-line {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s;
}

.mobile-menu-toggle.open .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mobile-menu-toggle.open .hamburger-line:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.open .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 13px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  border-radius: var(--radius-xs);
  transition: all 0.2s ease;
  padding: 8px 16px;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 12px;
}

.btn-primary {
  background: #fff;
  color: #000;
  padding: 8px 18px;
}

.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

.shimmer-btn {
  background: linear-gradient(90deg, #fff 0%, #f0f0f0 50%, #fff 100%);
  background-size: 200% 100%;
  animation: shimmer 4s infinite linear;
  will-change: background-position;
  transform: translateZ(0);
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

.btn-outline {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

/* ---------- HERO ---------- */
.hero-section {
  position: relative;
  overflow: hidden;
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 140px 24px 80px;
  text-align: center;
}

.hero-background {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 50px 50px;
  mask-image: radial-gradient(circle at 50% 50%, black, transparent 80%);
}

.glow-sphere {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(37, 211, 102, 0.1) 0%, transparent 70%);
  filter: blur(80px);
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
}

.hero-badge {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 100px;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.pill-dot {
  width: 6px;
  height: 6px;
  background: #25D366;
  border-radius: 50%;
  box-shadow: 0 0 10px #25D366;
}

.hero-title {
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #fff;
  margin-bottom: 16px;
}

.text-gradient {
  background: linear-gradient(to right, #25D366, #3b82f6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-text {
  background: linear-gradient(135deg, var(--brand-green) 0%, var(--brand-indigo) 50%, var(--brand-purple, #a855f7) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 540px;
  margin: 0 auto 40px;
  line-height: 1.6;
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-top: 20px;
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
}

.stat-label {
  font-size: 12px;
  color: #71717a;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-divider {
  width: 1px;
  height: 32px;
  background: rgba(255, 255, 255, 0.1);
}

/* ---------- POSTS GRID ---------- */
.posts-section {
  padding: 20px 20px 80px;
}

.posts-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* Post Card with Spotlight */
.post-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.post-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(800px circle at var(--mouse-x, -999px) var(--mouse-y, -999px), var(--spotlight-color), transparent 40%);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
  z-index: 2;
}

.post-card:hover::before {
  opacity: 1;
}

.post-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-highlight);
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-card);
}

.post-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  z-index: 3;
}

.post-card-image {
  overflow: hidden;
}

.post-card-image img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.post-card:hover .post-card-image img {
  transform: scale(1.03);
}

.post-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 10px;
}

.post-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.post-card-tag {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.post-card-reading-time::before {
  content: '·';
  margin-right: 10px;
}

.post-card-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-excerpt {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-footer {
  margin-top: auto;
  padding-top: 4px;
}

.post-card-author {
  display: flex;
  align-items: center;
  gap: 8px;
}

.author-avatar-sm {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
}

.post-card-author-name {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ---------- PAGINATION ---------- */
.pagination {
  max-width: var(--max-width);
  margin: 40px auto 0;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.page-number,
.older-posts,
.newer-posts {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xs);
  background: var(--bg-glass);
  transition: all 0.2s;
}

.page-number:hover,
.older-posts:hover,
.newer-posts:hover {
  color: #fff;
  border-color: var(--border-highlight);
  background: rgba(255, 255, 255, 0.06);
}

.page-number.current {
  color: var(--brand-green);
  border-color: rgba(37, 211, 102, 0.3);
  background: rgba(37, 211, 102, 0.08);
}

/* ---------- SINGLE POST ---------- */
.post-article {
  max-width: 720px;
  margin: 0 auto;
  padding: 100px 20px 60px;
}

.page-article {
  max-width: 720px;
  margin: 0 auto;
  padding: 100px 20px 60px;
}

.post-header,
.page-header {
  margin-bottom: 32px;
  text-align: center;
}

.post-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 12px;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.post-date::before {
  content: '·';
  margin-right: 12px;
}

.post-title,
.page-title {
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.post-excerpt,
.page-excerpt {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto;
}

.post-authors {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 20px;
}

.post-author {
  display: flex;
  align-items: center;
  gap: 10px;
}

.author-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-glass);
}

.author-info {
  text-align: left;
}

.author-name {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.author-bio {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
}

.post-feature-image,
.page-feature-image {
  margin: 0 -20px 32px;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.post-feature-image img,
.page-feature-image img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
}

/* ---------- POST CONTENT ---------- */
.post-content {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.75;
}

.post-content>*+* {
  margin-top: 1.2em;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.3;
  margin-top: 2em;
  margin-bottom: 0.6em;
}

.post-content h1 {
  font-size: 28px;
  letter-spacing: -0.02em;
}

.post-content h2 {
  font-size: 24px;
  letter-spacing: -0.01em;
}

.post-content h3 {
  font-size: 20px;
}

.post-content h4 {
  font-size: 18px;
}

.post-content p {
  margin-top: 1em;
}

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

.post-content a:hover {
  color: var(--brand-indigo);
}

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

.post-content blockquote {
  border-left: 3px solid var(--brand-green);
  background: var(--bg-glass);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 16px 20px;
  margin: 1.5em 0;
  color: var(--text-secondary);
  font-style: italic;
}

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

.post-content ul,
.post-content ol {
  padding-left: 24px;
}

.post-content li {
  margin-top: 0.4em;
}

.post-content li::marker {
  color: var(--text-muted);
}

.post-content hr {
  border: none;
  border-top: 1px solid var(--border-glass);
  margin: 2em 0;
}

/* Code */
.post-content code {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 400;
  background: var(--bg-code);
  color: #e4e4e7;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.post-content pre {
  background: var(--bg-code);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 20px;
  margin: 1.5em 0;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  color: #d8dee9;
}

.post-content pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: inherit;
}

.post-content img {
  border-radius: var(--radius-md);
}

.post-content figure {
  margin: 1.5em 0;
}

.post-content figcaption {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 8px;
}

/* ---------- POST FOOTER ---------- */
.post-footer {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border-glass);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.post-share {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-muted);
}

.post-share a {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xs);
  color: var(--text-secondary);
  font-size: 14px;
  transition: all 0.2s;
}

.post-share a:hover {
  color: #fff;
  border-color: var(--border-highlight);
  background: var(--bg-glass);
}

.post-share a svg {
  width: 14px;
  height: 14px;
  display: block;
  fill: currentColor;
}

/* ---------- RELATED POSTS ---------- */
.related-posts {
  padding: 40px 20px 80px;
}

.related-posts .posts-grid {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-title {
  text-align: center;
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 32px;
}

/* ---------- TAG & AUTHOR HEADERS ---------- */
.tag-header,
.author-header {
  position: relative;
  overflow: hidden;
  padding: 120px 20px 40px;
  text-align: center;
}

.tag-header-inner,
.author-header-inner {
  position: relative;
  z-index: 1;
  max-width: 600px;
  margin: 0 auto;
}

.tag-title {
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 12px;
}

.tag-description {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.tag-count {
  margin-top: 8px;
}

.author-avatar-lg {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 16px;
  border: 2px solid var(--border-glass);
}

.author-name-lg {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.author-bio-text {
  font-size: 15px;
  color: var(--text-secondary);
  max-width: 450px;
  margin: 0 auto 12px;
}

.author-location {
  font-size: 13px;
  color: var(--text-muted);
  display: block;
  margin-bottom: 6px;
}

.author-website {
  font-size: 13px;
  color: var(--brand-green);
  display: block;
  margin-bottom: 12px;
}

.author-post-count {
  margin-top: 4px;
}

/* ---------- ERROR ---------- */
.error-section {
  position: relative;
  overflow: hidden;
  padding: 160px 20px 80px;
  text-align: center;
}

.error-inner {
  position: relative;
  z-index: 1;
  max-width: 500px;
  margin: 0 auto;
}

.error-code {
  display: block;
  font-size: 120px;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, var(--brand-green), var(--brand-indigo));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}

.error-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.error-description {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

/* ---------- PILLS ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-pill);
  color: var(--text-secondary);
}

.post-tag.pill {
  padding: 4px 12px;
  font-size: 12px;
}

/* ---------- FOOTER ---------- */
.site-footer {
  border-top: 1px solid var(--border-glass);
  padding: 60px 20px 30px;
  background: #050505;
}

.footer-content {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.footer-brand {
  font-size: 14px;
  color: var(--text-secondary);
}

.footer-brand-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--text-primary);
  text-decoration: none;
}

.footer-brand-logo {
  height: 24px;
  width: auto;
}

.footer-brand-name {
  font-weight: 600;
}

.footer-brand-copy {
  max-width: 220px;
  font-size: 13px;
  color: #999;
}

.footer-links {
  display: flex;
  gap: 40px;
}

.footer-heading {
  font-size: 12px;
  color: #fff;
  margin-bottom: 16px;
  font-weight: 600;
}

.footer-col a {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
  margin-bottom: 10px;
  transition: color 0.2s;
}

.footer-col a:hover {
  color: #fff;
}

.footer-bottom {
  max-width: var(--max-width);
  margin: 40px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--border-glass);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-muted);
}

.footer-social {
  display: flex;
  gap: 12px;
}

.footer-social a {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xs);
  color: var(--text-muted);
  font-size: 14px;
  transition: all 0.2s;
}

.footer-social a:hover {
  color: #fff;
  border-color: var(--border-highlight);
  background: var(--bg-glass);
}

.footer-social a svg {
  width: 14px;
  height: 14px;
  display: block;
  fill: currentColor;
}

/* ---------- KOENIG EDITOR STYLES ---------- */
.kg-width-wide {
  position: relative;
  width: 85vw;
  min-width: 100%;
  max-width: 1000px;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  transform: translateX(calc(50vw - 50%));
}

.kg-width-full {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  transform: translateX(calc(50vw - 50%));
}

@media (max-width: 768px) {
  .kg-width-wide {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    transform: translateX(calc(50vw - 50%));
  }
}

/* ---------- SCROLL ANIMATION ---------- */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- MOBILE ---------- */
@media (max-width: 768px) {
  .hero-section {
    padding: 120px 20px 60px;
  }

  .hero-title {
    font-size: 48px;
  }

  .hero-stats {
    flex-wrap: wrap;
    justify-content: center;
  }

  .glass-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 12px 20px;
    grid-template-columns: none;
  }

  #site-header.header-floating .glass-content {
    padding: 12px 24px;
  }

  .logo {
    font-size: 15px;
  }

  .logo-image {
    height: 20px;
  }

  .mobile-menu-toggle {
    display: flex;
    flex-shrink: 0;
  }

  .desktop-cta {
    display: none;
  }

  #header-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: min(280px, 85vw);
    max-width: 280px;
    height: 100vh;
    background: rgba(5, 5, 5, 0.98);
    backdrop-filter: blur(20px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
    z-index: 100;
    padding: 80px 24px 24px;
    border-left: 1px solid var(--border-glass);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.5);
    transform: translateX(100%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    overflow-y: auto;
    overscroll-behavior: contain;
    justify-self: unset;
  }

  #header-nav.nav-open {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  #header-nav ul {
    flex-direction: column;
    gap: 0;
    width: 100%;
    max-width: 100%;
  }

  #header-nav ul li {
    border-bottom: 1px solid var(--border-glass);
    list-style: none;
  }

  #header-nav ul li:last-child {
    border-bottom: none;
  }

  #header-nav a {
    display: block;
    padding: 18px 0;
    font-size: 16px;
    color: var(--text-primary);
    font-weight: 500;
  }

  #header-nav a:hover {
    color: var(--accent-green);
  }

  #header-nav a::after {
    display: none;
  }

  .mobile-cta {
    display: block;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-glass);
  }

  .mobile-cta .btn {
    width: 100%;
    text-align: center;
    padding: 12px 16px;
  }

  .mobile-menu-backdrop {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 99;
    animation: fadeIn 0.3s ease-out;
    touch-action: none;
  }

  @keyframes fadeIn {
    from {
      opacity: 0;
    }

    to {
      opacity: 1;
    }
  }

  .posts-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  .post-card-body {
    padding: 14px;
    gap: 8px;
  }

  .post-card-title {
    font-size: 15px;
  }

  .post-card-image img {
    height: 140px;
  }

  .post-article,
  .page-article {
    padding: 100px 16px 40px;
  }

  .post-title,
  .page-title {
    font-size: 26px;
  }

  .footer-content {
    flex-direction: column;
    gap: 32px;
  }

  .footer-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .error-section {
    padding: 140px 20px 60px;
  }
}

@media (max-width: 480px) {
  .posts-grid {
    grid-template-columns: 1fr;
  }

  .footer-links {
    grid-template-columns: 1fr 1fr;
  }

  .error-code {
    font-size: 80px;
  }
}

/* Tablet Optimization */
@media (min-width: 769px) and (max-width: 1024px) {
  #header-nav ul {
    gap: 20px;
  }

  #header-nav a {
    font-size: 12px;
  }
}