
:root {
  /* GitHub-inspired dark mode */
  --bg: #0d1117; --bg-secondary: #161b22; --bg-card: #161b22; --bg-elevated: #21262d;
  --text: #f0f6fc; --text-secondary: #8b949e; --text-muted: #6e7681;
  --accent: #58a6ff; --accent-secondary: #1f6feb; --accent-glow: rgba(88,166,255,0.15);
  --border: #30363d; --border-hover: #58a6ff;
  --gradient: linear-gradient(135deg, #58a6ff 0%, #a371f7 50%, #f778ba 100%);
  --gradient-subtle: linear-gradient(135deg, rgba(88,166,255,0.1) 0%, rgba(163,113,247,0.05) 100%);
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md: 0 3px 6px rgba(0,0,0,0.4), 0 8px 24px rgba(0,0,0,0.3);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.5), 0 16px 48px rgba(0,0,0,0.4);
  --shadow-glow: 0 0 20px rgba(88,166,255,0.3);
  --radius-sm: 6px; --radius-md: 12px; --radius-lg: 16px; --radius-xl: 24px;
  --success: #3fb950; --warning: #d29922; --error: #f85149;
  --purple: #a371f7; --pink: #f778ba; --cyan: #79c0ff;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: var(--bg); color: var(--text); line-height: 1.75; font-size: 16px; -webkit-font-smoothing: antialiased; min-height: 100vh; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* Global icon alignment */
[data-lucide] { display: inline-block; vertical-align: -0.125em; }
svg.lucide { display: inline-block; vertical-align: -0.125em; }

/* Header - GitHub glass style */
header { background: rgba(13,17,23,0.8); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); padding: 12px 0; position: fixed; top: 0; left: 0; right: 0; z-index: 1000; }
.header-content { display: flex; align-items: center; justify-content: space-between; }
.logo { font-size: 1.375rem; font-weight: 500; color: var(--text); text-decoration: none; letter-spacing: -0.01em; display: flex; align-items: center; gap: 8px; }
.logo::before { content: '◆'; color: var(--accent); font-size: 1.125rem; }
nav { display: flex; gap: 4px; align-items: center; }
nav a { display: inline-flex; align-items: center; gap: 0.375rem; color: var(--text-secondary); text-decoration: none; font-size: 0.875rem; font-weight: 500; padding: 8px 16px; border-radius: var(--radius-sm); transition: all 0.2s ease; }
nav a svg { width: 1rem; height: 1rem; }
nav a:hover { color: var(--text); background: var(--bg-elevated); }
nav a.nav-cta { background: var(--accent); color: white; }
nav a.nav-cta:hover { background: var(--accent-secondary); }

/* Hero - GitHub style with aurora */
.hero { padding: 140px 0 80px; text-align: center; background: var(--bg); position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%; background: radial-gradient(ellipse at 20% 50%, rgba(88,166,255,0.15) 0%, transparent 50%), radial-gradient(ellipse at 80% 50%, rgba(163,113,247,0.12) 0%, transparent 50%), radial-gradient(ellipse at 50% 100%, rgba(247,120,186,0.1) 0%, transparent 50%); animation: aurora 15s ease-in-out infinite; pointer-events: none; }
@keyframes aurora { 0%, 100% { transform: translate(0, 0) rotate(0deg); } 33% { transform: translate(2%, -2%) rotate(1deg); } 66% { transform: translate(-2%, 2%) rotate(-1deg); } }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; background: rgba(88,166,255,0.1); border: 1px solid rgba(88,166,255,0.3); padding: 6px 16px; border-radius: 100px; font-size: 0.8125rem; color: var(--accent); margin-bottom: 24px; position: relative; z-index: 1; }
.hero-badge .pulse { width: 8px; height: 8px; background: var(--success); border-radius: 50%; animation: pulse 2s ease-in-out infinite; box-shadow: 0 0 8px var(--success); }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.6; transform: scale(0.95); } }
.hero h1 { font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 600; margin-bottom: 20px; letter-spacing: -0.03em; line-height: 1.15; background: linear-gradient(135deg, var(--text) 0%, var(--text-secondary) 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; position: relative; z-index: 1; }
.hero p { color: var(--text-secondary); max-width: 560px; margin: 0 auto 32px; font-size: 1.25rem; line-height: 1.7; position: relative; z-index: 1; }
.hero-cta { display: inline-flex; align-items: center; gap: 8px; background: var(--accent); color: var(--bg); padding: 14px 28px; border-radius: var(--radius-sm); text-decoration: none; font-weight: 600; font-size: 0.9375rem; transition: all 0.3s ease; box-shadow: 0 0 20px rgba(88,166,255,0.3); position: relative; z-index: 1; }
.hero-cta:hover { background: var(--cyan); box-shadow: 0 0 30px rgba(88,166,255,0.5); transform: translateY(-2px); }
.hero-cta svg { width: 16px; height: 16px; }
.hero-stats { display: flex; justify-content: center; gap: 48px; margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--border); position: relative; z-index: 1; }
.hero-stat { text-align: center; }
.hero-stat-value { font-size: 2rem; font-weight: 600; background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; letter-spacing: -0.02em; }
.hero-stat-label { font-size: 0.8125rem; color: var(--text-muted); margin-top: 4px; }

