/* Global Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #333;
  overflow-x: hidden;
  transition:
    background-color 0.5s ease,
    color 0.5s ease;
  -ms-overflow-style: none; /* IE and Edge */
  scrollbar-width: none; /* Firefox */
}

body::-webkit-scrollbar {
  display: none;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

html {
  -ms-overflow-style: none; /* IE and Edge */
  scrollbar-width: none; /* Firefox */
}

/* Hide scrollbar for Chrome, Safari and Opera */
::-webkit-scrollbar {
  display: none;
}

/* Scroll Progress Bar */
#scroll-progress {
  position: fixed;
  top: 0;
  right: 0;
  width: 8px;
  height: 0%;
  background: linear-gradient(
    to bottom,
    #ffe2b5,
    #df3b29
  ); /* 낮: 노랑 -> 빨강 */
  background-size: 100% 100vh;
  z-index: 2000;
}

/* Navigation */
#navbar {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  transition:
    background 0.3s ease,
    padding 0.3s ease;
  padding: 20px 0;
  background: transparent;
}

#navbar.scrolled {
  background: #222;
  padding: 10px 0;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.nav-container {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: #fff;
  letter-spacing: 2px;
}

.nav-links {
  display: flex;
}

.nav-links li {
  margin-left: 30px;
}

.nav-links a {
  color: #fff;
  font-weight: 500;
  transition: color 0.3s;
  font-size: 1rem;
  text-transform: uppercase;
}

.nav-links a:hover {
  color: #3498db;
}

.nav-links a.active {
  color: #3498db;
  border-bottom: 2px solid #3498db;
}

.theme-switch {
  cursor: pointer;
  color: #fff;
  display: flex;
  align-items: center;
}

.theme-switch i {
  transition:
    transform 0.5s ease,
    opacity 0.3s ease;
}

.theme-switch i.switching {
  transform: rotate(180deg) scale(0.5);
  opacity: 0;
}

.menu-toggle {
  display: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Hero Section */
#home {
  position: relative;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: #fff;
}

#bg-video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  z-index: -2;
  transform: translate(-50%, -50%);
  object-fit: cover;
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: -1;
}

.hero-content h1 {
  font-size: 3rem;
  margin-bottom: 10px;
}

.txt-type {
  color: #3498db;
  border-right: 0.1em solid #ccc;
  padding-right: 5px;
}

.sub-text {
  font-size: 1.2rem;
  margin-bottom: 30px;
  opacity: 0.8;
}

.scroll-down {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 2rem;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  40% {
    transform: translateX(-50%) translateY(-10px);
  }
  60% {
    transform: translateX(-50%) translateY(-5px);
  }
}

.btn-main {
  display: inline-block;
  padding: 10px 30px;
  background: #3498db;
  color: #fff;
  border-radius: 5px;
  transition: background 0.3s;
}

.btn-main:hover {
  background: #2980b9;
}

/* Sections Common */
.section-padding {
  padding: 80px 0;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 60px;
  text-transform: uppercase;
  position: relative;
  padding-bottom: 15px;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 3px;
  background: #3498db;
  transition: width 0.3s ease;
}

.section-padding:hover .section-title::after {
  width: 250px;
}

/* About Section Details */
.about-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 50px;
  flex-wrap: wrap;
}

.about-img img {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  border: 5px solid #fff;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.about-text {
  max-width: 600px;
}

.about-links {
  margin-top: 20px;
}

.about-links a {
  display: inline-block;
  font-size: 1.5rem;
  margin-right: 20px;
  color: #333;
  transition: color 0.3s;
}

.about-links a:hover {
  color: #3498db;
}

/* Email Popup Styles */
.email-container {
  position: relative;
  display: inline-block;
  margin-right: 20px;
}

.email-container a {
  margin-right: 0 !important; /* Remove default margin from link */
}

