/*---Global---*/
:root {
  --main-color: #448844;
  --main-color-rgb: 68, 136, 68;
  --text-light: #e3e8e3;
  --text-dark: #224422;
  --text-dark-rgb: 34, 68, 34;
  --highlight-color: #90FF90;
  --highlight-color-rgb: 144, 255, 144;
  font-size: 16px;
  --header-height: 16vh;
  --footer-height: 30px;
  --wireframe-color: #448844;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  background-color: #f4f4f4;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 400;
  scrollbar-width: thin;
  scrollbar-color: var(--main-color) transparent;
  overflow: hidden;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background-color: transparent;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb {
  background-color: var(--main-color);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background-color: var(--highlight-color);
}

canvas {
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 0;
}

/*---Header---*/
.header {
  position: fixed;
  top: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 2.8rem;
  overflow: hidden;
}

.header-text {
  padding: 0.05em 0.3em;
  display: inline-block;
  align-items: center;
  text-align: center;
  border-radius: 2px;
}

.header-text.title {
  color: var(--text-light);
  -webkit-text-stroke: 1px var(--text-dark);
  font-size: 1em;
  background-color: rgba(255, 255, 255, 0.7);
}

.header-text.tagline {
  color: rgba(var(--main-color-rgb), 0.7);
  font-size: 0.5em;
  font-weight: 300;
  font-style: italic;
  background-color: rgba(var(--highlight-color-rgb), 0.3);
}

.marquee-wrapper {
  overflow: hidden;
  white-space: nowrap;
  position: relative;
}

.marquee-track {
  display: inline-block;
  animation: scroll-left 10s linear infinite;
  white-space: nowrap;
}

.marquee-wrapper:hover .marquee-track {
  animation-play-state: paused;
}

@keyframes scroll-left {
  0% {
    transform: translateX(100%);
  }

  100% {
    transform: translateX(-100%);
  }
}

/* ---------------- 모바일 햄버거 ---------------- */
.hamburger {
  display: none;
  /* 기본은 숨김 */
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 28px;
  border: none;
  background: none;
  cursor: pointer;
  z-index: 101;
}

.hamburger .bar {
  display: block;
  width: 100%;
  height: 4px;
  margin: 5px 0;
  background: var(--text-dark);
  transition: transform .3s, opacity .3s;
}

/* 열림 상태(토글) */
.hamburger.open .bar:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.hamburger.open .bar:nth-child(2) {
  opacity: 0;
}

.hamburger.open .bar:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* 오버레이 메뉴 */
.mobile-nav {
  display: none;
  /* JS로 토글 */
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .85);
  backdrop-filter: blur(4px);
  z-index: 100;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2rem;
}

.mobile-nav a {
  color: #fff;
  font-size: 1.4rem;
  text-decoration: none;
}

/* ---------------- 스티키 바텀바 모바일 변형 ---------------- */
@media (max-width:670px) {
  .hamburger {
    display: block;
  }

  /* 버튼 노출 */

  /* 바텀바 아이콘만 기본 표시 */
  .nav-bottom a .label {
    display: none;
  }

  .nav-bottom a {
    padding: .6rem 0;
  }

  .nav-bottom a i {
    font-size: 1.6rem;
  }

  /* 활성 항목만 라벨 보여주기 */
  .nav-bottom a.active .label {
    display: block;
    font-size: .75rem;
  }
}

