:root {
  --bg: #050508;
  --bg-elevated: #0a0a12;
  --bg-card: rgba(255,255,255,0.03);
  --surface: rgba(255,255,255,0.04);
  --surface-hover: rgba(255,255,255,0.08);
  --text: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --primary: #6366f1;
  --primary-light: #818cf8;
  --primary-dark: #4f46e5;
  --accent: #8b5cf6;
  --secondary: #06b6d4;
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --gradient-primary: linear-gradient(135deg,var(--primary) 0%,var(--accent) 100%);
  --gradient-glow: radial-gradient(ellipse at top,rgba(99,102,241,0.25),transparent 50%);
  --gradient-text: linear-gradient(135deg,#fff 0%,var(--primary-light) 50%,var(--accent) 100%);
  --border: rgba(255,255,255,0.06);
  --border-strong: rgba(99,102,241,0.3);
  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow: 0 4px 6px -1px rgba(0,0,0,0.4),0 2px 4px -1px rgba(0,0,0,0.2);
  --shadow-md: 0 10px 15px -3px rgba(0,0,0,0.4),0 4px 6px -2px rgba(0,0,0,0.2);
  --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.4),0 10px 10px -5px rgba(0,0,0,0.2);
  --shadow-glow: 0 0 40px rgba(99,102,241,0.2);
  --shadow-glow-lg: 0 0 60px rgba(99,102,241,0.3);
  --header-height: 120px;
  --max-width: 1200px;
  --font-sans: 'Inter',system-ui,-apple-system,sans-serif;
  --transition: 0.2s cubic-bezier(0.4,0,0.2,1);
  --transition-bounce: 0.4s cubic-bezier(0.34,1.56,0.64,1);
  --transition-slow: 0.6s cubic-bezier(0.16,1,0.3,1);
}

[data-theme="light"] {
  --bg: #fafafa;
  --bg-elevated: #ffffff;
  --bg-card: rgba(255,255,255,0.7);
  --surface: rgba(241,245,249,0.6);
  --surface-hover: rgba(241,245,249,0.8);
  --text: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --border: rgba(0,0,0,0.05);
  --border-strong: rgba(99,102,241,0.25);
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 4px 6px -1px rgba(0,0,0,0.08),0 2px 4px -1px rgba(0,0,0,0.04);
  --shadow-md: 0 10px 15px -3px rgba(0,0,0,0.08),0 4px 6px -2px rgba(0,0,0,0.04);
  --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.08),0 10px 10px -5px rgba(0,0,0,0.04);
  --shadow-glow: 0 0 30px rgba(99,102,241,0.15);
  --shadow-glow-lg: 0 0 40px rgba(99,102,241,0.2);
  --gradient-glow: radial-gradient(ellipse at top,rgba(99,102,241,0.1),transparent 50%);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 2rem);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background-image: var(--gradient-glow);
  background-attachment: fixed;
  font-size: 16px;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 100vh;
  background: radial-gradient(circle at 20% 50%,rgba(99,102,241,0.08) 0%,transparent 50%),radial-gradient(circle at 80% 80%,rgba(139,92,246,0.06) 0%,transparent 50%);
  pointer-events: none;
  z-index: 0;
}

::selection {
  background: var(--primary);
  color: #fff;
}

h1,h2,h3,h4 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text);
}

h1 {
  font-size: clamp(2.5rem,6vw,4.5rem);
  margin-bottom: 1.25rem;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

h2 {
  font-size: clamp(1.75rem,4vw,2.75rem);
  margin: 3rem 0 1.25rem;
  position: relative;
  display: inline-block;
}

h2::after {
  content: '';
  position: absolute;
  bottom: -0.5rem;
  left: 0;
  width: 3rem;
  height: 3px;
  background: var(--gradient-primary);
  border-radius: 2px;
}

h3 {
  font-size: clamp(1.25rem,2.5vw,1.75rem);
  margin: 2.5rem 0 1rem;
  font-weight: 600;
  line-height: 1.3;
}

p {
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  line-height: 1.75;
  font-size: 1.0625rem;
  max-width: 70ch;
}

a {
  color: var(--primary-light);
  text-decoration: none;
  transition: color var(--transition);
  font-weight: 500;
}

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

.skip {
  position: fixed;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gradient-primary);
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  z-index: 10000;
  transition: top var(--transition-bounce);
  box-shadow: var(--shadow-glow);
}

