/* 기본 설정 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Segoe UI", Roboto, sans-serif;
  background-color: #ffffff;
  color: #111;
  line-height: 1.8;
  margin-bottom: 20px;
}

h3 {
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Segoe UI", Roboto, sans-serif;
}

/* 헤더 */
.header-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: transparent;
  display: flex;
  justify-content: space-between; /* 좌우로 요소 정렬 */
  align-items: center;
  padding: 40px 60px 30px; /* 위 50px, 좌우 60px, 아래 30px */
  z-index: 1000;
}


.logo {
  text-decoration: none;
  color: #000;
  font-weight: 300;
  font-size: 1.0rem;
    white-space: nowrap; /* 줄바꿈 방지 */
}

/* 내비게이션 */
.nav-links {
  display: flex;
  justify-content: flex-start;
  gap: 36px;
}

.nav-links a {
  position: relative; /* 밑줄을 위한 기준 */
  text-decoration: none;
  color: #1e1e2f;
  font-weight: 300;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
  transition: color 0.2s ease;
}
.nav-links a:hover {
  color: #007bff; /* Bootstrap 스타일의 진한 파란색 */
  transition: color 0.2s ease;
}

.nav-links a.active {
  color: #007bff;
  font-weight: 300;
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0px;
  width: 0;
  height: 1px;
  background-color: #007bff;
  transition: width 0.45s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

/* hover 시 텍스트 색상도 변경 (선택사항) */
.nav-links a:hover {
  color: #007bff;
}

/* 프로젝트 섹션 */
.project {
  background: white;
  padding: 12px;
  margin-bottom: 30px;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(20, 20, 20, 0.1);
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.project:hover {
  transform: translateY(-6px);
  box-shadow: 0 6px 20px #3b82f655; /* 파란색 그림자 */
}

.project-link:hover .project {
  background-color: #fafafa;
}

.project-image {
  width: 100%;
  height: 350px;
  border-radius: 6px;
  margin-bottom: 8px;
  object-fit: cover;
}

/* 커스텀 커서 */

a:hover ~ .custom-cursor,
button:hover ~ .custom-cursor {
  width: 48px;
  height: 48px;
  background-color: rgba(100, 100, 100, 0.3);
}

/* 사이드바 */
.sidebar {
  position: fixed;
  top: 400px; /* Overview 섹션의 시작 위치에 맞춰 조절 */
  left: 70px;
  background-color: rgba(255, 255, 255, 0.9);
  border: none;
  box-shadow: none;
  padding: 20px 16px;
  width: 140px;
  z-index: 1000;
  font-family: sans-serif;
  transform: none; /* 중앙 정렬 제거 */
}


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

.sidebar li {
  margin: 18px 0;
}

.sidebar a {
  color: #999;
  text-decoration: none;
  font-weight: 400;
  transition: all 0.3s;
  position: relative;
}


.sidebar a.active {
  color: #007bff; /* 현재 위치에 해당하는 항목은 검정 */
  font-weight: 500;
}

/* hover 상태일 때 강조 */
.sidebar a:hover {
  color: #007bff;
}

.sidebar a.active::before {
  color: #007bff;
  margin-right: 4px;
}

footer {
  position: static;
  bottom: 20px;
  left: 0;
  width: 100%;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  font-family: 'SF Pro Text', sans-serif;
  color: #9f9f9f;
  z-index: 999;
  pointer-events: none; /* prevents accidental interference, remove if links are not working */
  margin-top: 10px;         /* 본문과 간격 */
}

.footer-left,
.footer-right {
  pointer-events: auto; /* allow clicks */
}

.footer-right {
  display: flex;
  gap: 20px;
}

.footer-right a {
  color: #787878;
  text-decoration: none;
  border-bottom: 1.5px solid #787878;
  transition: color 0.3s ease, border-bottom 0.3s ease;
}

.footer-right a:hover {
  color: #000;
  border-bottom: 1.5px solid #000;
}


.about-project-wrapper {
  display: flex;
  justify-content: center;     /* 수평 중앙 정렬 */
  align-items: flex-start;     /* 필요에 따라 center로 변경 가능 */
  max-width: 1200px;
  margin: 0 auto;              /* 전체 페이지 중앙으로 */
  gap: 80px;                   /* About과 Projects 사이 간격 */
  padding-top: 0px;
  margin-top: 0px;
  padding-bottom: 100px;
}


/* About과 Projects가 나란히 잘 보이도록 width 명시 */
#about {
  flex: 1;
  min-width: 300px;
}

#projects {
  flex: 3;
  min-width: 500px;
}

