/* ===================================================
   style.css — Global Design System
   Closed-Loop Autonomous Blog Empire
=================================================== */

:root {
  --bg:          #0a0b0f;
  --surface:     #12131a;
  --surface-2:   #1a1c27;
  --border:      rgba(255,255,255,0.07);
  --text:        #e8eaf0;
  --text-muted:  #6b7280;
  --accent:      #6c63ff;
  --accent-2:    #a78bfa;
  --accent-glow: rgba(108,99,255,0.35);
  --green:       #10b981;
  --amber:       #f59e0b;
  --red:         #ef4444;
  --radius:      14px;
  --radius-sm:   8px;
  --font:        'Inter', sans-serif;
  --font-mono:   'Fira Code', monospace;
  --max-w:       1200px;
  --nav-h:       64px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── NAV ─────────────────────────────────────────── */
.navbar {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-h);
  background: rgba(10,11,15,0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto; padding: 0 24px;
  height: 100%; display: flex; align-items: center; justify-content: space-between;
}
.logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--text);
}
.logo-icon { font-size: 1.4rem; }
.logo-text  { font-size: 1.1rem; font-weight: 700; letter-spacing: -0.02em; }
.nav-right  { display: flex; align-items: center; gap: 14px; }
.badge-live {
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.08em;
  padding: 3px 8px; border-radius: 20px;
  background: rgba(16,185,129,0.15); color: var(--green);
  border: 1px solid rgba(16,185,129,0.3);
  animation: pulse-live 2s infinite;
}
@keyframes pulse-live {
  0%,100% { opacity: 1; } 50% { opacity: 0.5; }
}
.nav-hint { font-size: 0.8rem; color: var(--text-muted); }
.back-link {
  color: var(--accent-2); text-decoration: none; font-size: 0.9rem;
  transition: color 0.2s;
}
.back-link:hover { color: var(--text); }

/* ── HERO ─────────────────────────────────────────── */
.hero {
  position: relative; overflow: hidden;
  padding: 100px 24px 80px;
  text-align: center;
}
.hero-glow {
  position: absolute; border-radius: 50%;
  filter: blur(80px); pointer-events: none;
}
.glow-1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(108,99,255,0.18) 0%, transparent 70%);
  top: -200px; left: 50%; transform: translateX(-50%);
}
.glow-2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(167,139,250,0.12) 0%, transparent 70%);
  bottom: -100px; right: 10%;
}
.hero-inner { position: relative; max-width: 700px; margin: 0 auto; }
.hero-tag {
  display: inline-block; margin-bottom: 20px;
  padding: 6px 16px; border-radius: 20px;
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.04em;
  border: 1px solid var(--border);
  background: var(--surface-2); color: var(--accent-2);
}
.hero-title {
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 800; line-height: 1.08;
  letter-spacing: -0.03em; margin-bottom: 20px;
}
.gradient-text {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 50%, #f472b6 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  font-size: 1.1rem; color: var(--text-muted);
  line-height: 1.7; margin-bottom: 40px;
}
.hero-stats {
  display: flex; align-items: center; justify-content: center; gap: 32px;
  flex-wrap: wrap;
}
.stat { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.stat-n { font-size: 2rem; font-weight: 800; color: var(--accent-2); }
.stat-l { font-size: 0.75rem; color: var(--text-muted); letter-spacing: 0.04em; }
.stat-div { width: 1px; height: 40px; background: var(--border); }
.scroll-hint {
  margin-top: 50px; color: var(--text-muted); font-size: 0.85rem;
  animation: bounce 2s infinite;
}
@keyframes bounce { 0%,100% { transform: translateY(0); } 50% { transform: translateY(6px); } }

/* ── MAIN CONTENT ───────────────────────────────── */
.main-content {
  max-width: var(--max-w); margin: 0 auto;
  padding: 40px 24px 80px;
}

/* ── POST GRID ──────────────────────────────────── */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}
.post-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex; flex-direction: column; gap: 14px;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  animation: card-in 0.5s ease both;
  animation-delay: var(--delay, 0ms);
}
@keyframes card-in {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.post-card:hover {
  transform: translateY(-4px);
  border-color: rgba(108,99,255,0.4);
  box-shadow: 0 12px 40px rgba(108,99,255,0.12);
}
.card-header { display: flex; flex-direction: column; gap: 8px; }
.card-meta-row { display: flex; align-items: center; justify-content: space-between; }
.niche-badge {
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 20px;
  background: rgba(108,99,255,0.15); color: var(--accent-2);
  border: 1px solid rgba(108,99,255,0.25);
}
.views-badge { font-size: 0.75rem; color: var(--text-muted); }
.seo-bar-wrap { display: flex; align-items: center; gap: 8px; }
.seo-label { font-size: 0.68rem; font-weight: 600; color: var(--text-muted); width: 26px; }
.seo-bar {
  flex: 1; height: 4px; border-radius: 4px;
  background: rgba(255,255,255,0.06);
  overflow: hidden;
}
.seo-fill {
  height: 100%; border-radius: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 1s ease;
}
.seo-val { font-size: 0.68rem; color: var(--text-muted); width: 22px; text-align: right; }
.card-title { font-size: 1.1rem; font-weight: 700; line-height: 1.3; }
.card-title a { color: var(--text); text-decoration: none; }
.card-title a:hover { color: var(--accent-2); }
.card-teaser { font-size: 0.88rem; color: var(--text-muted); line-height: 1.6; flex: 1; }
.card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-size: 0.68rem; padding: 2px 8px; border-radius: 12px;
  background: var(--surface-2); color: var(--text-muted);
  border: 1px solid var(--border);
}
.read-btn {
  font-size: 0.82rem; font-weight: 600;
  color: var(--accent-2); text-decoration: none;
  padding: 6px 14px; border-radius: var(--radius-sm);
  border: 1px solid rgba(108,99,255,0.3);
  transition: background 0.2s, color 0.2s;
}
.read-btn:hover {
  background: var(--accent); color: #fff;
  border-color: var(--accent);
}

/* ── EMPTY STATE ────────────────────────────────── */
.empty-state {
  text-align: center; padding: 80px 24px;
  border: 1px dashed var(--border); border-radius: var(--radius);
}
.empty-icon { font-size: 3.5rem; margin-bottom: 16px; }
.empty-state h2 { font-size: 1.5rem; margin-bottom: 12px; }
.empty-state p { color: var(--text-muted); font-size: 0.9rem; }
.empty-state code {
  font-family: var(--font-mono); background: var(--surface-2);
  padding: 2px 6px; border-radius: 4px; color: var(--accent-2);
}

/* ── FOOTER ─────────────────────────────────────── */
.site-footer {
  text-align: center; padding: 32px 24px;
  border-top: 1px solid var(--border);
  color: var(--text-muted); font-size: 0.82rem; line-height: 1.8;
}
.footer-sub { opacity: 0.6; font-size: 0.75rem; }

/* ── RESPONSIVE ─────────────────────────────────── */
@media (max-width: 600px) {
  .hero-title { font-size: 2.4rem; }
  .posts-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 20px; }
  .stat-div { display: none; }
}
