/* ----- POPPINS FONT Link ----- */
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap");

/* ----- VARIABLES ----- */
:root {
  /* Light theme */
  --body-color: #fafafa;
  --color-white: #fff;
  --text-color: #383a42;
  --accent-color: #4078f2;
  --accent-hover: #5689f5;
  --shadow-color: rgba(0, 0, 0, 0.1);
  /* One Light text */
  --text-color-third: #50a14f;
  /* One Light green */
  --first-color: #4078f2;
  /* One Light blue */
  /**/
  --first-color-hover: #5689f5;
  /* Lighter blue */
  --second-color: #986801;
  /* One Light orange/gold */
  --third-color: #e45649;
  /* One Light red */
  --first-shadow-color: rgba(0, 0, 0, 0.1);
  --icon-bg-color: #ffffff;
  --icon-shadow: 0px 2px 5px 0px rgba(0, 0, 0, 0.25);
}

/* Dark mode colors - based on One Dark Pro */
[data-theme="dark"] {
  /* Dark theme - One Dark inspired */
  --body-color: #282c34;
  --color-white: #21252b;
  --text-color: #abb2bf;
  --accent-color: #61afef;
  --accent-hover: #7cbef7;
  --shadow-color: rgba(0, 0, 0, 0.3);
  /* One Dark background */
  --color-white: #21252b;
  /* One Dark darker shade */
  --text-color-second: #abb2bf;
  /* One Dark text */
  --text-color-third: #98c379;
  /* One Dark green */
  --first-color: #61afef;
  /* One Dark blue */
  --first-color-hover: #7cbef7;
  /* Lighter blue */
  --second-color: #e5c07b;
  /* One Dark yellow */
  --third-color: #e06c75;
  /* One Dark red */
  --first-shadow-color: rgba(0, 0, 0, 0.3);
  --icon-bg-color: #2c313a;
  --icon-shadow: 0px 2px 5px 0px rgba(0, 0, 0, 0.4);
}

/* ----- BASE ----- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

/* ----- SMOOTH SCROLL ----- */
html {
  scroll-behavior: smooth;
}

/* ----- CHANGE THE SCROLL BAR DESIGN ----- */
::-webkit-scrollbar {
  width: 10px;
  border-radius: 25px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 30px;
}

::-webkit-scrollbar-thumb:hover {
  background: #bbb;
}

/* ---##-- REUSABLE CSS --##--- */

/* ----- GLOBAL BUTTON DESIGN ----- */
.btn {
  font-weight: 500;
  padding: 12px 20px;
  background: #efefef;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: 0.4s;
}

.btn > i {
  margin-left: 10px;
}

.btn:hover {
  background: var(--second-color);
  color: var(--color-white);
}

/* ----- GLOBAL ICONS DESIGN ----- */
i {
  font-size: 16px;
}

/* ------- BASE -------- */
body {
  background: var(--body-color);
  overflow-x: hidden;
  width: 100%;
}

.container {
  overflow-x: hidden;
  position: relative;
  width: 100%;
}

/* ----- NAVIGATION BAR ----- */
nav {
  position: fixed;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  height: 90px;
  line-height: 90px;
  background: var(--body-color);
  padding-inline: 9vw;
  transition: 0.3s;
  z-index: 100;
}

.nav-logo {
  position: relative;
}

.nav-name {
  font-size: 30px;
  font-weight: 600;
  color: var(--text-color-third);
}

.nav-logo span {
  position: absolute;
  top: -15px;
  right: -20px;
  font-size: 5em;
  color: var(--text-color-second);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-menu,
.nav_menu_list {
  display: flex;
}

.nav-menu .nav_list {
  list-style: none;
  position: relative;
}

.nav-link {
  text-decoration: none;
  color: var(--text-color-second);
  font-weight: 500;
  padding-inline: 15px;
  margin-inline: 20px;
}

.nav-menu-btn {
  display: none;
}

.nav-menu-btn i {
  font-size: 28px;
  cursor: pointer;
}

.active-link {
  position: relative;
  color: var(--first-color);
  transition: 0.3;
}

.active-link::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -15px;
  transform: translate(-50%, -50%);
  width: 5px;
  height: 5px;
  background: var(--first-color);
  border-radius: 50%;
}

/* ----- WRAPPER DESIGN ----- */
.wrapper {
  padding-inline: 5vw;
  overflow: hidden;
  width: 100%;
}

/* ----- FEATURED BOX ----- */
.featured-box {
  position: relative;
  display: flex;
  height: 100vh;
  min-height: 700px;
  gap: 30px;
}

/* ----- FEATURED TEXT BOX ----- */
.featured-text {
  position: relative;
  display: flex;
  justify-content: center;
  align-content: center;
  min-height: 80vh;
  flex-direction: column;
  width: 50%;
  padding-left: 20px;
}

.featured-text-card span {
  color: var(--text-color);
  font-size: 2rem;
  font-weight: 500;
  letter-spacing: 1px;
}

.featured-name h1 {
  font-size: 5rem;
  font-weight: 700;
  color: var(--first-color);
  margin: 0.5rem 0;
}

.featured-role {
  margin-bottom: 2rem;
}

.featured-role p {
  font-size: 2rem;
  font-weight: 500;
  color: var(--text-color);
}

.featured-role .typedText {
  color: var(--third-color);
}

.featured-text-info p {
  font-size: 1.2rem;
  line-height: 1.8;
  color: var(--text-color-second);
  margin-bottom: 2rem;
}

.featured-text-btn {
  display: flex;
  gap: 20px;
}

.featured-text-btn > .blue-btn {
  background: var(--first-color);
  color: var(--color-white);
}

.featured-text-btn > .blue-btn:hover {
  background: var(--first-color-hover);
}

.social_icons {
  display: flex;
  margin-top: 5em;
  gap: 30px;
}

.icon {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--icon-bg-color);
  box-shadow: var(--icon-shadow);
  cursor: pointer;
  color: var(--text-color-second);
  transition: color 0.3s ease, transform 0.3s ease;
}

.icon:hover {
  color: var(--first-color);
  transform: translateY(-3px);
}

.icon a {
  color: inherit;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
}

/* ----- FEATURED IMAGE BOX ----- */
.featured-image {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  align-content: center;
  min-height: 80vh;
  width: 40%;
  position: relative;
}

