body {
  min-height: 100vh;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  font-family: 'Noto Sans KR', sans-serif;
  background: #f7f7f7;
  color: #222;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;   /* 세로(수직) 중앙 정렬 */
  align-items: stretch;      /* 가로는 원래 사이즈(기본값) */
}

.section {
  width: 100%;
  max-width: 1200px;    /* 필요에 따라 최대폭 제한 */
  margin: 0 auto;       /* 가운데 정렬 */
  text-align: center;   /* 텍스트만 가운데 */
  box-sizing: border-box;
}


header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000; /* 다른 요소보다 위에 오도록 */
  background: #63dcf1; /* 배경색 필수! */
  color: #fff;
  padding: 1rem 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 2rem;  /* 좌우 패딩 추가 */
}

.logo {
  font-weight: bold;
  font-size: 1.5rem;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}

nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
}

.section {
  max-width: 1060px;
  margin: 2rem auto;
  padding: 2.5rem 2rem;  /* 좌우 패딩 추가 */
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.section h1, .section h2, .section h3, .section p {
  margin-left: 0.2rem;
  margin-right: 0.2rem;
}

.profile-img img {
  width: 120px;
  border-radius: 50%;
  margin-top: 1rem;
}

.skills-list {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0;
  list-style: none;
}

.skills-list2 {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0;
  list-style: none;
}

.skills-list3 {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0;
  list-style: none;
}

.skills-list li {
  background: #e0e7ff;
  color: #3730a3;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: 500;
}

.skills-list2 li {
  background: #e0e7ff;
  color: #3730a3;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: 500;
}

.skills-list3 li {
  background: #e0e7ff;
  color: #3730a3;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: 500;
}

.skills-list li:nth-child(1) {
  background: #01a2fe;
  color: #fff;
}
.skills-list li:nth-child(2) {
  background: #f16528; 
  color: #fff;
}
.skills-list li:nth-child(3) {
  background: #2c63f3; /* 초록색 */
  color: #fff;
}
.skills-list2 li:nth-child(1) {
  background: #559ad7; /* 파란색 */
  color: #fff;
}
.skills-list2 li:nth-child(2) {
  background: #FFD43B; /* 보라색 */
  color: #fff;
}

.project-card {
  margin-bottom: 1.5rem;
  padding: 1rem 1.5rem;  /* 좌우 패딩 추가 */
  border-left: 4px solid #6366f1;
  background: #f3f4f6;
  border-radius: 8px;
}

footer {
  text-align: center;
  padding: 1rem 0;
  background: #63dcf1;
  color: #fff;
  margin-top: 2rem;
}

.footer2 {
  text-align: center;
  padding: 1rem 0;
  background: #63dcf1;
  color: #fff;
  margin-top: 2rem;
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  z-index: 100;
}

.greeting {
  font-family: 'Noto Sans KR', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif; /* 고딕 계열 */
  font-weight: 900;   /* 매우 굵게 */
  font-size: 2.2rem;  /* 크기 강조 */
  margin-bottom: 0.5rem;
  margin-top: 0.5rem;
  letter-spacing: 0.05em;
  color: #222;
}

#loader {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  width: 100vw;
  height: 100vh;
  background: #222;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s;
}

.loading-message {
  font-size: 2rem;
  font-weight: 700;
  font-family: 'Noto Sans KR', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  letter-spacing: 0.05em;
  color: #fff;
  text-align: center;
  /* 필요에 따라 애니메이션 등 추가 가능 */
}

.skills-list li {
  background: #e0e7ff;
  color: #3730a3;
  padding: 0.3rem 0.8rem;   /* 세로 패딩을 줄여 더 얇게 */
  border-radius: 20px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  min-height: 32px;         /* 아이콘보다 약간 크게 */
}

body {
  opacity: 0;
  transition: opacity 0.5s;
}
body.loaded {
  opacity: 1;
}
body.fade-out {
  opacity: 0;
}

.skills-list,
.skills-list2,
.skills-list3 {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0;
  list-style: none;
  justify-content: center;   /* 가로 가운데 정렬 */
  align-items: center;
  margin: 0 auto;
}

.fixed-buttons {
  position: fixed;
  right: 32px;
  bottom: 32px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px; /* 버튼 사이 간격 */
}

