/* 초기화 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

a:any-link {
  text-decoration: none;
  color: inherit;
}

html {
  scroll-behavior: smooth;
}


body {
  font-family: 'Noto Sans KR', sans-serif;
  background: linear-gradient(135deg, #f8cdda, #fbc7d4, #c6f5e9, #d3f0fb);
  background-size: 600% 600%;
  animation: gradient 20s ease infinite;
  min-height: 100vh;
  color: #222;
}

/* 상단 header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
   position: sticky;
  top: 0;
  background-color: transparent;
  z-index: 1000;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* 스크롤 시 흰색 배경 */
header.scrolled {
  background-color: white;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Fade-in animation */
.fade-target {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1s ease, transform 1s ease;
}
.fade-target.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* Scroll to top button */
#scrollTopBtn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: black;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 1001;
}

/* 화살표 */

#scrollTopBtn::before {
  content: '';
  border: solid white;
  border-width: 0 2px 2px 0;
  display: inline-block;
  padding: 8px;
  transform: rotate(-135deg);
  position: relative;
  top: 5px;
}


#scrollTopBtn.show {
  opacity: 1;
  pointer-events: auto;
}

.logo {
  font-weight: bold;
}

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

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

nav a:hover {
  color: #555;
}

/* 메인 콘텐츠 */
main {
  text-align: left;
  padding: 100px 40px;
  max-width: 800px;
  height: 100vh;
 /* animation: gradient 2s ease infinite;*/
}

main h1 {
  font-size: 6rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 30px;
}

main p {
  font-size: 1rem;
  line-height: 1.6;
  color: #333;
}

/* 그라데이션 애니메이션 */
@keyframes gradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}




/* 반응형 */
@media (max-width: 768px) {
  header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  nav ul {
    flex-direction: column;
    gap: 10px;
  }
  main {
    padding: 60px 20px;
  }
  main h1 {
    font-size: 2.2rem;
  }
}

.spinner {
  display: inline-block;
  position: relative;
  width: 24px;
  height: 24px;
  margin-left: 10px;
  left: 50px;
  top: 50px;
}

.spinner div {
  transform-origin: 10px 30px;
  animation: spinner 1.2s linear infinite;
}
.spinner div:after {
  content: " ";
  display: block;
  position: absolute;
  top: 2px;
  left: 11px;
  width: 2px;
  height: 6px;
  border-radius: 20%;
  background: #222;
}
.spinner div:nth-child(1) {
  transform: rotate(0deg);
  animation-delay: -1.1s;
}
.spinner div:nth-child(2) {
  transform: rotate(30deg);
  animation-delay: -1s;
}
.spinner div:nth-child(3) {
  transform: rotate(60deg);
  animation-delay: -0.9s;
}
.spinner div:nth-child(4) {
  transform: rotate(90deg);
  animation-delay: -0.8s;
}
.spinner div:nth-child(5) {
  transform: rotate(120deg);
  animation-delay: -0.7s;
}
.spinner div:nth-child(6) {
  transform: rotate(150deg);
  animation-delay: -0.6s;
}
.spinner div:nth-child(7) {
  transform: rotate(180deg);
  animation-delay: -0.5s;
}
.spinner div:nth-child(8) {
  transform: rotate(210deg);
  animation-delay: -0.4s;
}
.spinner div:nth-child(9) {
  transform: rotate(240deg);
  animation-delay: -0.3s;
}
.spinner div:nth-child(10) {
  transform: rotate(270deg);
  animation-delay: -0.2s;
}
.spinner div:nth-child(11) {
  transform: rotate(300deg);
  animation-delay: -0.1s;
}
.spinner div:nth-child(12) {
  transform: rotate(330deg);
  animation-delay: 0s;
}

