@import url("https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap");

:root {
  --background-color: rgb(15 23 42);

  --content-max-width: 1280px;
  --heading-color: rgb(226 232 240);
  --text-color: rgb(148 163 184);
  --navigatior-line-color: rgb(71 85 105);
  --navigatior-link-color: rgb(100 116 139);
  --default-transition: 0.3s;
  --project-color: rgb(94, 234, 212);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", sans-serif;
  background-color: var(--background-color);
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  padding: 0;
  letter-spacing: -0.025em;
  color: var(--heading-color);
}

p {
  margin: 0;
  padding: 0;
  color: var(--text-color);
  line-height: 1.65;
}

ul,
ol {
  list-style: none;
  padding: 0;
}

/* PAGE CONTAINER */
.page-container {
  max-width: var(--content-max-width);
  padding-inline: 1.5rem;
  margin: 0 auto;
  width: 100%;

  & .page-container-content {
    display: flex;
    flex-direction: column;
  }
}

/* HEADER */

.header {
  display: flex;
  justify-content: space-between;
  flex-direction: column;
  height: 100%;
  max-height: 100dvh;
  padding-block: 3rem;

  & h1 {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
  }

  & h2 {
    font-size: 1.25rem;
    line-height: 1.75rem;
    font-weight: 500;
    margin-top: 0.75rem;
  }

  & p {
    margin-top: 1rem;
    line-height: 1.5;
    max-width: 20rem;
  }

  /* NAVIGATION */
  & .nav {
    margin-top: 4rem;
    display: none;

    & a {
      display: inline-block;
      padding-block: 0.825rem;
      color: var(--navigatior-link-color);
      text-transform: uppercase;
      letter-spacing: 0.1em;
      font-size: 0.75rem;
      font-weight: 700;
      text-decoration: none;
      display: flex;
      align-items: center;
      transition: color var(--default-transition);

      &.active-hover,
      &.active {
        color: #fff;
        & .nav-indicatior {
          background-color: #fff;
          width: 3rem;
        }
      }
    }

    & .nav-indicatior {
      display: block;
      width: 2rem;
      height: 1px;
      margin-right: 1rem;
      background-color: var(--navigatior-line-color);
      transition: all var(--default-transition);
    }
  }

  /* SOCIAL MEDIA */
  & .social-media {
    display: flex;
    gap: 1.25rem;
    margin-top: 2rem;

    & a {
      color: #fff;
      opacity: 0.7;
      transition: opacity var(--default-transition);

      &:hover {
        opacity: 1;
      }
    }

    & svg {
      width: 1.5rem;
      height: 1.5rem;
    }
  }
}

