/* ======== 기본 설정 ======== */
body {
  margin: 0;
  font-family: 'Noto Sans KR', sans-serif;
  background-color: #fff;
  color: #333;
}

html {
  scroll-behavior: smooth;
}

/* ======== 헤더 ======== */
header {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: #8be060;
  padding: 15px 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  z-index: 100;
}

nav {
  display: flex;
  justify-content: center;
  gap: 40px;
}

nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.3s;
}

nav a:hover {
  opacity: 0.7;
}

/* ======== 메인 ======== */
main {
  padding-top: 100px;
  max-width: 1400px;
  margin: auto;
}

section {
  padding: 60px 20px;
}

section h2 {
  text-align: center;
  color: #8be060;
  margin-bottom: 40px;
}

/* ======== 프로젝트 그리드 ======== */
.project-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
}

/* ======== 프로젝트 카드 ======== */
.project {
  background: #f9f9f9;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  overflow: hidden;
  transition: transform 0.3s;
}

.project:hover {
  transform: translateY(-5px);
}

/* ======== 이미지/비디오 래퍼 ======== */
.img-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #fff;
}

.project img,
.project video {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  transition: transform 0.4s ease;
}

.project:hover img {
  transform: scale(1.05);
}

/* ======== 오버레이 ======== */
.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(203,241,183,0.94);
  color: #020202;

  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;

  padding: 20px;
  box-sizing: border-box; /* 패딩 포함 계산 */
  opacity: 0;
  transition: opacity 0.4s ease;
}

.overlay p {
  margin: 0;             /* 불필요한 여백 제거 */
  text-align: center;     /* 문단 중앙 정렬 */
  max-width: 90%;         /* 너무 긴 문장 정렬 개선 */
}


.project:hover .overlay {
  opacity:1;
}

/* ======== 프로젝트별 max-width ======== */
.project.web img,
.project.graphic img,
.project.logo img { max-width:500px; margin:0 auto; }
.project.illust img { max-width:1080px; margin:0 auto; }
.project.etc img { max-width:700px; margin:0 auto; }

/* ======== 텍스트 ======== */
.project-content {
  padding:20px;
}

.project-content h3 {
  margin-top:0;
  color:#333;
}

.project-content p {
  color:#555;
  line-height:1.5;
}

/* ======== 비디오 전용 ======== */
.project.etc:last-child {
  width:100%;
}

.project.etc:last-child .img-wrapper {
  aspect-ratio:16/9;
  background:#000;
}

.project.etc:last-child video {
  width:100%;
  height:100%;
  object-fit:contain;
}


/* PC: 1100px 이상 3열 */
@media screen and (min-width:1101px) {
  .project { width:30%; }
}

/* 태블릿: 701~1100px 2열 */
@media screen and (min-width:701px) and (max-width:1100px) {
  .project { width:48%; }
}

/* 모바일: 700px 이하 1열 */
@media screen and (max-width:700px) {
  .project { width:100%; }
  
  /* 이미지 hover 확대 효과 제거 (모바일에서는 터치 불가) */
  .project:hover img { transform: none; }
}
  
/* ======== 푸터 ======== */
footer {
  text-align:center;
  padding:30px;
  color:#777;
  font-size:0.9rem;
}