@keyframes spinner {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

.title-with-spinner {
  display: inline-flex;
  align-items: center;
  gap: 10px; /* 글자와 스피너 사이 간격 */
}

.work-section {
  padding: 80px 40px;
  background: #f9f9f9;
  margin-bottom: -100px;
}

.work-section h2 {
  font-size: 2rem;
  margin-bottom: 40px;
  text-align: left;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
  margin-bottom: 100px;
  align-items: start; /* 이거 한 줄 추가 */
}


.work-item {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  overflow: hidden;
  transition: transform 0.3s ease;
}

.work-item:hover {
  transform: translateY(-5px);
}

.work-item img {
  width: 100%;
  display: block;
}

.work-item h3 {
  font-size: 1.2rem;
  margin: 20px;
  color: #333;
}

.work-item > p.black {
  color: dimgray;
  font-weight: 500;
}


.work-item > p {
  font-size: 0.9rem;
  margin: 0 20px 20px 20px;
  color: gray;
}

.about-section {
  padding: 80px 40px;
  background-color: white;
  margin-bottom: -150px;
}

.about-section h2 {
  font-size: 2rem;
  margin-bottom: 40px;
  font-weight: 700;
}

.about-section p {
  font-size: 1rem;
  line-height: 1.8;
  color: #333;
}

.education-section {
  padding: 80px 40px;
  background-color: white;
  margin-top: 80px;
}

.education-section h2 {
  font-size: 2rem;
  margin-bottom: 40px;
  font-weight: 700;
}

.education-section ul {
  list-style: none;
}

.education-section li {
  font-size: 1rem;
  line-height: 1.8;
  color: #333;
  margin-bottom: 20px;
}

.education-section .date {
  font-weight: 500;
  margin-right: 10px;
  color: #222;
}

.about-content {
  display: flex;
  gap: 40px;
  flex-wrap: wrap; /* 모바일 대응 */
  flex-direction: row;
  align-items: flex-start;
}

.about-content p {
  flex: 1 1 300px;
}

.about-content video {
  width: 100%;
  max-width: 600px; /* 최대크기 */
  border-radius: 2px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  position: relative;
  left: -100px;
  top: -80px;
}

.about-content img {
  position: relative;
  left: -200px;
  top: -50px;
  width: 300px;
  height: 300px;
}

.work-item video {
  width: 100%;
  display: block;
}

  .about-content img,
  .about-content video {
    margin: 0 auto;
  }

/* 추가 반응형 스타일 */
@media (max-width: 768px) {
  header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 20px;
  }
  
  nav ul {
    flex-direction: column;
    gap: 15px;
    width: 100%;
  }

  nav li {
    width: 100%;
  }

  nav a {
    display: block;
    padding: 10px 0;
    width: 100%;
    border-bottom: 1px solid #eee;
  }

  main {
    padding: 60px 20px;
    height: auto; /* 모바일에서는 100vh 제거 */
    text-align: left;
  }

  main h1 {
    font-size: 2.5rem;
    line-height: 1.3;
  }

  main p {
    font-size: 1rem;
  }
}

/* 햄버거 버튼 기본 숨김 */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
}

/* 반응형 메뉴 */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
    position: relative;
    z-index: 1100;
  }

  nav ul.nav-menu {
    display: none;
    flex-direction: column;
    gap: 0;
    background: white;
    width: 100%;
    position: absolute;
    top: 60px;
    left: 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  }

  nav ul.nav-menu.show {
    display: flex;
  }

  nav ul.nav-menu li {
    width: 100%;
  }

  nav ul.nav-menu li a {
    display: block;
    border-bottom: 1px solid #eee;
    padding-left: 70px;
  }
  
   .about-content {
    flex-direction: column;
    align-items: center;
  }

  .about-content img,
  .about-content video {
    position: static;
    margin: 0 auto;
  }
}

@media (max-width: 480px) {
  .about-content img,
  .about-content video {
    width: 100%;
    max-width: 300px; /* 원하는 최대폭 */
  }
}

@media (max-width: 768px) {
  .spinner {
    position: static;
    display: block;
    margin: 0 auto 0 30px; /* 왼쪽 마진 추가 */
  }
}