/* Featured Article - GitHub Bento Style */
.featured { padding: 3rem 0 5rem; }
.featured-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 2.5rem; display: grid; grid-template-columns: 1fr 200px; gap: 2rem; align-items: center; position: relative; overflow: hidden; transition: all 0.4s ease; }
.featured-card:hover { border-color: var(--accent); box-shadow: var(--shadow-glow); }
.featured-card::before { content: ''; position: absolute; top: 0; right: 0; width: 60%; height: 100%; background: radial-gradient(ellipse at 100% 50%, rgba(88,166,255,0.08) 0%, transparent 70%); pointer-events: none; }
.featured-label { display: inline-flex; align-items: center; gap: 0.375rem; background: linear-gradient(135deg, var(--accent), var(--purple)); color: white; padding: 0.375rem 0.875rem; border-radius: 100px; font-size: 0.6875rem; font-weight: 600; margin-bottom: 1.25rem; text-transform: uppercase; letter-spacing: 0.05em; }
.featured-label svg { width: 0.875rem; height: 0.875rem; }
.featured-title { font-size: 1.625rem; font-weight: 600; line-height: 1.35; margin-bottom: 1rem; letter-spacing: -0.02em; }
.featured-title a { color: var(--text); text-decoration: none; transition: color 0.2s; }
.featured-title a:hover { color: var(--accent); }
.featured-excerpt { color: var(--text-secondary); font-size: 0.9375rem; line-height: 1.7; margin-bottom: 1.5rem; }
.featured-meta { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.featured-visual { font-size: 5rem; opacity: 0.9; position: relative; z-index: 1; filter: grayscale(20%); }

/* Category Pills - GitHub style */
.category-pills { display: flex; gap: 0.5rem; flex-wrap: wrap; justify-content: center; }
.category-pill { display: flex; align-items: center; gap: 0.5rem; background: var(--bg-elevated); border: 1px solid var(--border); padding: 0.5rem 1rem; border-radius: 100px; text-decoration: none; color: var(--text-secondary); font-size: 0.8125rem; font-weight: 500; transition: all 0.2s ease; }
.category-pill:hover { border-color: var(--accent); color: var(--accent); background: rgba(88,166,255,0.1); box-shadow: 0 0 12px rgba(88,166,255,0.2); }
.category-pill .count { background: var(--bg-secondary); padding: 0.125rem 0.5rem; border-radius: 100px; font-size: 0.6875rem; color: var(--text-muted); }

/* Section Headers */
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; }
.section-title { font-size: 1.25rem; font-weight: 600; letter-spacing: -0.02em; display: flex; align-items: center; gap: 0.5rem; }
.section-title::before { content: ''; width: 4px; height: 20px; background: var(--gradient); border-radius: 2px; }
.section-title svg { width: 1.25rem; height: 1.25rem; color: var(--accent); }
.section-link { color: var(--text-muted); text-decoration: none; font-size: 0.8125rem; font-weight: 500; transition: color 0.2s; }
.section-link:hover { color: var(--accent); }

/* Article Grid - Bento */
.articles-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 1.5rem; }