.image {
  margin: auto 0;
  width: 400px;
  height: 400px;
  border-radius: 55% 45% 55% 45%;
  overflow: hidden;
  animation: imgFloat 7s ease-in-out infinite;
}

.photo-credit {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 5;
  animation: creditFloat 7s ease-in-out infinite;
}

.photo-credit text {
  filter: drop-shadow(0 1px 3px rgba(255, 255, 255, 0.95))
    drop-shadow(0 0 8px rgba(255, 255, 255, 0.7));
}

@keyframes creditFloat {
  0%,
  100% {
    transform: translate(-50%, -50%) translateY(0) scale(1, 1);
  }
  50% {
    transform: translate(-50%, -50%) translateY(10px) scale(1.02, 0.98);
  }
}

.image img {
  width: 400px;
  height: 400px;
  object-fit: cover;
}

@keyframes imgFloat {
  50% {
    transform: translateY(10px);
    border-radius: 45% 55% 45% 55%;
  }
}

.scroll-btn {
  position: absolute;
  bottom: 0;
  left: 50%;
  translate: -50%;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 150px;
  height: 50px;
  gap: 5px;
  text-decoration: none;
  color: var(--text-color-second);
  background: var(--icon-bg-color);
  border-radius: 30px;
  box-shadow: var(--icon-shadow);
}

.scroll-btn i {
  font-size: 20px;
}

/* ----- MAIN BOX ----- */
.section {
  padding-block: 3em;
  width: 100%;
  overflow: hidden;
}

.row {
  display: flex;
  justify-content: space-between;
  width: 100%;
  gap: 50px;
}

.col {
  display: flex;
  width: 50%;
}

/* -- ## --- RESUABLE CSS -- ## -- */
.top-header {
  text-align: center;
  margin-bottom: 5em;
}

.top-header h1 {
  font-weight: 600;
  color: var(--text-color-second);
  margin-bottom: 10px;
}

.top-header span {
  color: #999;
}

h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-color-second);
  margin-bottom: 15px;
}

/* ----- ABOUT INFO ----- */
.about-info {
  position: relative;
  display: flex;
  align-items: center;
  flex-direction: column;
  padding-block: 30px 70px;
  padding-inline: 20px;
  width: 100%;
  background: rgba(248, 249, 250, 0.8);
  box-shadow: 1px 8px 10px 2px var(--first-shadow-color);
  border-radius: 20px;
}

.about-info p {
  text-align: center;
  font-size: 15px;
  color: #777;
}

.about-btn button {
  position: absolute;
  right: 20px;
  bottom: 20px;
  background: var(--first-color);
  color: var(--color-white);
  border-radius: 30px;
}

.about-btn button:hover {
  background: var(--first-color-hover);
}

/* ----- COMPANY TIMELINE STYLING ----- */
/* Modern Experience Journey Design */
.experience-journey {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 25px;
  width: 100%;
}

/* Experience Cards */
.experience-card {
  position: relative;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 249, 250, 0.9) 100%);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(64, 120, 242, 0.1);
  overflow: hidden;
}

.experience-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--first-color), var(--third-color));
  opacity: 0;
  transition: opacity 0.4s ease;
}

.experience-card:hover::before {
  opacity: 1;
}

.experience-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(64, 120, 242, 0.15);
  border-color: var(--first-color);
}

/* Card Badges */
.card-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  background: linear-gradient(135deg, var(--first-color), var(--first-color-hover));
  color: white;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px rgba(64, 120, 242, 0.3);
}

.card-badge.education {
  background: linear-gradient(135deg, var(--second-color), #d4a574);
}

/* Current Work Card - Special Styling */
.current-work {
  background: linear-gradient(135deg, rgba(64, 120, 242, 0.05) 0%, rgba(96, 137, 245, 0.03) 100%);
  border: 2px solid rgba(64, 120, 242, 0.2);
}

.current-work::before {
  opacity: 1;
  background: linear-gradient(90deg, var(--first-color), var(--accent-hover));
}

/* Education Card */
.education-card {
  background: linear-gradient(135deg, rgba(152, 104, 1, 0.05) 0%, rgba(212, 165, 116, 0.03) 100%);
  border: 2px solid rgba(152, 104, 1, 0.15);
}

.education-card::before {
  background: linear-gradient(90deg, var(--second-color), #d4a574);
}

/* Card Content */
.card-content {
  display: flex;
  align-items: center;
  gap: 20px;
  position: relative;
}

/* Company Logo Wrapper */
.company-logo-wrapper {
  flex-shrink: 0;
  width: 120px;
  height: 120px;
  background: white;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.company-logo-wrapper.small {
  width: 80px;
  height: 80px;
  padding: 12px;
}

.experience-card:hover .company-logo-wrapper {
  transform: scale(1.05) rotate(2deg);
  box-shadow: 0 8px 24px rgba(64, 120, 242, 0.15);
}

.company-logo-modern {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

/* Company Details */
.company-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-right: 80px;
}

.company-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-color);
  margin: 0;
  line-height: 1.3;
  letter-spacing: -0.02em;
  transition: color 0.3s ease;
}

.experience-card:hover .company-name {
  color: var(--first-color);
}

.job-title {
  font-size: 15px;
  color: var(--text-color-second);
  margin: 0;
  font-weight: 500;
  line-height: 1.4;
}

.time-period {
  font-size: 13px;
  color: #999;
  font-weight: 500;
  margin-top: 4px;
  display: inline-block;
}

/* Previous Experience Section */
.previous-experience-section {
  margin-top: 16px;
}

.section-label {
  font-size: 13px;
  font-weight: 700;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 16px;
  padding-left: 4px;
  position: relative;
}

.section-label::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 2px;
  background: var(--first-color);
  transition: width 0.4s ease;
}

.previous-experience-section:hover .section-label::before {
  width: 40px;
  margin-right: 12px;
}

.previous-experience-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

/* Compact Cards */
.experience-card.compact {
  padding: 18px;
}

.experience-card.compact .card-content {
  gap: 14px;
}

.experience-card.compact .company-details {
  padding-right: 0;
}

.experience-card.compact .company-name {
  font-size: 16px;
  font-weight: 600;
}

.experience-card.compact .job-title {
  font-size: 13px;
}

.experience-card.compact .time-period {
  font-size: 12px;
}

