/* ==========================================================================
   OctoSEC Ghost Theme — style.css
   Design system matching octosec.io landing page
   ========================================================================== */

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

:root {
  /* OctoSEC color palette */
  --octo: #1fffa9;
  --octo-50: #eafff6;
  --octo-100: #ccffea;
  --octo-200: #99ffda;
  --octo-300: #5cffc5;
  --octo-400: #1fffa9;
  --octo-500: #00e68e;
  --octo-600: #00bf73;
  --octo-700: #00995e;
  --octo-800: #06784d;
  --octo-900: #096241;
  --octo-950: #023825;

  /* Dark surfaces */
  --dark-bg: #050505;
  --dark-surface: #0a0a0a;
  --dark-border: #1f1f22;

  /* Zinc palette (matching Tailwind) */
  --zinc-50: #fafafa;
  --zinc-100: #f4f4f5;
  --zinc-200: #e4e4e7;
  --zinc-300: #d4d4d8;
  --zinc-400: #a1a1aa;
  --zinc-500: #71717a;
  --zinc-600: #52525b;
  --zinc-700: #3f3f46;
  --zinc-800: #27272a;
  --zinc-900: #18181b;
  --zinc-950: #09090b;

  /* Layout */
  --content-width: 820px;
  --content-outer: 880px;
  --wide-width: 1100px;
  --max-width: 1280px;

  /* Typography */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--dark-bg);
  color: var(--zinc-300);
  font-family: var(--font-sans);
  line-height: 1.7;
  overflow-x: hidden;
}

::selection {
  background: rgba(31, 255, 169, 0.3);
  color: var(--octo-200);
}

a {
  color: var(--octo-400);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--octo-300);
}

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

/* ---------- Grid Background (matching landing page) ---------- */
.grid-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-size: 50px 50px;
  background-image:
    linear-gradient(to right, #1f1f22 1px, transparent 1px),
    linear-gradient(to bottom, #1f1f22 1px, transparent 1px);
  mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
  opacity: 0.20;
}

.top-glow {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 500px;
  background: rgba(31, 255, 169, 0.05);
  filter: blur(120px);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

/* ---------- Layout Containers ---------- */
.site-wrapper {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-main {
  flex: 1;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 640px) {
  .container { padding: 0 1.5rem; }
}

@media (min-width: 1024px) {
  .container { padding: 0 2rem; }
}

.content-width {
  max-width: var(--content-width);
  margin: 0 auto;
}

.wide-width {
  max-width: var(--wide-width);
  margin: 0 auto;
}

/* ---------- Navbar ---------- */
.site-nav {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 50;
  transition: all 0.3s ease;
  border-bottom: 1px solid transparent;
  padding: 1.5rem 0;
}

.site-nav.scrolled {
  background: rgba(5, 5, 5, 0.80);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: var(--dark-border);
  padding: 1rem 0;
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo img {
  height: 40px;
  width: auto;
  transition: filter 0.2s;
}

.nav-logo:hover img {
  filter: brightness(1.1);
}

.nav-links {
  display: none;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

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

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--zinc-400);
  position: relative;
  transition: color 0.2s;
}

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

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--octo-400);
  transition: width 0.2s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  border: 1px solid rgba(0, 230, 142, 0.3);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0.25rem;
  color: var(--octo-400);
  transition: all 0.2s;
}

.nav-cta:hover {
  background: rgba(0, 230, 142, 0.1);
  border-color: rgba(0, 230, 142, 0.6);
  color: var(--octo-400);
}

.nav-cta svg {
  margin-left: 0.25rem;
  width: 1rem;
  height: 1rem;
}

/* Mobile menu */
.nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--zinc-400);
  cursor: pointer;
  padding: 0.5rem;
}

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

.nav-toggle svg {
  width: 24px;
  height: 24px;
}

.mobile-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: var(--dark-bg);
  border-bottom: 1px solid var(--dark-border);
  padding: 1rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
}

.mobile-menu.open {
  display: block;
}

