/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  
  body {
    font-family: 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
  }
  
/* Header & Navigation */
header {
  position: auto;          /* ✅ 상단 고정 */
  top: 0;
  left: 0;
  width: 100%;
  background-color: #1f2937; /* 남색 계열 배경 */
  padding: 1rem 2rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;            /* 다른 요소 위로 */
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: none; /* 중앙 정렬 해제 */
  margin: 0 auto;       /* 여백 제거 */
  padding: 0 2rem; /* 좌우만 약간 여백 */
}

.logo {
  margin-right: auto; /* ✅ Jiwon Lee를 항상 왼쪽 끝으로 고정 */
}

/* 로고 (왼쪽 이름) */
.logo a {
  font-size: 1.4rem;
  font-weight: 700;
  color: #ffffff;
  text-decoration: none;
  letter-spacing: 0.5px;
  transition: color 0.3s ease;
}

.logo a:hover {
  color: #4a90e2;
}

/* 메뉴 (오른쪽) */
nav ul {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

nav a {
  color: #ffffff;
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

nav a.active {
  background-color: #ffffff;
  color: #1f2937;
}

nav a:hover {
  background-color: #ddd;
  color: #1f2937;
}

/* ✅ 모바일 대응 */
@media (max-width: 768px) {
  .nav-container {
    flex-direction: column;
    gap: 0.8rem;
  }

  nav ul {
    flex-direction: column;
    gap: 0.5rem;
  }

  nav a {
    font-size: 1rem;
    padding: 0.5rem 0.8rem;
  }
}

  
  /* Main Content */
  main {
    flex: 1;
    padding: 2rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
  }
  
  main h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: #1f2937;
  }
  
  main h2 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    color: #1f2937;
  }
  
  main p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
  }
  
  main > img {
    display: block;
    margin: 1rem auto;
    width: 80%;
    max-width: 900px;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  }


  /* Intro Section Layout */
  .intro-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5rem;
    flex-wrap: nowrap;
    text-align: left;
    margin-top: 2rem;
  }

  /* 이미지 (왼쪽) */
  .intro-image img {
    max-width: 400px;
    height: auto;
  }

  /* 텍스트 (오른쪽) */
  .intro-text {
    max-width: 650px;
  }

  .intro-text h1 {
    font-size: 2.5rem;
    color: #1f2937;
    margin-bottom: 1rem;
  }

  .intro-text p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #333;
  }

  /* ✅ 모바일 반응형 */
  @media (max-width: 768px) {
    .intro-section {
      flex-direction: column;
      text-align: center;
    }

    .intro-text h1 {
      font-size: 2rem;
    }

    .intro-image img {
      max-width: 80%;
    }
  }
  
  /* 🔹 구분선 및 소셜 버튼 섹션 */
  .social-section {
    text-align: center;
    margin-top: 1.5rem;
    margin-bottom: 4rem;
  }

  .divider {
    max-width: 1200px;
    height: 1px;
    background-color: #ddd;
    border: none;
    margin: 2rem auto;
  }

  .dividerr {
    max-width: 560px;
    height: 1px;
    background-color: #ddd;
    border: none;
    margin: 2rem auto;
  }

  /* 🔹 버튼 그룹 */
  .social-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.2rem;
    margin-top: 1.5rem;
  }

  /* 🔹 공통 버튼 스타일 */
  .social-btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    color: white;
  }

  /* 🔹 각 버튼별 색상 */
  .linkedin {
    background-color: #1f2937;
  }

  .blog-kr {
    background-color: #1f2937;
  }

  .blog-en {
    background-color: #1f2937;
  }

  .github {
    background-color: #1f2937;
  }

  /* 🔹 hover 효과 */
  .social-btn:hover {
    transform: translateY(-3px);
    opacity: 0.9;
  }

  /* 🔹 모바일 반응형 */
  @media (max-width: 768px) {
    .divider {
      width: 90%;
    }

    .social-buttons {
      flex-direction: column;
      gap: 0.8rem;
    }
  }
  
  /* Timeline Section */
  .timeline {
    margin-top: 3rem;
  }
  
  .timeline-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1rem;
    overflow-x: auto;
    padding-bottom: 1rem;
    align-items: center;
  }
  
  .year-box {
    width: 100%;
    max-width:900px;
    background-color: #f5f5f5;
    border-left: 5px solid #4a90e2;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s;
    border-radius: 8px;
    text-align: left;
  }
  
  .year-box:hover {
    transform: translateY(-5px);
  }
  
  .year-box h3 {
    margin-bottom: 0.5rem;
    color: #222;
    font-size: 1.25rem;
  }
  
  .year-box p {
    font-size: 0.95rem;
    line-height: 1.5;
  }
  
  /* Footer */
  footer {
    background-color: #fff;
    color: #1f2937;
    text-align: center;
    padding: 1rem 0;
    margin-top: auto;
  }
  
  /* Responsive Design */
  @media (max-width: 768px) {
    main h1 {
      font-size: 2rem;
    }
  
    main h2 {
      font-size: 1.5rem;
    }
  
    .year-box {
      width: 100%;
    }
  
    nav ul {
      flex-direction: column;
      gap: 0.5rem;
    }
  }
  
  @media (max-width: 480px) {
    main {
      padding: 1rem;
    }
  
    .timeline-container {
      gap: 1rem;
    }
  }
  
  @media (max-width: 768px) {
    .intro-section {
      flex-direction: column;
      align-items: center;
      text-align: center;
    }

    .intro-image {
      text-align: center;
    }

    .intro-text {
      text-align: center;
    }

    .intro-image img {
      max-width: 80%;
      height: auto;
    }
  }

  
  /* project */
  .project-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
    margin-bottom: 3rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
  }
  
  .project-card {
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 10px;
    overflow: hidden;
    width: 350px;
    text-align: left;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
  }
  
  .project-card:hover {
    transform: translateY(-5px);
  }
  
  .project-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
  }
  
  .project-card h3 {
    font-size: 1.1rem;
    padding: 1rem;
    margin: 0;
  }

  /* project details */
  .project-gallery {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1rem;
    margin-bottom: 2rem;
  }
  
  .project-gallery img {
    width: 80%;
    max-width: 800px;
    margin: 0 auto;
    display: block;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    object-fit: contain;
  }

  /* Skills Page */
