/* =========================
   CORE THEME
========================= */

:root {
  --bg: #0b0f16;
  --panel: #121826;
  --border: #1d2a44;
  --text: #eaf0ff;
  --muted: #9fb0d0;
  --accent: #4cc9ff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Inter, sans-serif;
  background: var(--bg);
  color: var(--text);
}

a {
  color: var(--text);
  text-decoration: none;
}

a:hover {
  color: var(--accent);
}

.wrap {
  width: min(1100px, calc(100% - 32px));
  margin: auto;
}

/* =========================
   HEADER
========================= */

.site-header {
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, #4cc9ff, #81ffb8);
}

.nav a {
  margin-left: 24px;
  font-size: 14px;
  color: var(--muted);
}

/* =========================
   GLOBAL UI
========================= */

.tag {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(76,201,255,0.15);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
}

.section-title {
  display: block;
  margin: 56px 0 20px;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.category {
  font-size: 11px;
  color: var(--accent);
  text-transform: uppercase;
}

/* =========================
   HOMEPAGE
========================= */

.home-hero {
  padding: 64px 0 40px;
  max-width: 720px;
}

.home-hero h1 {
  font-size: 48px;
  line-height: 1.1;
}

.home-hero p {
  font-size: 18px;
  color: var(--muted);
}

/* Featured */

.home-featured h2 {
  font-size: 34px;
  line-height: 1.2;
}

/* Trending */

.trending-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.trending-card {
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.trend-rank {
  font-size: 12px;
  color: var(--accent);
}

/* Top Stories */

.top-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

/* Latest */

.latest-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 20px;
  border-radius: 14px;
}

/* =========================
   POST PAGE
========================= */

.post-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 48px;
}

.post {
  max-width: 760px;
}

.post h1 {
  font-size: 42px;
  line-height: 1.15;
}

.post-meta {
  color: var(--muted);
  font-size: 14px;
}

.post-excerpt {
  font-size: 19px;
  color: var(--muted);
}

.post-body h2 {
  margin-top: 40px;
  font-size: 24px;
}

.post-body p {
  font-size: 17px;
  line-height: 1.8;
}

/* TOC */

.toc {
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 16px;
  border-radius: 12px;
}

/* Sidebar */

.sidebar {
  position: sticky;
  top: 100px;
}

.sidebar-box {
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 16px;
  border-radius: 14px;
}

/* =========================
   FOOTER
========================= */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 24px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 900px) {
  .nav,
  .sidebar {
    display: none;
  }

  .trending-grid,
  .top-grid,
  .latest-grid,
  .post-layout {
    grid-template-columns: 1fr;
  }

  .home-hero h1 {
    font-size: 36px;
  }
}
