:root {
  color-scheme: dark;
  --bg: #090c11;
  --panel: #0c1118;
  --panel-deep: #0a0e14;
  --text: #f2f4f7;
  --muted: #a7b1bd;
  --accent: #8fcaef;
  --accent-deep: #4a90c2;
  --accent-soft: #8fcaef26;
  --line: #1f2833;
  --line-strong: #2c3947;
  --radius: 6px;
  --max: 1120px;
  --font: Inter, "Segoe UI", -apple-system, BlinkMacSystemFont, Arial, Helvetica, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-synthesis: none;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a {
  color: inherit;
  text-decoration: none;
}
a:hover {
  color: var(--accent);
}
button {
  font: inherit;
  cursor: pointer;
}
button,
a,
input {
  -webkit-tap-highlight-color: transparent;
}
svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.svg-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
.wrap {
  width: min(var(--max), 91%);
  margin-inline: auto;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: absolute;
  left: 15px;
  top: -80px;
  z-index: 10;
  background: var(--accent);
  color: #090c11;
  padding: 10px 14px;
  border-radius: var(--radius);
  font-weight: 700;
}
.skip-link:focus {
  top: 10px;
}

/* ---------- Header ---------- */
.site-header {
  min-height: 78px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 26px;
  position: relative;
  z-index: 3;
  background: #090c11ee;
  backdrop-filter: blur(6px);
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 2.5px;
  padding-right: 24px;
  border-right: 1px solid var(--line);
}
.brand:hover {
  color: inherit;
}
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: url("/assets/favicon.svg") center / contain no-repeat;
}
nav {
  display: flex;
  gap: 26px;
  align-items: center;
  height: 100%;
  font-size: 14px;
}
nav a {
  padding: 12px 0;
  position: relative;
  color: var(--muted);
}
nav a:hover {
  color: var(--text);
}
nav a.active {
  color: var(--accent);
}
nav a.active:after {
  content: "";
  position: absolute;
  bottom: -14px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  box-shadow: 0 0 9px #8fcaef59;
}
.header-actions {
  margin-left: auto;
  display: flex;
  gap: 14px;
  align-items: center;
}
.github-link {
  display: flex;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  padding: 8px;
}
.github-link:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.menu-toggle {
  display: none;
}

