:root {
  --bg: #0b0b0c;
  --surface: #111113;
  --sunken: #0e0e10;
  --line: #1f1f23;
  --line-strong: #2a2a2f;
  --text: #ededef;
  --text-2: #d4d4d8;
  --muted: #a1a1aa;
  --subtle: #8b8b94;
  --accent: #ff5a1f;
  --accent-hover: #ff7040;
  --ok: #4ade80;
  --syntax-keyword: #ff8a5b;
  --syntax-type: #f5d08a;
  --syntax-prop: #9cc2ff;
  --syntax-string: #8bd5a0;
  --radius: 16px;
  --gutter: clamp(20px, 4vw, 40px);
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

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

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
p,
pre {
  margin: 0;
}

ul,
ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

button {
  font: inherit;
}

::selection {
  background: var(--accent);
  color: var(--bg);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

section[id] {
  scroll-margin-top: 72px;
}

.container {
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.label {
  font: 13px/1.6 var(--mono);
  color: var(--subtle);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgb(11 11 12 / 0.8);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.02em;
}

.brand .muted {
  color: var(--subtle);
}

.brand .accent {
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14px;
}

.nav-links a:not(.btn) {
  color: var(--muted);
  transition: color 0.15s ease;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 10px;
  font-weight: 500;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.btn svg {
  width: 16px;
  height: 16px;
  flex: none;
  transition: transform 0.15s ease;
}

.btn:hover svg {
  transform: translateX(2px);
}

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

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

.btn-ghost {
  border: 1px solid var(--line-strong);
}

.btn-ghost:hover {
  border-color: #3f3f46;
  background: var(--surface);
}

.btn-sm {
  min-height: 36px;
  padding: 0 14px;
  font-size: 14px;
}

.btn-lg {
  min-height: 52px;
  padding: 0 24px;
}

.hero {
  padding-block: clamp(56px, 9vw, 120px) clamp(64px, 9vw, 112px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  align-items: center;
  gap: 56px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  font: 13px/1.6 var(--mono);
  color: var(--muted);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.hero h1 {
  font-size: clamp(40px, 5.4vw, 72px);
  line-height: 1.03;
  letter-spacing: -0.045em;
  font-weight: 600;
}

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

.lead {
  margin-top: 28px;
  max-width: 520px;
  font-size: clamp(17px, 1.4vw, 19px);
  color: var(--muted);
}

.actions {
  margin-top: 36px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.editor {
  min-width: 0;
  background: var(--sunken);
  border: 1px solid #26262a;
  border-radius: 14px;
  overflow: hidden;
}

.editor-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px 0 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.dots {
  display: flex;
  gap: 6px;
  flex: none;
}

.dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line-strong);
}

.tabs {
  display: flex;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tabs button {
  flex: none;
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--subtle);
  font: 13px/1 var(--mono);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.tabs button:hover {
  color: var(--text-2);
}

.tabs button[aria-selected="true"] {
  color: var(--text);
  border-bottom-color: var(--accent);
}

.tabs button:focus-visible {
  outline-offset: -2px;
}

.code {
  padding: 20px 0;
  overflow-x: auto;
  white-space: normal;
  font: 13.5px/1.85 var(--mono);
  color: var(--muted);
}

.code:focus-visible {
  outline-offset: -2px;
  border-radius: 0;
}

.code code {
  display: block;
  counter-reset: line;
}

.line {
  display: block;
  padding-right: 20px;
  white-space: pre;
}

.line::before {
  counter-increment: line;
  content: counter(line);
  display: inline-block;
  width: 32px;
  margin-right: 16px;
  text-align: right;
  color: #55555e;
}

.k {
  color: var(--syntax-keyword);
}

.t {
  color: var(--syntax-type);
}

.p {
  color: var(--syntax-prop);
}

.s {
  color: var(--syntax-string);
}

.v {
  color: var(--text);
}

.editor-status {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 16px;
  border-top: 1px solid var(--line);
  font: 12px/1.6 var(--mono);
  color: var(--subtle);
}

.branch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.branch::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ok);
}

.band {
  border-top: 1px solid var(--line);
}

.section {
  padding-block: clamp(72px, 9vw, 112px);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px 48px;
  margin-bottom: 48px;
}

.section-head > p {
  max-width: 380px;
  color: var(--muted);
}

h2 {
  margin-top: 8px;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.035em;
  font-weight: 600;
}

.stack-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.card {
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: border-color 0.2s ease;
}

.card:hover {
  border-color: var(--line-strong);
}

.ext {
  align-self: flex-start;
  padding: 6px 10px;
  border: 1px solid #26262a;
  border-radius: 8px;
  font: 13px/1.4 var(--mono);
  color: var(--accent);
}

.card h3 {
  margin-top: 8px;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.card p {
  font-size: 15px;
  color: var(--muted);
}

.tags {
  margin-top: auto;
  padding-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tags li {
  padding: 4px 10px;
  border-radius: 6px;
  background: #1a1a1d;
  font: 12px/1.6 var(--mono);
  color: var(--text-2);
}

.band h2 + .steps {
  margin-top: 48px;
}

.steps {
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
}

.step {
  counter-increment: step;
  padding-top: 24px;
  border-top: 1px solid var(--line-strong);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.step::before {
  content: counter(step, decimal-leading-zero);
  font: 13px/1.6 var(--mono);
  color: var(--accent);
}

.step h3 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.step p {
  font-size: 15px;
  color: var(--muted);
}

.contact {
  padding-bottom: clamp(72px, 9vw, 112px);
}

.contact-card {
  padding: clamp(32px, 6vw, 80px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
}

.contact-card h2 {
  margin: 0;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.contact-card p {
  margin-top: 20px;
  max-width: 520px;
  font-size: 18px;
  color: var(--muted);
}

.site-footer {
  border-top: 1px solid var(--line);
}

.footer {
  padding-block: 28px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  font-size: 14px;
  color: var(--subtle);
}

.footer nav {
  display: flex;
  gap: 24px;
}

.footer a {
  transition: color 0.15s ease;
}

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

@media (max-width: 1024px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .stack-grid,
  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .nav-links a:not(.btn) {
    display: none;
  }

  .hero {
    gap: 40px;
  }

  .stack-grid,
  .steps {
    grid-template-columns: minmax(0, 1fr);
  }

  .card {
    padding: 24px;
  }

  .code {
    padding: 16px 0;
    font-size: 12.5px;
  }

  .line::before {
    width: 24px;
    margin-right: 12px;
  }

  .dots {
    display: none;
  }

  .editor-bar {
    padding-left: 4px;
  }

  .contact-card .btn {
    width: 100%;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
