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

:root {
  --bg: #ffffff;
  --surface: #f6f6f6;
  --border: #e8e8e8;
  --text: #111111;
  --muted: #777777;
  --accent: #2563eb;
  --accent-bg: #eff6ff;
  --radius: 10px;
  --font: system-ui, -apple-system, sans-serif;
  --mono: 'SF Mono', 'Fira Code', monospace;
}

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

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── SITE NAV ─────────────────────────────── */
.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  height: 60px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  z-index: 100;
}

.site-logo {
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.3px;
  text-decoration: none;
}
.site-logo span { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
}
.nav-links a {
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
}
.nav-links a:hover { color: var(--text); text-decoration: none; }

/* ── TAGS ─────────────────────────────────── */
.tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 9px;
  border-radius: 99px;
  background: var(--surface);
  color: var(--muted);
  text-decoration: none;
}
.tag:hover { background: var(--accent-bg); color: var(--accent); text-decoration: none; }
.tag.css  { background: #eff6ff; color: #2563eb; }
.tag.html { background: #fff7ed; color: #c2410c; }
.tag.ux   { background: #fdf4ff; color: #9333ea; }
.tag.js   { background: #fefce8; color: #a16207; }
.tag.design { background: #f0fdf4; color: #16a34a; }

/* ── BLOG HOME ────────────────────────────── */
.home-hero {
  padding: 72px 40px 48px;
  max-width: 720px;
}
.home-hero h1 {
  font-size: 36px;
  font-weight: 900;
  letter-spacing: -0.5px;
  line-height: 1.15;
}
.home-hero p {
  margin-top: 10px;
  font-size: 16px;
  color: var(--muted);
}

.posts-section {
  padding: 0 40px 80px;
  max-width: 760px;
}
.posts-section h2 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.post-card {
  display: block;
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
}
.post-card:hover { text-decoration: none; }
.post-card:hover .post-title { color: var(--accent); }

.post-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.post-date {
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.post-title {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 6px;
  transition: color 0.15s;
}
.post-desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 12px;
}
.post-footer {
  display: flex;
  align-items: center;
  gap: 16px;
}
.demo-links {
  display: flex;
  gap: 8px;
}
.demo-link {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-bg);
  padding: 3px 10px;
  border-radius: 99px;
  text-decoration: none;
}
.demo-link:hover { text-decoration: none; opacity: 0.8; }

/* ── ARTICLE PAGE ─────────────────────────── */
.article-wrap {
  max-width: 680px;
  margin: 0 auto;
  padding: 56px 40px 100px;
}

.article-header { margin-bottom: 40px; }
.article-header .post-meta { margin-bottom: 14px; }
.article-header h1 {
  font-size: 36px;
  font-weight: 900;
  letter-spacing: -0.5px;
  line-height: 1.15;
  margin-bottom: 12px;
}
.article-header .lead {
  font-size: 18px;
  color: var(--muted);
  line-height: 1.6;
}
.article-header .demo-bar {
  display: flex;
  gap: 10px;
  margin-top: 24px;
  padding: 16px 20px;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  flex-wrap: wrap;
  align-items: center;
}
.article-header .demo-bar span {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-right: 4px;
}

/* article body */
.article-body h2 {
  font-size: 24px;
  font-weight: 800;
  margin: 48px 0 12px;
  letter-spacing: -0.3px;
}
.article-body h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 32px 0 10px;
}
.article-body p {
  font-size: 16px;
  line-height: 1.75;
  margin-bottom: 16px;
  color: #222;
}
.article-body ul, .article-body ol {
  margin: 0 0 20px 22px;
}
.article-body li {
  font-size: 16px;
  line-height: 1.75;
  color: #222;
  margin-bottom: 4px;
}
.article-body hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 40px 0;
}
.article-body blockquote {
  border-left: 3px solid var(--accent);
  padding: 4px 20px;
  margin: 24px 0;
  color: var(--muted);
  font-style: italic;
  font-size: 17px;
}
.article-body strong { color: var(--text); }

/* comparison table */
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 14px;
}
.article-body th {
  background: var(--surface);
  font-weight: 700;
  text-align: left;
  padding: 10px 14px;
  border: 1px solid var(--border);
}
.article-body td {
  padding: 10px 14px;
  border: 1px solid var(--border);
  color: #333;
}
.article-body tr:nth-child(even) td { background: #fafafa; }

/* callout */
.callout {
  background: var(--accent-bg);
  border-left: 3px solid var(--accent);
  padding: 14px 18px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 24px 0;
  font-size: 15px;
  color: #1e40af;
}

/* nav back */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 32px;
  text-decoration: none;
}
.back-link:hover { color: var(--text); text-decoration: none; }

/* ── FOOTER ───────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 24px 40px;
  font-size: 13px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
