/* ============================================================
   VeloxaHost Blog — Design System
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Brand */
  --brand-50:  #f0fdfa;
  --brand-100: #ccfbf1;
  --brand-200: #99f6e4;
  --brand-400: #2dd4bf;
  --brand-500: #14b8a6;
  --brand-600: #0d9488;
  --brand-700: #0f766e;
  --brand-800: #115e59;
  --brand-900: #134e4a;

  /* Neutrals */
  --gray-50:  #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  --gray-950: #070d1a;

  /* Accent */
  --teal-400: #2dd4bf;
  --teal-500: #14b8a6;
  --purple-400: #a78bfa;
  --purple-500: #8b5cf6;

  /* Layout */
  --max-w:   1200px;
  --nav-h:   68px;
  --radius:  12px;
  --radius-lg: 20px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--gray-950);
  color: var(--gray-200);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* ── Typography ─────────────────────────────────────────── */
h1, h2, h3, h4, h5 {
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
  letter-spacing: -0.02em;
}

a { color: var(--brand-400); text-decoration: none; }
a:hover { color: var(--brand-300, #93c5fd); }

code, pre {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9em;
}

pre {
  background: var(--gray-900);
  border: 1px solid var(--gray-800);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}

code:not(pre code) {
  background: var(--gray-800);
  color: var(--teal-400);
  padding: 2px 7px;
  border-radius: 5px;
}

/* ── Layout ─────────────────────────────────────────────── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── Navigation ─────────────────────────────────────────── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(7, 13, 26, 0.88);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.15rem;
  color: #fff !important;
  letter-spacing: -0.03em;
}

.nav-logo-icon {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, var(--brand-500), var(--purple-500));
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.05em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}

.nav-links a {
  padding: 0.4rem 0.85rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-400);
  transition: color 0.15s, background 0.15s;
}

.nav-links a:hover, .nav-links a.active {
  color: #fff;
  background: rgba(255,255,255,0.06);
}

.nav-cta {
  padding: 0.45rem 1.1rem;
  border-radius: 9px;
  background: var(--brand-600);
  color: #fff !important;
  font-size: 0.875rem;
  font-weight: 600;
  transition: background 0.15s, transform 0.1s;
}

.nav-cta:hover {
  background: var(--brand-500);
  transform: translateY(-1px);
}

/* ── Hero ───────────────────────────────────────────────── */
.hero {
  padding: 6rem 0 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(59,130,246,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 50px;
  background: rgba(59,130,246,0.1);
  border: 1px solid rgba(59,130,246,0.25);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--brand-400);
  margin-bottom: 1.5rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, #fff 0%, var(--gray-300) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1.25rem;
}

.hero p {
  font-size: 1.15rem;
  color: var(--gray-400);
  max-width: 560px;
  margin: 0 auto 2.5rem;
}

/* ── Search ─────────────────────────────────────────────── */
.search-bar {
  max-width: 480px;
  margin: 0 auto;
  position: relative;
}

.search-bar input {
  width: 100%;
  padding: 0.85rem 1.25rem 0.85rem 3rem;
  background: var(--gray-900);
  border: 1px solid var(--gray-700);
  border-radius: 50px;
  color: #fff;
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}

.search-bar input::placeholder { color: var(--gray-500); }

.search-bar input:focus { border-color: var(--brand-500); }

.search-icon {
  position: absolute;
  left: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-500);
  pointer-events: none;
}

/* ── Category Filter ────────────────────────────────────── */
.categories {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
  margin: 3rem 0 2rem;
}

.cat-btn {
  padding: 0.4rem 1rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--gray-700);
  background: transparent;
  color: var(--gray-400);
  font-family: inherit;
  transition: all 0.15s;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.cat-btn:hover, .cat-btn.active {
  border-color: var(--brand-500);
  color: var(--brand-400);
  background: rgba(59,130,246,0.08);
}

/* ── Post Grid ──────────────────────────────────────────── */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
  margin-bottom: 5rem;
}

