*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
:root {
  --bg: #0a0a0f;
  --surface: #111118;
  --surface2: #1a1a24;
  --border: #ffffff10;
  --border2: #ffffff20;
  --accent: #7c6ff7;
  --accent2: #a78bfa;
  --green: #22d3a0;
  --text: #f0eeff;
  --muted: #8882aa;
  --danger: #f07878;
  --sidebar-w: 280px;
}
html {
  scroll-behavior: smooth;
}
body {
  font-family: "DM Sans", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  opacity: 0.4;
}
.glow {
  position: fixed;
  top: -15%;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 600px;
  background: radial-gradient(ellipse, #7c6ff71a 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}

/* ── NAV ── */
.topnav {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  max-width: 1160px;
  margin: 0 auto;
}
.logo-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: "IBM Plex Serif", serif;
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.2px;
}
.logo-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.logo-icon svg {
  width: 32px;
  height: 32px;
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-link {
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 100px;
  transition: all 0.2s;
}
.nav-link:hover {
  color: var(--text);
  background: var(--surface2);
}
.nav-link.active {
  color: var(--accent2);
}
.nav-compress {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  padding: 8px 18px;
  border-radius: 100px;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 3px 16px #7c6ff740;
}
.nav-compress:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px #7c6ff760;
}
.nav-compress svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── PAGE LAYOUT ── */
.page-wrap {
  position: relative;
  z-index: 1;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

/* ── HERO ── */
.blog-hero {
  text-align: center;
  padding: 52px 0 48px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 48px;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: var(--accent2);
  margin-bottom: 16px;
  background: #7c6ff710;
  border: 1px solid #7c6ff728;
  padding: 5px 14px;
  border-radius: 100px;
}
.hero-eyebrow svg {
  width: 12px;
  height: 12px;
  stroke: var(--accent2);
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.blog-hero h1 {
  font-family: "IBM Plex Serif", serif;
  font-size: clamp(30px, 5vw, 50px);
  font-weight: 700;
  letter-spacing: -1.5px;
  line-height: 1.1;
  margin-bottom: 14px;
}
.blog-hero h1 span {
  background: linear-gradient(135deg, var(--accent2), var(--green));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.blog-hero p {
  font-size: 16px;
  color: var(--muted);
  max-width: 500px;
  margin: 0 auto 32px;
  line-height: 1.65;
  font-weight: 300;
}

/* ── SEARCH BAR ── */
.search-wrap {
  position: relative;
  max-width: 520px;
  margin: 0 auto;
}
.search-wrap svg {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  stroke: var(--muted);
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}
#search-input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 100px;
  padding: 13px 48px 13px 44px;
  font-family: "DM Sans", sans-serif;
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
#search-input::placeholder {
  color: var(--muted);
}
#search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px #7c6ff720;
}
.search-clear {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--surface2);
  border: 1px solid var(--border);
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--muted);
  font-size: 12px;
  transition: all 0.2s;
}
.search-clear:hover {
  color: var(--text);
  background: var(--border2);
}
#search-input:not(:placeholder-shown) ~ .search-clear {
  display: flex;
}

/* Search no-results */
.no-results {
  display: none;
  text-align: center;
  padding: 40px 0;
  color: var(--muted);
  font-size: 15px;
}
.no-results svg {
  width: 40px;
  height: 40px;
  stroke: var(--border2);
  stroke-width: 1;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  margin: 0 auto 12px;
  display: block;
}

/* ── CATEGORY PILLS ── */
.cat-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}
.cat-pill {
  font-size: 12px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 100px;
  background: var(--surface);
  border: 1px solid var(--border2);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}
.cat-pill:hover {
  border-color: var(--accent);
  color: var(--text);
}
.cat-pill.active {
  background: #7c6ff718;
  border-color: var(--accent);
  color: var(--accent2);
}
.cat-pill .count {
  display: inline-block;
  background: var(--surface2);
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 100px;
  margin-left: 4px;
  color: var(--muted);
}

/* ── TWO-COLUMN LAYOUT ── */
.blog-body {
  display: grid;
  grid-template-columns: 1fr var(--sidebar-w);
  gap: 40px;
  align-items: start;
}
@media (max-width: 900px) {
  .blog-body {
    grid-template-columns: 1fr;
  }
  .sidebar {
    display: none;
  }
}

