/* ===== DESIGN TOKENS ===== */
:root {
  --bg-primary: #0d1117;
  --bg-secondary: #161b22;
  --bg-tertiary: #21262d;
  --bg-card: #1c2128;
  --bg-hover: #292e36;
  --text-primary: #e6edf3;
  --text-secondary: #8b949e;
  --text-muted: #6e7681;
  --border: #30363d;
  --border-active: #58a6ff;
  --accent-blue: #58a6ff;
  --accent-purple: #bc8cff;
  --accent-green: #3fb950;
  --accent-orange: #d29922;
  --accent-red: #f85149;
  --accent-cyan: #39d2c0;
  --accent-pink: #f778ba;
  --gradient-hero: linear-gradient(135deg, #0d1117 0%, #1a1f36 50%, #161b22 100%);
  --gradient-accent: linear-gradient(135deg, #58a6ff, #bc8cff);
  --gradient-accent-vivid: linear-gradient(135deg, #58a6ff, #a78bfa, #f472b6);
  --gradient-card-border: linear-gradient(135deg, rgba(88,166,255,0.4), rgba(188,140,255,0.4));
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 20px rgba(88,166,255,0.15);
  --shadow-glow-lg: 0 0 40px rgba(88,166,255,0.2), 0 0 80px rgba(188,140,255,0.1);
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --sidebar-width: 260px;
  --toc-width: 180px;
  --header-height: 60px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 24px);
  font-size: 15px;
}

body {
  font-family: var(--font-primary);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--accent-blue); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-purple); }

h1,h2,h3,h4,h5 { font-weight: 700; line-height: 1.35; }
h1 { font-size: 2.2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.15rem; }
h4 { font-size: 1rem; }
img { max-width: 100%; border-radius: var(--radius-md); }
code { font-family: var(--font-mono); }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(88,166,255,0.2); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(88,166,255,0.4); }

/* ===== HEADER ===== */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-height);
  background: rgba(13,17,23,0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 1000;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--text-primary);
  text-decoration: none;
}

.header-logo .logo-icon {
  width: 30px; height: 30px;
  background: var(--gradient-accent);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Search */
.search-box {
  position: relative;
  width: 260px;
}

.search-box input {
  width: 100%;
  padding: 7px 12px 7px 34px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.82rem;
  font-family: var(--font-primary);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.search-box input:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(88,166,255,0.12);
}

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

.search-box .search-icon {
  position: absolute;
  left: 10px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.82rem;
  pointer-events: none;
}

.search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  max-height: 360px;
  overflow-y: auto;
  display: none;
  z-index: 1100;
  box-shadow: var(--shadow-lg);
}

.search-results.show { display: block; }

.search-result-item {
  padding: 10px 14px;
  font-size: 0.84rem;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--bg-hover); }

.search-result-item .result-section {
  font-size: 0.7rem;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(88,166,255,0.12);
  color: var(--accent-blue);
  white-space: nowrap;
}

/* Language Toggle */
.lang-toggle {
  display: flex;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.lang-btn {
  padding: 6px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  font-family: var(--font-primary);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.lang-btn:first-child { border-right: 1px solid var(--border); }

.lang-btn.active {
  background: rgba(88,166,255,0.15);
  color: var(--accent-blue);
}

.lang-btn:hover:not(.active) {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.3rem;
  cursor: pointer;
  padding: 4px;
}

/* ===== SIDEBAR ===== */
.sidebar {
  position: fixed;
  top: var(--header-height);
  left: 0;
  width: var(--sidebar-width);
  height: calc(100vh - var(--header-height));
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  padding: 12px 0;
  z-index: 900;
  transition: transform var(--transition);
}

.sidebar-section { margin-bottom: 2px; }

.sidebar-section-title {
  padding: 8px 18px 4px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-muted);
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 18px;
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 400;
  transition: var(--transition);
  border-left: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
}

.sidebar-link:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.sidebar-link.active {
  color: var(--accent-blue);
  background: rgba(88,166,255,0.08);
  border-left-color: var(--accent-blue);
  font-weight: 600;
  box-shadow: inset 2px 0 8px rgba(88,166,255,0.08);
}

.sidebar-link .nav-icon {
  font-size: 0.9rem;
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}

.sidebar-link.sub {
  padding-left: 42px;
  font-size: 0.79rem;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 899;
}

.sidebar-overlay.show { display: block; }

/* ===== MAIN LAYOUT ===== */
.main-wrapper {
  margin-left: var(--sidebar-width);
  margin-top: var(--header-height);
  display: flex;
  min-height: calc(100vh - var(--header-height));
}

.main-content {
  flex: 1;
  min-width: 0;
  padding: 32px 48px 80px;
}

/* ===== TOC (Right sidebar) ===== */
.toc-panel {
  width: var(--toc-width);
  flex-shrink: 0;
  position: sticky;
  top: var(--header-height);
  height: calc(100vh - var(--header-height));
  overflow-y: auto;
  padding: 20px 12px;
  border-left: 1px solid var(--border);
}

.toc-panel.toc-hidden {
  display: none;
}

.main-wrapper.no-toc .main-content {
  max-width: 900px;
  margin: 0 auto;
}

.toc-title {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.toc-link {
  display: block;
  padding: 3px 0;
  font-size: 0.74rem;
  color: var(--text-secondary);
  transition: color var(--transition);
  border-left: 2px solid transparent;
  padding-left: 10px;
  text-decoration: none;
  cursor: pointer;
}

.toc-link:hover { color: var(--accent-blue); }

.toc-link.active {
  color: var(--accent-blue);
  border-left-color: var(--accent-blue);
}

.toc-link.level-3 { padding-left: 22px; font-size: 0.74rem; }

/* ===== BREADCRUMB ===== */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.breadcrumb a { color: var(--text-secondary); }
.breadcrumb a:hover { color: var(--accent-blue); }
.breadcrumb .sep { color: var(--text-muted); }

/* ===== ARTICLE CONTENT ===== */
.article-title {
  font-size: 2.1rem;
  font-weight: 800;
  margin-bottom: 10px;
  background: var(--gradient-accent-vivid);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% auto;
  animation: gradientShift 4s ease-in-out infinite;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% center; }
  50% { background-position: 100% center; }
}

.article-subtitle {
  color: var(--text-secondary);
  font-size: 1.02rem;
  margin-bottom: 18px;
  line-height: 1.65;
}

.source-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  background: rgba(88,166,255,0.08);
  border: 1px solid rgba(88,166,255,0.25);
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--accent-blue);
  margin-bottom: 28px;
  transition: var(--transition);
  box-shadow: 0 0 12px rgba(88,166,255,0.06);
}

