:root {
  --bg: #f5f2eb;
  --bg-texture: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.4 0 0 0 0 0.36 0 0 0 0 0.3 0 0 0 0.07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --text: #1f2328;
  --muted: #656d76;
  --link: #0969da;
  --border: #d0d7de;
}

:root[data-theme="dark"] {
  --bg: #0d1117;
  --bg-texture: none;
  --text: #e6edf3;
  --muted: #8b949e;
  --link: #58a6ff;
  --border: #30363d;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0 auto;
  padding: 1.5rem 1.25rem;
  max-width: 42rem;
  background: var(--bg) var(--bg-texture);
  color: var(--text);
  font-family: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  font-size: 1.2rem;
  line-height: 1.6;
}

a {
  color: var(--link);
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.site-header h1 {
  margin: 0;
  font-size: 1.9rem;
}

.site-header h1 a {
  color: inherit;
  text-decoration: none;
}

.theme-toggle {
  position: relative;
  flex: none;
  width: 2.5rem;
  height: 1.2rem;
  padding: 0;
  background: var(--bg);
  border: 1px solid var(--text);
  border-radius: 999px;
  cursor: pointer;
}

.theme-toggle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0.15rem;
  width: 0.85rem;
  height: 0.85rem;
  background: var(--text);
  border-radius: 50%;
  transform: translateY(-50%);
  transition: left 0.15s ease;
}

.theme-toggle[aria-checked="true"]::after {
  left: calc(100% - 1rem);
}

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

.profile-links {
  display: flex;
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

section {
  margin: 2.5rem 0;
}

h2 {
  margin-bottom: 0.75rem;
  font-size: 1.6rem;
}

.post-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.post-list li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
}

time {
  color: var(--muted);
  font-size: 0.9rem;
}

.post-meta {
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
}