/* Newsletter CTA - GitHub gradient */
.newsletter { padding: 5rem 0; }
.newsletter-card { background: var(--bg-card); border-radius: var(--radius-xl); padding: 4rem 2rem; text-align: center; position: relative; overflow: hidden; }
.newsletter-card::before { content: ''; position: absolute; inset: 0; border-radius: var(--radius-xl); padding: 1px; background: var(--gradient); -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.newsletter-card::after { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: radial-gradient(ellipse at 50% 0%, rgba(88,166,255,0.1) 0%, transparent 60%); pointer-events: none; }
.newsletter-card h2 { font-size: 1.75rem; font-weight: 600; margin-bottom: 0.75rem; letter-spacing: -0.02em; position: relative; z-index: 1; }
.newsletter-card p { color: var(--text-secondary); font-size: 1rem; margin-bottom: 2rem; position: relative; z-index: 1; }
.newsletter-btn { display: inline-flex; align-items: center; gap: 0.5rem; background: var(--text); color: var(--bg); padding: 0.875rem 2rem; border-radius: 100px; text-decoration: none; font-weight: 600; font-size: 0.9375rem; transition: all 0.3s ease; position: relative; z-index: 1; }
.newsletter-btn:hover { transform: scale(1.02); box-shadow: 0 0 30px rgba(240,246,252,0.2); }

/* Article cards - GitHub Card Design */
.article-list { padding: 48px 0; }
.article-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; transition: all 0.3s ease; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.article-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--gradient); opacity: 0; transition: opacity 0.3s ease; }
.article-card:hover { border-color: var(--accent); box-shadow: 0 0 20px rgba(88,166,255,0.15); transform: translateY(-4px); }
.article-card:hover::before { opacity: 1; }
.card-header { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.card-title { font-size: 1.125rem; font-weight: 600; margin-bottom: 12px; line-height: 1.4; flex-grow: 1; }
.card-title a { color: var(--text); text-decoration: none; transition: color 0.2s; }
.card-title a:hover { color: var(--accent); }
.card-excerpt { color: var(--text-muted); font-size: 0.875rem; line-height: 1.7; margin-bottom: 16px; flex-grow: 1; }
.card-footer { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 16px; border-top: 1px solid var(--border); }
.card-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.card-link { color: var(--accent); text-decoration: none; font-size: 0.8125rem; font-weight: 600; transition: gap 0.2s; display: flex; align-items: center; gap: 4px; }
.card-link:hover { gap: 8px; }

/* Badge System - GitHub style */
.badge { display: inline-flex; align-items: center; gap: 0.375rem; padding: 0.375rem 0.75rem; border-radius: 100px; font-weight: 600; font-size: 0.75rem; text-transform: capitalize; letter-spacing: 0.02em; transition: all 0.2s ease; }
.badge svg { width: 0.875rem; height: 0.875rem; flex-shrink: 0; }
.badge-channel { background: linear-gradient(135deg, rgba(88,166,255,0.2), rgba(163,113,247,0.2)); color: var(--accent); border: 1px solid rgba(88,166,255,0.3); }
.badge-difficulty { border: 1.5px solid; background: transparent; }
.badge-beginner { color: var(--success); border-color: var(--success); background: rgba(63,185,80,0.1); }
.badge-intermediate { color: var(--warning); border-color: var(--warning); background: rgba(210,153,34,0.1); }
.badge-advanced { color: var(--error); border-color: var(--error); background: rgba(248,81,73,0.1); }
.badge-tag { background: var(--bg-elevated); color: var(--text-secondary); border: 1px solid var(--border); font-size: 0.6875rem; padding: 4px 10px; }
.badge-tag:hover { border-color: var(--accent); color: var(--accent); background: rgba(88,166,255,0.1); }

/* Legacy support */
.article-meta { display: flex; flex-wrap: wrap; gap: 6px; font-size: 0.75rem; margin-bottom: 12px; }
.tag { background: var(--bg-elevated); color: var(--text-secondary); padding: 4px 10px; border-radius: 100px; font-weight: 500; font-size: 0.75rem; border: 1px solid var(--border); }
.difficulty { padding: 4px 10px; border-radius: 100px; font-weight: 500; font-size: 0.75rem; }
.difficulty.beginner { background: rgba(63,185,80,0.15); color: var(--success); }
.difficulty.intermediate { background: rgba(210,153,34,0.15); color: var(--warning); }
.difficulty.advanced { background: rgba(248,81,73,0.15); color: var(--error); }
.excerpt { color: var(--text-muted); font-size: 0.875rem; line-height: 1.6; }

/* Category Grid */
.category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.category-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem; transition: all 0.3s ease; }
.category-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 0 20px rgba(88,166,255,0.15); }
.category-card h3 { font-size: 1rem; font-weight: 600; margin-bottom: 0.375rem; letter-spacing: -0.01em; }
.category-card p { color: var(--text-muted); font-size: 0.8125rem; }
.category-card a { color: var(--accent); text-decoration: none; font-size: 0.8125rem; font-weight: 500; display: inline-flex; align-items: center; gap: 0.25rem; margin-top: 1rem; transition: gap 0.2s; }
.category-card a:hover { gap: 0.5rem; }
.category-card a::after { content: '→'; }

/* Article Page - Enhanced */
.article { padding: 8rem 0 4rem; max-width: 760px; margin: 0 auto; }
.article-header { margin-bottom: 2.5rem; }
.article-header h1 { font-size: clamp(2rem, 5vw, 2.75rem); font-weight: 500; margin-bottom: 1.75rem; line-height: 1.2; letter-spacing: -0.02em; color: var(--text); }
.article-header .article-meta { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-top: 1.25rem; }
.article-header .tag { background: var(--bg-elevated); color: var(--text-secondary); padding: 0.375rem 0.875rem; border-radius: 100px; font-weight: 500; font-size: 0.75rem; text-transform: capitalize; letter-spacing: 0.02em; border: 1px solid var(--border); transition: all 0.2s; }
.article-header .tag:hover { border-color: var(--accent); color: var(--text); }
.article-header .difficulty { padding: 0.375rem 0.875rem; border-radius: 100px; font-weight: 600; font-size: 0.75rem; text-transform: capitalize; letter-spacing: 0.02em; }
.article-intro { font-size: 1.125rem; color: var(--text-secondary); line-height: 1.8; margin-bottom: 2rem; padding: 1.5rem; background: var(--bg-secondary); border-radius: var(--radius-md); border-left: 4px solid var(--accent); border: 1px solid var(--border); border-left: 4px solid var(--accent); }

/* Author Card - Credits Section */
.author-card { display: flex; align-items: center; gap: 16px; padding: 20px; background: var(--bg-secondary); border-radius: var(--radius-md); margin: 2rem 0; border: 1px solid var(--border); }
.author-avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border); }
.author-info { flex: 1; }
.author-name { font-weight: 600; color: var(--text); font-size: 1rem; margin-bottom: 2px; }
.author-role { color: var(--text-muted); font-size: 0.875rem; }
.author-links { display: flex; gap: 12px; margin-top: 8px; }
.author-links a { color: var(--text-secondary); text-decoration: none; font-size: 0.8125rem; display: flex; align-items: center; gap: 4px; transition: color 0.2s; }
.author-links a:hover { color: var(--accent); }
.author-links svg { width: 16px; height: 16px; }