/* Dark Mode Support */
[data-theme="dark"] .experience-card {
  background: linear-gradient(135deg, rgba(44, 49, 58, 0.95) 0%, rgba(33, 37, 43, 0.9) 100%);
  border-color: rgba(97, 175, 239, 0.15);
}

[data-theme="dark"] .current-work {
  background: linear-gradient(135deg, rgba(97, 175, 239, 0.1) 0%, rgba(124, 190, 247, 0.05) 100%);
  border-color: rgba(97, 175, 239, 0.25);
}

[data-theme="dark"] .education-card {
  background: linear-gradient(135deg, rgba(229, 192, 123, 0.1) 0%, rgba(229, 192, 123, 0.05) 100%);
  border-color: rgba(229, 192, 123, 0.2);
}

[data-theme="dark"] .company-logo-wrapper {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .card-badge {
  box-shadow: 0 4px 12px rgba(97, 175, 239, 0.4);
}

[data-theme="dark"] .section-label {
  color: #999;
}

/* Mobile responsiveness */
@media only screen and (max-width: 768px) {
  .experience-journey {
    gap: 18px;
    margin-top: 20px;
  }

  .experience-card {
    padding: 18px;
  }

  .card-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .company-logo-wrapper {
    width: 100px;
    height: 100px;
    align-self: center;
  }

  .company-logo-wrapper.small {
    width: 70px;
    height: 70px;
  }

  .company-details {
    padding-right: 70px;
    text-align: center;
    align-items: center;
    width: 100%;
  }

  .card-badge {
    top: 12px;
    right: 12px;
    padding: 5px 12px;
    font-size: 10px;
  }

  .previous-experience-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .experience-card.compact .card-content {
    flex-direction: row;
    align-items: center;
  }

  .experience-card.compact .company-details {
    text-align: left;
    align-items: flex-start;
  }

  .section-label {
    font-size: 12px;
    margin-bottom: 14px;
  }

  .company-name {
    font-size: 17px;
  }

  .experience-card.compact .company-name {
    font-size: 15px;
  }
}

/* Animation for smooth appearance */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.experience-card {
  animation: fadeInUp 0.6s ease-out forwards;
}

.experience-card:nth-child(1) {
  animation-delay: 0.1s;
}

.experience-card:nth-child(2) {
  animation-delay: 0.2s;
}

.previous-experience-section {
  animation: fadeInUp 0.6s ease-out 0.3s forwards;
  opacity: 0;
}

.previous-experience-section {
  opacity: 1;
}

/* Legacy styles - keeping for backward compatibility but will be overridden */
.company-timeline-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  margin-top: 25px;
}

.timeline-column {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.timeline-left .logo-item {
  grid-template-columns: 135px 1fr;
}

.timeline-left .logo-container {
  width: 135px;
  min-width: 135px;
}

.timeline-left .logo-container .company-logo {
  max-width: 85%;
}

.timeline-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.logo-items-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.timeline-title {
  font-size: 12px;
  font-weight: 600;
  color: #666666;
  margin: 0 0 12px 0;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  padding-left: 0;
  opacity: 1;
}

.logo-item {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 20px;
  align-items: center;
  padding: 12px 0;
  background: transparent;
  border-radius: 0;
  transition: all 0.3s ease;
  position: relative;
}

.logo-item:hover {
  transform: translateX(3px);
}

.logo-item:hover .logo-info h5 {
  color: var(--first-color);
}

.logo-container {
  flex-shrink: 0;
  width: 170px;
  min-width: 170px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  overflow: visible;
  transition: all 0.3s ease;
}

.logo-item:hover .logo-container {
  transform: scale(1.05);
}

.company-logo {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.logo-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}

.logo-info h5 {
  font-size: 16px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0;
  line-height: 1.4;
  transition: color 0.3s ease;
  letter-spacing: -0.01em;
}

.logo-info p {
  font-size: 14px;
  color: #4a4a4a;
  margin: 0;
  line-height: 1.4;
  font-weight: 400;
  letter-spacing: 0;
}

/* Mobile responsiveness for company timeline */
@media only screen and (max-width: 768px) {
  .company-timeline-grid {
    grid-template-columns: 1fr;
    gap: 28px;
    margin-top: 20px;
  }

  .timeline-column {
    gap: 28px;
  }

  .timeline-section {
    gap: 14px;
  }

  .timeline-title {
    font-size: 13px;
    letter-spacing: 1.2px;
  }

  .logo-item {
    grid-template-columns: 135px 1fr;
    gap: 16px;
    padding: 14px 0;
  }

  .logo-container {
    width: 135px;
    height: 85px;
    padding: 0;
  }

  .logo-info {
    gap: 5px;
  }

  .logo-info h5 {
    font-size: 16px;
  }

  .logo-info p {
    font-size: 13px;
  }
}

/* ----- SKILLS CONTAINER ----- */
.skills-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* ----- ABOUT / SKILLS BOX ----- */
.skills-box {
  background: var(--color-white);
  border-radius: 16px;
  padding: 30px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(64, 120, 242, 0.1);
}

.skills-box:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(64, 120, 242, 0.15);
  border-color: var(--first-color);
}

.skills-header {
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--first-color);
}

.skills-header h3 {
  color: var(--text-color);
  font-size: 22px;
  font-weight: 700;
}

.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skills-list span {
  font-size: 14px;
  background: var(--first-color);
  color: var(--color-white);
  padding: 6px 14px;
  border-radius: 8px;
  transition: all 0.3s ease;
  cursor: default;
}

.skills-list span:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(64, 120, 242, 0.3);
}

/* Dark mode for skills */
[data-theme="dark"] .skills-box {
  background: linear-gradient(135deg, rgba(44, 49, 58, 0.95) 0%, rgba(33, 37, 43, 0.9) 100%);
  border-color: rgba(97, 175, 239, 0.15);
}

[data-theme="dark"] .skills-box:hover {
  border-color: var(--first-color);
  box-shadow: 0 12px 40px rgba(97, 175, 239, 0.2);
}

/* Mobile responsive for skills */
@media only screen and (max-width: 768px) {
  .skills-container {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 10px;
  }

  .skills-box {
    padding: 20px;
  }

  .skills-header h3 {
    font-size: 20px;
  }

  .skills-list span {
    font-size: 13px;
    padding: 5px 12px;
  }
}

/* ----- PROJECTS BOX ----- */
.project-filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 40px;
  padding: 0 15px;
}

