/* ========================================
   ML Interview Blogs - Modern Reading Theme
   ======================================== */

/* Premium font stack: IBM Plex for readability, Fira Code for code */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700&family=IBM+Plex+Serif:ital,wght@0,400;0,500;0,600;1,400&family=Fira+Code:wght@400;500;600&display=swap');

:root {
  /* Core palette - Deep navy with warm accents */
  --bg-primary: #0c1222;
  --bg-secondary: #111827;
  --bg-tertiary: #1a2332;
  --bg-elevated: #1f2937;
  
  /* Accent colors - Teal and coral */
  --accent-primary: #14b8a6;
  --accent-secondary: #f97316;
  --accent-tertiary: #8b5cf6;
  --accent-success: #22c55e;
  --accent-warning: #eab308;
  
  /* Text colors - Optimized for reading */
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-body: #e2e8f0;
  --text-muted: #94a3b8;
  --text-inverse: #0c1222;
  
  /* Border and divider */
  --border-primary: #1e293b;
  --border-subtle: #334155;
  --border-accent: rgba(20, 184, 166, 0.3);
  
  /* Gradients */
  --gradient-hero: linear-gradient(135deg, #14b8a6 0%, #8b5cf6 50%, #f97316 100%);
  --gradient-card: linear-gradient(145deg, rgba(20,184,166,0.06) 0%, rgba(139,92,246,0.06) 100%);
  --gradient-glow: radial-gradient(ellipse at center, rgba(20,184,166,0.12) 0%, transparent 70%);
  
  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.25);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.35);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.45);
  --shadow-glow: 0 0 40px rgba(20,184,166,0.15);
  
  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  
  /* Border radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  
  /* Typography - Premium readable fonts */
  --font-sans: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif: 'IBM Plex Serif', Georgia, 'Times New Roman', serif;
  --font-mono: 'Fira Code', 'SF Mono', 'Monaco', 'Consolas', monospace;
  
  /* Font sizes - Fluid typography scale */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  
  /* Line heights for optimal readability */
  --leading-tight: 1.25;
  --leading-snug: 1.4;
  --leading-normal: 1.6;
  --leading-relaxed: 1.75;
  --leading-loose: 2;
  
  /* Letter spacing */
  --tracking-tight: -0.025em;
  --tracking-normal: 0;
  --tracking-wide: 0.025em;
  --tracking-wider: 0.05em;
  
  /* Animation */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-size: 16px;
}

@media (min-width: 1200px) {
  html {
    font-size: 17px;
  }
}

body {
  font-family: var(--font-sans);
  font-weight: 400;
  background: var(--bg-primary);
  color: var(--text-body);
  line-height: var(--leading-relaxed);
  min-height: 100vh;
  letter-spacing: var(--tracking-normal);
}

/* Layout Container */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

/* ========================================
   Header & Navigation
   ======================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(12, 18, 34, 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-primary);
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-lg) 0;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  text-decoration: none;
}

.nav-logo__icon {
  width: 44px;
  height: 44px;
  background: var(--gradient-hero);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: var(--text-lg);
  color: var(--text-inverse);
  font-family: var(--font-sans);
}

.nav-logo__text {
  font-weight: 600;
  font-size: var(--text-xl);
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: var(--tracking-tight);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: var(--text-sm);
  text-decoration: none;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  letter-spacing: var(--tracking-wide);
}

.nav-links a:hover {
  color: var(--text-primary);
  background: var(--bg-tertiary);
}

.nav-github {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md) !important;
  background: var(--bg-tertiary) !important;
  border: 1px solid var(--border-primary);
}

.nav-github:hover {
  border-color: var(--accent-primary) !important;
}

/* Theme Toggle Button */
.theme-toggle {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-sm);
  padding: var(--space-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  width: 40px;
  height: 40px;
}

.theme-toggle:hover {
  background: var(--bg-elevated);
  border-color: var(--accent-primary);
  color: var(--text-primary);
  transform: scale(1.05);
}

