:root {
  --bg: #ffffff;
  --text: #121212;
  --muted: #666668;
  --line: #e8e8e8;
  --accent: #121212;
  --link: #121212;
  --code: #f5f5f7;
  color-scheme: light;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

:root[data-theme="dark"] {
  --bg: #0e0e10;
  --text: #ededef;
  --muted: #8e8e93;
  --line: #222226;
  --accent: #ededef;
  --link: #ededef;
  --code: #18181b;
  color-scheme: dark;
}

::selection {
  background: #121212;
  color: #ffffff;
}

:root[data-theme="dark"] ::selection {
  background: #ededef;
  color: #0e0e10;
}

html {
  scroll-padding-top: calc(env(safe-area-inset-top, 0px) + 64px);
  -webkit-text-size-adjust: 100%;
  scrollbar-color: var(--line) var(--bg);
  scrollbar-width: thin;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

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

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

::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.65 var(--sans);
  overflow-x: hidden;
  caret-color: var(--accent);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  background: var(--bg);
  z-index: 10;
}

html.t *,
html.t *::before,
html.t *::after {
  transition:
    background-color 0.25s ease,
    color 0.25s ease,
    border-color 0.25s ease !important;
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: var(--line);
  transition:
    text-decoration-color 0.15s ease,
    color 0.15s ease;
}

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

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

.wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}

code {
  font-family: var(--mono);
  font-size: 0.9em;
}

header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  z-index: 9;
}

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

nav .brand {
  font: 500 14px var(--mono);
  color: var(--text);
  text-decoration: none;
}

nav ul {
  display: flex;
  align-items: center;
  gap: 22px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 15px;
}

nav ul a {
  color: var(--muted);
  text-decoration: none;
}

nav ul a:hover {
  color: var(--text);
}

#theme {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  padding: 0;
}

#theme:hover {
  border-color: var(--accent);
  color: var(--accent);
}

#theme svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.i-moon {
  display: none;
}

:root[data-theme="dark"] .i-sun {
  display: none;
}

:root[data-theme="dark"] .i-moon {
  display: block;
}

.hero {
  padding: 60px 0 44px;
}

h1 {
  font-size: clamp(32px, 4.8vw, 42px);
  font-weight: 600;
  line-height: 1.15;
  font-family: var(--sans);
  letter-spacing: -0.02em;
  margin: 0 0 16px;
  max-width: 22ch;
  text-wrap: balance;
}

.lede {
  max-width: 66ch;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.6;
  margin: 0;
  text-wrap: pretty;
}

.lede strong {
  color: var(--text);
  font-weight: 600;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: 18px;
  font: 500 14px var(--mono);
}

.hero-links .sep {
  color: var(--line);
}