/*---Footer---*/
.footer-bar {
  position: fixed;
  bottom: 0;
  width: 100%;
  height: var(--footer-height);
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(5px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9em;
  color: var(--text-dark);
  flex-wrap: wrap;
  word-break: keep-all;
}

.nav-bottom {
  position: fixed;
  bottom: calc(var(--footer-height) + 5px);
  width: 100%;
  display: flex;
  justify-content: space-evenly;
  z-index: 100;
  font-size: 1em;
  font-weight: 500;
  background-color: rgba(var(--highlight-color-rgb), 0.3);
}

.nav-bottom a {
  text-align: center;
  text-decoration: none;
  color: rgba(var(--text-dark-rgb), 0.5);
  transition: color 0.3s ease;
}

.nav-bottom a.active {
  color: var(--main-color);
  font-weight: bold;
}

.nav-bottom a:hover {
  color: var(--text-light);
}

/*---Main Layout---*/
.fade-in-section {
  opacity: 0;
  transition: opacity 1s ease;
}

.fade-in-section.visible {
  opacity: 1;
}

section {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.section-container {
  position: relative;
  z-index: 1;
  width: 100vw;
  height: 100vh;
}

.section-box {
  width: 100vw;
  height: 100vh;
  position: relative;
  padding-top: var(--header-height);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  box-sizing: border-box;
}

.section-bg {
  overflow-y: auto;
  width: 95vw;
  height: calc(100vh - var(--header-height) - var(--footer-height) - 2rem);
  position: relative;
  /*position: absolute;*/
  padding: 20px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  background-color: rgba(var(--main-color-rgb), 0.6);
  backdrop-filter: blur(5px);
  color: var(--text-light);
  font-family: 'DM Sans', sans-serif;
  font-size: 1.5rem;
  line-height: 1.3;
}

.split-container {
  display: flex;
  width: 100%;
  height: 100%;
  padding: 0;
  box-sizing: border-box;
}

.split-left {
  flex: 0 0 20%;
  padding-right: 1rem;
  display: flex;
  min-height: 0;
}

.split-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.menu-tab {
  margin-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.menu-tab-btn {
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
  padding: 0 10px 10px 0;
  margin-right: 30px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.2rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
  transition: all 0.3s ease;
}

.menu-tab-btn:hover {
  color: var(--highlight-color);
}

.menu-tab-btn.active {
  color: var(--text-light);
  font-weight: 600;
}

.menu-tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--highlight-color);
}

.menu-content-container {
  flex-grow: 1;
  position: relative;
  overflow-y: auto;
}

.menu-tab-content {
  display: none;
  width: 100%;
  height: 100%;
}

.menu-tab-content.active {
  display: block;
  animation: fadeIn 0.5s;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/*---BasicText---*/
.basic-text {
  margin-left: 20px;
  margin-right: 10px;
  max-width: 95vw;
}

.basic-text.title {
  font-weight: 500;
  font-size: 1.3em;
  margin-bottom: 0.1em;
}

.basic-text.subtitle {
  font-weight: 500;
  font-size: 1em;
  margin-bottom: 0.2em;
}

.basic-text.tagline {
  font-weight: 300;
  font-size: 0.6em;
  margin-bottom: 0.6em;
}

.basic-text.text {
  font-weight: 200;
  font-size: 0.8em;
}

.basic-text .bold {
  font-weight: 600;
}

.basic-text .korean {
  font-family: 'Noto Sans KR', sans-serif;
}

.basic-text a {
  color: var(--highlight-color);
}

.basic-text a:hover {
  color: var(--main-color);
}

.intro-section {
  height: calc(100vh - var(--header-height) - var(--footer-height) - 2rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: var(--text-dark);
}

.intro-text {
  font-size: 2.2vw;
  color: var(--text-dark);
  text-align: center;
  padding-bottom: 1vh;
}

.intro-text.korean {
  font-family: 'Noto Sans KR', sans-serif;
  color: var(--main-color);
}

.word {
  display: inline-flex;
  align-items: center;
  line-height: 1.5em;
  min-height: 1em;
  padding: 0.1em 0.3em;
  border-radius: 1px;
  background-color: rgba(255, 255, 255, 0.7);
}

.fade-text {
  opacity: 0;
  transition: opacity 1.2s ease, background-color 0.3s ease;
}

.fade-text.visible {
  opacity: 1;
}

/*---People---*/
#people .split-container .split-left {
  flex: 0 0 25%;
  max-width: 290px;
  padding: 0;
  background-color: rgba(255, 255, 255, 0.7);
}

#people .split-container .split-right {
  padding-left: 2rem;
}

.supervisor-profile {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: var(--text-dark);
}

.supervisor-image-wrapper {
  width: 230px;
  height: 230px;
  margin: 10px;
  position: relative;
  box-sizing: border-box;
  overflow: hidden;
}

.supervisor-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: grayscale(100%);
  transition: filter 0.4s ease;
}

