@import url("https://fonts.googleapis.com/css2?family=Jura:wght@300..700&family=Madimi+One&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");

:root {
  --background: #f0f0f0;
  --background-minimal: #cacaca;
  --foreground: #585858;
  --foreground-minimal: #7e7e7e;
  --hover: #a3a3a3;
  --level0: #ebedf0;
  --level1: #9be9a8;
  --level2: #40c463;
  --level3: #30a14e;
  --level4: #216e39;
}

.darkmode {
  --background: #120907;
  --background-minimal: #1a1f2a;
  --foreground: #9ed7e9;
  --foreground-minimal: #7495ba;
  --hover: #45576f;
}

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

*::-webkit-scrollbar {
  width: 10px;
  background: var(--background);
  border-radius: 10px;
  color: var(--background);
}

*::-webkit-scrollbar-thumb {
  background: var(--foreground-minimal);
  border-radius: 10px;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  background: var(--background);
  color: var(--foreground);
  font-family: "Jura";
  font-weight: 600;
  font-size: medium;
  transition: 0.7s ease-in-out;
  height: 100%dvh;
  align-items: center;
  animation: fadeIn 1s ease-in-out;
}

header {
  width: 100%;
  transition: 0.7s ease-in-out;
  background: var(--background-minimal);
  padding: 20px;
  display: flex;
  justify-content: right;
  align-items: center;

  ul {
    display: flex;
    justify-content: right;
    align-items: center;
    list-style-type: none;
    gap: 10px;

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

  button {
    margin-right: auto;
    padding: 0.2em;
    border: none;
    background: none;
    border-radius: 30%;
    height: 30px;
    width: 30px;
    padding: 5px;
    transition: 0.2s ease;
    svg {
      color: var(--foreground);
    }
  }

  button:hover {
    background: var(--hover);
    scale: 1.1;
  }

  .rotate {
    animation: rotate 0.5s ease-out;
  }
}

@keyframes rotate {
  0% {
    background: none;
    scale: 0;
    transform: rotate(0deg);
  }
  100% {
    background: none;
    scale: 1;
    transform: rotate(360deg);
  }
}

@keyframes fadeIn {
  from {
    filter: blur(10px);
  }
  to {
    filter: blur(0px);
  }
}

.hero {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 5em 20%;
  gap: 10vw;

  img {
    width: 20%;
    border-radius: 50%;
    filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.5));
    transition: 1s ease;
  }

  img:hover {
    border-radius: 1em;
    scale: 1.2;
  }

  .description {
    text-align: center;

    h4 {
      margin-top: 0.2em;
      margin-bottom: 1em;
      font-size: large;
    }
    p {
      color: var(--foreground-minimal);
    }
  }
}

.work {
  display: flex;
  flex-direction: column;
  padding: 3em;
  justify-content: center;
  align-items: center;

  h1 {
    margin-bottom: 0.2em;
  }

  h3 {
    margin-bottom: 1em;
  }

  .work-cards-container {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1em;
    border-radius: 1em;
    width: fit-content;
    height: fit-content;
    padding: 1em;

    .card {
      transition: 0.3s ease;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      background: var(--hover);
      border-radius: 1em;
      padding: 0.5em;
      min-width: 210px;
      max-width: 350px;

      p {
        font-size: min(14px, 1.5vw);
        text-align: center;
        margin: 1em;
      }

      a {
        color: var(--foreground-minimal);
        text-decoration: none;
        transition: 0.3s ease;
        padding: 0.5em;
      }

      .card-header {
        background-repeat: no-repeat;
        background-size: cover;
        background-position: center;
        height: auto;
        padding: 10px;
        border-radius: 1em;

        h3 {
          background: var(--background-minimal);
          width: max-content;
          padding: 0.2em 1em;
          border-radius: 1em;
          filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.5));
          font-weight: 1000;
        }
      }
    }
    .card:hover {
      z-index: 10;
      scale: 1.09;
      filter: brightness(1.2);
      box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    }
  }
}

@media (max-width: 800px) {
  .work .work-cards-container {
    grid-template-columns: 1fr;
  }

  body {
    font-size: small;
    padding: 1em;
  }

  .hero {
    grid-template-columns: 1fr;
    padding: 2em 5%;
  }

  .work {
    padding: 2em 1em;
  }

  .skills .skills-container {
    height: auto;
  }

  .github-activity {
    padding: 1em 0;
  }

  footer {
    flex-direction: column;
    padding: 1em;
  }
}

.skills {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  .skills-container {
    margin-top: 5rem;
    margin-bottom: 5rem;
    width: 90%;
    max-width: 1500px;
    margin-inline: auto;
    position: relative;
    height: 16vh;
    overflow: hidden;
    mask-image: linear-gradient(
      to right,
      rgba(0, 0, 0, 0),
      rgba(0, 0, 0, 1) 20%,
      rgba(0, 0, 0, 1) 80%,
      rgba(0, 0, 0, 0)
    );

    .item {
      height: 100%;
      width: min(15vw, 15%);
      max-width: 100px;
      border-radius: 5px;
      position: absolute;
      left: 100%;
      animation: slide 30s linear infinite;
      animation-delay: calc(30s / 8 * (8 - var(--n)) * -1);
    }
  }
}

.github-activity {
  text-align: center;
  padding: 2em 0;

  h1 {
    margin-bottom: 1em;
  }

  .github-calendar {
    display: flex;
    justify-content: center;
    align-items: center;

    .Link--muted,
    .contrib-column {
      display: none;
    }
    tr span {
      display: none;
    }

    .ContributionCalendar-day {
      border-radius: 0.2em;
    }

    .container {
      max-width: 90%;
      margin: 10px auto;
      background-color: var(--hover);
      border-radius: 6px;
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
      padding: 20px;
    }

    .username {
      color: #0366d6;
    }

    .calendar-container {
      max-width: 100%;
      overflow-x: auto;
      padding: 1em;
    }
  }

  .loading {
    text-align: center;
    padding: 50px;
    color: var(--foreground-minimal);
  }

  .error {
    color: #cb2431;
    text-align: center;
    padding: 20px;
  }
}

@keyframes slide {
  0% {
    left: 100%;
  }
  100% {
    left: -100%;
  }
}

.CSS-presentation {
  display: none;
}

footer {
  width: 100%;
  background: var(--background-minimal);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 3em;
  margin-top: 3em;

  ul {
    display: flex;
    gap: 10px;
    list-style-type: none;
    a {
      text-decoration: none;
      color: inherit;
    }
  }
}

#background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
  transition: 3s ease;

  .circle {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(
      circle,
      var(--foreground),
      var(--background) 70%
    );
    transform: translate(-50%, -50%);
    opacity: 0.6;
    transition: width 0.3s, height 0.3s;
    filter: blur(7px);
  }

  .content {
    position: relative;
    z-index: 1;
    padding: 2rem;
    max-width: 800px;
    margin: 0 auto;
  }

  h1 {
    font-size: 3rem;
    text-align: center;
    margin-top: 20vh;
  }
}
