@font-face {
  font-family: 'Turret Road'; /* 앞으로 CSS에서 사용할 폰트 이름 */
  src: url('./assets/fonts/TurretRoad-Regular.ttf') format('truetype'); /* Regular 폰트 파일 경로 */
  font-weight: 400; /* 일반 굵기는 400 */
}

@font-face {
  font-family: 'Turret Road'; /* 같은 이름 사용 */
  src: url('./assets/fonts/TurretRoad-ExtraBold.ttf') format('truetype'); /* ExtraBold 폰트 파일 경로 */
  font-weight: 800; /* ExtraBold 굵기는 800 */
}

body {
  background-color: #000000; /* 초기 배경색 (흰색) */
  color: #ffffff; /* 초기 글자색 (검은색) */
  font-family: Turret Road, sans-serif; /* Turret Road 폰트 사용 */
  margin: 0;
}

.turret-road-extralight {
  font-family: "Turret Road", sans-serif;
  font-weight: 200;
  font-style: normal;
}

.turret-road-light {
  font-family: "Turret Road", sans-serif;
  font-weight: 300;
  font-style: normal;
}

.turret-road-regular {
  font-family: "Turret Road", sans-serif;
  font-weight: 400;
  font-style: normal;
}

.turret-road-medium {
  font-family: "Turret Road", sans-serif;
  font-weight: 500;
  font-style: normal;
}

.turret-road-bold {
  font-family: "Turret Road", sans-serif;
  font-weight: 700;
  font-style: normal;
}

.turret-road-extrabold {
  font-family: "Turret Road", sans-serif;
  font-weight: 800;
  font-style: normal;
}

/* 전체 화면을 감싸는 컨테이너 */
.main-container {
  /* 여기에 기존처럼 background.gif 이미지를 설정합니다. */
  background-image: url('./assets/background.gif');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  height: 100vh;
}

/* 콘텐츠를 감싸는 부모이자, 효과를 위한 기준점 */
.background-image {
  /* 자식 요소들과 ::before 가상 요소를 정렬하기 위한 설정 */
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column; /* main-part와 arrowIcon을 세로로 정렬 */
  justify-content: center; /* 세로 중앙 정렬 */
  align-items: center; /* 가로 중앙 정렬 */
}

/* ✨ 핵심: 배경 효과(그라데이션, 블러)를 적용할 가상 레이어 */
.background-image::before {
  content: ''; /* 가상 요소는 content 속성이 필수입니다. */
  position: absolute; /* 부모(.background-image)를 기준으로 위치를 잡습니다. */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;

  /* 요청하신 '아래로 갈수록 검해지는 그라데이션' */
  background: linear-gradient(to bottom, rgba(0,0,0,0.5), rgba(0,0,0,0.8));

  /* 배경(main-container의 gif)을 흐리게 하는 효과 */
  backdrop-filter: blur(3px);

  /* z-index를 주지 않거나 0으로 설정하여 콘텐츠보다 아래에 위치시킵니다. */
  z-index: 0;
}


/* 메인 콘텐츠 부분 */
.main-part {
  /* 가상 요소 레이어('::before')보다 위에 오도록 설정 */
  position: relative; /* z-index 적용을 위해 필수 */
  z-index: 1; /* ::before(z-index:0) 보다 위에 위치 */
  
  text-align: center;
  /* flex-grow를 이용해 main-part가 공간을 차지하고 arrowIcon을 아래로 밀어낼 수 있습니다. */
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}


.main-part h1 {
  margin: 0;
  /* 커서의 두께(4px)만큼 공간을 확보합니다. */
  padding-right: 5px; 
  /* 커서의 두께를 4px로 고정합니다. */
  border-right: 4px solid black;
  animation: cursor-blink 0.7s steps(2) infinite;
}

/* 커서 깜빡임 애니메이션 정의 */
@keyframes cursor-blink {
  0% {
    border-color: transparent;
  }
  50% {
    border-color: black;
  }
  100% {
    border-color: transparent;
  }
}

.main-part p {
  margin: 0;
  font-weight: normal;
}

.arrowIcon {
  width: 100px;
  height: 100px;
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 24px;
  animation: bounce 2s infinite;
}
@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-20px);
  }
  60% {
    transform: translateY(-10px);
  }
}

