:root {
  --primary-color: #7c2ae8;
  --secondary-color: #9d4edd;
  --bg-dark: #0a1628;
  --bg-darker: #050f1f;
  --text-light: #e0e0e0;
  --text-lighter: #b0b0b0;
  --border-color: #1a3a52;
  --success-color: #00ff88;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 110px;
}

body {
  background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-darker) 100%);
  color: var(--text-light);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ===== SCROLL PROGRESS BAR ===== */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, #7c2ae8, #c77dff, #7c2ae8);
  background-size: 200% 100%;
  animation: progressShimmer 2s linear infinite;
  z-index: 9999;
  border-radius: 0 2px 2px 0;
  transition: width 0.1s linear;
  box-shadow:
    0 0 10px rgba(124, 42, 232, 0.8),
    0 0 20px rgba(199, 125, 255, 0.4);
}

@keyframes progressShimmer {
  0% {
    background-position: 0% 0%;
  }
  100% {
    background-position: 200% 0%;
  }
}

/* ===== NAVIGATION ===== */
.navbar {
  background: rgba(5, 2, 15, 0.75) !important;
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border-bottom: 1px solid rgba(124, 42, 232, 0.18);
  box-shadow:
    0 1px 0 0 rgba(124, 42, 232, 0.12),
    0 8px 40px rgba(0, 0, 0, 0.35);
  padding: 0;
  transition:
    box-shadow 0.4s ease,
    background 0.4s ease;
  /* Rainbow top trim */
  border-top: 2.5px solid transparent;
  border-image: linear-gradient(
      90deg,
      #7c2ae8 0%,
      #c77dff 40%,
      #00d4ff 70%,
      #7c2ae8 100%
    )
    1;
}

.navbar.scrolled {
  background: rgba(3, 1, 10, 0.92) !important;
  box-shadow:
    0 1px 0 0 rgba(124, 42, 232, 0.25),
    0 16px 60px rgba(0, 0, 0, 0.55),
    0 0 80px rgba(124, 42, 232, 0.06);
}

/* Inner wrapper to give vertical padding */
.navbar > .container-fluid {
  padding-top: 0.7rem;
  padding-bottom: 0.7rem;
}

.navbar-toggler {
  border: 2px solid rgba(168, 85, 247, 0.6);
  border-radius: 10px;
  transition: all 0.3s ease;
  background: rgba(124, 42, 232, 0.15);
  padding: 0.4rem 0.6rem;
  width: 44px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.navbar-toggler:hover,
.navbar-toggler:focus {
  background: rgba(124, 42, 232, 0.3);
  box-shadow: 0 0 14px rgba(124, 42, 232, 0.4);
  outline: none;
}

/* Custom visible hamburger lines */
.navbar-toggler-icon {
  background-image: none !important;
  width: 22px;
  height: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}

.navbar-toggler-icon::before,
.navbar-toggler-icon::after,
.navbar-toggler-icon {
  /* We'll use the ::before/::after trick */
}

/* Override Bootstrap — custom hamburger drawn with box-shadow */
.navbar-toggler .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath stroke='rgba(199,125,255,1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2.5' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E") !important;
  filter: none;
  width: 24px;
  height: 20px;
}

/* ===== LOGO ===== */
.navbar-brand {
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: -1.5px;
  position: relative;
  text-decoration: none;
  transition: transform 0.3s ease;
}

.navbar-brand:hover {
  transform: scale(1.04);
}

.navbar-brand .port {
  color: var(--text-light);
  position: relative;
}

