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

:root {
  --bg: #0D1117;
  --surface: #161B22;
  --border: #30363D;
  --blue: #1F6FEB;
  --blue-lt: #58A6FF;
  --green: #3FB950;
  --green-lt: #56D364;
  --text: #E6EDF3;
  --muted: #8B949E;
  --mono: 'JetBrains Mono', monospace;
  --sans: 'Inter', sans-serif;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  overflow-x: hidden;
  width: 100%;
}

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

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

a:hover {
  text-decoration: underline;
}

/* ── NAV ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 17, 23, .88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 56px;
}

.nav-brand {
  font-family: var(--mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--green);
  letter-spacing: -.02em;
}

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

.nav-links a {
  color: var(--muted);
  font-size: .9rem;
  font-weight: 500;
  transition: color .2s;
}

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

.nav-cta {
  background: var(--blue);
  color: #fff !important;
  padding: .35rem .9rem;
  border-radius: 6px;
  font-size: .85rem;
  font-weight: 600;
  transition: background .2s;
}

.nav-cta:hover {
  background: #388bfd !important;
  text-decoration: none !important;
}
/* ── NAV TOGGLE (hamburger) ── */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 34px;
  height: 34px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 101;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .25s ease, opacity .2s ease;
}

.nav-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 780px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(13, 17, 23, .98);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease;
  }

  .nav-links.open {
    max-height: 400px;
  }

  .nav-links a {
    width: 100%;
    padding: .9rem 1.25rem;
    border-bottom: 1px solid var(--border);
    font-size: 1rem;
  }

  .nav-links a.nav-cta {
    display: inline-block;
    width: auto;
    margin: .85rem 1.25rem;
    text-align: center;
    border-bottom: none;
  }
}

/* ── HERO ── */
.hero {
  min-height: calc(100vh - 56px);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  padding: 4rem 2rem 3rem;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(31, 111, 235, .13) 0%, transparent 70%);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: rgba(63, 185, 80, .1);
  border: 1px solid rgba(63, 185, 80, .3);
  color: var(--green-lt);
  font-size: .8rem;
  font-weight: 600;
  font-family: var(--mono);
  padding: .3rem .8rem;
  border-radius: 999px;
  margin-bottom: 1.5rem;
  letter-spacing: .04em;
}

.hero h1 {
  font-family: var(--mono);
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 700;
  color: var(--text);
  line-height: 1.1;
  letter-spacing: -.04em;
  margin-bottom: .75rem;
}

.hero h1 span {
  color: var(--green);
}

.hero-sub {
  color: var(--muted);
  font-size: clamp(.95rem, 2vw, 1.15rem);
  max-width: 560px;
  margin: 0 auto 2rem;
}

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

.btn-primary {
  background: var(--green);
  color: #0D1117;
  font-weight: 700;
  font-size: .95rem;
  padding: .65rem 1.5rem;
  border-radius: 8px;
  transition: background .2s, transform .15s;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
}

.btn-primary:hover {
  background: var(--green-lt);
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  font-size: .95rem;
  padding: .65rem 1.5rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  transition: border-color .2s, transform .15s;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
}

.btn-secondary:hover {
  border-color: var(--blue-lt);
  text-decoration: none;
  transform: translateY(-1px);
}

/* ── TERMINAL ── */
.terminal-wrap {
  width: 100%;
  max-width: 680px;
  margin: 3rem auto 0;
}

.terminal {
  background: #010409;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  text-align: left;
  box-shadow: 0 24px 48px rgba(0, 0, 0, .5);
}

.terminal-bar {
  background: #1C2128;
  padding: .6rem 1rem;
  display: flex;
  align-items: center;
  gap: .5rem;
  border-bottom: 1px solid var(--border);
}

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

.dot.r {
  background: #FF5F57;
}

.dot.y {
  background: #FEBC2E;
}

.dot.g {
  background: #28C840;
}

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

.terminal-body {
  padding: 1.25rem 1.5rem;
  font-family: var(--mono);
  font-size: .85rem;
  line-height: 1.8;
  min-height: 160px;
}

.t-prompt {
  color: var(--green);
}

.t-cmd {
  color: var(--text);
}

.t-out {
  color: var(--muted);
}

.t-success {
  color: var(--green-lt);
}

.t-info {
  color: var(--blue-lt);
}

.cursor {
  display: inline-block;
  width: 8px;
  height: 1em;
  background: var(--green);
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

/* ── SECTION COMMONS ── */
section {
  padding: 5rem 2rem;
}

.container {
  max-width: 1040px;
  margin: 0 auto;
}

.section-label {
  font-family: var(--mono);
  font-size: .78rem;
  font-weight: 600;
  color: var(--green);
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: .75rem;
}

.section-title {
  font-family: var(--mono);
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.03em;
  margin-bottom: 1rem;
}

.section-desc {
  color: var(--muted);
  max-width: 560px;
  font-size: .98rem;
}

/* ── FEATURES ── */
#features {
  border-top: 1px solid var(--border);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-top: 3rem;
}

.feat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  transition: border-color .25s;
}

.feat-card:hover {
  border-color: var(--blue);
}

.feat-icon {
  font-size: 1.5rem;
  margin-bottom: .75rem;
}

.feat-card h3 {
  font-size: .98rem;
  font-weight: 600;
  margin-bottom: .4rem;
  color: var(--text);
}

.feat-card p {
  font-size: .88rem;
  color: var(--muted);
  line-height: 1.5;
}

