/* 기본 스타일 리셋 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Helvetica Neue", Arial, sans-serif;
}

body {
  background-color: #f9f9f9;
  color: #333;
  line-height: 1.6;
}

/* 헤더 스타일 */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 5%;
  background-color: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.logo {
  cursor: pointer;
}

.logo h3 {
  font-weight: 700;
  font-size: 1.5rem;
  color: #333;
}

nav ul {
  display: flex;
  list-style: none;
}

nav ul li {
  margin-left: 30px;
}

nav ul li a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  transition: color 0.3s ease;
}

nav ul li a:hover {
  color: #0066cc;
}

/* 히어로 섹션 */
.hero {
  height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 5%;
  background-color: #f2f2f2;
  position: relative;
}

.hero-content h1 {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 20px;
  letter-spacing: 2px;
}

.hero-content h2 {
  font-size: 1.8rem;
  font-weight: 400;
  color: #666;
  margin-bottom: 40px;
  line-height: 1.4;
}

.scroll-down {
  position: absolute;
  bottom: 30px;
  left: 49%;
  transform: translateX(-50%);
  animation: bounce 2s infinite;
}

.scroll-down a {
  display: block;
  color: #0066cc;
  font-size: 2rem;
  transition: color 0.3s ease;
}

.scroll-down a:hover {
  color: #004999;
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-20px);
  }
  60% {
    transform: translateY(-10px);
  }
}

/* About Me 섹션 */
.about {
  padding: 100px 5%;
  background-color: #fff;
  text-align: center;
}

.about h2 {
  font-size: 2.5rem;
  margin-bottom: 50px;
  font-weight: 700;
}

.about-wrapper {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 130px; /* 간격 늘림 */
  max-width: 1000px; /* 전체 너비 조정 */
  margin: 0 auto;
  padding: 0 20px;
}

.about-content {
  flex: 1;
  min-width: 300px;
  text-align: left;
}

.about-content p {
  margin-bottom: 20px;
  font-size: 1.1rem;
  color: #555;
}

.about-content p strong {
  color: #0066cc;
  font-weight: 700;
}

.about-image {
  flex: 0 0 300px;
}

.about-image .image-placeholder {
  width: 300px;
  height: 300px;
  border-radius: 50%;
  margin: 0 auto;
}

/* Projects 섹션 전체 스타일 */
.projects {
  padding: 100px 5%;
  background-color: #f9f9f9;
  text-align: center;
}

.projects h2 {
  font-size: 2.5rem;
  margin-bottom: 60px;
  font-weight: 700;
}

/* 대표 프로젝트 섹션 */
.featured-projects {
  margin-bottom: 80px;
}

.featured-projects h1 {
  font-size: 3rem;
  color: #0066cc;
  margin-bottom: 70px;
  font-weight: 600;
  position: relative;
}

.featured-projects h1::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background-color: #0066cc;
}

.featured-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
}

/* 대표 프로젝트 카드 스타일 */
.featured-card {
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  padding: 30px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  position: relative;
}

.featured-card::before {
  content: "FEATURED";
  position: absolute;
  top: -1px;
  right: 20px;
  background: linear-gradient(45deg, #0066cc, #0099ff);
  color: white;
  padding: 8px 16px;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: 0 0 8px 8px;
  letter-spacing: 1px;
}

.featured-card:hover {
  transform: translateY(-15px);
  box-shadow: 0 15px 40px rgba(0, 102, 204, 0.2);
  border-color: #0066cc;
}

.featured-card .image-placeholder {
  width: 100%;
  height: 200px;
  border-radius: 8px;
  background-color: #f0f8ff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0066cc;
  font-size: 14px;
  margin-bottom: 20px;
  border: 2px solid #e6f3ff;
}

.featured-card h2 {
  font-size: 1.4rem;
  margin-bottom: 10px;
  color: #0066cc;
  font-weight: 600;
}

.featured-card .project-period {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 15px;
  font-weight: 500;
}

.featured-card .project-description {
  color: #555;
  font-size: 1rem;
  line-height: 1.5;
}

/* 기타 프로젝트 섹션 */
.other-projects {
  margin-top: 60px;
}

.other-projects h3 {
  font-size: 2rem;
  color: #333;
  margin-bottom: 30px;
  font-weight: 550;
}

.other-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  max-width: 1000px;
  margin: 0 auto;
}

/* 기타 프로젝트 카드 스타일 */
.other-card {
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  padding: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.other-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.other-card .image-placeholder {
  width: 100%;
  height: 150px;
  border-radius: 6px;
  background-color: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-size: 12px;
  margin-bottom: 15px;
}

.other-card h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
  color: #333;
  font-weight: 500;
}