.skip:focus {
  top: 1rem;
  outline: 2px solid #fff;
  outline-offset: 4px;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
  position: relative;
  z-index: 1;
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(5,5,8,0.85);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition: all var(--transition);
}

[data-theme="light"] .header {
  background: rgba(250,250,250,0.9);
}

.header.scrolled {
  background: var(--bg-elevated);
  box-shadow: var(--shadow-lg);
  border-bottom-color: transparent;
  height: 100px;
}

.header-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.logo:hover {
  color: var(--text);
}

.logo img {
  height: 100px;
  width: 100px;
  border-radius: 20px;
  object-fit: contain;
  filter: drop-shadow(0 0 15px rgba(99,102,241,0.4));
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  background: var(--bg-card);
  padding: 0.4rem;
  border-radius: 100px;
  border: 1px solid var(--border);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-sm);
}

.nav a {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 100px;
  transition: all var(--transition);
  white-space: nowrap;
  text-decoration: none;
  border-bottom: none;
}

.nav a:hover {
  color: var(--text);
  background: var(--surface-hover);
  transform: translateY(-1px);
}

.nav a.active {
  color: #fff;
  background: var(--gradient-primary);
  box-shadow: 0 4px 15px rgba(99,102,241,0.3);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.theme-toggle,.nav-toggle {
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  position: relative;
}

.theme-toggle:hover,.nav-toggle:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
  background: var(--surface-hover);
  box-shadow: var(--shadow-glow);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 0;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.sun,.moon {
  display: none;
  width: 22px;
  height: 22px;
}

[data-theme="dark"] .sun,[data-theme="light"] .moon {
  display: block;
}

main {
  flex: 1;
  padding-top: calc(var(--header-height) + 3rem);
}

.hero {
  padding: 6rem 0 4rem;
  text-align: center;
  position: relative;
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -20%;
  left: -10%;
  right: -10%;
  height: 140%;
  background: radial-gradient(ellipse at 50% 0%,rgba(99,102,241,0.12) 0%,transparent 60%),radial-gradient(ellipse at 80% 50%,rgba(139,92,246,0.08) 0%,transparent 40%);
  pointer-events: none;
  animation: pulseGlow 10s ease-in-out infinite alternate;
}

@keyframes pulseGlow {
  0% { opacity: 0.6; transform: scale(1); }
  100% { opacity: 1; transform: scale(1.05); }
}

.hero-lead {
  font-size: clamp(1.125rem,2.5vw,1.5rem);
  max-width: 65ch;
  margin: 0 auto 2.5rem;
  color: var(--text-secondary);
  line-height: 1.7;
  opacity: 0;
  animation: fadeInUp 0.8s ease 0.2s forwards;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeInUp 0.8s ease 0.4s forwards;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all var(--transition-bounce);
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  text-decoration: none;
  z-index: 1;
}

.btn-primary {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: 0 4px 20px rgba(99,102,241,0.3),0 0 0 1px rgba(255,255,255,0.1) inset;
}

.btn-primary:hover {
  box-shadow: var(--shadow-glow-lg),0 8px 30px rgba(99,102,241,0.4);
  transform: translateY(-3px);
  color: #fff;
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
  backdrop-filter: blur(20px);
}

.btn-secondary:hover {
  background: var(--surface-hover);
  border-color: var(--primary);
  transform: translateY(-3px);
  color: var(--primary);
  box-shadow: var(--shadow-glow);
}

.section {
  padding: 5rem 0;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
  font-size: clamp(2rem,4vw,2.75rem);
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease,transform 0.6s ease;
}

.section-title.visible {
  opacity: 1;
  transform: translateY(0);
}

.grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit,minmax(300px,1fr));
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all var(--transition-bounce);
  backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
  transform: translateY(0);
  opacity: 0;
  animation: fadeInUp 0.6s ease forwards;
}