.navbar-brand .folio {
  background: linear-gradient(135deg, #a855f7, #7c2ae8, #c77dff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
}

/* Subtle logo shimmer on hover */
.navbar-brand:hover .folio {
  background: linear-gradient(135deg, #c77dff, #a855f7, #7c2ae8, #c77dff);
  background-size: 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: logoShimmer 1.2s ease forwards;
}

@keyframes logoShimmer {
  0% {
    background-position: 100% 0%;
  }
  100% {
    background-position: 0% 0%;
  }
}

/* ===== NAV LINKS ===== */
.nav-items {
  display: flex;
  gap: 0.4rem;
  margin-left: auto;
  align-items: center;
}

.nav-link {
  color: rgba(200, 200, 220, 0.75) !important;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 1rem;
  border-radius: 10px;
  border: 1px solid transparent;
  transition:
    color 0.25s ease,
    background 0.25s ease,
    border-color 0.25s ease;
  font-weight: 500;
  font-size: 0.9rem;
  position: relative;
  overflow: hidden;
  letter-spacing: 0.01em;
}

/* Animated underline */
.nav-link::after {
  content: "";
  position: absolute;
  bottom: 4px;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #7c2ae8, #c77dff);
  border-radius: 2px;
  transform: translateX(-50%);
  transition: width 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: calc(100% - 2rem);
}

.nav-link:hover {
  color: #d8b4fe !important;
  background: rgba(124, 42, 232, 0.12);
  border-color: rgba(124, 42, 232, 0.2);
}

.nav-link.active {
  color: #e2c8ff !important;
  background: rgba(124, 42, 232, 0.18);
  border-color: rgba(124, 42, 232, 0.3);
  box-shadow: 0 0 18px rgba(124, 42, 232, 0.18) inset;
}

/* Active glow dot */
.nav-link.active::before {
  content: "";
  position: absolute;
  top: 7px;
  right: 8px;
  width: 5px;
  height: 5px;
  background: #a855f7;
  border-radius: 50%;
  box-shadow: 0 0 6px 2px rgba(168, 85, 247, 0.7);
  animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(0.7);
  }
}

.nav-link i {
  font-size: 0.9rem;
  opacity: 0.85;
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
}

.nav-link:hover i,
.nav-link.active i {
  opacity: 1;
  transform: translateY(-1px);
}

@media (max-width: 991px) {
  /* Make sure collapsed menu looks great */
  .navbar-collapse {
    background: rgba(5, 2, 15, 0.97);
    border: 1px solid rgba(124, 42, 232, 0.2);
    border-radius: 14px;
    margin-top: 0.75rem;
    padding: 0.5rem 0.75rem 0.75rem;
    backdrop-filter: blur(20px);
  }

  .nav-items {
    flex-direction: column;
    gap: 0.3rem;
    margin-left: 0;
    padding: 0.25rem 0;
    width: 100%;
  }

  .nav-link {
    padding: 0.7rem 1rem;
    border-radius: 10px;
    border-color: rgba(124, 42, 232, 0.12);
    width: 100%;
    font-size: 0.95rem;
  }

  .nav-link::before {
    display: none;
  }

  .nav-link::after {
    display: none;
  }
}

/* ===== MAIN CONTENT ===== */
main {
  padding-top: 10px;
}

section {
  scroll-margin-top: 110px;
}

/* ===== HERO SECTION ===== */
.hero {
  min-height: calc(100vh - 100px);
  padding-top: 100px;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(
    circle,
    rgba(124, 42, 232, 0.15) 0%,
    transparent 70%
  );
  border-radius: 50%;
  top: -100px;
  right: -100px;
  z-index: 0;
}

.hero::after {
  content: "";
  position: absolute;
  width: 300px;
  height: 300px;
  background: radial-gradient(
    circle,
    rgba(157, 78, 221, 0.1) 0%,
    transparent 70%
  );
  border-radius: 50%;
  bottom: -100px;
  left: -100px;
  z-index: 0;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero-content {
  display: flex;
  flex-direction: row;
  gap: 4rem;
  align-items: center;
  margin-bottom: 4rem;
}

.hero-text {
  flex: 1;
  min-width: 0;
}

.hero-text .greeting {
  font-size: 1.2rem;
  color: var(--text-lighter);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  animation: fadeIn 0.8s ease 0.2s backwards;
}

.hero-text .name {
  font-size: 4rem;
  font-weight: 800;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--text-light), var(--primary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fadeInUp 0.8s ease 0.4s backwards;
}

.role-badge {
  display: inline-block;
  background: var(--primary-color);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  font-weight: 600;
  margin-bottom: 1.5rem;
  animation: badgeReveal 6s ease-in-out infinite;
  transform-origin: left center;
  max-width: 100%;
  word-wrap: break-word;
}

.hero-text .bio {
  font-size: 1.1rem;
  color: var(--text-lighter);
  line-height: 1.8;
  margin-bottom: 2rem;
  max-width: 500px;
  animation: fadeInUp 0.8s ease 0.8s backwards;
}

.hero-buttons {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 2rem;
  animation: fadeInUp 0.8s ease 1s backwards;
}

.btn-primary-custom {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 0.75rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
}

.btn-primary-custom:hover {
  background: var(--secondary-color);
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(124, 42, 232, 0.3);
}

.btn-secondary-custom {
  background: transparent;
  border: 2px solid var(--primary-color);
  color: var(--text-light);
  padding: 0.6rem 1.8rem;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-secondary-custom:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-3px);
}

.social-icons {
  display: flex;
  gap: 1.5rem;
  animation: fadeInUp 0.8s ease 1.2s backwards;
}

.social-icon {
  width: 50px;
  height: 50px;
  border: 2px solid var(--primary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 1.2rem;
}

.social-icon:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-5px) scale(1.1);
}

