:root {
  --bg: #d6d76f;
  --fg: #28061f;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #28061f;
    --fg: #d6d76f;
  }
}

body:has(#theme-light:checked) {
  --bg: #d6d76f;
  --fg: #28061f;
}

body:has(#theme-dark:checked) {
  --bg: #28061f;
  --fg: #d6d76f;
}

body:has(#theme-black:checked) {
  --bg: #000000;
  --fg: #d6d76f;
}

:root {
  --muted: color-mix(in srgb, var(--bg) 30%, var(--fg));
  --border: color-mix(in srgb, var(--bg) 30%, var(--fg));
}

body:has(#theme-light:checked) {
  --muted: color-mix(in srgb, var(--bg) 30%, var(--fg));
  --border: color-mix(in srgb, var(--bg) 50%, var(--fg));
}

body:has(#theme-black:checked) {
  --muted: color-mix(in srgb, var(--bg) 20%, var(--fg));
  --border: color-mix(in srgb, var(--bg) 50%, var(--fg));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: monospace;
  font-size: 16px;
  line-height: 1.6;
}

.wrap {
  max-width: 64ch;
  margin: 0 auto;
  padding: 1.25rem;
}

.site-header h1 {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.tagline {
  margin: 0.15rem 0;
  color: var(--muted);
}

.site-header hr {
  margin: 1.25rem 0;
  border: none;
  border-top: 1px solid var(--border);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-bottom: 0.5rem;
}

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

a:hover {
  background: var(--fg);
  color: var(--bg);
  border-bottom-color: var(--fg);
}

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

section {
  margin-top: 3rem;
  scroll-margin-top: 2rem;
}

section h2 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 1rem;
  color: var(--muted);
}

section p {
  margin: 0 0 1rem;
}

.skill-group {
  margin-bottom: 1rem;
}

.skill-group h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 0.25rem;
}

.skill-group p {
  margin: 0;
}

.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
}

.site-footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.875rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-footer p {
  margin: 0;
}

.theme-switcher {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin: 0;
  padding: 0;
  border: none;
}

.theme-switcher legend {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.theme-switcher input[type="radio"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.theme-switcher label {
  border-bottom: 1px solid transparent;
  font-size: 0.875rem;
  color: var(--muted);
  cursor: pointer;
}

.theme-switcher label:hover {
  color: var(--fg);
}

.theme-switcher input:checked + label {
  color: var(--fg);
  border-bottom-color: var(--fg);
}

.theme-switcher input:focus-visible + label {
  outline: 2px solid var(--fg);
  outline-offset: 2px;
}
