:root {
  --bg: #111;
  --text: #eee;
  --muted: #999;
}

html.light {
  --bg: #f7f7f5;
  --text: #111;
  --muted: #666;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.6;
}

.badge {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 5;
  font-family: "IBM Plex Serif", Georgia, serif;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1;
  color: var(--text);
  pointer-events: none;
}

main {
  max-width: 640px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

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

.top h1 {
  margin: 0 0 8px;
  font-family: "IBM Plex Serif", Georgia, serif;
  font-size: 2rem;
  font-weight: 500;
}

#theme-toggle {
  flex-shrink: 0;
  width: 40px;
  height: 22px;
  margin: 0;
  padding: 2px;
  border: 1px solid var(--muted);
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
}

#theme-toggle::after {
  content: "";
  display: block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--text);
}

html.light #theme-toggle {
  background: var(--text);
  border-color: var(--text);
}

html.light #theme-toggle::after {
  margin-left: auto;
  background: var(--bg);
}

h2 {
  margin: 48px 0 16px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

h3 {
  margin: 24px 0 6px;
  font-size: 1.05rem;
  font-weight: 600;
}

h3 a {
  text-decoration: none;
}

h3.project a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

p {
  margin: 0 0 12px;
  color: var(--muted);
}

.top + p,
h3 + p,
.about {
  color: var(--text);
}

.about {
  margin-top: 8px;
}

a {
  color: var(--text);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--muted);
}
