:root {
  --bg-color: #f5f5f5;
  --text-color: #333;
  --header-color: #1a1f3c;
  --card-bg: rgba(255, 255, 255, 0.1);
}

body.dark {
  --bg-color: #1e1e1e;
  --text-color: #f0f0f0;
  --header-color: #0d0d2b;
  --card-bg: rgba(255, 255, 255, 0.05);
}

body.dark .about-section,
body.dark .team-section,
body.dark main,
body.dark .main-section {
  background-color: var(--bg-color);
}

.dark-toggle {
  position: absolute;
  right: 70px;
  top: 18px;
  background-color: #fff;
  border: none;
  padding: 6px 12px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: bold;
  font-size: 0.9rem;
  z-index: 1000;
}
body.dark .dark-toggle {
  background-color: #444;
  color: #fff;
}

body.dark .extra-section {
  background-color: #2b2b2b;
  color: #f0f0f0;
}

body.dark .extra-section,
body.dark .extra-section h3,
body.dark .extra-section p,
body.dark .extra-section li {
  color: #f0f0f0;
}
body.dark .about-box,
body.dark .team-box {
  background-color: #2b2b2b;
  color: #f0f0f0;
  box-shadow: 0 6px 24px rgba(255, 255, 255, 0.08);
}

body.dark .about-box p,
body.dark .team-box p {
  color: #e0e0e0;
}

body.dark .teamright-box h2,
body.dark .right-box h2 {
  color: #ffffff;
}

body.dark .footer-icons a img {
  background-color: #1e1e1e;
  filter: brightness(0.85);
}

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

html,
body {
  height: 100%;
  /* overflow: hidden; */
  font-family: 'Noto Sans KR', sans-serif;
  background-color: #f5f5f5;
  color: #333;
  line-height: 1.6;
  background-color: var(--bg-color);
  color: var(--text-color);
}

a {
  text-decoration: none;
}

/* wrap: 전체 페이지 고정 */
.wrap {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

main {
  flex: 1;
}

/* 헤더 */
header,
.navbar .nav-links,
footer {
  background-color: var(--header-color);
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  background-color: #1a1f3c;
  color: white;
  position: relative;
  height: 60px;
  flex-shrink: 0;
}

.header-area {
  position: relative;
}

.logo {
  font-size: 20px;
  font-weight: bold;
}

/* 햄버거 메뉴 */
#menu-toggle {
  display: none;
}

.hamburger {
  position: absolute;
  top: 18px;
  right: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 22px;
  cursor: pointer;
  z-index: 1001;
  transition: all 0.3s ease;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: white;
  border-radius: 2px;
  transition: all 0.3s ease-in-out;
  transform-origin: center;
}

/* 햄버거 → X 애니메이션 */
#menu-toggle:checked + label.hamburger span:nth-child(1) {
  transform: rotate(45deg) translate(6.5px, 6.5px);
}
#menu-toggle:checked + label.hamburger span:nth-child(2) {
  opacity: 0;
}
#menu-toggle:checked + label.hamburger span:nth-child(3) {
  transform: rotate(-45deg) translate(6.5px, -6.5px);
}

.navbar .nav-links {
  max-height: 0;
  overflow: hidden;
  flex-direction: column;
  background-color: #1a1f3c;
  position: absolute;
  top: 60px;
  left: 0;
  width: 100%;
  z-index: 999;
  transition: max-height 0.4s ease;
  align-items: center;
  text-align: center;
}

#menu-toggle:checked + label + .navbar .nav-links {
  display: flex;
  max-height: 300px; /* 충분한 높이로 슬라이드 다운 효과 */
}

.navbar .nav-links li {
  list-style: none;
  margin: 12px 0;
  width: 100%;
}

.navbar .nav-links a {
  color: white;
  font-weight: bold;
}

.navbar .nav-links a.active {
  text-decoration: underline;
}

/* 메인 콘텐츠 영역 */
.main-section {
  background: url('./img/main.jpg') no-repeat center center/cover;
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: white;
  position: relative;
}

.main-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 0;
}

.main-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.main-content h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.main-content p {
  font-size: 1.5rem;
  margin-bottom: 2rem;
}

h1,
h2 {
  margin-bottom: 10px;
}

#typing-text {
  font-size: 3rem;
  white-space: nowrap;
  overflow: hidden;
  width: fit-content;
  margin-bottom: 1rem;
}

