@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("./assets/Poppins-Light-Subset.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 200;
  font-display: swap;
  src: url("./assets/Poppins-ExtraLight-Subset.woff2") format("woff2");
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(https://fonts.gstatic.com/l/font?kit=pxiByp8kv8JHgFVrLGT9V15vEv-LegpljUKGlsN9ukWc9xZG6Y7VwTs24GJK8m6_-GVqkKmJGlZwYYVAbbuxyIFzxtzgxQT3eUCWXtPVdjy533Ah0SHIi1HB&skey=d4526a9b64c21b87&v=v24) format('woff2');
}

/* 
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@200;300;500&display=swap&text=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890?!.,'" rel="stylesheet">
*/

@view-transition {
  navigation: auto;
}

:root {
  --large-screen: 992px;
  --medium-screen: 768px;

  --accent: rgb(8, 76, 207);
  --background: rgb(246, 245, 240);
  --text-color: rgb(75, 83, 97);
  --border-color: rgba(8, 76, 207, 0.3);
}

* {
  box-sizing: border-box;
}

*:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

html {
  scroll-padding-top: var(--header-height, 0);
}

body {
  font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue",
    sans-serif;
  font-weight: 300;

  color: var(--text-color);
  background-color: var(--background);
  margin: 0 auto;
  max-width: var(--large-screen);
  text-wrap-style: pretty;
}

nav {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  background-color: inherit;

  > * {
    height: 3rem;
    margin-block: 0.5rem;
    margin-inline: 1rem;
  }

  :first-child {
    margin-inline-end: auto;
  }

  ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-inline-start: 0;
    padding-inline-start: 0;
  }

  li:has(svg) {
    height: 20px;
  }

  svg {
    fill: var(--accent);
  }

  @media screen and (width < 768px) {
    flex-direction: column;
    align-items: flex-start;

    :nth-child(2) {
      margin-block-start: 0;
    }
  }
}

h1,
h2,
h3 {
  font-weight: 200;
  color: var(--accent);
  letter-spacing: 3px;
  margin-block: 0;
}

h1 {
  padding-inline: 0.5rem;
}

h2 {
  margin-block: 2rem;
  padding-inline: 1.5rem;
}

h3 {
  letter-spacing: 1px;
}

a {
  text-decoration: none;
  color: var(--accent);
  letter-spacing: 1px;
  font-weight: 200;
}

p {
  margin-block: 0;
}

.px-4 {
  padding-inline: 1rem;
}

section.items {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-block-end: 3rem;

  a {
    border: 1px solid transparent;
    border-radius: 5px;
    color: inherit;
    letter-spacing: normal;
    font-weight: 300;
    outline-offset: -2px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
    margin-inline: 1rem;

    .thumbnail {
      display: none;
    }

    .details {
      font-size: 0.75rem;
    }

    p {
      font-size: 0.875rem;
    }

    h3 {
      font-size: 1.125rem;
      color: var(--accent);
    }

    &:hover {
      border-color: var(--border-color);
      box-shadow: var(--border-color) 3px 3px 0px 0px;
    }
  }
}

@media screen and (width >= 992px) {
  section.items a:has(.thumbnail) {
    display: grid;
    grid-template-columns: 300px 1fr;
    grid-template-rows: max-content max-content 1fr;
    grid-template-areas:
      "thumbnail details"
      "thumbnail title"
      "thumbnail summary";
    column-gap: 1.5rem;

    .thumbnail {
      display: block;
      grid-area: thumbnail;
      border-radius: 3px;
      overflow: clip;
    }

    .details {
      grid-area: details;
      padding-top: 0.5rem;
    }

    h3 {
      grid-area: title;
    }

    p {
      grid-area: summary;
      margin-right: 0.5rem;
    }
  }
}

.cover {
  object-fit: cover;
}
.contain {
  object-fit: contain;
}
