/* Design tokens — same as landing */
:root {
  --bg-core: #050505;
  --bg-core-secondary: #0a0a0a;
  --bg-card: #111111;
  --bg-card-hover: #1a1a1a;
  --bg-gradient-center: #1a1a1a;
  --accent: #3b82f6;
  --accent-glow: rgba(59, 130, 246, 0.4);
  --text-main: #ffffff;
  --text-muted: #a3a3a3;
  --text-inverse: #000000;
  --border: #333333;
  --success: #10b981;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --nav-border: #333;
  --footer-bg: #050505;
  --footer-border: #222;
}

[data-theme="light"] {
  --bg-core: #ffffff;
  --bg-core-secondary: #f9fafb;
  --bg-card: #f3f4f6;
  --bg-card-hover: #e5e7eb;
  --bg-gradient-center: #dbeafe;
  --accent: #2563eb;
  --accent-glow: rgba(37, 99, 235, 0.2);
  --text-main: #111827;
  --text-muted: #6b7280;
  --text-inverse: #ffffff;
  --border: #e5e7eb;
  --success: #059669;
  --nav-border: #e5e7eb;
  --footer-bg: #f9fafb;
  --footer-border: #e5e7eb;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  padding: 0;
  background: var(--bg-core);
  color: var(--text-main);
  font-family: var(--font-family);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

a { color: inherit; }

::selection {
  background-color: rgba(180, 212, 255, 0.45);
  color: inherit;
}

::-moz-selection {
  background-color: rgba(180, 212, 255, 0.45);
  color: inherit;
}

[data-theme="light"] ::selection {
  background-color: rgba(37, 99, 235, 0.18);
  color: inherit;
}

[data-theme="light"] ::-moz-selection {
  background-color: rgba(37, 99, 235, 0.18);
  color: inherit;
}

/* ——— Nav (landing vibe) ——— */
.blog-nav {
  padding: 20px;
  border-bottom: 1px solid var(--nav-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-core);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.blog-nav__spacer { width: 60px; }

.blog-nav__logo {
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -1px;
  color: var(--text-main);
  text-decoration: none;
}

.blog-nav__right {
  width: 60px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 20px;
}

.blog-nav__link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  white-space: nowrap;
  transition: color 0.2s;
}

.blog-nav__link:hover,
.blog-nav__link--active {
  color: var(--text-main);
}

/* Theme toggle */
.theme-toggle {
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
}

.toggle-track {
  width: 52px;
  height: 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 30px;
  position: relative;
  display: flex;
  align-items: center;
  transition: border-color 0.3s;
}

.theme-toggle:hover .toggle-track { border-color: var(--text-muted); }

.toggle-icons {
  display: flex;
  justify-content: space-between;
  width: 100%;
  padding: 0 6px;
  position: relative;
  z-index: 2;
  pointer-events: none;
  font-size: 10px;
}

.toggle-icons .icon { color: var(--text-muted); line-height: 1; }
body[data-theme="dark"] .icon.moon { color: #fff; }
body[data-theme="light"] .icon.sun { color: #f59e0b; }

.toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), background-color 0.3s;
  z-index: 1;
}

body[data-theme="dark"] .toggle-thumb {
  transform: translateX(24px);
  background: #444;
  box-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

body[data-theme="light"] .toggle-thumb {
  transform: translateX(0);
  background: #fff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}

body[data-theme="light"] .toggle-track { background: #e2e8f0; }
body[data-theme="dark"] .toggle-track { background: #222; }

/* ——— Layout ——— */
.blog-section {
  padding: 80px 20px;
  width: 100%;
  display: flex;
  justify-content: center;
}

.blog-section--hero {
  padding: 120px 20px 60px;
  text-align: center;
  background: radial-gradient(circle at center, var(--bg-gradient-center) 0%, var(--bg-core) 70%);
  transition: background 0.3s ease;
}

.blog-container {
  width: 100%;
  max-width: 1000px;
}

.blog-container--narrow {
  max-width: 740px;
}

/* ——— Hero (list page) ——— */
.blog-badge {
  display: inline-block;
  background: var(--accent-glow);
  color: var(--accent);
  padding: 6px 12px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 24px;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.blog-hero__title {
  font-size: clamp(36px, 6vw, 56px);
  line-height: 1.1;
  margin-bottom: 24px;
}

.blog-hero__title span {
  background: linear-gradient(90deg, var(--text-main), var(--text-muted));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.blog-hero__desc {
  font-size: 20px;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ——— Article cards grid ——— */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.blog-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.2s, background-color 0.2s, transform 0.2s;
}

.blog-card:hover {
  border-color: var(--accent);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.blog-card__link {
  display: block;
  height: 100%;
  text-decoration: none;
  color: inherit;
  line-height: 0;
  font-size: 0;
}

.blog-card__thumb {
  width: 100%;
  height: auto;
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
  vertical-align: top;
}

.blog-card__accent {
  aspect-ratio: 1200 / 630;
  width: 100%;
  flex-shrink: 0;
  display: flex;
  align-items: flex-end;
  padding: 20px 24px;
  background: radial-gradient(circle at 30% 40%, rgba(59, 130, 246, 0.18) 0%, transparent 55%), #050505;
}

.blog-card__accent--blue {
  background: radial-gradient(circle at 30% 40%, rgba(59, 130, 246, 0.2) 0%, transparent 55%), #050505;
}

.blog-card__accent--green {
  background: radial-gradient(circle at 30% 40%, rgba(16, 185, 129, 0.18) 0%, transparent 55%), #050505;
}

.blog-card__accent--amber {
  background: radial-gradient(circle at 30% 40%, rgba(245, 158, 11, 0.16) 0%, transparent 55%), #0c0a06;
}

.blog-card__accent--violet {
  background: radial-gradient(circle at 30% 40%, rgba(139, 92, 246, 0.18) 0%, transparent 55%), #050505;
}

.blog-card__tag {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.3);
  padding: 5px 12px;
  border-radius: 100px;
}

.blog-card__accent--green .blog-card__tag {
  color: #10b981;
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.3);
}

.blog-card__accent--amber .blog-card__tag {
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.3);
}

.blog-card__accent--violet .blog-card__tag {
  color: #8b5cf6;
  background: rgba(139, 92, 246, 0.12);
  border-color: rgba(139, 92, 246, 0.3);
}

.blog-card__img {
  aspect-ratio: 1200 / 630;
  background: #050505;
  overflow: hidden;
  line-height: 0;
  font-size: 0;
}

.blog-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  vertical-align: top;
}

.blog-card__body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
  font-size: 14px;
}

.blog-card__meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.blog-card__title {
  font-size: 18px;
  margin-bottom: 10px;
  line-height: 1.3;
}

.blog-card__excerpt {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
  flex: 1;
}

/* ——— Breadcrumbs ——— */
.blog-breadcrumbs {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.blog-breadcrumbs a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.blog-breadcrumbs a:hover { color: var(--text-main); }

/* ——— Article cover (banner as hero bg) ——— */
.blog-cover {
  position: relative;
  min-height: 340px;
  background: var(--bg-core-secondary) center / cover no-repeat;
  display: flex;
  align-items: flex-end;
}

.blog-cover::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    var(--bg-core) 0%,
    rgba(5, 5, 5, 0.85) 35%,
    rgba(5, 5, 5, 0.45) 100%
  );
}

[data-theme="light"] .blog-cover::before {
  background: linear-gradient(
    to top,
    var(--bg-core) 0%,
    rgba(255, 255, 255, 0.92) 40%,
    rgba(255, 255, 255, 0.55) 100%
  );
}

.blog-cover__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 740px;
  margin: 0 auto;
  padding: 48px 20px 40px;
}

.blog-cover .blog-breadcrumbs {
  margin-bottom: 20px;
}

.blog-cover .blog-badge {
  margin-bottom: 16px;
}

.blog-cover h1 {
  font-size: clamp(26px, 4.5vw, 38px);
  line-height: 1.15;
  margin-bottom: 16px;
}

.blog-cover .blog-article-meta {
  justify-content: flex-start;
}

.blog-article-hero {
  display: none;
}

.blog-preview {
  max-width: 960px;
  margin: 0 auto 0;
  padding: 0 24px;
}

.blog-preview img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--border);
  display: block;
  aspect-ratio: 1200 / 630;
  object-fit: cover;
}