/* ── INSTALL ── */
#install {
  border-top: 1px solid var(--border);
}

.steps {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-top: 3rem;
}

.step {
  display: flex;
  gap: 1.5rem;
  min-width: 0;
}

.step-num {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  background: rgba(31, 111, 235, .15);
  border: 1px solid rgba(88, 166, 255, .3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: .85rem;
  font-weight: 700;
  color: var(--blue-lt);
}

.step-body h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: .5rem;
  color: var(--text);
}
.step-body {
  min-width: 0;
  flex: 1;
}

.step-body p {
  font-size: .9rem;
  color: var(--muted);
  margin-bottom: .75rem;
}

/* ── CODE BLOCKS ── */
pre {
  background: #010409;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  font-family: var(--mono);
  font-size: .82rem;
  line-height: 1.7;
  overflow-x: auto;
  max-width: 100%;
  color: var(--text);
  position: relative;
}

pre .cm {
  color: var(--muted);
}

pre .kw {
  color: var(--blue-lt);
}

pre .str {
  color: #A5D6FF;
}

pre .flag {
  color: #FFA657;
}

pre .out {
  color: var(--green-lt);
}

.copy-btn {
  position: absolute;
  top: .6rem;
  right: .75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: .72rem;
  font-family: var(--mono);
  padding: .2rem .55rem;
  border-radius: 5px;
  cursor: pointer;
  transition: color .2s, border-color .2s;
}

.copy-btn:hover {
  color: var(--text);
  border-color: var(--blue-lt);
}

/* ── USAGE ── */
#usage {
  border-top: 1px solid var(--border);
}

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

@media (max-width: 700px) {
  .usage-grid {
    grid-template-columns: 1fr;
  }
}

.usage-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  min-width: 0;
}

.usage-card h3 {
  font-size: .95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: .35rem;
}

.usage-card p {
  font-size: .85rem;
  color: var(--muted);
  margin-bottom: .9rem;
}

.usage-card pre {
  margin: 0;
}

/* ── CLI TABLE ── */
.cli-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.5rem;
  font-size: .88rem;
}

.cli-table th {
  text-align: left;
  padding: .6rem 1rem;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-family: var(--mono);
  font-size: .78rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.cli-table td {
  padding: .65rem 1rem;
  border-bottom: 1px solid rgba(48, 54, 61, .5);
  vertical-align: top;
}

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

.cli-table tr:hover td {
  background: rgba(255, 255, 255, .02);
}

.cli-flag {
  font-family: var(--mono);
  color: #FFA657;
  font-size: .83rem;
}

.cli-desc {
  color: var(--muted);
}

/* ── VSCODE ── */
#vscode {
  border-top: 1px solid var(--border);
}

.vscode-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 3rem;
  align-items: start;
}
.vscode-grid > div {
  min-width: 0;
}

@media (max-width: 700px) {
  .vscode-grid {
    grid-template-columns: 1fr;
  }
}

.vscode-cmds {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  margin-top: 1rem;
}

.vscode-cmd {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.1rem;
  transition: border-color .2s;
}

.vscode-cmd:hover {
  border-color: var(--blue);
}

.vscode-cmd h4 {
  font-family: var(--mono);
  font-size: .82rem;
  color: var(--blue-lt);
  margin-bottom: .3rem;
}

.vscode-cmd p {
  font-size: .84rem;
  color: var(--muted);
}

.kbd {
  display: inline-block;
  background: #1C2128;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: var(--mono);
  font-size: .75rem;
  color: var(--text);
  padding: .05rem .45rem;
  margin: 0 .1rem;
}

/* ── ARCH ── */
#architecture {
  border-top: 1px solid var(--border);
}

.arch-flow {
  display: flex;
  align-items: center;
  gap: 0;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 3rem;
}

.arch-node {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .7rem 1.2rem;
  font-family: var(--mono);
  font-size: .82rem;
  color: var(--text);
  text-align: center;
  min-width: 120px;
}

.arch-node.highlight {
  border-color: var(--green);
  color: var(--green-lt);
}

.arch-arrow {
  color: var(--muted);
  font-size: 1.2rem;
  padding: 0 .4rem;
}

@media (max-width: 700px) {
  .arch-flow {
    flex-direction: column;
  }

  .arch-arrow {
    transform: rotate(90deg);
  }
}

/* ── TUTORIAL ── */
#tutorial {
  border-top: 1px solid var(--border);
}

.video-wrap {
  position: relative;
  width: 100%;
  max-width: 960px;
  margin: 2.5rem auto 0;
  padding-top: 54%;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 24px 48px rgba(0, 0, 0, .5);
  background: #000;
}

.video-wrap iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

@media (max-width: 700px) {
  .video-wrap {
    padding-top: 56.25%;
    border-radius: 8px;
  }
}

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 2rem;
  text-align: center;
  color: var(--muted);
  font-size: .85rem;
}

footer a {
  color: var(--blue-lt);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

@media (max-width: 600px) {
  nav {
    padding: 0 1rem;
  }

  section {
    padding: 3.5rem 1.25rem;
  }

  .step {
    flex-direction: column;
    gap: .75rem;
  }

  .hero {
    padding: 3rem 1.25rem 2.5rem;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .hero-actions .btn-primary,
  .hero-actions .btn-secondary {
    width: 100%;
    justify-content: center;
  }

  .terminal-body {
    padding: 1rem;
    font-size: .78rem;
  }

  .cli-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}