.about {
  padding: 0 4vw;

  & .intro {
    display: flex;
    flex-direction: column; /* Stack elements on small screens */
    gap: 6rem;
    margin-top: 5vh;
    margin-bottom: 10vh;

    & .picture {
      display: flex;
      justify-content: center;
      width: 100%;
      padding: 4vw;

      & .img-container {
        position: relative;
        width: 90%; /* Reduce size on small screens */
        aspect-ratio: 3/4;

        & img {
          width: 100%;
          aspect-ratio: 3/4;
          object-fit: cover;
        }

        & .profile-frame {
          position: absolute;
          top: -2vw;
          left: -2vw;
          width: calc(100% + 4vw);
          height: calc(100% + 4vw);
          border: 1px solid var(--color3);

          &::after {
            content: "";
            position: absolute;
            top: 50%;
            right: 0;
            width: 1.5rem;
            height: 1rem;
            background-color: var(--obsidian);
            border-top: 1px solid var(--color3);
            border-bottom: 1px solid var(--color3);
            transform: translateX(50%);
          }
        }
      }
    }

    & .aboutme {
      display: flex;
      flex-direction: column;
      justify-content: center;
      width: 100%;

      & .about-title {
        position: relative;
        align-self: flex-start;
        padding: 1rem 0;
        padding-left: 3rem;
        margin: 6rem 0;
        width: fit-content;
        text-wrap: nowrap;
        font-size: 6rem;
        line-height: 4rem;
        text-transform: uppercase;
        background-color: var(--obsidian);

        & .part1 {
          position: absolute;
          top: -60%;
          left: 0;
          font-size: 1.5rem;
          font-weight: 200;
          text-transform: initial;
          color: var(--color3);
        }

        &::after {
          content: "";
          position: absolute;
          top: 50%;
          right: -26%;
          z-index: -1;
          width: 30%;
          height: 200%;
          transform: translateY(-60%);
          border: 1px solid var(--color3);
        }
      }

      & .text {
        position: relative;
        margin-left: 2rem;
        font-size: 1rem;

        & .cv {
          display: block;
          position: relative;
          width: 14rem;
          text-align: left;
          font-weight: 600;
          transform-origin: bottom left;
          transition: all 0.25s ease-out;

          &:first-of-type{
            margin-bottom: .6rem;
          }

          /* ---------- UNDERLINE ---------- */
          &::before {
            content: "";
            pointer-events: none;
            position: absolute;
            bottom: -0.2rem;
            left: 0;
            display: block;
            width: 100%;
            height: 1px;
            border-radius: 1rem;
            background-color: var(--color3);
            transform: scaleX(0);
            transform-origin: bottom left;
            transition: all 0.25s ease-out;
          }

          /* ---------- HOVER FX ---------- */
          &:hover {
            color: var(--color3);
            transform: scale(1.05);

            &::before {
              transform: scaleX(1);
            }
          }
        }

        &::after {
          content: "";
          position: absolute;
          top: 0;
          left: -2rem;
          width: 0;
          height: 100%;
          border-left: 1px solid var(--color3);
        }
      }
    }
  }

  & .skills,
  .softwares {
    margin-bottom: 10rem;
    & .skills-title {
      font-size: 2rem; /* Adjusted font size */
      line-height: 2.5rem;
    }

    & .skills-intro {
      position: relative;
      /* width: 100%; */
      margin-top: 2rem;
      margin-bottom: 4rem;
      padding-left: 2rem;
      font-size: 1rem; /* Adjusted font size */
      line-height: 1.4rem;

      &::after {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 0;
        height: 100%;
        border-left: 1px solid var(--color3);
      }
    }

    & .skills-container {
      display: grid;
      grid-template-columns: repeat(2, 1fr); /* Stack skill cards on mobile */
      gap: 1rem;

      & .skill-card {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        aspect-ratio: 1/1;
        background: rgb(11, 18, 21);
        background: radial-gradient(
          circle,
          var(--obsidian) 20%,
          var(--color3) 800%
        );
        overflow: clip;
        transition: transform 0.25s ease-out;

        &:hover {
          transform: scale(0.95);

          &::after {
            width: 100%;
            height: 100%;
            transform: translate(-50%, -50%) rotate(0deg);
          }

          & .skill-name {
            transform: scale(1.2);
          }
        }

        &::after {
          content: "";
          position: absolute;
          top: 50%;
          left: 50%;
          width: 85%;
          height: 85%;
          transform: translate(-50%, -50%) rotate(-31deg);
          border: 2px solid var(--color3);
          transition: all 0.25s ease-out;
        }

        & .skill-name {
          z-index: 2;
          font-size: 1rem; /* Adjusted font size */
          transition: transform 0.25s ease-out;
        }

        & .skill-icon {
          position: absolute;
          top: 0;
          left: 0;
          z-index: 0;
          width: 115%;
          transform: translate(10%, -10%) rotate(45deg);
          opacity: 0.2;
        }
      }
    }

    & .softwares-container {
      display: grid;
      grid-template-columns: repeat(1, 1fr);
      gap: 4rem;
      margin: 0 2rem;

      & .column {
        position: relative;
        min-width: 20rem;
        text-align: center;
        font-size: 1.2rem;
        font-weight: 500;
        line-height: 1.8rem;

        & ul {
          width: 80%;
          margin: auto;
          background-color: var(--obsidian);
          z-index: 1;
        }

        &::before {
          content: "";
          position: absolute;
          top: 5%;
          left: 5%;
          width: 90%;
          height: 90%;
          border: 1px solid var(--color3);
          z-index: -1;
        }
      }
    }
  }
}

