header {
  margin: 2em 0 0 0;
  width: 100%;
}

header {
  display: flex;
  justify-content: space-between;
}

header h1 {
  font-size: 2em;
}

main {
  position: relative;
}

main input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

main label {
  position: absolute;
  top: 2em;
  right: 0;
  padding: 0.5em 1em;
  background: var(--bg1);
  cursor: pointer;
}

main label:hover {
  color: var(--fg1);
}

main label::before {
  content: "← →";
}

main input:checked ~ article {
  max-width: 1024px;
}

main input:checked ~ label::before {
  content: "→ ←";
}

article {
  max-width: 768px;
}

.page-header {
  margin: 0;
  padding: 1em 0;
  max-width: unset;
  background: var(--bg1);
  display: flex;
  justify-content: center;
}

.page-header div {
  max-width: 1024px;
  width: 100%;
  display: flex;
  justify-content: space-between;
}

.page-header a {
  color: var(--fg2);
  text-decoration: none;
}

.page-header a::before {
  content: "←";
  margin-right: 0.5em;
}

.page-header a:hover {
  color: var(--fg1);
}

section {
  margin: 2em 0;
}

section h2 {
  font-size: 1.5em;
}

section p {
  margin: 1em 0;
}

article a {
  color: var(--accent3);
  text-decoration-color: var(--fg2);
}

article a:hover {
  text-decoration-color: var(--accent3);
}

article code {
  background: var(--bg1);
  padding: 0 0.2em;
  margin: 0 0.2em;
}

.theme-toggle {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.theme-label {
  position: absolute;
  top: 0;
  right: 1em;
  height: 2rem;
  width: 2rem;
  margin: 0.6rem 0 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5em;
  color: #a0a0b4;
  cursor: pointer;
}

.theme-label:hover {
  color: #f6f7fa;
}

.theme-label::before {
  content: "☀";
}

.theme-toggle:checked ~ .theme-label {
  margin: 0.5rem 0 0 0;
  color: #0a191e;
}

.theme-toggle:checked ~ .theme-label:hover {
  color: #a0a0b4;
}

.theme-toggle:checked ~ .container {
  --bg1: #f6f7fa;
  --bg2: #ececf0;
  --fg1: #a0a0b4;
  --fg2: #0a191e;
}

.theme-toggle:checked ~ label::before {
  content: "☾";
}

.theme-toggle:checked ~ .container .social {
  filter: invert(1);
}

.image {
  margin: 1em 0;
  border: 4px double var(--fg2);
  max-width: 60%;
}

@media (max-width: 1180px) and (min-width: 800px) {
  .page-header div {
    padding: 0 1em;
  }

  header time {
    padding-right: 3.5em;
  }
}

@media (max-width: 800px) {
  .page-header div {
    padding: 0 1em;
    flex-direction: column;
  }

  .page-header div > * + * {
    margin-top: 0.5em;
  }

  main label {
    display: none;
  }

  .theme-label {
    top: 0.25em;
    right: 0.5em;
  }

  .image {
    max-width: 100%;
  }
}