/* ── FEATURED POST ── */
.featured-post {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 28px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  transition: border-color 0.25s;
  text-decoration: none;
  color: inherit;
}
.featured-post:hover {
  border-color: var(--accent);
}
.featured-thumb {
  background: linear-gradient(135deg, #1a1a2e 0%, #16162a 50%, #0f0f1a 100%);
  min-height: 220px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.featured-thumb-art {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.thumb-bars {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.thumb-bar {
  border-radius: 4px;
  height: 10px;
  background: linear-gradient(90deg, var(--accent2), var(--green));
  opacity: 0.9;
}
.thumb-chevrons {
  display: flex;
  gap: 4px;
  margin-top: 4px;
}
.thumb-chevrons svg {
  width: 14px;
  height: 14px;
  stroke: var(--green);
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* Subtle grid pattern overlay */
.featured-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
      0deg,
      transparent,
      transparent 28px,
      #ffffff04 28px,
      #ffffff04 29px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 28px,
      #ffffff04 28px,
      #ffffff04 29px
    );
  pointer-events: none;
}
.featured-body {
  padding: 28px 28px 28px 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.featured-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--accent2);
  margin-bottom: 10px;
}
.featured-tag svg {
  width: 10px;
  height: 10px;
  stroke: var(--accent2);
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.featured-body h2 {
  font-family: "IBM Plex Serif", serif;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.3px;
  margin-bottom: 10px;
  color: var(--text);
}
.featured-body p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 16px;
}
.featured-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  color: var(--muted);
}
.featured-meta svg {
  width: 12px;
  height: 12px;
  stroke: var(--muted);
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.featured-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.read-link {
  margin-top: 18px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent2);
  text-decoration: none;
  transition: gap 0.2s;
}
.read-link svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.2s;
}
.read-link:hover {
  gap: 8px;
}
.read-link:hover svg {
  transform: translateX(3px);
}
@media (max-width: 640px) {
  .featured-post {
    grid-template-columns: 1fr;
  }
  .featured-thumb {
    min-height: 140px;
  }
}

/* ── POST CARDS GRID ── */
.posts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 640px) {
  .posts-grid {
    grid-template-columns: 1fr;
  }
}

.post-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.25s, transform 0.2s;
  text-decoration: none;
  color: inherit;
}
.post-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.card-thumb {
  width: 100%;
  height: 120px;
  border-radius: 10px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.card-thumb-inner {
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: flex-start;
  z-index: 1;
}
.card-bar {
  height: 7px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--accent2), var(--green));
  opacity: 0.8;
}
.card-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 100px;
  margin-bottom: 8px;
}
.tag-guide {
  background: #22d3a015;
  color: var(--green);
  border: 1px solid #22d3a030;
}
.tag-perf {
  background: #7c6ff715;
  color: var(--accent2);
  border: 1px solid #7c6ff730;
}
.tag-formats {
  background: #f0a05015;
  color: #f0a050;
  border: 1px solid #f0a05030;
}
.tag-seo {
  background: #5bc0eb15;
  color: #5bc0eb;
  border: 1px solid #5bc0eb30;
}
.tag-tips {
  background: #22d3a015;
  color: var(--green);
  border: 1px solid #22d3a030;
}
.post-card h2 {
  font-family: "IBM Plex Serif", serif;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.2px;
  margin-bottom: 8px;
  color: var(--text);
  flex: 1;
}
.post-card p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 14px;
}
.card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.card-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.card-meta svg {
  width: 11px;
  height: 11px;
  stroke: var(--muted);
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.card-read-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 500;
  color: var(--accent2);
  text-decoration: none;
  margin-top: auto;
  transition: gap 0.2s;
}
.card-read-link svg {
  width: 12px;
  height: 12px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.2s;
}
.card-read-link:hover {
  gap: 7px;
}
.card-read-link:hover svg {
  transform: translateX(3px);
}

/* ── EMPTY SLOTS (coming soon) ── */
.post-card.empty {
  border-style: dashed;
  cursor: default;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 160px;
  padding: 32px;
  transform: none !important;
}
.post-card.empty:hover {
  border-color: var(--border2);
}
.empty-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--surface2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
}
.empty-icon svg {
  width: 16px;
  height: 16px;
  stroke: var(--muted);
  stroke-width: 1.5;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.empty-label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}
.empty-sublabel {
  font-size: 11px;
  color: var(--border2);
  margin-top: 3px;
}

