/* ── vksdl.com ──────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800&display=swap');

:root {
  --bg-deep:    #0a0c12;
  --bg-base:    #0e1019;
  --bg-surface: #141820;
  --bg-raised:  #1a1e28;
  --bg-code:    #161a24;
  --border:     #252a36;
  --border-bright: #343b4d;

  --text:       #c9d1d9;
  --text-muted: #6e7681;
  --text-bright:#f0f6fc;

  --red:        #e03c4e;
  --red-hover:  #f04c5e;
  --red-dim:    rgba(224,60,78,0.12);
  --blue:       #5b8def;
  --blue-hover: #7ba4f7;
  --blue-dim:   rgba(91,141,239,0.10);
  --green:      #56d364;
  --orange:     #d29922;
  --purple:     #bc8cff;

  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-body:    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --font-mono:    'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'Source Code Pro', ui-monospace, monospace;

  --content-w: 960px;
  --nav-h: 56px;
  --radius: 6px;

  /* syntax */
  --syn-kw:     #cc7832;
  --syn-type:   #6897bb;
  --syn-str:    #6a8759;
  --syn-cmt:    #5c6370;
  --syn-fn:     #ffc66d;
  --syn-num:    #6897bb;
  --syn-method: #dcdcaa;
  --syn-member: #b8bcc4;
  --syn-macro:  #9876aa;
  --syn-enum:   #b5b6e3;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg-deep);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--blue); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--blue-hover); }
img { max-width: 100%; display: block; }

.wrap {
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── Nav ──────────────────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.3s, box-shadow 0.3s, backdrop-filter 0.3s;
}
.nav.scrolled {
  background: rgba(10, 12, 18, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--border);
}
.nav-inner {
  max-width: var(--content-w);
  width: 100%; padding: 0 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-brand {
  font-family: var(--font-mono);
  font-size: 1.15rem; font-weight: 700;
  color: var(--text-bright); text-decoration: none;
  letter-spacing: -0.01em;
}
.nav-version {
  font-family: var(--font-mono); font-size: 0.68rem;
  color: var(--text-muted); background: var(--bg-raised);
  padding: 2px 7px; border-radius: 3px; margin-left: 0.5rem;
  vertical-align: middle;
}
.nav-links {
  display: flex; align-items: center; gap: 0.25rem;
  list-style: none;
}
.nav-links a {
  color: var(--text-muted); font-size: 0.85rem;
  padding: 0.4rem 0.7rem; border-radius: var(--radius);
  transition: color 0.15s, background 0.15s;
  text-decoration: none;
}
.nav-links a:hover { color: var(--text-bright); background: rgba(255,255,255,0.05); }
.nav-links .github-link {
  display: flex; align-items: center; gap: 0.3rem;
}
.nav-links svg { width: 16px; height: 16px; fill: currentColor; }
.nav-hamburger {
  display: none; background: none; border: none;
  cursor: pointer; padding: 6px;
}
.nav-hamburger span {
  display: block; width: 20px; height: 2px;
  background: var(--text-muted); margin: 5px 0;
  transition: all 0.2s;
}

/* ── Hero ─────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  background: linear-gradient(160deg, #0e1225 0%, #0a0c12 40%, #10111a 70%, #0c1020 100%);
}

/* floating geometric shapes */
.hero-shapes {
  position: absolute; inset: 0; overflow: hidden;
  pointer-events: none;
}
.hero-shape {
  position: absolute;
  opacity: 0.04;
  will-change: transform;
}
.hero-shape--tri1 {
  top: 12%; left: 8%;
  width: 120px; height: 120px;
  border-left: 60px solid transparent;
  border-right: 60px solid transparent;
  border-bottom: 104px solid var(--red);
  animation: float1 22s ease-in-out infinite;
}
.hero-shape--hex1 {
  top: 20%; right: 15%;
  width: 80px; height: 46px;
  background: var(--blue);
  position: absolute;
  clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
  animation: float2 28s ease-in-out infinite;
}
.hero-shape--tri2 {
  bottom: 25%; right: 10%;
  width: 160px; height: 160px;
  border-left: 80px solid transparent;
  border-right: 80px solid transparent;
  border-bottom: 139px solid var(--red);
  opacity: 0.025;
  animation: float3 25s ease-in-out infinite;
}
.hero-shape--hex2 {
  bottom: 15%; left: 18%;
  width: 60px; height: 35px;
  background: var(--blue);
  clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
  animation: float4 20s ease-in-out infinite;
}
.hero-shape--tri3 {
  top: 55%; left: 3%;
  width: 90px; height: 90px;
  border-left: 45px solid transparent;
  border-right: 45px solid transparent;
  border-bottom: 78px solid var(--purple);
  opacity: 0.02;
  animation: float5 30s ease-in-out infinite;
}
.hero-shape--dot1 {
  top: 35%; right: 30%;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--red);
  opacity: 0.15;
  animation: float2 15s ease-in-out infinite;
}
.hero-shape--dot2 {
  bottom: 40%; left: 25%;
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--blue);
  opacity: 0.12;
  animation: float4 18s ease-in-out infinite;
}
.hero-shape--dot3 {
  top: 70%; right: 8%;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--text-muted);
  opacity: 0.1;
  animation: float1 16s ease-in-out infinite;
}