.source-link:hover {
  background: rgba(88,166,255,0.15);
  border-color: var(--accent-blue);
  color: var(--accent-blue);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(88,166,255,0.15);
}

.article-body h2 {
  margin-top: 40px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.article-body h3 {
  margin-top: 28px;
  margin-bottom: 12px;
  color: var(--accent-blue);
}

.article-body h4 {
  margin-top: 20px;
  margin-bottom: 8px;
}

.article-body p {
  margin-bottom: 16px;
  color: var(--text-secondary);
  line-height: 1.75;
}

.article-body ul, .article-body ol {
  margin-bottom: 16px;
  padding-left: 24px;
}

.article-body li {
  margin-bottom: 6px;
  color: var(--text-secondary);
  line-height: 1.65;
}

.article-body strong { color: var(--text-primary); }

.article-body img {
  margin: 20px 0;
  border: 1px solid var(--border);
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.article-body img:hover {
  border-color: rgba(88,166,255,0.3);
  box-shadow: 0 4px 20px rgba(88,166,255,0.1);
  transform: scale(1.005);
}

/* Inline code */
.article-body code:not(pre code) {
  background: var(--bg-tertiary);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.85em;
  color: var(--accent-cyan);
  border: 1px solid var(--border);
}

/* Code blocks */
.code-block {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin: 16px 0;
  overflow: hidden;
}

.code-block-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 14px;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border);
  font-size: 0.72rem;
  color: var(--text-muted);
}

.code-block pre {
  padding: 14px 16px;
  overflow-x: auto;
  margin: 0;
}

.code-block code {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--text-primary);
}

.btn-copy {
  padding: 3px 10px;
  font-size: 0.7rem;
  font-weight: 500;
  font-family: var(--font-primary);
  background: var(--bg-hover);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.btn-copy:hover { border-color: var(--accent-blue); color: var(--accent-blue); }
.btn-copy.copied { border-color: var(--accent-green); color: var(--accent-green); }

/* ===== CALLOUT BOXES ===== */
.callout {
  padding: 14px 18px;
  border-radius: var(--radius-md);
  margin: 16px 0;
  border-left: 3px solid;
  font-size: 0.88rem;
}

.callout-info {
  background: rgba(88,166,255,0.06);
  border-color: var(--accent-blue);
}

.callout-tip {
  background: rgba(63,185,80,0.06);
  border-color: var(--accent-green);
}

.callout-warning {
  background: rgba(210,153,34,0.06);
  border-color: var(--accent-orange);
}

.callout-title {
  font-weight: 700;
  margin-bottom: 4px;
  font-size: 0.82rem;
}

.callout p { margin-bottom: 4px; }

/* ===== KEYBOARD SHORTCUT ===== */
kbd {
  display: inline-block;
  padding: 2px 6px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 4px;
  box-shadow: 0 1px 0 var(--border);
  color: var(--text-secondary);
}

/* ===== NAV BUTTONS ===== */
.nav-buttons {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.nav-btn {
  display: flex;
  flex-direction: column;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  cursor: pointer;
  min-width: 180px;
}

.nav-btn:hover {
  border-color: rgba(88,166,255,0.4);
  box-shadow: 0 4px 20px rgba(88,166,255,0.1);
  transform: translateY(-2px);
  background: linear-gradient(135deg, var(--bg-card), rgba(88,166,255,0.03));
}

.nav-btn-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.nav-btn-title { font-weight: 600; font-size: 0.9rem; }

.nav-btn.next { align-items: flex-end; text-align: right; }

/* ===== BACK TO TOP ===== */
.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 40px; height: 40px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-primary);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transform: translateY(10px);
  transition: var(--transition);
  z-index: 800;
}