.filter-btn {
  padding: 8px 20px;
  border: none;
  border-radius: 8px;
  background: var(--color-white);
  color: var(--text-color);
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 16px;
  box-shadow: 0 2px 5px var(--shadow-color);
}

.filter-btn.active {
  background: var(--first-color);
  color: var(--color-white);
}

.filter-btn:hover {
  background: var(--first-color-hover);
  color: var(--color-white);
}

.project-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
  padding: 20px;
  width: 100%;
  margin: 0 auto;
  min-height: 400px;
  transition: min-height 0.3s ease;
}

.project-box {
  background: var(--color-white);
  border-radius: 15px;
  padding: 25px;
  box-shadow: 0 4px 15px var(--shadow-color);
  transition: all 0.3s ease;
  opacity: 1;
  transform: scale(1);
  height: auto;
  overflow: hidden;
  display: block;
}

.project-box:hover {
  transform: translateY(-5px);
}

.project-box h3 {
  color: var(--text-color);
  font-size: 20px;
  margin-bottom: 15px;
}

.project-box p {
  color: var(--text-color-second);
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 20px;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.project-tags span {
  background: var(--body-color);
  color: var(--text-color-second);
  padding: 4px 12px;
  border-radius: 15px;
  font-size: 14px;
}

.project-links {
  display: flex;
  gap: 15px;
  align-items: center;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--first-color);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-size: inherit;
}

.project-link:hover {
  color: var(--first-color-hover);
}

.project-link.demo-link {
  color: var(--third-color);
  /* Using the red accent color for demo links */
}

.project-link.demo-link:hover {
  color: var(--second-color);
  /* Using the orange/gold color on hover */
}

.project-link i {
  font-size: 18px;
}

/* Project Filtering Animation */
.project-box {
  opacity: 1;
  transform: scale(1);
  transition: all 0.3s ease;
  height: auto;
  overflow: hidden;
}

.project-box.hide {
  opacity: 0;
  transform: scale(0.8);
  height: 0;
  padding: 0;
  margin: 0;
  display: none;
}

/* Responsive Design */
@media only screen and (max-width: 768px) {
  .project-filters {
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 10px;
    margin-bottom: 20px;
  }

  .filter-btn {
    padding: 6px 12px;
    font-size: 14px;
  }

  .project-container {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 10px;
  }

  .project-box {
    width: 100%;
    margin: 0 auto;
  }

  /* 모바일에서 스크롤 다운 버튼 숨기기 */
  .scroll-btn {
    display: none;
  }

  /* 프로젝트 박스 내부 여백 조정 */
  .project-box {
    padding: 15px;
    margin-bottom: 20px;
  }

  /* 프로젝트 설명 텍스트 크기 조정 */
  .project-box h3 {
    font-size: 18px;
  }

  .project-box p {
    font-size: 14px;
  }
}

/* ----- CONTACT BOX ----- */
.contact-info {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px 30px;
  width: 100%;
  height: 315px;
  background: var(--second-color);
  border-radius: 10px;
  box-shadow: 1px 8px 10px 2px var(--first-shadow-color);
  overflow: hidden;
}

.contact-info > h2 {
  color: var(--color-white);
  margin-bottom: 20px;
}

.contact-info > p {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--color-white);
  margin-block: 5px;
}

.contact-info p > i {
  font-size: 18px;
}

.contact-info::after {
  background: var(--color-white);
}

.contact-info:hover.contact-info h2,
.contact-info:hover.contact-info p,
.contact-info:hover.contact-info i {
  color: #777;
  z-index: 2;
}

/* ----- CONTACT FORM ----- */
.form-control {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.form-inputs {
  display: flex;
  gap: 10px;
  width: 100%;
}

.input-field {
  width: 50%;
  height: 55px;
  background: transparent;
  border: 2px solid #aaa;
  border-radius: 10px;
  padding-inline: 20px;
  outline: none;
}

textarea {
  width: 100%;
  height: 250px;
  background: transparent;
  border: 2px solid #aaa;
  border-radius: 10px;
  padding: 15px 20px;
  outline: none;
  resize: none;
}

.form-button > .btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--second-color);
  color: var(--color-white);
}

.form-button > .btn:hover {
  background: #00b5e7;
}

.form-button i {
  font-size: 18px;
  rotate: -45deg;
}

/* ----- FOOTER BOX ----- */
footer {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  row-gap: 30px;
  background: #f8f8f8;
  padding-block: 40px 60px;
}

.top-footer p {
  font-size: 25px;
  font-weight: 600;
}

.middle-footer .footer-menu {
  display: flex;
}

.footer_menu_list {
  list-style: none;
}

.footer_menu_list a {
  text-decoration: none;
  color: var(--text-color-second);
  font-weight: 500;
  margin-inline: 20px;
}

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

.bottom-footer {
  font-size: 14px;
  margin-top: 10px;
}

/* ----- MEDIA QUERY == 1024px / RESPONSIVE ----- */
@media only screen and (max-width: 1024px) {
  .featured-text {
    padding: 0;
  }

  .image,
  .image img {
    width: 300px;
    height: 300px;
  }
}

/* ----- MEDIA QUERY == 900px / RESPONSIVE ----- */
@media only screen and (max-width: 900px) {
  .nav-right {
    gap: 10px;
  }

  .nav-button {
    display: none;
  }

  .nav-menu {
    position: fixed;
    top: 80px;
    left: -100%;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: var(--color-white);
    width: 100%;
    min-height: 450px;
    height: 90vh;
    transition: 0.3s;
    box-shadow: 0 2px 10px var(--first-shadow-color);
  }

  .nav_menu_list {
    flex-direction: column;
  }

  .nav-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .featured-box {
    flex-direction: column;
    justify-content: flex-start;
    height: auto;
    padding-top: 100px;
    min-height: 100vh;
    gap: 20px;
  }

  .featured-image {
    order: 1;
    justify-content: center;
    min-height: auto;
    width: 100%;
    margin-bottom: 30px;
  }

  .featured-text {
    order: 2;
    width: 100%;
    text-align: center;
    padding: 0 20px;
  }

  .image {
    width: 200px;
    height: 200px;
    margin: 0 auto;
  }

  .image img {
    width: 200px;
    height: 200px;
  }

  .featured-text-card span {
    font-size: 1rem;
  }

  .featured-name h1 {
    font-size: 2.5rem;
  }

  .featured-text-info {
    margin: 20px 0;
  }

  .featured-text-btn {
    justify-content: center;
  }

  .social_icons {
    justify-content: center;
    margin-top: 30px;
  }

  .row {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 50px;
  }

  .col {
    display: flex;
    justify-content: center;
    width: 100%;
  }

  .about-info,
  .contact-info {
    width: 100%;
  }

  .project-container {
    justify-content: center;
  }

  .project-box {
    width: 80%;
  }

  .featured-text-card span {
    font-size: 16px;
    padding: 10px 20px;
  }

  .featured-name p {
    font-size: 2rem;
  }

  .featured-text-info {
    font-size: 14px;
    margin-bottom: 20px;
  }

  .featured-text-btn {
    flex-wrap: wrap;
    gap: 10px;
  }

  .featured-text-btn .btn {
    width: 100%;
    text-align: center;
  }
}