.hero-image {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  animation: fadeInUp 0.8s ease 0.6s backwards;
}

.profile-img {
  width: 100%;
  max-width: 400px;
  border-radius: 30px;
  border: 3px solid var(--primary-color);
  box-shadow:
    0 0 30px rgba(124, 42, 232, 0.3),
    0 0 60px rgba(124, 42, 232, 0.15);
  transition: all 0.3s ease;
}

.profile-img:hover {
  transform: scale(1.05);
}

/* ===== SCROLL INDICATOR (fixed floating widget) ===== */
.scroll-indicator {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 500;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  /* Smooth fade out on scroll */
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
  opacity: 1;
  pointer-events: none;
  user-select: none;
}

.scroll-indicator.hidden {
  opacity: 0;
  transform: translateX(-50%) translateY(16px);
}

/* "Scroll to explore" label */
.scroll-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(199, 125, 255, 0.7);
  animation: scrollLabelPulse 3s ease-in-out infinite;
}

@keyframes scrollLabelPulse {
  0%,
  100% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
}

/* Mouse body */
.scroll-mouse {
  width: 26px;
  height: 42px;
  border: 2px solid rgba(168, 85, 247, 0.7);
  border-radius: 13px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 6px;
  position: relative;
  box-shadow:
    0 0 12px rgba(124, 42, 232, 0.35),
    inset 0 0 8px rgba(124, 42, 232, 0.1);
  animation: mousePulse 3s ease-in-out infinite;
}

@keyframes mousePulse {
  0%,
  100% {
    box-shadow:
      0 0 12px rgba(124, 42, 232, 0.35),
      inset 0 0 8px rgba(124, 42, 232, 0.1);
  }
  50% {
    box-shadow:
      0 0 22px rgba(168, 85, 247, 0.6),
      inset 0 0 14px rgba(168, 85, 247, 0.2);
  }
}