/* ── PAGINATION ── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 32px;
}
.pg-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}
.pg-btn:hover {
  border-color: var(--accent);
  color: var(--text);
}
.pg-btn.active {
  background: #7c6ff718;
  border-color: var(--accent);
  color: var(--accent2);
  font-weight: 600;
}
.pg-btn svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── SIDEBAR ── */
.sidebar {
  position: sticky;
  top: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* CTA Card */
.cta-card {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 18px;
  overflow: hidden;
}
.cta-card-top {
  padding: 20px 20px 0;
  background: linear-gradient(160deg, #1a1428 0%, #111118 100%);
}
/* Mini compression animation */
.cta-anim {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 16px 0 20px;
  align-items: flex-start;
}
.cta-bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cta-bar {
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--accent2), var(--green));
  transition: width 0.6s ease;
  animation: pulseBar 3s ease-in-out infinite;
}
.cta-bar.b1 {
  width: 100%;
  animation-delay: 0s;
}
.cta-bar.b2 {
  width: 60%;
  animation-delay: 0.15s;
}
.cta-bar.b3 {
  width: 35%;
  animation-delay: 0.3s;
}
.cta-bar-label {
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
}
@keyframes pulseBar {
  0%,
  100% {
    opacity: 0.7;
  }
  50% {
    opacity: 1;
  }
}
.cta-chevs {
  display: flex;
  gap: 3px;
  margin-top: 4px;
  margin-left: auto;
}
.cta-chevs svg {
  width: 12px;
  height: 12px;
  stroke: var(--green);
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cta-card-body {
  padding: 18px 20px 20px;
}
.cta-card h3 {
  font-family: "IBM Plex Serif", serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.2px;
  line-height: 1.3;
  margin-bottom: 8px;
  color: var(--text);
}
.cta-card p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 16px;
}
.cta-card-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  padding: 11px 16px;
  border-radius: 100px;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 3px 16px #7c6ff740;
  text-align: center;
}
.cta-card-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px #7c6ff760;
}
.cta-card-btn svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.cta-subtext {
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  margin-top: 10px;
  line-height: 1.4;
}

/* Stats row inside CTA */
.cta-stats {
  display: flex;
  gap: 0;
  border-top: 1px solid var(--border);
  margin-top: 16px;
  padding-top: 14px;
}
.cta-stat {
  flex: 1;
  text-align: center;
  padding: 0 8px;
}
.cta-stat:not(:last-child) {
  border-right: 1px solid var(--border);
}
.cta-stat-val {
  font-family: "IBM Plex Serif", serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--accent2);
}
.cta-stat-label {
  font-size: 10px;
  color: var(--muted);
  margin-top: 2px;
  line-height: 1.3;
}

/* ── BOTTOM BANNER CTA ── */
.bottom-cta {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 20px;
  padding: 40px 36px;
  margin-top: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;
}
.bottom-cta::before {
  content: "";
  position: absolute;
  right: -60px;
  top: -60px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, #7c6ff720 0%, transparent 70%);
  pointer-events: none;
}

.bcta-eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 8px;
}
.bcta-text h2 {
  font-family: "IBM Plex Serif", serif;
  font-size: clamp(18px, 3vw, 26px);
  font-weight: 700;
  letter-spacing: -0.3px;
  line-height: 1.2;
  margin-bottom: 8px;
}
.bcta-text p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
  max-width: 400px;
}
.bcta-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  flex-shrink: 0;
}
.bcta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  padding: 13px 28px;
  border-radius: 100px;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 4px 20px #7c6ff740;
  white-space: nowrap;
}
.bcta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px #7c6ff760;
}
.bcta-btn svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.bcta-note {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 5px;
}
.bcta-note svg {
  width: 12px;
  height: 12px;
  stroke: var(--green);
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── FOOTER ── */
footer {
  position: relative;
  z-index: 1;
  text-align: center;
  margin-top: 64px;
  padding: 28px 20px 36px;
  font-size: 13px;
  color: var(--muted);
  border-top: 1px solid var(--border);
}
footer a {
  color: var(--accent2);
  text-decoration: none;
}
footer a:hover {
  text-decoration: underline;
}
.footer-links {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 8px;
}

/* ── SEARCH HIGHLIGHT ── */
.highlight {
  background: #7c6ff740;
  color: var(--accent2);
  border-radius: 3px;
  padding: 0 2px;
}

/* ── ANIMATIONS ── */
.post-card,
.featured-post {
  animation: fadeUp 0.4s ease both;
}
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── SEARCH RESULT COUNT ── */
.results-info {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 16px;
  display: none;
}
.results-info strong {
  color: var(--text);
}