.supervisor-image-wrapper::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(var(--main-color-rgb), 0.4);
  z-index: 1;
}

.supervisor-profile:hover .supervisor-image {
  filter: grayscale(0%);
}

.supervisor-image-wrapper:hover::after {
  opacity: 0;
}

.supervisor-info {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#people .split-container .basic-text {
  margin: 0;
}

#people .split-container .basic-text.text {
  margin-left: 10px;
  margin-right: 10px;
}

.supervisor-links {
  margin: 0;
  padding-top: 10px;
  text-align: center;
}

.supervisor-links .info-link {
  background-color: rgba(var(--main-color-rgb), 0.7);
  border: 1px solid var(--main-color);
  color: var(--text-light);
  padding: 4px 10px;
  border-radius: 15px;
  text-decoration: none;
  transition: all 0.3s;
  margin: 0;
}

.supervisor-links .info-link:hover {
  background-color: var(--highlight-color);
  color: var(--main-color);
}

/*Profile-Carousel*/
#people .carousel-wrapper {
  width: calc(100% - 50px);
  left: 60px;
}

.student-card {
  width: 230px;
  height: calc(100% - 3rem);
  flex-shrink: 0;
  margin-top: 20px;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s ease;
}

.student-image-wrapper {
  width: 100%;
  height: 230px;
  position: relative;
  overflow: hidden;
}

.student-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: grayscale(100%);
  transition: filter 0.4s ease;
}

.student-image-wrapper::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(var(--main-color-rgb), 0.4);
  z-index: 1;
}

.student-card:hover .student-image {
  filter: grayscale(0%);
}

.student-image-wrapper:hover::after {
  opacity: 0;
}

.student-info {
  padding-top: 15px;
  font-size: 0.9em;
  text-align: center;
}


.alumni-info {
  display: flex;
  align-items: baseline;
  gap: 8px
}

.people-text {
  color: var(--text-light);
}

.people-text.name {
  font-size: 1em;
  font-weight: 600;
}

.people-text.degree {
  font-size: 0.8em;
  opacity: 0.7;
}

.alumni-details {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: right;
  margin-left: 10px;
  gap: 5px
}

.people-text.affiliation {
  font-size: 0.8em;
  font-weight: 300;
  opacity: 0.8;
}

.thesis-link {
  border: 1px solid var(--highlight-color);
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
  transition: all 0.3s;
}

.thesis-link a {
  font-size: 0.8em;
  font-weight: 400;
  color: var(--highlight-color);
  text-decoration: none;
}

.thesis-link:hover {
  background-color: var(--highlight-color);
}

.thesis-link:hover a {
  color: var(--main-color);
}

/*---Updates---*/
#updates .section-bg {
  justify-content: flex-start;
  align-items: center;
}

.update-filters {
  margin-top: 1rem;
  display: flex;
  gap: 1rem;
}

.update-filter-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin: 0;
  transition: all 0.3s ease;
  color: rgba(255, 255, 255, 0.5);
}

.update-filter-btn:hover {
  color: rgba(var(--highlight-color-rgb), 0.7);
}

.update-filter-btn.active {
  color: var(--highlight-color);
  text-decoration: underline;
}

.updates-container {
  padding: 10px 30px 10px 10px;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  overflow-y: auto;
}

.updates-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.update-item {
  display: flex;
  align-items: baseline;
  gap: 2rem;
  padding: 0.5rem 0;
  transition: all 0.4s ease-out;
}

.update-date {
  flex-shrink: 0;
}

.update-content {
  flex-grow: 1;
  font-weight: 400;
}

.update-tag {
  flex-shrink: 0;
  opacity: 0.7;
}