.mobile-menu a {
  display: block;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--zinc-300);
  border-radius: 0.375rem;
  transition: all 0.15s;
}

.mobile-menu a.mobile-cta {
  margin-top: 1rem;
  text-align: center;
  padding: 0.75rem 1rem;
  border: 1px solid var(--octo-500);
  background: rgba(0, 230, 142, 0.1);
  color: var(--octo-400);
  font-weight: 500;
  border-radius: 0.25rem;
}

.mobile-menu a:hover {
  color: var(--octo-400);
  background: var(--dark-surface);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--dark-surface);
  border-top: 1px solid var(--dark-border);
  padding-top: 3rem;
  padding-bottom: 2rem;
}

.footer-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .footer-top {
    flex-direction: row;
    justify-content: space-between;
  }
}

.footer-brand img {
  height: 32px;
  width: auto;
}

.footer-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.75rem;
  background: rgba(243, 128, 32, 0.1);
  border: 1px solid rgba(243, 128, 32, 0.3);
  border-radius: 9999px;
  margin-top: 0.5rem;
  cursor: default;
  transition: background 0.2s;
}

.footer-badge:hover {
  background: rgba(243, 128, 32, 0.2);
}

.footer-badge svg {
  width: 12px;
  height: 12px;
  color: #F38020;
}

.footer-badge span {
  font-size: 10px;
  font-weight: 700;
  color: #F38020;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-social {
  display: flex;
  gap: 1.5rem;
}

.footer-social a {
  color: var(--zinc-500);
  transition: color 0.2s;
}

.footer-social a:hover {
  color: var(--octo-400);
}

.footer-social svg {
  width: 20px;
  height: 20px;
}

/* Connection status bar (1:1 match with landing page) */
.connection-bar {
  border: 1px solid var(--dark-border);
  border-radius: 0.5rem;
  background: rgba(0, 0, 0, 0.3);
  padding: 1rem;
  margin-bottom: 2rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.connection-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.connection-bar .status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #eab308; /* yellow while loading */
  animation: pulse 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.connection-bar .status-dot.connected {
  background: var(--octo-400);
  animation: none;
}

.connection-bar .status-label {
  color: var(--octo-400);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.connection-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

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

.connection-cell {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(24, 24, 27, 0.5);
  border-radius: 0.25rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--zinc-800);
}

.connection-cell .conn-icon {
  color: rgba(0, 230, 142, 0.7);
  flex-shrink: 0;
}

.conn-info {
  display: flex;
  flex-direction: column;
}

.conn-label {
  font-size: 10px;
  color: var(--zinc-600);
  text-transform: uppercase;
}

.conn-value {
  color: var(--zinc-300);
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-top: 1px solid var(--zinc-800);
  padding-top: 2rem;
  font-size: 0.875rem;
  color: var(--zinc-600);
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
  }
}

/* ---------- Hero / Blog Header (matching landing page hero style) ---------- */
.blog-header {
  position: relative;
  padding: 9rem 0 4rem;
  text-align: center;
  overflow: hidden;
}

.blog-header .tag-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  border: 1px solid rgba(0, 230, 142, 0.3);
  background: rgba(0, 230, 142, 0.05);
  color: var(--octo-400);
  font-size: 0.75rem;
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 2rem;
}

