:root {
  color-scheme: light;
  --background: #fff;
  --text: #262626;
  --muted: #737373;
  --line: #e4e4e4;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --background: #111;
    --text: #e5e5e5;
    --muted: #a3a3a3;
    --line: #333;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --background: #111;
  --text: #e5e5e5;
  --muted: #a3a3a3;
  --line: #333;
}

* { box-sizing: border-box; }

html {
  background: var(--background);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.75;
  overflow-wrap: break-word;
  scrollbar-gutter: stable;
  -webkit-text-size-adjust: 100%;
}

body {
  max-width: 588px;
  margin: 0 auto;
  padding: 32px 24px 96px;
}

a { color: inherit; text-underline-offset: 3px; }
a:hover { text-decoration: underline; }
button { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 5px; }
[hidden] { display: none !important; }

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 44px;
  margin-bottom: 80px;
}

.name { font-size: 16px; font-weight: 600; text-decoration: none; }
.header nav { display: flex; align-items: center; gap: 28px; }
.header nav a, .theme-toggle {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
  text-decoration: none;
}
.header nav a[aria-current="page"] { color: var(--text); text-decoration: underline; }
.header nav a:hover, .theme-toggle:hover { color: var(--text); }
.theme-toggle { border: 0; padding: 0; background: none; cursor: pointer; }

.article-list { margin: 0; padding-left: 24px; }
.article-list li { padding-left: 1px; margin-block: 6px; }
.article-list a { font-size: 16px; font-weight: 550; text-decoration: none; }
.article-list a:hover { text-decoration: underline; }

.about { margin-top: 88px; }
.about::before { content: ""; display: block; width: 84px; border-top: 1px solid var(--line); margin-bottom: 24px; }
p { margin: 0 0 18px; }
p:last-child { margin-bottom: 0; }
h1 { margin: 0 0 38px; font-size: 28px; line-height: 1.4; letter-spacing: -.035em; font-weight: 600; text-wrap: balance; }
h2 { margin: 36px 0 14px; font-size: 19px; line-height: 1.4; font-weight: 600; }
.article ul, .article ol { padding-left: 24px; margin-block: 18px; }
.article li { margin-block: 6px; }
.article img { display: block; max-width: 100%; height: auto; }
.article pre { overflow-x: auto; padding: 16px; border: 1px solid var(--line); }
.article blockquote { margin-inline: 0; padding-left: 20px; border-left: 2px solid var(--line); }
.article-footer { margin-top: 48px; font-size: 14px; color: var(--muted); }

.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 2; padding: 8px 12px; background: var(--background); transform: translateY(-160%); }
.skip-link:focus { transform: none; }

@media (max-width: 600px) {
  body { padding: 20px 24px 64px; }
  .header { margin-bottom: 52px; }
  .header nav { gap: 24px; }
  .about { margin-top: 64px; }
  h1 { font-size: 26px; margin-bottom: 30px; }
}
