:root {
  --bg: #0a0d12;
  --surface: #121820;
  --surface-alt: #182230;
  --border: #263345;
  --border-active: #3fb950;
  --text: #c5d1de;
  --text-muted: #7d8d9f;
  --heading: #f0f6fc;
  --green: #3fb950;
  --cyan: #58a6ff;
  --yellow: #e3b341;
  --orange: #f0883e;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --container-max: 1120px;
}

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

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

a {
  color: var(--cyan);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: #79c0ff;
  text-decoration: underline;
}

/* Global Typography & Elements */
h1, h2, h3, h4 {
  color: var(--heading);
  font-weight: 700;
  line-height: 1.25;
}

p {
  margin-bottom: 1rem;
}

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

ul, ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}

li {
  margin-bottom: 0.35rem;
}

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 3rem 0;
}

/* Header & Nav */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(10, 13, 18, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--heading);
  white-space: nowrap;
  flex-shrink: 0;
}

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

.brand svg {
  width: 28px;
  height: 28px;
}

.brand .tag {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.15rem 0.45rem;
  background: rgba(63, 185, 80, 0.15);
  color: var(--green);
  border: 1px solid rgba(63, 185, 80, 0.3);
  border-radius: 4px;
}

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

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--heading);
  text-decoration: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0 1.25rem;
  height: 42px;
  font-size: 0.92rem;
  font-weight: 600;
  border-radius: 6px;
  transition: all 0.15s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-primary {
  background-color: var(--green);
  color: #041407;
  border: 1px solid #2ea043;
}

.btn-primary:hover {
  background-color: #46c758;
  color: #041407;
  text-decoration: none;
}

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

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

/* Layout */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 4rem 1.5rem 3rem;
  max-width: 900px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 3.25rem;
  font-weight: 800;
  color: var(--heading);
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 1.25rem;
}

.hero h1 span.gradient {
  background: linear-gradient(135deg, var(--green) 0%, var(--cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p.lead {
  font-size: 1.25rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.install-bar {
  display: inline-flex;
  align-items: center;
  height: 42px;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0 1.15rem;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--heading);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.telemetry-banner {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background-color: rgba(63, 185, 80, 0.08);
  border: 1px solid rgba(63, 185, 80, 0.25);
  border-radius: 8px;
  padding: 0.65rem 1.25rem;
  margin: 1.5rem auto 0;
  color: var(--text);
  font-size: 0.88rem;
  max-width: 680px;
  text-align: left;
  line-height: 1.4;
}

.telemetry-banner strong {
  color: var(--green);
}

.install-bar .prompt {
  color: var(--green);
  margin-right: 0.6rem;
  user-select: none;
}

/* Terminal Preview Mockup */
.terminal-window {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  margin: 2rem auto 4rem;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 0.88rem;
}

.terminal-titlebar {
  background-color: #0e141c;
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border);
}

.terminal-dots {
  display: flex;
  gap: 6px;
}

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot-red { background-color: #ff5f56; }
.dot-yellow { background-color: #ffbd2e; }
.dot-green { background-color: #27c93f; }

.terminal-title {
  margin-left: auto;
  margin-right: auto;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.terminal-split {
  display: flex;
  position: relative;
  min-height: 420px;
  background-color: var(--surface);
}

.terminal-pane {
  flex: 1;
  padding: 1.25rem 1.5rem;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.6;
  white-space: pre;
}

.terminal-divider {
  width: 1px;
  background-color: var(--border);
  flex-shrink: 0;
}

.terminal-popup {
  position: absolute;
  right: 1.5rem;
  bottom: 1.25rem;
  background-color: #05070a;
  border: 1px solid #41a6b5;
  border-radius: 8px;
  padding: 0.75rem 1.15rem;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.8);
  font-family: var(--font-mono);
  font-size: 0.84rem;
  line-height: 1.45;
  min-width: 250px;
}

.terminal-popup-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.2rem;
}

.terminal-popup-key {
  color: var(--yellow);
  font-weight: 700;
  width: 1.4rem;
}

.terminal-popup-arrow {
  color: var(--text-muted);
}

.terminal-popup-desc {
  color: var(--cyan);
}

.terminal-popup-footer {
  margin-top: 0.5rem;
  padding-top: 0.4rem;
  border-top: 1px dashed rgba(65, 166, 181, 0.3);
  text-align: right;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.terminal-statusbar {
  background-color: #238636;
  color: #041407;
  font-family: var(--font-mono);
  font-weight: 600;
  padding: 0.35rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.84rem;
}

/* Features Grid */
.section-title {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  color: var(--heading);
  margin-bottom: 0.75rem;
}

.section-desc {
  text-align: center;
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 650px;
  margin: 0 auto 3rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-bottom: 4rem;
}

.card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.75rem;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.card:hover {
  transform: translateY(-2px);
  border-color: var(--border-active);
}


.card h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--heading);
  margin-bottom: 0.5rem;
}

.card p {
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Code Highlights & Docs */
pre, code {
  font-family: var(--font-mono);
}

code {
  background-color: var(--surface-alt);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-size: 0.85em;
  color: var(--cyan);
}

pre {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1rem;
  overflow-x: auto;
  margin: 1rem 0;
}

pre code {
  background-color: transparent;
  padding: 0;
  color: var(--heading);
}

/* Table */
.table-container {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.5rem 0 2rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background-color: var(--surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

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

th:last-child, td:last-child {
  border-right: none;
}

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

tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.02);
}

th {
  background-color: #0e141c;
  color: var(--heading);
  font-weight: 600;
  white-space: nowrap;
}

/* Installation Cards */
.install-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.install-card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
}

.install-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.install-card p {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: 0.75rem;
}

.install-card pre {
  margin: 0;
}

.install-card ul {
  padding-left: 1.25rem;
  margin-bottom: 0;
  font-size: 0.88rem;
}

/* Docs Content Layout */
.docs-content {
  max-width: 860px;
  margin: 0 auto;
}

.docs-content h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.docs-content h2 {
  font-size: 1.5rem;
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.docs-content h3 {
  font-size: 1.15rem;
  margin: 1.75rem 0 0.75rem;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  background-color: #07090d;
  padding: 2.5rem 1.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer .container {
  padding: 0;
}

.footer p {
  margin-bottom: 0.35rem;
}

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

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

/* Responsive */
@media (max-width: 960px) {
  .hero h1 {
    font-size: 2.5rem;
  }
  .nav-links {
    gap: 1rem;
  }
}

@media (max-width: 640px) {
  .hero h1 {
    font-size: 2rem;
  }
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .hero-actions .btn, .hero-actions .install-bar {
    width: 100%;
    justify-content: center;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .install-grid {
    grid-template-columns: 1fr;
  }
  .nav-links {
    gap: 0.75rem;
  }
  .nav-links li:not(:last-child):not(:first-child) {
    display: none;
  }
}