.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }
.card:nth-child(5) { animation-delay: 0.5s; }
.card:nth-child(6) { animation-delay: 0.6s; }

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,rgba(99,102,241,0.08) 0%,transparent 60%);
  opacity: 0;
  z-index: -1;
  transition: opacity var(--transition);
}

.card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg,transparent,var(--primary),transparent);
  opacity: 0;
  transition: opacity var(--transition);
}

.card:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-lg),var(--shadow-glow);
}

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

.card:hover::after {
  opacity: 0.5;
}

.card h3 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  transition: color var(--transition);
}

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

.card p {
  margin: 0;
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.7;
  flex-grow: 1;
}

.breadcrumb {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 1.5rem 0 2.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeInUp 0.6s ease 0.2s forwards;
}

.breadcrumb a {
  color: var(--text-secondary);
  padding: 0.4rem 0.875rem;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.875rem;
  font-weight: 600;
  transition: all var(--transition);
  text-decoration: none;
  border-bottom: none;
}

.breadcrumb a:hover {
  color: var(--primary);
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.breadcrumb span {
  padding: 0.4rem 0.875rem;
  color: #fff;
  font-weight: 600;
  background: var(--gradient-primary);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  box-shadow: 0 4px 12px rgba(99,102,241,0.25);
}

.article-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.article-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--transition-bounce);
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  opacity: 0;
  animation: slideInRight 0.5s ease forwards;
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

.article-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--gradient-primary);
  transform: scaleY(0);
  transition: transform var(--transition);
}

.article-item:hover {
  border-color: var(--primary);
  transform: translateX(6px);
  background: var(--surface-hover);
  box-shadow: var(--shadow-md),var(--shadow-glow);
}

.article-item:hover::before {
  transform: scaleY(1);
}

.article-title {
  font-weight: 600;
  color: var(--text);
  font-size: 1.1rem;
  line-height: 1.4;
  transition: all var(--transition);
}

.article-item:hover .article-title {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.875rem;
  background: var(--gradient-primary);
  color: #fff;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(99,102,241,0.25);
  transition: transform var(--transition);
}

.article-item:hover .badge {
  transform: scale(1.05);
}

.filters {
  display: flex;
  gap: 1rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
  padding: 1.25rem;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
  opacity: 0;
  animation: fadeInUp 0.6s ease 0.3s forwards;
}

.input {
  flex: 1;
  min-width: 260px;
  padding: 0.875rem 1.25rem;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  transition: all var(--transition);
  outline: none;
}

.input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.1),var(--shadow-glow);
  transform: translateY(-1px);
}

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

select.input {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236366f1'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m19 9-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1rem;
  padding-right: 3rem;
}

.footer {
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  padding: 4rem 0 2.5rem;
  margin-top: auto;
  position: relative;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-primary);
  opacity: 0.5;
}

.footer-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-logo {
  font-size: 1.75rem;
  font-weight: 800;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
  margin-bottom: 0.25rem;
}

.footer-nav {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-nav a {
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 600;
  position: relative;
  transition: color var(--transition);
  text-decoration: none;
  border-bottom: none;
  padding: 0.25rem 0;
}

.footer-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: width var(--transition);
  border-radius: 2px;
}

.footer-nav a:hover {
  color: var(--primary);
}

.footer-nav a:hover::after {
  width: 100%;
}

.lead {
  font-size: 1.375rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  max-width: 75ch;
  font-weight: 400;
  opacity: 0;
  animation: fadeInUp 0.8s ease 0.2s forwards;
}

.platform-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin: 2rem 0;
  border-left: 4px solid var(--primary);
  transition: all var(--transition-bounce);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.platform-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg,var(--primary),transparent);
  opacity: 0;
  transition: opacity var(--transition);
}

.platform-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md),var(--shadow-glow);
  border-color: var(--border-strong);
}

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