.blog-header .tag-badge .pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--octo-400);
  margin-right: 0.5rem;
  animation: pulse 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.blog-header h1 {
  font-size: 3.25rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: #fff;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

@media (min-width: 1024px) {
  .blog-header h1 { font-size: 4.5rem; }
}

.blog-header h1 .accent {
  color: var(--octo-400);
  position: relative;
  display: inline-block;
}

/* SVG curved underline — same as "Superior." on landing page */
.hero-underline {
  position: absolute;
  width: 100%;
  height: 12px;
  bottom: -4px;
  left: 0;
  color: rgba(0, 230, 142, 0.5);
}

.blog-header h1 .muted {
  background: linear-gradient(to right, var(--zinc-200), var(--zinc-500));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.blog-header p {
  font-size: 1.125rem;
  color: var(--zinc-400);
  max-width: 36rem;
  margin: 0 auto;
  line-height: 1.7;
}

/* ---------- Post Cards Grid ---------- */
.post-feed {
  padding: 4rem 0 6rem;
}

.post-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

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

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

/* Featured post spans full width */
.post-card.featured {
  grid-column: 1 / -1;
}

.post-card.featured .card-inner {
  display: grid;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .post-card.featured .card-inner {
    grid-template-columns: 1fr 1fr;
  }
}

.post-card {
  position: relative;
  overflow: hidden;
}

.card-inner {
  position: relative;
  background: var(--dark-bg);
  border: 1px solid var(--dark-border);
  border-radius: 0.5rem;
  overflow: hidden;
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.card-inner:hover {
  border-color: rgba(31, 255, 169, 0.4);
}

/* Hover gradient overlay */
.card-inner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(31, 255, 169, 0.05), transparent, transparent);
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 1;
  pointer-events: none;
}

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

.card-image {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
  overflow: hidden;
  background: var(--zinc-900);
}

.card-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

/* Placeholder when no image */
.card-image-placeholder {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: var(--zinc-900);
  overflow: hidden;
}

.card-image-placeholder::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at center, rgba(31, 255, 169, 0.08), transparent 70%);
}

.card-content {
  position: relative;
  z-index: 2;
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-tag {
  display: inline-block;
  font-size: 0.6875rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--octo-400);
  margin-bottom: 0.75rem;
  padding: 0.125rem 0.5rem;
  background: rgba(31, 255, 169, 0.08);
  border: 1px solid rgba(31, 255, 169, 0.15);
  border-radius: 0.25rem;
  width: fit-content;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--zinc-100);
  line-height: 1.3;
  margin-bottom: 0.75rem;
  transition: color 0.2s;
}

.card-inner:hover .card-title {
  color: var(--octo-300);
}

.card-excerpt {
  font-size: 0.875rem;
  color: var(--zinc-500);
  line-height: 1.6;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--dark-border);
  font-size: 0.75rem;
  color: var(--zinc-600);
}

.card-meta .author-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--dark-border);
}

.card-meta .author-name {
  color: var(--zinc-400);
  font-weight: 500;
}

.card-meta .separator {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--zinc-700);
}

/* Decorative dot on hover */
.card-dot {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--octo-500);
  box-shadow: 0 0 10px var(--octo);
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 5;
}

.card-inner:hover .card-dot {
  opacity: 1;
}

/* ---------- Featured Badge ---------- */
.featured-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.625rem;
  background: rgba(5, 5, 5, 0.8);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(31, 255, 169, 0.4);
  border-radius: 0.25rem;
  font-size: 0.6875rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--octo-400);
}

.featured-badge svg {
  width: 12px;
  height: 12px;
}

/* ---------- Content Backdrop ---------- */
/* A subtle surface panel behind all readable content for contrast */
.content-backdrop {
  background: var(--dark-surface);
  border: 1px solid var(--dark-border);
  border-radius: 0 0 0.75rem 0.75rem;
  max-width: var(--content-outer);
  margin: 0 auto 4rem;
  padding: 2.5rem 3rem 3rem;
}

/* When no feature image, give full rounded corners */
.content-backdrop.no-image {
  border-radius: 0.75rem;
}
  position: relative;
}

@media (max-width: 640px) {
  .content-backdrop {
    border-radius: 0;
    border-left: none;
    border-right: none;
    padding: 2rem 1.25rem;
    margin-bottom: 2rem;
  }
}

/* ---------- Single Post ---------- */
.single-post {
  padding-bottom: 2rem;
}

.post-header {
  padding: 7rem 0 1.5rem;
  text-align: center;
}

.post-header .tag-link {
  display: inline-block;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--octo-400);
  padding: 0.25rem 0.75rem;
  border: 1px solid rgba(31, 255, 169, 0.3);
  border-radius: 9999px;
  background: rgba(31, 255, 169, 0.05);
  margin-bottom: 1.5rem;
  transition: all 0.2s;
}