.post-card {
  background: var(--gray-900);
  border: 1px solid var(--gray-800);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

.post-card:hover {
  transform: translateY(-4px);
  border-color: var(--gray-700);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

.post-card-image {
  height: 200px;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.post-card-gradient {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.post-card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.post-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 50px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.tag-product  { background: rgba(59,130,246,0.12); color: var(--brand-400); }
.tag-guide    { background: rgba(20,184,166,0.12); color: var(--teal-400); }
.tag-security { background: rgba(239,68,68,0.12);  color: #f87171; }
.tag-company  { background: rgba(139,92,246,0.12); color: var(--purple-400); }
.tag-devops   { background: rgba(249,115,22,0.12); color: #fb923c; }

.post-card-body h2 {
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
  line-height: 1.35;
}

.post-card-body h2 a { color: #fff; }
.post-card-body h2 a:hover { color: var(--brand-400); }

.post-card-body p {
  font-size: 0.875rem;
  color: var(--gray-400);
  line-height: 1.65;
  flex: 1;
  margin-bottom: 1.25rem;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.78rem;
  color: var(--gray-500);
  padding-top: 1rem;
  border-top: 1px solid var(--gray-800);
}

.post-meta-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-500), var(--purple-500));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.post-meta-sep { color: var(--gray-700); }

/* ── Featured Post ──────────────────────────────────────── */
.featured-post {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--gray-900);
  border: 1px solid var(--gray-800);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
  margin-bottom: 0;
}

.featured-post:hover {
  border-color: var(--gray-700);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

.featured-post .post-card-image { height: 100%; min-height: 280px; }

.featured-post .post-card-body {
  padding: 2.5rem;
  justify-content: center;
}

.featured-post .post-card-body h2 { font-size: 1.6rem; }
.featured-post .post-card-body p { font-size: 0.95rem; }

.read-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--brand-400);
  transition: gap 0.2s;
}

.read-more:hover { gap: 10px; }

/* ── Newsletter ─────────────────────────────────────────── */
.newsletter {
  background: linear-gradient(135deg, rgba(37,99,235,0.1), rgba(139,92,246,0.1));
  border: 1px solid rgba(59,130,246,0.2);
  border-radius: var(--radius-lg);
  padding: 3.5rem;
  text-align: center;
  margin: 2rem 0 5rem;
}

.newsletter h2 { font-size: 1.75rem; margin-bottom: 0.75rem; }
.newsletter p  { color: var(--gray-400); margin-bottom: 1.75rem; }

.newsletter-form {
  display: flex;
  gap: 0.75rem;
  max-width: 440px;
  margin: 0 auto;
}

.newsletter-form input {
  flex: 1;
  padding: 0.75rem 1.25rem;
  background: var(--gray-900);
  border: 1px solid var(--gray-700);
  border-radius: 10px;
  color: #fff;
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
}

.newsletter-form input:focus { border-color: var(--brand-500); }
.newsletter-form input::placeholder { color: var(--gray-500); }

.btn-primary {
  padding: 0.75rem 1.5rem;
  background: var(--brand-600);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  white-space: nowrap;
}

.btn-primary:hover { background: var(--brand-500); transform: translateY(-1px); }

/* ── Article Page ───────────────────────────────────────── */
.article-hero {
  padding: 4rem 0 3rem;
  text-align: center;
}

.breadcrumb {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.825rem;
  color: var(--gray-500);
  margin-bottom: 1.5rem;
}

.breadcrumb a { color: var(--gray-400); }
.breadcrumb a:hover { color: #fff; }
.breadcrumb-sep { color: var(--gray-700); }

.article-hero h1 {
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  max-width: 800px;
  margin: 0 auto 1.25rem;
}

.article-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--gray-400);
  flex-wrap: wrap;
}

.article-meta-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-500), var(--purple-500));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
}

.article-cover {
  width: 100%;
  height: 420px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 2rem 0 3.5rem;
  position: relative;
}

/* ── Article Content ────────────────────────────────────── */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 4rem;
  align-items: start;
  margin-bottom: 5rem;
}

.article-content { min-width: 0; }

.article-content h2 {
  font-size: 1.6rem;
  margin: 2.5rem 0 1rem;
  padding-top: 1rem;
}

.article-content h3 {
  font-size: 1.2rem;
  margin: 2rem 0 0.75rem;
  color: var(--gray-100);
}

.article-content p {
  color: var(--gray-300);
  line-height: 1.8;
  margin-bottom: 1.25rem;
  font-size: 1.05rem;
}

.article-content ul, .article-content ol {
  color: var(--gray-300);
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
  font-size: 1.05rem;
  line-height: 1.8;
}

.article-content li { margin-bottom: 0.4rem; }

.article-content blockquote {
  border-left: 3px solid var(--brand-500);
  padding: 0.5rem 0 0.5rem 1.5rem;
  margin: 1.75rem 0;
  color: var(--gray-400);
  font-style: italic;
}

.article-content hr {
  border: none;
  border-top: 1px solid var(--gray-800);
  margin: 2.5rem 0;
}

.callout {
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius);
  margin: 1.75rem 0;
  display: flex;
  gap: 0.875rem;
  align-items: flex-start;
  font-size: 0.95rem;
}

.callout-info    { background: rgba(59,130,246,0.08); border: 1px solid rgba(59,130,246,0.2); }
.callout-tip     { background: rgba(20,184,166,0.08); border: 1px solid rgba(20,184,166,0.2); }
.callout-warning { background: rgba(234,179,8,0.08);  border: 1px solid rgba(234,179,8,0.2); }

.callout p { margin: 0; color: var(--gray-300); }

/* ── Sidebar (TOC) ──────────────────────────────────────── */
.sidebar {
  position: sticky;
  top: calc(var(--nav-h) + 1.5rem);
}

.toc {
  background: var(--gray-900);
  border: 1px solid var(--gray-800);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.toc-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gray-500);
  margin-bottom: 1rem;
}

.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toc-list a {
  font-size: 0.83rem;
  color: var(--gray-400);
  display: block;
  padding: 3px 0;
  transition: color 0.15s;
  line-height: 1.5;
}

.toc-list a:hover { color: var(--brand-400); }
.toc-list .toc-h3 { padding-left: 0.75rem; }

/* ── Footer ─────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--gray-800);
  padding: 3rem 0;
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.footer-links a {
  font-size: 0.85rem;
  color: var(--gray-500);
}

.footer-links a:hover { color: var(--gray-300); }

.footer-copy {
  font-size: 0.85rem;
  color: var(--gray-600);
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .featured-post { grid-template-columns: 1fr; }
  .featured-post .post-card-image { min-height: 200px; }
  .article-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
}

@media (max-width: 640px) {
  .posts-grid { grid-template-columns: 1fr; }
  .newsletter { padding: 2rem 1.5rem; }
  .newsletter-form { flex-direction: column; }
  .nav-links { display: none; }
}