/* ---------- Buttons ---------- */
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  min-height: 50px;
  padding: 14px 24px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: transform 0.18s, background 0.18s, border-color 0.18s;
}
.button:hover {
  transform: translateY(-2px);
  color: inherit;
}
.primary {
  background: linear-gradient(140deg, #b7e0f7, #6db3e0);
  color: #0a1118;
  border-color: #a9d8f2;
  box-shadow: inset 0 0 0 2px #ffffff14, 0 6px 24px #4a90c21f;
}
.primary:hover {
  box-shadow: 0 7px 27px #4a90c23d;
}
.secondary {
  background: #10161fb0;
  color: var(--text);
  border-color: var(--line-strong);
}
.secondary:hover {
  background: #171f2a;
}
.small {
  min-height: 38px;
  padding: 8px 18px;
  font-size: 12px;
}
.arrow {
  width: 19px;
}
.arrow.flip {
  transform: rotate(180deg);
}

/* ---------- Sections ---------- */
.section {
  border-top: 1px solid var(--line);
  padding-block: 58px 64px;
}
.eyebrow {
  text-transform: uppercase;
  color: var(--accent);
  font-size: 11px;
  letter-spacing: 2.4px;
  font-weight: 600;
  margin: 0 0 13px;
}
h1 {
  font-size: clamp(36px, 4.6vw, 58px);
  line-height: 1.08;
  letter-spacing: -1.8px;
  margin: 0 0 20px;
  font-weight: 750;
}
h1 span,
h2 span {
  color: var(--accent);
}
h2 {
  font-size: clamp(28px, 3.2vw, 40px);
  line-height: 1.14;
  letter-spacing: -1.2px;
  margin: 0 0 16px;
  font-weight: 750;
}
h3 {
  font-size: 20px;
  letter-spacing: -0.4px;
  margin: 0 0 10px;
  font-weight: 700;
}
.section > .wrap > .intro,
.section-intro {
  max-width: 640px;
  color: var(--muted);
  font-size: 16px;
  margin: 0 0 34px;
}
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.text-link {
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
}
.text-link:hover {
  text-decoration: underline;
}
.text-link .arrow {
  width: 17px;
  transition: transform 0.15s;
}
.text-link:hover .arrow {
  transform: translateX(3px);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: url("/assets/hero-bg.webp") center 30% / cover no-repeat;
  opacity: 0.5;
}
.hero-grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: linear-gradient(#8fcaef0e 1px, transparent 1px),
    linear-gradient(90deg, #8fcaef0e 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 90% 80% at 30% 20%, #000 30%, transparent 75%);
}
.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 640px) 1fr;
  align-items: center;
  min-height: 460px;
  padding-block: 72px 84px;
}
.hero-copy .eyebrow {
  margin-bottom: 15px;
}
.hero-lead {
  color: #d6dde5;
  font-size: 17px;
  line-height: 1.7;
  max-width: 520px;
  margin: 0 0 28px;
  text-shadow: 0 1px 8px #000a;
}
.hero-buttons {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.hero-proof {
  list-style: none;
  display: flex;
  padding: 0;
  margin: 34px 0 0;
  align-items: center;
  font-size: 12px;
  color: #c3ccd6;
}
.hero-proof li {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 0 16px;
  border-right: 1px solid #ffffff12;
  white-space: nowrap;
}
.hero-proof li:first-child {
  padding-left: 0;
}
.hero-proof li:last-child {
  border: 0;
  padding-right: 0;
}
.hero-proof svg {
  color: var(--accent);
  width: 16px;
  height: 16px;
}

/* ---------- Cards ---------- */
.cards {
  display: grid;
  gap: 16px;
}
.cards.cols-2 {
  grid-template-columns: 1fr 1fr;
}
.cards.cols-3 {
  grid-template-columns: repeat(3, 1fr);
}
.card {
  position: relative;
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(150deg, #0b1018, #0d1219);
  padding: 26px 28px 30px;
  transition: transform 0.2s, border-color 0.2s;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-deep);
  color: inherit;
}
.card .arrow {
  position: absolute;
  bottom: 20px;
  right: 22px;
  width: 18px;
  color: var(--accent);
}
.card + .cards {
  margin-top: 16px;
}
.card h3 {
  margin: 12px 0 8px;
}
.card p {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
  max-width: 460px;
}
.card .icon {
  color: var(--accent);
  width: 26px;
  height: 26px;
}
.card-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted);
  margin-top: 18px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  border: 1px solid var(--line-strong);
  color: var(--muted);
  border-radius: 4px;
  padding: 3px 8px;
}
.badge.oss {
  color: #9fd8ae;
  border-color: #2c4a36;
  background: #9fd8ae0d;
}
.badge.private {
  color: #e8c88f;
  border-color: #4a3f2c;
  background: #e8c88f0d;
}
.card h3 .domain {
  color: var(--muted);
  font-weight: 400;
  font-size: 15px;
}
/* ---------- Writing list ---------- */
.article-list {
  display: grid;
  gap: 12px;
}
.article-row {
  display: grid;
  grid-template-columns: 130px 1fr auto;
  gap: 22px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 26px;
  background: var(--panel-deep);
  transition: border-color 0.2s, transform 0.2s;
}
.article-row:hover {
  border-color: var(--accent-deep);
  transform: translateY(-2px);
  color: inherit;
}
.article-row time {
  font-size: 12px;
  color: var(--muted);
  font-family: var(--mono);
}
.article-row h3 {
  margin: 0 0 5px;
  font-size: 17px;
}
.article-row .topic {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: var(--accent);
  font-weight: 600;
}
.article-row p {
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
}
.article-row .arrow {
  width: 18px;
  color: var(--accent);
}

/* ---------- Approach / terminal ---------- */
.approach-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 26px;
}
.approach {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 24px 28px;
  background: var(--panel-deep);
}
.approach svg {
  color: var(--accent);
  width: 30px;
  height: 30px;
  margin-bottom: 14px;
}
.approach h3 {
  font-size: 16px;
  margin-bottom: 8px;
}
.approach p {
  color: var(--muted);
  font-size: 13.5px;
  margin: 0;
}
.terminal {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  overflow: hidden;
  background: #070b10;
}
.terminal-bar {
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: linear-gradient(#20262e, #171c22);
  border-bottom: 1px solid #2c343d;
  font-size: 12px;
  color: #aeb7c2;
}
.traffic-lights {
  position: absolute;
  left: 12px;
  display: flex;
  gap: 7px;
}
.traffic-lights i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #ff6058;
  border: 1px solid #ffffff40;
}
.traffic-lights i:nth-child(2) {
  background: #ffbd2e;
}
.traffic-lights i:nth-child(3) {
  background: #29c940;
}
.copy-button {
  position: absolute;
  right: 9px;
  color: #c4cbd2;
  border: 0;
  background: transparent;
  font-size: 11px;
  padding: 3px 7px;
  border-radius: 3px;
}
.copy-button:hover {
  background: #ffffff15;
}
pre {
  padding: 16px 18px;
  margin: 0;
  overflow-x: auto;
  line-height: 1.55;
  font-size: 13px;
  tab-size: 2;
}
code {
  font-family: var(--mono);
}
.comment {
  color: #8b96a3;
}
.cmd {
  color: var(--accent);
}
.prompt {
  color: #6d7a88;
  user-select: none;
}