.post-header .tag-link:hover {
  background: rgba(31, 255, 169, 0.1);
  border-color: rgba(31, 255, 169, 0.5);
}

.post-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #fff;
  line-height: 1.15;
  max-width: var(--wide-width);
  margin: 0 auto 1.5rem;
  padding: 0 1rem;
}

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

.post-meta-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--zinc-500);
  flex-wrap: wrap;
}

.post-meta-bar .author-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--zinc-400);
  font-weight: 500;
}

.post-meta-bar .author-link img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--dark-border);
}

.post-meta-bar .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--zinc-700);
}

.post-feature-image {
  max-width: var(--content-outer);
  margin: 1.5rem auto 0;
  border-radius: 0.75rem 0.75rem 0 0;
  overflow: hidden;
  border: 1px solid var(--dark-border);
  border-bottom: none;
  max-height: 380px;
}

.post-feature-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---------- Post Content (gh-content) ---------- */
.gh-content {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 0 1rem;
  font-size: 1.125rem;
  line-height: 1.85;
  color: var(--zinc-300);
}

/* Standalone gh-content (not inside backdrop) still gets its own padding */
.single-post > .gh-content {
  padding: 0 1rem 2rem;
}

.gh-content > * + * {
  margin-top: 1.75rem;
}

.gh-content h2 {
  font-size: 1.875rem;
  font-weight: 700;
  color: #fff;
  margin-top: 3rem;
  letter-spacing: -0.02em;
}

.gh-content h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--zinc-100);
  margin-top: 2.5rem;
}

.gh-content h4 {
  font-size: 1.1875rem;
  font-weight: 600;
  color: var(--zinc-200);
  margin-top: 2rem;
}

.gh-content p {
  color: var(--zinc-300);
}

.gh-content strong {
  color: var(--zinc-100);
  font-weight: 600;
}

.gh-content em {
  color: var(--zinc-200);
}

.gh-content a {
  color: var(--octo-400);
  text-decoration: underline;
  text-decoration-color: rgba(31, 255, 169, 0.3);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s;
}

.gh-content a:hover {
  text-decoration-color: var(--octo-400);
}

.gh-content ul,
.gh-content ol {
  padding-left: 1.5rem;
  color: var(--zinc-400);
}

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

.gh-content li::marker {
  color: var(--octo-500);
}

.gh-content blockquote {
  border-left: 3px solid var(--octo-500);
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  background: rgba(31, 255, 169, 0.03);
  border-radius: 0 0.5rem 0.5rem 0;
  color: var(--zinc-300);
  font-style: italic;
}

.gh-content blockquote p {
  color: var(--zinc-300);
}

.gh-content hr {
  border: none;
  height: 1px;
  background: var(--dark-border);
  margin: 3rem 0;
}

.gh-content pre {
  background: var(--dark-surface);
  border: 1px solid var(--dark-border);
  border-radius: 0.5rem;
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--zinc-300);
}

.gh-content code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: rgba(31, 255, 169, 0.08);
  color: var(--octo-300);
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  border: 1px solid rgba(31, 255, 169, 0.12);
}

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

.gh-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
}

.gh-content th {
  text-align: left;
  font-weight: 600;
  color: var(--zinc-200);
  padding: 0.75rem 1rem;
  border-bottom: 2px solid var(--dark-border);
  font-size: 0.875rem;
}

.gh-content td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--dark-border);
  color: var(--zinc-400);
  font-size: 0.875rem;
}

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

/* Width classes for Ghost cards */
.gh-content .kg-width-wide {
  max-width: var(--wide-width);
  margin-left: calc(50% - min(50vw - 1rem, var(--wide-width) / 2));
  width: min(100vw - 2rem, var(--wide-width));
}

.gh-content .kg-width-full {
  max-width: none;
  margin-left: calc(50% - 50vw);
  width: 100vw;
}

