a {
  text-decoration: none;
}

#work {
  width: 96%;
  margin: 0 auto;
  margin-top: 12rem; /* 예시. 헤더 높이에 따라 조정 */
  margin-bottom: 6em;
} 

.section-title {
  font-size: 7rem;
  text-align: left;
}

.section-title.sub {
  font-size: 2.2rem;
  font-weight: 200;
  text-align: left;
  color: #fff;
  opacity: 0.8;
}

.section-title span {
  display: inline-block;
  opacity: 0;
  transform: translateY(20px);
}

.section-title.visible span {
  animation: fadeUp 1.5s ease forwards;
}

.section-title.visible span:nth-child(1) {
  animation-delay: 0s;
}
.section-title.visible span:nth-child(2) {
  animation-delay: 0.05s;
}
.section-title.visible span:nth-child(3) {
  animation-delay: 0.1s;
}
.section-title.visible span:nth-child(4) {
  animation-delay: 0.15s;
}
.section-title.visible span:nth-child(5) {
  animation-delay: 0.2s;
}
.section-title.visible span:nth-child(6) {
  animation-delay: 0.25s;
}
.section-title.visible span:nth-child(7) {
  animation-delay: 0.3s;
}
.section-title.visible span:nth-child(8) {
  animation-delay: 0.35s;
}

@keyframes fadeUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.section-title.sub.visible {
  animation: fadeUp 1.5s ease forwards;
}

.work-layout {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 4rem;
}

.work-item {
  overflow: hidden;
  padding: 0;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  margin-bottom: 4rem ;
}

.thumbnail {
  position: relative;
  width: 100%;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}


.thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 0.87rem;

}

.work-item:hover > a.thumbnail > .thumbnail > picture img,
a.thumbnail:hover > .thumbnail > picture img {
  transform: scale(1.05) translateY(-8px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.4);
  border-radius: 0.87rem;

}

.thumbnail > picture img {
  transition: transform 0.4s ease, box-shadow 0.3s ease;
}

/* 텍스트 오버레이 (작업 항목) */
.work-info {
  bottom: 0;
  left: 0;
  padding: 1rem 0 0;
  color: #fff;
  z-index: 3;

}

.work-title {
  margin-bottom: 0.4rem;
  font-size: 2.6rem;
  font-weight: 600;
}

.work-info-label{
  display: flex;
  align-items: center;
  gap: 0.5rem;        /* space between pills */
  flex-wrap: wrap;    /* allow wrapping on small screens */
}

.work-description {
  font-size: 0.8rem;
  opacity: 0.9;
  margin-bottom: 0.2rem;
  border: 1px solid #fff;
  padding: 0.4rem 1rem;
  border-radius: 30rem;
  width: auto;
}

.work-description.filled{
  background-color: #fff;
  color: #131313;      /* dark text for contrast */
  border-color: #fff;  /* keep border invisible */
  font-weight: 600;
}

@media (max-width: 768px) {
  #work {
    width: 92%;
    margin-top: 12rem; /* 예시. 헤더 높이에 따라 조정 */
    margin-bottom: 6em;
  } 

  .section-title {
    font-size: 16vw;
    text-align: left;
  }

  .section-title.sub {
    font-size: 6vw;
    text-align: left;
    line-height: 1.4;
  }

  .work-layout {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .work-title {
    font-size: 8vw;
    text-align: left;
  }

  .work-info {
    text-align: left;
  }

  .work-description {
    font-size: 3vw;
  }

  .thumbnail img {
    border-radius: 0.6rem;
  }
  
}