/* ============================================
   CEENDESIS GHOST THEME
   Matches the ceendesis.com design system
   ============================================ */

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

:root {
  --green-primary: #006855;
  --green-light: #0c8a72;
  --dark-text: #171d1c;
  --body-text: #3e4945;
  --muted-text: #6d7a75;
  --card-border: #d4ece6;
  --bg-white: #ffffff;
  --bg-offwhite: #f5faf8;
  --bg-cream: #f0f5f3;
  --font-heading: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --max-width: 1200px;
  --shadow-md: 0 12px 32px -4px rgba(6,27,22,.06);
  --shadow-lg: 0 20px 48px -8px rgba(6,27,22,.12), 0 4px 12px -2px rgba(6,27,22,.06);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--body-text);
  background: var(--bg-white);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--green-primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--green-light); }
img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--dark-text);
  letter-spacing: -1px;
  line-height: 1.2;
}

/* ── Layout ── */
.vl-container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.vl-container-narrow { max-width: 720px; }

/* ── Eyebrow ── */
.vl-eyebrow {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--green-light);
  display: block;
  margin-bottom: 12px;
}

.vl-subtitle {
  font-size: 18px;
  color: var(--body-text);
  max-width: 600px;
  line-height: 1.6;
}

/* ── Buttons ── */
.vl-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 15px;
  padding: 12px 24px;
  border-radius: 8px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.25s ease;
  text-decoration: none;
}

.vl-btn-primary {
  background: var(--green-primary);
  color: white;
  border-color: var(--green-primary);
}

.vl-btn-primary:hover {
  background: var(--green-light);
  border-color: var(--green-light);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,104,85,.3);
}

/* ============================================
   HEADER
   ============================================ */

.vl-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--card-border);
  padding: 0 24px;
}

.vl-header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.vl-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.vl-logo img {
  height: 32px;
  width: auto;
  border-radius: 8px;
}

.vl-logo-text {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 20px;
  color: var(--dark-text);
  letter-spacing: -0.5px;
}

.vl-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.vl-nav ul {
  list-style: none;
  display: flex;
  gap: 4px;
}

.vl-nav a {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 15px;
  color: var(--body-text);
  padding: 8px 16px;
  border-radius: 6px;
  transition: all 0.2s;
}

.vl-nav a:hover {
  color: var(--green-primary);
  background: var(--bg-cream);
}

.vl-nav .nav-current a {
  color: var(--green-primary);
  font-weight: 600;
}

/* ============================================
   BLOG HERO
   ============================================ */

.vl-blog-hero {
  padding: 120px 0 60px;
  text-align: center;
  background: linear-gradient(180deg, var(--bg-offwhite) 0%, var(--bg-white) 100%);
}

.vl-blog-hero h1 {
  font-size: clamp(32px, 4vw, 48px);
  max-width: 700px;
  margin: 0 auto 16px;
}

.vl-blog-hero .vl-subtitle {
  margin: 0 auto;
}

/* ============================================
   POST GRID
   ============================================ */

.vl-blog-feed {
  padding: 60px 0 100px;
}

.vl-post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 40px;
}

/* ============================================
   POST CARD
   ============================================ */

.vl-post-card {
  background: white;
  border: 0.5px solid var(--card-border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
}

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

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

.vl-post-card-image {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-offwhite);
}

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

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

.vl-post-card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.vl-post-card-tag {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--green-primary);
  margin-bottom: 8px;
}

.vl-post-card-title {
  font-size: 20px;
  letter-spacing: -0.5px;
  margin-bottom: 10px;
  line-height: 1.3;
}

.vl-post-card-excerpt {
  font-size: 15px;
  color: var(--body-text);
  line-height: 1.6;
  flex-grow: 1;
  margin-bottom: 16px;
}

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

/* ============================================
   FEATURED POST
   ============================================ */