.platform-card h4 {
  margin: 0 0 0.75rem;
  color: var(--text);
  font-size: 1.35rem;
  font-weight: 700;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.platform-card p {
  margin: 0;
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.callout {
  background: linear-gradient(135deg,var(--surface),var(--bg-card));
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin: 2.5rem 0;
  backdrop-filter: blur(20px);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.callout::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--gradient-primary);
}

.callout p {
  margin: 0;
  font-size: 1rem;
  color: var(--text-secondary);
  padding-left: 1rem;
  line-height: 1.7;
  position: relative;
  z-index: 1;
}

.article-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 4rem;
  align-items: start;
  margin-bottom: 3rem;
}

.article-content {
  max-width: 100%;
}

.article-content h2 {
  margin-top: 3.5rem;
  font-size: 2rem;
}

.article-content h3 {
  margin-top: 2.5rem;
  font-size: 1.4rem;
  color: var(--text);
  font-weight: 600;
}

.article-content p {
  margin-bottom: 1.5rem;
  font-size: 1.0625rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

.article-content ul,.article-content ol {
  margin: 1.5rem 0 1.5rem 1.5rem;
  color: var(--text-secondary);
}

.article-content li {
  margin-bottom: 0.75rem;
  line-height: 1.7;
  font-size: 1.0625rem;
}

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

.toc {
  position: sticky;
  top: calc(var(--header-height) + 1.5rem);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  backdrop-filter: blur(20px);
  height: fit-content;
  max-height: calc(100vh - var(--header-height) - 3rem);
  overflow-y: auto;
  box-shadow: var(--shadow);
  transition: all var(--transition);
}

.toc:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

.toc-title {
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 1.25rem;
  color: var(--text);
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--border);
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.toc ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.toc a {
  color: var(--text-muted);
  font-size: 0.9rem;
  display: block;
  padding: 0.625rem 1rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  line-height: 1.5;
  border-left: 3px solid transparent;
  text-decoration: none;
  border-bottom: none;
  font-weight: 500;
}

.toc a:hover,.toc a:focus {
  color: var(--primary);
  background: var(--surface);
  padding-left: 1.25rem;
  border-left-color: var(--primary);
}

.grid-2,.grid-3 {
  display: grid;
  gap: 1.5rem;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit,minmax(320px,1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit,minmax(280px,1fr));
}

.comparison-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin: 2rem 0;
}

.info-row {
  display: flex;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
  align-items: flex-start;
  flex-wrap: wrap;
}

.info-label {
  font-weight: 700;
  color: var(--text);
  min-width: 140px;
  font-size: 1rem;
}

textarea.input {
  resize: vertical;
  min-height: 140px;
  line-height: 1.6;
}

.note {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-top: 2.5rem;
  padding: 1.5rem;
  background: var(--surface);
  border-radius: var(--radius);
  border-left: 4px solid var(--primary);
  line-height: 1.7;
  box-shadow: var(--shadow-sm);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(280px,1fr));
  gap: 1.5rem;
  margin: 2.5rem 0;
}

.info-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all var(--transition-bounce);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}

.info-box:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md),var(--shadow-glow);
  border-color: var(--border-strong);
}

.info-icon {
  width: 48px;
  height: 48px;
  background: var(--gradient-primary);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  color: #fff;
  box-shadow: var(--shadow-glow);
  font-size: 1.5rem;
  transition: transform var(--transition);
}

.info-box:hover .info-icon {
  transform: scale(1.1) rotate(5deg);
}

.info-box h3 {
  margin: 0 0 0.75rem;
  font-size: 1.25rem;
  font-weight: 700;
}

.info-box p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

kbd {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.15em 0.5em;
  font-size: 0.875em;
  font-family: monospace;
  color: var(--text-secondary);
  box-shadow: 0 2px 0 var(--border);
  font-weight: 600;
}

strong {
  color: var(--text);
  font-weight: 600;
}

