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

:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --color-bg-dark: #141422;
  --color-bg-light: #ffffff;
  --color-bg-gray: #f6f7f9;
  --color-text-primary: #1a1a2e;
  --color-text-secondary: #555566;
  --color-text-light: #e0e0ec;
  --color-text-muted: #9999aa;
  --color-accent: #4a6cf7;
  --color-accent-hover: #3a5ce5;
  --color-code-bg: #1e1e32;
  --color-code-border: #2a2a44;
  --color-border: #e0e0e8;
  --max-width: 800px;
  --max-width-wide: 960px;
}

html {
  font-size: 16px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  color: var(--color-text-primary);
  background: var(--color-bg-light);
}

a {
  color: var(--color-accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

/* Navigation */

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: 1rem 1.5rem;
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text-light);
  text-decoration: none;
}

.nav-logo:hover {
  text-decoration: none;
  color: #ffffff;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.nav-links a {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--color-text-light);
  text-decoration: none;
}

/* Hero */

.hero-wrapper {
  background: var(--color-bg-dark);
}

.hero {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 4rem 1.5rem 4.5rem;
  text-align: center;
}

.hero h1 {
  font-family: var(--font-mono);
  font-size: 2.75rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.hero .tagline {
  font-size: 1.25rem;
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.hero .description {
  font-size: 1.05rem;
  color: var(--color-text-light);
  max-width: 600px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 0.65rem 1.5rem;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.btn:hover {
  text-decoration: none;
}

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

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

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

.btn-secondary:hover {
  border-color: var(--color-text-light);
  color: #ffffff;
}

/* Sections */

.section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3.5rem 1.5rem;
}

.section-alt {
  background: var(--color-bg-gray);
}

.section h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}

.section h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.section p {
  color: var(--color-text-secondary);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.section p:last-child {
  margin-bottom: 0;
}

/* Problem */

.problem-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.problem-card {
  background: var(--color-bg-light);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 1.25rem;
}

.problem-card h3 {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--color-text-primary);
}

.problem-card p {
  font-size: 0.9rem;
  margin-bottom: 0;
}

/* Code blocks */

.code-block {
  background: var(--color-code-bg);
  border: 1px solid var(--color-code-border);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}

.code-block pre {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.65;
  color: #d4d4e8;
}

.code-block .c {
  color: #6a6a8a;
}

.code-block .f {
  color: #90caf9;
}

.code-block .s {
  color: #a5d6a7;
}

/* Features */

.features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.feature-card {
  padding: 1.25rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-bg-light);
}

.feature-card h3 {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--color-text-primary);
}

.feature-card p {
  font-size: 0.9rem;
  margin-bottom: 0;
}

/* Quickstart */

.quickstart-steps {
  margin-top: 1.5rem;
}

.quickstart-step {
  margin-bottom: 1.5rem;
}

.quickstart-step h3 {
  font-family: var(--font-mono);
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.quickstart-step .code-block {
  margin: 0.5rem 0 0;
}

.quickstart-step p {
  font-size: 0.95rem;
}

/* Footer */

.footer-wrapper {
  background: var(--color-bg-dark);
  margin-top: 2rem;
}

.footer {
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: 2rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

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

.footer-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

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

.footer-links a:hover {
  color: var(--color-text-light);
}

/* Responsive */

@media (max-width: 768px) {
  .hero h1 {
    font-size: 2rem;
  }

  .hero .tagline {
    font-size: 1.1rem;
  }

  .problem-grid {
    grid-template-columns: 1fr;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .footer {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 2.5rem 1rem 3rem;
  }

  .hero h1 {
    font-size: 1.75rem;
  }

  .section {
    padding: 2.5rem 1rem;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .nav {
    padding: 0.75rem 1rem;
  }

  .nav-links {
    gap: 1rem;
  }
}