.email-popup {
  visibility: hidden;
  width: 180px;
  background-color: #333;
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 8px;
  position: absolute;
  z-index: 10;
  top: 150%;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.3s;
  font-size: 0.9rem;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.email-popup::after {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: transparent transparent #333 transparent;
}

.email-popup.show {
  visibility: visible;
  opacity: 1;
}

.bg-light {
  background: #f4f4f4;
}

/* Smooth Transition for Dark Mode Elements */
.bg-light,
.portfolio-item,
.timeline-item,
.modal-content,
.section-title,
.portfolio-info h3,
.skill-title,
.modal-title,
.portfolio-info p,
.date,
.modal-text {
  transition:
    background-color 0.5s ease,
    color 0.5s ease,
    border-color 0.5s ease,
    box-shadow 0.5s ease;
}

/* Dark Mode Styles */
body.dark-mode {
  background-color: #121212;
  color: #f4f4f4;
}

body.dark-mode .bg-light {
  background-color: #1f1f1f;
}

body.dark-mode .portfolio-item,
body.dark-mode .timeline-item,
body.dark-mode .modal-content {
  background-color: #2c2c2c;
  color: #fff;
}

.body.dark-mode .section-title,
body.dark-mode .portfolio-info h3,
body.dark-mode .skill-title,
body.dark-mode .modal-title {
  color: #fff;
}

body.dark-mode .about-links a {
  color: #fff;
}

body.dark-mode .about-links a:hover {
  color: #3498db;
}

body.dark-mode .email-popup {
  background-color: #f4f4f4;
  color: #333;
}
body.dark-mode .email-popup::after {
  border-color: transparent transparent #f4f4f4 transparent;
}

body.dark-mode .portfolio-info p,
body.dark-mode .date,
body.dark-mode .modal-text {
  color: #bbb;
}

/* Dark Mode Scroll Progress Bar */
body.dark-mode #scroll-progress {
  background: linear-gradient(
    to bottom,
    #ffffff,
    #f9e79f
  ); /* 밤: 연한 노랑 -> 흰색 */
  background-size: 100% 100vh;
}

/* Portfolio Grid */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.portfolio-item {
  background: #fff;
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s;
  cursor: pointer;
}

.portfolio-item:hover {
  transform: translateY(-5px);
}

.portfolio-img {
  position: relative;
}

.portfolio-img::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0);
  transition: background 0.3s ease;
  pointer-events: none;
}

.portfolio-item:hover .portfolio-img::after {
  background: rgba(255, 255, 255, 0.15);
}

.portfolio-img img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
  transition: transform 0.5s;
}

.portfolio-item:hover .portfolio-img img {
  transform: scale(1.1);
}

.portfolio-info {
  padding: 20px;
}

/* Modal Styles */
.modal {
  display: none; /* Hidden by default */
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
}

.modal-content {
  background-color: transparent;
  margin: 0;
  padding: 0;
  border: none;
  width: 100%;
  height: 100%;
  max-width: none;
  border-radius: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.4s;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.close-modal {
  color: #fff;
  position: absolute;
  top: 30px;
  right: 40px;
  font-size: 50px;
  font-weight: bold;
  cursor: pointer;
  z-index: 2002;
  transition: color 0.3s;
}

.close-modal:hover,
.close-modal:focus {
  color: #3498db;
  text-decoration: none;
}

.modal-img {
  width: auto;
  max-width: 85%;
  max-height: 60vh;
  height: auto;
  border-radius: 10px;
  margin-bottom: 20px;
  object-fit: contain;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.modal-title {
  margin-bottom: 10px;
  color: #fff;
  font-size: 2.5rem;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

.modal-text {
  color: #ddd;
  font-size: 1.1rem;
  max-width: 700px;
  text-align: center;
  line-height: 1.6;
  padding: 0 20px;
}

.modal-iframe {
  width: 100%;
  height: 400px;
  border: 1px solid #ddd;
  border-radius: 5px;
  margin-top: 15px;
  display: none;
}

/* Navigation Arrows */
.modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.5);
  font-size: 4rem;
  cursor: pointer;
  padding: 20px;
  z-index: 2001;
  transition: all 0.3s ease;
  user-select: none;
}

.modal-nav:hover {
  color: #fff;
  transform: translateY(-50%) scale(1.1);
}

.prev-btn {
  left: 30px;
}

.next-btn {
  right: 30px;
}

/* Skills */
.skills-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
}

