:root {
  color-scheme: light;
  --ink: #17211b;
  --muted: #5d6b64;
  --line: #c8d5cf;
  --accent: #0f766e;
  --accent-dark: #115e59;
  --paper: #fbfcf7;
  --band: #edf5f0;
  --code: #10231e;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.65;
  letter-spacing: 0;
}

a {
  color: var(--accent-dark);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

.site-header {
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 68px;
  padding: 14px max(24px, calc((100vw - 1120px) / 2));
  border-bottom: 1px solid var(--line);
  background: rgba(251, 252, 247, 0.94);
  position: sticky;
  top: 0;
}

.brand,
.github-link {
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

nav {
  display: flex;
  flex: 1;
  gap: 8px;
  overflow-x: auto;
}

nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 7px 9px;
  border-radius: 8px;
  white-space: nowrap;
}

nav a[aria-current="page"] {
  color: var(--ink);
  background: var(--band);
}

main {
  padding: 54px 24px 80px;
}

.content {
  max-width: 860px;
  margin: 0 auto;
}

h1,
h2,
h3 {
  line-height: 1.15;
  letter-spacing: 0;
}

h1 {
  max-width: 780px;
  margin: 0 0 22px;
  font-size: 3rem;
}

h2 {
  margin: 44px 0 14px;
  font-size: 1.65rem;
}

h3 {
  margin: 30px 0 12px;
  font-size: 1.2rem;
}

p,
ul {
  margin: 0 0 20px;
}

li + li {
  margin-top: 8px;
}

pre {
  margin: 22px 0;
  padding: 18px;
  overflow-x: auto;
  color: #e6f3ee;
  background: var(--code);
  border-radius: 8px;
}

figure {
  margin: 30px 0;
}

img {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: 8px;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.92em;
}

p code,
li code {
  padding: 0.1em 0.3em;
  background: var(--band);
  border-radius: 5px;
}

@media (max-width: 760px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    position: static;
  }

  nav {
    width: 100%;
    flex-wrap: wrap;
    overflow-x: visible;
  }

  main {
    padding-top: 36px;
  }

  h1 {
    font-size: 2.2rem;
  }
}
