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

:root {
  color-scheme: light dark;
  --bg: #fffce0;
  --text: #424242;
  --border: #424242;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #424242;
    --text: #fffce0;
    --border: #fffce0;
  }
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #fffce0;
  --text: #424242;
  --border: #424242;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #424242;
  --text: #fffce0;
  --border: #fffce0;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Kay Pho Du", serif;
  font-weight: 400;
  line-height: 1.6;
}

body,
body * {
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.page {
  max-width: 780px;
  margin: 0 auto;
  padding: 72px 24px 96px;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.header {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.eyebrow {
  margin: 0;
  letter-spacing: 0.35em;
  font-size: 0.7rem;
}

h1 {
  margin: 0;
  font-size: clamp(2.5rem, 6.2vw, 3.55rem);
  letter-spacing: 0.02em;
  line-height: 1.1;
}

h2 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: 0.28em;
}

.intro {
  margin: 0;
  max-width: 62ch;
  font-size: 1.12rem;
}

.section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.list li {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  padding-bottom: 2px;
}

a:focus-visible {
  outline: 2px solid var(--border);
  outline-offset: 4px;
}

.theme-toggle {
  position: fixed;
  top: 20px;
  right: 24px;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  padding: 6px;
  cursor: pointer;
  text-transform: lowercase;
  display: inline-flex;
  align-items: center;
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--border);
  outline-offset: 4px;
}

.toggle-track {
  width: 46px;
  height: 22px;
  border: 1px solid var(--border);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  padding: 2px;
  transition: background 0.2s ease;
}

.toggle-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--text);
  transform: translateX(0);
  transition: transform 0.22s ease;
}

.theme-toggle[aria-pressed="true"] .toggle-thumb {
  transform: translateX(22px);
}

@media (max-width: 600px) {
  .page {
    padding: 56px 20px 72px;
  }

  .eyebrow {
    letter-spacing: 0.25em;
  }

  .theme-toggle {
    right: 16px;
  }
}