.skills-category {
  background: linear-gradient(145deg, #ffffff, #f5f5f5);
  padding: 30px;
  border-radius: 15px;
  box-shadow:
    5px 5px 15px #d9d9d9,
    -5px -5px 15px #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.5);
  transition: transform 0.3s ease;
  cursor: pointer;
  border: 2px solid transparent;
}

.skills-category:hover {
  transform: translateY(-5px);
  border-color: #3498db;
}

.skills-category h3 {
  font-size: 1.2rem;
  margin-bottom: 20px;
  text-align: center;
  text-transform: uppercase;
  color: #333;
  border-bottom: 2px solid #f4f4f4;
  padding-bottom: 10px;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.skill-tag {
  background: #f4f4f4;
  padding: 10px;
  border-radius: 12px; /* 뭉툭한 모서리 */
  font-size: 0.9rem;
  color: #555;
  transition:
    background-color 0.5s ease,
    color 0.5s ease,
    border-color 0.5s ease,
    transform 0.3s ease;
  font-weight: 500;
  display: inline-flex;
  border: 1px solid transparent; /* For color border */
  cursor: default;
  /* 네모난 모양과 중앙 정렬을 위한 스타일 */
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 110px;
  height: 100px;
  gap: 8px;
  text-align: center;
}

.skill-tag:hover {
  background: #3498db;
  color: #fff;
  transform: translateY(-2px);
}

/* Brand Colors for Skills */
.skill-tag.html {
  border-color: #e34c26;
}
.skill-tag.html i {
  color: #e34c26;
}
.skill-tag.html:hover {
  background: #e34c26;
  color: #fff;
}
.skill-tag.html:hover i {
  color: #fff;
}

.skill-tag.css {
  border-color: #264de4;
}
.skill-tag.css i {
  color: #264de4;
}
.skill-tag.css:hover {
  background: #264de4;
  color: #fff;
}
.skill-tag.css:hover i {
  color: #fff;
}

.skill-tag.scss {
  border-color: #cd6799;
}
.skill-tag.scss i {
  color: #cd6799;
}
.skill-tag.scss:hover {
  background: #cd6799;
  color: #fff;
}
.skill-tag.scss:hover i {
  color: #fff;
}

.skill-tag.js {
  border-color: #f7df1e;
}
.skill-tag.js i {
  color: #f7df1e;
}
.skill-tag.js:hover {
  background: #f7df1e;
  color: #fff;
}
.skill-tag.js:hover i {
  color: #fff;
}

.skill-tag.react {
  border-color: #61dbfb;
}
.skill-tag.react i {
  color: #61dbfb;
}
.skill-tag.react:hover {
  background: #61dbfb;
  color: #fff;
}
.skill-tag.react:hover i {
  color: #fff;
}

.skill-tag.firebase {
  border-color: #ffca28;
}
.skill-tag.firebase i {
  color: #ffca28;
}
.skill-tag.firebase:hover {
  background: #ffca28;
  color: #fff;
}
.skill-tag.firebase:hover i {
  color: #fff;
}

.skill-tag.ps {
  border-color: #31a8ff;
}
.skill-tag.ps i {
  color: #31a8ff;
}
.skill-tag.ps:hover {
  background: #31a8ff;
  color: #fff;
}
.skill-tag.ps:hover i {
  color: #fff;
}

.skill-tag.ai {
  border-color: #ff9a00;
}
.skill-tag.ai i {
  color: #ff9a00;
}
.skill-tag.ai:hover {
  background: #ff9a00;
  color: #fff;
}
.skill-tag.ai:hover i {
  color: #fff;
}

.skill-tag.figma {
  border-color: #f24e1e;
}
.skill-tag.figma i {
  color: #f24e1e;
}
.skill-tag.figma:hover {
  background: #f24e1e;
  color: #fff;
}
.skill-tag.figma:hover i {
  color: #fff;
}

.skill-tag.ae,
.skill-tag.pr {
  border-color: #9999ff;
}
.skill-tag.ae i,
.skill-tag.pr i {
  color: #9999ff;
}
.skill-tag.ae:hover,
.skill-tag.pr:hover {
  background: #9999ff;
  color: #fff;
}
.skill-tag.ae:hover i,
.skill-tag.pr:hover i {
  color: #fff;
}

.skill-tag.unity {
  border-color: #000;
}
.skill-tag.unity i {
  color: #000;
}
.skill-tag.unity:hover {
  background: #000;
  color: #fff;
}
.skill-tag.unity:hover i {
  color: #fff;
}

.skill-tag.unreal {
  border-color: #313131;
}
.skill-tag.unreal i {
  color: #313131;
}
.skill-tag.unreal:hover {
  background: #313131;
  color: #fff;
}
.skill-tag.unreal:hover i {
  color: #fff;
}

.skill-tag.maya {
  border-color: #37a5cc;
}
.skill-tag.maya i {
  color: #37a5cc;
}
.skill-tag.maya:hover {
  background: #37a5cc;
  color: #fff;
}
.skill-tag.maya:hover i {
  color: #fff;
}

.skill-tag.blender {
  border-color: #e87d0d;
}
.skill-tag.blender i {
  color: #e87d0d;
}
.skill-tag.blender:hover {
  background: #e87d0d;
  color: #fff;
}
.skill-tag.blender:hover i {
  color: #fff;
}

.skill-tag.zbrush {
  border-color: #ee220c;
}
.skill-tag.zbrush i {
  color: #ee220c;
}
.skill-tag.zbrush:hover {
  background: #ee220c;
  color: #fff;
}
.skill-tag.zbrush:hover i {
  color: #fff;
}

.skill-tag.substance {
  border-color: #e3223e;
}
.skill-tag.substance i {
  color: #e3223e;
}
.skill-tag.substance:hover {
  background: #e3223e;
  color: #fff;
}
.skill-tag.substance:hover i {
  color: #fff;
}

.skill-tag.chatgpt {
  border-color: #74aa9c;
}
.skill-tag.chatgpt i {
  color: #74aa9c;
}
.skill-tag.chatgpt:hover {
  background: #74aa9c;
  color: #fff;
}
.skill-tag.chatgpt:hover i {
  color: #fff;
}

.skill-tag.gemini {
  border-color: #308bf5;
}
.skill-tag.gemini i {
  color: #308bf5;
}
.skill-tag.gemini:hover {
  background: #308bf5;
  color: #fff;
}
.skill-tag.gemini:hover i {
  color: #fff;
}

.skill-tag.grok,
.skill-tag.midjourney {
  border-color: #333;
}
.skill-tag.grok i,
.skill-tag.midjourney i {
  color: #333;
}
.skill-tag.grok:hover,
.skill-tag.midjourney:hover {
  background: #333;
  color: #fff;
}
.skill-tag.grok:hover i,
.skill-tag.midjourney:hover i {
  color: #fff;
}

.skill-tag.suno {
  border-color: #000;
}
.skill-tag.suno i {
  color: #000;
}
.skill-tag.suno:hover {
  background: #000;
  color: #fff;
}
.skill-tag.suno:hover i {
  color: #fff;
}

.skill-tag.git {
  border-color: #f1502f;
}
.skill-tag.git i {
  color: #f1502f;
}
.skill-tag.git:hover {
  background: #f1502f;
  color: #fff;
}
.skill-tag.git:hover i {
  color: #fff;
}

.skill-tag.slack {
  border-color: #4a154b;
}
.skill-tag.slack i {
  color: #4a154b;
}
.skill-tag.slack:hover {
  background: #4a154b;
  color: #fff;
}
.skill-tag.slack:hover i {
  color: #fff;
}

.skill-tag.vscode {
  border-color: #007acc;
}
.skill-tag.vscode i {
  color: #007acc;
}
.skill-tag.vscode:hover {
  background: #007acc;
  color: #fff;
}
.skill-tag.vscode:hover i {
  color: #fff;
}

.skill-tag.notion {
  border-color: #000;
}
.skill-tag.notion i {
  color: #000;
}
.skill-tag.notion:hover {
  background: #000;
  color: #fff;
}
.skill-tag.notion:hover i {
  color: #fff;
}

.skill-tag.capcut {
  border-color: #000;
}
.skill-tag.capcut:hover {
  background: #000;
  color: #fff;
}

/* Skills Toggle Button */
.skills-toggle-container {
  text-align: center;
  margin-top: 30px;
  width: 100%;
}

.skills-toggle-btn {
  cursor: pointer;
  color: #fff;
  background-color: #3498db;
  font-size: 1.1rem;
  font-weight: bold;
  transition:
    background-color 0.3s,
    transform 0.3s;
  display: inline-block;
  padding: 12px 30px;
  border-radius: 50px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.skills-toggle-btn:hover {
  background-color: #2980b9;
  transform: translateY(-2px);
}

/* 애니메이션 시작 상태를 위한 초기 투명도 설정 */
#extra-skills .skills-category {
  opacity: 0;
}

/* Extra Skills Container */
#extra-skills {
  display: none;
  width: 100%;
}

#extra-skills.visible {
  display: block;
}

