@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css");
@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700;800&display=swap");

:root {
  --snow-duck: #f0f8ff;
  --cream-duck: #fffdd0;
  --meringue-duck: #ffffff;
  --accent-color: #ffb7b2;
  --text-dark: #4a4a4a;
  --bg-soft: #fafafa;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Montserrat', 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--bg-soft);
  word-break: keep-all; /* 한글 줄바꿈을 더 자연스럽게 */
}

header {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: #f1f1f1; /* 이미지 로드 실패 시의 기본 회색 배경 */
  background-image: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), url('./images/group-duck.jpg'); /* 확장자 .jpg로 변경 */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  text-align: center;
  padding: 2rem;
  color: white;
}

header h1 {
  font-size: 4rem;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 10px rgba(0,0,0,0.3); /* 텍스트 그림자 추가 */
}

header p {
  font-size: 1.4rem;
  color: rgba(255, 255, 255, 0.9);
  max-width: 900px; /* 문구가 한 줄로 나오도록 충분히 늘림 */
  text-shadow: 1px 1px 5px rgba(0,0,0,0.3);
  word-break: keep-all; /* 단어 단위로 줄바꿈 방지 */
  line-height: 1.4;
}

section {
  padding: 5rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
}

.character-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.character-card {
  background: white;
  padding: 2rem;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
  text-align: center;
  transition: transform 0.3s ease;
}

.character-card:hover {
  transform: translateY(-10px);
}

.character-thumb {
  width: 180px;
  height: 180px;
  background: #eee;
  border-radius: 50%;
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden; /* 이미지가 원 밖으로 나가지 않게 함 */
}

.character-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1); /* 부드러운 확대 효과 */
}

.character-card:hover .character-thumb img {
  transform: scale(1.15); /* 마우스 올렸을 때 이미지 확대 */
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2.5rem;
}

.portfolio-item {
  position: relative;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  background: #fff;
}

.portfolio-item img {
  width: 100%;
  display: block;
  transition: transform 0.3s ease;
}

.portfolio-info {
  padding: 1.5rem;
  background: #fff;
}

.portfolio-info h4 {
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
}

.portfolio-info p {
  color: #666;
  font-size: 0.95rem;
}

.portfolio-item:hover img {
  transform: scale(1.05);
}

.snow { background-color: var(--snow-duck); }
.cream { background-color: var(--cream-duck); }
.meringue { background-color: var(--meringue-duck); border: 1px solid #eee; }

footer {
  text-align: center;
  padding: 3rem;
  background: #f1f1f1;
  font-size: 0.9rem;
}

/* 모바일 반응형 스타일 추가 */
@media (max-width: 768px) {
  header h1 {
    font-size: 2.5rem; /* 모바일에서 제목 크기 축소 */
    word-break: keep-all;
  }

  header p {
    font-size: 1.1rem; /* 모바일에서 설명 크기 축소 */
    padding: 0 1rem;
  }

  .section-title {
    font-size: 2rem;
  }

  nav div {
    padding: 1rem !important;
  }

  nav div div:last-child {
    gap: 1rem !important; /* 메뉴 간격 조정 */
  }
}

@media (max-width: 480px) {
  nav div div:first-child {
    font-size: 1.2rem !important; /* 초소형 화면에서 로고 크기 축소 */
  }
  
  nav div div:last-child {
    gap: 0.8rem !important;
  }
}