/* Article content - GitHub Typography */
.article-content { font-size: 1rem; line-height: 1.85; color: var(--text-secondary); }
.article-content h2 { font-size: 1.375rem; font-weight: 600; margin: 3rem 0 1.25rem; color: var(--text); letter-spacing: -0.02em; padding-bottom: 0.5rem; border-bottom: 1px solid var(--border); }
.article-content h3 { font-size: 1.125rem; font-weight: 600; margin: 2rem 0 1rem; color: var(--text); }
.article-content p { margin-bottom: 1.5rem; }
.article-content strong { color: var(--text); font-weight: 600; }
.article-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.article-content a:hover { color: var(--cyan); }
.article-content pre { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 1.25rem; overflow-x: auto; margin: 1.5rem 0; font-size: 0.8125rem; }
.article-content code { font-family: 'JetBrains Mono', 'Fira Code', monospace; font-size: 0.875em; }
.article-content p code, .article-content li code { background: rgba(88,166,255,0.1); padding: 0.2rem 0.4rem; border-radius: 4px; color: var(--accent); border: 1px solid rgba(88,166,255,0.2); }
.article-content ul, .article-content ol { margin: 1.5rem 0; padding: 0 0 0 1.25rem; list-style: none; }
.article-content li { margin-bottom: 0.625rem; padding-left: 1rem; position: relative; }
.article-content ul > li::before { content: ''; position: absolute; left: -1rem; top: 0.6rem; width: 5px; height: 5px; background: var(--accent); border-radius: 50%; }
.article-content ol { counter-reset: item; }
.article-content ol > li { counter-increment: item; }
.article-content ol > li::before { content: counter(item); position: absolute; left: -1.5rem; top: 0; color: var(--accent); font-weight: 600; font-size: 0.875rem; }
.article-content .mermaid { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 12px; padding: 2rem; margin: 2rem 0; position: relative; overflow-x: auto; }
.article-content .mermaid::before { content: '📊'; position: absolute; top: -14px; left: 20px; background: var(--bg-secondary); padding: 0 8px; font-size: 1.25rem; }
.article-content .mermaid svg { max-width: 100%; height: auto; display: block; margin: 0 auto; }
.article-content .mermaid text { fill: var(--text) !important; font-size: 14px !important; }

/* Premium Table Styling - GitHub dark */
.article-content table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 2rem 0; font-size: 0.875rem; background: var(--bg-card); border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); }
.article-content thead { background: linear-gradient(135deg, rgba(88,166,255,0.1), rgba(163,113,247,0.1)); }
.article-content th { padding: 1rem 1.25rem; text-align: left; font-weight: 600; color: var(--text); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 1px solid var(--border); white-space: nowrap; }
.article-content th:first-child { border-top-left-radius: var(--radius-lg); }
.article-content th:last-child { border-top-right-radius: var(--radius-lg); }
.article-content tbody tr { transition: background 0.2s ease; }
.article-content tbody tr:hover { background: rgba(88,166,255,0.05); }
.article-content tbody tr:nth-child(even) { background: rgba(255,255,255,0.02); }
.article-content tbody tr:nth-child(even):hover { background: rgba(88,166,255,0.08); }
.article-content td { padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); color: var(--text-secondary); vertical-align: top; line-height: 1.6; }
.article-content tbody tr:last-child td { border-bottom: none; }
.article-content tbody tr:last-child td:first-child { border-bottom-left-radius: var(--radius-lg); }
.article-content tbody tr:last-child td:last-child { border-bottom-right-radius: var(--radius-lg); }
/* Table cell color coding for comparisons */
.article-content td:first-child { color: var(--text); font-weight: 500; background: rgba(255,255,255,0.02); }
.article-content td code { background: rgba(88,166,255,0.15); color: var(--accent); padding: 0.2em 0.5em; border-radius: 4px; font-size: 0.8125rem; }
/* Table responsive wrapper */
@media (max-width: 768px) {
  .article-content table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .article-content th, .article-content td { padding: 0.75rem 1rem; min-width: 120px; }
}

.article-content blockquote { padding: 1.25rem 1.5rem; margin: 2rem 0; background: var(--bg-card); border-radius: var(--radius-md); border-left: 3px solid var(--accent); color: var(--text-secondary); }

/* Callouts - Modern */
.callout { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 1.25rem; margin: 1.5rem 0; display: flex; gap: 1rem; align-items: flex-start; }
.callout-icon { font-size: 1.25rem; line-height: 1; }
.callout strong { color: var(--text); display: block; margin-bottom: 0.25rem; font-size: 0.875rem; }
.callout p { margin: 0; color: var(--text-secondary); font-size: 0.875rem; line-height: 1.6; }