#typing-subtext {
  font-size: 1.5rem;
  white-space: nowrap;
  overflow: hidden;
  width: fit-content;
  margin-bottom: 1rem;
}
/* 커서 애니메이션은 타이핑 중일 때만 */
.typing {
  border-right: 2px solid white;
  animation: blink 0.7s steps(1) infinite;
}

@keyframes blink {
  50% {
    border-color: transparent;
  }
}

body.dark .typing {
  border-right: 2px solid #f0f0f0;
}

/* 다크모드 대응 */
body.dark #typing-text {
  border-right: 2px solid #f0f0f0;
}

/* footer 아이콘 */
footer {
  flex-shrink: 0;
  height: 80px;
  background-color: #1a1f3c;
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-icons {
  display: flex;
  gap: 40px;
}

.footer-icons a img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  transition: transform 0.3s, box-shadow 0.3s;
  background-color: white;
  padding: 8px;
}

.footer-icons a img:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

/* 자기소개 페이지 */
.about-section {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 60px 20px;
  background-color: #fff;
  flex-direction: row;
  flex-wrap: wrap;
}

.about-container {
  display: flex;
  width: 100%;
  max-width: 1200px;
  justify-content: space-between;
  align-items: stretch;
  gap: 40px;
  flex-wrap: wrap;
}

.about-box {
  background-color: #f9f9f9;
  padding: 40px;
  border-radius: 24px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
  flex: 1 1 45%;
  min-width: 320px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.left-box {
  align-items: center;
  text-align: center;
}

.left-box img {
  width: 100%;
  max-width: 360px;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.right-box {
  align-items: flex-start;
  text-align: left;
}

.right-box h2 {
  font-size: 2.2rem;
  color: #1a1f3c;
  margin-bottom: 20px;
}

.right-box p {
  font-size: 1.2rem;
  color: #333;
  line-height: 2;
}

/* 반응형 */
@media (max-width: 768px) {
  .about-container {
    flex-direction: column;
    gap: 40px;
  }

  .about-box {
    width: 100%;
    height: auto;
    padding: 30px;
  }

  .right-box {
    align-items: center;
    text-align: center;
  }

  .right-box h2 {
    font-size: 2rem;
  }

  .right-box p {
    font-size: 1.1rem;
  }
}

/* 팀소개 페이지 */
.team-section {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 60px 20px;
  background-color: #fff;
  flex-direction: row;
  flex-wrap: wrap;
}

.team-container {
  display: flex;
  width: 100%;
  max-width: 1200px;
  justify-content: space-between;
  align-items: stretch;
  gap: 40px;
  flex-wrap: wrap;
}

.team-box {
  background-color: #f9f9f9;
  padding: 40px;
  border-radius: 24px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
  flex: 1 1 45%;
  min-width: 320px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.teamleft-box {
  align-items: center;
  text-align: center;
}

.teamleft-box img {
  width: 100%;
  max-width: 360px;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.teamright-box {
  align-items: flex-start;
  text-align: left;
}

.teamright-box h2 {
  font-size: 2.5rem;
  color: #1a1f3c;
  margin-bottom: 20px;
}

.teamright-box p {
  font-size: 1.5rem;
  color: #333;
  line-height: 2;
}

.teamright-box img {
  width: 100px;
  max-width: 360px;
  height: auto;
}

/* 반응형 */
@media (max-width: 768px) {
  .team-container {
    flex-direction: column;
    gap: 40px;
  }

  .team-box {
    width: 100%;
    height: auto;
    padding: 30px;
  }

  .teamright-box {
    align-items: center;
    text-align: center;
  }

  .teamright-box h2 {
    font-size: 2rem;
  }

  .teamright-box p {
    font-size: 1.1rem;
  }
}

/* 세콘 페이지 */
.extra-section {
  max-width: 900px;
  margin: 40px auto;
  padding: 20px;
  background-color: #f9f9f9;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.secon2025 h2 {
  font-size: 45px;
}

.secon2025 h3 {
  font-size: 30px;
}

.secon2025 h4 {
  font-size: 30px;
}

.secon2025 p {
  font-size: 20px;
}

.extra-section h3 {
  margin-bottom: 10px;
  font-size: 1.4rem;
}

.extra-section ul {
  padding-left: 20px;
}

.extra-section li {
  margin-bottom: 8px;
  font-size: 18px;
}

.extra-section p {
  font-size: 18px;
}

.image-gallery {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 20px;
}

.image-gallery img {
  width: 360px;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* 이미지 확대 모달 */
.image-modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  justify-content: center;
  align-items: center;
}

.image-modal img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
  transition: transform 0.3s ease;
}

.image-modal.active {
  display: flex;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* 맨 위로 버튼 스타일 */
#topBtn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 1000;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border: none;
  border-radius: 16px;
  padding: 12px 18px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  display: none;
  transition: all 0.3s ease;
}

#topBtn:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
}

/* 다크모드 호환 */
body.dark #topBtn {
  background: linear-gradient(135deg, #ddd, #bbb);
  color: #1a1f3c;
}

/* 프로젝트 소개 페이지 */
.project-title {
  font-size: 3rem;
  font-weight: bold;
  text-align: center;
  color: #fff;
  margin-bottom: 2rem;
}

.project-container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2rem;
  padding: 2rem;
}

.project-card {
  display: block;
  background: rgba(255, 255, 255, 0.1);
  padding: 1.5rem 2rem;
  border-radius: 20px;
  backdrop-filter: blur(10px);
  color: #fff;
  width: 300px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  text-align: center;
  text-decoration: none;
  transition: transform 0.3s ease, background 0.3s ease;
  background: var(--card-bg);
}

.project-card:hover {
  transform: translateY(-10px);
  background: rgba(255, 255, 255, 0.2);
}

.search-bar {
  text-align: center;
  margin-bottom: 2rem;
}

#searchInput {
  width: 80%;
  max-width: 400px;
  padding: 12px;
  font-size: 1rem;
  border: 2px solid #ccc;
  border-radius: 10px;
  outline: none;
}