/* ---------- Consulting ---------- */
.consult-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.service {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 26px 30px;
  background: linear-gradient(150deg, #0b1018, #0d1219);
}
.service svg {
  color: var(--accent);
  width: 30px;
  height: 30px;
  margin-bottom: 14px;
}
.service p {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}
.service ul {
  color: var(--muted);
  font-size: 13px;
  padding-left: 18px;
  margin: 14px 0 0;
}
.service li {
  margin-bottom: 6px;
}
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-deep);
  margin-top: 30px;
}
.steps > div {
  padding: 22px 26px;
  border-right: 1px solid var(--line);
}
.steps > div:last-child {
  border-right: 0;
}
.steps .step-no {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  margin-bottom: 8px;
}
.steps h3 {
  font-size: 15px;
}
.steps p {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}
.contact-panel {
  margin-top: 30px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: linear-gradient(150deg, #0d1420, #0b1018);
  padding: 26px 30px;
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}
.contact-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  flex: 1;
  min-width: 260px;
}
.contact-panel .button {
  margin: 0;
}

/* ---------- Article pages ---------- */
.article-header {
  padding-block: 54px 34px;
  border-bottom: 1px solid var(--line);
}
.article-header .topic {
  color: var(--accent);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 2.2px;
  font-weight: 600;
  margin: 0 0 12px;
}
.article-header h1 {
  font-size: clamp(30px, 3.6vw, 44px);
  max-width: 780px;
}
.article-header .meta {
  display: flex;
  gap: 18px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  margin-top: 14px;
  font-family: var(--mono);
}
.prose {
  max-width: 720px;
  padding-block: 40px 64px;
}
.prose p {
  color: #c6cfd9;
  font-size: 16px;
  line-height: 1.75;
  margin: 0 0 20px;
}
.prose h2 {
  font-size: 26px;
  margin: 40px 0 14px;
}
.prose h3 {
  font-size: 19px;
  margin: 30px 0 10px;
}
.prose ul,
.prose ol {
  color: #c6cfd9;
  font-size: 16px;
  line-height: 1.75;
  margin: 0 0 20px;
  padding-left: 24px;
}
.prose li {
  margin-bottom: 6px;
}
.prose blockquote {
  margin: 24px 0;
  padding: 14px 22px;
  border-left: 3px solid var(--accent-deep);
  background: var(--panel-deep);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--muted);
}
.prose blockquote p {
  margin: 0;
  font-size: 15px;
}
.prose code {
  background: #ffffff0d;
  border: 1px solid #ffffff0f;
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 14px;
  color: var(--accent);
}
.prose pre {
  margin: 24px 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #070b10;
  font-size: 13.5px;
  line-height: 1.6;
}
.prose pre code {
  background: none;
  border: 0;
  padding: 0;
  color: #d7dee6;
}
.prose .caption {
  color: var(--muted);
  font-size: 13px;
  margin: -12px 0 24px;
}
.figure {
  margin: 28px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-deep);
  padding: 18px;
  overflow-x: auto;
}
.figure svg {
  width: 100%;
  height: auto;
  display: block;
  min-width: 560px;
}
.article-footer {
  border-top: 1px solid var(--line);
  padding-block: 26px 60px;
  max-width: 720px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

/* ---------- Page hero (inner pages) ---------- */
.page-head {
  padding-block: 56px 40px;
  border-bottom: 1px solid var(--line);
}
.page-head h1 {
  max-width: 760px;
}
.page-head .lead {
  color: var(--muted);
  font-size: 16.5px;
  max-width: 640px;
  margin: 0;
}
.page-body {
  padding-block: 44px 64px;
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 40px;
  align-items: start;
}
.facts {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-deep);
  overflow: hidden;
}
.facts dl {
  margin: 0;
  display: grid;
}
.facts dl > div {
  padding: 14px 20px 15px;
  border-bottom: 1px solid var(--line);
}
.facts dl > div:last-child {
  border-bottom: 0;
}
.facts dt {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1.8px;
  font-size: 10.5px;
  font-weight: 600;
  margin: 0 0 4px;
}
.facts dd {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
}
.facts a {
  color: var(--accent);
}
.facts a:hover {
  text-decoration: underline;
}

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--line);
  color: #8d99a6;
  font-size: 12.5px;
}
.footer-inner {
  display: flex;
  align-items: center;
  gap: 22px;
  padding-block: 26px;
  flex-wrap: wrap;
}
.footer-brand {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 2px;
  color: #bdc1c6;
}
.footer-links {
  display: flex;
  gap: 18px;
  align-items: center;
}
.footer-links a:hover {
  color: var(--accent);
}
.footer-note {
  margin-left: auto;
}