/* Tablet and up */
@media (min-width: 768px) {
  .about {
    padding: 0 6vw; /* Add more padding for tablets */

    .intro {
      flex-direction: column; /* Stack elements on tablet */
      gap: 6rem; /* Adjust gap */
      margin-top: 10vh;
      margin-bottom: 20vh;

      .picture {
        width: 100%; /* Image takes up full width on tablet */
        padding: 2vw;
      }

      .aboutme {
        width: 100%; /* About me takes up full width on tablet */
        padding: 0;

        .text {
          margin-left: 2rem;
        }
      }
    }

    .skills,
    .softwares {
      margin-bottom: 15rem;

      .skills-title {
        font-size: 3rem;
        line-height: 4rem;
      }

      .skills-intro {
        font-size: 1rem;
        line-height: 1.4rem;
        margin-top: 2rem;
        margin-bottom: 4rem;
        padding-left: 2rem;
      }

      .skills-container {
        grid-template-columns: repeat(2, 1fr); /* 2 columns on tablet */
        gap: 2rem;
      }

      .skill-card {
        .skill-name {
          font-size: 1.5rem !important;
        }
      }
    }
  }
}

/* Desktop and up */
@media (min-width: 1312px) {
  .about {
    padding: 0 10vw;

    .intro {
      display: flex;
      flex-direction: row;
      gap: 2rem;
      max-height: 100vh;
      margin-top: 10vh;
      margin-bottom: 20vh;
      justify-content: start;

      .picture {
        display: flex;
        justify-content: flex-start;
        align-items: center;
        width: 50%;
        padding: 2vw;
        max-height: 100vh;

        .img-container {
          position: relative;
          width: auto;
          max-width: 75%;
          max-height: 100vh;
          aspect-ratio: 3/4;

          img {
            width: 100%;
            aspect-ratio: 3/4;
            object-fit: cover;
          }

          .profile-frame {
            position: absolute;
            top: -2vw;
            left: -2vw;
            width: calc(100% + 4vw);
            height: calc(100% + 4vw);
            border: 1px solid var(--color3);

            &::after {
              content: "";
              position: absolute;
              top: 50%;
              right: 0;
              width: 1.5rem;
              height: 1rem;
              background-color: var(--obsidian);
              border-top: 1px solid var(--color3);
              border-bottom: 1px solid var(--color3);
              transform: translateX(50%);
            }
          }
        }
      }

      .aboutme {
        display: flex;
        flex-direction: column;
        justify-content: center;
        width: 50%;

        .about-title {
          position: relative;
          align-self: auto;
          padding: 1rem 0;
          padding-left: 3rem;
          width: fit-content;
          font-size: 8rem;
          line-height: 6rem;
          text-transform: uppercase;
          background-color: var(--obsidian);

          & .part1 {
            font-size: 3rem;
          }

          &::after {
            content: "";
            position: absolute;
            top: 50%;
            right: -26%;
            width: 30%;
            height: 200%;
            transform: translateY(-60%);
            border: 1px solid var(--color3);
          }
        }

        .text {
          position: relative;
          margin-left: 2rem;

          &::after {
            content: "";
            position: absolute;
            top: 0;
            left: -2rem;
            width: 0;
            height: 100%;
            border-left: 1px solid var(--color3);
          }
        }
      }
    }

    .skills,
    .softwares {
      margin-bottom: 20rem;

      .skills-title {
        font-size: 6rem;
        line-height: 8rem;
      }

      .skills-intro {
        font-size: 1rem;
        line-height: 1.4rem;
        width: 60%;
      }

      .skills-container {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
      }

      & .softwares-container {
        margin: 0;
        grid-template-columns: repeat(2, 1fr);

        & .column {
          margin: 0 2rem;
          font-size: 1.5rem;
          line-height: 2rem;

          &::before{
            left: 0;
            width: 100%;
          }
        }
      }

      .skill-card {
        .skill-name {
          font-size: 1.5rem;
        }
      }
    }
  }
}
