@import url("https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap");

:root {
  font-family: "Open Sans", sans-serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
  font-variation-settings: "wdth" 100;
  color-scheme: light dark;

  --highlight-clr: #f2ff00;
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  overflow-x: hidden;
  background-image: radial-gradient(
    circle at center,
    #222 0.06rem,
    transparent 0
  );
  background-size: 1rem 1rem;
  background-repeat: round;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  text-wrap: pretty;
}

ul {
  list-style: none;
}

p {
  text-wrap: balance;
  line-height: 1.45;
}

a {
  text-decoration: none;
  color: inherit;
}

strong {
  color: #fefefe;
  font-weight: 600;
}

main {
  display: flex;
  flex-direction: column;
  gap: 5rem;
}

section {
  padding-inline: 3rem;
}

#hero {
  max-width: 780px;
  margin-inline: auto;
  position: relative;
  margin-top: 3rem;

  .location {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 15px;
    color: #f2ff00;
    font-size: 0.9rem;
  }

  &::before {
    content: "";
    position: absolute;
    z-index: -9999;
    inset: 0;
    filter: blur(200px);
    background: linear-gradient(
      130deg,
      #ff00ff,
      rgb(0, 13, 255),
      transparent 50%
    );
  }

  .wrapper {
    padding: 20px;
    position: relative;

    &::before {
      content: "";
      position: absolute;
      left: calc(0% - 20px);
      top: 0;
      width: 10px;
      height: 3px;
      background-color: #ff0ccc;
      border-radius: 0 20px 20px 0;
    }

    &::after {
      content: "";
      position: absolute;
      height: 10px;
      width: 3px;
      top: 0;
      left: calc(0% - 20px);
      background-color: #ff0ccc;
      border-radius: 0 0 20px 20px;
    }
  }

  h1 {
    padding-top: 15px;
    font-size: 3rem;
    background: linear-gradient(to right, #ff0ccc, #00bbff);
    background-clip: text;
    color: transparent;
    font-weight: 600;

    @media (width < 440px) {
      font-size: 2.4rem;
    }
  }

  h2 {
    font-size: 2.1rem;
    font-weight: 500;
    margin-top: 5px;
    color: rgb(255 255 255 / 20%);
  }

  p {
    max-width: 70ch;
    margin-top: 20px;
    color: rgb(255 255 255 / 70%);
    line-height: 1.6;
  }
}

.social-tag {
  display: flex;
  align-items: center;
  padding: 4px 9px;
  gap: 4px;
  border-radius: 3px;
  box-shadow: 2px -3px 560px #ff0ccc, 0 1px 0.5px rgba(255 255 255 / 20%) inset;
  transition: color 200ms ease-in-out;
  background-color: rgb(255 255 255 / 2%);

  &:hover {
    color: #00bbff;
  }
}

#social {
  margin-top: 20px;
  padding-bottom: 20px;

  ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
  }
}

#techs {
  position: absolute;
  top: 0;
  width: 100%;
  height: 100%;
  opacity: 0.3;
  z-index: -1;

  .tech-stack {
    width: 100%;
    height: 100%;
    overflow-x: hidden;
  }

  .tech-badge {
    position: absolute;
    border: 3px solid var(--tech-color);
    background-color: var(--tech-color);
    font-weight: 500;
    font-size: 0.9rem;
    padding: 3px;

    svg {
      width: 45px;
    }

    &:nth-child(1) {
      left: 1%;
      top: 400px;
      rotate: 20deg;
    }
    &:nth-child(2) {
      left: 90%;
      top: 240px;
      rotate: -65deg;
    }
    &:nth-child(3) {
      right: 10%;
      top: 50px;
      rotate: -120deg;
    }
    &:nth-child(4) {
      right: 20%;
      top: 190px;
      rotate: -370deg;
    }
    &:nth-child(5) {
      right: 10%;
      top: 400px;
      rotate: -330deg;
    }
    &:nth-child(6) {
      left: 5%;
      top: 50px;
      rotate: 330deg;
    }
    &:nth-child(7) {
      left: 0;
      top: 230px;
      rotate: 330deg;
    }
  }
}

section:not(#hero) {
  h2 {
    text-align: center;
    font-weight: 900;
    font-size: 1.7rem;
    margin-bottom: 20px;
    letter-spacing: 1.3px;
    text-transform: uppercase;
    background-clip: text;
    color: rgb(255 255 255 / 20%);
  }
}

#projects {
  flex: 1;
}

#projects-wrapper {
  display: grid;
  gap: 2.5rem 2rem;
  grid-template-columns: repeat(auto-fit, minmax(250px, 300px));
  place-content: center;
}

.card {
  img {
    border-radius: 10px;
    width: 100%;
    height: 200px;
    object-fit: cover;
    position: relative;
    filter: drop-shadow(0 13px 20px rgb(0 0 0 / 50%));
  }

  .repo-link {
    display: flex;
    align-items: center;
    cursor: pointer;
    gap: 10px;
    border-radius: 3px;
    border: 1px solid rgb(255 255 255 / 20%);
    font-size: 0.9rem;
    overflow: hidden;

    > svg {
      margin-left: 10px;
    }
  }

  span:nth-of-type(1) {
    padding: 5px 10px 5px 0;
  }

  .card-header {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-top: 10px;
  }

  .stack {
    display: flex;

    svg {
      width: 30px;
      height: 30px;
      border-radius: 50%;
      background-color: var(--tech-color);

      & + svg {
        margin-left: -15px;
      }
    }
  }

  .card-link a svg {
    width: 20px;
  }

  .stars {
    padding: 5px 10px;
    display: flex;
    gap: 5px;
    align-items: center;
    position: relative;
    color: var(--highlight-clr);

    &.loading {
      animation: skeleton-loading 1s linear infinite alternate;
    }

    &::before {
      content: "";
      position: absolute;
      left: 0;
      width: 1px;
      height: 100%;
      background: #333;
    }
  }

  p {
    margin-top: 7px;
    font-size: 0.85rem;
    opacity: 0.8;
    line-height: 1.4;
  }
}

@keyframes skeleton-loading {
  0% {
    background-color: hsla(200, 6%, 46%, 0.037);
  }
  100% {
    background-color: hsla(207, 10%, 82%, 0.123);
  }
}

footer {
  background-color: #11111174;
  padding: 3rem;
  margin-top: 4rem;

  h2 {
    font-weight: 400;
    font-size: 1.2rem;
    line-height: 1.4;
  }

  p {
    line-height: 1.5;
    margin-top: 14px;
    font-size: 0.85rem;
    opacity: 0.6;
    max-width: 100ch;
  }
}

#chat {
  .chat-wrapper {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    max-width: 800px;
    margin: auto;
  }

  .question {
    transition: 300ms ease-in-out;
    max-width: 45ch;

    &:hover {
      scale: 1.05;
    }

    h3 {
      font-size: 1.1rem;
      font-weight: 500;
      display: flex;
      align-items: center;
      gap: 0.5rem;
      cursor: pointer;
      color: #f2ff00;
    }

    p {
      line-height: 1.45;
      margin-top: 7px;
      color: rgb(255 255 255 / 60%);

      strong {
        color: #f3f3f3;
      }
    }

    &:nth-child(1) {
      rotate: -1.5deg;
    }
    &:nth-child(2) {
      margin-left: auto;
      rotate: 1.5deg;
    }
    &:nth-child(3) {
      rotate: -1deg;
    }
  }
}