/* Glossary tooltips - GitHub style */
.glossary-term { border-bottom: 1px dashed rgba(88,166,255,0.5); cursor: help; position: relative; color: var(--text); }
.glossary-term:hover { color: var(--accent); }
.glossary-term::after { content: attr(data-tooltip); position: absolute; top: calc(100% + 8px); left: 0; background: var(--bg-elevated); border: 1px solid var(--border); padding: 0.75rem 1rem; border-radius: var(--radius-sm); font-size: 0.8125rem; max-width: 300px; min-width: 200px; white-space: normal; z-index: 1000; box-shadow: 0 8px 32px rgba(0,0,0,0.5); color: var(--text-secondary); line-height: 1.5; opacity: 0; visibility: hidden; transition: opacity 0.2s, visibility 0.2s; pointer-events: none; }
.glossary-term:hover::after { opacity: 1; visibility: visible; }
.glossary-term::before { content: ''; position: absolute; top: 100%; left: 1rem; border: 6px solid transparent; border-bottom-color: var(--border); opacity: 0; visibility: hidden; transition: opacity 0.2s, visibility 0.2s; z-index: 1001; }
.glossary-term:hover::before { opacity: 1; visibility: visible; }

/* Special sections - GitHub Bento Cards */
.real-world-example { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.75rem; margin: 2rem 0; position: relative; overflow: hidden; }
.real-world-example::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--gradient); }
.real-world-example h3 { color: var(--text-muted); margin-bottom: 0.5rem; font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.1em; display: flex; align-items: center; gap: 0.5rem; }
.real-world-example .company { font-size: 1.25rem; font-weight: 600; color: var(--text); margin-bottom: 0.75rem; }
.real-world-example .scenario { color: var(--text-secondary); font-size: 0.9375rem; line-height: 1.7; margin-bottom: 1rem; }
.real-world-example .lesson { background: var(--bg-elevated); padding: 1rem; border-radius: var(--radius-sm); font-size: 0.875rem; color: var(--text-secondary); border-left: 2px solid var(--accent); }

.fun-fact { background: linear-gradient(135deg, rgba(163,113,247,0.1), rgba(88,166,255,0.05)); border: 1px solid rgba(163,113,247,0.3); border-radius: var(--radius-lg); padding: 1.25rem 1.5rem; margin: 2rem 0; display: flex; gap: 1rem; align-items: center; }
.fun-fact-icon { font-size: 1.75rem; }
.fun-fact p { margin: 0; color: var(--text-secondary); font-size: 0.9375rem; line-height: 1.6; }
.fun-fact strong { color: var(--text); }

.quick-ref { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.75rem; margin: 2rem 0; }
.quick-ref h3 { color: var(--text); margin-bottom: 1rem; font-size: 1rem; font-weight: 600; display: flex; align-items: center; gap: 0.5rem; }
.quick-ref ul { margin: 0; padding: 0; list-style: none; }
.quick-ref li { margin-bottom: 0.5rem; padding-left: 1.5rem; position: relative; color: var(--text-secondary); font-size: 0.9375rem; }
.quick-ref li::before { content: '✓'; position: absolute; left: 0; color: var(--success); font-weight: 700; }

