:root,
html[data-theme="light"] {
  color-scheme: light;
  --page-bg-solid: #f5f7fb;
  --page-bg: linear-gradient(180deg, #ffffff 0%, #f8fafc 42%, #f3f6fb 100%);
  --text-primary: #111827;
  --text-secondary: #4b5563;
  --text-muted: #64748b;
  --link: #2563eb;
  --link-hover: #1d4ed8;
  --border: rgba(148, 163, 184, 0.28);
  --button-bg: rgba(255, 255, 255, 0.86);
  --button-bg-hover: #ffffff;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --page-bg-solid: #131313;
    --page-bg:
      radial-gradient(circle at 80% 16%, rgba(173, 198, 255, 0.08), transparent 36%),
      linear-gradient(180deg, rgba(32, 32, 34, 0.22), transparent 42%),
      #131313;
    --text-primary: #e5e2e1;
    --text-secondary: #c2c6d6;
    --text-muted: #8c909f;
    --link: #adc6ff;
    --link-hover: #d7e4ff;
    --border: rgba(66, 71, 84, 0.72);
    --button-bg: rgba(32, 31, 31, 0.92);
    --button-bg-hover: #2a2a2a;
  }
}

html[data-theme="dark"] {
  color-scheme: dark;
  --page-bg-solid: #131313;
  --page-bg:
    radial-gradient(circle at 80% 16%, rgba(173, 198, 255, 0.08), transparent 36%),
    linear-gradient(180deg, rgba(32, 32, 34, 0.22), transparent 42%),
    #131313;
  --text-primary: #e5e2e1;
  --text-secondary: #c2c6d6;
  --text-muted: #8c909f;
  --link: #adc6ff;
  --link-hover: #d7e4ff;
  --border: rgba(66, 71, 84, 0.72);
  --button-bg: rgba(32, 31, 31, 0.92);
  --button-bg-hover: #2a2a2a;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--page-bg-solid);
  min-height: 100%;
}

body {
  background: var(--page-bg);
  color: var(--text-primary);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
  margin: 0;
  min-height: 100vh;
}

main,
footer {
  margin: 0 auto;
  max-width: 880px;
  padding: 24px;
}

.content-header {
  display: grid;
  gap: 14px;
  margin: 0 auto;
  padding: 32px 0 18px;
  width: min(1180px, calc(100% - 32px));
}

.brand {
  color: var(--text-primary);
  font-size: 18px;
  font-weight: 850;
  line-height: 24px;
  text-decoration: none;
}

.content-header__row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
}

.content-header nav,
footer {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

footer p {
  flex-basis: 100%;
  margin: 0;
}

a {
  color: var(--link);
  font-weight: 800;
  text-decoration: none;
}

a:hover,
a:focus-visible {
  color: var(--link-hover);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.visually-hidden {
  border: 0;
  clip: rect(0 0 0 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
}

.theme-toggle {
  background: var(--button-bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--link);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 850;
  line-height: 18px;
  padding: 8px 12px;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  background: var(--button-bg-hover);
  color: var(--link-hover);
}

.static-topbar {
  align-items: center;
  background: var(--page-bg-solid);
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(170px, 1fr) auto minmax(170px, 1fr);
  min-height: 80px;
  padding: 0 30px;
}

.static-topbar__brand {
  color: var(--link);
  font-size: 22px;
  font-weight: 950;
  letter-spacing: 0;
  text-decoration: none;
  white-space: nowrap;
}

.static-topbar__nav {
  align-items: center;
  display: flex;
  gap: 22px;
  justify-content: center;
}

.static-topbar__nav a {
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 22px;
  text-decoration: none;
}

.static-topbar__nav a[aria-current="page"],
.static-topbar__nav a:hover,
.static-topbar__nav a:focus-visible {
  color: var(--link);
  outline: none;
  text-decoration: none;
}

.static-topbar__actions {
  align-items: center;
  display: flex;
  gap: 18px;
  justify-content: flex-end;
}

.static-icon-button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 999px;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  height: 36px;
  justify-content: center;
  padding: 0;
  text-decoration: none;
  width: 36px;
}

.static-icon-button svg {
  height: 22px;
  stroke: currentColor;
  stroke-width: 2.15;
  width: 22px;
}

.static-icon-button:hover,
.static-icon-button:focus-visible {
  background: var(--button-bg);
  color: var(--link);
  outline: 2px solid rgba(37, 99, 235, 0.18);
  outline-offset: 2px;
  text-decoration: none;
}

.theme-icon--sun {
  display: none;
}

html[data-theme="dark"] .theme-icon--moon {
  display: none;
}

html[data-theme="dark"] .theme-icon--sun {
  display: block;
}

@media (max-width: 820px) {
  .static-topbar {
    grid-template-columns: 1fr;
    justify-items: start;
    min-height: auto;
    padding: 18px 16px;
  }

  .static-topbar__nav {
    gap: 16px;
    justify-content: flex-start;
    overflow-x: auto;
    width: 100%;
  }

  .static-topbar__actions {
    gap: 12px;
    justify-content: flex-start;
  }
}

h1 {
  color: var(--text-primary);
  font-size: 42px;
  line-height: 1.1;
  margin: 24px 0 10px;
}

h2 {
  color: var(--text-primary);
  font-size: 22px;
  margin: 32px 0 8px;
}

.date,
p {
  color: var(--text-secondary);
}

.date {
  color: var(--text-muted);
}
