/* settings  */
@layer base, components;
@import url("https://fonts.googleapis.com/css2?family=Inter:opsz,wght@14..32,100..900&family=PT+Serif:ital,wght@0,400;0,700;1,400;1,700&family=Quicksand&display=swap");

@layer base {
  :root {
    --color-dark: 32 26 41;
    --color-light: 236 236 236;
    --color-primary: 71 160 180;
    --color-secondary: 228 156 95;
    --sans-font: "Inter", sans-serif;
    --serif-font: "PT Serif", serif;
    --logo-font: "Quicksand", sans-serif;
    font-family: var(--logo-font);
  }

  body {
    color: rgb(var(--color-light));
    background: rgb(32, 26, 41);
    background: radial-gradient(
      circle,
      rgba(32, 26, 41, 1) 50%,
      rgba(23, 25, 38, 1) 100%
    );
  }

  a {
    text-decoration: none;
  }

  ul,
  li {
    list-style: none;
  }

  ul {
    padding: 0;
    margin: 0;
  }

  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    font-weight: 400;
    margin: 0;
  }

  main {
    width: 90%;
    margin: 0 5%;
  }

  @media (min-width: 768px) {
    main {
      max-width: 768px;
      margin: 0 auto;
    }
  }

  .header {
    display: flex;
    align-items: center;
    width: 90%;
    height: 120px;
    margin: 0 5%;
  }

  @media (min-width: 768px) {
    .header {
      max-width: 768px;
      margin: 0 auto;
    }
  }

  .logo {
    display: flex;
    width: 100%;
    font-size: 1.25rem;
    line-height: 1.75rem;
    font-weight: 600;
    color: rgb(var(--color-light));
  }

  .logo span {
    margin-top: -0.6rem;
    font-size: 2.25rem;
    line-height: 2.5rem;
    color: rgb(var(--color-primary));
    font-family: var(--logo-font);
  }

  nav ul {
    display: flex;
  }

  nav ul li {
    margin-right: 1.5rem;
  }

  nav ul li:last-child {
    margin-right: 0;
  }

  nav ul li a {
    font-size: 1rem;
    line-height: 1.5rem;
    font-weight: 300;
    color: rgb(var(--color-light));
    text-decoration: none;
  }

  nav ul li a:hover {
    color: rgb(var(--color-primary));
  }

  .container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 2rem auto;
  }

  .footerContainer {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100px;
    width: 50%;
    margin: 2rem auto;
    border-top: 1px solid rgb(var(--color-light) / 0.6);
  }

  article {
    font-family: var(--serif-font);
    border-bottom: 1px solid rgb(var(--color-light) / 0.6);
    padding-bottom: 2rem;
    margin-bottom: 2rem;
  }

  article:last-child {
    border-bottom: none;
  }

  article h1,
  article h2 {
    font-size: 2rem;
    line-height: 2rem;
    font-weight: 600;
    margin-bottom: 1rem;
  }

  article h2 a {
    text-decoration: none;
    color: rgb(var(--color-secondary));
  }

  article h2 a:hover {
    color: rgb(var(--color-primary));
  }

  article h2 {
    font-size: 2.5rem;
    line-height: 1.75rem;
    margin-top: 3rem;
    margin-bottom: 1rem;
    color: rgb(var(--color-primary));
  }

  article time {
    font-size: 1rem;
    line-height: 1.5rem;
    font-weight: 300;
    color: rgb(var(--color-light));
    margin-bottom: 1rem;
    font-family: var(--sans-font);
  }

  article p {
    font-size: 1.4rem;
    line-height: 2rem;
    font-weight: 300;
    margin-bottom: 1rem;
  }

  .post-header {
    margin-bottom: 2rem;
    border-bottom: 1px solid rgb(var(--color-light) / 0.6);
    padding-bottom: 1rem;
  }

  .post-header time {
    font-size: 1rem;
    line-height: 1.5rem;
    font-weight: 300;
    color: rgb(var(--color-light));
    margin-bottom: 0.5rem;
    font-family: var(--sans-font);
  }

  .post-header h1 {
    font-size: 2.5rem;
    line-height: 2.5rem;
    font-weight: 600;
    margin-top: 1rem;
    color: rgb(var(--color-secondary));
  }

  .list {
    display: flex;
  }

  .list li {
    margin-right: 1.5rem;
  }

  .list li:last-child {
    margin-right: 0;
  }

  .list li a:hover svg {
    fill: rgb(var(--color-primary) / 1);
  }

  .list li svg {
    fill: rgb(var(--color-light) / 1);
    width: 2rem;
  }
}

@layer components {
  /* major listings */
  ul:has(h2, h3) {
    list-style-type: none;
    margin-block: 3rem;
    padding: 0;

    a {
      text-decoration: none;
    }

    h3,
    p {
      margin-block: 0.25em;
    }

    p {
      color: var(--base-600);
    }

    time {
      color: var(--base-400);
    }

    li {
      margin-bottom: 2em;
      &:hover h3 {
        text-decoration: underline;
      }
    }
  }
}