/* Sources - Minimal */
.sources { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 1.25rem 1.5rem; margin: 2rem 0; }
.sources h3 { margin-bottom: 0.875rem; font-size: 0.875rem; color: var(--text); font-weight: 600; }
.sources ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0; }
.sources li { display: flex; align-items: flex-start; gap: 0.5rem; font-size: 0.875rem; padding: 0.5rem 0; border-bottom: 1px solid var(--border); }
.sources li:last-child { border-bottom: none; }
.sources a { color: var(--accent); text-decoration: none; }
.sources a:hover { text-decoration: underline; }
.sources .source-type { font-size: 0.6875rem; color: var(--text-muted); margin-left: 0.5rem; text-transform: uppercase; letter-spacing: 0.03em; }
.sources .source-num { display: inline-flex; align-items: center; justify-content: center; min-width: 1.5rem; height: 1.5rem; background: var(--accent); color: #ffffff; font-size: 0.75rem; font-weight: 700; border-radius: 50%; margin-right: 0.75rem; flex-shrink: 0; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }

/* Inline Citations */
.citation { display: inline-flex; align-items: center; justify-content: center; min-width: 1.125rem; height: 1.125rem; padding: 0 0.25rem; background: var(--accent); color: #ffffff; font-size: 0.625rem; font-weight: 700; border-radius: 50%; margin: 0 0.125rem; vertical-align: super; cursor: pointer; text-decoration: none; transition: all 0.2s; box-shadow: 0 1px 2px rgba(0,0,0,0.1); }
.citation:hover { transform: scale(1.15); background: var(--accent-secondary); box-shadow: 0 2px 4px rgba(0,0,0,0.15); }

/* Article Images */
.article-image { margin: 2rem 0; border-radius: var(--radius-lg); overflow: hidden; background: var(--bg-card); border: 1px solid var(--border); }
.article-image img { width: 100%; height: auto; display: block; object-fit: cover; max-height: 400px; }
.article-image figcaption { padding: 0.75rem 1rem; font-size: 0.8125rem; color: var(--text-muted); text-align: center; border-top: 1px solid var(--border); background: var(--bg-secondary); }

/* Share Snippet - GitHub style */
.share-snippet { background: linear-gradient(135deg, var(--bg-card), var(--bg-elevated)); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem; margin: 2.5rem 0; position: relative; overflow: hidden; }
.share-snippet::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--gradient); }
.share-snippet-header { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1rem; }
.share-snippet-header .share-icon { font-size: 1.25rem; }
.share-snippet-header h3 { flex: 1; font-size: 0.9375rem; font-weight: 600; color: var(--text); margin: 0; }
.share-buttons { display: flex; gap: 0.5rem; }
.share-btn { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; border: 1px solid var(--border); background: var(--bg-card); color: var(--text-secondary); cursor: pointer; transition: all 0.2s; }
.share-btn svg { width: 16px; height: 16px; }
.share-btn:hover { transform: scale(1.1); }
.share-btn.linkedin:hover { background: #0077b5; color: white; border-color: #0077b5; box-shadow: 0 0 15px rgba(0,119,181,0.4); }
.share-btn.twitter:hover { background: #000; color: white; border-color: #000; }
.share-btn.copy:hover { background: var(--accent); color: var(--bg); border-color: var(--accent); box-shadow: 0 0 15px rgba(88,166,255,0.4); }
.share-snippet-content { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 1.25rem; font-size: 0.9375rem; line-height: 1.7; }
.snippet-hook { font-weight: 600; color: var(--text); margin-bottom: 0.75rem; font-size: 1rem; }
.snippet-body { color: var(--text-secondary); margin-bottom: 0.75rem; white-space: pre-line; }
.snippet-cta { color: var(--accent); font-weight: 500; margin-bottom: 0.5rem; }
.snippet-hashtags { color: var(--purple); font-size: 0.875rem; margin-bottom: 0.5rem; word-wrap: break-word; }
.snippet-link { font-size: 0.8125rem; color: var(--text-muted); word-break: break-all; }

/* CTA - GitHub gradient */
.cta-box { margin-top: 3rem; padding: 2rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); text-align: center; position: relative; overflow: hidden; }
.cta-box::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 0%, rgba(88,166,255,0.1) 0%, transparent 60%); pointer-events: none; }
.cta-box p { margin-bottom: 1rem; font-size: 1.125rem; font-weight: 600; color: var(--text); position: relative; }
.cta-button { display: inline-flex; align-items: center; gap: 0.5rem; background: var(--accent); color: var(--bg); padding: 0.75rem 1.5rem; border-radius: 100px; text-decoration: none; font-weight: 600; font-size: 0.875rem; transition: all 0.3s ease; position: relative; }
.cta-button:hover { transform: scale(1.02); box-shadow: 0 0 25px rgba(88,166,255,0.4); background: var(--cyan); }

/* Footer - GitHub style */
footer { background: var(--bg-secondary); border-top: 1px solid var(--border); padding: 3rem 0; margin-top: 5rem; }
.footer-content { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; }
.footer-brand { font-size: 1.125rem; font-weight: 600; color: var(--text); display: flex; align-items: center; gap: 0.5rem; }
.footer-brand::before { content: '◆'; background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { color: var(--text-muted); text-decoration: none; font-size: 0.8125rem; transition: color 0.2s; }
.footer-links a:hover { color: var(--text); }
.footer-copy { text-align: center; color: var(--text-muted); font-size: 0.8125rem; }
.footer-copy a { color: var(--accent); text-decoration: none; }

/* Responsive */
@media (max-width: 768px) { 
  .container { padding: 0 1.25rem; }
  .hero { padding: 8rem 0 4rem; }
  .hero h1 { font-size: 2rem; } 
  .hero-stats { gap: 2rem; flex-wrap: wrap; }
  .hero-stat-value { font-size: 1.75rem; }
  .featured-card { grid-template-columns: 1fr; padding: 1.5rem; }
  .featured-visual { display: none; }
  .featured-title { font-size: 1.25rem; }
  .article-header h1 { font-size: 1.625rem; color: var(--text); } 
  .article-intro { padding: 2rem 1.5rem 1.5rem 1.5rem; font-size: 1rem; }
  nav { gap: 0.25rem; } 
  nav a { padding: 0.5rem 0.75rem; font-size: 0.8125rem; }
  .category-grid, .articles-grid { grid-template-columns: 1fr; }
  .glossary-term:hover::after { left: 0; transform: none; max-width: 200px; }
  .footer-content { flex-direction: column; gap: 1.5rem; text-align: center; }
  .category-pills { gap: 0.375rem; }
  .category-pill { font-size: 0.75rem; padding: 0.375rem 0.75rem; }
  .hero-stats { flex-direction: column; gap: 1.5rem; border: none; padding-top: 2rem; }
}

/* Animations */
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.article-card, .category-card, .featured-card { animation: fadeIn 0.4s ease-out; }

/* Selection */
::selection { background: rgba(88,166,255,0.3); color: var(--text); }

/* Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* Breadcrumb Navigation */
.breadcrumb-nav { margin-bottom: 1.5rem; }
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem; list-style: none; padding: 0; margin: 0; font-size: 0.8125rem; }
.breadcrumb li { display: flex; align-items: center; gap: 0.25rem; color: var(--text-muted); }
.breadcrumb li + li::before { content: '/'; margin: 0 0.25rem; color: var(--text-muted); }
.breadcrumb a { color: var(--text-secondary); text-decoration: none; transition: color 0.2s; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb li[aria-current="page"] { color: var(--text); font-weight: 500; }

/* Article Date */
.article-date { display: inline-flex; align-items: center; gap: 0.375rem; color: var(--text-muted); font-size: 0.75rem; }
.article-date svg { width: 14px; height: 14px; }

/* Related articles grid */
.related-articles { margin: 2.5rem 0; }
.related-articles h3 { font-size: 1rem; font-weight: 600; margin-bottom: 1rem; color: var(--text); }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; }
.related-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 1.25rem; text-decoration: none; transition: all 0.2s; display: flex; flex-direction: column; gap: 0.5rem; }
.related-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.related-title { color: var(--text); font-weight: 500; font-size: 0.9375rem; line-height: 1.4; }
.related-meta { color: var(--text-muted); font-size: 0.75rem; text-transform: capitalize; }

