* {
  box-sizing: border-box;
}

html {
  color-scheme: light dark;
  background: light-dark(#f6f6ef, #101828);
  color: light-dark(#101828, #f6f6ef);
}

body {
  font-family: "IBM Plex Sans", sans-serif;
  max-inline-size: 80ch;
  margin-inline: auto;
  padding: clamp(1rem, 2vi, 2.5rem);
}

body > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1.1em;
  border-bottom: 1px solid #e5e7eb;

  a {
    text-decoration: none;
  }

  & > a {
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
  }

  & nav > ul {
    display: flex;
    gap: 0.9em;
    margin: 0;
    list-style: none;
  }
}

body > main {
  margin-top: 2.5rem;

  h2 {
    margin-top: 2.5rem;
  }
}

body > footer {
  margin-top: 3rem;
  border-top: 1px solid #e5e7eb;
  padding-top: 1rem;

  p {
    color: light-dark(#6a7282, #99a1af);
    display: inline;
  }
  a {
    display: inline;
  }
}

a {
  color: inherit;
}
a:hover,
a:focus-visible,
a[aria-current="page"] {
  text-decoration: underline;
}

.post-header {
  margin-bottom: 2.5rem;

  .post-title {
    margin-bottom: -0.4em;
  }

  .post-description {
    color: light-dark(#6a7282, #99a1af);
  }

  .post-metadata {
    margin-top: 1.75em;
    font-variant: small-caps;
    font-size: 75%;

    .post-published-at {
      color: light-dark(#6a7282, #99a1af);
    }
  }
}

.post-content {
  figure {
    margin: 0;

    & > img {
      display: block;
      max-width: 100%;
      margin-top: 2.5rem;
      margin-bottom: 1rem;
    }

    & > figcaption {
      margin-bottom: 2rem;
      color: light-dark(#6a7282, #99a1af);
    }
  }
}

.post-list {
  list-style: none;
  padding: 0;
  margin-bottom: 1.35rem;

  .post-list-item {
    position: relative;
    padding-left: 1.6em;
    margin-bottom: 1em;
  }

  .post-list-item::before {
    content: "";
    position: absolute;
    top: 0.45em;
    left: 0.05em;
    width: 0.5em;
    height: 0.5em;
    background-color: light-dark(#6a7282, #99a1af);
    border-radius: 50%;
  }

  .post-list-item-link {
    text-decoration: none;
  }
  .post-list-item-link:hover,
  .post-list-item-link:focus-visible {
    text-decoration: underline;
  }

  .post-list-item-published-at {
    color: light-dark(#6a7282, #99a1af);
    font-variant: small-caps;
    font-size: 75%;
  }
}

.intro {
  display: flex;
  flex-direction: column;

  .intro-title {
    display: none;
    align-self: center;
  }

  .intro-image {
    border-radius: 50%;
    width: 200px;
    height: 200px;
    object-fit: cover;
    align-self: center;
  }

  .intro-text {
    margin-top: 1.5rem;
  }

  .intro-logos {
    display: flex;
    gap: 0.5em;

    .intro-logo {
      width: 25px;
      height: 25px;
    }
  }

  .intro-print-links {
    display: none;
    margin-top: 1.5rem;

    .intro-print-link {
      display: block;
    }
  }
}

@media (max-width: 600px) {
  .intro {
    .intro-image {
      width: 150px;
      height: 150px;
    }
  }
}

@media print {
  html {
    background: none;
    color: #000;
    print-color-adjust: economy;
  }

  body {
    max-inline-size: none;

    & > header {
      display: none;
    }

    & > main {
      margin-top: 0;
    }

    a:not(.intro-logo)::after {
      content: " (" attr(href) ")";
      color: #6a7282;
      word-break: break-all;
    }

    p,
    h2,
    h3 {
      orphans: 3;
      widows: 3;
    }
  }

  .intro {
    .intro-title {
      display: block;
    }

    .intro-logos {
      display: none;
    }

    .intro-print-links {
      display: block;
    }
  }

  .post-content figure {
    break-inside: avoid;
  }
}
