.gradient-bg {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* ADD THESE NEW STYLES */
.neural-network-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
}

.neural-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.gradient-bg-neural {
  background: linear-gradient(135deg,
      #6366f1 0%,
      #8b5cf6 25%,
      #a855f7 50%,
      #c084fc 75%,
      #ddd6fe 100%);
  position: relative;
}

.neural-content {
  position: relative;
  z-index: 10;
}

.card-hover {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.name-typing {
  overflow: hidden;
  border-right: 3px solid #667eea;
  white-space: nowrap;
  animation: typing 4s steps(20, end), blink-caret 0.75s step-end infinite;
  width: 100%;
  max-width: 100%;
}

@keyframes typing {
  from {
    width: 0;
  }

  to {
    width: 100%;
  }
}

@keyframes blink-caret {

  from,
  to {
    border-color: transparent;
  }

  50% {
    border-color: #667eea;
  }
}

.tech-badge {
  background: linear-gradient(45deg, #667eea, #764ba2);
  transition: all 0.3s ease;
}

.tech-badge:hover {
  transform: scale(1.05);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.profile-image {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  border: 5px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  object-fit: cover;
  filter: brightness(1.1) contrast(1.1);
}

.contact-icon {
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.contact-icon:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

@media (max-width: 1024px) {
  .project-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .project-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 0 0.5rem;
  }
}

.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 640px) {
  .name-typing {
    font-size: 1.75rem !important;
    line-height: 1.2;
    animation: mobile-typing 3s steps(15, end),
      blink-caret 0.75s step-end infinite;
    font-weight: 700;
  }

  @keyframes mobile-typing {
    from {
      width: 0;
    }

    to {
      width: 100%;
    }
  }

  .profile-image {
    width: 120px;
    height: 120px;
    margin-bottom: 1.5rem;
  }

  #home {
    padding: 6rem 1rem 4rem;
    min-height: 90vh;
  }

  #home .text-center {
    padding: 0 1rem;
  }

  #home h1 {
    font-size: 1.25rem !important;
    margin-bottom: 1rem;
    line-height: 1.3;
    font-weight: 500;
  }

  #home p {
    font-size: 0.95rem !important;
    margin-bottom: 2rem;
    line-height: 1.5;
  }

  #home .flex {
    flex-direction: column !important;
    /* Stack vertically */
    gap: 1rem !important;
    /* Consistent spacing between buttons */
    width: 100%;
    max-width: 280px;
    /* Optimal width for mobile */
    margin: 0 auto;
    /* Perfect centering */
    padding: 0 1rem;
    align-items: center;
    /* Center align all buttons */
    justify-content: center;
  }

  #home .flex a {
    width: 100%;
    /* Full width of container */
    max-width: 260px;
    /* Consistent button width */
    text-align: center;
    padding: 12px 20px !important;
    /* Consistent padding */
    font-size: 0.9rem !important;
    /* Readable font size */
    min-height: 48px;
    /* Touch-friendly height */
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin: 0 auto;
    /* Ensure perfect centering */
    box-sizing: border-box;
    /* Include padding in width calculation */
  }

  /* Ensure buttons don't get too small */
  @media (max-width: 360px) {
    #home .flex {
      gap: 0.25rem !important;
    }

    #home .flex a {
      padding: 10px 6px !important;
      font-size: 0.75rem !important;
    }
  }

  .project-grid .bg-white {
    margin-bottom: 1rem;
  }

  .project-grid .p-6 {
    padding: 1.25rem;
  }

  .project-grid h3 {
    font-size: 1.1rem;
    line-height: 1.3;
  }

  .project-grid p {
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 0.75rem;
  }

  .project-grid .flex-wrap {
    gap: 0.375rem;
  }

  .project-grid span {
    font-size: 0.75rem;
    padding: 0.25rem 0.625rem;
  }

  #skills .grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  #skills .space-y-2 {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 1rem;
  }

  #about .space-y-6 {
    gap: 1.5rem !important;
    padding: 0 1rem;
  }

  #about .space-y-6>div {
    margin-bottom: 0.75rem !important;
  }

  #skills .space-y-2 span {
    margin: 0;
  }

  .tech-badge {
    font-size: 0.8rem;
    padding: 0.375rem 0.75rem;
  }

  #contact .grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 0 1rem;
  }

  .contact-icon {
    padding: 1.25rem;
  }

  .contact-icon i {
    font-size: 2.5rem !important;
    margin-bottom: 0.75rem;
  }

  .contact-icon h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
  }

  .contact-icon p {
    font-size: 0.8rem;
  }

  section {
    padding: 3rem 0;
  }

  .text-4xl {
    font-size: 2rem !important;
  }

  .text-xl {
    font-size: 1.1rem !important;
  }

  .max-w-7xl {
    padding: 0 1rem;
  }

  .fade-in {
    transform: translateY(15px);
  }
}