.vl-featured-post {
  margin-bottom: 48px;
  border-bottom: 1px solid var(--card-border);
  padding-bottom: 48px;
}

.vl-featured-link {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  align-items: center;
  text-decoration: none;
  color: inherit;
}

.vl-featured-image {
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--bg-offwhite);
}

.vl-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vl-featured-body h2 {
  font-size: clamp(24px, 3vw, 36px);
  margin-bottom: 12px;
}

.vl-featured-body p {
  font-size: 16px;
  line-height: 1.65;
  color: var(--body-text);
  margin-bottom: 16px;
}

/* ============================================
   ARTICLE (Single post)
   ============================================ */

.vl-article-header {
  padding: 120px 0 40px;
  text-align: center;
}

.vl-article-tag {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--green-primary);
  margin-bottom: 16px;
  display: inline-block;
}

.vl-article-title {
  font-size: clamp(32px, 5vw, 52px);
  max-width: 800px;
  margin: 0 auto 20px;
}

.vl-article-excerpt {
  font-size: 20px;
  color: var(--body-text);
  max-width: 640px;
  margin: 0 auto 28px;
  line-height: 1.5;
}

.vl-article-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  font-size: 14px;
  color: var(--muted-text);
}

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

.vl-author-avatar-placeholder {
  background: linear-gradient(135deg, var(--green-primary), var(--green-light));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 14px;
}

.vl-article-author {
  display: flex;
  align-items: center;
  gap: 8px;
}

.vl-author-name {
  font-weight: 600;
  color: var(--dark-text);
}

/* Feature image */
.vl-article-feature-image {
  margin-bottom: 48px;
}

.vl-article-feature-image img {
  border-radius: 12px;
  box-shadow: var(--shadow-md);
}

.vl-article-feature-image figcaption {
  text-align: center;
  font-size: 13px;
  color: var(--muted-text);
  margin-top: 12px;
}

/* Article content — Ghost's rendered HTML */
.vl-article-content {
  padding-bottom: 60px;
}

.vl-article-content h2 {
  font-size: 28px;
  margin: 48px 0 16px;
}

.vl-article-content h3 {
  font-size: 22px;
  margin: 36px 0 12px;
}

.vl-article-content p {
  margin-bottom: 20px;
  line-height: 1.8;
}

.vl-article-content ul,
.vl-article-content ol {
  margin: 0 0 20px 24px;
}

.vl-article-content li {
  margin-bottom: 8px;
  line-height: 1.7;
}

.vl-article-content blockquote {
  border-left: 4px solid var(--green-primary);
  padding: 20px 24px;
  margin: 32px 0;
  background: var(--bg-offwhite);
  border-radius: 0 12px 12px 0;
  font-size: 18px;
  font-style: italic;
  color: var(--dark-text);
}

.vl-article-content pre {
  background: var(--dark-text);
  color: #e0e0e0;
  padding: 24px;
  border-radius: 12px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.6;
  margin: 24px 0;
}

.vl-article-content code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--bg-cream);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--green-primary);
}

.vl-article-content pre code {
  background: none;
  padding: 0;
  color: inherit;
}

.vl-article-content img {
  border-radius: 12px;
  margin: 32px 0;
  box-shadow: var(--shadow-md);
}