/* ----- MEDIA QUERY == 540px / RESPONSIVE ----- */
@media only screen and (max-width: 540px) {
  .nav-logo .nav-name {
    font-size: 24px;
  }

  .featured-text-card {
    width: 100%;
    text-align: center;
  }

  .project-box {
    padding: 20px;
    height: auto;
    min-height: 200px;
  }

  .contact-info {
    padding: 20px;
    height: auto;
    min-height: 250px;
  }

  .contact-info p {
    font-size: 14px;
  }

  .skills-box {
    padding: 15px;
  }

  .skills-list span {
    font-size: 12px;
    padding: 2px 8px;
  }

  .timeline-content {
    padding: 15px;
  }

  .timeline-content h3 {
    font-size: 16px;
  }

  .timeline-content h4 {
    font-size: 14px;
  }

  .timeline-content p {
    font-size: 13px;
  }
}

/* ----- MEDIA QUERY == 400px / RESPONSIVE ----- */
@media only screen and (max-width: 400px) {
  .nav-logo .nav-name {
    font-size: 20px;
  }

  .featured-text-card span {
    font-size: 14px;
    padding: 8px 16px;
  }

  .featured-name p {
    font-size: 1.8rem;
  }

  .social_icons {
    gap: 20px;
  }

  .icon {
    width: 35px;
    height: 35px;
  }

  .footer_menu_list a {
    margin-inline: 10px;
    font-size: 14px;
  }
}

/* ----- EXPERIENCE SECTION ----- */
.experience-container {
  max-width: 1000px;
  margin: 0 auto;
}

.timeline {
  position: relative;
  padding: 40px 0;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 5px;
  height: 100%;
  background-color: var(--first-color);
}

.timeline-item {
  position: relative;
  margin-bottom: 40px;
}

.timeline-dot {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: var(--first-color);
  border: 4px solid var(--color-white);
}

.timeline-date {
  position: absolute;
  left: calc(50% + 40px);
  background-color: var(--first-color);
  color: var(--color-white);
  padding: 8px 16px;
  border-radius: 15px;
  font-size: 16px;
  font-weight: 500;
}

.timeline-content {
  position: relative;
  width: calc(50% - 40px);
  padding: 35px;
  background: var(--color-white);
  border-radius: 15px;
  box-shadow: 0 3px 8px var(--first-shadow-color);
}

.timeline-item:nth-child(odd) .timeline-content {
  left: 0;
}

.timeline-item:nth-child(even) .timeline-content {
  left: calc(50% + 40px);
}

.timeline-item:nth-child(even) .timeline-date {
  left: auto;
  right: calc(50% + 40px);
}

.timeline-content h3 {
  margin-bottom: 10px;
  font-size: 24px;
  color: var(--first-color);
}

.timeline-content h4 {
  margin-bottom: 15px;
  font-size: 18px;
  color: var(--text-color-second);
}

.timeline-content p {
  font-size: 16px;
  color: #777;
  line-height: 1.6;
}

/* Media Query for Timeline Responsive Design */
@media only screen and (max-width: 768px) {
  .timeline::before {
    left: 20px;
  }

  .timeline-dot {
    left: 20px;
  }

  .timeline-date {
    left: 60px;
    top: -30px;
  }

  .timeline-content {
    width: calc(100% - 60px);
    margin-left: 60px;
  }

  .timeline-item:nth-child(even) .timeline-content {
    left: 0;
  }

  .timeline-item:nth-child(even) .timeline-date {
    left: 60px;
    right: auto;
  }
}

/* ----- Theme Toggle Button ----- */
.theme-toggle {
  position: relative;
  top: 0;
  right: 0;
  background: var(--first-color);
  border: none;
  border-radius: 50%;
  width: 45px;
  height: 45px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.theme-toggle i {
  color: var(--color-white);
  font-size: 24px;
  transition: transform 0.3s ease;
}

.theme-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  background: var(--first-color-hover);
}

/* Rotate icon when in dark mode */
[data-theme="dark"] .theme-toggle i {
  transform: rotate(180deg);
}

/* ----- Remove cat widget section entirely ----- */
.cat-widget {
  display: none;
}

/* ----- PROJECT MODAL ----- */
.project-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1000;
}

.modal-content {
  position: relative;
  background: var(--body-color);
  width: 90%;
  max-width: 800px;
  margin: 50px auto;
  padding: 20px;
  border-radius: 15px;
}

.video-container {
  position: relative;
  padding-bottom: 56.25%;
  /* 16:9 Aspect Ratio */
  height: 0;
  overflow: hidden;
  margin-bottom: 20px;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ----- VIDEO TAG SUPPORT ----- */
.video-container video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.close-modal {
  position: absolute;
  right: 20px;
  top: 20px;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-color);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 30px;
  border-bottom: 1px solid var(--shadow-color);
}

.modal-header h2 {
  color: var(--text-color);
  font-size: 1.8rem;
}

.modal-body {
  padding: 30px;
}

.project-demo {
  position: relative;
  width: 100%;
  height: 400px;
  margin-bottom: 30px;
  border-radius: 15px;
  overflow: hidden;
}

.project-demo iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.demo-controls {
  position: absolute;
  bottom: 20px;
  right: 20px;
  display: flex;
  gap: 10px;
}

