/* ==========================================================================
   FEHMERTECH Ghost Theme — screen.css
   Design System: fehmer.tech
   Colors: white bg · slate-900 text · cyan-500 accent
   Font: Inter (Google Fonts)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CSS Variables
   -------------------------------------------------------------------------- */
:root {
  /* Brand palette */
  --color-accent:        #06b6d4;   /* cyan-500 */
  --color-accent-dark:   #0891b2;   /* cyan-600 */
  --color-accent-light:  #cffafe;   /* cyan-100 */
  --color-accent-text:   #0e7490;   /* cyan-700 */

  /* Backgrounds */
  --color-bg:            #ffffff;
  --color-bg-alt:        #f8fafc;   /* slate-50 */
  --color-bg-card:       #ffffff;

  /* Text */
  --color-text:          #0f172a;   /* slate-900 */
  --color-text-secondary:#475569;   /* slate-600 */
  --color-text-muted:    #94a3b8;   /* slate-400 */

  /* Borders */
  --color-border:        #e2e8f0;   /* slate-200 */
  --color-border-dark:   #cbd5e1;   /* slate-300 */

  /* Secondary (dark) */
  --color-secondary:     #1e293b;   /* slate-800 */
  --color-secondary-dark:#0f172a;   /* slate-900 */

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.05);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.05);

  /* Radii */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', Consolas, monospace;

  /* Spacing */
  --container-max: 1152px;
  --container-pad: clamp(1rem, 4vw, 2rem);
}

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

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

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--color-accent-dark);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover { color: var(--color-accent); }

/* --------------------------------------------------------------------------
   3. Layout Utilities
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.site-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* --------------------------------------------------------------------------
   4. Topbar
   -------------------------------------------------------------------------- */
.topbar {
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
  display: none;
}

@media (min-width: 768px) { .topbar { display: block; } }

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 2.25rem;
}

.topbar-contact {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.topbar-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  color: var(--color-text-secondary);
  font-size: 0.8125rem;
}

.topbar-link:hover { color: var(--color-text); }

.topbar-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-accent-text);
  background: var(--color-accent-light);
  border: 1px solid #a5f3fc;
  padding: 0.2rem 0.75rem;
  border-radius: 9999px;
}

.topbar-dot,
.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  flex-shrink: 0;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* --------------------------------------------------------------------------
   5. Header / Navigation
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 3.5rem;
  gap: 1.5rem;
}

/* Branding */
.site-branding { flex-shrink: 0; }

.site-logo-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-text);
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: -0.01em;
}

.site-logo-link:hover { color: var(--color-text); }

.site-logo {
  border-radius: var(--radius-sm);
  object-fit: contain;
}

.site-title { white-space: nowrap; }

/* Desktop nav */
.site-nav { display: none; }

@media (min-width: 1024px) {
  .site-nav { display: flex; align-items: center; }
}

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

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: color 0.15s;
  white-space: nowrap;
}

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

.nav-current .nav-link {
  color: var(--color-accent-dark);
  border-bottom: 2px solid var(--color-accent);
}

/* Header actions */
.site-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.search-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-secondary);
  padding: 0.375rem;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, background 0.15s;
}

.search-btn:hover {
  color: var(--color-text);
  background: var(--color-bg-alt);
}

.hamburger {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-secondary);
  padding: 0.375rem;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, background 0.15s;
}

.hamburger:hover {
  color: var(--color-text);
  background: var(--color-bg-alt);
}

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

/* Mobile nav */
.mobile-nav {
  display: none;
  border-top: 1px solid var(--color-border);
  background: var(--color-bg);
  padding-block: 1rem;
}

.mobile-nav.is-open { display: block; }

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

.mobile-nav .nav-list {
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}

.mobile-nav .nav-link {
  display: block;
  padding: 0.5rem 0;
  font-size: 1rem;
  width: 100%;
}

.mobile-nav-actions {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
}

/* --------------------------------------------------------------------------
   6. Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
  white-space: nowrap;
  border: none;
}

.btn-primary {
  background: var(--color-accent);
  color: var(--color-secondary-dark);
}

.btn-primary:hover {
  background: #22d3ee; /* cyan-400 */
  color: var(--color-secondary-dark);
}

.btn-secondary {
  background: var(--color-secondary);
  color: #fff;
}

.btn-secondary:hover {
  background: var(--color-accent-dark);
  color: #fff;
}

.btn-outline {
  background: var(--color-bg);
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border-dark);
}