blockquote {
  border-left: 4px solid var(--primary);
  padding: 1.5rem 1.5rem 1.5rem 2rem;
  margin: 2rem 0;
  font-style: italic;
  color: var(--text-secondary);
  background: var(--bg-card);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 1.1rem;
  line-height: 1.8;
  border: 1px solid var(--border);
  border-left-width: 4px;
  box-shadow: var(--shadow);
}

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

code {
  background: var(--surface);
  padding: 0.2em 0.5em;
  border-radius: 4px;
  font-family: 'JetBrains Mono',monospace;
  font-size: 0.9em;
  color: var(--primary-light);
  border: 1px solid var(--border);
  font-weight: 500;
}

pre {
  background: var(--bg-elevated);
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  overflow-x: auto;
  border: 1px solid var(--border);
  margin: 2rem 0;
  box-shadow: var(--shadow);
}

pre code {
  background: none;
  padding: 0;
  color: var(--text);
  border: none;
  font-size: 0.9rem;
  line-height: 1.7;
  font-weight: 400;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 2rem 0;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  font-size: 0.95rem;
  overflow: hidden;
  box-shadow: var(--shadow);
}

th,td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

th {
  font-weight: 700;
  color: var(--text);
  background: var(--surface);
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
}

tr:last-child td {
  border-bottom: none;
}

tr:hover {
  background: var(--surface-hover);
}

.article-content a {
  border-bottom: 1px solid var(--primary);
  padding-bottom: 1px;
  transition: all var(--transition);
  font-weight: 600;
}

.article-content a:hover {
  background: rgba(99,102,241,0.1);
  color: var(--primary);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  border-bottom-color: transparent;
  text-decoration: none;
}

.card:focus-visible,.article-item:focus-visible,.btn:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
}

.footer-tagline {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.loading {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease;
}

.loading.hidden {
  opacity: 0;
  pointer-events: none;
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  box-shadow: var(--shadow-glow);
}

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

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all var(--transition-slow);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.article-meta {
  display: flex;
  gap: 1.25rem;
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  align-items: center;
  opacity: 0;
  animation: fadeInUp 0.6s ease 0.3s forwards;
}

.article-header {
  margin-bottom: 3rem;
}

.faq-item {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.faq-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.faq-item h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.25rem;
  color: var(--text);
  font-weight: 600;
}

.skip:focus {
  top: 1rem;
  box-shadow: 0 0 0 3px rgba(99,102,241,0.3),var(--shadow-glow);
}

.img-wrapper {
  overflow: hidden;
  border-radius: var(--radius);
  position: relative;
}

.img-wrapper img {
  transition: transform var(--transition-bounce);
  width: 100%;
  height: auto;
}

.img-wrapper:hover img {
  transform: scale(1.05);
}

.glass-effect {
  background: var(--bg-card);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--border);
}

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

.hero-blur {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at 50% 30%,rgba(99,102,241,0.15) 0%,transparent 60%);
  z-index: -1;
  pointer-events: none;
  animation: pulseGlow 10s ease-in-out infinite alternate;
}

.article-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  margin: 2rem 0;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  transition: all var(--transition);
}

.article-content img:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-glow-lg),var(--shadow-lg);
}

.article-content h2:first-child {
  margin-top: 0;
}

.toc::-webkit-scrollbar {
  width: 6px;
}

.toc::-webkit-scrollbar-track {
  background: transparent;
}

.toc::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

.toc::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

.article-content a {
  word-break: break-word;
}

@media(max-width:1024px) {
  .article-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .toc {
    position: relative;
    top: 0;
    order: -1;
    max-height: none;
    width: 100%;
  }
  .comparison-grid {
    grid-template-columns: 1fr;
  }
}

