

:root {
  
  --clr-bg:         #0a0e14;
  --clr-bg-2:       #0e131b;
  --clr-surface:    #121823;
  --clr-surface-2:  #1a2230;
  --clr-border:     rgba(255,255,255,0.08);
  --clr-border-2:   rgba(255,255,255,0.14);

  
  --clr-accent:     #1e9bff;
  --clr-accent-2:   #6cc8ff;
  --clr-accent-3:   #2b6fe0;
  --clr-accent-glow: rgba(30,155,255,0.12);

  /* Logo brand colors (same in dark & light theme) */
  --clr-brand:      #1a7fe8;
  --clr-brand-2:    #0d96d1;

  
  --clr-text:       #d8dee9;
  --clr-text-muted: #a0abbd;
  --clr-text-dim:   #8793a6;

  
  --font-display:   'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font-mono:      'JetBrains Mono', 'Fira Code', monospace;
  --font-body:      'Inter', system-ui, -apple-system, sans-serif;

  
  --space-xs:   0.375rem;
  --space-sm:   0.75rem;
  --space-md:   1.25rem;
  --space-lg:   2rem;
  --space-xl:   3.5rem;
  --space-2xl:  6rem;

  
  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  20px;
  --radius-xl:  32px;

  
  --ease-out:   cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring:cubic-bezier(0.34, 1.56, 0.64, 1);

  
  --shadow-glow: none;
  --shadow-card: 0 1px 3px rgba(0,0,0,0.30);
  --shadow-deep: 0 12px 32px rgba(0,0,0,0.35);
}

[data-theme="light"] {
  --clr-bg:         #eff5fc;
  --clr-bg-2:       #e2ecf8;
  --clr-surface:    #ffffff;
  --clr-surface-2:  #f3f7fd;
  --clr-border:     rgba(84,112,153,0.12);
  --clr-border-2:   rgba(84,112,153,0.22);
  --clr-text:       #0a1220;
  --clr-text-muted: #384a63;
  --clr-text-dim:   #566179;
  --clr-accent:     #0a68d6;
  --clr-accent-2:   #0b72b5;
  --clr-accent-3:   #2f5fcf;
  --clr-accent-glow: rgba(10,104,214,0.18);
  --shadow-card: 0 2px 14px rgba(13,16,35,0.08), 0 1px 0 rgba(255,255,255,1) inset;
  --shadow-deep: 0 16px 48px rgba(13,16,35,0.13);
}

