:root {
  --color-bg-dark: #0b1220;
  --color-bg-deep: #111827;
  --color-primary: #2563eb;
  --color-primary-soft: #dbeafe;
  --color-accent: #14b8a6;
  --color-text: #172033;
  --color-muted: #6b7280;
  --color-border: #e5e7eb;
  --shadow-soft: 0 24px 60px rgba(15, 23, 42, 0.14);
}

html {
  scroll-behavior: smooth;
}

body {
  color: var(--color-text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.7;
}

a {
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.site-navbar {
  background: rgba(11, 18, 32, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
}

.site-navbar.navbar-scrolled {
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}

.brand-mark {
  align-items: center;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  border-radius: 8px;
  color: #fff;
  display: inline-flex;
  font-weight: 800;
  height: 34px;
  justify-content: center;
  margin-right: 0.4rem;
  width: 34px;
}

.btn-primary {
  --bs-btn-bg: var(--color-primary);
  --bs-btn-border-color: var(--color-primary);
  --bs-btn-hover-bg: #1d4ed8;
  --bs-btn-hover-border-color: #1d4ed8;
}

.hero-section {
  background:
    radial-gradient(circle at 15% 20%, rgba(37, 99, 235, 0.32), transparent 30%),
    radial-gradient(circle at 85% 25%, rgba(20, 184, 166, 0.24), transparent 28%),
    linear-gradient(135deg, #0b1220 0%, #111827 58%, #172554 100%);
  min-height: 720px;
  padding: 160px 0 110px;
}

.eyebrow,
.section-label {
  color: var(--color-accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-console {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
  color: #d1fae5;
  overflow: hidden;
}

.console-bar {
  align-items: center;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  gap: 8px;
  padding: 16px 18px;
}

.console-bar span {
  border-radius: 50%;
  display: block;
  height: 12px;
  width: 12px;
}

.console-bar span:nth-child(1) {
  background: #ef4444;
}

.console-bar span:nth-child(2) {
  background: #f59e0b;
}

.console-bar span:nth-child(3) {
  background: #22c55e;
}

.hero-console pre {
  font-size: clamp(0.85rem, 2vw, 1rem);
  margin: 0;
  overflow: auto;
  padding: 28px;
}

.metric {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 28px;
}

.metric strong {
  color: var(--color-primary);
  display: block;
  font-size: 2.25rem;
  line-height: 1;
}

.metric span {
  color: var(--color-muted);
  display: block;
  margin-top: 8px;
}

.section-padding {
  padding: 96px 0;
}

.section-heading {
  max-width: 680px;
}

.featured-post,
.post-card,
.category-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}

.featured-post {
  display: flex;
  flex-direction: column;
}

.post-visual {
  align-items: center;
  color: #fff;
  display: flex;
  flex-shrink: 0;
  font-size: 3rem;
  justify-content: center;
  min-height: 220px;
}

.post-visual-blue {
  background: linear-gradient(135deg, #1d4ed8, #14b8a6);
}

.post-visual-green {
  background: linear-gradient(135deg, #047857, #22c55e);
}

.post-visual-purple {
  background: linear-gradient(135deg, #4338ca, #7c3aed);
}

.post-visual-orange {
  background: linear-gradient(135deg, #ea580c, #f59e0b);
}

.post-meta {
  color: var(--color-muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 0.84rem;
  font-weight: 700;
  gap: 8px 16px;
  text-transform: uppercase;
}

.post-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post-card:hover,
.category-card:hover {
  box-shadow: var(--shadow-soft);
  transform: translateY(-4px);
}

.horizontal-card {
  align-items: stretch;
  display: grid;
  grid-template-columns: 132px 1fr;
}

.horizontal-card .post-visual {
  font-size: 2rem;
  min-height: 150px;
}

.post-card-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 22px;
}

.post-card-body h4 {
  font-size: 1.08rem;
  font-weight: 800;
  margin: 10px 0 0;
}

.post-card-body h4 a {
  color: var(--color-text);
  text-decoration: none;
}

.post-card-body h4 a:hover {
  color: var(--color-primary);
}

.category-card {
  height: 100%;
  padding: 30px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card i {
  align-items: center;
  background: var(--color-primary-soft);
  border-radius: 8px;
  color: var(--color-primary);
  display: inline-flex;
  font-size: 1.7rem;
  height: 56px;
  justify-content: center;
  margin-bottom: 22px;
  width: 56px;
}

.category-card h3,
.timeline-item h3 {
  font-size: 1.15rem;
  font-weight: 800;
}

.category-card p,
.timeline-item p {
  color: var(--color-muted);
  margin-bottom: 0;
}

.timeline {
  display: grid;
  gap: 18px;
}

.timeline-item {
  align-items: flex-start;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  display: grid;
  gap: 18px;
  grid-template-columns: auto 1fr;
  padding: 24px;
}

.timeline-item > span {
  align-items: center;
  background: var(--color-bg-dark);
  border-radius: 8px;
  color: #fff;
  display: inline-flex;
  font-weight: 800;
  height: 46px;
  justify-content: center;
  width: 46px;
}

.newsletter-section {
  background: var(--color-bg-dark);
  padding: 72px 0;
}

.newsletter-box {
  align-items: center;
  display: grid;
  gap: 28px;
  grid-template-columns: 1fr auto;
}

.newsletter-box h2 {
  color: #fff;
}

.newsletter-form {
  display: flex;
  gap: 12px;
  min-width: min(520px, 100%);
}

.newsletter-form .form-control {
  border: 0;
  min-width: 260px;
}

.site-footer {
  background: #fff;
  border-top: 1px solid var(--color-border);
  padding: 42px 0;
}

.footer-brand {
  color: var(--color-text);
  font-size: 1.15rem;
  font-weight: 800;
  text-decoration: none;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: flex-end;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links a {
  color: var(--color-muted);
  font-weight: 700;
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--color-primary);
}

.article-page {
  background: #fff;
}

.article-hero {
  background:
    radial-gradient(circle at 20% 15%, rgba(37, 99, 235, 0.32), transparent 28%),
    linear-gradient(135deg, #0b1220, #172554);
  padding: 150px 0 90px;
}

.back-link {
  color: #bfdbfe;
  font-weight: 700;
  text-decoration: none;
}

.article-content {
  padding: 80px 0;
}

.article-content p {
  color: #374151;
  font-size: 1.08rem;
}

.article-content h2 {
  font-size: 1.65rem;
  font-weight: 800;
  margin: 44px 0 14px;
}

.article-content pre {
  background: #0b1220;
  border-radius: 8px;
  color: #d1fae5;
  margin: 28px 0;
  overflow: auto;
  padding: 24px;
}

.article-content blockquote {
  border-left: 4px solid var(--color-primary);
  color: #111827;
  font-size: 1.35rem;
  font-weight: 700;
  margin: 34px 0;
  padding-left: 22px;
}

.article-callout {
  background: var(--color-primary-soft);
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  color: #1e3a8a;
  margin-top: 36px;
  padding: 22px;
}

.article-list {
  color: #374151;
  font-size: 1.08rem;
  margin: 24px 0;
  padding-left: 1.4rem;
}

.article-list li + li {
  margin-top: 10px;
}

.empty-state,
.cms-note,
.upload-panel,
.format-panel {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.06);
}

.empty-state {
  padding: 42px;
  text-align: center;
}

.empty-state h3 {
  font-weight: 800;
}

.cms-note {
  color: #374151;
  padding: 22px;
}

.admin-page {
  background: #fff;
}

.admin-hero {
  background:
    radial-gradient(circle at 20% 15%, rgba(20, 184, 166, 0.28), transparent 28%),
    linear-gradient(135deg, #0b1220, #172554);
  padding: 150px 0 90px;
}

.upload-panel,
.format-panel {
  height: 100%;
  padding: 30px;
}

.format-panel pre {
  background: #0b1220;
  border-radius: 8px;
  color: #d1fae5;
  margin: 0;
  max-height: 520px;
  overflow: auto;
  padding: 24px;
}

@media (max-width: 991.98px) {
  .hero-section {
    min-height: auto;
    padding: 135px 0 80px;
  }

  .newsletter-box {
    grid-template-columns: 1fr;
  }

  .newsletter-form {
    width: 100%;
  }
}

@media (max-width: 575.98px) {
  .section-padding {
    padding: 68px 0;
  }

  .horizontal-card {
    grid-template-columns: 1fr;
  }

  .horizontal-card .post-visual {
    min-height: 130px;
  }

  .newsletter-form {
    flex-direction: column;
  }

  .newsletter-form .form-control {
    min-width: 0;
  }

  .footer-links {
    justify-content: flex-start;
  }

  .empty-state,
  .upload-panel,
  .format-panel {
    padding: 24px;
  }
}