/* 모든 h2 아래 간격 넓히기 */
h2 {
  font-weight: 200;
  margin-bottom: 5px; /* or 40px 등 원하는 값 */
  margin-top: 0px;

}

/* 기본 회색 커서 */
.custom-cursor {
  position: fixed;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background-color: rgba(100, 100, 100, 0.2);
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: all 0.2s ease;
}


/* 기본 상태에서는 안 보이게 */
.emoji-cursor {
  position: fixed;
  top: 0;
  left: 0;
  font-size: 32px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 9999;
}



/* project 위에 hover 시 보이게 */
.project:hover ~ .emoji-cursor {
  opacity: 1;
}

.custom-cursor.hidden {
  opacity: 0;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.tag {
  background-color: #cce1ff;
  border: 1px solid #5098f6; /* 연한 회색 stroke */
  color: #444;
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 999px;  /* pill shape */
  font-weight: 500;
  display: inline-block;
  transition: background-color 0.2s ease;
}

.tag:hover {
  background-color: #f5f5f5;
  color: #007bff;
}

.project-title {
  color: #171717;
  font-weight: 500;
  margin-bottom: 15px;/* 기존보다 여백을 늘려줌 */
  font-size: 22px;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;               /* 태그 간 간격 더 넓게 */
  margin-bottom: 20px;     /* 태그 아래 여백 더 넓게 */
  padding-bottom: 20px;    /* 전체 영역에 여유 공간 */
}

.tag {
  display: inline-block;
  padding: 6px 16px;       /* 내부 패딩 확장 → 크고 시원해짐 */
  margin-right: 8px;       /* 오른쪽 간격 약간 증가 */
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 30px;
  font-size: 14px;         /* 글씨도 살짝 키움 */
  color: #444;
  font-weight: 400;        /* 굵기 추가로 가독성 향상 */
}

.projects-header {
  display: flex;
  justify-content: space-between;
  align-items: center; /* center 정렬 */
  margin-bottom: 20px;
}

.projects-header h2 {
  margin: 0;
  font-weight: 200;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 400;
}

.project-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.project-link:hover .project {
  background-color: #ffffff;
  cursor: pointer;
}

.scroll-hint {
  font-size: 0.75rem;
  font-weight: 200;
  color: #5b5b5b;
  text-align: right;
  margin-left: 0; /* 또는 필요시 소폭 조정 (ex. 12px 등) */
  display: block;
  padding-left: 4px; /* 약간의 여백만 줄 수도 있어요 */
}

#about p {
  color: #555;        /* 원하던 색상 */
  font-weight: 250;   /* 글씨 굵기 */
}

.theme-toggle-container {
  display: flex;
  justify-content: flex-end;
  margin-top: 20px;
}

/* 기본 스위치 스타일 */
.switch {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 28px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

/* 슬라이더 스타일 */
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 34px;
}

.slider::before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

/* 체크 상태일 때 */
input:checked + .slider {
  background-color: #4cd964;
}

input:checked + .slider::before {
  transform: translateX(24px);
}
body.dark-mode {
  background-color: #121212;
  color: #f5f5f5;
}

body.dark-mode a {
  color: #90caf9;
}

body.dark-mode .project {
  background-color: #1e1e1e;
  border-color: #333;
}


/* Next Project Section */
.next-project {
  margin-top: 80px;
  padding-top: 60px;
  padding-bottom: 120px;
  border-top: 1px solid #eee;
  background-color: #fff;
  display: flex;
  justify-content: flex-end;  /* 오른쪽으로 정렬 */
  padding-right: 0px;        /* 오른쪽 여백 */
}

.next-wrapper {
  max-width: 320px;           /* 가로 길이 축소 */
  width: 100%;
  text-align: left;
}

.next-label {
  font-size: 0.9rem;
  color: #888;
  margin-bottom: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
}
/* Next Project 텍스트 오른쪽 정렬 */
.next-wrapper .next-label {
  text-align: right;
}

/* Previous Project 텍스트 왼쪽 정렬 */
.prev-wrapper .next-label {
  text-align: left;
}

