:root {
  color-scheme: dark;
  --bg: #090c12;
  --panel: #111722;
  --panel-soft: #151d2a;
  --border: #273244;
  --text: #edf1f7;
  --muted: #a9b3c3;
  --accent: #7c83ff;
  --accent-strong: #22d3ee;
  --code: #0d131d;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 20% 0%, rgb(99 102 241 / 14%), transparent 32rem),
    var(--bg);
  color: var(--text);
  font: 16px/1.7 Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
}

a {
  color: var(--accent-strong);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.wrap {
  width: min(100% - 2rem, 980px);
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgb(39 50 68 / 85%);
  background: rgb(9 12 18 / 88%);
  backdrop-filter: blur(14px);
}

.header-content,
.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.header-content {
  min-height: 4rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  font-size: 1.1rem;
  font-weight: 800;
}

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

.brand-mark {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 0.2rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: 0 0 1.25rem rgb(34 211 238 / 45%);
}

nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.25rem;
}

nav a {
  padding: 0.35rem 0.65rem;
  border: 1px solid transparent;
  border-radius: 0.5rem;
  color: var(--muted);
  font-size: 0.86rem;
}

nav a:hover,
nav a[aria-current="page"] {
  border-color: var(--border);
  background: var(--panel-soft);
  color: var(--text);
  text-decoration: none;
}

.content {
  min-height: calc(100vh - 11rem);
  padding-block: 3.5rem 5rem;
}

.content > :first-child {
  margin-top: 0;
}

h1,
h2,
h3 {
  line-height: 1.25;
  letter-spacing: -0.025em;
}

h1 {
  margin: 0 0 1.5rem;
  font-size: clamp(2.25rem, 6vw, 3.75rem);
}

h2 {
  margin: 3.25rem 0 1rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
  font-size: 1.65rem;
}

h3 {
  margin: 2rem 0 0.75rem;
  font-size: 1.2rem;
}

p,
li {
  color: var(--muted);
}

strong {
  color: var(--text);
}

blockquote {
  margin: 1.5rem 0;
  padding: 0.8rem 1rem;
  border-left: 3px solid var(--accent);
  border-radius: 0 0.6rem 0.6rem 0;
  background: rgb(99 102 241 / 8%);
}

blockquote p {
  margin: 0;
}

code,
pre {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

code {
  padding: 0.12rem 0.35rem;
  border: 1px solid var(--border);
  border-radius: 0.35rem;
  background: var(--code);
  color: #dbeafe;
  font-size: 0.9em;
}

pre {
  overflow-x: auto;
  padding: 1rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: var(--code);
  box-shadow: inset 0 1px rgb(255 255 255 / 3%);
}

pre code {
  padding: 0;
  border: 0;
  background: transparent;
}

table {
  display: block;
  overflow-x: auto;
  width: 100%;
  margin: 1.5rem 0;
  border-spacing: 0;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
}

th,
td {
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--panel-soft);
  color: var(--text);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

tr:last-child td {
  border-bottom: 0;
}

img {
  max-width: 100%;
}

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

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

.footer-content {
  min-height: 5rem;
  font-size: 0.9rem;
}

@media (max-width: 760px) {
  .header-content {
    align-items: flex-start;
    flex-direction: column;
    padding-block: 0.8rem;
  }

  nav {
    justify-content: flex-start;
  }

  .content {
    padding-top: 2.25rem;
  }
}