.other-card .project-period {
  color: #666;
  font-size: 0.85rem;
  margin-bottom: 10px;
}

.other-card .project-description {
  color: #666;
  font-size: 0.9rem;
  line-height: 1.4;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
  .featured-cards {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .other-cards {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .featured-card {
    padding: 25px;
  }

  .featured-projects h3 {
    font-size: 1.6rem;
  }

  .other-projects h3 {
    font-size: 1.4rem;
  }
}

@media (max-width: 480px) {
  .featured-card .image-placeholder {
    height: 160px;
  }

  .other-card .image-placeholder {
    height: 120px;
  }
}

/* 팝업 스타일 */
#project-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

#project-popup.active {
  opacity: 1;
  visibility: visible;
}

.popup-content {
  background-color: #fff;
  border-radius: 8px;
  width: 90%;
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 30px;
  position: relative;
}

.popup-close {
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 24px;
  background: none;
  border: none;
  cursor: pointer;
  color: #333;
  z-index: 10;
}

/* 개선된 슬라이드 스타일 */
.popup-slide {
  padding-bottom: 50px; /* 인디케이터를 위한 공간 확보 */
  position: relative;
  overflow: hidden;
}

.slide-track {
  display: flex;
  height: 100%;
  transition: transform 0.5s ease-in-out;
}

.slide {
  min-width: 100%;
  height: 100%;
}

.slide img {
  width: 100%;
  height: auto;
  max-height: 70vh; /* 뷰포트 높이의 70%로 제한 */
  object-fit: contain;
}

.slide-nav {
  position: absolute;
  top: 50%;
  width: 100%;
  display: flex;
  justify-content: space-between;
  transform: translateY(-50%);
  padding: 0 20px;
  z-index: 5;
}

.slide-nav button {
  background-color: rgba(0, 0, 0, 0.5);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease;
}

.slide-nav button:hover {
  background-color: rgba(0, 0, 0, 0.8);
}

/* 슬라이드 인디케이터 위치 및 스타일 수정 */
.slide-indicators {
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 10px;
  z-index: 5;
  background-color: rgba(0, 0, 0, 0.3); /* 반투명 배경 추가 */
  border-radius: 10px;
  padding: 5px 10px;
  width: fit-content;
  margin: 0 auto;
}

.indicator {
  width: 15px;
  height: 15px;
  background-color: rgba(255, 255, 255, 0.7);
  border: 2px solid rgba(0, 0, 0, 0.3);
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.indicator.active {
  background-color: #0066cc;
  border-color: #ffffff;
}

/* 슬라이드 버튼 스타일 개선 */
.slide-prev,
.slide-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.4);
  color: white;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 24px;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease;
}

.slide-prev:hover,
.slide-next:hover {
  background-color: rgba(0, 0, 0, 0.6);
}

.slide-prev {
  left: 10px;
}

.slide-next {
  right: 10px;
}

.popup-details h3 {
  font-size: 1.8rem;
  margin-bottom: 10px;
  color: #0066cc;
}

.popup-details p {
  margin-bottom: 15px;
  color: #555;
}

.popup-details h4 {
  font-size: 1.2rem;
  margin: 20px 0 10px;
  color: #333;
}

.popup-details ul {
  list-style-position: inside;
  margin-bottom: 15px;
  padding-left: 15px;
}

.popup-details li {
  margin-bottom: 8px;
  color: #555;
}

.popup-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.popup-tech span {
  padding: 5px 15px;
  background-color: #f2f2f2;
  border-radius: 20px;
  font-size: 0.9rem;
  color: #333;
}

/* 링크 스타일 */
.popup-links {
  display: flex;
  gap: 15px;
  margin-top: 25px;
  justify-content: flex-start;
}

.popup-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background-color: #0066cc;
  color: white;
  text-decoration: none;
  border-radius: 4px;
  font-weight: 500;
  transition: background-color 0.3s ease;
}

.popup-link:hover {
  background-color: #0055aa;
}

.popup-link i {
  font-size: 1.2rem;
}

/* 연락처 섹션 */
.contact {
  padding: 100px 5%;
  background-color: #fff;
  text-align: center;
}

.contact h2 {
  font-size: 2.5rem;
  margin-bottom: 30px;
  font-weight: 700;
}

.contact-wrapper {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  gap: 30px;
}

.contact-info-container {
  flex: 1;
  min-width: 300px;
  text-align: left;
}

