:root {
  color-scheme: light dark;
  --background: #ffffff;
  --foreground: #222;
  --text-secondary: #000;
  --accent: #666;
  --code-background: #f2f2f2;
  --selection-background: #bbb;
  --selection-foreground: #fff;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #000;
    --foreground: #fff;
    --text-secondary: #999;
    --accent: #ccc;
    --code-background: #181818;
    --selection-background: #bbb;
    --selection-foreground: #000;
  }
}

::selection {
  background: var(--selection-background);
  color: var(--selection-foreground);
}

body {
  max-width: 40rem;
  margin-top: 0;
  margin-left: auto;
  margin-right: auto;
  padding-left: 2rem;
  padding-right: 2rem;
  background: var(--background);
  color: var(--foreground);
  font-family: system-ui;
  font-weight: 300;
}

h1 {
  font-weight: 100;
  margin-top: 5rem;
  margin-bottom: 3rem;
}

p {
  line-height: 1.6;
  margin-block-start: 2rem;
}

code {
  padding: 0.125rem 0.25rem;
  border-radius: 0.25rem;
  background: var(--code-background);
  font-family: ui-monospace;
  font-size: 0.875rem;
}

a,
a:visited {
  color: inherit;
  text-decoration: none;
}

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

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

.post-header {
  display: grid;
  grid-template-columns: 1fr auto;
  justify-content: space-between;
  align-items: end;
  margin-bottom: 4rem;
}

.post-header h1 {
  grid-column: 1 / -1;
}

.post-list {
  padding-left: 0;
}

.post-list li {
  display: flex;
  justify-content: space-between;
  align-items: end;
}

time {
  color: var(--text-secondary);
  font-weight: 100;
}

@media (max-width: 480px) {
  .post-list li {
    flex-direction: column;
    gap: 0.25rem;
    align-items: unset;
  }
}