/* JavaScript로 제어할 숨김 클래스 */
.update-item.hide {
  opacity: 0;
  max-height: 0;
  padding: 0;
  margin: 0;
  border: none;
  overflow: hidden;
}

/* --- 이미지 모달 스타일 --- */

/* 1. 사용자가 이미지를 클릭할 수 있도록 마우스 커서를 변경합니다. */
.project-image {
  cursor: pointer;
  transition: opacity 0.3s;
}

.project-image:hover {
  opacity: 0.8;
}

/* 2. 모달 배경 스타일 */
.modal {
  display: none;
  /* 평소에는 숨겨 둡니다. */
  position: fixed;
  /* 화면에 고정됩니다. */
  z-index: 1000;
  /* 다른 모든 요소 위에 표시됩니다. */
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  /* 이미지가 화면보다 크면 스크롤을 허용합니다. */
  background-color: rgba(0, 0, 0, 0.85);
  /* 검은색 반투명 배경 */

  /* 부드럽게 나타나는 효과를 위한 애니메이션 */
  animation-name: fadeIn;
  animation-duration: 0.4s;
}

/* 3. 모달에 표시될 이미지 스타일 */
.modal-content {
  margin: auto;
  display: block;
  width: auto;
  height: auto;
  max-width: 85%;
  max-height: 85vh;
  /* 화면 높이의 85%를 넘지 않도록 설정 */
  position: absolute;
  /* 정중앙 정렬을 위해 */
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* 4. 닫기(X) 버튼 스타일 */
.close-btn {
  position: absolute;
  top: 15px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s;
}

.close-btn:hover,
.close-btn:focus {
  color: #bbb;
  text-decoration: none;
}

/* 5. 페이드인 애니메이션 */
@keyframes fadeIn {
  from {
    opacity: 0
  }

  to {
    opacity: 1
  }
}


/*---Mobile---*/
@media (max-width: 670px) {
  :root {
    --header-height: 13vh;
  }

  .header {
    font-size: 2rem;
  }

  .header-text.title {
    line-height: 0.9;
    letter-spacing: 0.1em
  }

  .header-text.tagline {
    padding-top: 0.5em;
    letter-spacing: -0.05em;
    font-size: 0.55em;
  }

  .intro-text {
    font-size: 1.2em;
  }

  .footer-bar {
    font-size: 0.8em;
  }

  .basic-text.title {
    font-size: 1em;
  }

  .basic-text.subtitle {
    font-size: 0.85em;
  }

  .basic-text.tagline {
    font-size: 0.5em;
  }

  .basic-text.text {
    font-size: 0.7em;
  }

  .split-container {
    flex-direction: column;
  }

  .split-left,
  .split-right {
    width: 100%;
    max-width: none;
  }

  .split-right {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
  }

  .carousel-container {
    flex-direction: column;
    align-items: flex-start;
  }

  .carousel-wrapper {
    order: 1;
    width: 100%;
    left: 0;
    position: relative;
  }

  .thumb-track {
    order: 2;
    display: flex;
    justify-content: center;
    overflow-x: auto;
    overflow-y: hidden;
    width: 100%;
    gap: 0.5rem;
    max-height: 60px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .thumb {
    flex: 0 0 auto;
    width: 80px;
    height: 50px;
    object-fit: cover;
  }

  .carousel-arrow {
    display: none;
  }

  .project-slide {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .project-image-wrapper {
    width: 100%;
    flex: none;
  }

  .project-info {
    width: 100%;
    padding: 1rem;
  }
}

@media (min-width: 671px) and (max-width: 1024px) {
  .header {
    font-size: 2.4rem;
  }

  .intro-text {
    font-size: 1.5em;
  }

  .basic-text.title {
    font-size: 1.1em;
  }

  .basic-text.subtitle {
    font-size: 0.9em;
  }

  .basic-text.tagline {
    font-size: 0.55em;
  }

  .basic-text.text {
    font-size: 0.7em;
  }
}