:root {
  --primary-color: #6c63ff;
  --secondary-color: #ffffff;
  --accent-color: #00f5a0;
  --background-color: #0f172a;
  --text-color: #e2e8f0;
  --card-bg-color: rgba(255, 255, 255, 0.03);
  --hover-color: #00f5a0;
  --gradient-1: linear-gradient(135deg, #6c63ff 0%, #00f5a0 100%);
  --gradient-2: linear-gradient(45deg, #6c63ff 0%, #00f5a0 100%);
  --shadow-color: rgba(0, 0, 0, 0.2);
  --nav-height: 70px;
}

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

body {
  font-family: "Inter", "Roboto", sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--background-color);
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

h1,
h2,
h3 {
  color: var(--secondary-color);
}

h2 {
  font-size: 2.5rem;
  margin-bottom: 2rem;
  text-align: center;
}

/* Navbar */
#navbar {
  background-color: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2rem;
  height: var(--nav-height);
  transition: all 0.3s ease;
}

.logo {
  background: var(--gradient-1);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: 2rem;
  font-weight: bold;
  text-decoration: none;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-links a {
  color: var(--text-color);
  text-decoration: none;
  font-size: 1rem;
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: var(--hover-color);
}

.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
}

.hamburger span {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px 0;
  background: var(--text-color);
  transition: all 0.3s ease;
}

/* Hero Section */
.hero {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 2rem;
}

.hero-content {
  max-width: 800px;
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  color: var(--text-color);
  opacity: 0.9;
}

.highlight {
  color: var(--primary-color);
}

.explore-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  font-size: 1.1rem;
  margin-top: 2rem;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.explore-btn i {
  transition: transform 0.3s ease;
}

.explore-btn:hover i {
  animation: bounce 1s infinite;
}

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

/* About Section */
.about-content {
  display: flex;
  align-items: center;
  gap: 4rem;
}

.profile-photo {
  width: 300px;
  height: 300px;
  border-radius: 50%;
  object-fit: cover;
  padding: 5px;
  background: linear-gradient(var(--background-color), var(--background-color)) padding-box, var(--gradient-1)
    border-box;
  border: 3px solid transparent;
  transition: all 0.3s ease;
}

.profile-photo:hover {
  transform: scale(1.05);
  box-shadow: 0 0 30px rgba(108, 99, 255, 0.3);
}

.bio {
  flex: 1;
}

.btn {
  display: inline-block;
  background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
  color: var(--background-color);
  font-weight: 600;
  padding: 0.8rem 1.5rem;
  border-radius: 30px;
  text-decoration: none;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  z-index: 1;
  padding: 0.8rem 1.5rem;
  font-size: 1rem;
}

.btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, var(--accent-color), var(--primary-color));
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.btn:hover::before {
  opacity: 1;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(108, 99, 255, 0.2);
}

/* Skills Section */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  padding: 2rem 0;
}

.grid-spacer {
  display: none;
}

@media (min-width: 769px) {
  .skills-grid {
    grid-template-rows: auto auto;
  }

  .grid-spacer {
    display: block;
    visibility: hidden;
  }

  .skills-grid > div:nth-last-child(1) {
    grid-column: 2;
  }
}

.skill {
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  transition: all 0.3s ease;
}

.skill:hover {
  transform: translateY(-5px);
  border-color: var(--primary-color);
  box-shadow: 0 10px 20px rgba(108, 99, 255, 0.1);
}

.skill i {
  font-size: 2.5rem;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 1rem;
}

.skill h3 {
  color: var(--text-color);
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.skill p {
  color: var(--text-color);
  opacity: 0.8;
  line-height: 1.6;
}

/* Projects Section */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  padding: 2rem 0;
}

.project-card {
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(108, 99, 255, 0.2);
  border-radius: 16px;
  padding: 2rem;
  text-decoration: none;
  color: var(--text-color);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

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

.project-header i {
  font-size: 2rem;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.project-header h3 {
  font-size: 1.5rem;
  color: var(--secondary-color);
  margin: 0;
}

.project-card p {
  color: var(--text-color);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.project-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gradient-1);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 0;
}

.project-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary-color);
  box-shadow: 0 10px 20px rgba(108, 99, 255, 0.1);
}

