:root {
  --bg: #ffffff;
  --text: #212121;
  --accent: #1261b9;
  --button: #cc4522;
  --measure: 70ch;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121212;
    --text: #e0e0e0;
    --accent: #bb86fc;
    --button: #03dac6;
  }
}

/** Accessibility-centric CSS */
/** --- */
*:focus {
  box-shadow: 0 0 0 0.25rem white;
  outline: 0.375rem double black;
  border-radius: 0.125rem;
}

.sr-only {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

#skip a {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  background-color: goldenrod;
  color: white;
}

#skip a:focus {
  position: static;
  width: auto;
  height: auto;
}
/** --- */

body {
  font-family:
    system-ui,
    -apple-system,
    sans-serif;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  max-width: var(--measure);
  margin: 4rem auto;
  padding: 0 1.5rem;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3 {
  line-height: 1.2;
  margin-top: 2.5rem;
}

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border 0.2s;
}

a:hover {
  border-bottom: 1px solid var(--accent);
}

main a {
  text-decoration: underline;
  transition: none;
}

main a:hover {
  border-bottom: none;
}

nav {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 3rem;
  font-weight: 500;
}

nav ul {
  list-style: none;
  padding: 0;
  display: flex;
  gap: 1.5rem;
}

nav a[aria-current="page"] {
  font-weight: bold;
  border-bottom: 2px solid var(--accent);
}

section {
  margin-bottom: 4rem;
}

.item-list {
  list-style: none;
  padding: 0;
}

.item-list li {
  margin-bottom: 1.5rem;
}

.article-data {
  display: flex;
  flex-direction: row;
  gap: 16px;
  align-items: flex-start;
  justify-content: flex-start;
}

.article-data-divider {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05rem;
  opacity: 0.7;
}

.date {
  color: black;
  font-family: monospace;
  opacity: 0.6;
  font-size: 0.9rem;
  display: block;
}

.tags {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05rem;
  opacity: 0.7;
}

footer {
  margin-top: 8rem;
  padding-top: 2rem;
  border-top: 1px solid #eee;
  font-size: 0.9rem;
  opacity: 0.6;
}

footer p {
  color: black;
}

@media (max-width: 400px) {
  .article-data {
    flex-direction: column;
  }

  .article-data-divider {
    display: none;
  }
}

@media (prefers-color-scheme: dark) {
  footer p {
    color: white;
  }

  .date {
    color: white;
  }
}
