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

:root {
  --bg:        #0a0a0f;
  --bg-card:   #111118;
  --bg-dark:   #06060a;
  --border:    #1e1e2e;
  --text:      #e8e8f0;
  --text-muted:#7878a0;
  --accent:    #6366f1;
  --accent-hi: #818cf8;
  --green:     #22c55e;
  --yellow:    #eab308;
  --red:       #ef4444;

  --radius-sm: 6px;
  --radius:    12px;
  --radius-lg: 20px;

  --font-sans: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── Layout ── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Nav ── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.logo {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.15s, transform 0.1s;
  cursor: pointer;
  border: none;
}

.btn:hover  { opacity: 0.85; }
.btn:active { transform: scale(0.98); }

.btn-sm {
  font-size: 0.85rem;
  padding: 7px 14px;
  background: var(--accent);
  color: #fff;
}

.btn-lg { font-size: 1rem; padding: 14px 28px; }

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.btn-ghost:hover { color: var(--text); border-color: var(--text-muted); opacity: 1; }

/* ── Hero ── */
.hero {
  padding: 100px 0 80px;
  text-align: center;
}

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: 24px;
}

.hero-sub {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

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

/* ── Sections ── */
.section {
  padding: 96px 0;
}

.section-dark {
  background: var(--bg-dark);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-title {
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

.section-sub {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 56px;
}

/* ── Tools grid ── */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: border-color 0.2s;
}

.tool-card:hover { border-color: var(--accent); }

.tool-icon {
  font-size: 1.5rem;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(99, 102, 241, 0.12);
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  color: var(--accent-hi);
  font-weight: 700;
  font-family: var(--font-mono);
}

.tool-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.tool-card p {
  font-size: 0.93rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 20px;
}

.tool-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tool-features li {
  font-size: 0.85rem;
  color: var(--text-muted);
  padding-left: 18px;
  position: relative;
}

.tool-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--green);
  font-weight: 700;
}

/* ── Stack grid ── */
.stack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-bottom: 56px;
}

.stack-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.stack-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.stack-value {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--accent-hi);
  margin-bottom: 10px;
}

.stack-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ── Code block ── */
.code-block-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.code-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #0d0d14;
  border-bottom: 1px solid var(--border);
}

.code-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.code-dot.red    { background: var(--red); }
.code-dot.yellow { background: var(--yellow); }
.code-dot.green  { background: var(--green); }

.code-filename {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-left: 6px;
}

.code-block {
  margin: 0;
  padding: 28px 28px;
  background: #06060c;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.8;
}

.code-block code { color: var(--text); }

/* Syntax colours */
.c-keyword { color: #c084fc; }
.c-fn      { color: var(--accent-hi); }
.c-comment { color: #4b5563; font-style: italic; }
.c-num     { color: var(--green); }

/* ── Principles ── */
.principles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.principle {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
}

.principle h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text);
}

.principle p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ── CTA ── */
.section-cta {
  background: radial-gradient(ellipse 80% 60% at 50% 100%, rgba(99,102,241,0.15), transparent);
  text-align: center;
}

.cta-inner h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

.cta-inner p {
  color: var(--text-muted);
  margin-bottom: 36px;
  font-size: 1.05rem;
}

/* ── Footer ── */
.footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-name {
  font-weight: 700;
  font-size: 0.95rem;
}

.footer-copy {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .hero { padding: 72px 0 56px; }
  .section { padding: 64px 0; }
  .hero h1 { font-size: 2.2rem; }
  .tools-grid, .stack-grid, .principles-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