.theme-icon {
  position: absolute;
  transition: opacity var(--transition-base), transform var(--transition-base);
}

.theme-icon-sun {
  opacity: 0;
  transform: rotate(90deg);
}

.theme-icon-moon {
  opacity: 1;
  transform: rotate(0deg);
}

[data-theme="light"] .theme-icon-sun {
  opacity: 1;
  transform: rotate(0deg);
}

[data-theme="light"] .theme-icon-moon {
  opacity: 0;
  transform: rotate(-90deg);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

/* Light Mode Variables */
[data-theme="light"] {
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;
  --bg-elevated: #e2e8f0;
  
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-body: #1e293b;
  --text-muted: #64748b;
  --text-inverse: #ffffff;
  
  --border-primary: #e2e8f0;
  --border-subtle: #cbd5e1;
  --border-accent: rgba(20, 184, 166, 0.2);
  
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.12);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.16);
  --shadow-glow: 0 0 40px rgba(20,184,166,0.08);
  
  --gradient-glow: radial-gradient(ellipse at center, rgba(20,184,166,0.06) 0%, transparent 70%);
}

[data-theme="light"] .article-content tr:nth-child(even) {
  background: rgba(241, 245, 249, 0.8);
}

[data-theme="light"] .article-content code {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

[data-theme="light"] .article-content pre {
  background: var(--bg-secondary);
  border-color: var(--border-primary);
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
  position: relative;
  padding: var(--space-3xl) 0;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-glow);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(139,92,246,0.08) 0%, transparent 60%);
  pointer-events: none;
}

.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: var(--space-3xl);
  align-items: center;
}

.hero__content {
  max-width: 720px;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  background: rgba(20, 184, 166, 0.1);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--accent-primary);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  margin-bottom: var(--space-lg);
}

.hero__eyebrow::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--accent-primary);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.hero__title {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: var(--leading-tight);
  margin-bottom: var(--space-lg);
  letter-spacing: var(--tracking-tight);
  color: var(--text-primary);
}

.hero__title span {
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__subtitle {
  font-size: var(--text-xl);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-xl);
  font-weight: 400;
}

/* Search Bar */
.search-wrapper {
  position: relative;
  max-width: 560px;
}

.search-bar {
  display: flex;
  background: var(--bg-secondary);
  border: 2px solid var(--border-primary);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-fast);
}

.search-bar:focus-within {
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-glow);
}

.search-bar input {
  flex: 1;
  padding: var(--space-lg) var(--space-xl);
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: var(--text-base);
  font-family: var(--font-sans);
  font-weight: 400;
}

.search-bar input::placeholder {
  color: var(--text-muted);
}

.search-bar input:focus {
  outline: none;
}

.search-bar button {
  padding: var(--space-lg) var(--space-xl);
  background: var(--accent-primary);
  border: none;
  color: var(--text-inverse);
  font-weight: 600;
  font-size: var(--text-sm);
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all var(--transition-fast);
  letter-spacing: var(--tracking-wide);
}

.search-bar button:hover {
  background: #0d9488;
}