.vl-article-content a {
  color: var(--green-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.vl-article-content a:hover {
  color: var(--green-light);
}

.vl-article-content hr {
  border: none;
  height: 1px;
  background: var(--card-border);
  margin: 48px 0;
}

/* Ghost content rendering */
.gh-content {
  font-size: 17px;
  line-height: 1.8;
}

.gh-content > * + * {
  margin-top: 1.5em;
}

.gh-content > [id] + * {
  margin-top: 0;
}

/* Ghost card rendering */
.gh-content .kg-card {
  margin: 2em 0;
}

.gh-content .kg-card figcaption {
  text-align: center;
  font-size: 14px;
  color: var(--muted-text);
  margin-top: 12px;
}

.gh-content .kg-card img {
  margin: 0;
}

/* Ghost width classes (required by Ghost validator) */
.kg-width-wide {
  max-width: 1040px;
  margin-left: auto;
  margin-right: auto;
}

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

.kg-width-full img {
  width: 100%;
}

/* Ghost bookmark card */
.vl-article-content .kg-bookmark-card {
  border: 0.5px solid var(--card-border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  margin: 24px 0;
}

.vl-article-content .kg-bookmark-container {
  display: flex;
  text-decoration: none;
  color: inherit;
}

.vl-article-content .kg-bookmark-content {
  padding: 20px;
  flex-grow: 1;
}

.vl-article-content .kg-bookmark-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 16px;
  color: var(--dark-text);
}

.vl-article-content .kg-bookmark-description {
  font-size: 14px;
  color: var(--muted-text);
  margin-top: 8px;
}

/* Ghost gallery */
.vl-article-content .kg-gallery-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 32px 0;
}

.vl-article-content .kg-gallery-row {
  display: flex;
  gap: 8px;
}

.vl-article-content .kg-gallery-image img {
  margin: 0;
  border-radius: 8px;
}

/* Article tags */
.vl-article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 32px;
  border-top: 1px solid var(--card-border);
}

.vl-tag-badge {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 20px;
  background: var(--bg-cream);
  color: var(--green-primary);
  text-decoration: none;
  transition: all 0.2s;
}

.vl-tag-badge:hover {
  background: var(--green-primary);
  color: white;
}

/* ============================================
   PAGINATION
   ============================================ */

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 60px;
  padding-top: 40px;
  border-top: 1px solid var(--card-border);
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
}

.pagination a {
  padding: 10px 20px;
  border-radius: 8px;
  border: 2px solid var(--green-primary);
  color: var(--green-primary);
  transition: all 0.2s;
}

.pagination a:hover {
  background: var(--green-primary);
  color: white;
}

.pagination .page-number {
  color: var(--muted-text);
}

/* ============================================
   FOOTER
   ============================================ */

.vl-footer {
  background: var(--dark-text);
  color: rgba(255,255,255,0.7);
  padding: 80px 0 40px;
}

.vl-footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.vl-footer-brand {
  margin-bottom: 40px;
}

.vl-footer-brand .vl-logo img {
  height: 32px;
  border-radius: 8px;
}

.vl-footer-brand .vl-logo-text {
  color: white;
}

.vl-footer-brand p {
  font-size: 14px;
  margin-top: 12px;
  max-width: 280px;
  line-height: 1.6;
}

.vl-footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-bottom: 40px;
}

.vl-footer-col h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 14px;
  color: white;
  margin-bottom: 16px;
}

.vl-footer-col ul { list-style: none; }

.vl-footer-col li { margin-bottom: 8px; }

.vl-footer-col a {
  color: rgba(255,255,255,0.6);
  font-size: 14px;
  transition: color 0.2s;
}

.vl-footer-col a:hover { color: white; }

.vl-footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  font-size: 13px;
}

/* ============================================
   RESPONSIVE
   ============================================ */

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

@media (max-width: 768px) {
  .vl-blog-hero {
    padding: 100px 0 40px;
  }

  .vl-blog-hero h1 {
    font-size: 28px;
  }

  .vl-post-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .vl-featured-link {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .vl-article-header {
    padding: 100px 0 32px;
  }

  .vl-article-title {
    font-size: 28px;
  }

  .vl-nav {
    display: none;
  }

  .vl-footer-links {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }

  .vl-article-content h2 { font-size: 24px; }
  .vl-article-content h3 { font-size: 20px; }
}

@media (max-width: 480px) {
  .vl-container { padding: 0 16px; }
  .vl-post-card-body { padding: 18px; }
  .vl-footer-links { grid-template-columns: 1fr; }
}