.btn-outline:hover {
  background: var(--color-bg-alt);
  color: var(--color-text);
}

/* --------------------------------------------------------------------------
   7. Blog Hero
   -------------------------------------------------------------------------- */
.blog-hero {
  background: linear-gradient(to bottom, var(--color-bg-alt), var(--color-bg));
  border-bottom: 1px solid var(--color-border);
  padding-block: 3rem 2.5rem;
}

.blog-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-accent-text);
  background: var(--color-accent-light);
  border: 1px solid #a5f3fc;
  padding: 0.25rem 0.875rem;
  border-radius: 9999px;
  margin-bottom: 1.25rem;
}

.blog-hero-title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  color: var(--color-text);
  letter-spacing: -0.03em;
  line-height: 1.2;
  max-width: 700px;
}

.blog-hero-description {
  margin-top: 0.75rem;
  font-size: 1.125rem;
  color: var(--color-text-secondary);
  max-width: 640px;
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   8. Blog Container / Layout
   -------------------------------------------------------------------------- */
.blog-container {
  padding-block: 3rem;
}

/* --------------------------------------------------------------------------
   9. Featured Post
   -------------------------------------------------------------------------- */
.featured-post {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  margin-bottom: 3rem;
  transition: box-shadow 0.2s, transform 0.2s;
}

.featured-post:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-1px);
}

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

.featured-post-image-wrap {
  overflow: hidden;
  aspect-ratio: 16/9;
}

@media (min-width: 768px) {
  .featured-post-image-wrap {
    aspect-ratio: auto;
    min-height: 300px;
  }
}

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

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

.featured-post-content {
  padding: 1.75rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.75rem;
}

.featured-post-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.625rem;
}

.featured-label {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
}

.featured-tag {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-accent-text);
  background: var(--color-accent-light);
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  text-decoration: none;
}

.featured-tag:hover {
  background: #a5f3fc;
  color: var(--color-accent-text);
}

.featured-date {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.featured-title {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.featured-title a {
  color: var(--color-text);
}

.featured-title a:hover {
  color: var(--color-accent-dark);
}

.featured-excerpt {
  color: var(--color-text-secondary);
  font-size: 0.9375rem;
  line-height: 1.65;
}

.featured-footer {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.5rem;
}

.featured-reading-time {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

/* --------------------------------------------------------------------------
   10. Posts Section & Grid
   -------------------------------------------------------------------------- */
.posts-section { margin-top: 1rem; }

.posts-section-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-text-secondary);
  letter-spacing: -0.01em;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--color-border);
}

.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);
  }
}

.post-grid--small {
  grid-template-columns: 1fr;
}

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

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

/* --------------------------------------------------------------------------
   11. Post Card
   -------------------------------------------------------------------------- */
.post-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
}

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

.post-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.post-card-link:hover { color: inherit; }

.post-card-image-wrap {
  overflow: hidden;
  aspect-ratio: 16/9;
  flex-shrink: 0;
}

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

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

.post-card-content {
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.post-card-tag {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-accent-text);
  background: var(--color-accent-light);
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  width: fit-content;
}

.post-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.4;
  letter-spacing: -0.01em;
  transition: color 0.15s;
}

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

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

.post-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  margin-top: auto;
  border-top: 1px solid var(--color-border);
}

.post-card-date {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.post-card-duration {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

/* --------------------------------------------------------------------------
   12. Pagination
   -------------------------------------------------------------------------- */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
}

.pagination-info {
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

/* --------------------------------------------------------------------------
   13. Post Page
   -------------------------------------------------------------------------- */
.post-header {
  background: linear-gradient(to bottom, var(--color-bg-alt), var(--color-bg));
  border-bottom: 1px solid var(--color-border);
  padding-block: 3rem 2.5rem;
}

.post-header-inner {
  max-width: 800px;
  margin-inline: auto;
}

.post-header-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.post-tag-badge {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-accent-text);
  background: var(--color-accent-light);
  border: 1px solid #a5f3fc;
  padding: 0.2rem 0.625rem;
  border-radius: 9999px;
  text-decoration: none;
}

.post-tag-badge:hover { background: #a5f3fc; color: var(--color-accent-text); }

.post-date,
.post-reading-time {
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.post-date::after {
  content: '·';
  margin-left: 0.75rem;
  color: var(--color-border-dark);
}

.post-title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  color: var(--color-text);
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.post-excerpt {
  font-size: 1.125rem;
  color: var(--color-text-secondary);
  line-height: 1.65;
  max-width: 640px;
  margin-bottom: 1.25rem;
}

.post-author-line {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

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

.post-author-avatar {
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--color-border);
}

.post-author-name {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text);
}

.post-feature-image-wrap {
  margin-top: 2.5rem;
  margin-bottom: 0;
}

.post-feature-image {
  width: 100%;
  max-width: 860px;
  margin-inline: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
}

.post-feature-image-caption {
  text-align: center;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-top: 0.5rem;
  font-style: italic;
}

/* --------------------------------------------------------------------------
   14. Post Content (gh-content)
   -------------------------------------------------------------------------- */
.post-content-wrap {
  padding-block: 3rem;
}

.post-content {
  max-width: 720px;
  margin-inline: auto;
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--color-text);
}

/* Typography inside post content */
.gh-content h1,
.gh-content h2,
.gh-content h3,
.gh-content h4,
.gh-content h5,
.gh-content h6 {
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--color-text);
  margin-top: 2.25rem;
  margin-bottom: 0.75rem;
}