.skills-container {
  max-width: 1200px;
  margin: 2rem auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: 1rem;
  text-align: center;
}

.skill-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  max-width: 1000px;
  margin: 0 auto;
}

.skill-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 10px;
  color: navy;
  background-color: #f5f5f5;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  font-weight: bold;
  font-size: 14px;
  white-space: nowrap;
  justify-content: center;
}

.skill-badge img {
  width: 20px;
  height: 20px;
}


/* filtering projects */
#project-filter {
  text-align: center;
  margin: 2rem 0 1.5rem;
}

.filter-button {
  margin: 0 0.5rem;
  padding: 0.5rem 1rem;
  border: none;
  background-color: #ddd;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.3s;
}

.filter-button.active {
  background-color: #4a90e2;
  color: white;
}

/* github profile & Reposiotry page*/
.github-profile {
  text-align: center;
  margin-bottom: 2rem;
}

.github-profile img {
  border-radius: 50%;
  margin-bottom: 1rem;
}

.repo-card {
  width: 100%;
  max-width: 900px;
  background-color: #f5f5f5;
  border-left: 5px solid #4a90e2;
  padding: 1.5rem;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  transition: transform 0.3s;
  border-radius: 8px;
  text-align: left;
  margin: 0 auto 1.5rem;
}

.repo-card:hover {
  transform: translateY(-5px);
}

.repo-card h3 {
  margin-bottom: 0.5rem;
  color: #222;
  font-size: 1.25rem;
}

.repo-card p {
  font-size: 0.95rem;
  line-height: 1.5;
}

.repo-card a {
  text-decoration: none;
  color: #0070f3;
}

body.dark-theme .repo-card {
  background-color: #3a3a3a;
  color: #f0f0f0;
  border-left: 5px solid #4a90e2;
}

body.dark-theme .repo-card a {
  color: #70aaff;
}

/* === Mobile Menu (Slide-In Version) === */
.menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
  margin-right: auto; /* Jiwon Lee 왼쪽에 배치 */
  position: absolute; /* ✅ 완전 왼쪽 고정 */
  left: 1rem;
  top: 1.2rem;
}

.bar {
  width: 25px;
  height: 3px;
  background-color: white;
  border-radius: 3px;
  transition: all 0.3s ease;
}

/* 햄버거 → X 아이콘 전환 */
.menu-toggle.active .bar:nth-child(1) {
  transform: rotate(45deg) translateY(8px);
}
.menu-toggle.active .bar:nth-child(2) {
  opacity: 0;
}
.menu-toggle.active .bar:nth-child(3) {
  transform: rotate(-45deg) translateY(-8px);
}

@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }
  
  .logo {
    margin: 0 auto;
  }

  nav ul {
    flex-direction: column;
    background-color: #1f2937;
    position: fixed;
    top: 0;
    right: -100%; /* 처음에는 화면 밖 */
    width: 70%;
    height: 100%;
    justify-content: center;
    align-items: center;
    text-align: center;
    transition: right 0.4s ease; /* 슬라이드 애니메이션 */
    z-index: 999;
  }

  nav ul.active {
    right: 0; /* 메뉴 열기 */
  }

  nav ul li {
    margin: 1.5rem 0;
  }

  nav a {
    font-size: 1.2rem;
    color: white;
  }

  nav a:hover {
    color: #4a90e2;
  }

  /* 배경 흐림 효과 (메뉴 열릴 때) */
  body.menu-open::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(3px);
    z-index: 998;
  }
}