.contact-form-container {
  flex: 1;
  min-width: 300px;
}

.contact-content h3 {
  font-size: 1.8rem;
  margin-bottom: 20px;
  color: #0066cc;
}

.contact-content > p {
  margin-bottom: 40px;
  color: #666;
  font-size: 1.2rem;
}

.contact-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 40px;
}

.contact-item {
  display: flex;
  align-items: center;
}

.contact-item a {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #333;
  transition: color 0.3s ease;
}

.contact-item a:hover {
  color: #0066cc;
}

.contact-item i {
  font-size: 1.5rem;
  color: #0066cc;
}

.contact-item p {
  font-size: 1.1rem;
}

#contact-form {
  max-width: 100%;
  text-align: left;
}

.form-group {
  margin-bottom: 20px;
}

input,
textarea {
  width: 100%;
  padding: 15px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
}

textarea {
  min-height: 150px;
  resize: vertical;
}

.submit-btn {
  padding: 15px 30px;
  background-color: #0066cc;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: background-color 0.3s ease;
}

.submit-btn:hover {
  background-color: #0055aa;
}

#form-message {
  margin-top: 20px;
  color: #4caf50;
}

.hidden {
  display: none;
}

/* 푸터 */
footer {
  padding: 30px 5%;
  background-color: #333;
  color: #fff;
  text-align: center;
}

/* 맨 위로 버튼 */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background-color: #0066cc;
  color: #fff;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 999;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background-color: #0055aa;
  transform: translateY(-5px);
}

.back-to-top i {
  font-size: 1.5rem;
}

/* 이미지 플레이스홀더 내 이미지 스타일 */
.image-placeholder.with-image {
  background-color: transparent;
  position: relative;
  overflow: hidden;
}

.image-placeholder.with-image::after {
  content: none;
}

.portfolio-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

/* 프로젝트 카드 이미지 스타일 */
.project-card .image-placeholder.with-image {
  height: 150px;
}

/* 프로필 이미지 스타일 */
.about-image .image-placeholder.with-image {
  width: 300px;
  height: 300px;
  border-radius: 50%;
}

/* 스킬 아이콘 이미지 스타일 */
.skill-icon .image-placeholder.with-image {
  width: 60px;
  height: 60px;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* 이미지 플레이스홀더 */
.image-placeholder {
  width: 200px;
  height: 200px;
  background-color: #ddd;
  border-radius: 50%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-size: 14px;
}

.image-placeholder::after {
  content: "이미지";
}

/* 반응형 디자인 */
@media (max-width: 768px) {
  header {
    flex-direction: column;
    padding: 20px;
  }

  nav ul {
    margin-top: 20px;
  }

  nav ul li {
    margin: 0 10px;
  }

  .hero-content h1 {
    font-size: 2.5rem;
  }

  .hero-content h2 {
    font-size: 1.3rem;
  }

  .popup-slide {
    height: 250px;
  }

  .popup-content {
    padding: 20px;
  }

  .skill-item {
    flex: 0 0 100%;
  }

  .contact-wrapper {
    flex-direction: column;
  }

  .contact-info-container,
  .contact-form-container {
    width: 100%;
  }

  .about-wrapper {
    flex-direction: column;
  }

  .about-image,
  .about-content {
    width: 100%;
  }

  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
  }
}

/* 애니메이션 효과 */
section {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

section.visible {
  opacity: 1;
  transform: translateY(0);
}

.project-card,
.skill-item {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.5s ease, transform 0.5s ease, box-shadow 0.3s ease;
}

section.visible .project-card,
section.visible .skill-item {
  opacity: 1;
  transform: translateY(0);
}

section.visible .project-card:nth-child(1),
section.visible .skill-item:nth-child(1) {
  transition-delay: 0.1s;
}

section.visible .project-card:nth-child(2),
section.visible .skill-item:nth-child(2) {
  transition-delay: 0.2s;
}

section.visible .project-card:nth-child(3),
section.visible .skill-item:nth-child(3) {
  transition-delay: 0.3s;
}

section.visible .project-card:nth-child(4),
section.visible .skill-item:nth-child(4) {
  transition-delay: 0.4s;
}

section.visible .skill-item:nth-child(5) {
  transition-delay: 0.5s;
}

section.visible .skill-item:nth-child(6) {
  transition-delay: 0.6s;
}

section.visible .skill-item:nth-child(7) {
  transition-delay: 0.7s;
}

header.scrolled {
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  padding: 15px 5%;
  transition: all 0.3s ease;
}