.arrowIcon img {
  width: 50px;
  height: 50px;
  color: black;
}

/* About 페이지 */
.intro-animation-container {
  height: 200vh;
  position: relative;
}

.intro-part {
  position: sticky;
  top: 0;
  width: 100%;
  height: 100vh;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden; /* 주석 해제 및 추가: 컨테이너 내 잔상 방지 */
}

.intro-part h1 {
  font-size: 50px;
  margin-bottom: 20px;
}

.description-part {
  background-color: #f9f9f9; /* 배경색을 연한 회색으로 설정 */
  width: 700px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 100px;
  border: 20px solid white;
  border-radius: 30px;
  box-shadow: 10px 10px 5px rgba(0, 0, 0, 0.2);
  gap: 50px;
  background-color: white;
}

.card-book {
   /* perspective: 3D 효과를 위한 원근감 설정 */
   perspective: 2500px; 
  
   /* 크기를 명확하게 지정하여 레이아웃이 무너지지 않도록 함 */
   width: 800px;
   height: 500px;
   
   /* 내부 요소들을 배치하기 위해 flex 사용 */
   display: flex;
 
   /* 이전 스타일에서 불필요한 부분 제거 */
   padding: 0;
   border: none;
   gap: 0;
}

.card-left, .card-right {
  width: 50%;
}