.next-link {
  text-decoration: none;
  color: inherit;
}

.next-card {
  padding: 20px 26px;
  border: 1px solid #e9e9e9;
  border-radius: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #ffffff;
  transition: box-shadow 0.3s ease;
}

.next-card:hover {
  color: #007bff;
  background-color: #f5f5f5
}

.next-title {
  font-size: 1.0rem;
  font-weight: 500;
}

.next-arrow {
  font-size: 1.2rem;
  color: #333;
}

.dual-project-nav {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
  padding-top: 60px;
  padding-bottom: 120px;
  border-top: 1px solid #eee;
  background-color: #fff;
}

.prev-wrapper,
.next-wrapper {
  max-width: 320px;
  width: 100%;
  text-align: left;
}

.prev-wrapper .next-card,
.next-wrapper .next-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.prev-wrapper .next-card span {
  order: -1; /* ← 왼쪽으로 보내기 */
}

.left-align-title {
  text-align: left;
  margin-left: 0;
}

/* 대표 이미지 스타일 */
.hero-image {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto 80px;
  padding: 0 20px;
}

.hero-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  object-fit: cover;
}


.project-intro {
  max-width: 1000px;
  margin: 40px auto;
  padding: 0 20px;
  font-size: 1.2rem;
  line-height: 1.7;
  color: #111;
}

.project-meta {
  display: flex;
  justify-content: space-between;    /* 각 항목 좌우로 균등 분산 */
  gap: 120px;                         /* 항목 간 간격 조절 */
  margin-top: 60px;
  padding: 0 0px;                    /* 전체 여백 → 더 왼쪽에서 시작 가능 */
  max-width: 2000px;
  margin-left: 0;
  margin-right: auto;
  text-align: left;
  flex-wrap: wrap;                   /* 좁은 화면에서도 감싸짐 */
}


.meta-block {
  flex: 1.5;            /* ✅ 균등한 너비 */
  min-width: 100;       /* ✅ 최소 너비 제한 없애기 */
}

.meta-block h3 {
  font-size: 1.2rem;
  margin-bottom: 12px;
  color: #000;
  font-weight: 300;  
}

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


.image-caption {
  font-size: 0.75rem;     /* 작은 글씨 */
  color: #666;            /* 회색 톤 */
  margin-top: 20px;
  text-align: center;
}

.centered-section {
  text-align: left;
}

.centered-section img {
  margin: 0 auto;
  display: block;
}

.intro-section {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
}

.intro-text {
  flex: 1;
  font-size: 1rem;
  line-height: 1.6;
  color: #808080;
}

.image-flip-wrapper {
  position: relative;
  width: 340px;
  height: 340px;
  perspective: 1000px;
}

.profile-image {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #ccc;
  backface-visibility: hidden;
  transition: transform 0.6s ease, box-shadow 0.3s ease;
  box-shadow: #007bff;
}

/* 앞면 이미지 */
.profile-image.front {
  transform: rotateY(0deg);
  z-index: 2;
  box-shadow: #007bff
}

/* 뒷면 이미지 - 기본적으로 안 보이게 */
.profile-image.back {
  transform: rotateY(180deg);
  z-index: 1;
}

/* hover 시 회전 + 살짝 떠오르기 효과 */
.image-flip-wrapper:hover .front {
  transform: rotateY(180deg) translateY(-4px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.3);
}

.image-flip-wrapper:hover .back {
  transform: rotateY(0deg) translateY(-4px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.3);
  z-index: 3;
}

.education-section {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #505050;
}

.education-section h3,
.education-section h4 {
  font-weight: 300;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.page-wrapper {
  max-width: 1000px;        /* 홈페이지와 동일 */
  margin: 100px auto 100px; /* 위 아래 여백 일치 */
  padding: 120px 0 140px;    /* 위쪽 60px, 아래쪽 넉넉히 140px */
  width: 100%;
  display: block;
  position: relative;
}

section {
  margin-bottom: 140px;
  scroll-margin-top: 160px; /* 원하는 간격 */
}

::selection {
  background-color: #007bff;  /* 파란색 배경 */
  color: #ffffff;             /* 흰색 글씨 */
}
.intro-description {
  color: #505050;
}

.intro-heading {
  font-weight: 200;
  font-size: 1.5rem;
  line-height: 1;
  margin-bottom: 10;
  margin-top: 8px;
}

.intro-heading .line1,
.intro-heading .line2 {
  display: block;
}

.intro-heading .line2 {
  margin-top: -6px; /* 이 값을 줄이거나 조절해서 간격 조정 */
  
}

.hobby-gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  margin-top: 30px;
}

