@use "../base/mixin" as *;

.project {
  background: #0d0d0d;
  padding: 120px;
}

.project__inner {
}

.project__heading {
  margin-bottom: 120px;
}

.project__grid {
  display: flex;
  flex-direction: column;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.project__row {
  display: flex;
  align-items: flex-start;
  gap: 40px;
}

.project__card {
  display: flex;
  flex-direction: column;
  flex: 0 1 calc(50% - 20px);
  gap: 16px;
  cursor: pointer;
  transition: flex 0.45s ease;

  // 호버 시 624px → 738px(같은 비율)로 확장, 같은 행의 옆 카드는 자동으로 줄어듦
  &:hover {
    flex: 0 0 calc(59.135% - 20px);
  }

  &[hidden] {
    display: none;
  }
}

.project__card:hover .project__thumbImg {
  transform: scale(1.04);
}

.project__thumb {
  width: 100%;
  aspect-ratio: 624 / 396;
  overflow: hidden;
  background: #1a1a1a;
  border-radius: 8px;
}

.project__thumbImg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.project__info {
}

.project__name {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.4;
}

.project__company {
  margin: 15px 0 0;
  font-size: 14px;
  font-weight: 400;
  color: #b0b0b0;
}

.project__stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 20px 0 0;
}

.project__tag {
  display: inline-block;
  padding: 4px 14px 6px 14px;
  background: #2d2d2d;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 300;
  color: #ffffff;
  letter-spacing: 0.03em;
}

.project__more {
  display: flex;
  justify-content: center;
  margin-top: 64px;
}

.btnMore {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 24px 32px;
  border: 1px solid #ffffff;
  border-radius: 100px;
  font-size: 24px;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: #ffffff;
  transition:
    background 0.3s,
    border-color 0.3s,
    color 0.3s;

  &:hover {
    background: #ffffff;
    color: #0d0d0d;
    border-color: #ffffff;
  }
}

@include mo {
  .project {
    padding: 60px 20px;
  }

  .project__heading {
    margin-bottom: 36px;
  }

  .project__grid {
    gap: 32px;
  }

  .project__row {
    flex-direction: column;
    gap: 32px;
  }

  .project__card {
    flex-basis: 100%;

    &:hover {
      flex-basis: 100%;
    }
  }

  .project__more {
    margin-top: 48px;
  }

  .btnMore {
    padding: 16px 32px;
    font-size: 16px;
  }
}