.project-card:hover::before {
  opacity: 0.05;
}

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.5rem;
}

.tech-stack span {
  background: rgba(108, 99, 255, 0.1);
  color: var(--accent-color);
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  border: 1px solid rgba(108, 99, 255, 0.2);
  transition: all 0.3s ease;
}

.tech-stack span:hover {
  background: var(--gradient-1);
  color: var(--background-color);
  border-color: transparent;
}

.view-all {
  text-align: center;
  margin-top: 3rem;
}

.view-all .btn {
  padding: 1rem 2rem;
  font-size: 1.1rem;
}

.view-all .btn i {
  margin-right: 0.5rem;
}

/* Experience Section */
.experience-grid {
  display: grid;
  gap: 2rem;
  padding: 2rem 0;
}

.experience-card {
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(108, 99, 255, 0.2);
  border-radius: 16px;
  padding: 2rem;
  transition: all 0.3s ease;
}

.experience-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary-color);
  box-shadow: 0 10px 20px rgba(108, 99, 255, 0.1);
}

.experience-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  gap: 1rem;
}

.experience-title h3 {
  font-size: 1.5rem;
  color: var(--text-color);
  margin-bottom: 0.5rem;
}

.company {
  color: var(--accent-color);
  font-size: 1.1rem;
}

.experience-duration {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-color);
  opacity: 0.8;
  font-size: 0.9rem;
}

.experience-duration i {
  color: var(--accent-color);
}

.experience-content p {
  color: var(--text-color);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.experience-highlights {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem 0;
}

.experience-highlights li {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  margin-bottom: 1rem;
  color: var(--text-color);
  line-height: 1.4;
}

.experience-highlights li i {
  color: var(--accent-color);
  font-size: 1.1rem;
  margin-top: 0.2rem;
}

.skills-used {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.5rem;
}

.skills-used span {
  background: rgba(108, 99, 255, 0.1);
  color: var(--accent-color);
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  border: 1px solid rgba(108, 99, 255, 0.2);
  transition: all 0.3s ease;
}

.skills-used span:hover {
  background: var(--gradient-1);
  color: var(--background-color);
  border-color: transparent;
}

/* Contact Section */
.contact-form {
  background: rgba(15, 23, 42, 0.6);
  padding: 2rem;
  border-radius: 15px;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  max-width: 600px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 1.5rem;
  position: relative;
  margin-bottom: 1rem; /* Update: Improve form responsiveness */
}

.form-group i {
  position: absolute;
  left: 0.5rem;
  top: 3.2rem;
  color: var(--accent-color);
  font-size: 1.2rem;
  transition: all 0.3s ease;
}

.form-group label {
  margin-bottom: 0.5rem;
  display: block;
  color: var(--text-color);
  font-weight: 500;
  font-size: 1.1rem;
  padding-left: 0;
  margin-left: 0;
}

.form-group label i {
  position: static;
  margin-right: 0;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 1rem 1rem 1rem 0.5rem;
  background: rgba(15, 23, 42, 0.3);
  border: 2px solid rgba(108, 99, 255, 0.2);
  border-radius: 12px;
  color: var(--text-color);
  font-family: "Inter", sans-serif;
  font-size: 1rem;
  transition: all 0.3s ease;
  width: 100%; /* Update: Improve form responsiveness */
  padding: 0.8rem; /* Update: Improve form responsiveness */
}

.form-group textarea {
  min-height: 150px;
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 4px rgba(108, 99, 255, 0.1);
  background: rgba(15, 23, 42, 0.4);
}

.form-group input:focus + i,
.form-group textarea:focus + i {
  color: var(--accent-color);
  transform: scale(1.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(255, 255, 255, 0.5);
  font-family: "Inter", sans-serif;
  padding-left: 0rem;
}

#contact-form .btn {
  width: 100%;
  padding: 1rem;
  background: var(--accent-color);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 4px 15px rgba(108, 99, 255, 0.2);
}

#contact-form .btn:hover {
  background: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(108, 99, 255, 0.3);
}