.gh-content h1 { font-size: 2rem; }
.gh-content h2 { font-size: 1.5rem; border-bottom: 1px solid var(--color-border); padding-bottom: 0.5rem; }
.gh-content h3 { font-size: 1.25rem; }
.gh-content h4 { font-size: 1.125rem; }

.gh-content p {
  margin-bottom: 1.25rem;
}

.gh-content a {
  color: var(--color-accent-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: #a5f3fc;
}

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

.gh-content strong { font-weight: 700; }
.gh-content em { font-style: italic; }

.gh-content ul,
.gh-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}

.gh-content ul { list-style: disc; }
.gh-content ol { list-style: decimal; }

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

.gh-content blockquote {
  border-left: 4px solid var(--color-accent);
  padding-left: 1.25rem;
  margin: 1.75rem 0;
  color: var(--color-text-secondary);
  font-style: italic;
}

.gh-content blockquote p { margin-bottom: 0; }

.gh-content hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 2.5rem 0;
}

.gh-content pre {
  background: var(--color-secondary);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  margin: 1.5rem 0;
  border: 1px solid #334155;
}

.gh-content code {
  font-family: var(--font-mono);
  font-size: 0.875em;
}

.gh-content pre code {
  color: #e2e8f0;
  background: none;
  padding: 0;
  font-size: 0.875rem;
}

.gh-content :not(pre) > code {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  padding: 0.125rem 0.375rem;
  border-radius: var(--radius-sm);
  color: var(--color-accent-dark);
}

.gh-content img {
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  margin: 1.5rem auto;
  border: 1px solid var(--color-border);
}

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

.gh-content figcaption {
  text-align: center;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-top: 0.5rem;
  font-style: italic;
}

.gh-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9375rem;
  overflow-x: auto;
  display: block;
}

.gh-content th,
.gh-content td {
  padding: 0.625rem 1rem;
  border: 1px solid var(--color-border);
  text-align: left;
}

.gh-content th {
  background: var(--color-bg-alt);
  font-weight: 600;
}

.gh-content tr:nth-child(even) td {
  background: var(--color-bg-alt);
}

/* --------------------------------------------------------------------------
   15. Post Tags & Authors
   -------------------------------------------------------------------------- */
.post-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  max-width: 720px;
  margin-inline: auto;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
}

.post-tags-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text-muted);
}

.post-tag-chip {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  padding: 0.2rem 0.625rem;
  border-radius: 9999px;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.post-tag-chip:hover {
  background: var(--color-accent-light);
  color: var(--color-accent-text);
  border-color: #a5f3fc;
}

.post-authors-section {
  max-width: 720px;
  margin-inline: auto;
  margin-top: 2.5rem;
}

.author-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}

.author-card-avatar {
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--color-border);
}

.author-card-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
  display: block;
  margin-bottom: 0.25rem;
}

.author-card-name:hover { color: var(--color-accent-dark); }

.author-card-bio {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  line-height: 1.55;
}

/* --------------------------------------------------------------------------
   16. Post CTA Box
   -------------------------------------------------------------------------- */
.post-cta-box {
  max-width: 720px;
  margin-inline: auto;
  margin-top: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  background: linear-gradient(135deg, var(--color-secondary) 0%, #0f172a 100%);
  border-radius: var(--radius-lg);
  padding: 1.5rem 2rem;
  box-shadow: var(--shadow-lg);
}

.post-cta-content {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
}

.post-cta-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  margin-top: 0.125rem;
}