/* 카카오톡 버튼 */
.kakao-btn {
  width: 56px;
  height: 56px;
  background: transparent;   /* 노란 배경 제거! */
  border-radius: 50%;
  box-shadow: 0 2px 12px rgba(0,0,0,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-bottom: 4px;
  transition: opacity 0.2s, box-shadow 0.2s;
  opacity: 0.95;
  text-decoration: none;
  border: none;
  cursor: pointer;
}
.kakao-btn:hover {
  opacity: 1;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}
.kakao-icon {
  width: 28px;
  height: 28px;
  display: block;
}
.kakao-tooltip {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  left: -110px;
  top: 50%;
  transform: translateY(-50%);
  background: #232323;
  color: #fff;
  padding: 4px 12px;
  border-radius: 8px;
  font-size: 13px;
  transition: opacity 0.2s;
  white-space: nowrap;
  pointer-events: none;
}
.kakao-btn:hover .kakao-tooltip {
  visibility: visible;
  opacity: 1;
}

/* 위로가기 버튼 및 툴팁은 이전 예시와 동일 */
.go-top-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}
.go-top-btn {
  width: 56px;
  height: 56px;
  border: none;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 12px rgba(0,0,0,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.2s, box-shadow 0.2s;
  opacity: 0.9;
}
.go-top-btn:hover {
  opacity: 1;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}
.go-top-tooltip {
  visibility: hidden;
  opacity: 0;
  margin-top: 8px;
  background: #232323;
  color: #fff;
  padding: 4px 12px;
  border-radius: 8px;
  font-size: 13px;
  transition: opacity 0.2s;
  white-space: nowrap;
  pointer-events: none;
}
.go-top-container:hover .go-top-tooltip,
.go-top-btn:focus + .go-top-tooltip {
  visibility: visible;
  opacity: 1;
}

@media (max-width: 768px) {
  main {
    max-width: 100%;
    padding: 0 0.5rem;
  }
  .project-detail {
    padding: 1rem 0.5rem;
    border-radius: 0;
    box-shadow: none;
  }
  .project-detail h1 {
    font-size: 1.5rem;
  }
  .project-detail h2 {
    font-size: 1.1rem;
    padding-bottom: 0.1rem;
  }
  .detail-btn {
    width: 100%;
    margin: 0.5rem 0 0 0;
    padding: 0.7rem 0;
    font-size: 1rem;
  }
  header nav, footer {
    flex-direction: column;
    padding: 1rem 0.5rem;
  }
  header nav ul {
    gap: 0.8rem;
  }
}

@media (max-width: 768px) {
  .section {
    width: 100%;
    max-width: 100%;
    margin: 1rem 0;        /* 위아래 간격 */
    padding: 1rem;         /* 내부 여백 */
    box-sizing: border-box;
  }
}

@media (max-width: 768px) {
  nav ul {
    display: flex;                 /* flexbox로 가로 정렬 */
    flex-direction: row;           /* 가로 방향 */
    gap: 1rem;                     /* 아이템 간 간격 */
    padding: 0;
    margin: 0;
    overflow-x: auto;              /* 가로 스크롤 가능하게 */
    -webkit-overflow-scrolling: touch; /* iOS에서 부드러운 스크롤 */
  }
  nav ul li {
    flex: 0 0 auto;                /* 아이템 크기 고정, 줄 바꿈 방지 */
  }
  nav ul li a {
    display: block;
    padding: 0.5rem 1rem;
    white-space: nowrap;           /* 텍스트 줄 바꿈 방지 */
  }
}

@media (max-width: 768px) {
  .project-card {
    width: 100%;           /* 카드가 화면 전체 너비를 사용 */
    max-width: 100%;
    margin-bottom: 1rem;   /* 카드 간 간격 */
    box-sizing: border-box;/* 패딩/보더 포함하여 크기 계산 */
  }
}

@media (max-width: 768px) {
  .detail-btn {
    opacity: 0 !important;
    pointer-events: none !important;
  }
  .project-card {
    cursor: pointer;
  }
}

/* 모바일에서 header 높이만큼 main 상단에 padding 추가 */
/* @media (max-width: 768px) {
  main {
    padding-top: 125px;
  }
} */
