@import '../../utils/shared-styles.scss';

.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}

section {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ===== ABOUT SECTION ===== */

.about--single {
  padding-block: 2rem;

  @media (min-width: 768px) {
    padding-block: 3rem;
  }

  .profile {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    align-items: start;
    margin-bottom: 2rem;

    @media (min-width: 900px) {
      grid-template-columns: 0.85fr 1.15fr;
      gap: 3rem;
    }
  }

  /* Profile Media */
  .profile__media {
    justify-self: center;
    width: 100%;
    max-width: 320px;

    @media (min-width: 900px) {
      justify-self: start;
      position: sticky;
      top: 2rem;
    }
  }

  .avatar {
    margin: 0;

    img {
      display: block;
      width: 100%;
      height: auto;
      aspect-ratio: 1 / 1;
      object-fit: cover;
      border-radius: $radius-xl;
      border: 1px solid $glass-border;
      box-shadow: $shadow-glass;
      transition: all 0.3s ease;

      &:hover {
        box-shadow: $shadow-glass-hover;
        transform: translateY(-4px);
      }
    }
  }

  /* Profile Content */
  .profile__content {
    display: grid;
    gap: 2rem;
  }

  .profile__name {
    font-size: clamp(1.75rem, 3vw + 1rem, 2.25rem);
    font-weight: 800;
    color: $color-text-primary;
    margin: 0;
    line-height: 1.2;
    letter-spacing: -0.02em;
  }

  .profile__tagline {
    font-size: 1.125rem;
    color: $color-text-secondary;
    margin: -1.25rem 0 0;
    font-weight: 500;
    line-height: 1.5;
  }

  /* Profile Story */
  .profile__story {
    display: grid;
    gap: 1rem;

    p {
      margin: 0;
      color: $color-text-secondary;
      line-height: 1.7;
      font-size: 1rem;

      strong {
        color: $color-text-primary;
        font-weight: 600;
      }
    }
  }

  /* Profile Approach */
  .profile__approach {
    background: $glass-bg;
    backdrop-filter: blur(10px);
    border: 1px solid $glass-border;
    border-radius: $radius-xl;
    padding: 1.75rem;
    box-shadow: $shadow-glass;

    h3 {
      font-size: 1.25rem;
      font-weight: 700;
      color: $color-text-primary;
      margin: 0 0 1.25rem;
    }

    .approach__grid {
      display: grid;
      gap: 1rem;
      grid-template-columns: 1fr;

      @media (min-width: 640px) {
        grid-template-columns: repeat(3, 1fr);
      }
    }

    .approach__item {
      background: $color-white;
      border: 1px solid $glass-border;
      border-radius: $radius-lg;
      padding: 1.25rem;
      text-align: center;
      transition: all 0.3s ease;

      &:hover {
        transform: translateY(-4px);
        box-shadow: $shadow-md;
        border-color: rgba(37, 99, 235, 0.2);
      }

      .approach__icon {
        font-size: 2rem;
        margin-bottom: 0.75rem;
        display: block;
      }

      strong {
        display: block;
        color: $color-text-primary;
        margin-bottom: 0.5rem;
        font-size: 1rem;
        font-weight: 700;
      }

      p {
        margin: 0;
        color: $color-text-secondary;
        font-size: 0.9375rem;
        line-height: 1.6;
      }
    }
  }

  /* Profile Tech Stack */
  .profile__tech {
    background: $gradient-subtle;
    border: 1px solid rgba(37, 99, 235, 0.15);
    border-radius: $radius-xl;
    padding: 1.75rem;

    h3 {
      font-size: 1.25rem;
      font-weight: 700;
      color: $color-text-primary;
      margin: 0 0 1.25rem;
    }

    .tech__categories {
      display: grid;
      gap: 1rem;
    }

    .tech__category {
      display: grid;
      grid-template-columns: 110px 1fr;
      gap: 1rem;
      align-items: baseline;

      @media (max-width: 639px) {
        grid-template-columns: 1fr;
        gap: 0.25rem;
      }

      .tech__label {
        color: $color-text-secondary;
        font-size: 0.9375rem;
        font-weight: 600;
      }

      .tech__values {
        color: $color-text-primary;
        font-size: 0.9375rem;
        font-weight: 500;
      }
    }
  }

  /* Profile Facts */
  .profile__facts {
    background: $glass-bg;
    backdrop-filter: blur(10px);
    border: 1px solid $glass-border;
    border-radius: $radius-xl;
    padding: 1.75rem;
    box-shadow: $shadow-glass;

    h3 {
      font-size: 1.25rem;
      font-weight: 700;
      color: $color-text-primary;
      margin: 0 0 1.25rem;
    }

    .facts {
      list-style: none;
      padding: 0;
      margin: 0;
      display: grid;
      gap: 1rem;

      li {
        display: grid;
        grid-template-columns: 140px 1fr;
        gap: 1rem;
        align-items: start;
        padding-bottom: 1rem;
        border-bottom: 1px solid $color-gray-200;

        &:last-child {
          border-bottom: none;
          padding-bottom: 0;
        }

        @media (max-width: 639px) {
          grid-template-columns: 1fr;
          gap: 0.375rem;
        }

        .k {
          color: $color-text-secondary;
          font-size: 0.9375rem;
          font-weight: 600;
        }

        .v {
          color: $color-text-primary;
          font-weight: 500;
          font-size: 0.9375rem;
          line-height: 1.6;
        }
      }
    }
  }

  /* Profile Actions */
  .profile__actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    padding-top: 0.5rem;

    @media (max-width: 639px) {
      flex-direction: column;

      .btn {
        width: 100%;
      }
    }
  }
}

/* ===== WHY ME SECTION ===== */

.why-me {
  background: $color-background-main;
  padding-block: 3rem;

  @media (min-width: 768px) {
    padding-block: 1rem;
  }

  h2 {
    text-align: center;
    font-size: clamp(1.75rem, 3vw + 1rem, 2.25rem);
    font-weight: 800;
    color: $color-text-primary;
    margin: 0 0 2.5rem;
    letter-spacing: -0.02em;
  }

  .why-me__grid {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: 1fr;

    @media (min-width: 640px) {
      grid-template-columns: repeat(2, 1fr);
    }

    @media (min-width: 1024px) {
      grid-template-columns: repeat(3, 1fr);
    }
  }

  .why-me__item {
    background: $glass-bg;
    backdrop-filter: blur(20px);
    border: 1px solid $glass-border;
    border-radius: $radius-lg;
    padding: 1.5rem;
    box-shadow: $shadow-glass;
    transition: all 0.3s ease;

    &:hover {
      transform: translateY(-4px);
      box-shadow: $shadow-glass-hover;
      border-color: rgba(37, 99, 235, 0.3);
    }

    h4 {
      margin: 0 0 0.75rem;
      color: $color-text-primary;
      font-size: 1.0625rem;
      font-weight: 700;
      line-height: 1.3;
    }

    p {
      margin: 0;
      color: $color-text-secondary;
      font-size: 0.9375rem;
      line-height: 1.6;
    }
  }
}

/* ===== MOTION PREFERENCES ===== */

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}