/* Article layout with TOC sidebar */
.article-layout { padding: 6rem 0 4rem; max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1fr 240px; gap: 3rem; padding-left: 24px; padding-right: 24px; }
.article-layout > article { min-width: 0; }
.article-toc { position: sticky; top: 5rem; max-height: calc(100vh - 6rem); overflow-y: auto; padding: 1rem 0; }
.toc-title { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); margin-bottom: 0.75rem; display: flex; align-items: center; gap: 0.5rem; }
.toc-title svg { width: 14px; height: 14px; }
.toc-list { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--border); }
.toc-list li { margin: 0; }
.toc-list a { display: block; padding: 0.375rem 0.75rem; color: var(--text-muted); text-decoration: none; font-size: 0.75rem; line-height: 1.5; border-left: 2px solid transparent; margin-left: -2px; transition: all 0.2s; }
.toc-list a:hover { color: var(--text); }
.toc-list a.active { color: var(--accent); border-left-color: var(--accent); font-weight: 500; }

/* Focus states for accessibility */
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }

/* Skip link for accessibility */
.skip-link { position: absolute; top: -40px; left: 0; background: var(--accent); color: var(--bg); padding: 0.5rem 1rem; z-index: 10000; text-decoration: none; font-weight: 600; }
.skip-link:focus { top: 0; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* Print styles */
@media print {
  header, footer, .search-overlay, #back-to-top, .share-snippet, .author-card, .related-articles, .article-toc, .breadcrumb-nav, .newsletter, .hero-actions, .stats-bar, .topics-section, .diff-filters, .featured, nav { display: none !important; }
  body { background: white; color: black; font-size: 12pt; line-height: 1.5; }
  .article-layout { grid-template-columns: 1fr; max-width: 100%; padding: 0; }
  a { color: black; text-decoration: underline; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.9em; color: #666; }
  .article-content pre { border: 1px solid #ccc; background: #f5f5f5; white-space: pre-wrap; word-wrap: break-word; }
  .article-content code { background: #f0f0f0; }
}

/* Responsive - TOC */
@media (max-width: 1024px) {
  .article-layout { grid-template-columns: 1fr; }
  .article-toc { display: none; }
}

/* Search */
.search-container { position: relative; }
.search-btn { background: var(--bg-card); border: 1px solid var(--border); padding: 0.5rem 1rem; border-radius: 100px; color: var(--text-muted); font-size: 0.8125rem; cursor: pointer; display: flex; align-items: center; gap: 0.5rem; transition: all 0.2s; }
.search-btn:hover { border-color: var(--accent); color: var(--text); }
.search-btn kbd { background: var(--bg-elevated); padding: 0.125rem 0.375rem; border-radius: 4px; font-size: 0.6875rem; font-family: inherit; }
.search-modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.85); backdrop-filter: blur(12px); z-index: 2000; align-items: flex-start; justify-content: center; padding-top: 15vh; }
.search-modal.active { display: flex; }
.search-box { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); width: 100%; max-width: 600px; max-height: 70vh; overflow: hidden; box-shadow: 0 16px 70px rgba(0,0,0,0.5); }
.search-input-wrap { display: flex; align-items: center; padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); gap: 0.75rem; }
.search-input-wrap svg { width: 20px; height: 20px; color: var(--text-muted); flex-shrink: 0; }
.search-input { flex: 1; background: none; border: none; color: var(--text); font-size: 1rem; outline: none; }
.search-input::placeholder { color: var(--text-muted); }
.search-close { background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 0.25rem; }
.search-close:hover { color: var(--text); }
.search-results { max-height: calc(70vh - 60px); overflow-y: auto; padding: 0.5rem; }
.search-results:empty::before { content: 'Start typing to search...'; display: block; padding: 2rem; text-align: center; color: var(--text-muted); font-size: 0.875rem; }
.search-result { display: block; padding: 1rem; border-radius: var(--radius-sm); text-decoration: none; transition: background 0.15s; }
.search-result:hover { background: var(--bg-elevated); }
.search-result-title { color: var(--text); font-weight: 500; margin-bottom: 0.25rem; }
.search-result-meta { display: flex; gap: 0.5rem; align-items: center; }
.search-result-meta .tag { font-size: 0.625rem; }
.search-result-excerpt { color: var(--text-muted); font-size: 0.8125rem; margin-top: 0.375rem; line-height: 1.5; }
.search-empty { padding: 2rem; text-align: center; color: var(--text-muted); font-size: 0.875rem; }
.search-highlight { background: rgba(88,166,255,0.25); color: var(--accent); padding: 0 2px; border-radius: 2px; }