.gh-content .kg-image-card img,
.gh-content .kg-gallery-image img {
  border-radius: 0.5rem;
  border: 1px solid var(--dark-border);
}

.gh-content .kg-callout-card {
  background: var(--dark-surface);
  border: 1px solid var(--dark-border);
  border-radius: 0.5rem;
  padding: 1.25rem 1.5rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.gh-content .kg-bookmark-card {
  background: var(--dark-surface);
  border: 1px solid var(--dark-border);
  border-radius: 0.5rem;
  overflow: hidden;
  transition: border-color 0.2s;
}

.gh-content .kg-bookmark-card:hover {
  border-color: rgba(31, 255, 169, 0.3);
}

/* ---------- Author Section ---------- */
.post-author-section {
  max-width: var(--content-outer);
  margin: 0 auto 4rem;
  padding: 2rem;
  background: var(--dark-surface);
  border: 1px solid var(--dark-border);
  border-radius: 0.75rem;
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.post-author-section img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid var(--dark-border);
  flex-shrink: 0;
}

.post-author-section h4 {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.25rem;
}

.post-author-section p {
  font-size: 0.875rem;
  color: var(--zinc-500);
  line-height: 1.6;
}

/* ---------- Tag / Author Archive ---------- */
.archive-header {
  padding: 10rem 0 3rem;
  text-align: center;
  border-bottom: 1px solid var(--dark-border);
}

.archive-header .archive-label {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--octo-400);
  margin-bottom: 1rem;
}

.archive-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.03em;
}

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

.archive-header p {
  margin-top: 1rem;
  font-size: 1rem;
  color: var(--zinc-400);
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
}

.archive-count {
  display: inline-block;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--zinc-600);
  margin-top: 1rem;
}

/* ---------- Pagination ---------- */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 2rem 0 4rem;
  font-size: 0.875rem;
}

.pagination a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border: 1px solid var(--dark-border);
  border-radius: 0.375rem;
  color: var(--zinc-400);
  background: var(--dark-surface);
  font-weight: 500;
  transition: all 0.2s;
}

.pagination a:hover {
  border-color: rgba(31, 255, 169, 0.4);
  color: var(--octo-400);
  background: rgba(31, 255, 169, 0.05);
}

.pagination .page-number {
  color: var(--zinc-600);
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

/* ---------- Error Page ---------- */
.error-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 70vh;
  text-align: center;
  padding: 2rem;
}

.error-code {
  font-size: 8rem;
  font-weight: 700;
  color: var(--octo-400);
  line-height: 1;
  letter-spacing: -0.05em;
  text-shadow: 0 0 40px rgba(31, 255, 169, 0.3);
  font-family: var(--font-mono);
}

.error-page h1 {
  font-size: 1.75rem;
  font-weight: 600;
  color: #fff;
  margin: 1.5rem 0 0.75rem;
}

.error-page p {
  color: var(--zinc-500);
  max-width: 24rem;
  margin-bottom: 2rem;
}

.error-page .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--octo-500);
  color: #000;
  font-weight: 700;
  border-radius: 0.25rem;
  transition: background 0.2s;
  box-shadow: 0 0 20px -5px rgba(31, 255, 169, 0.5);
}

.error-page .btn:hover {
  background: var(--octo-400);
  color: #000;
}

/* ---------- Animations ---------- */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes glow {
  0% { box-shadow: 0 0 5px var(--octo), 0 0 10px var(--octo); }
  100% { box-shadow: 0 0 20px var(--octo), 0 0 40px var(--octo); }
}

.animate-slide-up {
  animation: slideUp 0.5s ease-out forwards;
}

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

.text-gradient {
  background: linear-gradient(to right, var(--zinc-200), var(--zinc-500));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--dark-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--zinc-800);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--zinc-700);
}

/* ---------- Ghost-specific classes ---------- */
.gh-navigation { } /* Ghost nav container */
.gh-head-actions { }
.is-head-left-logo .gh-head-logo { }