.demo-control-btn {
  padding: 8px 15px;
  background: var(--first-color);
  color: var(--color-white);
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.demo-control-btn:hover {
  background: var(--first-color-hover);
}

.project-description h3 {
  color: var(--text-color);
  margin-bottom: 15px;
}

.project-description p {
  color: var(--text-color-second);
  line-height: 1.6;
}

/* Make project boxes clickable */
.project-box {
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-box:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px var(--shadow-color);
}

/* Modal Responsive Design */
@media only screen and (max-width: 768px) {
  .modal-content {
    width: 95%;
    margin: 20px auto;
  }

  .modal-header h2 {
    font-size: 1.5rem;
  }

  .modal-body {
    padding: 20px;
  }
}

/* 모바일 반응형 수정 */
@media screen and (max-width: 768px) {
  .home {
    display: flex;
    flex-direction: column;
    padding: 100px 20px 50px;
    min-height: 100vh;
    overflow: hidden;
  }

  .featured-name h1 {
    font-size: 3rem;
    /* 모바일에서 글자 크기 축소 */
  }

  .home-img {
    order: -1;
    /* 이미지를 맨 위로 */
    width: 200px;
    height: 200px;
    margin: 0 auto 30px;
    position: relative;
  }

  .home-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
  }

  /* About 섹션과의 간격 조정 */
  #about {
    padding-top: 50px;
    margin-top: 50px;
  }

  /* 컨텐츠 겹침 방지를 위한 추가 여백 */
  .section {
    padding: 60px 20px;
    margin: 0;
    overflow: visible;
  }

  /* 텍스트와 이미지 간격 조정 */
  .home-content {
    width: 100%;
    text-align: center;
    padding: 0;
  }

  .header-text {
    padding-top: 130px;
    margin-top: 20px;
    text-align: center;
  }

  .header-text h1 {
    font-size: 2rem;
    line-height: 1.3;
    margin-bottom: 10px;
  }

  /* 프로젝트 섹션 */
  .portfolio-items {
    display: flex;
    flex-direction: column;
    gap: 30px;
    padding: 20px 0;
  }

  .portfolio-item {
    width: 100%;
    margin-bottom: 20px;
  }
}

/* 더 작은 화면에 대한 추가 조정 */
@media screen and (max-width: 480px) {
  .home {
    padding: 80px 15px 30px;
  }

  .home-img {
    width: 150px;
    height: 150px;
  }

  .header-text h1 {
    font-size: 1.8rem;
  }

  .portfolio-items {
    padding: 10px 0;
  }
}

/* 태블릿과 모바일을 위한 반응형 디자인 */
@media screen and (max-width: 1024px) {
  .container {
    padding: 0 15px;
  }

  .section {
    padding: 60px 0;
  }
}

