:root {
  --bg: #05060a;
  --bg-alt: #0b0d13;
  --surface: rgba(255, 255, 255, 0.04);
  --accent: #83b9ff;
  --accent-strong: #4c8dff;
  --text: #f4f5f9;
  --text-muted: #9297a3;
  --border: rgba(255, 255, 255, 0.08);
  --font: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --max-width: 1200px;
  --transition: all 0.25s ease;
  --radius: 18px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font);
  background: radial-gradient(circle at top left, rgba(76, 141, 255, 0.22), transparent 45%),
              radial-gradient(circle at 20% 80%, rgba(131, 185, 255, 0.12), transparent 50%),
              var(--bg);
  color: var(--text);
  min-height: 100vh;
}

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

.page-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.top-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.25rem clamp(1.25rem, 5vw, 4rem);
  backdrop-filter: blur(18px);
  background: rgba(5, 6, 10, 0.74);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand .mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(155deg, var(--accent-strong), rgba(131, 185, 255, 0.6));
  color: var(--bg);
  font-weight: 700;
  font-size: 1.25rem;
}

.brand-copy {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-weight: 600;
  letter-spacing: 0.03em;
}

.brand-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  font-size: 0.95rem;
}

.nav-links a {
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.lang-switcher {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-right: 0.5rem;
  padding: 0.25rem;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.lang-btn {
  padding: 0.35rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
}

.lang-btn:hover {
  color: var(--text);
}

.lang-btn.active {
  background: var(--accent-strong);
  color: var(--bg);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 0.35rem;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  align-items: center;
  justify-content: center;
}

.nav-toggle span {
  width: 20px;
  height: 2px;
  background: var(--text);
}

.primary-btn,
.ghost-btn,
.video-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  border-radius: 999px;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.95rem;
}

.primary-btn {
  background: linear-gradient(150deg, var(--accent-strong), rgba(131, 185, 255, 0.88));
  color: var(--bg);
  box-shadow: 0 18px 32px rgba(76, 141, 255, 0.28);
}

.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 26px 44px rgba(76, 141, 255, 0.36);
}

.ghost-btn {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.ghost-btn:hover {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.04);
}

.video-btn {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

main {
  flex: 1;
}

.hero {
  position: relative;
  padding: clamp(4rem, 8vw, 6rem) clamp(1.5rem, 5vw, 4rem);
  overflow: hidden;
}

.hero-background {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 25%, rgba(111, 167, 255, 0.28), transparent 55%),
              radial-gradient(circle at 70% 30%, rgba(120, 114, 255, 0.24), transparent 55%),
              linear-gradient(180deg, rgba(8, 11, 20, 0.4), var(--bg-alt));
  filter: blur(0px);
  z-index: -1;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  max-width: var(--max-width);
  margin: 0 auto;
}

.hero-copy h1 {
  font-size: clamp(2.5rem, 6vw, 3.8rem);
  line-height: 1.05;
  margin: 0.75rem 0 1.25rem;
}

.hero-copy p {
  color: var(--text-muted);
  max-width: 34rem;
  margin-bottom: 2rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.8rem;
  border-radius: 999px;
  background: rgba(131, 185, 255, 0.12);
  color: var(--accent);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.persona-switcher {
  display: inline-flex;
  padding: 0.35rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 1.5rem;
}

.switch {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  cursor: pointer;
  transition: var(--transition);
}

.switch.active {
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.24), rgba(131, 185, 255, 0.18));
  color: var(--text);
}

.persona-details h3 {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
}

.persona-details p {
  margin: 0;
  color: var(--text-muted);
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2.5rem;
}