.blog-article-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
  font-size: 14px;
  color: var(--text-muted);
}

/* ——— Author strip ——— */
.blog-author {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 40px;
}

.blog-author__name {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.blog-author__role {
  font-size: 13px;
  color: var(--accent);
  margin-bottom: 12px;
  display: block;
}

.blog-author p {
  margin: 0 0 8px;
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.6;
}

.blog-author p:last-child { margin-bottom: 0; }

/* ——— Article body (seo-block vibe) ——— */
.blog-prose {
  color: var(--text-muted);
  font-size: 18px;
  line-height: 1.75;
  font-family: Georgia, 'Times New Roman', serif;
}

.blog-prose h2,
.blog-prose h3 {
  font-family: var(--font-family);
  color: var(--text-main);
  font-weight: 600;
  letter-spacing: -0.02em;
  border-left: 3px solid var(--accent);
  padding-left: 15px;
  margin: 40px 0 16px;
}

.blog-prose h2 { font-size: 24px; }
.blog-prose h3 { font-size: 20px; }

.blog-prose p { margin: 0 0 24px; }

.blog-prose strong,
.blog-prose b {
  color: var(--text-main);
  font-weight: 600;
}

.blog-prose ul,
.blog-prose ol {
  margin: 0 0 24px;
  padding-left: 20px;
  color: var(--text-main);
}

.blog-prose li {
  margin-bottom: 10px;
  padding-left: 6px;
}

.blog-prose blockquote {
  font-size: 20px;
  font-style: italic;
  color: var(--text-main);
  border-left: 4px solid var(--border);
  margin: 40px 0;
  padding: 10px 20px;
  background: var(--bg-card);
  border-radius: 0 8px 8px 0;
}

.blog-prose hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 40px 0;
}

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

