:root {
  --bg: #07080f;
  --surface: rgba(255,255,255,0.04);
  --border: rgba(255,255,255,0.08);
  --text: rgba(255,255,255,0.85);
  --muted: rgba(255,255,255,0.45);
  --accent: #6366f1;
  --accent2: #00d4ff;
  --green: #10b981;
  --font-display: 'Sora', system-ui, sans-serif;
  --font-body: 'Source Serif 4', Georgia, serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

html { scroll-behavior: smooth; }

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

/* Nav */
.blog-nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(7,8,15,0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px; height: 56px;
  display: flex; align-items: center; justify-content: space-between;
}
.blog-nav .logo {
  font-family: var(--font-display);
  font-size: 18px; font-weight: 800;
  color: #fff; text-decoration: none;
  display: flex; align-items: center; gap: 8px;
}
.blog-nav .nav-links { display: flex; gap: 24px; }
.blog-nav .nav-links a {
  color: var(--muted); text-decoration: none;
  font-family: var(--font-display); font-size: 14px;
  transition: color 0.15s;
}
.blog-nav .nav-links a:hover { color: #fff; }
.blog-nav .cta {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border: none; border-radius: 99px;
  padding: 8px 18px; color: #fff;
  font-size: 13px; font-weight: 700;
  text-decoration: none; font-family: var(--font-display);
  cursor: pointer;
}

/* Blog Index */
.blog-hero {
  padding: 80px 24px 60px;
  max-width: 900px; margin: 0 auto; text-align: center;
}
.blog-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(36px, 6vw, 56px);
  font-weight: 900; letter-spacing: -2px;
  line-height: 1.05; margin-bottom: 16px;
}
.blog-hero .accent-text {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.blog-hero p {
  font-size: 18px; color: var(--muted);
  max-width: 500px; margin: 0 auto 32px;
}

/* Category tabs */
.category-tabs {
  display: flex; gap: 8px; flex-wrap: wrap;
  justify-content: center; margin-bottom: 48px;
  padding: 0 24px;
}
.cat-tab {
  padding: 8px 18px; border-radius: 99px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted); font-size: 13px;
  font-family: var(--font-display); font-weight: 600;
  cursor: pointer; transition: all 0.15s;
}
.cat-tab:hover, .cat-tab.active {
  background: rgba(99,102,241,0.12);
  border-color: rgba(99,102,241,0.3);
  color: #818cf8;
}

/* Article grid */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px; max-width: 1200px;
  margin: 0 auto; padding: 0 24px 80px;
}
.article-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px; padding: 24px;
  text-decoration: none; color: inherit;
  transition: all 0.2s; display: block;
  position: relative; overflow: hidden;
}
.article-card::before {
  content: ''; position: absolute;
  inset: 0; opacity: 0; transition: opacity 0.2s;
  background: radial-gradient(circle at top right, rgba(99,102,241,0.08), transparent 60%);
}
.article-card:hover { transform: translateY(-3px); border-color: rgba(99,102,241,0.2); }
.article-card:hover::before { opacity: 1; }
.article-tag {
  display: inline-block; font-family: var(--font-display);
  font-size: 10px; font-weight: 800; letter-spacing: 1.5px;
  text-transform: uppercase; padding: 3px 10px;
  border-radius: 99px; margin-bottom: 12px;
}
.tag-tutorial { background: rgba(16,185,129,0.1); color: #10b981; border: 1px solid rgba(16,185,129,0.2); }
.tag-hkdse { background: rgba(245,158,11,0.1); color: #f59e0b; border: 1px solid rgba(245,158,11,0.2); }
.tag-compare { background: rgba(239,68,68,0.1); color: #ef4444; border: 1px solid rgba(239,68,68,0.2); }
.tag-guide { background: rgba(99,102,241,0.1); color: #818cf8; border: 1px solid rgba(99,102,241,0.2); }
.tag-career { background: rgba(0,212,255,0.1); color: #00d4ff; border: 1px solid rgba(0,212,255,0.2); }
.tag-tips { background: rgba(236,72,153,0.1); color: #ec4899; border: 1px solid rgba(236,72,153,0.2); }

.article-card h2 {
  font-family: var(--font-display);
  font-size: 18px; font-weight: 800;
  line-height: 1.3; margin-bottom: 10px;
  letter-spacing: -0.3px; color: #fff;
}
.article-card p {
  font-size: 14px; color: var(--muted);
  line-height: 1.6; margin-bottom: 14px;
  font-family: var(--font-display);
}
.article-meta {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-display); font-size: 12px; color: var(--muted);
}
.read-time { display: flex; align-items: center; gap: 4px; }

/* Featured article */
.featured-article {
  grid-column: 1 / -1;
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 0; border-radius: 24px; overflow: hidden;
  background: linear-gradient(135deg, rgba(99,102,241,0.1), rgba(0,212,255,0.05));
  border: 1px solid rgba(99,102,241,0.2);
  text-decoration: none; color: inherit;
  transition: all 0.2s;
}
.featured-article:hover { transform: translateY(-2px); border-color: rgba(99,102,241,0.35); }
.featured-content { padding: 36px; }
.featured-article .featured-tag {
  display: inline-block; background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff; font-family: var(--font-display); font-size: 10px; font-weight: 800;
  letter-spacing: 2px; text-transform: uppercase; padding: 4px 12px;
  border-radius: 99px; margin-bottom: 16px;
}
.featured-article h2 {
  font-family: var(--font-display); font-size: 28px; font-weight: 900;
  line-height: 1.2; letter-spacing: -1px; margin-bottom: 12px; color: #fff;
}
.featured-visual {
  background: rgba(99,102,241,0.06);
  display: flex; align-items: center; justify-content: center;
  font-size: 80px; border-left: 1px solid rgba(99,102,241,0.1);
}

/* Article page */
.article-layout {
  max-width: 740px; margin: 0 auto;
  padding: 60px 24px 100px;
}
.article-header { margin-bottom: 48px; }
.article-header .tag { margin-bottom: 16px; }
.article-header h1 {
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 900; letter-spacing: -1.5px;
  line-height: 1.1; margin-bottom: 20px; color: #fff;
}
.article-header .excerpt {
  font-size: 20px; color: var(--muted); line-height: 1.6;
  margin-bottom: 24px;
}
.article-header .meta {
  display: flex; gap: 20px; font-family: var(--font-display);
  font-size: 13px; color: var(--muted);
  padding-bottom: 24px; border-bottom: 1px solid var(--border);
}

/* Article body */
.article-body h2 {
  font-family: var(--font-display);
  font-size: 26px; font-weight: 800; letter-spacing: -0.5px;
  margin: 48px 0 20px; color: #fff;
}
.article-body h3 {
  font-family: var(--font-display);
  font-size: 20px; font-weight: 700;
  margin: 32px 0 14px; color: rgba(255,255,255,0.9);
}
.article-body p { margin-bottom: 20px; color: var(--text); }
.article-body ul, .article-body ol {
  margin: 0 0 20px 24px; color: var(--text);
}
.article-body li { margin-bottom: 8px; }
.article-body code {
  font-family: var(--font-mono);
  background: rgba(99,102,241,0.12);
  border: 1px solid rgba(99,102,241,0.2);
  border-radius: 5px; padding: 2px 7px;
  font-size: 15px; color: #a5b4fc;
}
.article-body pre {
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--border);
  border-radius: 14px; padding: 20px 24px;
  overflow-x: auto; margin: 24px 0;
  font-family: var(--font-mono); font-size: 14px;
  line-height: 1.7; color: rgba(255,255,255,0.8);
}
.article-body pre code {
  background: none; border: none; padding: 0;
  color: inherit; font-size: inherit;
}
.article-body blockquote {
  border-left: 3px solid var(--accent);
  padding: 16px 20px; margin: 24px 0;
  background: rgba(99,102,241,0.05);
  border-radius: 0 12px 12px 0;
  font-style: italic; color: rgba(255,255,255,0.7);
}
.article-body .callout {
  background: rgba(16,185,129,0.06);
  border: 1px solid rgba(16,185,129,0.2);
  border-radius: 14px; padding: 18px 22px;
  margin: 24px 0; font-family: var(--font-display);
  font-size: 15px;
}
.article-body .callout.info {
  background: rgba(99,102,241,0.06);
  border-color: rgba(99,102,241,0.2);
}
.article-body .callout.warning {
  background: rgba(245,158,11,0.06);
  border-color: rgba(245,158,11,0.2);
}
.article-body a { color: var(--accent2); text-decoration: none; border-bottom: 1px solid rgba(0,212,255,0.3); }
.article-body a:hover { border-bottom-color: var(--accent2); }

/* CTA box */
.article-cta {
  background: linear-gradient(135deg, rgba(99,102,241,0.12), rgba(0,212,255,0.06));
  border: 1px solid rgba(99,102,241,0.25);
  border-radius: 20px; padding: 28px;
  margin: 40px 0; text-align: center;
  font-family: var(--font-display);
}
.article-cta h3 { font-size: 20px; font-weight: 800; margin-bottom: 8px; color: #fff; }
.article-cta p { font-size: 14px; color: var(--muted); margin-bottom: 18px; font-family: var(--font-display); }
.article-cta a {
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff; text-decoration: none; border: none;
  padding: 12px 24px; border-radius: 99px;
  font-size: 14px; font-weight: 700;
  box-shadow: 0 4px 16px rgba(99,102,241,0.3);
}

/* Comparison table */
.compare-table {
  width: 100%; border-collapse: collapse;
  margin: 28px 0; font-family: var(--font-display); font-size: 14px;
}
.compare-table th {
  background: rgba(99,102,241,0.1);
  padding: 12px 16px; text-align: left;
  font-weight: 800; color: #fff;
  border-bottom: 2px solid rgba(99,102,241,0.2);
}
.compare-table td {
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  color: var(--text);
}
.compare-table tr:hover td { background: rgba(255,255,255,0.02); }
.check { color: #10b981; font-weight: 700; }
.cross { color: #ef4444; }
.partial { color: #f59e0b; }

/* Related articles */
.related-section {
  margin-top: 60px; padding-top: 40px;
  border-top: 1px solid var(--border);
}
.related-section h3 {
  font-family: var(--font-display); font-size: 18px;
  font-weight: 800; margin-bottom: 20px; color: #fff;
}
.related-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; }
.related-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 16px;
  text-decoration: none; color: inherit; transition: all 0.15s;
}
.related-card:hover { border-color: rgba(99,102,241,0.2); }
.related-card .tag { font-family: var(--font-display); font-size: 10px; font-weight: 700; }
.related-card h4 { font-family: var(--font-display); font-size: 14px; font-weight: 700; line-height: 1.3; color: #fff; margin-top: 6px; }

/* Footer */
.blog-footer {
  background: rgba(255,255,255,0.02);
  border-top: 1px solid var(--border);
  padding: 40px 24px; text-align: center;
  font-family: var(--font-display); font-size: 13px; color: var(--muted);
}
.blog-footer a { color: var(--muted); text-decoration: none; border: none; }
.blog-footer a:hover { color: #fff; }

/* Responsive */
@media (max-width: 768px) {
  .featured-article { grid-template-columns: 1fr; }
  .featured-visual { display: none; }
  .articles-grid { grid-template-columns: 1fr; padding: 0 16px 60px; }
  .related-grid { grid-template-columns: 1fr; }
  .article-layout { padding: 40px 16px 80px; }
  .blog-nav .nav-links { display: none; }
}