.hero-panel {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.glass-card {
  background: rgba(7, 11, 20, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.glass-card h4 {
  margin: 0 0 1rem;
  font-size: 1rem;
}

.heatmap {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.heatmap .cell {
  padding-bottom: 100%;
  border-radius: 12px;
  background: linear-gradient(160deg, rgba(131, 185, 255, 0.55), rgba(76, 141, 255, 0.32));
  animation: pulse 4s ease-in-out infinite;
}

.heatmap .cell:nth-child(odd) {
  opacity: 0.65;
  animation-delay: 0.8s;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.05); opacity: 1; }
}

.glass-card.flow ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
  color: var(--text-muted);
}

.glass-card.flow li {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.trust {
  padding: 1rem 0;
  overflow: hidden;
}

.marquee {
  display: flex;
  gap: 3rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  white-space: nowrap;
  animation: marquee 18s linear infinite;
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.section-head {
  max-width: var(--max-width);
  margin: 0 auto 3rem;
  padding: 0 clamp(1.5rem, 5vw, 4rem);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
}

.section-head h2 {
  margin: 0.75rem 0 0;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
}

.section-head p {
  color: var(--text-muted);
  max-width: 28rem;
}

.section-head.centered {
  text-align: center;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.section-head.centered p {
  max-width: 38rem;
}

.suite {
  padding: clamp(4rem, 7vw, 5rem) 0;
}

.suite-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 5vw, 4rem);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.suite-card {
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(9, 12, 20, 0.6);
  transition: var(--transition);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.suite-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(131, 185, 255, 0.2), transparent);
  opacity: 0;
  transition: var(--transition);
}

.suite-card:hover::after,
.suite-card.active::after {
  opacity: 1;
}

.suite-card .card-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(131, 185, 255, 0.18);
  display: grid;
  place-items: center;
  margin-bottom: 1.25rem;
  font-size: 1.25rem;
}

.suite-card h3 {
  margin: 0 0 0.5rem;
}

.suite-card p {
  color: var(--text-muted);
  margin: 0;
}

.suite-card.active {
  border-color: rgba(131, 185, 255, 0.5);
  box-shadow: inset 0 0 0 1px rgba(131, 185, 255, 0.4);
}

.suite-detail {
  margin: 3rem auto 0;
  max-width: calc(var(--max-width) - clamp(1.5rem, 5vw, 4rem));
  background: rgba(8, 11, 18, 0.75);
  border: 1px solid rgba(131, 185, 255, 0.24);
  border-radius: var(--radius);
  padding: clamp(1.75rem, 4vw, 2.5rem);
}

.detail-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.detail-tag {
  background: rgba(255, 255, 255, 0.1);
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  font-size: 0.75rem;
  color: var(--accent);
}

.suite-detail p {
  color: var(--text-muted);
  max-width: 44rem;
}

.suite-detail ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

.suite-detail li {
  padding: 0.75rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.insights {
  padding: clamp(4rem, 7vw, 5rem) 0;
}

.insights-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 5vw, 4rem);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
}

.insight-card {
  background: rgba(9, 12, 20, 0.6);
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: var(--transition);
}

.insight-card:hover {
  border-color: rgba(131, 185, 255, 0.4);
  transform: translateY(-4px);
}

.insight-card svg {
  width: 42px;
  height: 42px;
  fill: var(--accent);
}

.insight-card p {
  color: var(--text-muted);
  margin: 0;
}

.process {
  padding: clamp(4rem, 7vw, 5rem) 0;
}

.process-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 5vw, 4rem);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.process-card {
  padding: 2rem;
  background: rgba(10, 13, 20, 0.6);
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
}

.process-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(140deg, rgba(76, 141, 255, 0.18), transparent);
  opacity: 0;
  transition: var(--transition);
}

.process-card:hover::after {
  opacity: 1;
}

.process-card .step {
  display: inline-block;
  font-weight: 700;
  font-size: 1rem;
  color: var(--accent);
  background: rgba(131, 185, 255, 0.18);
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.process-card h3 {
  margin: 0 0 0.75rem;
}

.process-card p {
  margin: 0;
  color: var(--text-muted);
}

.stories {
  padding: clamp(4rem, 7vw, 5rem) 0;
}

.stories-carousel {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 5vw, 4rem);
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  align-items: center;
}

.carousel-track {
  position: relative;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 1.5rem;
  overflow: hidden;
}

.story-card {
  padding: 2rem;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(10, 13, 20, 0.64);
  min-height: 220px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  opacity: 0.45;
  transition: var(--transition);
}

.story-card.active {
  opacity: 1;
  border-color: rgba(131, 185, 255, 0.35);
  box-shadow: inset 0 0 0 1px rgba(131, 185, 255, 0.22);
}

.story-card h3 {
  margin: 0;
}

.story-card p {
  color: var(--text-muted);
  margin: 0;
}

.story-card .meta {
  font-size: 0.85rem;
  color: rgba(131, 185, 255, 0.8);
}

.carousel-control {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 1.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.carousel-control:hover {
  border-color: rgba(131, 185, 255, 0.4);
  transform: translateY(-2px);
}

.metrics {
  padding: clamp(4rem, 7vw, 5rem) clamp(1.5rem, 5vw, 4rem);
}

.metrics-shell {
  max-width: var(--max-width);
  margin: 0 auto;
  background: rgba(9, 13, 20, 0.72);
  border-radius: var(--radius);
  border: 1px solid rgba(131, 185, 255, 0.22);
  padding: clamp(2rem, 5vw, 3rem);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.metrics-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(131, 185, 255, 0.18), transparent 55%);
  opacity: 0.6;
}

.metrics-shell h2 {
  position: relative;
  margin: 0 0 2rem;
  z-index: 1;
}

.metrics-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
}