.card-left {
  width: 50%;
  height: 100%;
  background-color: white;
  border-radius: 30px 0 0 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  padding: 40px;
  box-sizing: border-box; /* 패딩이 크기에 영향을 주지 않도록 함 */
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-right {
  width: 50%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transform-origin: left center;
  border-radius: 0 30px 30px 0;
  box-shadow: 10px 10px 15px rgba(0, 0, 0, 0.2);
  /* overflow: hidden; */ /* <- 이렇게 주석 처리해도 됩니다 */
}

.card-face {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden; /* 뒷면 숨기기 */

  display: flex;
  flex-direction: column; /* explain-part 정렬을 위해 column으로 변경 */
  justify-content: center;
  align-items: center;

  background-color: white;
  padding: 20px; /* 내부 콘텐츠 여백 */
  box-sizing: border-box; /* 패딩이 크기에 영향을 주지 않도록 설정 */
  border-radius: 0 30px 30px 0; /* 오른쪽 모서리만 둥글게 */
}

.card-front {
  z-index: 1;
  border-radius: 0 30px 30px 0;
}

/* --- 카드 뒷면 (스킬 파트) 스타일 조정 --- */

/* .card-back 자체의 기본 스타일 수정 */
.card-back {
  transform: rotateY(180deg);
  background: white !important;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  border-radius: 30px 0 0 30px;
}

/* --- 기존 스킬 파트 스타일 (거의 그대로 사용) --- */
.card-back .skill-part {
  width: 100%;
  text-align: center;
}
.card-back .skill-part h1 {
  font-size: 1.8rem;
  margin-top: 0;
  margin-bottom: 20px;
}
.card-back .skill-items-container {
  max-width: 340px;
  margin: 0 auto;
  padding: 20px;
  background-color: rgba(0, 0, 0, 0.03);
  border-radius: 15px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.card-back .skill-category {
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-skill-half {
  position: absolute;

  /* 원하는 위치로 조정 (예: 중앙 정렬) */
  left: 50%;
  width: 45%;
  height: 92%;

  /* 다른 스타일들 */
  background-color: white; /* 눈에 띄게 배경색 추가 (테스트용) */
  padding: 20px;
  color: white;
  z-index: -1;
  justify-content: center;
  align-items: center;
  align-content: center;
  border-radius: 0 30px 30px 0; /* 다른 요소들 위에 보이도록 설정 */
}

.card-skill-half-right {
  position: absolute;

  /* 원하는 위치로 조정 (예: 중앙 정렬) */
  left: 0%;
  width: 95%;
  height: 92%;

  /* 다른 스타일들 */
  background-color: white; /* 눈에 띄게 배경색 추가 (테스트용) */
  padding: 20px;
  color: white;
  z-index: -1;
  justify-content: center;
  align-items: center;
  align-content: center;
  border-radius: 30px 0px 0px 30px; /* 다른 요소들 위에 보이도록 설정 */
}

.explain-part {
  width: 300px;
  height: auto;
  padding: 100px;
}

.explain-part p {
  line-height: 1.5;
  color: #333; /* 글자색을 어두운 회색으로 설정 */
  text-align: center; /* 텍스트 중앙 정렬 */
}

.image-part {
  width: 300px;
  height: 300px;
  position: relative;
  overflow: hidden;
  border-radius: 50%;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* 컨테이너 안의 프로필 이미지 */
.image-part .profile-img {
  width: 100%; /* 블러, 확대 등 모든 효과에 애니메이션을 부드럽게 적용 */
  height: 100%;
  object-fit: cover; /* 이미지가 잘리지 않고 컨테이너를 꽉 채우게 함 */
  transition: all 0.4s ease-out; /* 블러, 확대 등 모든 효과에 애니메이션을 부드럽게 적용 */
}

/* 이미지 위에 겹쳐질 오버레이 컨테이너 */
.image-part .overlay {
  width: 300px;
  height: 300px;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* 평소에는 투명하게 숨김 */
  opacity: 0; 
  background-color: rgba(0, 0, 0, 0.6);
  
  /* 나타날 때 부드러운 효과 */
  transition: opacity 0.4s ease-out;

  /* 내부 텍스트를 중앙에 배치 */
  display: flex;
  justify-content: center;
  align-items: center;
}

/* 오버레이 안의 텍스트 콘텐츠 */
.image-part .text-content {
  color: white;
  text-align: center;
  padding: 20px;
}

.image-part .text-content p {
  margin: 5px 0;
  font-size: 0.9rem; /* 컨테이너 크기에 맞게 폰트 사이즈 조절 */
  line-height: 1.3;
}

.text-content {
  padding: 10px;
}

/* --- 마우스를 올렸을 때의 변화 --- */

/* .image-part에 마우스를 올리면... */
.image-part:hover .profile-img {
  filter: blur(4px); /* 이미지를 흐리게 */
  transform: scale(1.1); /* 이미지를 살짝 확대 (선택 사항) */
}

.image-part:hover .overlay {
  opacity: 1; /* 숨겨뒀던 오버레이를 표시 */
}

.social-icons {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: end;
  gap: 20px;
  margin-top: 50px;
}

.social-icons a {
  margin: 0;
}

.social-icons a img {
  width: 30px;
  margin: 0;
  padding: 0;
}

/* 스킬 페이지 */
.skill-part {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 50px 0; /* 위아래 여백 조절 */
  z-index: 1000; /* 다른 요소들보다 위에 있도록 설정 */ 
}

.skill-part h1 {
  text-align: center;
  font-size: 50px;
  margin-bottom: 40px;
}

/* 기존 .skill-items를 새로운 이름으로 변경 */
.skill-items-container {
  width: 800px; /* 너비 조절 */
  display: flex;
  flex-direction: column;
  padding: 50px; /* 내부 여백 조절 */
  border-radius: 30px;
  box-shadow: 10px 10px 15px rgba(0, 0, 0, 0.1);
  gap: 30px; /* 각 카테고리 사이의 간격 */
}

/* --- 여기서부터 새로운 코드 추가 --- */

/* 각 스킬 줄(카테고리)의 레이아웃 */
.skill-category {
  display: flex;
  align-items: flex-start; /* 제목과 스킬 목록을 위쪽 기준으로 정렬 */
  gap: 20px;
}

/* 카테고리 제목 (아이콘 + 텍스트) */
.category-title {
  color: black;
  align-items: center;
  gap: 10px;
  font-size: 1.2rem;
  font-weight: bold;
  /* 제목 부분이 일정한 너비를 갖도록 설정하여 줄을 맞춤 */
  flex-shrink: 0; 
  width: 100%; 
  margin-bottom: 20px;
}

.category-title img {
  width: 24px; /* 아이콘 크기 조절 */
  height: 24px;
}

/* 스킬 뱃지(박스)들을 감싸는 리스트 */
.skills-list {
  display: flex;
  flex-wrap: wrap; /* 스킬이 많으면 다음 줄로 자동으로 넘어감 */
  gap: 12px; /* 뱃지 사이의 가로, 세로 간격 */
}

/* 개별 스킬 뱃지(박스) 스타일 */
.skill-badge {
  padding: 8px 16px; /* 뱃지 내부 여백 */
  border-radius: 20px; /* 둥근 모서리 */
  font-size: 0.95rem;
  font-weight: 500;
  color: white; /* 기본 글자색은 흰색 */
  background-color: #555; /* 기본 배경색 */
  display: inline-block;
  transition: transform 0.2s ease; /* 호버 효과 */
}

.skill-badge:hover {
  transform: translateY(-3px); /* 마우스를 올리면 살짝 위로 이동 */
}


/* --- 뱃지 색상별 클래스 --- */
.skill-badge.color-lightblue { background-color: #3B82F6; }
.skill-badge.color-yellow { background-color: #FBBF24; color: #333; } /* 노란색은 글씨가 검은색이 잘 보임 */
.skill-badge.color-dark { background-color: #2D3748; }
.skill-badge.color-red { background-color: #EF4444; }
.skill-badge.color-pink { background-color: #D53F8C; }
.skill-badge.color-blue { background-color: #0d43c0; }
.skill-badge.color-purple { background-color: #805AD5; }
.skill-badge.color-green { background-color: #38A169; }
.skill-badge.color-orange { background-color: #ED8936; }

/* 활동 커리어 이력 페이지 */
.activity-career-part {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  /* --- 추가: 전체적인 여백과 가독성을 위해 추가 --- */
  max-width: 1200px;
  margin: auto;
  padding: 40px 10px;
}

.activity-career-part h1 {
  font-size: 50px;
}

.career-part {
  text-align: left;
  margin: 30px;
  width: 45%; /* --- 추가: 너비를 명확하게 지정 --- */
  position: relative; /* --- 추가: 타임라인 기준점 --- */
  padding-left: 40px; /* --- 추가: 타임라인 선과 점을 위한 공간 확보 --- */
}

.activity-part {
  text-align: right;
  margin: 30px;
  width: 45%; /* --- 추가: 너비를 명확하게 지정 --- */
  position: relative; /* --- 추가: 타임라인 기준점 --- */
  padding-right: 40px; /* --- 추가: 타임라인 선과 점을 위한 공간 확보 --- */
}

/* Career 타임라인의 세로 선 */
.career-part::before {
  content: '';
  position: absolute;
  left: 0; /* 왼쪽에 선 배치 */
  top: 0;
  bottom: 0;
  width: 4px;
  background-color: #e0e0e0;
}

/* Activity 타임라인의 세로 선 */
.activity-part::before {
  content: '';
  position: absolute;
  right: 0; /* 오른쪽에 선 배치 */
  top: 0;
  bottom: 0;
  width: 4px;
  background-color: #e0e0e0;
}

/* 모든 타임라인 항목의 공통 스타일 */
.timeline-item {
  position: relative; /* 점(::before)의 위치 기준점 */
  margin-bottom: 50px;
}

.timeline-item h4, .timeline-item p {
    margin: 5px 0;
}

/* Career 타임라인 항목의 점 */
.career-part .timeline-item::before {
  content: '';
  position: absolute;
  left: -52px; /* 'padding-left' 값 등을 고려하여 선 위에 위치하도록 조정 */
  top: 5px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: white;
  border: 4px solid #370ebe; 
}

/* Activity 타임라인 항목의 점 */
.activity-part .timeline-item::before {
  content: '';
  position: absolute;
  right: -52px; /* 'padding-right' 값 등을 고려하여 선 위에 위치하도록 조정 */
  top: 5px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: white;
  border: 4px solid #370ebe; 
}

/* Activity h1이 아래에 오도록 정렬 (HTML 구조 순서 활용) */
.activity-part {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.activity-part .timeline-wrapper {
    /* 이 래퍼는 Activity 항목들이 위쪽에 모이도록 합니다 */
}

/* 애니메이션을 위한 초기 상태 설정 */
.timeline-item {
  /* --- 기존 스타일에 아래 내용 추가 --- */
  opacity: 0; /* 기본적으로 투명하게 만듦 */
  transform: translateY(20px); /* 살짝 아래에서 시작하는 효과 */
  transition: opacity 0.5s ease-out, transform 0.5s ease-out; /* 부드러운 애니메이션 효과 */
}

/* 화면에 보여질 때 적용될 스타일 */
.timeline-item.is-visible {
  opacity: 1; /* 완전히 보이게 함 */
  transform: translateY(0); /* 원래 위치로 이동 */
}

/* 프로젝트 & 리서치 페이지 */
/* 전체 컨테이너 스타일 */
.portfolio-container {
  padding: 50px 20px;
  font-family: sans-serif;
  min-height: 100vh;
}

/* 필터 버튼 스타일 */
.filter-buttons {
  text-align: center;
  margin-bottom: 40px;
}

.filter-btn {
  background: none;
  border: 1px solid #555;
  color: #ccc;
  padding: 10px 20px;
  margin: 0 10px;
  cursor: pointer;
  border-radius: 5px;
  transition: all 0.3s ease;
  font-size: 16px;
}

.filter-btn:hover {
  background-color: #333;
  color: #fff;
}

/* 현재 활성화된 버튼 스타일 */
.filter-btn.active {
  background-color: #370ebe;
  color: #fff;
  border-color: #370ebe;
}

/* 포트폴리오 그리드 레이아웃 */
.portfolio-grid {
  display: grid;
  /* 화면 크기에 맞춰 자동으로 2~3개의 열을 만듭니다 */
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px; /* 아이템 사이의 간격 */
}

/* 포트폴리오 아이템(카드) 스타일 */
.portfolio-item {
  color: white;
  background-color: #2a2a2a;
  border-radius: 8px;
  overflow: hidden; /* 이미지가 카드를 벗어나지 않도록 */
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  transition: transform 0.3s ease, opacity 0.4s ease; /* 부드러운 효과 */
}

.portfolio-item:hover {
    transform: translateY(-10px); /* 마우스를 올리면 살짝 위로 이동 */
}

/* 아이템 이미지 스타일 */
.portfolio-item img {
  width: 100%;
  height: 220px;
  object-fit: cover; /* 이미지가 비율을 유지하며 꽉 차게 */
  display: block;
}

/* 아이템 정보(텍스트) 영역 스타일 */
.item-info {
  padding: 20px;
}

.item-info h3 {
  margin-top: 0;
  margin-bottom: 5px;
  font-size: 22px;
}

.item-info p {
  margin: 0;
  color: #aaa;
  font-size: 14px;
}

/* --- 모달 스타일 --- */

/* 모달 컨테이너 기본 상태 (숨김) */
.modal-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999; /* 다른 모든 요소 위에 오도록 설정 */
  
  /* 부드러운 표시를 위해 opacity와 visibility 사용 */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  
  /* 콘텐츠를 중앙에 배치하기 위해 flex 사용 */
  display: flex;
  justify-content: center;
  align-items: center;
}

/* 모달이 활성화되었을 때의 상태 */
.modal-container.active {
  opacity: 1;
  visibility: visible;
}

/* 뒷 배경 오버레이 */
.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.75); /* 반투명 검은색 */
}

.modal-link {
  color: #370ebe; /* 링크 색상 */
  text-decoration: none; /* 밑줄 제거 */
  font-weight: bold; /* 글씨 두껍게 */
}

/* 모달 콘텐츠 박스 */
.modal-content {
  position: relative;
  background-color: white;
  color: #333;
  padding: 30px 40px;
  border-radius: 10px;
  width: 90%;
  max-width: 650px; /* 모달의 최대 너비 */
  max-height: 85vh; /* 모달의 최대 높이 */
  overflow-y: auto; /* 내용이 길면 스크롤 */
  z-index: 10000;
  transform: translateY(-20px); /* 등장 애니메이션 효과 */
  transition: transform 0.3s ease;
}

.modal-container.active .modal-content {
  transform: translateY(0);
}

/* 닫기 버튼 */
.modal-close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  background: none;
  border: none;
  font-size: 2.5rem;
  color: #aaa;
  cursor: pointer;
  line-height: 1;
}

/* 모달 내부 요소 스타일 */
.modal-content img {
  width: 100%;
  height: auto;
  max-height: 350px;
  object-fit: cover;
  border-radius: 5px;
  margin-bottom: 15px;
}
.modal-content h2 {
  margin-top: 0;
  margin-bottom: 5px;
}
.modal-content #modal-tech {
    color: #777;
    margin-bottom: 20px;
}
.modal-content #modal-description p {
  line-height: 1.7;
}

/* 모달이 열렸을 때 배경 스크롤 방지 */
body.modal-open {
  overflow: hidden;
}