[data-theme="light"] body {
  background: linear-gradient(145deg, #edf4fc 0%, #f5f7ff 45%, #eaf4ff 100%);
}
[data-theme="light"] .grid-bg {
  background-image:
    linear-gradient(rgba(84,112,153,0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(84,112,153,0.055) 1px, transparent 1px);
}
[data-theme="light"] .hero-terminal {
  background: #1a2230;
  border-color: rgba(0,0,0,0.16);
  box-shadow: 0 28px 64px rgba(13,16,35,0.2), 0 0 0 1px rgba(0,0,0,0.06);
}
[data-theme="light"] .terminal-body { color: #cdd6f4; }
[data-theme="light"] .terminal-header { background: #121823; border-bottom-color: rgba(255,255,255,0.06); }
[data-theme="light"] .hero-terminal .terminal-title { color: #8b97ad; }
[data-theme="light"] .hero-terminal .t-prompt { color: #6cc8ff; }
[data-theme="light"] .hero-terminal .t-out { color: #9fb0cc; }
[data-theme="light"] .code-block {
  background: #1a2230;
  border-color: rgba(0,0,0,0.12);
  color: #cdd6f4;
}
[data-theme="light"] .site-header.scrolled .navbar {
  background: rgba(237,244,252,0.92);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom-color: rgba(84,112,153,0.12);
}
[data-theme="light"] .nav-link { color: var(--clr-text-muted); }
[data-theme="light"] .nav-link:hover { background: rgba(84,112,153,0.08); color: var(--clr-text); }
[data-theme="light"] .nav-link.active { background: rgba(10,104,214,0.08); color: var(--clr-accent); }
[data-theme="light"] .mobile-menu { background: var(--clr-bg); }
[data-theme="light"] .search-overlay { background: rgba(237,244,252,0.95); }
[data-theme="light"] ::-webkit-scrollbar-track { background: var(--clr-bg); }
[data-theme="light"] ::-webkit-scrollbar-thumb { background: rgba(84,112,153,0.22); }
[data-theme="light"] ::-webkit-scrollbar-thumb:hover { background: var(--clr-accent); }
[data-theme="light"] ::selection { background: rgba(10,104,214,0.18); color: #064a9c; }
[data-theme="light"] .btn-primary { background: var(--clr-accent); color: #fff; }
[data-theme="light"] .prose .callout .btn-primary,
[data-theme="light"] .callout .btn-primary { color: #fff; }
[data-theme="light"] .btn-primary:hover {
  background: #0857b8;
  box-shadow: 0 2px 8px rgba(10,104,214,0.22);
}
[data-theme="light"] .btn-ghost {
  background: rgba(255,255,255,0.85);
  border-color: rgba(84,112,153,0.22);
  color: var(--clr-text);
  backdrop-filter: blur(8px);
}
[data-theme="light"] .btn-ghost:hover {
  border-color: var(--clr-accent);
  color: var(--clr-accent);
  background: rgba(10,104,214,0.06);
}
[data-theme="light"] .card {
  box-shadow: 0 2px 14px rgba(13,16,35,0.07), 0 1px 0 rgba(255,255,255,1) inset;
}
[data-theme="light"] .card:hover {
  box-shadow: 0 14px 44px rgba(13,16,35,0.13), 0 0 0 1px rgba(10,104,214,0.14);
}
[data-theme="light"] .divider {
  background: linear-gradient(90deg, transparent, rgba(84,112,153,0.18), transparent);
}
[data-theme="light"] .tag-accent {
  background: rgba(10,104,214,0.1);
  color: #064a9c;
  border-color: rgba(10,104,214,0.22);
}
[data-theme="light"] .sidebar-nav a:hover { background: rgba(84,112,153,0.07); }
[data-theme="light"] .sidebar-nav a.active {
  background: rgba(10,104,214,0.09);
  color: var(--clr-accent);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  background:
    radial-gradient(ellipse 55% 45% at 80% 25%, rgba(30,155,255,0.07), transparent 70%),
    var(--clr-bg);
  color: var(--clr-text);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}
body > * { flex-shrink: 0; }
body > main { flex: 1 0 auto; width: 100%; }
body > .site-footer { margin-top: auto; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--clr-bg); }
::-webkit-scrollbar-thumb { background: var(--clr-surface-2); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--clr-accent); }
[data-theme="dark"] { color-scheme: dark; scrollbar-color: #2a3547 transparent; }
[data-theme="dark"] ::-webkit-scrollbar { width: 10px; height: 10px; }
[data-theme="dark"] ::-webkit-scrollbar-thumb { background: #2a3547; border-radius: 8px; border: 2px solid var(--clr-bg); }
[data-theme="dark"] ::-webkit-scrollbar-thumb:hover { background: #374459; }

:focus-visible { outline: 2px solid var(--clr-accent); outline-offset: 2px; }

::selection { background: rgba(30,155,255,0.28); color: #f1f5fc; }

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.container-wide {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 2rem;
}

h1,h2,h3,h4,h5,h6 { font-family: var(--font-display); font-weight: 700; line-height: 1.15; }

.text-accent  { color: var(--clr-accent); }
.text-muted   { color: var(--clr-text-muted); }
.font-mono    { font-family: var(--font-mono); }

.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; }

.grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}
[data-theme="dark"] .grid-bg {
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 50% 30%, #000 30%, transparent 100%);
  mask-image: radial-gradient(ellipse 90% 80% at 50% 30%, #000 30%, transparent 100%);
}

.orb { display: none; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  font-family: var(--font-body);
  font-size: 0.925rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.3s var(--ease-out);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  letter-spacing: 0.02em;
}
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: background 0.3s;
}
.btn:hover::before { background: rgba(255,255,255,0.07); }
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--clr-accent);
  color: #0a0e14;
}
.btn-primary:hover,
.btn-primary:focus-visible {
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  transform: none;
}

.btn-ghost {
  background: transparent;
  color: var(--clr-text);
  border: 1px solid var(--clr-border-2);
}
.btn-ghost:hover {
  border-color: var(--clr-accent);
  color: var(--clr-accent);
  transform: translateY(-2px);
}

.btn-outline-accent {
  background: rgba(30,155,255,0.08);
  color: var(--clr-accent);
  border: 1px solid rgba(30,155,255,0.25);
}
.btn-outline-accent:hover {
  background: rgba(30,155,255,0.15);
  border-color: rgba(30,155,255,0.5);
  box-shadow: 0 0 20px rgba(30,155,255,0.2);
  transform: translateY(-2px);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-family: var(--font-mono);
}
.tag-accent  { background: rgba(30,155,255,0.1);  color: var(--clr-accent);  border: 1px solid rgba(30,155,255,0.2); }
.tag-cyan   { background: rgba(108,200,255,0.1);  color: var(--clr-accent-2); border: 1px solid rgba(108,200,255,0.2); }
.tag-purple { background: rgba(43,111,224,0.15); color: #8cc4ff;            border: 1px solid rgba(43,111,224,0.25); }
.tag-orange { background: rgba(255,150,60,0.1);  color: #ff9040;            border: 1px solid rgba(255,150,60,0.2); }

.card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: transform 0.35s var(--ease-out), border-color 0.35s, box-shadow 0.35s;
}
.card:hover {
  transform: translateY(-2px);
  border-color: var(--clr-border-2);
  box-shadow: var(--shadow-deep), 0 0 0 1px rgba(30,155,255,0.08);
}

.section { padding: 3.5rem 0; }

.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--clr-border-2), transparent);
  margin: var(--space-xl) 0;
}

.code-block {
  background: #0a0e14;
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: #cdd6f4;
  overflow-x: auto;
  line-height: 1.7;
}
.code-block .keyword { color: #cba6f7; }
.code-block .string  { color: #7dd3fc; }
.code-block .comment { color: #7f849c; font-style: italic; }
.code-block .func    { color: #89b4fa; }
.code-block .number  { color: #fab387; }
.code-block .variable { color: #89dceb; }

.prose {
  max-width: 760px;
}
.prose h1 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 1rem; }
.prose h2 { font-size: clamp(1.4rem, 3vw, 2rem); margin: 2.5rem 0 0.75rem; color: var(--clr-text); }
.prose h3 { font-size: 1.2rem; margin: 2rem 0 0.5rem; color: var(--clr-accent); }
.prose p  { margin-bottom: 1.25rem; color: var(--clr-text-muted); font-size: 1.0625rem; }
.prose ul, .prose ol { margin: 1rem 0 1.25rem 1.5rem; color: var(--clr-text-muted); }
.prose li { margin-bottom: 0.5rem; }
.prose ul li::marker { color: var(--clr-accent); }
.prose strong { color: var(--clr-text); font-weight: 600; }
.prose a { color: var(--clr-accent); text-decoration: underline; text-underline-offset: 3px; }
.prose .code-block { margin: 1.5rem 0; }
.prose code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  color: var(--clr-accent);
  background: var(--clr-surface-2);
  border-radius: 4px;
  padding: 0.15em 0.4em;
}
.prose pre {
  background: #0a0e14;
  border: 1px solid var(--clr-border-2);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  margin-bottom: 1.75rem;
}
.prose pre code {
  background: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
  font-size: 0.875rem;
  color: #cdd6f4 !important;
  line-height: 1.7;
}
.prose .callout {
  background: rgba(30,155,255,0.06);
  border-left: 3px solid var(--clr-accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  color: var(--clr-text-muted);
}
.prose .callout strong { color: var(--clr-accent); }
.prose .callout .btn-primary { color: #0a0e14; }
.callout .btn-primary { color: #0a0e14; }

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

.underline-anim {
  position: relative;
}
.underline-anim::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--clr-accent);
  transition: width 0.35s var(--ease-out);
}
.underline-anim:hover::after { width: 100%; }

.stat-number {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  color: var(--clr-accent);
  line-height: 1;
}
.stat-label {
  font-size: 0.875rem;
  color: var(--clr-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 0.35rem;
}

.tutorial-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 2rem;
  align-items: start;
}

.tutorial-sidebar {
  position: sticky;
  top: 90px;
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}

.sidebar-title {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--clr-text-dim);
  font-family: var(--font-mono);
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--clr-border);
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  color: var(--clr-text-muted);
  transition: all 0.2s;
  margin-bottom: 0.1rem;
}
.sidebar-nav a:hover { background: var(--clr-surface-2); color: var(--clr-text); }
.sidebar-nav a.active {
  background: rgba(30,155,255,0.1);
  color: var(--clr-accent);
  font-weight: 600;
}
.sidebar-nav a::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
  opacity: 0.5;
}
.sidebar-nav a.active::before { opacity: 1; }

@media (max-width: 900px) {
  .tutorial-layout { grid-template-columns: 1fr; }
  .tutorial-sidebar { position: static; max-height: none; }
}

@media (max-width: 600px) {
  .container, .container-wide { padding: 0 1rem; }
  .section { padding: 2.5rem 0; }
}

@media (max-width: 600px) {
  .container, .container-wide {
    padding: 0 1rem;
  }
  h1 { font-size: clamp(1.5rem, 6vw, 2.5rem) !important; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

@media (max-width: 640px) {
  input, select, textarea { font-size: 16px; }
}
