:root {
  --bg: rgba(253, 251, 250, 1);
  --text: rgba(5, 5, 5, 1);
  /* --link: #0033cc; */
  --link: rgb(37, 61, 138);
  --hover: rgb(0, 0, 138);
  --accent: #0033cc;
  --code: #ddd;
}

:root[data-theme="dark"] {
  --bg: rgba(5, 5, 5, 1);
  --text: rgba(253, 251, 250, 1);
  --link: rgba(218, 194, 138, 1);
  --hover: rgb(248, 224, 138);
  --accent: #ffff00; /* yellow accent */
  --code: #444;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 1.25rem;
  line-height: 1.6;
}

header,
main,
footer {
  max-width: 50rem;
  margin: auto;
  padding: 1rem;
}

h1 {
  font-size: 1.25em;
  text-transform: uppercase;
}

a {
  color: var(--link);
  font-weight: 500;
}

.unbutton {
  background-color: transparent;
  color: inherit;
  border: none;
  margin: 0;
  padding: 0;
  text-align: inherit;
  font: inherit;
  border-radius: 0;
  appearance: none;
}

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

a:focus,
button:focus {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.site-navigation > ul {
	align-items: center;
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	gap: 1.75em;
	list-style: none;
	padding-inline: 0;
	width: 100%;
}

.pagination {
	display: flex;
  flex-direction: column;
  gap: 0.5em;
  text-align: center;
}

.pagination > h2 {
  font-size: 1em;
  margin-block: 0;
}

.pagination > ul {
  line-height: 2em;
  list-style: none;
  margin-block: 0.25em;
  padding-inline: 0;
}

.pagination > span {
  display: flex;
  flex-direction: column;
  gap: 0.5em;
  width: 100%;
}

.skip-link {
  position: absolute;
  left: -999px;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  background: var(--bg);
  padding: 0.5rem;
}

.posts {
  display: flex;
  flex-direction: column;
  gap: 3em;
  list-style: none;
  margin-block-end: 5em;
  padding-inline: 0;
}

.posts__details {
  display: flex;
  flex-direction: column;
  margin-block: 0;
  padding-block: 0;
}

.posts > li > p {
  margin: 0;
  padding: 0;
}

.posts .tags {
  display: inline-flex
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
}

.tags > li::after {
  content: ','
}

.tags > li:last-child::after {
  content: ''
}

.tags > p {
  display: none
}

h3:has(a) {
  margin-block-end: 0
}

h3:has(a) ~ p {
  margin-block-start: 0
}

.icon {
  height: 2em;
  border: 0
}

figure {
  max-width: 90%;
  margin: 0 auto;
}

figure > img {
  max-width: 95%
}

code {
  background-color: var(--code)
}

pre {
  background-color: var(--code);
  white-space: pre-wrap
}

table td {
  vertical-align: top;
}

@media (min-width: 40rem) {
  .pagination > ul {
    display: flex;
    flex-direction: row;
    gap: 1em;
  }

  .pagination > ul.left-align {
    justify-content: flex-start;
  }

  .pagination > ul.right-align {
    justify-content: flex-end;
  }

  .pagination > ul.center {
    justify-content: space-around;
  }
}