.back-to-top.show { opacity: 1; transform: translateY(0); }
.back-to-top:hover { border-color: var(--accent-blue); background: var(--bg-hover); }

/* ===== HERO (Home page) ===== */
.hero {
  text-align: center;
  padding: 72px 20px 56px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle at 30% 40%, rgba(88,166,255,0.08) 0%, transparent 50%),
    radial-gradient(circle at 70% 60%, rgba(188,140,255,0.07) 0%, transparent 50%),
    radial-gradient(circle at 50% 20%, rgba(244,114,182,0.04) 0%, transparent 40%);
  animation: heroFloat 15s ease-in-out infinite;
}

@keyframes heroFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(-2%, 1%) scale(1.02); }
  66% { transform: translate(1%, -1%) scale(0.99); }
}

.hero-content { position: relative; z-index: 1; max-width: 700px; margin: 0 auto; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 18px;
  background: rgba(88,166,255,0.1);
  border: 1px solid rgba(88,166,255,0.3);
  border-radius: 999px;
  font-size: 0.78rem;
  color: var(--accent-blue);
  font-weight: 600;
  margin-bottom: 22px;
  box-shadow: 0 0 20px rgba(88,166,255,0.08);
  animation: badgePulse 3s ease-in-out infinite;
}

@keyframes badgePulse {
  0%, 100% { box-shadow: 0 0 20px rgba(88,166,255,0.08); }
  50% { box-shadow: 0 0 30px rgba(88,166,255,0.15); }
}

.hero h1 {
  background: var(--gradient-accent-vivid);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% auto;
  margin-bottom: 16px;
  font-size: 3rem;
  letter-spacing: -0.5px;
  animation: gradientShift 4s ease-in-out infinite;
}

.hero-desc {
  color: var(--text-secondary);
  font-size: 1.08rem;
  max-width: 560px;
  margin: 0 auto 32px;
  line-height: 1.75;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.stat-item:hover {
  background: rgba(88,166,255,0.05);
  transform: translateY(-2px);
}

.stat-number {
  font-size: 2.4rem;
  font-weight: 800;
  background: var(--gradient-accent-vivid);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% auto;
  animation: gradientShift 4s ease-in-out infinite;
  line-height: 1.2;
}

.stat-label {
  font-size: 0.74rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
  font-weight: 500;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 24px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  border: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: var(--font-primary);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s;
}

.btn:hover::after {
  transform: translateX(100%);
}

.btn-primary {
  background: var(--gradient-accent);
  color: #fff;
  box-shadow: 0 2px 12px rgba(88,166,255,0.2);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(88,166,255,0.3);
  color: #fff;
}

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--accent-blue);
  color: var(--accent-blue);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(88,166,255,0.1);
}

/* ===== FEATURE CARDS ===== */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin: 28px 0;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--gradient-accent);
  opacity: 0;
  transition: opacity 0.35s;
}

.feature-card:hover {
  border-color: rgba(88,166,255,0.3);
  box-shadow: 0 8px 32px rgba(88,166,255,0.12), 0 0 0 1px rgba(88,166,255,0.1);
  transform: translateY(-4px);
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(88,166,255,0.03) 100%);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-card h4 { margin-bottom: 8px; }
.feature-card p { color: var(--text-secondary); font-size: 0.85rem; margin: 0; line-height: 1.6; }

/* ===== TABLE ===== */
.article-body table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin: 16px 0;
}

.article-body th {
  background: var(--bg-tertiary);
  padding: 10px 14px;
  text-align: left;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
}

.article-body td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 0.86rem;
}

.article-body tr:last-child td { border-bottom: none; }
.article-body tr:hover td { background: var(--bg-hover); }

/* ===== FADE-IN ANIMATION ===== */
.fade-in {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== LOADING INDICATOR ===== */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.loading::before {
  content: '';
  width: 20px; height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--accent-blue);
  border-radius: 50%;
  margin-right: 12px;
  animation: spin 0.8s linear infinite;
}

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

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
  .toc-panel { display: none; }
}

@media (max-width: 1024px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }

  .main-wrapper { margin-left: 0; }
  .main-content { padding: 24px 24px 60px; }

  .mobile-menu-toggle { display: block; }
  .search-box { width: 180px; }
}

@media (max-width: 640px) {
  .search-box { display: none; }
  .hero h1 { font-size: 1.8rem; }
  .article-title { font-size: 1.5rem; }
  .main-content { padding: 16px 16px 48px; }
  .nav-buttons { flex-direction: column; }
  .nav-btn { min-width: auto; }
}