/* Stats Cards */
.hero__stats {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.stat-card {
  background: var(--gradient-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  text-align: center;
  transition: all var(--transition-base);
}

.stat-card:hover {
  border-color: var(--accent-primary);
  transform: translateY(-2px);
}

.stat-card__value {
  display: block;
  font-size: var(--text-4xl);
  font-weight: 700;
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: var(--leading-tight);
  font-family: var(--font-sans);
}

.stat-card__label {
  font-size: var(--text-sm);
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  margin-top: var(--space-xs);
}

/* ========================================
   Filter Section
   ======================================== */
.subcategory-filter-section {
  margin-top: var(--space-xl);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--border-primary);
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.subcategory-filter-section h3 {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.subcategory-filter-section #subcategoryFilterHint {
  color: var(--text-muted);
  font-size: var(--text-sm);
  margin-top: var(--space-xs);
}

/* ========================================
   Filter Section
   ======================================== */
.filter-section {
  padding: var(--space-2xl) 0;
  border-bottom: 1px solid var(--border-primary);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-lg);
}

.section-header h2 {
  font-size: var(--text-2xl);
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: var(--tracking-tight);
}

.section-header p {
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.section-header kbd {
  display: inline-block;
  padding: 2px 6px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.filter-hint {
  width: 100%;
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
}

.chip {
  padding: var(--space-sm) var(--space-lg);
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: var(--text-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: var(--font-sans);
  user-select: none;
}

.chip:hover {
  background: var(--bg-tertiary);
  border-color: var(--border-subtle);
  color: var(--text-primary);
}

.chip.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: var(--text-inverse);
}

/* Multi-select indicator */
.chip.active::before {
  content: '✓ ';
  font-size: 0.8em;
}

/* ========================================
   Articles Grid
   ======================================== */
.articles-section {
  padding: var(--space-2xl) 0 var(--space-3xl);
}

.articles-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-xl);
}

.articles-header h2 {
  font-size: var(--text-2xl);
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: var(--tracking-tight);
}

#resultCount {
  color: var(--text-muted);
  font-size: var(--text-sm);
  font-weight: 500;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: var(--space-xl);
}

/* Category Block */
.category-block {
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-base);
}

.category-block:hover {
  border-color: var(--accent-primary);
  box-shadow: 0 0 40px rgba(20, 184, 166, 0.08);
  transform: translateY(-4px);
}

.category-block__header {
  padding: var(--space-lg) var(--space-xl);
  background: var(--gradient-card);
  border-bottom: 1px solid var(--border-primary);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.category-block__header h3 {
  font-size: var(--text-lg);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--text-primary);
  letter-spacing: var(--tracking-tight);
}

.category-block__header h3::before {
  content: '';
  width: 4px;
  height: 24px;
  background: var(--accent-primary);
  border-radius: 2px;
}

.category-block__count {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-md);
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  color: var(--text-muted);
  font-weight: 500;
}

.category-block__articles {
  padding: var(--space-md) 0;
}

/* Subcategory Grouping */
.subcategory-group {
  margin-bottom: var(--space-lg);
}

.subcategory-group:last-child {
  margin-bottom: 0;
}

.subcategory-header {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--accent-tertiary);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  padding: var(--space-sm) var(--space-xl);
  margin-bottom: var(--space-sm);
  border-bottom: 1px solid var(--border-subtle);
  font-family: var(--font-sans);
}

.subcategory-articles {
  padding-left: var(--space-md);
}

.subcategory-more {
  padding: var(--space-sm) var(--space-xl);
  margin-top: var(--space-xs);
}

.subcategory-more a {
  color: var(--accent-primary);
  font-size: var(--text-sm);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition-fast);
}

.subcategory-more a:hover {
  color: var(--accent-secondary);
  text-decoration: underline;
}

/* Article Item */
.article-item {
  padding: var(--space-md) var(--space-xl);
  border-left: 3px solid transparent;
  transition: all var(--transition-fast);
}

.article-item:hover {
  background: var(--bg-tertiary);
  border-left-color: var(--accent-primary);
}

.article-item a {
  display: block;
  color: var(--text-body);
  font-weight: 500;
  font-size: var(--text-base);
  text-decoration: none;
  margin-bottom: var(--space-xs);
  transition: color var(--transition-fast);
  line-height: var(--leading-snug);
}

.article-item:hover a {
  color: var(--accent-primary);
}

.article-item__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.article-item__meta .subcategory {
  padding: 2px var(--space-sm);
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--accent-tertiary);
}

.show-more-link {
  padding: var(--space-md) var(--space-xl);
  text-align: center;
  border-top: 1px solid var(--border-primary);
}

.show-more-link a {
  color: var(--accent-primary);
  font-weight: 600;
  text-decoration: none;
  font-size: var(--text-sm);
}

.show-more-link a:hover {
  text-decoration: underline;
}

