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

:root {
  --primary: #e8e6e1;
  --secondary: #d9d4c9;
  --text: #1a1614;
  --subtle: #5c6670;
  --accent: #e85a24;
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary: #1a1614;
    --secondary: #4a3f38;
    --text: #e8e6e1;
    --subtle: #8c8680;
    --accent: #cc5500;
  }
}

body {
  background-color: var(--primary);
  color: var(--text);
  font-family: system-ui, sans-serif;
  line-height: 1.5;
  max-width: 80ch;
  margin-inline: auto;
  padding-inline: 1rem;
}

main {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
}

h1,
h2,
h3,
h4 {
  font-weight: 600;
  letter-spacing: 0.025em;
}

b {
  font-weight: 600;
}

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

code,
pre {
  font-family: ui-monospace, monospace;
  font-size: 0.875rem;
}

pre {
  margin-bottom: 1rem;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-top: 0.25rem;
  width: fit-content;
}

.btn {
  background-color: var(--secondary);
  border: 2px solid var(--primary);
  padding-inline: 0.5rem;
  position: relative;
  width: fit-content;
}

.btn::before {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  width: 8px;
  height: 8px;
  border-top: 2px solid var(--accent);
  border-left: 2px solid var(--accent);
  opacity: 0;
  transition: opacity 200ms;
}

.btn::after {
  content: "";
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
  border-bottom: 2px solid var(--accent);
  border-right: 2px solid var(--accent);
  opacity: 0;
  transition: opacity 200ms;
}

.btn:hover::before,
.btn:hover::after {
  opacity: 1;
}

hr {
  border: none;
  border-top: 1px solid var(--subtle);
  margin-block: 1rem;
  opacity: 0.3;
}

ul,
ol {
  padding-left: 1.5em;
}

ul {
  list-style-type: square;
}

p {
  padding-block: 0.5rem;
}

p a {
  text-decoration: underline;
}

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

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

.post-list li {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.post-list a:hover {
  text-decoration: underline;
  text-decoration-color: var(--accent);
}

.subtle {
  color: var(--subtle);
}

.accent {
  color: var(--accent);
}

.mono {
  font-family: ui-monospace, monospace;
}

.sm {
  font-size: 0.875rem;
  line-height: 1.25rem;
}
