:root {
  --bg: #0f0f0f;
  --bg-card: #1a1a1a;
  --bg-card-hover: #222;
  --bg-elevated: #252525;
  --text: #e8e8e8;
  --text-muted: #888;
  --text-dim: #555;
  --accent: #e85d3a;
  --accent-hover: #ff7a5c;
  --accent-glow: rgba(0, 200, 83, 0.15);
  --green: #3ddc84;
  --green-dim: rgba(61, 220, 132, 0.12);
  --border: #2a2a2a;
  --radius: 12px;
  --radius-sm: 8px;
  --max-w: 1200px;
  --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
.icon svg { width: 100%; height: 100%; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; display: block; }

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }

/* ===== NAV ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 15, 15, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}
.nav-logo {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
}
.nav-logo span { color: var(--accent); }
.nav-links { display: flex; gap: 28px; }
.nav-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }

/* ===== HERO ===== */
.hero {
  position: relative;
  padding: 80px 0 60px;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -200px;
  right: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -100px;
  left: -100px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--green-dim) 0%, transparent 70%);
  pointer-events: none;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  letter-spacing: -1.5px;
  line-height: 1.15;
  margin-bottom: 16px;
  position: relative;
}
.hero h1 .accent { color: var(--accent); }
.hero p {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 600px;
  position: relative;
}
.hero-stats {
  display: flex;
  gap: 48px;
  margin-top: 36px;
  position: relative;
}
.hero-stat span {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -1px;
}
.hero-stat small {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ===== CATEGORIES BAR ===== */
.cats-bar {
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 40px;
}
.cats-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.cats-scroll::-webkit-scrollbar { display: none; }
.cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 100px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.2s;
  cursor: pointer;
}
.cat-pill:hover, .cat-pill.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ===== ARTICLE GRID ===== */
.section-title {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 24px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
  margin-bottom: 60px;
}
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 200, 83, 0.3);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}
.card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: var(--bg-elevated);
}
.card-body { padding: 20px; }
.card-cat {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 100px;
  background: var(--accent-glow);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 10px;
}
.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 8px;
  color: var(--text);
  letter-spacing: -0.3px;
}
.card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.card-meta .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--text-dim);
}

/* ===== FEATURED ===== */
.featured {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  margin-bottom: 60px;
  background: var(--bg-card);
}
.featured-img {
  width: 100%;
  height: 100%;
  min-height: 360px;
  object-fit: cover;
  background: var(--bg-elevated);
}
.featured-body {
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.featured-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 100px;
  background: var(--green-dim);
  color: var(--green);
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 16px;
  width: fit-content;
}
.featured-body h2 {
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}
.featured-body p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 24px;
  line-height: 1.6;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 100px;
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  width: fit-content;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: var(--accent-hover);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px var(--accent-glow);
}
.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ===== ARTICLE PAGE ===== */
.article-page { padding: 40px 0 80px; }
.article-header {
  max-width: 800px;
  margin: 0 auto 40px;
  text-align: center;
}
.article-header .cat-badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 100px;
  background: var(--accent-glow);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 16px;
}
.article-header h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 900;
  letter-spacing: -1px;
  line-height: 1.2;
  margin-bottom: 16px;
}
.article-header-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  color: var(--text-muted);
  font-size: 0.85rem;
}
.article-author-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  margin-right: 8px;
}
.article-hero-img {
  width: 100%;
  max-width: 900px;
  margin: 0 auto 48px;
  border-radius: var(--radius);
  overflow: hidden;
}
.article-hero-img img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  background: var(--bg-elevated);
}
.article-content {
  max-width: 720px;
  margin: 0 auto;
}
.article-content p {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 24px;
}

.article-content-img {
  margin: 36px 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
.article-content-img img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  background: var(--bg-elevated);
}

/* ===== QUOTE BLOCK ===== */
.quote-block {
  margin: 36px 0;
  padding: 28px 32px;
  border-left: 4px solid var(--accent);
  background: var(--bg-card);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.quote-block p {
  font-size: 1.1rem !important;
  font-style: italic;
  color: var(--text) !important;
  margin-bottom: 8px !important;
}
.quote-block cite {
  font-style: normal;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ===== TIPS BOX ===== */
.tips-box {
  margin: 36px 0;
  padding: 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.tips-box h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.tips-box ul {
  list-style: none;
  padding: 0;
}
.tips-box li {
  padding: 8px 0 8px 24px;
  position: relative;
  color: var(--text-muted);
  font-size: 0.95rem;
}
.tips-box li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--green);
  font-weight: 700;
}

/* ===== TAGS ===== */
.tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 32px 0;
}
.tag-pill {
  padding: 4px 14px;
  border-radius: 100px;
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-size: 0.8rem;
  border: 1px solid var(--border);
  transition: all 0.2s;
}
.tag-pill:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ===== SIDEBAR / RELATED ===== */
.related-section {
  margin-top: 60px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.related-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
  transition: all 0.2s;
}
.related-card:hover {
  border-color: rgba(0, 200, 83, 0.3);
}
.related-card h4 {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 8px;
}
.related-card span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ===== CATEGORY PAGE ===== */
.category-hero {
  padding: 60px 0 40px;
  text-align: center;
}
.category-hero .cat-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}
.category-hero h1 {
  font-size: 2.2rem;
  font-weight: 900;
  letter-spacing: -1px;
  margin-bottom: 8px;
}
.category-hero p {
  color: var(--text-muted);
  max-width: 500px;
  margin: 0 auto;
}

/* ===== FOOTER ===== */
.footer {
  border-top: 1px solid var(--border);
  padding: 48px 0;
  margin-top: 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
}
.footer-brand h3 {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 8px;
}
.footer-brand h3 span { color: var(--accent); }
.footer-brand p {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.6;
}
.footer-col h4 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-dim);
  margin-bottom: 14px;
}
.footer-col a {
  display: block;
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 4px 0;
}
.footer-bottom {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-dim);
  font-size: 0.8rem;
}

/* ===== PAGINATION ===== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 40px 0 60px;
}
.pagination a, .pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: all 0.2s;
}
.pagination a:hover { border-color: var(--accent); color: var(--accent); }
.pagination .active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .featured { grid-template-columns: 1fr; }
  .featured-body { padding: 24px; }
  .grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 24px; }
  .nav-links { display: none; }
}