@keyframes float1 { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-30px) rotate(8deg); } }
@keyframes float2 { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(20px) rotate(-6deg); } }
@keyframes float3 { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-40px) rotate(12deg); } }
@keyframes float4 { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(25px) rotate(-10deg); } }
@keyframes float5 { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-20px) rotate(5deg); } }

@media (prefers-reduced-motion: reduce) {
  .hero-shape { animation: none !important; }
}

.hero-content {
  position: relative; z-index: 2;
  text-align: center;
  padding: 6rem 1.5rem 4rem;
  max-width: 780px;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5.5vw, 3.8rem);
  font-weight: 800;
  color: var(--text-bright);
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin-bottom: 1rem;
}
.hero-sub {
  font-size: clamp(1rem, 2.2vw, 1.15rem);
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 600px;
  margin: 0 auto 2rem;
}
.hero-stats {
  display: flex; flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: 2.5rem;
}
.hero-stat {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  background: var(--bg-raised);
  border: 1px solid var(--border);
  padding: 0.3rem 0.75rem;
  border-radius: 100px;
}
.hero-stat strong {
  color: var(--text-bright); font-weight: 600;
}
.hero-btns {
  display: flex; flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 3rem;
}
.btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-family: var(--font-display);
  font-size: 0.9rem; font-weight: 600;
  padding: 0.65rem 1.5rem;
  border-radius: var(--radius);
  text-decoration: none;
  transition: all 0.15s;
  cursor: pointer; border: none;
}
.btn-primary {
  background: var(--red); color: #fff;
  box-shadow: 0 0 20px rgba(224,60,78,0.15);
}
.btn-primary:hover {
  background: var(--red-hover); color: #fff;
  box-shadow: 0 0 30px rgba(224,60,78,0.25);
}
.btn-outline {
  background: transparent; color: var(--text);
  border: 1px solid var(--border-bright);
}
.btn-outline:hover {
  border-color: var(--text-muted); color: var(--text-bright);
}
.btn svg { width: 16px; height: 16px; fill: currentColor; }

.hero-code {
  text-align: left;
  max-width: 640px; margin: 0 auto;
}
.hero-code pre {
  font-size: 0.8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-code);
  box-shadow: 0 0 40px rgba(91,141,239,0.04), 0 4px 24px rgba(0,0,0,0.3);
}

/* ── Sections ─────────────────────────────────────────── */
.section {
  padding: 5rem 0;
}
.section--alt {
  background: var(--bg-surface);
}
.section-head {
  text-align: center;
  margin-bottom: 3rem;
}
.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 800;
  color: var(--text-bright);
  letter-spacing: -0.02em;
  margin-bottom: 0.6rem;
}
.section-head p {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto;
}

/* ── Code blocks ──────────────────────────────────────── */
pre {
  font-family: var(--font-mono);
  font-size: 0.84rem; line-height: 1.6;
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius);
  background: var(--bg-code);
  border: 1px solid var(--border);
  overflow-x: auto; tab-size: 4;
  margin: 1rem 0;
}
pre::-webkit-scrollbar { height: 5px; }
pre::-webkit-scrollbar-track { background: transparent; }
pre::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
code:not(pre code) {
  font-family: var(--font-mono); font-size: 0.88em;
  padding: 0.15em 0.4em; border-radius: 4px;
  background: var(--bg-raised);
  color: var(--text-bright);
}
.code-file {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.5rem 1.25rem;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: var(--radius) var(--radius) 0 0;
  font-family: var(--font-mono); font-size: 0.75rem;
  color: var(--text-muted);
}
.code-file + pre {
  border-radius: 0 0 var(--radius) var(--radius);
  margin-top: 0;
}
.code-file a { font-size: 0.75rem; }

/* syntax spans */
.k  { color: var(--syn-kw); }
.t  { color: var(--syn-type); }
.s  { color: var(--syn-str); }
.c  { color: var(--syn-cmt); }
.f  { color: var(--syn-fn); }
.n  { color: var(--syn-num); }
.m  { color: var(--syn-method); }
.mb { color: var(--syn-member); }
.mc { color: var(--syn-macro); }
.e  { color: var(--syn-enum); }