@media screen and (max-width: 768px) {
  /* 기본 레이아웃 조정 */
  .container {
    padding: 0 10px;
  }

  /* 헤더 영역 */
  .header-text {
    padding-top: 130px;
    margin-top: 20px;
  }

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

  .featured-name h1 {
    font-size: 2.5rem;
    line-height: 1.2;
    margin: 15px 0;
  }

  /* 홈 섹션 */
  .home {
    flex-direction: column;
    height: auto;
    padding-top: 80px;
  }

  .home-content {
    width: 100%;
    order: 2;
    text-align: center;
    padding: 20px 0;
  }

  .home-img {
    width: 100%;
    order: 1;
    margin: 20px auto;
    max-width: 280px;
  }

  .home-img img {
    width: 100%;
    height: auto;
  }

  /* About 섹션 */
  .about-content {
    flex-direction: column;
    gap: 30px;
  }

  .about-img {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
  }

  .about-text {
    width: 100%;
    text-align: center;
  }

  /* 스킬 섹션 */
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }

  /* 프로젝트 섹션 */
  .portfolio-items {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 1rem 0;
    min-height: 400px;
    /* 최소 높이 설정 */
  }

  /* 연락처 섹션 */
  .contact-info {
    flex-direction: column;
    gap: 20px;
  }

  /* 네비게이션 */
  .nav-button {
    display: none;
  }

  .nav-menu {
    position: fixed;
    top: 80px;
    left: -100%;
    width: 100%;
    padding: 20px;
    background: var(--body-color);
    transition: 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }

  .nav-menu.active {
    left: 0;
  }

  .nav-list {
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }

  .filter-btns {
    display: none;
    /* 모바일에서 필터 버튼 숨김 */
  }

  .portfolio-items {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 0 10px;
  }

  .portfolio-item {
    opacity: 1;
    transform: none;
    transition: all 0.3s ease;
    width: 100%;
    margin: 0;
    display: block !important;
    /* 모든 항목 강제 표시 */
  }

  /* 필터 관련 클래스 무시 */
  .portfolio-item.hide,
  .portfolio-item.show {
    display: block !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* 프로젝트 필터 모바일 최적화 */
@media screen and (max-width: 768px) {
  .filter-btns {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 2rem;
    padding: 0 10px;
  }

  .filter-btn {
    padding: 8px 15px;
    font-size: 0.9rem;
    white-space: nowrap;
    width: auto;
    min-width: 80px;
    text-align: center;
  }

  .portfolio-items {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 0 10px;
  }

  .portfolio-item {
    opacity: 1;
    transform: none;
    transition: all 0.3s ease;
    width: 100%;
    margin: 0;
  }

  .portfolio-item.hide {
    display: none;
  }

  .portfolio-item.show {
    display: block;
    animation: fadeIn 0.5s ease;
  }
}

/* 애니메이션 정의 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 더 작은 모바일 화면 */
@media screen and (max-width: 480px) {
  /* 헤더 텍스트 */
  .header-text h1 {
    font-size: 1.8rem;
  }

  .featured-name h1 {
    font-size: 2.2rem;
  }

  /* 스킬 섹션 */
  .skills-grid {
    grid-template-columns: 1fr;
  }

  /* 푸터 */
  .footer-menu {
    flex-direction: column;
    gap: 15px;
  }

  /* 섹션 간격 */
  .section {
    padding: 40px 0;
  }

  /* 마진과 패딩 조정 */
  .container {
    padding: 0 8px;
  }

  .portfolio-items {
    gap: 1.5rem;
    min-height: 300px;
  }

  .portfolio-item {
    min-height: 200px;
  }

  .filter-btn {
    padding: 6px 12px;
    font-size: 0.8rem;
  }
}

/* 높이 기반 반응형 */
@media screen and (max-height: 700px) {
  .home {
    height: auto;
    min-height: 100vh;
  }
}

/* 프로젝트 섹션 모바일 최적화 */
@media screen and (max-width: 768px) {
  /* 프로젝트 컨테이너 */
  .portfolio-items {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 1rem 0;
    min-height: 400px;
    /* 최소 높이 설정 */
  }

  /* 프로젝트 아이템 */
  .portfolio-item {
    width: 100%;
    height: auto;
    min-height: 250px;
    margin: 0;
    opacity: 1;
    transform: translateY(0);
    transition: all 0.3s ease;
  }

  /* 필터 버튼 컨테이너 */
  .portfolio-filter {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 2rem;
    padding: 0 15px;
  }

  /* 필터 버튼 */
  .filter-btn {
    padding: 8px 15px;
    font-size: 0.9rem;
  }

  /* 숨겨진 아이템 처리 */
  .portfolio-item.hide {
    display: none;
    height: 0;
    padding: 0;
    margin: 0;
    opacity: 0;
  }

  /* 보여지는 아이템 처리 */
  .portfolio-item.show {
    display: block;
    height: auto;
    opacity: 1;
  }

  /* 프로젝트 섹션 전체 */
  .portfolio.section {
    min-height: 100vh;
    padding-bottom: 4rem;
  }
}

/* 더 작은 화면 최적화 */
@media screen and (max-width: 480px) {
  .portfolio-items {
    gap: 1.5rem;
    min-height: 300px;
  }

  .portfolio-item {
    min-height: 200px;
  }

  .filter-btn {
    padding: 6px 12px;
    font-size: 0.8rem;
  }
}

/* 프로젝트 필터 스타일 수정 */
@media screen and (max-width: 768px) {
  .filter-btns {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 2rem;
    padding: 0 10px;
  }

  .filter-btn {
    padding: 8px 15px;
    font-size: 0.9rem;
    white-space: nowrap;
    width: auto;
    min-width: 80px;
    text-align: center;
  }

  .portfolio-items {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 0 10px;
  }

  .portfolio-item {
    opacity: 1;
    transform: none;
    transition: all 0.3s ease;
    width: 100%;
    margin: 0;
  }

  .portfolio-item.hide {
    display: none;
  }

  .portfolio-item.show {
    display: block;
    animation: fadeIn 0.5s ease;
  }
}

/* 애니메이션 정의 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 더 작은 화면에 대한 추가 조정 */
@media screen and (max-width: 480px) {
  .filter-btns {
    gap: 8px;
    padding: 8px 3px;
  }

  .filter-btn {
    padding: 6px 12px;
    font-size: 0.8rem;
  }
}

/* 데스크톱 스타일 */
.portfolio-filter {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 30px;
}

.portfolio-filter button {
  padding: 8px 15px;
  border: none;
  border-radius: 5px;
  background: var(--hover-color);
  color: var(--text-color);
  cursor: pointer;
  transition: all 0.3s;
}

.portfolio-filter button.active {
  background: var(--primary-color);
  color: white;
}

/* 모바일에서 필터 숨기기 */
@media screen and (max-width: 768px) {
  .portfolio-filter {
    display: none !important;
    /* 모바일에서 강제로 숨김 */
  }

  .portfolio-items {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .portfolio-item {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    position: relative !important;
  }
}

/* 모바일에서 프로젝트 섹션 스크롤 트리거 범위 조정 */
@media screen and (max-width: 768px) {
  .portfolio {
    margin-top: -200px;
    /* 상단 여백 더 늘림 */
    padding-top: 100px;
    /* 상단 패딩 늘림 */
    padding-bottom: 100px;
    /* 하단 패딩 추가 */
  }

  .portfolio .container {
    margin-top: 50px;
    /* 컨테이너 상단 여백 추가 */
    margin-bottom: 50px;
    /* 컨테이너 하단 여백 추가 */
  }

  .portfolio-items {
    margin-top: 50px;
    /* 아이템 상단 여백 늘림 */
    margin-bottom: 50px;
    /* 아이템 하단 여백 추가 */
  }

  /* 스크롤 트리거 영역 더 확장 */
  .portfolio.section {
    min-height: 100vh;
    /* 최소 높이를 뷰포트 높이로 설정 */
    padding: 100px 0;
    /* 상하 패딩 늘림 */
  }
}

@media screen and (max-width: 768px) {
  /* 모바일에서 필터 버튼 기본 숨김 */
  .portfolio-filter button {
    display: none !important;
  }

  /* ALL 버튼만 표시 */
  .portfolio-filter button[data-filter="all"] {
    display: inline-block !important;
    pointer-events: none !important;
    /* 클릭 비활성화 */
    background: var(--primary-color) !important;
    /* 활성 상태 스타일 */
    color: white !important;
  }

  /* 필터 컨테이너 정렬 */
  .portfolio-filter {
    display: flex !important;
    justify-content: center;
    margin-bottom: 20px;
  }
}

/* 스크롤 애니메이션 기본 설정 */
.reveal {
  position: relative;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
  will-change: transform, opacity;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
  transition: all 0.3s ease;
}

@media screen and (max-width: 768px) {
  .reveal {
    opacity: 0;
    transform: translateY(15px);
    transition: all 0.2s ease;
  }

  .reveal.active {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.2s ease;
  }

  /* 프로젝트 아이템 특별 처리 */
  .portfolio-item {
    opacity: 0;
    transform: translateY(15px);
    transition: all 0.2s ease;
    will-change: transform, opacity;
  }

  .portfolio-item.active {
    opacity: 1;
    transform: translateY(0);
  }

  /* 스크롤 성능 최적화 */
  .portfolio-items {
    will-change: transform;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
  }
}

/* 포트폴리오 아이템 기본 스타일 */
.portfolio-item {
  opacity: 0;
  /* ScrollReveal이 처리할 초기 상태 */
  transform: translateY(0);
  transition: all 0.3s ease;
  will-change: transform, opacity;
  /* 성능 최적화 */
}

/* 활성화된 포트폴리오 아이템 */
.portfolio-item.visible {
  opacity: 1;
  transform: translateY(0);
}

/* 모바일 최적화 */
@media screen and (max-width: 768px) {
  .portfolio-items {
    gap: 20px;
  }

  .portfolio-item {
    transition: all 0.2s ease;
    /* 모바일에서 더 빠른 애니메이션 */
  }

  /* 모바일에서의 ScrollReveal 애니메이션 최적화 */
  .portfolio-item[data-sr-complete] {
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  /* 성능 최적화를 위한 추가 속성 */
  .portfolio-items {
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    perspective: 1000px;
    transform-style: preserve-3d;
  }
}

/* ScrollReveal 애니메이션 부드럽게 */
.sr-only {
  visibility: hidden !important;
  opacity: 0 !important;
}

/* 필터링 애니메이션 */
.portfolio-item {
  transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
}

/* 호버 효과 최적화 */
.portfolio-item:hover {
  transform: translateY(-5px);
  transition: transform 0.3s ease;
}

/* 태블릿과 작은 노트북 화면 대응 */
@media screen and (max-width: 1024px) {
  .header-text {
    padding-top: 160px;
    /* 더 큰 패딩 */
    margin-top: 20px;
  }

  .home {
    min-height: 100vh;
    padding-top: 100px;
  }

  .container {
    padding: 0 20px;
  }
}

/* 아이패드/태블릿 전용 */
@media screen and (max-width: 820px) {
  .header-text {
    padding-top: 140px;
    /* 패딩 조정 */
  }

  .header-text h1 {
    font-size: 2.5rem;
  }

  .header-text .name {
    font-size: 3.5rem;
  }
}

/* 모바일 대응 */
@media screen and (max-width: 768px) {
  .header-text {
    padding-top: 130px;
    text-align: center;
  }

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

  .header-text .name {
    font-size: 3rem;
  }
}

/* 작은 모바일 화면 */
@media screen and (max-width: 480px) {
  .header-text {
    padding-top: 120px;
    margin-top: 15px;
  }
}

/* 추가 안전 장치 */
.nav-bar {
  z-index: 100;
  /* 네비게이션 바가 항상 위에 오도록 */
}

.home {
  position: relative;
  z-index: 1;
}

/* 기본 헤더 텍스트 스타일 */
.header-text {
  padding-top: 150px;
  /* 기본 상단 여백 증가 */
  margin-top: 30px;
  /* 추가 여백 */
}

/* 큰 화면 (데스크톱) */
@media screen and (min-width: 1367px) {
  .header-text {
    padding-top: 160px;
  }
}

/* 13인치 노트북 화면 */
@media screen and (min-width: 1024px) and (max-width: 1366px) {
  .header-text {
    padding-top: 180px;
    /* 더 큰 여백 */
    margin-top: 40px;
  }

  .home {
    min-height: 100vh;
    padding-top: 80px;
  }
}

/* 태블릿과 작은 노트북 */
@media screen and (max-width: 1024px) {
  .header-text {
    padding-top: 160px;
    /* 여백 증가 */
    margin-top: 20px;
  }

  .home {
    min-height: 100vh;
    padding-top: 100px;
  }
}

/* 아이패드/태블릿 */
@media screen and (max-width: 820px) {
  .header-text {
    padding-top: 140px;
    margin-top: 30px;
  }

  .header-text h1 {
    font-size: 2.5rem;
  }

  .header-text .name {
    font-size: 3.5rem;
  }
}

/* 모바일 */
@media screen and (max-width: 768px) {
  .header-text {
    padding-top: 130px;
    margin-top: 20px;
    text-align: center;
  }

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

  .header-text .name {
    font-size: 3rem;
  }
}

/* 작은 모바일 화면 */
@media screen and (max-width: 480px) {
  .header-text {
    padding-top: 120px;
    margin-top: 15px;
  }
}
/* ----- GAME MODAL STYLES (Website Theme) ----- */
.game-modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(5px);
}

.game-modal-content {
  position: relative;
  background: var(--color-white);
  margin: 5% auto;
  padding: 35px;
  border-radius: 15px;
  width: 90%;
  max-width: 520px;
  box-shadow: 0 10px 40px var(--first-shadow-color);
  animation: modalFadeIn 0.3s ease-out;
}

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

.game-modal-content h2 {
  font-family: "Poppins", sans-serif;
  color: var(--first-color);
  text-align: center;
  margin-bottom: 10px;
  font-size: 1.8rem;
  font-weight: 600;
}

.game-modal-content p {
  font-family: "Poppins", sans-serif;
  text-align: center;
  color: var(--text-color-second);
  margin-bottom: 20px;
  font-size: 0.9rem;
  line-height: 1.6;
}

.game-info {
  display: flex;
  justify-content: space-around;
  margin-bottom: 20px;
  padding: 15px;
  background: var(--body-color);
  border-radius: 10px;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.1);
}

.game-info span {
  font-family: "Poppins", sans-serif;
  color: var(--text-color);
  font-size: 0.95rem;
  font-weight: 500;
}

.game-info span span {
  color: var(--first-color);
  font-size: 1.2rem;
  font-weight: 600;
  margin-left: 8px;
}

.game-close {
  position: absolute;
  top: 15px;
  right: 20px;
  color: var(--text-color-second);
  font-size: 28px;
  font-weight: bold;
  line-height: 1;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10;
}

.game-close:hover,
.game-close:focus {
  color: var(--third-color);
  transform: rotate(90deg);
}

#gameCanvas {
  display: block;
  margin: 0 auto 20px;
  border: 3px solid var(--first-color);
  border-radius: 8px;
  background: #000000;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.game-btn {
  font-family: "Poppins", sans-serif;
  display: block;
  margin: 0 auto;
  padding: 12px 30px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  background: var(--first-color);
  color: var(--color-white);
  border: none;
  border-radius: 10px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.game-btn:hover {
  background: var(--first-color-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.game-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Mobile responsiveness */
@media screen and (max-width: 768px) {
  .game-modal-content {
    width: 95%;
    padding: 25px 20px;
    margin: 10% auto;
  }

  .game-modal-content h2 {
    font-size: 1.4rem;
    margin-bottom: 8px;
  }

  .game-modal-content p {
    font-size: 0.8rem;
    margin-bottom: 15px;
  }

  #gameCanvas {
    width: 100%;
    height: auto;
    max-width: 400px;
  }

  .game-info {
    flex-direction: column;
    gap: 10px;
    text-align: center;
    padding: 12px;
  }

  .game-info span {
    font-size: 0.85rem;
  }

  .game-info span span {
    font-size: 1.1rem;
  }

  .game-btn {
    font-size: 0.9rem;
    padding: 10px 25px;
  }

  .game-close {
    font-size: 24px;
    top: 12px;
    right: 15px;
  }
}