/* ---------- 404 ---------- */
.error-page {
  text-align: center;
  padding-block: 120px 140px;
}
.error-page .code {
  font-family: var(--mono);
  font-size: 64px;
  color: var(--accent);
  letter-spacing: -2px;
  margin: 0 0 10px;
}
.error-page p {
  color: var(--muted);
  margin: 0 0 28px;
}

/* ---------- Diagrams ---------- */
.diagram text {
  font-family: var(--font);
  fill: var(--muted);
  font-size: 11px;
}
.diagram .box {
  fill: #0c1118;
  stroke: var(--line-strong);
  rx: 4;
}
.diagram .box-accent {
  stroke: var(--accent-deep);
}
.diagram .edge {
  stroke: #3a4a5a;
  stroke-width: 1.3;
  fill: none;
}
.diagram .edge-label {
  fill: #7d8894;
  font-size: 9.5px;
  font-family: var(--mono);
}
.diagram .title {
  fill: var(--text);
  font-weight: 700;
}

/* ---------- Responsive ---------- */
@media (max-width: 1150px) {
  .site-header {
    gap: 18px;
  }
  .brand {
    padding-right: 16px;
    font-size: 19px;
  }
  nav {
    gap: 18px;
  }
  .approach-grid,
  .cards.cols-3,
  .consult-grid,
  .steps {
    grid-template-columns: 1fr 1fr;
  }
  .steps > div:nth-child(2) {
    border-right: 0;
  }
  .article-row {
    grid-template-columns: 110px 1fr auto;
    gap: 16px;
  }
}
@media (max-width: 850px) {
  .wrap {
    width: min(var(--max), calc(100% - 48px));
  }
  .site-header {
    min-height: 68px;
  }
  .brand {
    border: 0;
    padding: 0;
  }
  .menu-toggle {
    display: flex;
    order: 4;
    width: 30px;
    height: 32px;
    padding: 6px 0;
    flex-direction: column;
    justify-content: space-around;
    background: none;
    border: none;
  }
  .menu-toggle span {
    height: 2px;
    width: 22px;
    background: #d4dbe2;
    border-radius: 2px;
  }
  nav {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: #0c121a;
    border-bottom: 1px solid var(--line-strong);
    padding: 18px 24px;
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }
  nav.open {
    display: flex;
  }
  nav a.active:after {
    display: none;
  }
  .hero-inner {
    grid-template-columns: 1fr;
    min-height: 0;
    padding-block: 56px 60px;
  }
  .cards.cols-2 {
    grid-template-columns: 1fr;
  }
  .about-grid {
    grid-template-columns: 1fr;
  }
  .article-row {
    grid-template-columns: 1fr auto;
  }
  .article-row time {
    grid-column: 1 / -1;
  }
}
@media (max-width: 600px) {
  .wrap {
    width: calc(100% - 36px);
  }
  .site-header {
    padding: 0 4px;
    gap: 12px;
  }
  .header-actions .small {
    display: none;
  }
  .github-link {
    display: none;
  }
  .hero-bg {
    opacity: 0.35;
  }
  .hero-proof {
    flex-wrap: wrap;
    gap: 12px 0;
  }
  .hero-proof li {
    width: 50%;
    border: 0;
    padding: 0;
    justify-content: center;
  }
  .approach-grid,
  .cards.cols-3,
  .consult-grid,
  .steps {
    grid-template-columns: 1fr;
  }
  .steps > div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .steps > div:last-child {
    border-bottom: 0;
  }
  .button {
    font-size: 13px;
    padding: 12px 18px;
  }
  .footer-inner {
    gap: 12px;
  }
  .footer-note {
    margin-left: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *:before,
  *:after {
    transition: none !important;
  }
}
