@layer layout {
  body {
    background-color: hsl(var(--color-hsl-background));
    color: hsl(var(--color-hsl));
    padding: calc(var(--gap) * 0.75);
    justify-content: space-between;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 auto;
    min-height: 100vh;
    width: 100%;
    gap: calc(var(--gap) * 1);
    max-width: 56rem;

    @media (min-width: 768px) {
      padding-top: calc(var(--gap) * 1.5);
      padding-bottom: calc(var(--gap) * 1.5);
    }

    > header {
      display: flex;
      flex-direction: row-reverse;
      justify-content: space-between;
      align-items: center;
      gap: var(--gap);
      width: 100%;

      > section {
        display: flex;
        flex-direction: column;
        gap: calc(var(--gap) / 3);
      }

      h1 {
        font-size: 2rem;
        font-weight: var(--font-weight-black);
        letter-spacing: var(--letter-spacing-tighter);
      }

      h2 {
        font-size: 1rem;
        max-width: 65ch;
        line-height: var(--line-height);
        text-wrap: balance;
        font-weight: var(--font-weight-semibold);
        letter-spacing: var(--letter-spacing);
      }

      > figure {
        width: 9rem;
        height: 9rem;
        min-width: 9rem;
        position: relative;
        transform: rotate(3deg);
        filter: drop-shadow(0 0 0.5rem hsla(var(--color-hsl), 0.175));

        @media (prefers-color-scheme: dark) {
          filter: drop-shadow(0 0 1rem hsla(var(--color-hsl), 0.175));
        }

        img {
          width: 100%;
          height: 100%;
          clip-path: var(--squircle);
          object-fit: cover;
        }

        figcaption {
          display: none;
        }
      }

      @media (max-width: 768px) {
        flex-direction: column;
        padding-top: var(--gap);

        h1 {
          font-size: 2rem;
          text-align: center;
        }

        h2 {
          text-align: center;
          text-wrap: balance;
        }

        > figure {
          transform: none;
        }
      }
    }
  }

  footer {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border-top: var(--border);
    padding-top: var(--gap);

    nav ul {
      display: flex;
      gap: var(--gap);
      align-items: center;
      justify-content: center;

      li b {
        font-size: 1.5rem;
      }

      @media (max-width: 768px) {
        flex-direction: column;
        gap: calc(var(--gap) / 4);
      }
    }
  }

  main {
    display: flex;
    flex-direction: column;
    gap: var(--gap);
    width: 100%;

    article {
      display: flex;
      width: 100%;
      gap: var(--gap);
      align-items: start;
      border-top: var(--border);
      padding-top: var(--gap);

      header {
        width: 28%;
        display: flex;
        align-items: start;
        justify-content: start;

        h3 {
          font-size: 1.382rem;
          font-weight: var(--font-weight-bold);
          text-wrap: balance;
          line-height: 1.2;
        }
      }

      section {
        width: 72%;
      }

      nav ul {
        display: flex;
        flex-direction: column;
        gap: calc(var(--gap) / 8);

        li {
          padding-left: 1.25rem;
          position: relative;

          &::before {
            content: "→";
            position: absolute;
            font-weight: var(--font-weight-semibold);
            left: 0;
            top: 0;
          }
        }

        @media (max-width: 768px) {
          gap: calc(var(--gap) / 3);
        }
      }

      @media (max-width: 768px) {
        flex-direction: column;

        header,
        section {
          width: 100%;
        }
      }
    }
  }
}