/* ── Code Comparison Slider ──────────────────────────── */
.code-compare {
  position: relative; overflow: hidden;
  width: 100%; height: 500px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin: 2rem 0 0;
  user-select: none; -webkit-user-select: none;
  touch-action: none;
  box-shadow: 0 4px 32px rgba(0,0,0,0.3);
}
.code-pane {
  position: absolute; inset: 0; overflow: hidden;
}
.code-pane pre {
  width: 100%; min-width: 100%; height: 100%;
  margin: 0; border: none; border-radius: 0;
  padding: 2.5rem 1.5rem 1rem;
  overflow-y: auto; overflow-x: auto;
}
.code-before { clip-path: inset(0 50% 0 0); z-index: 2; }
.code-before pre { background: #14090e; }
.code-after  { z-index: 1; }
.code-after pre  { background: var(--bg-code); }
.code-pane-label {
  position: absolute; top: 0.6rem; z-index: 5;
  font-family: var(--font-mono); font-size: 0.68rem; font-weight: 600;
  padding: 3px 10px; border-radius: 4px;
  pointer-events: none; text-transform: uppercase; letter-spacing: 0.04em;
}
.code-before .code-pane-label {
  left: 0.6rem; background: rgba(224,60,78,0.5); color: #fcc;
}
.code-after .code-pane-label {
  right: 0.6rem; background: rgba(91,141,239,0.35); color: #bdf;
}
.slider-handle {
  position: absolute; top: 0; bottom: 0;
  left: 50%; z-index: 10;
  cursor: col-resize; width: 44px;
  transform: translateX(-50%);
}
.slider-line {
  position: absolute; top: 0; bottom: 0;
  left: 50%; width: 2px;
  background: var(--text-muted);
  transform: translateX(-50%);
  opacity: 0.5;
}
.slider-grip {
  position: absolute; top: 50%; left: 50%;
  width: 32px; height: 32px;
  transform: translate(-50%, -50%);
  background: var(--bg-raised);
  border: 2px solid var(--text-muted);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
  transition: border-color 0.15s;
}
.slider-handle:hover .slider-grip { border-color: var(--text-bright); }
.slider-grip::before {
  content: "\25C0\00a0\25B6";
  font-size: 0.5rem; color: var(--text-muted);
}

/* ── Comparison Table ─────────────────────────────────── */
.cmp-table {
  width: 100%; border-collapse: collapse;
  font-size: 0.88rem;
}
.cmp-table thead th {
  text-align: left; padding: 0.75rem 1rem;
  font-family: var(--font-display); font-weight: 700;
  font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.04em;
  border-bottom: 2px solid var(--border-bright);
}
.cmp-table thead th:first-child { color: var(--red); }
.cmp-table thead th:last-child  { color: var(--blue); }
.cmp-table td {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.cmp-table td:first-child { color: var(--text-bright); }
.cmp-table td:last-child  {
  color: var(--text-muted); font-family: var(--font-mono); font-size: 0.82rem;
}
.cmp-table tr:last-child td { border-bottom: none; }
.cmp-table tbody tr { transition: background 0.1s; }
.cmp-table tbody tr:hover { background: rgba(255,255,255,0.02); }

/* ── Features ─────────────────────────────────────────── */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.feature-item {
  padding: 1.5rem;
  background: var(--bg-base);
  transition: background 0.15s;
}
.feature-item:hover { background: var(--bg-raised); }
.feature-icon {
  width: 36px; height: 36px;
  margin-bottom: 0.75rem;
  color: var(--red);
}
.feature-icon svg { width: 100%; height: 100%; }
.feature-item h3 {
  font-family: var(--font-mono);
  font-size: 0.88rem; font-weight: 600;
  color: var(--text-bright);
  margin-bottom: 0.4rem;
}
.feature-item p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ── Examples Gallery ─────────────────────────────────── */
.filter-bar {
  display: flex; flex-wrap: wrap; gap: 0.4rem;
  justify-content: center;
  margin-bottom: 2rem;
}
.filter-btn {
  background: var(--bg-raised); border: 1px solid var(--border);
  color: var(--text-muted); padding: 0.35rem 0.85rem;
  border-radius: 100px; cursor: pointer;
  font-family: var(--font-mono); font-size: 0.75rem;
  transition: all 0.15s;
}
.filter-btn:hover { border-color: var(--border-bright); color: var(--text-bright); }
.filter-btn.active {
  background: var(--red-dim); border-color: var(--red);
  color: var(--red);
}
.examples-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
}
.example-card {
  display: flex; align-items: baseline; gap: 0.6rem;
  padding: 0.75rem 1rem;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
}
.example-card:hover {
  border-color: var(--border-bright);
  background: #1e2330;
  color: var(--text);
}
.example-num {
  font-family: var(--font-mono); font-size: 0.7rem;
  color: var(--text-muted); min-width: 1.2rem;
}
.example-info { flex: 1; min-width: 0; }
.example-name {
  font-family: var(--font-mono); font-size: 0.82rem;
  font-weight: 600; color: var(--blue);
  display: block;
}
.example-card:hover .example-name { color: var(--blue-hover); }
.example-meta {
  display: flex; align-items: center; gap: 0.5rem;
  margin-top: 0.2rem;
}
.example-cat {
  font-family: var(--font-mono); font-size: 0.62rem;
  padding: 1px 6px; border-radius: 3px;
  text-transform: uppercase; letter-spacing: 0.03em;
}
.cat-core     { background: #152238; color: #6ba5eb; }
.cat-rt       { background: #281418; color: #e07070; }
.cat-graph    { background: #142214; color: #70c070; }
.cat-pipeline { background: #222214; color: #d0c060; }
.cat-ext      { background: #201428; color: #b08ae0; }
.example-lines {
  font-family: var(--font-mono); font-size: 0.65rem;
  color: var(--text-muted);
}

/* ── Philosophy ───────────────────────────────────────── */
.philosophy {
  max-width: 640px; margin: 0 auto;
}
.philosophy h3 {
  font-family: var(--font-display);
  font-size: 1.3rem; font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 1rem;
}
.philosophy blockquote {
  border-left: 3px solid var(--red);
  padding-left: 1.25rem;
  margin: 1.5rem 0;
  color: var(--text);
  font-size: 0.95rem;
}
.philosophy p {
  margin-bottom: 1rem;
  font-size: 0.95rem;
}
.philosophy em { color: var(--text-bright); font-style: italic; }

/* ── Getting Started ──────────────────────────────────── */
.req-badges {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  margin-bottom: 1.5rem;
  justify-content: center;
}
.req-badge {
  font-family: var(--font-mono); font-size: 0.78rem;
  color: var(--text-bright);
  background: var(--bg-raised);
  border: 1px solid var(--border);
  padding: 0.3rem 0.75rem;
  border-radius: 100px;
}
.deps-list {
  columns: 2;
  list-style: none;
  padding: 0;
  font-size: 0.88rem;
}
.deps-list li {
  padding: 0.3rem 0;
  color: var(--text-muted);
  break-inside: avoid;
}
.deps-list li strong { color: var(--text); font-weight: 600; }

/* ── Escape Hatch callout ─────────────────────────────── */
.escape-note {
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 1.5rem;
}
.escape-note code { font-size: 0.82em; }

/* ── Footer ───────────────────────────────────────────── */
.footer {
  padding: 3rem 0 2rem;
  border-top: 1px solid var(--border);
  background: var(--bg-deep);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}
.footer-col h4 {
  font-family: var(--font-display);
  font-size: 0.78rem; font-weight: 700;
  color: var(--text-bright);
  text-transform: uppercase; letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}
.footer-col a {
  display: block; font-size: 0.82rem;
  color: var(--text-muted); line-height: 2;
  text-decoration: none;
}
.footer-col a:hover { color: var(--text-bright); }
.footer-bottom {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  flex-wrap: wrap; gap: 0.5rem;
}
.footer-bottom a { color: var(--text-muted); }
.footer-bottom a:hover { color: var(--text-bright); }

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 900px) {
  .examples-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-hamburger { display: block; }
  .nav-links.open {
    display: flex; flex-direction: column;
    position: fixed; top: var(--nav-h); right: 0;
    width: 240px; padding: 1rem;
    background: var(--bg-surface);
    border-left: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    box-shadow: -4px 4px 20px rgba(0,0,0,0.4);
    border-radius: 0 0 0 var(--radius);
  }
  .feature-grid { grid-template-columns: 1fr; }
  .examples-grid { grid-template-columns: 1fr; }
  .deps-list { columns: 1; }
  .footer-inner { flex-direction: column; gap: 1.5rem; }
  .hero-code { display: none; }
  .hero { min-height: 80vh; }
}
@media (max-width: 480px) {
  .hero h1 { font-size: 1.8rem; }
  .hero-stats { gap: 0.4rem; }
  .hero-stat { font-size: 0.7rem; padding: 0.25rem 0.55rem; }
  pre { font-size: 0.75rem; padding: 0.9rem 1rem; }
  .code-compare { height: 380px; }
  .section { padding: 3rem 0; }
}
