@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Source+Serif+4:ital,opsz,wght@0,8..60,200..900;1,8..60,200..900&display=swap');

/* GOBAL STYLES */

h1,h2,h3 {
  font-family: "Source Serif 4", serif;
}
body {
  margin: 0;
  padding: 0;
  font-family: "Inter", sans-serif;
}
html {
  scroll-behavior: smooth;

  --text-light: rgb(0 0 0 / 0.5);
  --background-secondary: #FAFAFA;
}
* {
  box-sizing: border-box;
}

a {
  color: rgb(0 0 0 / 0.8);
  text-decoration: underline solid rgb(0 0 0 / 0.2);
  transition: 0.2s ease;

  &:hover {
    text-decoration: underline solid rgb(0 0 0 / 0.4);
  }
}

.button {
  font: inherit;
  color: white;
  background: black;
  padding: 1rem;
  border-radius: 0.25rem;
  border: none;
  transition: 0.2s ease;

  &:hover {
    background: rgb(0 0 0 / 0.9);
    cursor: pointer;
  }
}

.global-navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2rem 10vw;

  .name {
    text-transform: uppercase;
    letter-spacing: -0.05em;
    font-weight: 600;
    text-decoration: none;
  }
  .nav-links {
    display: flex;
    gap: 1rem;

    .highlighted {
      background: rgba(153, 205, 50, 0.5);
    }
  }
}
.global-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2rem 10vw;

  .name {
    text-transform: uppercase;
    letter-spacing: -0.05em;
    font-weight: 600;
  }
  .nav-links {
    display: flex;
    gap: 1rem;
  }
}

/* LANDING STYLES */

.main-header {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  background-image: linear-gradient(0deg, rgb(255 255 255 / 0.9) 0%, rgb(255 255 255 / 1) 100%), url('./assets/background.jpg');
  backdrop-filter: blur(2px);
  background-size: cover;

  h1 {
    margin: 0;
    font-size: 4rem;
    font-weight: 500;
    letter-spacing: -0.02em;
  }
  .subtitle {
    margin: 0;
    color: var(--text-light);
    max-width: 30ch;
    text-align: center;
  }
  .button {
    margin-top: 0.5rem;
  }
}
@media (max-width: 768px) {
  .main-header h1 {
    font-size: 3.5rem
  }
}
@media (max-width: 520px) {
  .main-header h1 {
    font-size: 3rem
  }
}

.posts {
  background: var(--background-secondary);
  padding: 6rem 10vw;

  display: flex;
  flex-wrap: wrap;

  gap: 2rem;

  .post {
    flex-basis: 25rem;
    flex-grow: 1;
    background: white;
    border: 1px solid rgb(0 0 0 / 0.1);
    border-radius: 0.5rem;
    overflow: hidden;
    text-decoration: none;
    transition: 0.3s ease;

    &:hover {
      transform: scale(0.99);
      opacity: 0.95;
    }

    img {
      width: 100%;
    }
    .post-info {
      padding: 1rem;

      h2 {
        margin: 0;
        font-weight: 500;
      }
      .date {
        margin: 0;
        color: var(--text-light);
      }
    }
  }
}

/* ABOUT */

.about-main {
  padding: 4rem 10vw;
  display: flex;
  align-items: center;
  gap: 10vw;
  min-height: 80vh;

  .main-content {
    h1 {
      font-size: 3rem;
    }
    p {
      line-height: 1.5;
    }
  }
  .image-container {
    flex-basis: min(30rem, 100%);
    flex-shrink: 0;
    flex-grow: 1;
  }
  img {
    max-width: 100%;
    border-radius: 0.25rem;
  }
}
@media (max-width: 1000px) {
  .about-main {
    flex-wrap: wrap;
    gap: 2rem;
  }
}

/* BLOG STYLES */

.blog-header {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;

  img {
    width: 100%;
    height: 40vh;
    object-fit: cover;
  }
  .back {
    position: absolute;
    top: 2rem;
    left: 2rem;
    background: white;
    width: 2.5rem;
    height: 2.5rem;
    display: grid;
    place-items: center;
    border-radius: 50%;

    transition: 0.2s ease;

    svg {
      display: block;
      margin-left: -0.125rem;
    }

    &:hover {
      transform: rotate(10deg) scale(0.95);
    }
  }

  .header-content {
    padding: 4rem 0;
    width: min(50rem, 80vw);

    h1 {
      font-size: 3rem;
      margin: 0;
    }
    p {
      margin: 0.25rem 0 0 0;
      color: var(--text-light);
    }
  }
}

.blog-main {
  margin: -6rem auto 0 auto;
  padding: 4rem 0;
  width: min(50rem, 80vw);

  img {
    max-width: 100%;
  }
  p {
    line-height: 1.5;
  }
}