/* Loading & Empty States */
.loading {
  grid-column: 1 / -1;
  text-align: center;
  padding: var(--space-3xl);
  color: var(--text-muted);
  font-size: var(--text-base);
}

.loading::after {
  content: '';
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 3px solid var(--border-primary);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-left: var(--space-md);
  vertical-align: middle;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: var(--space-3xl);
  background: var(--bg-secondary);
  border: 1px dashed var(--border-primary);
  border-radius: var(--radius-lg);
}

.empty-state h3 {
  font-size: var(--text-xl);
  font-weight: 600;
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
}

.empty-state p {
  color: var(--text-muted);
  font-size: var(--text-base);
}

/* ========================================
   Footer
   ======================================== */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-primary);
  padding: var(--space-2xl) 0;
  text-align: center;
}

.footer__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
}

.footer__logo {
  font-weight: 600;
  font-size: var(--text-lg);
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer__links {
  display: flex;
  gap: var(--space-lg);
}

.footer__links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: var(--text-sm);
  transition: color var(--transition-fast);
}

.footer__links a:hover {
  color: var(--accent-primary);
}

.footer__copyright {
  color: var(--text-muted);
  font-size: var(--text-sm);
}

/* ========================================
   Article View Page
   ======================================== */
.article-view {
  max-width: 800px;
  margin: 0 auto;
  padding: var(--space-2xl) var(--space-xl);
}

.article-header {
  margin-bottom: var(--space-2xl);
  padding-bottom: var(--space-xl);
  border-bottom: 1px solid var(--border-primary);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
  font-size: var(--text-sm);
}

.breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.breadcrumb a:hover {
  color: var(--accent-primary);
}

.breadcrumb span {
  color: var(--text-muted);
}

.article-header h1 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  line-height: var(--leading-snug);
  margin-bottom: var(--space-md);
  color: var(--text-primary);
  letter-spacing: var(--tracking-tight);
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.article-meta__item {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.article-meta .pill {
  padding: var(--space-xs) var(--space-md);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-full);
  font-weight: 500;
  font-size: var(--text-sm);
}

/* ========================================
   Article Content - Optimized for Reading
   ======================================== */
.article-content {
  font-size: var(--text-lg);
  line-height: var(--leading-loose);
  color: var(--text-body);
}

/* Headings with clear hierarchy */
.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
  color: var(--text-primary);
  font-weight: 600;
  line-height: var(--leading-snug);
  margin: var(--space-2xl) 0 var(--space-md);
  letter-spacing: var(--tracking-tight);
}

.article-content h1 { 
  font-size: var(--text-3xl); 
  font-weight: 700;
}

.article-content h2 { 
  font-size: var(--text-2xl);
  border-bottom: 1px solid var(--border-primary); 
  padding-bottom: var(--space-sm); 
}

.article-content h3 { 
  font-size: var(--text-xl); 
}

.article-content h4 { 
  font-size: var(--text-lg); 
}

/* Paragraphs with comfortable spacing */
.article-content p {
  margin-bottom: var(--space-lg);
  font-weight: 400;
}

/* Links */
.article-content a {
  color: var(--accent-primary);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: all var(--transition-fast);
}

.article-content a:hover {
  color: #0d9488;
  text-decoration-thickness: 2px;
}

/* Emphasis */
.article-content strong {
  color: var(--text-primary);
  font-weight: 600;
}

.article-content em {
  font-style: italic;
  color: var(--text-secondary);
}

/* Lists with proper spacing */
.article-content ul,
.article-content ol {
  margin-bottom: var(--space-lg);
  padding-left: var(--space-xl);
}

.article-content li {
  margin-bottom: var(--space-sm);
  line-height: var(--leading-relaxed);
}

.article-content li::marker {
  color: var(--accent-primary);
}

/* Nested lists */
.article-content li > ul,
.article-content li > ol {
  margin-top: var(--space-sm);
  margin-bottom: 0;
}

/* Code - Inline */
.article-content code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--bg-tertiary);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  color: var(--accent-secondary);
  font-weight: 500;
}

