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

:root {
  --bg: #0a0a0a;
  --surface: #141414;
  --surface-hover: #1a1a1a;
  --border: #2a2a2a;
  --border-light: #333;
  --text: #e5e5e5;
  --text-muted: #888;
  --accent: #f5f5f5;
  --notion-white: #ffffff;
  --notion-red: #eb5757;
  --notion-blue: #5b9bd5;
  --notion-green: #6bc06c;
  --notion-orange: #e8a348;
  --code-bg: #111;
  --radius: 12px;
  --radius-sm: 8px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--accent);
  font-weight: 600;
  font-size: 15px;
}

.logo-icon {
  width: 28px;
  height: 28px;
  background: var(--notion-white);
  color: #000;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 8px;
}

.nav-link {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 6px;
  transition: all 0.2s;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent);
  background: var(--surface);
}

/* Hero */
.hero {
  padding: 120px 0 60px;
  text-align: center;
}

.hero-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
}

.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  color: var(--notion-white);
  letter-spacing: -0.03em;
  margin-bottom: 16px;
  line-height: 1.1;
}

.hero-subtitle {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
}

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

.section h2 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--notion-white);
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 40px;
}

/* Setup Steps */
.setup-steps {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 32px;
}

.step {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.step-number {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  color: var(--text-muted);
}

.step-content h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 6px;
}

.step-content p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

.step-content code {
  font-family: 'JetBrains Mono', monospace;
  background: var(--code-bg);
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 13px;
  color: var(--notion-blue);
}

/* Code Blocks */
.code-block {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-top: 12px;
}

.code-block.compact {
  margin-top: 12px;
}

.code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
}

.copy-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 11px;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: all 0.2s;
}

.copy-btn:hover {
  border-color: var(--border-light);
  color: var(--accent);
}

.code-block pre {
  padding: 16px;
  overflow-x: auto;
}

.code-block code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  line-height: 1.6;
  color: #ccc;
}

/* Categories */
.category {
  margin-bottom: 40px;
}

.category-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cat-icon {
  font-size: 16px;
}

/* Function Cards */
.function-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.2s;
}

.function-card:hover {
  border-color: var(--border-light);
}

.function-card.open {
  border-color: var(--border-light);
}

.function-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
}

.function-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 500;
  color: var(--notion-blue);
  white-space: nowrap;
}

.function-desc {
  font-size: 13px;
  color: var(--text-muted);
  flex: 1;
}

.chevron {
  font-size: 10px;
  color: var(--text-muted);
  transition: transform 0.2s;
  flex-shrink: 0;
}

.function-card.open .chevron {
  transform: rotate(180deg);
}

.function-details {
  display: none;
  padding: 0 20px 20px;
  border-top: 1px solid var(--border);
}

.function-card.open .function-details {
  display: block;
}

.function-details h4 {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-top: 16px;
  margin-bottom: 10px;
}

/* Params Table */
.params table {
  width: 100%;
  border-collapse: collapse;
}

.params td {
  padding: 8px 12px;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.params td:first-child {
  font-family: 'JetBrains Mono', monospace;
  color: var(--notion-orange);
  white-space: nowrap;
  width: 120px;
}

.params td:nth-child(2) {
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  width: 80px;
}

.params td:last-child {
  color: var(--text-muted);
}

.params tr:last-child td {
  border-bottom: none;
}

/* Prompt Bubble */
.prompt-bubble {
  background: var(--surface-hover);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 10px 18px;
  font-size: 14px;
  color: var(--text);
  display: inline-block;
  margin-bottom: 4px;
  font-style: italic;
}

/* Tips */
.tips-section {
  border-top: 1px solid var(--border);
}

.tips-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 32px;
}

.tip-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.tip-icon {
  font-size: 24px;
  margin-bottom: 12px;
}

.tip-card h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 8px;
}

.tip-card p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  text-align: center;
}

.footer p {
  font-size: 13px;
  color: var(--text-muted);
}

/* Responsive */
@media (max-width: 640px) {
  .function-header {
    flex-wrap: wrap;
    gap: 4px;
  }

  .function-desc {
    width: 100%;
    order: 3;
  }

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

  .params td:first-child {
    width: auto;
  }

  .params td:nth-child(2) {
    display: none;
  }
}