/* Animated dot inside mouse */
.scroll-dot {
  width: 4px;
  height: 8px;
  background: linear-gradient(180deg, #c77dff, #7c2ae8);
  border-radius: 2px;
  animation: scrollDotBounce 1.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes scrollDotBounce {
  0% {
    transform: translateY(0);
    opacity: 1;
  }
  40% {
    transform: translateY(12px);
    opacity: 0.4;
  }
  60% {
    transform: translateY(12px);
    opacity: 0.4;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Cascading double chevrons */
.scroll-chevrons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.scroll-chevrons i {
  font-size: 0.75rem;
  color: rgba(168, 85, 247, 0.9);
  animation: chevronCascade 1.8s ease-in-out infinite;
}

.scroll-chevrons i:nth-child(1) {
  animation-delay: 0s;
  opacity: 0.4;
}
.scroll-chevrons i:nth-child(2) {
  animation-delay: 0.2s;
  opacity: 0.8;
}

@keyframes chevronCascade {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.3;
  }
  50% {
    transform: translateY(4px);
    opacity: 1;
  }
}

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

@media (max-width: 768px) {
  /* Hero: text first, then image */
  .hero-content {
    flex-direction: column;
    gap: 2rem;
    text-align: center;
  }

  .hero {
    min-height: 100svh;
    padding-top: 90px;
    padding-bottom: 2rem;
  }

  .hero-image {
    width: 100%;
    display: flex;
    justify-content: center;
    order: 0; /* image on top */
    padding-top: 1.5rem;
  }

  .hero-text {
    width: 100%;
    order: 1; /* text below image */
  }

  .profile-img {
    max-width: 220px !important;
    width: 100%;
  }

  .hero-text .name {
    font-size: 2.2rem;
    line-height: 1.2;
  }

  .hero-text .greeting {
    font-size: 0.9rem;
  }

  .hero-text .bio {
    font-size: 0.95rem;
    max-width: 100%;
  }

  .role-badge {
    font-size: 0.85rem;
    padding: 0.55rem 1rem;
    display: block;
    width: 100%;
    text-align: center;
  }

  .hero-buttons {
    flex-direction: column;
    gap: 0.8rem;
  }

  .social-icons {
    justify-content: center;
  }

  .btn-primary-custom,
  .btn-secondary-custom {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  .scroll-indicator {
    bottom: 1.2rem;
  }

  .scroll-label {
    font-size: 0.62rem;
    letter-spacing: 0.15em;
  }

  .scroll-mouse {
    width: 20px;
    height: 32px;
    padding-top: 5px;
  }

  .scroll-chevrons i {
    font-size: 0.6rem;
  }
}

/* ===== SECTION TITLES ===== */
.section-title {
  text-align: center;
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 3rem;
  position: relative;
  display: inline-block;
  width: 100%;
}

.section-title span {
  color: var(--primary-color);
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 4px;
  background: var(--primary-color);
  border-radius: 2px;
}

/* ===== ABOUT SECTION ===== */
.about {
  padding: 6rem 0;
  position: relative;
}

.about::before {
  content: "";
  position: absolute;
  width: 300px;
  height: 300px;
  background: radial-gradient(
    circle,
    rgba(124, 42, 232, 0.1) 0%,
    transparent 70%
  );
  border-radius: 50%;
  top: 50%;
  right: -150px;
  z-index: 0;
}

.about .container {
  position: relative;
  z-index: 1;
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.about-text p {
  font-size: 1.05rem;
  color: var(--text-lighter);
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

.about-details {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.detail-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 15px;
  padding: 2rem;
  transition: all 0.3s ease;
}

.detail-card:hover {
  background: rgba(124, 42, 232, 0.1);
  border-color: var(--primary-color);
  transform: translateY(-5px);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.card-header i {
  font-size: 1.8rem;
  color: var(--primary-color);
}

.card-header h3 {
  font-size: 1.3rem;
  margin: 0;
}

.skills-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.skill-tag {
  background: rgba(124, 42, 232, 0.2);
  border: 1px solid var(--primary-color);
  color: var(--text-light);
  padding: 0.5rem 1rem;
  border-radius: 25px;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.skill-tag:hover {
  background: var(--primary-color);
  color: white;
}

.education-timeline {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.edu-item {
  padding-left: 2rem;
  border-left: 2px solid var(--primary-color);
  position: relative;
}

.edu-item::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 5px;
  width: 10px;
  height: 10px;
  background: var(--primary-color);
  border-radius: 50%;
}

.edu-item .year {
  color: var(--primary-color);
  font-weight: 600;
}

.edu-item .degree {
  font-weight: 600;
  margin: 0.5rem 0;
}

.edu-item .school {
  color: var(--text-lighter);
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .about-content {
    grid-template-columns: 1fr;
  }

  .section-title {
    font-size: 2rem;
  }
}

/* ===== SKILLS SECTION ===== */
.skills {
  padding: 6rem 0;
  background: rgba(255, 255, 255, 0.02);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.skill-category {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  border-radius: 15px;
  padding: 2rem;
  transition: all 0.3s ease;
}

.skill-category:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(124, 42, 232, 0.2);
}

.category-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  color: white;
}

.category-header i {
  font-size: 2rem;
  background: rgba(255, 255, 255, 0.2);
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.category-header h3 {
  margin: 0;
  font-size: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.category-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.skill {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.skill:hover {
  background: rgba(255, 255, 255, 0.4);
  transform: scale(1.05);
}

/* ===== PROJECTS SECTION ===== */
.projects {
  padding: 6rem 0;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
}

.project-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 15px;
  padding: 2rem;
  transition: all 0.3s ease;
}

.project-card:hover {
  background: rgba(124, 42, 232, 0.1);
  border-color: var(--primary-color);
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(124, 42, 232, 0.2);
}

.project-card h3 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: var(--text-light);
}

.project-description {
  color: var(--text-lighter);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
}

.tag {
  background: rgba(124, 42, 232, 0.2);
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
  padding: 0.4rem 0.8rem;
  border-radius: 15px;
  font-size: 0.85rem;
  transition: all 0.3s ease;
}

.tag:hover {
  background: var(--primary-color);
  color: white;
}

.btn-code {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 0.7rem 1.5rem;
  border-radius: 25px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-code:hover {
  background: var(--secondary-color);
  transform: translateY(-3px);
}

@media (max-width: 768px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== EXPERIENCE & ACHIEVEMENTS SECTION ===== */
.experience {
  padding: 6rem 0;
  background: rgba(255, 255, 255, 0.02);
}

.timeline {
  position: relative;
  padding: 2rem 0;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 20px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--primary-color);
}

.timeline-item {
  position: relative;
  margin-left: 100px;
  margin-bottom: 3rem;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  transition: all 0.3s ease;
}

.timeline-item:hover {
  background: rgba(124, 42, 232, 0.1);
  border-color: var(--primary-color);
  transform: translateX(10px);
}

.timeline-icon {
  position: absolute;
  left: -55px;
  top: 20px;
  width: 50px;
  height: 50px;
  background: var(--primary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.3rem;
  transition: all 0.3s ease;
}

.timeline-item:hover .timeline-icon {
  transform: scale(1.1);
  box-shadow: 0 0 20px rgba(124, 42, 232, 0.5);
}

.timeline-content h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: var(--text-light);
}

.timeline-content .organization {
  color: var(--primary-color);
  font-weight: 600;
  font-size: 0.9rem;
}

.timeline-content .date {
  display: inline-block;
  background: var(--primary-color);
  color: white;
  padding: 0.3rem 0.8rem;
  border-radius: 15px;
  font-size: 0.8rem;
  margin-top: 0.5rem;
  margin-bottom: 0.8rem;
}

.timeline-content .description {
  color: var(--text-lighter);
  line-height: 1.6;
}

@media (max-width: 768px) {
  .timeline::before {
    left: 5px;
  }

  .timeline-icon {
    left: -35px;
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .timeline-item {
    margin-left: 60px;
  }
}

/* ===== CERTIFICATIONS SECTION ===== */
.certifications {
  padding: 6rem 0;
}

/* ===== CONTACT SECTION ===== */
.contact {
  padding: 6rem 0;
  background: rgba(255, 255, 255, 0.02);
}

.contact-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.contact-item {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 15px;
  padding: 2rem;
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  transition: all 0.3s ease;
}

.contact-item:hover {
  background: rgba(124, 42, 232, 0.1);
  border-color: var(--primary-color);
  transform: translateY(-5px);
}

.contact-icon {
  width: 60px;
  height: 60px;
  background: var(--primary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.contact-info {
  flex: 1;
}

.contact-label {
  color: var(--text-lighter);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
}

.contact-info a {
  color: var(--text-light);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

.contact-info a:hover {
  color: var(--primary-color);
}

.btn-download-cv {
  display: block;
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  margin: 0 auto;
  width: fit-content;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
}

.btn-download-cv:hover {
  background: var(--secondary-color);
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(124, 42, 232, 0.3);
}

@media (max-width: 768px) {
  .contact-details {
    grid-template-columns: 1fr;
  }

  .btn-download-cv {
    width: 100%;
  }
}

/* ===== FOOTER ===== */
.footer {
  background: rgba(10, 0, 21, 0.8);
  border-top: 1px solid var(--border-color);
  padding: 2rem 0;
  text-align: center;
  color: var(--text-lighter);
  margin-top: 2rem;
}

.footer p {
  margin: 0.5rem 0;
}

.heart {
  color: #ff6b9d;
}

.name-highlight {
  color: var(--primary-color);
  font-weight: 600;
}

.copyright {
  font-size: 0.9rem;
  color: var(--text-lighter);
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--secondary-color);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes badgeReveal {
  0% {
    opacity: 0;
    transform: scaleX(0.95);
  }
  10% {
    opacity: 1;
    transform: scaleX(1);
  }
  70% {
    opacity: 1;
    transform: scaleX(1);
  }
  85% {
    opacity: 0.75;
    transform: scaleX(0.95);
  }
  100% {
    opacity: 0.75;
    transform: scaleX(0.95);
  }
}

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

@keyframes slideInFromRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ===== UTILITY CLASSES ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }
}

/* ===== SCROLL REVEAL SYSTEM ===== */

/* Base hidden state — applied via JS before observer kicks in */
[data-reveal] {
  opacity: 0;
  will-change: opacity, transform;
  transition:
    opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Direction presets */
[data-reveal="up"] {
  transform: translateY(50px);
}
[data-reveal="down"] {
  transform: translateY(-50px);
}
[data-reveal="left"] {
  transform: translateX(-60px);
}
[data-reveal="right"] {
  transform: translateX(60px);
}
[data-reveal="zoom"] {
  transform: scale(0.85);
}
[data-reveal="fade"] {
  transform: none;
}

/* Revealed state — added by IntersectionObserver */
[data-reveal].revealed {
  opacity: 1;
  transform: none;
}

/* Stagger delay helpers */
[data-delay="100"] {
  transition-delay: 0.1s;
}
[data-delay="150"] {
  transition-delay: 0.15s;
}
[data-delay="200"] {
  transition-delay: 0.2s;
}
[data-delay="250"] {
  transition-delay: 0.25s;
}
[data-delay="300"] {
  transition-delay: 0.3s;
}
[data-delay="350"] {
  transition-delay: 0.35s;
}
[data-delay="400"] {
  transition-delay: 0.4s;
}
[data-delay="450"] {
  transition-delay: 0.45s;
}
[data-delay="500"] {
  transition-delay: 0.5s;
}
[data-delay="600"] {
  transition-delay: 0.6s;
}
[data-delay="700"] {
  transition-delay: 0.7s;
}
[data-delay="800"] {
  transition-delay: 0.8s;
}

/* Slower, more dramatic reveal for section titles */
[data-reveal-title] {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

[data-reveal-title].revealed {
  opacity: 1;
  transform: none;
}

/* Section title underline swipe animation */
[data-reveal-title]::after {
  transform: translateX(-50%) scaleX(0);
  transform-origin: center;
  transition:
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.4s,
    opacity 0.7s ease 0.4s;
  opacity: 0;
}

[data-reveal-title].revealed::after {
  transform: translateX(-50%) scaleX(1);
  opacity: 1;
}

@keyframes glowPulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(124, 42, 232, 0);
  }
  50% {
    box-shadow: 0 0 30px 6px rgba(124, 42, 232, 0.25);
  }
}

/* Briefly pulse glow after a card reveals */
[data-reveal].revealed[data-glow] {
  animation: glowPulse 1.2s ease 0.8s 1;
}

/* ===== GLOBAL MOBILE RESPONSIVENESS ===== */
@media (max-width: 768px) {
  /* General spacing */
  section {
    padding: 4rem 0 !important;
    scroll-margin-top: 70px;
  }

  /* Section titles */
  .section-title {
    font-size: 2rem !important;
    margin-bottom: 2.5rem;
  }

  /* ---- ABOUT ---- */
  .about-content {
    grid-template-columns: 1fr !important;
    gap: 2rem;
  }

  .about-text p {
    font-size: 0.95rem;
  }

  .detail-card {
    padding: 1.25rem;
  }

  /* ---- SKILLS ---- */
  .skills-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem;
  }

  .skill-category {
    padding: 1.25rem;
  }

  .category-header h3 {
    font-size: 1rem;
  }

  .skill {
    font-size: 0.82rem;
    padding: 0.4rem 0.8rem;
  }

  /* ---- PROJECTS ---- */
  .projects-grid {
    grid-template-columns: 1fr !important;
    gap: 1.25rem;
  }

  .project-card {
    padding: 1.25rem;
  }

  .project-card h3 {
    font-size: 1.1rem;
  }

  .project-description {
    font-size: 0.9rem;
  }

  /* ---- TIMELINE (Experience + Certifications) ---- */
  .timeline::before {
    left: 16px;
  }

  .timeline-item {
    margin-left: 50px !important;
    padding: 1rem;
  }

  .timeline-icon {
    left: -38px !important;
    width: 36px !important;
    height: 36px !important;
    font-size: 0.9rem !important;
  }

  .timeline-icon img {
    height: 28px !important;
  }

  .timeline-content h3 {
    font-size: 1rem;
  }

  .timeline-content .description {
    font-size: 0.9rem;
  }

  /* ---- CONTACT ---- */
  .contact-details {
    grid-template-columns: 1fr !important;
    gap: 1rem;
  }

  .contact-item {
    padding: 1.25rem;
    gap: 1rem;
  }

  .contact-icon {
    width: 46px;
    height: 46px;
    font-size: 1.2rem;
  }

  .btn-download-cv {
    width: 100%;
    justify-content: center;
  }

  /* ---- SERVICES ---- */
  .services-grid {
    grid-template-columns: 1fr !important;
  }

  .service-card {
    padding: 1.5rem;
  }

  /* ---- TESTIMONIALS ---- */
  .testimonials-grid {
    grid-template-columns: 1fr !important;
  }

  .testimonial-card {
    padding: 1.5rem;
  }

  /* ---- CONTACT FORM ---- */
  .contact-content {
    grid-template-columns: 1fr !important;
    gap: 2rem;
  }

  .contact-form-wrapper {
    padding: 1.5rem;
  }

  .btn-service {
    width: 100%;
  }

  /* ---- FOOTER ---- */
  .footer {
    padding: 1.5rem 1rem;
    font-size: 0.9rem;
  }

  .footer-content {
    grid-template-columns: 1fr !important;
    gap: 2rem;
    margin-bottom: 1.5rem;
  }

  .footer-links {
    gap: 0.5rem;
  }

  .footer-bottom {
    position: relative;
  }

  .btn-back-to-top {
    position: static;
    margin-top: 1rem;
    width: 36px;
    height: 36px;
  }

  /* Reduce reveal delays on mobile for snappier feel */
  [data-delay] {
    transition-delay: 0s !important;
  }
}

/* ===== LOCATION BADGE ===== */
.location-badge {
  display: inline-block;
  background: rgba(124, 42, 232, 0.15);
  color: var(--primary-color);
  padding: 0.6rem 1.2rem;
  border-radius: 50px;
  font-weight: 600;
  margin-bottom: 1rem;
  border: 1px solid var(--primary-color);
  font-size: 0.95rem;
  animation: slideInFromTop 0.8s ease 0.15s backwards;
}

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

/* ===== METRICS ===== */
.metric {
  color: var(--primary-color);
}

/* ===== PROJECT BUTTONS ===== */
.project-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.btn-code,
.btn-demo {
  flex: 1;
  padding: 0.7rem 1.5rem;
  border-radius: 25px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
  border: none;
}

.btn-code {
  background: var(--primary-color);
  color: white;
}

.btn-code:hover {
  background: var(--secondary-color);
  transform: translateY(-3px);
}

.btn-demo {
  background: transparent;
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
}

.btn-demo:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-3px);
}

/* ===== VERIFY BUTTON ===== */
.btn-verify {
  background: rgba(124, 42, 232, 0.2);
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;
}

.btn-verify:hover {
  background: var(--primary-color);
  color: white;
  transform: scale(1.05);
}

/* ===== SERVICES SECTION ===== */
.services {
  padding: 6rem 0;
  background: rgba(255, 255, 255, 0.02);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.service-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 15px;
  padding: 2.5rem;
  text-align: center;
  transition: all 0.3s ease;
}

.service-card:hover {
  background: rgba(124, 42, 232, 0.1);
  border-color: var(--primary-color);
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(124, 42, 232, 0.2);
}

.service-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: white;
  margin: 0 auto 1.5rem;
  transition: all 0.3s ease;
}

.service-card:hover .service-icon {
  transform: scale(1.1) rotate(5deg);
}

.service-card h3 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: var(--text-light);
}

.service-card p {
  color: var(--text-lighter);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.btn-service {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 0.7rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.btn-service:hover {
  background: var(--secondary-color);
  transform: translateY(-3px);
}

/* ===== GITHUB STATS SECTION ===== */
.github-stats {
  padding: 4rem 0;
  text-align: center;
}

.stats-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 15px;
  padding: 2rem;
  transition: all 0.3s ease;
}

.stats-card:hover {
  background: rgba(124, 42, 232, 0.1);
  border-color: var(--primary-color);
  transform: scale(1.02);
}

.stats-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--text-light);
}

.stats-image {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
}

/* ===== TESTIMONIALS SECTION ===== */
.testimonials {
  padding: 6rem 0;
  background: rgba(255, 255, 255, 0.02);
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.testimonial-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 15px;
  padding: 2rem;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.testimonial-card:hover {
  background: rgba(124, 42, 232, 0.1);
  border-color: var(--primary-color);
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(124, 42, 232, 0.2);
}

.testimonial-header {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
  opacity: 0.6;
}

.testimonial-text {
  font-size: 1rem;
  color: var(--text-lighter);
  line-height: 1.7;
  margin-bottom: auto;
  font-style: italic;
}

.testimonial-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.testimonial-info h4 {
  font-size: 0.95rem;
  margin: 0;
  color: var(--text-light);
}

.testimonial-info p {
  font-size: 0.8rem;
  color: var(--text-lighter);
  margin: 0.3rem 0 0;
}

.testimonial-linkedin {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-color);
  border-radius: 50%;
  color: white;
  font-size: 1.2rem;
  text-decoration: none;
  transition: all 0.3s ease;
}

.testimonial-linkedin:hover {
  transform: scale(1.15) rotate(10deg);
  background: var(--secondary-color);
}

/* ===== CONTACT FORM SECTION ===== */
.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.contact-form-wrapper {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 15px;
  padding: 2rem;
  transition: all 0.3s ease;
}

.contact-form-wrapper:hover {
  background: rgba(124, 42, 232, 0.1);
  border-color: var(--primary-color);
}

.contact-form-wrapper h3 {
  font-size: 1.3rem;
  margin-bottom: 1.5rem;
  color: var(--text-light);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  color: var(--text-light);
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-lighter);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  background: rgba(124, 42, 232, 0.1);
  border-color: var(--primary-color);
  box-shadow: 0 0 10px rgba(124, 42, 232, 0.2);
}

.btn-send {
  width: 100%;
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 0.8rem 1.5rem;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 1rem;
}

.btn-send:hover {
  background: var(--secondary-color);
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(124, 42, 232, 0.3);
}

.form-note {
  font-size: 0.75rem;
  color: var(--text-lighter);
  text-align: center;
  margin-top: 1rem;
}

/* ===== THEME TOGGLE ===== */
.theme-toggle {
  background: rgba(124, 42, 232, 0.15);
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
  margin-left: 0.5rem;
}

.theme-toggle:hover {
  background: var(--primary-color);
  color: white;
  transform: scale(1.1);
}

/* ===== DARK MODE ===== */
body.light-mode {
  --primary-color: #6b21a8;
  --secondary-color: #9333ea;
  --bg-dark: #f9fafb;
  --bg-darker: #f3f4f6;
  --text-light: #1f2937;
  --text-lighter: #4b5563;
  --border-color: #e5e7eb;
  --success-color: #00ff88;
}

body.light-mode .navbar {
  background: rgba(249, 250, 251, 0.9) !important;
  border-bottom: 1px solid var(--border-color);
}

body.light-mode .nav-link {
  color: rgba(31, 41, 55, 0.75) !important;
}

body.light-mode .theme-toggle i {
  transform: rotate(180deg);
}

/* ===== IMPROVED FOOTER ===== */
.footer-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
}

.footer-section h4 {
  font-size: 1rem;
  color: var(--text-light);
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.footer-links a {
  color: var(--text-lighter);
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--primary-color);
  transform: translateX(5px);
}

.footer-social {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.footer-social a {
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(124, 42, 232, 0.15);
  border: 1px solid var(--primary-color);
  border-radius: 50%;
  color: var(--primary-color);
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 1.2rem;
}

.footer-social a:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-5px) scale(1.1);
}

.footer-bottom {
  text-align: center;
  position: relative;
  padding-bottom: 1rem;
}

.btn-back-to-top {
  position: absolute;
  right: 0;
  bottom: 0.5rem;
  width: 40px;
  height: 40px;
  background: var(--primary-color);
  border: none;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  font-size: 1rem;
}

.btn-back-to-top:hover {
  background: var(--secondary-color);
  transform: translateY(-5px);
}

/* Extra-small phones */
@media (max-width: 400px) {
  .hero-text .name {
    font-size: 1.75rem;
  }

  .section-title {
    font-size: 1.7rem !important;
  }

  .navbar-brand {
    font-size: 1.5rem;
  }
}