.blog-prose img {
  max-width: 100%;
  border-radius: 8px;
  border: 1px solid var(--border);
  margin: 24px 0;
}

.blog-prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-family: var(--font-family);
  font-size: 15px;
}

.blog-prose th,
.blog-prose td {
  border: 1px solid var(--border);
  padding: 12px 16px;
  text-align: left;
}

.blog-prose th {
  background: var(--bg-card);
  color: var(--text-main);
  font-weight: 600;
}

.blog-prose code {
  font-family: ui-monospace, monospace;
  font-size: 0.9em;
  background: var(--bg-card);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--accent);
}

/* ——— FAQ ——— */
.blog-faq {
  margin-top: 60px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}

.blog-faq h2 {
  font-size: 32px;
  text-align: center;
  margin-bottom: 32px;
}

.blog-faq__list {
  max-width: 800px;
  margin: 0 auto;
}

.blog-faq__item {
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
}

.blog-faq__item h3 {
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 12px;
  color: var(--text-main);
}

.blog-faq__item p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.6;
  font-size: 16px;
}

/* ——— CTA ——— */
.blog-cta {
  margin-top: 60px;
  background: #0a0a0a;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  text-align: center;
}

[data-theme="light"] .blog-cta {
  background: #fff;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
}

.blog-cta__header {
  background: #1a1a1a;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}

[data-theme="light"] .blog-cta__header {
  background: #f3f4f6;
}

.blog-cta__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.blog-cta__dot--r { background: #ff5f56; }
.blog-cta__dot--y { background: #ffbd2e; }
.blog-cta__dot--g { background: #27c93f; }

.blog-cta__body {
  padding: 48px 32px;
  background: radial-gradient(circle at top right, #111 0%, #050505 100%);
}

[data-theme="light"] .blog-cta__body {
  background: #fff;
}

.blog-cta__body h3 {
  font-size: 32px;
  line-height: 1.15;
  margin-bottom: 16px;
}

.blog-cta__body h3 em {
  font-style: normal;
  color: var(--accent);
}

.blog-cta__body p {
  color: var(--text-muted);
  font-size: 18px;
  margin: 0 0 28px;
  line-height: 1.6;
}

.blog-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 32px;
  font-size: 18px;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid transparent;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 4px 20px var(--accent-glow);
  transition: all 0.2s ease;
  line-height: 1.2;
}

.blog-btn:hover {
  background: #2563eb;
  transform: translateY(-1px);
  color: #fff;
}

.blog-cta__note {
  margin-top: 16px;
  font-size: 14px;
  color: var(--text-muted);
}

/* ——— Footer ——— */
.blog-footer {
  padding: 40px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  border-top: 1px solid var(--footer-border);
  background: var(--footer-bg);
  transition: background-color 0.3s ease;
}

.blog-footer__brand {
  margin-bottom: 10px;
  color: var(--text-main);
}

.blog-footer__tagline {
  font-size: 12px;
}

/* ——— Responsive ——— */
@media (max-width: 768px) {
  .blog-section { padding: 60px 20px; }
  .blog-section--hero { padding: 100px 20px 48px; }
  .blog-hero__desc { font-size: 16px; }
  .blog-nav__right { width: auto; }
  .blog-nav__spacer { display: none; }
  .blog-nav { gap: 12px; }
  .blog-nav__logo { flex: 1; text-align: center; }
  .blog-prose { font-size: 16px; }
  .blog-cta__body { padding: 32px 20px; }
  .blog-cta__body h3 { font-size: 26px; }
}
