/* 공통 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body,
html {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: 'Noto Sans KR', sans-serif;
  background-color: #f5f5f5;
  scroll-behavior: smooth;
}


header {
  position: fixed;
  top: 0;
  width: 100%;
  background: white;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  padding: 15px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
}

#contact {
  padding-top: 100px;
  /* 헤더 높이만큼 밀어주고 */
  margin-top: -100px;
  /* 다시 위치 보정 */
}

nav a {
  margin-left: 20px;
  text-decoration: none;
  color: #333;
  font-weight: 500;
}

.hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100vh;
  text-align: center;
  padding: 0 20px;
}

.hero h2 {
  font-size: 2.2rem;
  margin-bottom: 20px;
}

.hero p {
  font-size: 1.1rem;
  color: #d6bebe;
  margin-bottom: 30px;
}

/* Hero 배경 이미지 스타일 */
.hero.hero-image {
  background: url('../images/main-bg.jpg') center/cover no-repeat;
  position: relative;
  color: white;
}

.hero.hero-image .overlay {
  background-color: rgba(0, 0, 0, 0.5);
  padding: 40px;
  border-radius: 12px;
  text-align: center;
  max-width: 800px;
  width: 90%;
}

.cta {
  padding: 12px 24px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 5px;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
}

.cta:hover {
  background-color: #0056b3;
}


/* About 섹션 */
#about {
  background-color: #ffffff;
  padding: 100px 20px;
  color: #333;
}

.about-container {
  display: flex;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
  gap: 40px;
  align-items: center;
}

.about-left {
  flex: 1 1 40%;
  text-align: center;
}

.about-left img {
  max-width: 300px;
  border-radius: 16px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.about-right {
  flex: 1 1 55%;
}

.about-right h2 {
  font-size: 2rem;
  margin-bottom: 20px;
}

.about-right p {
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 30px;
}

.skills {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.skills li {
  background-color: #f0f0f0;
  color: #007bff;
  font-weight: 500;
  border-radius: 20px;
  padding: 10px 18px;
  font-size: 0.9rem;
}

/* 프로젝트 섹션 */
/* 프로젝트 전체 영역 */
#projects {
  padding: 80px 20px 60px;
  background-color: #f9f9f9;
  text-align: center;
}

/* 섹션 제목 */
#projects h2 {
  font-size: 1.8rem;
  margin-bottom: 40px;
  color: #222;
}

/* 카드 래퍼 */
.project-wrapper {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
  max-width: 960px;
  margin: 0 auto;
}

/* 개별 카드 */
.card {
  position: relative;
  width: 280px;
  border: 1px solid #eee;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  cursor: pointer;
}

.card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.card-content {
  padding: 16px;
}

.card-content h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
  color: #333;
}

.card-content p {
  font-size: 0.9rem;
  color: #666;
  line-height: 1.4;
}

.link-text {
  display: inline-block;
  margin-top: 12px;
  color: #007bff;
  font-weight: 500;
  font-size: 0.9rem;
}

/* 전체 클릭 링크 덮개 */
.card-link {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: auto;
}

/* 내부 콘텐츠 위로 올리기 */
.card img,
.card-content {
  position: relative;
  z-index: 1;
}


/* Footer */
footer {
  background-color: #222;
  color: #ccc;
  text-align: center;
  padding: 40px 20px;
  font-size: 0.9rem;
}

.footer-inner {
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.6;
}


/* 카드 등장효과 */

.card.fade-in {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.6s ease;
}

.card.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.card:nth-child(1) {
  transition-delay: 0.1s;
}

.card:nth-child(2) {
  transition-delay: 0.3s;
}


/* 반응형 디자인 */

/* ------------------------
   📱 Responsive (모바일 ~ 태블릿)
   ------------------------ */
@media (max-width: 768px) {


  header {
    padding: 10px 16px;
    flex-direction: column;
    align-items: flex-start;
  }

  header h1 {
    font-size: 1rem;
    margin-bottom: 10px;
  }

  nav {
    width: 100%;
    display: flex;
    justify-content: space-around;
  }

  nav a {
    font-size: 0.9rem;
    margin-left: 0;
  }

  /* Hero */
  .hero h2 {
    font-size: 1.6rem;
  }

  .hero p {
    font-size: 1rem;
    line-height: 1.6;
  }

  .hero .cta {
    font-size: 0.95rem;
    padding: 10px 20px;
  }

  /* About */
  .about-container {
    flex-direction: column;
    text-align: center;
  }

  .about-left,
  .about-right {
    flex: 1 1 100%;
  }

  .about-left img {
    max-width: 240px;
    margin-bottom: 20px;
  }

  .about-right h2 {
    font-size: 1.6rem;
    margin-bottom: 20px;
  }

  .about-right p {
    font-size: 1rem;
  }

  .skills {
    justify-content: center;
  }

  .skills li {
    font-size: 0.85rem;
    padding: 8px 16px;
  }

  /* Projects */
  .project-wrapper {
    flex-direction: column;
    align-items: center;
    gap: 24px;
  }

  .card {
    width: 90%;
    max-width: 320px;
  }

  .card-content h3 {
    font-size: 1rem;
  }

  .card-content p {
    font-size: 0.9rem;
  }

  .link-text {
    font-size: 0.85rem;
  }

  /* Footer */
  footer {
    font-size: 0.8rem;
    padding: 30px 10px;
  }
}


/* iPhone SE등 */

@media (max-width: 480px) {
  .hero h2 {
    font-size: 1.3rem;
  }

  .about-right p {
    font-size: 0.95rem;
  }

  .skills li {
    font-size: 0.8rem;
  }
}