@charset "UTF-8";

header {
  border-bottom: 0.5px solid black;
  background-color: #ffffff;
}
header .go-to-top .logo {
  background-image: url('../images/logo_black.png');
}

.menu-txt.menuportfolio {
  font-weight: bold;
}

main {
  margin-top: 80px;
  height: calc(100vh - 80px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.portfolio-main {
  width: 90%;
  height: 95%;
  margin: auto;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
}

.portfolio-list-row1,
.portfolio-list-row2 {
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  list-style: none;
}

.portfolio-list {
  width: 18%;
  aspect-ratio: 3 / 4;
  background-color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.portfolio-list a {
  width: 100%;
  height: 100%;
  display: block;
  position: relative;
}

/* 이미지 기본 상태 */
.portfolio-list a img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.4s ease, filter 0.4s ease;
}

.portfolio-list.list1 a img{width: 110%; height: 110%;}
.portfolio-list.list4 a img{width: 110%; height: 110%;}


/* 텍스트 오버레이 (기본은 숨김) */
.overlay-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -40%);
  color: white;
  font-weight: 700;
  font-size: 1.2rem;
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.4s ease;
  text-align: center;
  pointer-events: none;
}

/* hover 시 효과 */
.portfolio-list:hover img {
  filter: brightness(50%);
  transform: scale(1.05);
}

.portfolio-list:hover .overlay-text {
  opacity: 1;
  transform: translate(-50%, -50%);
}

/* ===== 모바일 버전 (한 줄 정렬) ===== */
@media (max-width: 768px) {
  .portfolio-main {
    height: auto;
    margin-top: 20px;
  }

  .portfolio-list-row1,
  .portfolio-list-row2 {
    flex-direction: column;   /* 세로로 배치 */
    gap: 10px;                /* 이미지 간 간격 */
  }
   .portfolio-list-row2 {margin-top: 10px; margin-bottom: 30px;}

  .portfolio-list {
    width: 90%;               /* 모바일 화면 폭 기준 크기 */
    aspect-ratio: 1 / 1;
    margin: 0 auto;           /* 가운데 정렬 */
  }

  .portfolio-list a img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .overlay-text {
    font-size: 1rem;
  }
}



footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 20px;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.footer-txt {
  color: #afafaf;
  font-size: var(--desc-size-sxx);
}