@media (max-width: 640px) {
  .mobile-menu a {
    display: block;
    padding: 12px 16px;
    border-bottom: 1px solid #f3f4f6;
    font-size: 16px;
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  .mobile-menu a:last-child {
    border-bottom: none;
  }
}

/* Mobile Navigation Improvements */
@media (max-width: 768px) {
  .mobile-menu {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  }

  .mobile-menu a {
    font-size: 1.1rem;
    padding: 0.75rem 1rem;
  }

  #about .grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  #about .p-8 {
    padding: 1.5rem;
  }

  #about h3 {
    font-size: 1.25rem;
  }

  #about .space-y-6>div {
    margin-bottom: 1rem;
  }

  #about .border-l-4 {
    padding-left: 1rem !important;
    margin-bottom: 0.75rem !important;
  }

  #about .p-8 {
    padding: 1.25rem !important;
  }

  #about .mb-6 {
    margin-bottom: 1rem !important;
  }

  a,
  button {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .card-hover:hover {
    transform: none;
  }

  .card-hover:active {
    transform: scale(0.98);
  }
}

@media (max-width: 640px) {
  #contact .grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    max-width: 350px;
    margin: 0 auto;
    padding: 0 1rem;
  }

  .contact-icon {
    padding: 1.5rem 1rem;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-height: 120px;
    justify-content: center;
  }

  .contact-icon i {
    font-size: 2.5rem !important;
    margin-bottom: 0.75rem;
    display: block;
  }

  .contact-icon h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
  }

  .contact-icon p {
    font-size: 0.85rem;
    line-height: 1.4;
    opacity: 0.9;
  }

  .contact-icon:hover {
    transform: none;
  }

  .contact-icon:active {
    transform: scale(0.95);
  }
}

@media (max-width: 768px) {
  #about .grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  #about h2 {
    text-align: center;
    margin-bottom: 2rem;
  }
}

@media (max-width: 640px) {
  #about {
    padding: 3rem 1rem;
  }
}

@media (max-width: 768px) {
  #about .grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  #about h2 {
    text-align: center;
    margin-bottom: 2rem;
  }

  #about .p-6 {
    padding: 1.5rem;
  }

  #about .space-y-4>div {
    margin-bottom: 1rem;
  }

  #about .border-l-4 {
    padding-left: 0.75rem;
  }
}

@media (max-width: 640px) {
  #about {
    padding: 3rem 1rem;
  }

  #about .text-4xl {
    font-size: 2rem;
  }

  #about .text-xl {
    font-size: 1.1rem;
  }

  #about .text-lg {
    font-size: 1rem;
  }
}

/* Experience Section Styles */
.experience-card {
  background: linear-gradient(135deg,
      rgba(102, 126, 234, 0.1) 0%,
      rgba(118, 75, 162, 0.1) 100%);
  border: 1px solid rgba(102, 126, 234, 0.2);
  transition: all 0.3s ease;
}

.experience-card:hover {
  background: linear-gradient(135deg,
      rgba(102, 126, 234, 0.15) 0%,
      rgba(118, 75, 162, 0.15) 100%);
  border-color: rgba(102, 126, 234, 0.3);
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(102, 126, 234, 0.1);
}

.experience-timeline {
  position: relative;
}

.experience-timeline::before {
  content: "";
  position: absolute;
  left: 20px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.experience-dot {
  position: absolute;
  left: -73px;
  top: 24px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 3px solid white;
  z-index: 2;
}

.experience-dot.purple {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

.experience-dot.blue {
  background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
  box-shadow: 0 2px 10px rgba(59, 130, 246, 0.3);
}

.experience-dot.green {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.3);
}

.fade-in {
  opacity: 1;
}