@media(max-width:768px) {
  :root {
    --header-height: 100px;
  }
  .nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    flex-direction: column;
    background: var(--bg-elevated);
    border-radius: 0;
    border: none;
    padding: 1.5rem;
    display: none;
    gap: 0.5rem;
    backdrop-filter: blur(30px);
    box-shadow: var(--shadow-lg);
    max-height: calc(100vh - var(--header-height));
    overflow-y: auto;
    animation: slideDown 0.3s ease;
  }
  @keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
  }
  .nav.open {
    display: flex;
  }
  .nav a {
    width: 100%;
    text-align: center;
    padding: 0.875rem;
    font-size: 1rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
  }
  .nav a.active {
    width: 100%;
    border-color: transparent;
  }
  .nav-toggle {
    display: flex;
  }
  .grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  .hero {
    padding: 5rem 0 3rem;
    min-height: auto;
  }
  .hero-actions {
    flex-direction: column;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
  }
  .btn {
    width: 100%;
    padding: 1rem;
  }
  .footer-wrap {
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
  }
  .footer-nav {
    justify-content: center;
    gap: 1.25rem;
  }
  .article-item {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1.25rem;
  }
  .comparison-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  h1 {
    font-size: 2.25rem;
  }
  h2 {
    font-size: 1.5rem;
  }
  .platform-card {
    padding: 1.5rem;
  }
  .filters {
    padding: 1rem;
    flex-direction: column;
  }
  .filters .input {
    width: 100%;
    min-width: auto;
  }
  .card {
    padding: 1.5rem;
  }
  .container {
    padding: 0 1.25rem;
  }
  .section {
    padding: 4rem 0;
  }
  .article-layout {
    gap: 1.5rem;
  }
  .grid-2,.grid-3 {
    grid-template-columns: 1fr;
  }
  .lead {
    font-size: 1.125rem;
  }
  .toc {
    padding: 1.25rem;
  }
  .hero-lead {
    font-size: 1.125rem;
  }
  .logo img {
    height: 90px;
    width: 90px;
  }
}

@media(max-width:480px) {
  .hero {
    padding: 4rem 0 2.5rem;
  }
  .section {
    padding: 3rem 0;
  }
  .card {
    padding: 1.25rem;
  }
  .article-item {
    padding: 1rem;
  }
  .logo {
    font-size: 1.2rem;
  }
  .logo img {
    height: 80px;
    width: 80px;
  }
  .container {
    padding: 0 1rem;
  }
  .platform-card {
    padding: 1.25rem;
  }
  h2::after {
    width: 2.5rem;
  }
  :root {
    --header-height: 90px;
  }
}

@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after {
    animation-duration: 0.01ms!important;
    transition-duration: 0.01ms!important;
    scroll-behavior: auto!important;
  }
  .hero::before,.hero-blur {
    animation: none;
  }
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

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

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

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

.article-content h2:first-child {
  margin-top: 0;
}

.faq-item {
  margin-bottom: 2rem;
}

.faq-item:last-child {
  margin-bottom: 0;
}

.article-content a {
  word-break: break-word;
}
/* ============================
   Hotfixes for article pages
   - Provide missing CSS variables used in inline article styles
   - Prevent "invisible until JS runs" issues from opacity:0 animations
   ============================ */

:root{
  /* aliases used by some article inline styles */
  --muted: var(--text-muted);
  --surface-2: rgba(255,255,255,0.06);
}

[data-theme="light"]{
  --surface-2: rgba(241,245,249,0.85);
}

/* If JS/AOS doesn't run, content should still be visible */
.card,
.breadcrumb,
.article-meta,
.lead,
.hero-lead,
.hero-actions,
.article-item{
  opacity: 1 !important;
}

/* Keep hover/interactive transforms, but disable entrance animations that can hide content */
.card,
.breadcrumb,
.article-meta,
.lead,
.hero-lead,
.hero-actions,
.article-item{
  animation: none !important;
}

/* Ensure article pages match the intended reading width even if inline styles differ */
.article-content{
  max-width: 75ch;
  margin-left: auto;
  margin-right: auto;
}

/* Make sure TOC doesn't sit under the fixed header */
.toc{
  top: calc(var(--header-height) + 1.5rem);
}
/* ============================
   AOS visibility safeguard
   If AOS JS doesn't initialize, AOS CSS keeps [data-aos] elements invisible.
   Force them visible.
   ============================ */
[data-aos]{
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}