.post-cta-content strong {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.25rem;
}

.post-cta-content p {
  font-size: 0.875rem;
  color: #94a3b8;
  margin: 0;
}

/* --------------------------------------------------------------------------
   17. Related Posts
   -------------------------------------------------------------------------- */
.related-posts {
  padding-block: 3rem;
  border-top: 1px solid var(--color-border);
  margin-top: 2rem;
}

.related-posts-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

/* --------------------------------------------------------------------------
   18. Taxonomy (tag / author) headers
   -------------------------------------------------------------------------- */
.taxonomy-header {
  background: linear-gradient(to bottom, var(--color-bg-alt), var(--color-bg));
  border-bottom: 1px solid var(--color-border);
  padding-block: 3rem 2.5rem;
}

.taxonomy-header-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.taxonomy-cover,
.author-cover {
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--color-border);
  width: 80px;
  height: 80px;
  flex-shrink: 0;
}

.taxonomy-title {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--color-text);
  margin-bottom: 0.5rem;
}

.taxonomy-description {
  color: var(--color-text-secondary);
  font-size: 1rem;
  max-width: 600px;
  margin-bottom: 0.5rem;
}

.taxonomy-count {
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.author-social {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.author-social-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-accent-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* --------------------------------------------------------------------------
   19. Page template
   -------------------------------------------------------------------------- */
.page-header {
  background: linear-gradient(to bottom, var(--color-bg-alt), var(--color-bg));
  border-bottom: 1px solid var(--color-border);
  padding-block: 3rem 2.5rem;
}

.page-title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--color-text);
  max-width: 800px;
}

/* --------------------------------------------------------------------------
   20. Error Page
   -------------------------------------------------------------------------- */
.error-template {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
}

.error-content {
  text-align: center;
  padding: 3rem 2rem;
}

.error-code {
  font-size: 6rem;
  font-weight: 800;
  color: var(--color-accent);
  line-height: 1;
  letter-spacing: -0.05em;
}

.error-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-text);
  margin-top: 0.5rem;
  margin-bottom: 1rem;
}

.error-description {
  color: var(--color-text-secondary);
  margin-bottom: 2rem;
  max-width: 400px;
  margin-inline: auto;
  margin-bottom: 2rem;
}

/* --------------------------------------------------------------------------
   21. Empty State
   -------------------------------------------------------------------------- */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--color-text-muted);
}

/* --------------------------------------------------------------------------
   22. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  margin-top: auto;
  background: var(--color-secondary);
  color: #94a3b8;
  border-top: 1px solid #334155;
}

.site-footer-inner {
  padding-block: 3rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .site-footer-inner {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

.footer-title {
  font-size: 1rem;
  font-weight: 700;
  color: #f1f5f9;
  letter-spacing: -0.01em;
}

.footer-logo-link {
  display: inline-block;
  text-decoration: none;
  margin-bottom: 0.5rem;
}

.footer-logo-link:hover .footer-title { color: var(--color-accent); }

.footer-description {
  font-size: 0.875rem;
  line-height: 1.6;
  max-width: 320px;
  color: #64748b;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  align-self: start;
}

.footer-nav-link {
  font-size: 0.875rem;
  color: #64748b;
  text-decoration: none;
  transition: color 0.15s;
}

.footer-nav-link:hover { color: var(--color-accent); }

.footer-bottom {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #334155;
  font-size: 0.8125rem;
  color: #475569;
}

.footer-copy a,
.footer-powered a {
  color: #64748b;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-copy a:hover,
.footer-powered a:hover { color: var(--color-accent); }

/* --------------------------------------------------------------------------
   23. Ghost Portal & Membership
   -------------------------------------------------------------------------- */
.gh-portal-triggerbtn { display: none !important; }

/* --------------------------------------------------------------------------
   24. Prism / Code Highlight overrides
   -------------------------------------------------------------------------- */
pre[class*="language-"] {
  background: var(--color-secondary) !important;
  border: 1px solid #334155;
}

/* --------------------------------------------------------------------------
   24b. Koenig Card Widths (required by Ghost)
   -------------------------------------------------------------------------- */

/* Wide cards break out of the post content column */
.kg-width-wide {
  position: relative;
  width: 85vw;
  min-width: 100%;
  margin: 1.5rem calc(50% - 42.5vw);
}

/* Full-bleed cards span the entire viewport */
.kg-width-full {
  position: relative;
  width: 100vw;
  margin: 1.5rem calc(50% - 50vw);
}