/* Filter tabs */
.filter-tabs { display: flex; gap: 0.5rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.filter-tab { background: transparent; border: 1px solid var(--border); padding: 0.5rem 1rem; border-radius: 100px; color: var(--text-secondary); font-size: 0.8125rem; cursor: pointer; transition: all 0.2s; font-family: inherit; }
.filter-tab:hover { border-color: var(--accent); color: var(--text); }
.filter-tab.active { background: var(--accent); color: var(--bg); border-color: var(--accent); }

/* Difficulty filter badges */
.diff-filters { display: flex; gap: 0.375rem; }
.diff-filter { padding: 0.375rem 0.75rem; border-radius: 100px; font-size: 0.75rem; cursor: pointer; border: 1px solid transparent; transition: all 0.2s; background: var(--bg-elevated); color: var(--text-secondary); }
.diff-filter.beginner { background: rgba(63,185,80,0.15); color: var(--success); }
.diff-filter.intermediate { background: rgba(210,153,34,0.15); color: var(--warning); }
.diff-filter.advanced { background: rgba(248,81,73,0.15); color: var(--error); }
.diff-filter:hover, .diff-filter.active { border-color: currentColor; box-shadow: 0 0 10px currentColor; }

/* Stats Bar */
.stats-bar { padding: 0; margin-top: -3rem; position: relative; z-index: 10; }
.stats-grid { display: flex; justify-content: center; align-items: center; gap: 2.5rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 1.5rem 3rem; max-width: 700px; margin: 0 auto; box-shadow: 0 8px 32px rgba(0,0,0,0.3); }
.stat-item { text-align: center; }
.stat-value { font-size: 1.75rem; font-weight: 700; background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; display: flex; align-items: center; justify-content: center; gap: 0.5rem; letter-spacing: -0.02em; }
.stat-value svg { width: 1.25rem; height: 1.25rem; stroke-width: 2.5; color: var(--accent); -webkit-text-fill-color: initial; }
.stat-label { font-size: 0.6875rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 0.25rem; display: block; }
.stat-divider { width: 1px; height: 40px; background: var(--border); }

/* Featured Grid */
.featured-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 1.25rem; }
.featured-main { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 2rem; position: relative; overflow: hidden; transition: all 0.3s ease; }
.featured-main:hover { border-color: var(--accent); box-shadow: 0 0 30px rgba(88,166,255,0.15); }
.featured-main::before { content: ''; position: absolute; top: 0; right: 0; width: 60%; height: 100%; background: radial-gradient(ellipse at 100% 50%, rgba(88,166,255,0.08) 0%, transparent 70%); pointer-events: none; }
.featured-side { display: flex; flex-direction: column; gap: 1.25rem; }
.featured-side-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.25rem; text-decoration: none; transition: all 0.3s ease; display: flex; flex-direction: column; gap: 0.75rem; flex: 1; }
.featured-side-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 0 20px rgba(88,166,255,0.15); }
.featured-side-card .tag { width: fit-content; }
.featured-side-card h3 { font-size: 0.9375rem; font-weight: 600; color: var(--text); line-height: 1.4; margin: 0; letter-spacing: -0.01em; }

/* Topics Section */
.topics-section { padding: 4rem 0 2rem; }
.topics-title { font-size: 1.125rem; font-weight: 600; text-align: center; margin-bottom: 1.5rem; color: var(--text); letter-spacing: -0.02em; display: flex; align-items: center; justify-content: center; gap: 0.5rem; }
.topics-title svg { width: 1.25rem; height: 1.25rem; color: var(--accent); }

/* Hero Actions */
.hero-actions { display: flex; gap: 1rem; justify-content: center; align-items: center; position: relative; z-index: 1; }
.hero-cta-secondary { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--text-secondary); text-decoration: none; font-size: 0.9375rem; font-weight: 500; padding: 0.875rem 1.5rem; border: 1px solid var(--border); border-radius: 100px; transition: all 0.2s ease; }
.hero-cta-secondary svg { width: 1rem; height: 1rem; }
.hero-cta-secondary:hover { border-color: var(--accent); color: var(--accent); background: rgba(88,166,255,0.1); }

/* Responsive - Stats & Featured */
@media (max-width: 768px) {
  .stats-grid { flex-wrap: wrap; gap: 1.5rem 2rem; padding: 1.25rem 1.5rem; }
  .stat-divider { display: none; }
  .stat-value { font-size: 1.5rem; }
  .featured-grid { grid-template-columns: 1fr; }
  .featured-side { flex-direction: row; }
  .featured-side-card { flex: 1; }
  .featured-side-card h3 { font-size: 0.8125rem; }
  .hero-actions { flex-direction: column; gap: 0.75rem; }
  .hero-cta, .hero-cta-secondary { width: 100%; max-width: 280px; justify-content: center; }
  .hero::before { opacity: 0.5; }
}
@media (max-width: 480px) {
  .featured-side { flex-direction: column; }
  .stats-grid { gap: 1rem; }
}