/* MAIN CONTENT */
.main-content {
  padding-block: 3rem;

  & h2 {
    text-transform: uppercase;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.1em;
    margin: 0.5rem 0 1.5rem;
    left: 1.25rem;
    transform: translateX(-1.5rem);
    position: sticky;
    top: 0;
    backdrop-filter: blur(8px);
    background-color: rgba(15, 23, 42, 0.75);
    width: 100dvw;
    z-index: 100;
    padding: 1rem 1rem 1rem 1.5rem;
  }

  & section {
    scroll-margin-top: 6rem;
    &:not(:last-of-type) {
      margin-bottom: 5rem;
    }

    & p {
      margin-bottom: 1rem;

      & span {
        font-weight: 700;
        color: var(--project-color);
      }
    }

    /* EXPERIENCES and PROJECTS */
    &#projects,
    &#experiences {
      a {
        display: inline-block;
        width: 100%;
        height: 100%;
        position: relative;
        text-decoration: none;
        &:not(:last-of-type) {
          margin-bottom: 3rem;
        }

        &:hover {
          & .absolute {
            opacity: 0.1;
          }

          h3 {
            color: var(--project-color);
          }
        }

        img {
          width: 100%;
          height: auto;
          border-radius: 0.5rem;
        }
      }

      & .project,
      & .experience {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        position: relative;

        & .absolute {
          transition: var(--default-transition);
          position: absolute;
          top: -1.25rem;
          left: -1.25rem;
          width: calc(100% + 2.5rem);
          height: calc(100% + 2.5rem);
          border: 1px solid rgba(255, 255, 255, 0.45);
          border-radius: 1rem;
          background-color: rgba(255, 255, 255, 0.45);
          box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px 0px,
            rgba(0, 0, 0, 0) 0px 0px 0px 0px,
            rgba(148, 163, 184, 0.15) 0px 0px 0px 1px,
            rgba(148, 163, 184, 0.15) 0px 4px 6px;
          opacity: 0;
          display: none;
        }

        & header {
          font-size: 0.75rem;
          text-transform: uppercase;
          color: var(--navigatior-link-color);
          font-weight: 700;
          letter-spacing: 0.025em;
          padding-top: 0.15rem;
        }

        & .project-details,
        & .experiences-details {
          & p {
            font-size: 0.875rem;
            margin-top: 0.5rem;
          }

          & .technologies-used {
            display: flex;
            flex-wrap: wrap;
            gap: 0.5rem;

            & span {
              padding: 0.25rem 0.5rem;
              color: var(--project-color);
              font-weight: 500;
              font-size: 0.75rem;
              background-color: rgba(45, 212, 191, 0.1);
              border-radius: 9999px;
            }
          }
        }

        & h3 {
          font-weight: 500;
          font-size: 1rem;
          transition: var(--default-transition);
          & a {
            text-decoration: none;
            color: var(--heading-color);
            transition: color var(--default-transition);
            &:hover {
              color: var(--project-color);
            }
          }
        }
      }

      & .project {
        flex-direction: column-reverse;

        & .project-image {
          display: block;
          width: 100%;
          margin-top: 0.5rem;
          max-width: 240px;
        }
      }
    }
  }
}

#glow {
  display: none;
}

/* TABLET */
@media only screen and (min-width: 768px) {
  .page-container {
    padding-inline: 3rem;
  }

  p {
    max-width: 90%;
  }
}

/* LAPTOP */
@media only screen and (min-width: 1024px) {
  .page-container {
    padding-inline: 4rem;
    position: relative;
    & .page-container-content {
      display: grid;
      grid-template-columns: 1fr 1fr;
      min-height: 100dvh;
    }
  }

  .header {
    padding-block: 6rem;
    top: 0;
    position: sticky;

    & .nav {
      display: flex;
    }
  }

  & .social-media {
    margin-top: 0;
  }

  .main-content {
    padding-block: 6rem;

    & h2 {
      font-size: 1.1rem;
      color: var(--navigatior-link-color);
      opacity: 0.5;
      position: relative;
      left: 0;
      transform: translateX(0);
      backdrop-filter: unset;
      background-color: transparent;
      width: auto;
      padding: 0;
      z-index: unset;
      margin-bottom: 2rem;
    }

    & section {
      &:not(:last-of-type) {
        margin-bottom: 9rem;
      }

      /* EXPERIENCES and PROJECTS */
      &#projects,
      &#experiences {
        & .project,
        & .experience {
          display: grid;
          grid-template-columns: 140px 1fr;
          gap: 1rem;

          & .absolute {
            display: block;
          }
        }

        & .project {
          flex-direction: column;

          & .project-image {
            max-width: unset;
            margin-top: 0;
          }
        }
      }
    }
  }

  /* RADIAL GRADIENT */
  #glow {
    position: absolute;
    width: 900px;
    height: 900px;
    display: block;
    background: radial-gradient(
      circle,
      rgba(255, 255, 255, 0.4),
      rgba(255, 255, 255, 0) 70%
    );
    border-radius: 50%;
    pointer-events: none;
    mix-blend-mode: overlay;
    filter: blur(20px);
  }

  p {
    max-width: unset;
  }
}

/* LAPTOP L*/
@media only screen and (min-width: 1240px) {
  .page-container {
    padding-inline: 6rem;
  }
}
