:root {
  color-scheme: light dark;
  --page-background: #f5f6f7;
  --page-ink: #17191c;
  --page-muted: #555b63;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: var(--page-ink);
  background: var(--page-background);
  font-synthesis: none;
}

:root[data-theme="dark"] {
  --page-background: #0d1115;
  --page-ink: #eef0f2;
  --page-muted: #a9b0b8;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 20rem;
  margin: 0;
  background: var(--page-background);
}

main {
  width: min(100% - 2.5rem, 60rem);
  margin-inline: auto;
  padding-block: clamp(4rem, 10vw, 7rem) 3rem;
}

header {
  margin-bottom: clamp(3rem, 7vw, 5rem);
}

.title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
}

h1 {
  margin: 0;
  font-size: clamp(2.5rem, 7vw, 4.75rem);
  font-weight: 600;
  letter-spacing: -0.06em;
  line-height: 0.95;
}

header p {
  max-width: 34rem;
  margin: 1.5rem 0 0;
  color: var(--page-muted);
  font-size: clamp(1rem, 2vw, 1.125rem);
  line-height: 1.6;
}

.theme-toggle {
  display: grid;
  width: 2rem;
  height: 2rem;
  flex: none;
  place-items: center;
  margin-top: 0.25rem;
  padding: 0;
  border: 0;
  color: var(--page-ink);
  background: transparent;
  cursor: pointer;
}

.theme-toggle:hover {
  opacity: 0.6;
}

.theme-toggle:focus-visible {
  border-radius: 50%;
  outline: 2px solid var(--page-ink);
  outline-offset: 2px;
}

.theme-icon {
  grid-area: 1 / 1;
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

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

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

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

h2 {
  margin: 0 0 1rem;
  font-size: 0.875rem;
  font-weight: 500;
}

footer {
  margin-top: 3rem;
  color: var(--page-muted);
  font-size: 0.8125rem;
  line-height: 1.5;
}

@media (max-width: 35rem) {
  main {
    width: min(100% - 1.5rem, 60rem);
    padding-top: 3.5rem;
  }

  .title-row {
    gap: 1rem;
  }
}