/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --color-bg: #ffffff;
  --color-text: #1a1a1a;
  --color-text-muted: #666666;
  --color-border: #e5e5e5;
  --color-primary: #2563eb;
  --color-primary-hover: #1d4ed8;
  --color-code-bg: #f5f5f5;
  --color-success: #16a34a;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Menlo', 'Monaco', 'Courier New', monospace;
  --nav-height: 64px;
  --spacing-xs: 8px;
  --spacing-sm: 16px;
  --spacing-md: 24px;
  --spacing-lg: 32px;
  --spacing-xl: 48px;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* Navigation */
.main-nav {
  position: sticky;
  top: 0;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  z-index: 100;
  height: var(--nav-height);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--color-text);
  font-weight: 600;
  font-size: 18px;
}

.nav-logo {
  width: 32px;
  height: 32px;
  border-radius: 6px;
}

.nav-links {
  display: flex;
  gap: var(--spacing-lg);
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: var(--color-text-muted);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}

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

.nav-github {
  padding: 8px 16px;
  background: var(--color-text);
  color: var(--color-bg) !important;
  border-radius: 6px;
  transition: opacity 0.2s;
}

.nav-github:hover {
  opacity: 0.85;
}

/* Main Content */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--spacing-xl) var(--spacing-md);
  min-height: calc(100vh - var(--nav-height) - 120px);
}

/* Hero Section */
.hero {
  text-align: center;
  padding: var(--spacing-xl) 0 80px;
}

.hero h1 {
  font-size: 56px;
  font-weight: 700;
  margin-bottom: var(--spacing-sm);
  letter-spacing: -0.02em;
}

.hero p {
  font-size: 20px;
  color: var(--color-text-muted);
  margin-bottom: var(--spacing-lg);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-cta {
  display: flex;
  gap: var(--spacing-sm);
  justify-content: center;
  margin-top: var(--spacing-lg);
}

.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 6px;
  font-weight: 500;
  font-size: 15px;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--color-primary);
  color: white;
}

.btn-primary:hover {
  background: var(--color-primary-hover);
  text-decoration: none;
}

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

.btn-secondary:hover {
  border-color: var(--color-text);
  text-decoration: none;
}

/* Features Grid */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--spacing-lg);
  margin: 64px 0;
}

.feature-card {
  display: block;
  padding: var(--spacing-lg);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  transition: all 0.2s;
  text-decoration: none;
  color: inherit;
}

.feature-card:hover {
  border-color: var(--color-primary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
  text-decoration: none;
}

.feature-card h3 {
  margin-top: 0;
  margin-bottom: var(--spacing-sm);
  font-size: 20px;
  color: var(--color-text);
}

.feature-card p {
  color: var(--color-text-muted);
  margin-bottom: 0;
  font-size: 15px;
  line-height: 1.6;
}

/* Section */
.section {
  margin: 64px 0;
}

.section-title {
  font-size: 36px;
  margin-bottom: var(--spacing-lg);
  text-align: center;
}

.section-subtitle {
  color: var(--color-text-muted);
  text-align: center;
  font-size: 18px;
  max-width: 600px;
  margin: 0 auto var(--spacing-xl);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  margin-top: var(--spacing-lg);
  margin-bottom: var(--spacing-sm);
}

h1 { font-size: 40px; }
h2 { font-size: 32px; }
h3 { font-size: 24px; }
h4 { font-size: 20px; }

p {
  margin-bottom: var(--spacing-sm);
}

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

a:hover {
  text-decoration: underline;
}

strong, b {
  font-weight: 600;
}

/* Code */
code {
  font-family: var(--font-mono);
  font-size: 14px;
  background: var(--color-code-bg);
  padding: 2px 6px;
  border-radius: 3px;
  color: var(--color-text);
}

pre {
  background: var(--color-code-bg);
  padding: var(--spacing-sm);
  border-radius: 6px;
  overflow-x: auto;
  margin: var(--spacing-sm) 0;
  border: 1px solid var(--color-border);
}

pre code {
  background: none;
  padding: 0;
}

/* Lists */
ul, ol {
  margin: var(--spacing-sm) 0;
  padding-left: var(--spacing-md);
}

li {
  margin: var(--spacing-xs) 0;
}

/* Blockquote */
blockquote {
  border-left: 3px solid var(--color-border);
  padding-left: var(--spacing-sm);
  margin: var(--spacing-sm) 0;
  color: var(--color-text-muted);
  font-style: italic;
}

/* Horizontal Rule */
hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: var(--spacing-lg) 0;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--spacing-sm) 0;
}

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

th {
  font-weight: 600;
  background: var(--color-code-bg);
}

/* Mermaid Diagrams */
.mermaid {
  text-align: center;
  margin: var(--spacing-lg) 0;
}

/* Quick Start Box */
.quick-start {
  background: var(--color-code-bg);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: var(--spacing-lg);
  margin: var(--spacing-lg) 0;
}

.quick-start h3 {
  margin-top: 0;
}

/* Footer */
.main-footer {
  border-top: 1px solid var(--color-border);
  padding: var(--spacing-lg) 0;
  background: var(--color-bg);
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
  text-align: center;
  color: var(--color-text-muted);
  font-size: 14px;
}

.footer-container a {
  color: var(--color-text-muted);
}

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

/* Responsive */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 40px;
  }
  
  .hero p {
    font-size: 18px;
  }
  
  .nav-links {
    gap: var(--spacing-sm);
  }
  
  .nav-links a {
    font-size: 13px;
  }
  
  .features {
    grid-template-columns: 1fr;
  }
  
  .hero-cta {
    flex-direction: column;
  }
  
  .btn {
    width: 100%;
    text-align: center;
  }
}