/* Code - Blocks */
.article-content pre {
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  overflow-x: auto;
  margin: var(--space-xl) 0;
}

.article-content pre code {
  background: none;
  padding: 0;
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  font-weight: 400;
}

/* Blockquotes */
.article-content blockquote {
  margin: var(--space-xl) 0;
  padding: var(--space-lg) var(--space-xl);
  background: var(--bg-tertiary);
  border-left: 4px solid var(--accent-primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  color: var(--text-secondary);
  font-style: italic;
  font-size: var(--text-base);
}

.article-content blockquote p:last-child {
  margin-bottom: 0;
}

/* Tables */
.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-xl) 0;
  font-size: var(--text-base);
}

.article-content th,
.article-content td {
  padding: var(--space-md);
  text-align: left;
  border: 1px solid var(--border-primary);
  line-height: var(--leading-normal);
}

.article-content th {
  background: var(--bg-tertiary);
  font-weight: 600;
  color: var(--text-primary);
}

.article-content tr:nth-child(even) {
  background: rgba(30, 41, 59, 0.5);
}

/* Images */
.article-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  margin: var(--space-xl) 0;
  border: 1px solid var(--border-primary);
  display: block;
}

.article-content figure {
  margin: var(--space-2xl) 0;
}

.article-content figcaption {
  text-align: center;
  color: var(--text-muted);
  font-size: var(--text-sm);
  margin-top: var(--space-sm);
  font-style: italic;
}

/* Horizontal Rule */
.article-content hr {
  border: none;
  height: 1px;
  background: var(--border-primary);
  margin: var(--space-2xl) 0;
}

/* Back Button */
.btn-back {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  margin-top: var(--space-2xl);
  padding: var(--space-md) var(--space-xl);
  background: var(--accent-primary);
  color: var(--text-inverse);
  text-decoration: none;
  font-weight: 600;
  font-size: var(--text-sm);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.btn-back:hover {
  background: #0d9488;
  transform: translateX(-4px);
}

.btn-back svg {
  width: 18px;
  height: 18px;
}

/* ========================================
   Syntax Highlighting
   ======================================== */
.article-content pre code .keyword { color: #f472b6; }
.article-content pre code .string { color: #86efac; }
.article-content pre code .number { color: #93c5fd; }
.article-content pre code .comment { color: #6b7280; font-style: italic; }
.article-content pre code .function { color: #c4b5fd; }
.article-content pre code .class-name { color: #fbbf24; }
.article-content pre code .operator { color: #f472b6; }

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 1024px) {
  .hero__inner {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }
  
  .hero__stats {
    flex-direction: row;
    justify-content: center;
  }
  
  .stat-card {
    flex: 1;
    max-width: 200px;
  }
  
  .category-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  html {
    font-size: 15px;
  }
  
  .container {
    padding: 0 var(--space-md);
  }
  
  .nav {
    flex-direction: column;
    gap: var(--space-md);
    text-align: center;
  }
  
  .hero {
    padding: var(--space-2xl) 0;
  }
  
  .hero__title {
    font-size: var(--text-3xl);
  }
  
  .hero__subtitle {
    font-size: var(--text-base);
  }
  
  .search-bar {
    flex-direction: column;
  }
  
  .search-bar input,
  .search-bar button {
    width: 100%;
  }
  
  .filter-chips {
    justify-content: center;
  }
  
  .stat-card {
    padding: var(--space-lg);
  }
  
  .stat-card__value {
    font-size: var(--text-3xl);
  }
  
  .article-view {
    padding: var(--space-lg);
  }
  
  .article-content {
    font-size: var(--text-base);
  }
}

@media (max-width: 480px) {
  .hero__stats {
    flex-direction: column;
  }
  
  .stat-card {
    max-width: none;
  }
  
  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* ========================================
   Utilities
   ======================================== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-gradient {
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Dark scrollbar */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--bg-elevated);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Selection */
::selection {
  background: var(--accent-primary);
  color: var(--text-inverse);
}