/* Members / Subscribe overlay if used */
.subscribe-form {
  max-width: var(--content-outer);
  margin: 0 auto 4rem;
  padding: 2.5rem;
  background: var(--dark-surface);
  border: 1px solid var(--dark-border);
  border-radius: 0.75rem;
  text-align: center;
}

.subscribe-form h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
}

.subscribe-form p {
  color: var(--zinc-500);
  margin-bottom: 1.5rem;
  font-size: 0.9375rem;
}

.subscribe-form form {
  display: flex;
  gap: 0.75rem;
  max-width: 28rem;
  margin: 0 auto;
}

@media (max-width: 480px) {
  .subscribe-form form { flex-direction: column; }
}

.subscribe-form input[type="email"] {
  flex: 1;
  padding: 0.75rem 1rem;
  background: var(--dark-bg);
  border: 1px solid var(--dark-border);
  border-radius: 0.375rem;
  color: var(--zinc-300);
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.2s;
}

.subscribe-form input[type="email"]:focus {
  border-color: var(--octo-500);
  box-shadow: 0 0 0 3px rgba(31, 255, 169, 0.1);
}

.subscribe-form input[type="email"]::placeholder {
  color: var(--zinc-600);
}

.subscribe-form button {
  padding: 0.75rem 1.5rem;
  background: var(--octo-500);
  color: #000;
  font-weight: 700;
  font-size: 0.875rem;
  border: none;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: background 0.2s;
  box-shadow: 0 0 20px -5px rgba(31, 255, 169, 0.4);
  white-space: nowrap;
}

.subscribe-form button:hover {
  background: var(--octo-400);
}

/* ---------- Koenig Editor Card Styles (required by Ghost) ---------- */

/* Gallery */
.kg-gallery-container {
  display: flex;
  flex-direction: column;
  max-width: var(--wide-width);
  margin: 2rem auto;
}

.kg-gallery-row {
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.kg-gallery-row:not(:first-of-type) {
  margin-top: 0;
}

.kg-gallery-image {
  flex: 1 1 0%;
  overflow: hidden;
}

.kg-gallery-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0.375rem;
  border: 1px solid var(--dark-border);
}

/* Bookmark card */
.kg-bookmark-card {
  background: var(--dark-surface);
  border: 1px solid var(--dark-border);
  border-radius: 0.5rem;
  overflow: hidden;
  transition: border-color 0.2s;
}

.kg-bookmark-card:hover {
  border-color: rgba(31, 255, 169, 0.3);
}

.kg-bookmark-container {
  display: flex;
  text-decoration: none;
  color: inherit;
  min-height: 148px;
}

.kg-bookmark-content {
  flex: 1;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  order: 1;
}

.kg-bookmark-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--zinc-100);
  line-height: 1.4;
  margin-bottom: 0.5rem;
  transition: color 0.2s;
}

.kg-bookmark-card:hover .kg-bookmark-title {
  color: var(--octo-300);
}

.kg-bookmark-description {
  font-size: 0.8125rem;
  color: var(--zinc-500);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.kg-bookmark-metadata {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--zinc-600);
  flex-wrap: wrap;
}

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

.kg-bookmark-author {
  color: var(--zinc-500);
}

.kg-bookmark-author::after {
  content: "•";
  margin-left: 0.5rem;
}

.kg-bookmark-publisher {
  color: var(--zinc-500);
}

.kg-bookmark-thumbnail {
  position: relative;
  min-width: 200px;
  max-width: 280px;
  order: 2;
}

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

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

  .kg-bookmark-thumbnail {
    min-width: 100%;
    max-width: 100%;
    order: 0;
    max-height: 180px;
    overflow: hidden;
  }
}

/* ---------- Responsive adjustments ---------- */
@media (max-width: 640px) {
  .blog-header { padding: 8rem 0 3rem; }
  .blog-header h1 { font-size: 2rem; }
  .post-header { padding: 6rem 0 1rem; }
  .post-header h1 { font-size: 1.875rem; }
  .post-author-section { flex-direction: column; align-items: center; text-align: center; }
}