/* Add margin between the main skills and extra skills */
#extra-skills .skills-grid {
  margin-top: 30px;
}

/* Skills Animation */
@keyframes popInLeft {
  0% {
    opacity: 0;
    transform: translateX(-50px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes popInRight {
  0% {
    opacity: 0;
    transform: translateX(50px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Apply animation when extra-skills is visible (display: block) */
#extra-skills.visible .skills-category:nth-child(odd) {
  animation: popInLeft 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

#extra-skills.visible .skills-category:nth-child(even) {
  animation: popInRight 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* Dark mode adjustments for specific tags if needed */
body.dark-mode .skill-tag.unity,
body.dark-mode .skill-tag.unreal,
body.dark-mode .skill-tag.grok,
body.dark-mode .skill-tag.midjourney,
body.dark-mode .skill-tag.suno,
body.dark-mode .skill-tag.notion,
body.dark-mode .skill-tag.capcut {
  border-color: #fff;
}
body.dark-mode .skill-tag.unity:hover,
body.dark-mode .skill-tag.unreal:hover,
body.dark-mode .skill-tag.grok:hover,
body.dark-mode .skill-tag.midjourney:hover,
body.dark-mode .skill-tag.suno:hover,
body.dark-mode .skill-tag.notion:hover,
body.dark-mode .skill-tag.capcut:hover {
  background: #fff;
  color: #000;
}

.skill-icon {
  width: 32px; /* 아이콘 크기 증가 */
  height: 32px;
  margin-right: 0; /* flex gap으로 대체 */
  object-fit: contain;
}

/* Dark Mode for Skills */
body.dark-mode .skills-category {
  background: linear-gradient(145deg, #1e1e1e, #252525);
  box-shadow:
    5px 5px 15px #121212,
    -5px -5px 15px #2e2e2e;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

body.dark-mode .skills-category h3 {
  color: #fff;
  border-bottom-color: #444;
}

body.dark-mode .skill-tag {
  background: #444;
  color: #ddd;
}

body.dark-mode .skill-tag:hover {
  color: #fff;
}

body.dark-mode .skills-toggle-btn {
  color: #fff;
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 40px;
  border-left: 2px solid #e0e0e0;
}

.timeline-item {
  background: #fff;
  padding: 30px;
  margin-bottom: 30px;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  position: relative;
  border-left: none;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.timeline-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -53px;
  top: 30px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: #3498db;
  border: 4px solid #f4f4f4;
  box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.date {
  display: inline-block;
  background: #e3f2fd;
  color: #3498db;
  padding: 6px 15px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 15px;
}

/* Dark Mode Timeline */
body.dark-mode .timeline {
  border-left-color: #333;
}

body.dark-mode .timeline-item::before {
  border-color: #1f1f1f;
  box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.4);
}

body.dark-mode .date {
  background: rgba(52, 152, 219, 0.15);
  color: #64b5f6;
}

/* Military Service Style */
.timeline-item.military::before {
  background-color: #7cb342; /* 올리브 그린 */
  box-shadow: 0 0 0 2px rgba(124, 179, 66, 0.2);
}

.timeline-item.military .date {
  background: #f1f8e9;
  color: #558b2f;
}

body.dark-mode .timeline-item.military::before {
  box-shadow: 0 0 0 2px rgba(124, 179, 66, 0.4);
}

body.dark-mode .timeline-item.military .date {
  background: rgba(124, 179, 66, 0.15);
  color: #aed581;
}

/* Nested Timeline Item */
.timeline-item.nested {
  margin-top: 25px; /* 부모 항목과 간격 */
  margin-bottom: 0;
  padding: 20px;
  background: #f9f9f9; /* 약간 다른 배경색으로 구분 */
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.04); /* 안쪽 그림자 */
  border-left: 3px solid #ccc; /* 구분선 */
  border-radius: 10px;
}

.timeline-item.nested:hover {
  transform: none; /* 중첩 항목은 떠오르지 않음 */
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
}

/* 중첩 항목은 타임라인의 메인 점을 가지지 않음 */
.timeline-item.nested::before {
  display: none;
}

/* Dark Mode for Nested Item */
body.dark-mode .timeline-item.nested {
  background: #252525;
  border-left-color: #555;
}

.timeline-item.nested.military {
  border-left-color: #7cb342; /* 군 복무 항목은 녹색 구분선 */
}

/* Footer */
footer {
  background: #222;
  color: #fff;
  text-align: center;
  padding: 20px 0;
}

/* Responsive */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 60px;
    right: 0;
    width: 100%;
    background: #222;
    flex-direction: column;
    text-align: center;
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links li {
    margin: 15px 0;
  }

  .menu-toggle {
    display: block;
  }

  .hero-content h1 {
    font-size: 2rem;
  }
}

/* Spinner Animation */
.skill-modal-loader i {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.skill-modal-loader {
  animation: fadeEffect 0.5s;
}

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

to {
  opacity: 1;
}

@media (min-width: 768px) {
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