.metric {
  padding: 1.5rem;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.metric-value {
  display: block;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
}

.metric-label {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.demo {
  padding: clamp(4rem, 7vw, 5rem) clamp(1.5rem, 5vw, 4rem);
}

.demo-card {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr);
  background: rgba(9, 12, 20, 0.82);
  border-radius: calc(var(--radius) + 4px);
  border: 1px solid rgba(131, 185, 255, 0.2);
  overflow: hidden;
}

.demo-copy {
  padding: clamp(2rem, 5vw, 3rem);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.demo-copy p {
  color: var(--text-muted);
}

.demo-form {
  padding: clamp(2rem, 5vw, 3rem);
  display: grid;
  gap: 1rem;
}

.demo-form label {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.demo-form input,
.demo-form select {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  color: var(--text);
  font: inherit;
}

.demo-form input:focus,
.demo-form select:focus {
  outline: 2px solid rgba(131, 185, 255, 0.5);
}

.checkbox {
  flex-direction: row;
  align-items: center;
  gap: 0.75rem;
}

.checkbox input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--accent-strong);
}

.form-feedback {
  min-height: 1.25rem;
  font-size: 0.85rem;
  color: var(--accent);
  margin: 0;
}

.footer {
  margin-top: auto;
  padding: clamp(3rem, 6vw, 4rem) clamp(1.5rem, 5vw, 4rem);
  background: rgba(7, 10, 16, 0.8);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 2.5rem;
}

.footer-brand {
  display: flex;
  gap: 1rem;
}

.footer-brand .mark {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: linear-gradient(155deg, rgba(76, 141, 255, 0.9), rgba(131, 185, 255, 0.6));
  display: grid;
  place-items: center;
  font-weight: 700;
}

.footer-brand p {
  color: var(--text-muted);
  margin: 0.25rem 0 0;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.footer-heading {
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(131, 185, 255, 0.8);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
  display: block;
}

.footer-links a {
  display: block;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
  transition: color 0.2s ease;
}

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

.footer-note {
  margin-top: 2.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-content {
  width: min(900px, 100%);
  background: rgba(10, 13, 20, 0.95);
  border-radius: var(--radius);
  border: 1px solid rgba(131, 185, 255, 0.25);
  box-shadow: var(--shadow);
  position: relative;
  z-index: 30;
  display: flex;
  flex-direction: column;
}

.modal header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.modal header h3 {
  margin: 0;
}

.modal-close {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
}

.video-frame {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
}

.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 0 0 var(--radius) var(--radius);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 10;
}

.modal[hidden] {
  display: none;
}

.modal.visible {
  opacity: 1;
  pointer-events: auto;
}

@media (max-width: 1024px) {
  .nav-links {
    display: none;
  }

  .nav-actions {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .top-nav {
    position: sticky;
  }

  .top-nav.open {
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 1rem;
  }

  .top-nav.open .nav-links {
    display: flex;
    flex-direction: column;
    width: 100%;
    order: 3;
    padding: 1rem 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }

  .top-nav.open .nav-actions {
    display: flex;
    width: 100%;
    order: 4;
    justify-content: flex-start;
    gap: 0.75rem;
  }

  .top-nav.open .nav-actions .ghost-btn,
  .top-nav.open .nav-actions .primary-btn {
    flex: 1;
    justify-content: center;
  }

  .top-nav.open .lang-switcher {
    margin-right: auto;
    margin-bottom: 0.5rem;
    width: auto;
  }

  .hero-inner {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    order: -1;
  }

  .suite-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .insights-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .process-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .demo-card {
    grid-template-columns: 1fr;
  }

  .demo-copy {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

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

@media (max-width: 680px) {
  .top-nav {
    padding: 1rem 1.25rem;
  }

  .hero {
    padding: 4rem 1.5rem;
  }

  .persona-switcher {
    flex-direction: column;
    align-items: stretch;
  }

  .suite-grid,
  .insights-grid,
  .process-grid,
  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .stories-carousel {
    grid-template-columns: 1fr;
  }

  .carousel-control {
    display: none;
  }

  .carousel-track {
    grid-auto-flow: row;
  }

  .story-card {
    opacity: 1;
  }

  .metrics-shell {
    text-align: left;
  }

  .demo-form {
    padding: 1.75rem;
  }

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

/* ===================================
   GHOST CMS - Blog & Post Styles
   =================================== */

/* Post/Page Container */
.post-full,
.page-full {
  max-width: 800px;
  margin: 0 auto;
  padding: 4rem clamp(1.25rem, 5vw, 4rem);
}

.post-header,
.page-header {
  margin-bottom: 2.5rem;
  text-align: center;
}

.post-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.post-title,
.page-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 1rem;
}

.post-excerpt,
.page-excerpt {
  font-size: 1.25rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.post-authors {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.author {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

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

.author-name {
  font-weight: 500;
}

/* Feature Image */
.post-feature-image,
.page-feature-image {
  margin: 0 0 3rem;
  border-radius: var(--radius);
  overflow: hidden;
}

.post-feature-image img,
.page-feature-image img {
  width: 100%;
  height: auto;
  display: block;
}

.post-feature-image figcaption {
  padding: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
}

/* Ghost Content - gh-content */
.gh-content {
  font-size: 1.1rem;
  line-height: 1.8;
}

.gh-content h2,
.gh-content h3,
.gh-content h4 {
  margin: 2.5rem 0 1rem;
  font-weight: 600;
}

.gh-content h2 {
  font-size: 1.75rem;
}

.gh-content h3 {
  font-size: 1.4rem;
}

.gh-content p {
  margin: 0 0 1.5rem;
}

.gh-content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.gh-content a:hover {
  color: var(--accent-strong);
}

.gh-content ul,
.gh-content ol {
  margin: 0 0 1.5rem 1.5rem;
}

.gh-content li {
  margin-bottom: 0.5rem;
}

.gh-content blockquote {
  margin: 2rem 0;
  padding: 1.5rem 2rem;
  border-left: 4px solid var(--accent);
  background: var(--surface);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
}

.gh-content pre {
  margin: 2rem 0;
  padding: 1.5rem;
  background: var(--bg-alt);
  border-radius: var(--radius);
  overflow-x: auto;
}

.gh-content code {
  font-family: 'SF Mono', Monaco, 'Courier New', monospace;
  font-size: 0.9em;
  background: var(--surface);
  padding: 0.2em 0.4em;
  border-radius: 4px;
}

.gh-content pre code {
  background: none;
  padding: 0;
}

.gh-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
}

.gh-content figure {
  margin: 2rem 0;
}

.gh-content figcaption {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: center;
}

/* Post Footer */
.post-footer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.post-tag {
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
  background: var(--surface);
  border-radius: 20px;
  transition: var(--transition);
}

.post-tag:hover {
  background: var(--accent);
  color: var(--bg);
}

/* Post Grid (Tag/Author Archives) */
.tag-archive,
.author-archive {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 4rem clamp(1.25rem, 5vw, 4rem);
}

.tag-header,
.author-header {
  text-align: center;
  margin-bottom: 3rem;
}

.tag-header h1,
.author-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0.5rem 0;
}

.tag-description,
.author-bio {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 1rem auto;
}

.author-avatar-large {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1rem;
}

.author-meta {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

.post-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: var(--transition);
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.post-card-image {
  display: block;
  aspect-ratio: 16/9;
  overflow: hidden;
}

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

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

.post-card-content {
  padding: 1.5rem;
}

.post-card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.post-card-tag {
  color: var(--accent);
}

.post-card-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
  line-height: 1.3;
}

.post-card-title a {
  transition: color 0.2s ease;
}

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

.post-card-excerpt {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 3rem;
}

.pagination a {
  padding: 0.75rem 1.5rem;
  background: var(--surface);
  border-radius: 8px;
  font-weight: 500;
  transition: var(--transition);
}

.pagination a:hover {
  background: var(--accent);
  color: var(--bg);
}

/* Error Page */
.error-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
  padding: 4rem clamp(1.25rem, 5vw, 4rem);
}

.error-code {
  font-size: 8rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin: 0;
}

.error-message {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin: 1rem 0 2rem;
}

/* Ghost Cards */
.kg-card {
  margin: 2rem 0;
}

.kg-image-card img {
  max-width: 100%;
  height: auto;
}

.kg-width-wide {
  position: relative;
  width: 85vw;
  max-width: 1200px;
  margin-left: calc(50% - 42.5vw);
}

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

.kg-gallery-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.kg-gallery-row {
  display: flex;
  gap: 0.5rem;
}

.kg-gallery-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.kg-bookmark-card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
}

.kg-bookmark-container {
  display: flex;
  text-decoration: none;
}

.kg-bookmark-content {
  flex: 1;
  padding: 1.25rem;
}

.kg-bookmark-title {
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.kg-bookmark-description {
  font-size: 0.9rem;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.kg-bookmark-metadata {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.kg-bookmark-icon {
  width: 20px;
  height: 20px;
}

.kg-bookmark-thumbnail {
  width: 180px;
  min-height: 140px;
}

.kg-bookmark-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 640px) {
  .kg-bookmark-container {
    flex-direction: column-reverse;
  }

  .kg-bookmark-thumbnail {
    width: 100%;
    height: 160px;
  }

  .kg-width-wide {
    width: 100vw;
    margin-left: calc(50% - 50vw);
  }
}
