/* ================================
  Base Styles
==================================*/
body {
  font-family: "Poppins", sans-serif;
  background-color: #000000;
  color: #e2e8f0;
  will-change: scroll-position;
  overflow-x: hidden;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

/* ================================
  Scroll Progress Bar
==================================*/
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  background: #ce1840;
  z-index: 9999;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.1s ease;
}

/* ================================
  Navigation Links
==================================*/
.nav-link {
  position: relative;
  display: inline-block;
  padding-bottom: 3px;
  transition: color 0.3s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  width: 0%;
  height: 2px;
  left: 0;
  bottom: 0;
  background-color: #ce1840;
  transition: width 0.3s ease;
}

.nav-link:hover {
  color: #ce1840;
}

.nav-link:hover::after {
  width: 100%;
}

/* ================================
  Hero Typed Text
==================================*/
#typed {
  color: #ce1840;
}

/* ================================
  Fade-In Animation
==================================*/
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ================================
  Project Button
==================================*/
#pro {
  border: 1px solid #ce1840;
  text-decoration: none;
}

#pro:hover {
  background-color: #ce1840;
}

/* ================================
  Tab Buttons
==================================*/
.tab-btn {
  position: relative;
  padding-bottom: 4px;
  transition: all 0.3s ease;
}

.tab-btn::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0;
  background-color: #ce1840;
  transition: width 0.3s ease;
}

.tab-btn:hover::after {
  width: 100%;
}

/* ================================
  Skills Section Marquee
==================================*/
.skills-wrapper {
  overflow: hidden;
  padding: 20px 0;
}

.skills-marquee {
  display: flex;
  flex-wrap: nowrap;
  animation: scrollSkills 22s linear infinite;
  will-change: transform;
}

.skill-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin: 0 40px;
  transition: transform 0.3s ease;
  position: relative;
}

.skill-icon {
  font-size: 4rem;
  transition: transform 0.3s ease;
  cursor: pointer;
}

.skill-item:hover .skill-icon {
  transform: translateY(-8px) scale(1.1);
}

.skill-label {
  opacity: 0;
  transform: translateY(8px);
  font-size: 1rem;
  color: white;
  transition: opacity 0.3s ease, transform 0.3s ease;
  margin-top: 0.5rem;
}

.skill-item:hover .skill-label {
  opacity: 1;
  transform: translateY(0);
}

@keyframes scrollSkills {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ================================
  Project Cards
==================================*/
.project-card {
  position: relative;
  overflow: hidden;
  border-radius: 0.75rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  will-change: transform;
}

.project-card img {
  width: 100%;
  height: 18rem;
  object-fit: cover;
  transition: transform 0.3s ease;
  transform: translate3d(0, 0, 0);
}

.project-card:hover img {
  transform: translate3d(0, 0, 0) scale(1.05);
}

.project-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(206, 24, 64, 0.9), rgba(0, 0, 0, 0.8));
  opacity: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: #fff;
  transition: opacity 0.3s ease;
  will-change: opacity;
}

.project-card:hover .project-overlay {
  opacity: 1;
}

.project-card:active .project-overlay,
.project-card.active .project-overlay {
  opacity: 1;
}

/* ================================
  Mobile Menu Animation
==================================*/
#mobile-menu {
  opacity: 0;
  transform: translateX(100%) scale(0.95);
  transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

#mobile-menu.open {
  transform: translateX(0) scale(1);
  opacity: 1;
}

/* ================================
  Responsive Media Queries
==================================*/

/* Mobile Phones (up to 600px) */
@media screen and (max-width: 600px) {
  #hero {
    background-attachment: scroll;
    background-position: center;
  }

  nav ul {
    flex-direction: column;
    gap: 10px;
  }

  .project-card img {
    height: 12rem;
  }

  .skills-marquee {
    animation: scrollSkills 20s linear infinite;
  }

  .skill-item {
    margin: 0 30px;
  }

  .skill-icon {
    font-size: 3rem;
  }

  .skill-label {
    font-size: 0.9rem;
  }
}

/* Tablets (601px - 992px) */
@media screen and (min-width: 601px) and (max-width: 992px) {
  #hero {
    background-attachment: scroll;
  }

  .skills-marquee {
    animation: scrollSkills 22s linear infinite;
  }

  .project-card img {
    height: 14rem;
  }

  .skill-item {
    margin: 0 40px;
  }

  .skill-icon {
    font-size: 3.5rem;
  }
}

/* Desktops (993px and above) */
@media screen and (min-width: 993px) {
  .skills-marquee {
    animation: scrollSkills 18s linear infinite;
  }

  .project-card img {
    height: 18rem;
  }
}