.hobby-gallery img {
  width: 220px;
  height: auto;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hobby-gallery img:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.light-weight {
color: #000;
}

.Soultion {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  margin: 80px 0;
}

.solution-text {
  flex: 1;
  max-width: 500px;
}

.solution-text h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
  color: #555;
}

.solution-text h2 {
  font-size: 1.8rem;
  font-weight: 300;
  margin-bottom: 16px;
}

.solution-text p {
  font-size: 1rem;
  color: #666;
  line-height: 1.6;
}

.solution-image {
  flex: 1;
  display: flex;
  justify-content: flex-end;
}

.solution-image img {
  width: 100%;
  max-width: 300px;
  border-radius: 12px;
}

@media (max-width: 768px) {
  .Solution {
    flex-direction: column;
    text-align: center;
  }
  .solution-image img {
    max-width: 250px;
  }
}



/* ===============  모바일 전용 스타일  =============== */
@media (max-width: 768px) {
  /* 전체 구조: 스크롤 시 가로 스크롤 제거 */
  html, body {
    overflow-x: hidden;
    margin: 0;
    padding: 0;
    display: block; /* 데스크톱 flex 강제 해제 */
  }

  /* 헤더 */
  .header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
  }

  /* 로고 크기 축소 */
  .logo {
    font-size: 1.1rem;
    white-space: nowrap;
  }

  /* 햄버거 버튼 */
  .hamburger {
    display: block;
    background: none;
    border: 0;
    padding: 6px;
    cursor: pointer;
    z-index: 2001;
  }
  .hamburger span {
    display: block;
    width: 26px;
    height: 2px;
    background: #111;
    margin: 6px 0;
    transition: transform .25s ease, opacity .25s ease;
  }
  /* 햄버거 X 애니메이션 */
  .hamburger.is-open span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  .hamburger.is-open span:nth-child(2) {
    opacity: 0;
  }
  .hamburger.is-open span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  /* 네비게이션 드롭다운 */
  .nav-links {
    display: none;
    position: fixed;
    right: 16px;
    top: 64px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 12px 14px;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,.08);
    z-index: 2000;
  }
  .nav-links a {
    display: block;
    padding: 8px 2px;
    font-size: 1rem;
  }
  .nav-links.open {
    display: flex;
  }

  /* 인트로 & 프로젝트 세로 배치 */
  .about-project-wrapper {
    flex-direction: column;
    align-items: center;
    gap: 32px;
    padding: 24px 16px;
  }
  #about, #projects {
    width: 100%;
    min-width: 0;
  }

  /* 인트로 텍스트 */
  #about h2 {
    font-size: 1.5rem;
    line-height: 1.3;
    text-align: center;
  }
  #about p {
    font-size: 0.95rem;
    line-height: 1.4;
    text-align: center;
  }

  /* 인트로 이미지 */
  #about img {
    max-width: 100%;
    height: auto;
  }

  /* 프로젝트 박스 */
  .project-card {
    width: 100%;
    max-width: 100%;
  }
  .project-image {
    width: 100%;
    height: auto; /* 비율 유지 */
    border-radius: 12px;
  }
  .project-tags {
    flex-wrap: wrap;
  }

  /* next-project 섹션 */
  .next-project h2 {
    text-align: center;
    font-size: 1.3rem;
  }

  /* 푸터 */
  footer {
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
    padding: 20px 0;
  }
  .custom-cursor, .emoji-cursor { pointer-events:none; }
}

/* 모바일(≤768px)에서는 섹션 네비게이션 숨김 + 본문 폭 정리 */
@media (max-width: 768px) {
  .sidebar {
    display: none !important;
    margin-top: 10px;
  }

  /* 사이드바 자리로 밀어놨던 본문 여백 복구 */
  .with-sidebar .content,
  main.content {
    margin-left: 0 !important;
    padding-left: 20px;
    padding-right: 20px;
  }

  /* 앵커 점프 시 헤더에 안 가려지도록 보정(필요시 값 조절) */
  section {
    scroll-margin-top: 100px;
  }

}