/* Koenig image card */
.kg-image-card img {
  margin: 0 auto;
  border-radius: var(--radius-md);
}

/* Koenig gallery card */
.kg-gallery-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 1.5rem 0;
}

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

.kg-gallery-image {
  flex: 1;
  overflow: hidden;
  border-radius: var(--radius-md);
}

.kg-gallery-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  margin: 0;
  border: none;
  box-shadow: none;
  border-radius: var(--radius-md);
}

/* Koenig bookmark card */
.kg-bookmark-card {
  width: 100%;
  margin: 1.5rem 0;
}

.kg-bookmark-container {
  display: flex;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.kg-bookmark-container:hover {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-sm);
  color: inherit;
}

.kg-bookmark-content {
  flex: 1;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.kg-bookmark-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-text);
}

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

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

.kg-bookmark-icon {
  width: 16px;
  height: 16px;
  border-radius: 2px;
}

.kg-bookmark-thumbnail {
  width: 160px;
  flex-shrink: 0;
  overflow: hidden;
}

.kg-bookmark-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  margin: 0;
  border: none;
  box-shadow: none;
  border-radius: 0;
}

/* Koenig callout card */
.kg-callout-card {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: var(--color-accent-light);
  border: 1px solid #a5f3fc;
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
}

.kg-callout-emoji {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.kg-callout-text {
  font-size: 0.9375rem;
  color: var(--color-text);
}

/* Koenig toggle card */
.kg-toggle-card {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  margin: 1.5rem 0;
  overflow: hidden;
}

.kg-toggle-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1.25rem;
  cursor: pointer;
  font-weight: 600;
  color: var(--color-text);
}

.kg-toggle-content {
  padding: 0 1.25rem 1rem;
  color: var(--color-text-secondary);
  font-size: 0.9375rem;
}

/* Koenig video card */
.kg-video-card {
  margin: 1.5rem 0;
}

.kg-video-card video {
  width: 100%;
  border-radius: var(--radius-md);
}

/* Koenig embed card */
.kg-embed-card {
  margin: 1.5rem 0;
}

.kg-embed-card iframe,
.kg-embed-card video {
  width: 100%;
  border-radius: var(--radius-md);
}

/* Koenig header card (v2) */
.kg-header-card {
  padding: 3rem 2rem;
  background: var(--color-secondary);
  color: #fff;
  border-radius: var(--radius-lg);
  text-align: center;
  margin: 2rem 0;
}

.kg-header-card h2 {
  color: #fff;
  font-size: 2rem;
  border-bottom: none;
  padding-bottom: 0;
  margin-top: 0;
}

.kg-header-card p { color: #94a3b8; }

/* Koenig product card */
.kg-product-card {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin: 1.5rem 0;
  display: flex;
  gap: 1rem;
}

.kg-product-card-image {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: var(--radius-md);
  flex-shrink: 0;
}

/* Koenig audio card */
.kg-audio-card {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
}

/* Koenig NFT card */
.kg-nft-card { margin: 1.5rem 0; }


/* --------------------------------------------------------------------------
   25. Subscribe Section
   -------------------------------------------------------------------------- */
.subscribe-section {
  padding-block: 3rem;
  background: var(--color-bg-alt);
  border-top: 1px solid var(--color-border);
}

.subscribe-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  background: linear-gradient(135deg, var(--color-secondary) 0%, #0f172a 100%);
  border-radius: var(--radius-lg);
  padding: 2rem 2.5rem;
  box-shadow: var(--shadow-lg);
}

.subscribe-box-content {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.subscribe-icon {
  font-size: 2rem;
  flex-shrink: 0;
  margin-top: 0.125rem;
}

.subscribe-box-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #f1f5f9;
  margin-bottom: 0.375rem;
}

.subscribe-box-desc {
  font-size: 0.9rem;
  color: #94a3b8;
  margin: 0;
}

@media (max-width: 640px) {
  .subscribe-box {
    flex-direction: column;
    align-items: flex-start;
    padding: 1.5rem;
  }
}


@media (max-width: 640px) {
  .featured-post-content {
    padding: 1.25rem;
  }

  .post-cta-box {
    padding: 1.25rem;
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* --------------------------------------------------------------------------
   26. Print
   -------------------------------------------------------------------------- */
@media print {
  .topbar,
  .site-header,
  .site-footer,
  .post-cta-box,
  .related-posts,
  .pagination { display: none; }

  .gh-content { max-width: 100%; }
}