body.dark #searchInput {
  background-color: #2b2b2b;
  color: #f0f0f0;
  border: 2px solid #555;
}

.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  justify-content: center;
  align-items: center;
}

.modal-content {
  background-color: white;
  padding: 30px;
  border-radius: 20px;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  position: relative;
  text-align: center;
  animation: fadeIn 0.3s ease;
}

.modal-content a {
  display: inline-block;
  margin-top: 15px;
  font-weight: bold;
  text-decoration: underline;
  color: #1a1f3c;
}

.modal-content .close {
  position: absolute;
  top: 10px;
  right: 18px;
  font-size: 28px;
  cursor: pointer;
}

body.dark .modal-content {
  background-color: #2b2b2b;
  color: #f0f0f0;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.contact-section {
  background-color: #fff;
  padding: 60px 20px;
  text-align: center;
}

.contact-section h2 {
  font-size: 2rem;
  margin-bottom: 30px;
  color: #1a1f3c;
}

.contact-section form {
  max-width: 500px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.contact-section input,
.contact-section textarea {
  padding: 12px;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 10px;
  resize: none;
}

.contact-section button {
  padding: 12px;
  background-color: #1a1f3c;
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s ease;
}

.contact-section button:hover {
  background-color: #333;
}

/* 다크모드 호환 */
body.dark .contact-section {
  background-color: #1e1e1e;
}

body.dark .contact-section h2,
body.dark .contact-section input,
body.dark .contact-section textarea {
  color: #f0f0f0;
  background-color: #2b2b2b;
  border: 1px solid #444;
}

body.dark .contact-section button {
  background-color: #f0f0f0;
  color: #1a1f3c;
}

.tab-section {
  margin-top: 40px;
  text-align: center;
  padding: 20px;
}

.tabs {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.tab {
  padding: 10px 20px;
  border: none;
  background-color: #eee;
  border-radius: 12px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.3s ease;
}

.tab.active {
  background-color: #1a1f3c;
  color: white;
}

.tab-content {
  max-width: 600px;
  margin: 0 auto;
  font-size: 1.2rem;
  line-height: 2;
}

/* 다크모드 호환 */
body.dark .tab {
  background-color: #333;
  color: #f0f0f0;
}

body.dark .tab.active {
  background-color: #f0f0f0;
  color: #1a1f3c;
}

body.dark .tab-content {
  color: #f0f0f0;
}

.skill-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-width: 400px;
  margin: 0 auto;
}

.skill-item {
  text-align: left;
}

.skill-item span {
  display: block;
  font-weight: bold;
  margin-bottom: 6px;
}

.bar {
  background-color: #ddd;
  height: 10px;
  border-radius: 6px;
  overflow: hidden;
}

.fill {
  height: 100%;
  background: linear-gradient(90deg, #667eea, #764ba2);
  transition: width 0.5s ease;
}

/* 다크모드 호환 */
body.dark .bar {
  background-color: #444;
}

body.dark .fill {
  background: linear-gradient(90deg, #f0f0f0, #aaa);
}