#contact-form .btn:active {
  transform: translateY(0);
}

#contact-form .btn i {
  font-size: 1.2rem;
  position: static;
  margin: 0;
}

#contact-form .btn:disabled {
  background: #718096;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Success message animation */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translate(-50%, -20px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

.success-message {
  animation: fadeInDown 0.5s ease forwards;
  background: rgba(46, 204, 113, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Form Message */
.form-message {
  max-width: 600px;
  margin: 0 auto 2rem;
  padding: 1.2rem;
  border-radius: 16px;
  text-align: center;
  font-size: 1.1rem;
  font-weight: 500;
  opacity: 0;
  transform: translateY(-20px);
  transition: all 0.5s ease;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(10px);
}

.form-message.show {
  opacity: 1;
  transform: translateY(0);
}

.form-message.success {
  background: rgba(108, 99, 255, 0.1);
  border: 1px solid var(--primary-color);
  color: var(--accent-color);
  animation: fadeInDown 0.5s ease forwards, glow 2s ease-in-out infinite;
}

@keyframes glow {
  0%,
  100% {
    box-shadow: 0 0 5px rgba(108, 99, 255, 0.2);
  }
  50% {
    box-shadow: 0 0 20px rgba(108, 99, 255, 0.4);
  }
}

.form-message.error {
  background: rgba(255, 99, 99, 0.1);
  color: #ff6363;
  border: 1px solid #ff6363;
}

/* Social Links */
.social-links {
  display: flex;
  gap: 2rem;
  margin-top: 3rem;
  justify-content: center;
}

.social-icon {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(108, 99, 255, 0.1);
  border: 2px solid rgba(108, 99, 255, 0.2);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.social-icon::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gradient-1);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.social-icon:hover::before {
  opacity: 1;
}

.social-icon img {
  width: 30px;
  height: 30px;
  transition: all 0.3s ease;
  z-index: 2;
  position: relative;
  filter: brightness(0) invert(1);
}

.social-icon:hover img {
  transform: scale(1.1);
}

/* Add a subtle pulse animation to social icons */
@keyframes pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(108, 99, 255, 0.4);
  }
  70% {
    transform: scale(1.05);
    box-shadow: 0 0 0 15px rgba(108, 99, 255, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(108, 99, 255, 0);
  }
}

.social-icon:hover {
  animation: pulse 1.5s infinite;
  border-color: transparent;
}

/* Footer */
footer {
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(10px);
  padding: 2rem 0;
  text-align: center;
  border-top: 1px solid rgba(108, 99, 255, 0.2);
}

footer p {
  color: var(--text-color);
  font-size: 1rem;
  opacity: 0.8;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
  .container {
    padding: 2rem 1rem;
  }
  .hamburger {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: -100%;
    width: 100%;
    height: calc(100vh - var(--nav-height));
    background-color: var(--background-color);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: left 0.3s ease;
    z-index: 999;
  }

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

  .nav-links li {
    margin: 1rem 0;
  }

  .about-content {
    flex-direction: column;
    text-align: center;
  }

  .profile-photo {
    margin-bottom: 2rem;
  }

  .skills-grid,
  .project-grid {
    grid-template-columns: 1fr;
  }

  .experience-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .experience-duration {
    margin-top: 0.5rem;
  }

  .social-links {
    flex-wrap: wrap;
    justify-content: center;
  }

  .social-icon {
    margin: 0.5rem;
  }
}

@media screen and (max-width: 480px) {
  .hero h1 {
    font-size: 2.5rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .btn {
    padding: 0.8rem 1.2rem;
    font-size: 0.9rem;
  }

  .profile-photo {
    width: 200px;
    height: 200px;
  }

  .form-group input,
  .form-group textarea {
    padding: 0.8rem;
  }
}

/* Ensure the starfield canvas is responsive */
#starfield {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

