:root {
  --primary-color: #8a2be2;
  --primary-dark: #5e17a8;
  --primary-light: #b388ff;
  --secondary-color: #00e5ff;
  --dark-color: #0a0a1a;
  --light-color: #f0f0ff;
  --accent-color: #ff4d88;
  --gray-color: #6c757d;
  --transition: all 0.3s ease;
}

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

body {
  font-family: "Poppins", sans-serif;
  color: var(--light-color);
  background: var(--dark-color);
  overflow-x: hidden;
  position: relative;
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

section {
  padding: 100px 0;
  position: relative;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  line-height: 1.2;
}

.heading {
  font-size: 3rem;
  margin-bottom: 50px;
  text-align: center;
  position: relative;
}

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

.heading::after {
  content: "";
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(
    to right,
    var(--primary-color),
    var(--secondary-color)
  );
  border-radius: 2px;
}

.btn {
  display: inline-block;
  padding: 12px 28px;
  background: var(--primary-color);
  border-radius: 40px;
  font-size: 1rem;
  color: var(--light-color);
  letter-spacing: 1px;
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
  box-shadow: 0 0 10px var(--primary-color);
  border: none;
  cursor: pointer;
}

.btn:hover {
  background: var(--primary-dark);
  box-shadow: 0 0 20px var(--primary-color);
  transform: translateY(-5px);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  box-shadow: none;
}

.btn-outline:hover {
  background: var(--primary-color);
  color: var(--light-color);
}

/* Particle Background */
#particles-js {
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: -1;
  background: linear-gradient(135deg, #0a0a1a 0%, #1a1a2e 100%);
}

/* Animated Glow Elements */
.glow-element {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.3;
  z-index: -1;
  animation: float 15s infinite ease-in-out;
}

.glow-1 {
  width: 300px;
  height: 300px;
  background: var(--primary-color);
  top: 20%;
  left: 10%;
  animation-delay: 0s;
}

.glow-2 {
  width: 400px;
  height: 400px;
  background: var(--secondary-color);
  bottom: 10%;
  right: 10%;
  animation-delay: 3s;
}

.glow-3 {
  width: 200px;
  height: 200px;
  background: var(--accent-color);
  top: 60%;
  left: 30%;
  animation-delay: 6s;
}

@keyframes float {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(50px, 50px);
  }
}

/* Floating Shapes */
.floating-shape {
  position: absolute;
  z-index: -1;
  opacity: 0.1;
  animation: float-shape 20s infinite linear;
}

.floating-shape.triangle {
  width: 0;
  height: 0;
  border-left: 25px solid transparent;
  border-right: 25px solid transparent;
  border-bottom: 50px solid var(--primary-color);
}

.floating-shape.circle {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--secondary-color);
}

.floating-shape.square {
  width: 40px;
  height: 40px;
  background: var(--accent-color);
  transform: rotate(45deg);
}

@keyframes float-shape {
  0% {
    transform: translate(0, 0) rotate(0deg);
  }
  25% {
    transform: translate(50px, 50px) rotate(90deg);
  }
  50% {
    transform: translate(100px, 0) rotate(180deg);
  }
  75% {
    transform: translate(50px, -50px) rotate(270deg);
  }
  100% {
    transform: translate(0, 0) rotate(360deg);
  }
}

/* Floating Animation */
.floating {
  animation: floating 3s ease-in-out infinite;
}

@keyframes floating {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px);
  }
}

/* Header Styles */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 70px;
  padding: 20px 5%;
  background: rgba(10, 10, 26, 0.8);
  backdrop-filter: blur(10px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  transition: var(--transition);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.header.hidden {
  transform: translateY(-100%);
}

.logo img {
  height: 40px;
  transition: var(--transition);
}

.logo:hover img {
  transform: scale(1.1);
}

.navbar {
  display: flex;
  position: relative;
}

.navbar a {
  font-size: 1.1rem;
  color: var(--light-color);
  text-decoration: none;
  font-weight: 500;
  margin-left: 35px;
  transition: var(--transition);
  position: relative;
  padding: 5px 0;
}

.navbar a:hover,
.navbar a.active {
  color: var(--primary-color);
}

.nav-indicator {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--primary-color);
  border-radius: 3px;
  transition: var(--transition);
  z-index: 1;
}

.menu-toggle {
  display: none;
  font-size: 1.5rem;
  color: var(--light-color);
  cursor: pointer;
  z-index: 1001;
}

/* Home Section */
.home {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 100px 5% 0;
  position: relative;
}

.home-content {
  max-width: 600px;
}

.home-content h3 {
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.home-content h1 {
  font-size: 3.5rem;
  margin-bottom: 15px;
  line-height: 1.2;
}

.home-content h3:nth-of-type(2) {
  margin-bottom: 20px;
}

.home-content h3 span {
  color: var(--primary-color);
}

.home-content p {
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 30px;
}

.home-sci {
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
}

.home-sci a {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 2px solid var(--primary-color);
  border-radius: 50%;
  font-size: 1.2rem;
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
}

.home-sci a:hover {
  background: var(--primary-color);
  color: var(--dark-color);
  box-shadow: 0 0 20px var(--primary-color);
  transform: translateY(-5px);
}

.home-img {
  position: relative;
  width: 400px;
  height: 400px;
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-container {
  position: relative;
  width: 300px;
  height: 300px;
  animation: floating 3s ease-in-out infinite;
}

.profile-image {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--primary-color);
  box-shadow: 0 0 30px rgba(138, 43, 226, 0.3);
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  padding: 4px;
  z-index: 2;
}

.profile-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  transition: var(--transition);
}

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

.profile-frame {
  position: absolute;
  top: -20px;
  left: -20px;
  right: -20px;
  bottom: -20px;
  border: 2px solid rgba(138, 43, 226, 0.3);
  border-radius: 50%;
  animation: rotate 20s linear infinite;
  z-index: 1;
}

.profile-frame::before {
  content: '';
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  border: 1px solid rgba(0, 229, 255, 0.2);
  border-radius: 50%;
  animation: rotate 30s linear infinite reverse;
}

@keyframes rotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* About Section */
.about {
  background: rgba(10, 10, 26, 0.7);
}

.about-container {
  display: flex;
  align-items: center;
  gap: 50px;
}

.about-content {
  flex: 1;
}

.about-content h3 {
  font-size: 1.5rem;
  margin-bottom: 20px;
  color: var(--secondary-color);
}

.about-content p {
  font-size: 1.1rem;
  margin-bottom: 30px;
}

.about-tabs {
  display: flex;
  gap: 15px;
  margin-bottom: 30px;
}

.tab-btn {
  padding: 10px 20px;
  background: transparent;
  border: 2px solid var(--primary-color);
  border-radius: 30px;
  color: var(--primary-color);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.tab-btn.active {
  background: var(--primary-color);
  color: var(--light-color);
}

.tab-content {
  display: none;
  animation: fadeIn 0.5s ease;
}

.tab-content.active {
  display: block;
}

.education-item,
.experience-item,
.certification-item {
  margin-bottom: 20px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  transition: var(--transition);
}

.education-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(138, 43, 226, 0.1);
}

.education-item h4 {
  color: var(--primary-color);
  margin-bottom: 10px;
}

.education-item p {
  margin-bottom: 5px;
  font-size: 0.9rem;
}

/* About Section Styles */
.achievement-item {
  margin-bottom: 20px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  transition: var(--transition);
}

.achievement-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(138, 43, 226, 0.1);
}

.achievement-item h4 {
  color: var(--primary-color);
  margin-bottom: 10px;
}

.achievement-item p {
  margin-bottom: 10px;
  font-size: 0.9rem;
  color: var(--secondary-color);
}

.achievement-item ul {
  padding-left: 20px;
}

.achievement-item li {
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.experience-item ul {
  padding-left: 20px;
}

.experience-item li {
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.about-btns {
  display: flex;
  gap: 20px;
  margin-top: 30px;
}

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

/* Skills Section */
.skills {
  background: rgba(10, 10, 26, 0.7);
}

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

.skills-category {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 15px;
  padding: 25px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(138, 43, 226, 0.2);
  transition: var(--transition);
}

.skills-category:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(138, 43, 226, 0.2);
  border-color: var(--primary-color);
}

.skills-category h3 {
  font-size: 1.5rem;
  margin-bottom: 20px;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  gap: 10px;
}

.skills-category h3 i {
  font-size: 1.2rem;
}

.skills-items {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.skill-item {
  background: rgba(138, 43, 226, 0.1);
  border: 1px solid rgba(138, 43, 226, 0.3);
  border-radius: 8px;
  padding: 10px 15px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
  text-align: center;
}

.skill-item:hover {
  background: rgba(138, 43, 226, 0.3);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(138, 43, 226, 0.2);
}

/* Portfolio Section */
.portfolio-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
}

.portfolio-box {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  height: 300px; /* Increased height to accommodate title */
  transition: var(--transition);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(138, 43, 226, 0.2);
}

.portfolio-image-container {
  position: relative;
  height: 70%; /* 70% for image */
  overflow: hidden;
  border-radius: 20px 20px 0 0;
}

.portfolio-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.portfolio-title {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 30%; /* 30% for title area */
  background: rgba(10, 10, 26, 0.9);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 15px;
  border-radius: 0 0 20px 20px;
}

.portfolio-title h3 {
  color: var(--primary-color);
  font-size: 1.2rem;
  font-weight: 600;
  text-align: center;
  margin: 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.portfolio-box:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(138, 43, 226, 0.3);
}

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

.portfolio-box:hover .portfolio-title h3 {
  color: var(--secondary-color);
}

.portfolio-layer {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(rgba(0, 0, 0, 0.1), var(--primary-color));
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0 30px;
  transform: translateY(100%);
  transition: var(--transition);
  border-radius: 20px 20px 0 0;
}

.portfolio-image-container:hover .portfolio-layer {
  transform: translateY(0);
}

.portfolio-layer h4 {
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.portfolio-layer p {
  font-size: 1rem;
  margin-bottom: 20px;
}

.portfolio-links {
  display: flex;
  gap: 15px;
}

.portfolio-layer a {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  background: var(--light-color);
  border-radius: 50%;
  color: var(--primary-dark);
  font-size: 1rem;
  text-decoration: none;
  transition: var(--transition);
}

.portfolio-layer a:hover {
  background: var(--secondary-color);
  transform: rotate(360deg);
}

/* Add these styles to your existing CSS */
.modal-video-container {
  position: relative;
  width: 100%;
  margin-bottom: 20px;
  border-radius: 10px;
  overflow: hidden;
}

.modal-video {
  width: 100%;
  display: block;
  border-radius: 10px;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: var(--primary-color);
  color: var(--light-color);
  text-decoration: none;
  border-radius: 25px;
  font-weight: 600;
  transition: var(--transition);
  border: 2px solid var(--primary-color);
  margin: 5px;
}

.project-link:hover {
  background: transparent;
  color: var(--primary-color);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(138, 43, 226, 0.3);
}

.github-link {
  background: #333;
  border-color: #333;
}

.github-link:hover {
  background: transparent;
  color: #333;
  border-color: #333;
}

.demo-link {
  background: var(--secondary-color);
  border-color: var(--secondary-color);
}

.demo-link:hover {
  background: transparent;
  color: var(--secondary-color);
  border-color: var(--secondary-color);
}

.app-link {
  background: #00c851;
  border-color: #00c851;
}

.app-link:hover {
  background: transparent;
  color: #00c851;
  border-color: #00c851;
}

.video-link {
  background: var(--accent-color);
  border-color: var(--accent-color);
}

.video-link:hover {
  background: transparent;
  color: var(--accent-color);
  border-color: var(--accent-color);
}

.back-btn {
  background: var(--gray-color);
  border-color: var(--gray-color);
}

.back-btn:hover {
  background: transparent;
  color: var(--gray-color);
  border-color: var(--gray-color);
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
  justify-content: center;
}

/* Video Button Style */
.video-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  background: var(--light-color);
  border-radius: 50%;
  color: var(--primary-dark);
  font-size: 1rem;
  text-decoration: none;
  transition: var(--transition);
}

.video-btn:hover {
  background: var(--accent-color);
  transform: scale(1.1);
}

/* Project Modal */
.project-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.project-modal.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  position: relative;
  width: 80%;
  max-width: 900px;
  background: var(--dark-color);
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 0 30px rgba(138, 43, 226, 0.3);
  transform: scale(0.5);
  transition: var(--transition);
}

.project-modal.active .modal-content {
  transform: scale(1);
}

.close-modal {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 1.5rem;
  color: var(--light-color);
  cursor: pointer;
  transition: var(--transition);
}

.close-modal:hover {
  color: var(--primary-color);
  transform: rotate(90deg);
}

.modal-body {
  max-height: 80vh;
  overflow-y: auto;
  padding-right: 20px;
}

/* Video Container */
.modal-video-container {
  position: relative;
  width: 100%;
  margin-bottom: 20px;
}

.modal-video {
  width: 100%;
  border-radius: 10px;
  display: block;
}

/* Modal Image Styles */
.modal-img {
  position: relative;
  width: 100%;
  max-width: 500px;
  margin: 0 auto 20px auto;
  border-radius: 10px;
  overflow: hidden;
}

.modal-img img {
  width: 100%;
  height: auto;
  max-height: 300px;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}

/* Project Details Styles */
.project-details {
  max-width: 100%;
  color: var(--light-color);
}

.project-details h2 {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 15px;
  text-align: center;
}

.project-description {
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 30px;
  text-align: justify;
  color: var(--light-color);
}

.project-description a {
  color: var(--secondary-color);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: var(--transition);
}

.project-description a:hover {
  color: var(--primary-light);
}

.details-section {
  margin-bottom: 25px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  border-left: 4px solid var(--primary-color);
}

.details-section h3 {
  font-size: 1.3rem;
  color: var(--secondary-color);
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.details-section h3 i {
  font-size: 1.1rem;
}

.concepts-list,
.features-list {
  list-style: none;
  padding: 0;
}

.concepts-list li,
.features-list li {
  padding: 8px 0;
  padding-left: 20px;
  position: relative;
  line-height: 1.5;
}

.concepts-list li:before,
.features-list li:before {
  content: "▶";
  color: var(--primary-color);
  position: absolute;
  left: 0;
  top: 8px;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tech-tag {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: var(--light-color);
  padding: 8px 15px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid rgba(138, 43, 226, 0.3);
  transition: var(--transition);
}

.tech-tag:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(138, 43, 226, 0.3);
}

.project-links {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: var(--primary-color);
  color: var(--light-color);
  text-decoration: none;
  border-radius: 25px;
  font-weight: 600;
  transition: var(--transition);
  border: 2px solid var(--primary-color);
}

.project-link:hover {
  background: transparent;
  color: var(--primary-color);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(138, 43, 226, 0.3);
}

.github-link {
  background: #333;
  border-color: #333;
}

.github-link:hover {
  background: transparent;
  color: #333;
  border-color: #333;
}

.demo-link {
  background: var(--secondary-color);
  border-color: var(--secondary-color);
}

.demo-link:hover {
  background: transparent;
  color: var(--secondary-color);
  border-color: var(--secondary-color);
}

/* Project Details in Modal */
.modal-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
}

.modal-tech span {
  background: rgba(138, 43, 226, 0.1);
  border: 1px solid rgba(138, 43, 226, 0.3);
  border-radius: 5px;
  padding: 5px 10px;
  font-size: 0.8rem;
}

.modal-links {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

/* Footer */
.footer {
  background: rgba(10, 10, 26, 0.9);
  padding: 60px 0 0;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.footer-logo {
  flex: 1;
  text-align: left;
  min-width: 200px;
}

.footer-logo img {
  height: 50px;
  margin-bottom: 15px;
}

.footer-contact {
  flex: 2;
  padding: 30px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 15px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(138, 43, 226, 0.2);
  text-align: left;
  min-width: 300px;
}

.footer-contact h3 {
  font-size: 1.4rem;
  margin-bottom: 20px;
  color: var(--primary-color);
  text-align: center;
}

.footer-contact p {
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
  padding: 8px 0;
}

.footer-contact i {
  font-size: 1.1rem;
  color: var(--secondary-color);
  width: 20px;
  text-align: center;
}

.footer-links {
  flex: 1;
  text-align: right;
  min-width: 150px;
}

.footer-links h3 {
  font-size: 1.4rem;
  margin-bottom: 20px;
  color: var(--primary-color);
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: var(--light-color);
  text-decoration: none;
  transition: var(--transition);
}

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

.social-links {
  display: flex;
  gap: 12px;
  margin-top: 25px;
  justify-content: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.social-links a {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 35px;
  height: 35px;
  background: rgba(138, 43, 226, 0.1);
  border: 1px solid rgba(138, 43, 226, 0.3);
  border-radius: 8px;
  color: var(--light-color);
  font-size: 1rem;
  transition: var(--transition);
}

.social-links a:hover {
  background: var(--primary-color);
  color: var(--dark-color);
  transform: translateY(-3px);
  border-color: var(--primary-color);
  box-shadow: 0 5px 15px rgba(138, 43, 226, 0.3);
}

.footer-bottom {
  text-align: center;
  padding: 20px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
}

.footer-bottom p span {
  color: var(--primary-color);
}

.footer-iconTop {
  position: absolute;
  right: 0;
  top: -20px;
}

.footer-iconTop a {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  background: var(--primary-color);
  border-radius: 50%;
  color: var(--light-color);
  font-size: 1.2rem;
  text-decoration: none;
  transition: var(--transition);
}

.footer-iconTop a:hover {
  background: var(--secondary-color);
  box-shadow: 0 0 20px var(--secondary-color);
  transform: translateY(-5px);
}

/* Responsive Design */
@media (max-width: 1200px) {
  .home-img {
    width: 350px;
    height: 350px;
  }

  .profile-container {
    width: 250px;
    height: 250px;
  }
}

/* Respect user's motion preferences */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Mobile Performance Optimizations */
@media (max-width: 768px) {
  /* Reduce animations and transitions for better performance */
  .portfolio-box:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 20px rgba(138, 43, 226, 0.2) !important;
  }

  .portfolio-box:hover img {
    transform: scale(1.01) !important;
  }

  .portfolio-box:hover .portfolio-title h3 {
    color: var(--secondary-color) !important;
  }

  /* Ensure title stays in place on mobile */
  .portfolio-title {
    position: relative !important;
    bottom: auto !important;
    transform: none !important;
  }

  /* Disable complex animations on mobile */
  .home-img::before,
  .home-img::after {
    animation-duration: 8s !important;
  }

  .shape {
    animation-duration: 10s !important;
  }

  /* Improve text readability */
  .about-content p,
  .project-description {
    text-align: left;
    hyphens: auto;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  /* Fix potential overflow issues */
  .container,
  .home-content,
  .about-content,
  .portfolio-container {
    overflow-x: hidden;
    width: 100%;
  }

  /* Improve button spacing and sizing */
  .about-btns {
    padding: 0 15px;
  }

  .about-btns .btn {
    margin-bottom: 10px;
  }

  /* Fix modal positioning */
  .project-modal {
    padding: 10px;
  }

  .modal-content {
    transform: translate(-50%, -50%) !important;
    top: 50% !important;
    left: 50% !important;
    position: fixed !important;
  }
}

@media (max-width: 991px) {
  .header {
    padding: 15px 5%;
  }

  .home {
    flex-direction: column;
    text-align: center;
    padding-top: 80px;
  }

  .home-content {
    max-width: 100%;
    margin-bottom: 50px;
  }

  .home-img {
    width: 300px;
    height: 300px;
    margin: 0 auto;
  }

  .profile-container {
    width: 220px;
    height: 220px;
  }

  .about-container {
    flex-direction: column;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
    gap: 30px;
  }

  .footer-logo,
  .footer-links {
    text-align: center;
  }

  .footer-contact {
    text-align: center;
    min-width: auto;
    margin: 0 20px;
  }

  .footer-contact p {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .navbar {
    position: fixed;
    top: 0;
    left: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: rgba(10, 10, 26, 0.95);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.2);
  }

  .navbar.active {
    left: 0;
  }

  .navbar a {
    margin: 15px 0;
    font-size: 1.2rem;
  }

  .nav-indicator {
    display: none;
  }

  .footer-content {
    grid-template-columns: 1fr;
  }

  .footer-iconTop {
    position: static;
    margin-top: 20px;
    display: inline-block;
  }
}

@media (max-width: 576px) {
  /* Disable animations on mobile for better performance */
  * {
    animation-duration: 0s !important;
    animation-delay: 0s !important;
    transition-duration: 0.3s !important;
  }

  /* Disable floating animations specifically */
  .home-img::before,
  .home-img::after,
  .profile-frame::before,
  .profile-frame::after {
    animation: none !important;
  }

  /* Reduce hover effects on mobile */
  .portfolio-box:hover {
    transform: none !important;
  }

  .portfolio-box:hover img {
    transform: none !important;
  }

  /* Fix text sizing and overflow */
  .home-content h1 {
    font-size: 2.2rem;
    line-height: 1.2;
    margin-bottom: 10px;
  }

  .home-content h3 {
    font-size: 1.3rem;
    line-height: 1.3;
    margin-bottom: 15px;
  }

  .home-content p {
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 20px;
  }

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

  .profile-container {
    width: 160px;
    height: 160px;
  }

  .heading {
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 30px;
  }

  /* About section fixes */
  .about-content h3 {
    font-size: 1.3rem;
    text-align: center;
    margin-bottom: 15px;
  }

  .about-content p {
    font-size: 0.95rem;
    line-height: 1.6;
    text-align: justify;
    margin-bottom: 20px;
    padding: 0 10px;
  }

  .about-tabs {
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 25px;
  }

  .tab-btn {
    padding: 8px 16px;
    font-size: 0.9rem;
    min-width: auto;
  }

  .about-btns {
    flex-direction: column;
    gap: 15px;
    align-items: center;
  }

  /* Portfolio section mobile fixes */
  .portfolio-container {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 0 15px;
  }

  .portfolio-box {
    height: 280px;
    margin: 0 auto;
    max-width: 350px;
    width: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(138, 43, 226, 0.3);
  }

  .portfolio-image-container {
    height: 75%;
    flex-shrink: 0;
    position: relative;
    border-radius: 20px 20px 0 0;
    overflow: hidden;
  }

  .portfolio-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .portfolio-title {
    position: relative;
    height: 25%;
    bottom: auto;
    left: auto;
    right: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 15px;
    background: rgba(10, 10, 26, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 0 0 20px 20px;
    flex-shrink: 0;
  }

  .portfolio-title h3 {
    font-size: 0.9rem;
    line-height: 1.3;
    text-align: center;
    margin: 0;
    color: var(--primary-color);
    font-weight: 600;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
  }

  .portfolio-layer {
    padding: 0 15px;
    border-radius: 20px 20px 0 0;
  }

  .portfolio-layer h4 {
    font-size: 1.2rem;
    margin-bottom: 8px;
  }

  .portfolio-layer p {
    font-size: 0.9rem;
    margin-bottom: 15px;
  }

  /* Modal fixes for mobile */
  .modal-content {
    width: 95%;
    max-width: 95%;
    padding: 15px;
    margin: 20px auto;
    max-height: 90vh;
    overflow-y: auto;
  }

  .project-details h2 {
    font-size: 1.3rem;
    text-align: center;
    margin-bottom: 15px;
  }

  .project-description {
    font-size: 0.9rem;
    line-height: 1.5;
    text-align: justify;
    padding: 0 10px;
  }

  .details-section {
    padding: 12px;
    margin-bottom: 15px;
  }

  .details-section h3 {
    font-size: 1rem;
    margin-bottom: 10px;
  }

  .details-section p,
  .details-section li {
    font-size: 0.85rem;
    line-height: 1.4;
  }

  .project-links {
    flex-direction: column;
    gap: 10px;
    padding: 0 10px;
  }

  .project-link {
    justify-content: center;
    text-align: center;
    padding: 10px 15px;
    font-size: 0.9rem;
    width: 100%;
    max-width: 250px;
    margin: 0 auto;
  }

  /* Container and section improvements */
  .container {
    padding: 0 15px;
    max-width: 100%;
    overflow-x: hidden;
  }

  section {
    padding: 60px 0;
  }

  /* Header mobile improvements */
  .header {
    padding: 12px 5%;
    backdrop-filter: blur(10px);
  }

  .logo {
    font-size: 1.5rem;
  }

  /* Navigation improvements */
  .navbar {
    width: 85%;
    max-width: 320px;
  }

  .navbar a {
    margin: 12px 0;
    font-size: 1.1rem;
    padding: 8px 0;
  }

  /* Home section mobile optimization */
  .home {
    padding-top: 100px;
    padding-bottom: 60px;
    min-height: auto;
  }

  .home-content {
    text-align: center;
    margin-bottom: 40px;
    padding: 0 15px;
  }

  /* About section mobile improvements */
  .about-container {
    flex-direction: column;
    gap: 30px;
    padding: 0 15px;
  }

  .education-item,
  .experience-item,
  .certification-item,
  .achievement-item {
    margin-bottom: 15px;
    padding: 15px;
  }

  .education-item h4,
  .experience-item h4,
  .certification-item h4,
  .achievement-item h4 {
    font-size: 1rem;
    margin-bottom: 8px;
  }

  .education-item p,
  .experience-item p,
  .certification-item p,
  .achievement-item p {
    font-size: 0.85rem;
    margin-bottom: 5px;
  }

  .education-item li,
  .experience-item li,
  .achievement-item li {
    font-size: 0.8rem;
    margin-bottom: 5px;
  }

  /* Footer mobile improvements */
  .footer {
    padding: 40px 0 0;
  }

  .footer-content {
    flex-direction: column;
    gap: 25px;
    text-align: center;
    padding: 0 20px;
    align-items: center;
  }

  .footer-logo {
    order: 1;
    margin-bottom: 15px;
  }

  .footer-logo h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
  }

  .footer-contact {
    order: 2;
    padding: 25px 20px;
    margin: 0 10px;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(138, 43, 226, 0.3);
    width: 100%;
    max-width: 350px;
    min-width: auto;
  }

  .footer-contact h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--primary-color);
  }

  .footer-contact p {
    font-size: 0.9rem;
    gap: 10px;
    line-height: 1.5;
    margin-bottom: 12px;
    justify-content: center;
    padding: 5px 0;
  }

  .footer-contact i {
    font-size: 1rem;
    color: var(--secondary-color);
    width: 18px;
    text-align: center;
  }

  .footer-links {
    order: 3;
    margin-top: 10px;
  }

  .footer-links h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--primary-color);
  }

  .footer-links ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
  }

  .footer-links li {
    margin-bottom: 5px;
  }

  .footer-links a {
    font-size: 0.9rem;
    padding: 8px 12px;
    border-radius: 20px;
    background: rgba(138, 43, 226, 0.1);
    border: 1px solid rgba(138, 43, 226, 0.2);
    transition: var(--transition);
    display: inline-block;
  }

  .footer-links a:hover {
    background: rgba(138, 43, 226, 0.2);
    border-color: var(--primary-color);
    transform: translateY(-2px);
  }

  .social-links {
    gap: 12px;
    justify-content: center;
    margin-top: 15px;
  }

  .social-links a {
    width: 35px;
    height: 35px;
    font-size: 0.9rem;
    border-radius: 10px;
    background: rgba(138, 43, 226, 0.15);
    border: 1px solid rgba(138, 43, 226, 0.3);
  }

  .social-links a:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-3px);
  }

  .footer-bottom {
    margin-top: 30px;
    padding: 25px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  .footer-bottom p {
    font-size: 0.85rem;
    color: var(--light-color);
    margin-bottom: 15px;
  }

  .footer-iconTop {
    position: static;
    margin-top: 15px;
    display: inline-block;
  }

  .footer-iconTop a {
    width: 45px;
    height: 45px;
    font-size: 1.1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: 2px solid var(--primary-color);
  }

  /* Prevent horizontal scrolling */
  body {
    overflow-x: hidden;
    max-width: 100vw;
  }

  * {
    max-width: 100%;
    box-sizing: border-box;
  }

  /* Fix any potential layout breaking elements */
  img,
  video {
    max-width: 100%;
    height: auto;
  }

  /* Button improvements */
  .btn {
    padding: 10px 20px;
    font-size: 0.9rem;
    margin: 5px;
  }

  .about-btns .btn {
    width: 100%;
    max-width: 200px;
    text-align: center;
  }
}

/* Very small mobile devices */
@media (max-width: 380px) {
  .home-content h1 {
    font-size: 1.8rem;
    margin-bottom: 8px;
  }

  .home-content h3 {
    font-size: 1.1rem;
    margin-bottom: 12px;
  }

  .home-content p {
    font-size: 0.9rem;
    padding: 0 5px;
  }

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

  .profile-container {
    width: 140px;
    height: 140px;
  }

  .heading {
    font-size: 1.8rem;
    margin-bottom: 25px;
  }

  .about-content h3 {
    font-size: 1.1rem;
  }

  .about-content p {
    font-size: 0.9rem;
    padding: 0 5px;
  }

  .tab-btn {
    padding: 6px 12px;
    font-size: 0.8rem;
    margin: 2px;
  }

  .portfolio-container {
    padding: 0 10px;
    gap: 15px;
  }

  .portfolio-box {
    height: 250px;
    max-width: 320px;
  }

  .portfolio-image-container {
    height: 70%;
  }

  .portfolio-title {
    height: 30%;
    padding: 10px 12px;
  }

  .portfolio-title h3 {
    font-size: 0.8rem;
    line-height: 1.2;
  }

  .modal-content {
    width: 98%;
    padding: 10px;
    margin: 10px auto;
  }

  .project-details h2 {
    font-size: 1.1rem;
  }

  .project-description {
    font-size: 0.85rem;
    padding: 0 5px;
  }

  .details-section {
    padding: 10px;
    margin-bottom: 12px;
  }

  .details-section h3 {
    font-size: 0.9rem;
  }

  .details-section p,
  .details-section li {
    font-size: 0.8rem;
  }

  .project-link {
    padding: 8px 12px;
    font-size: 0.8rem;
    max-width: 220px;
  }

  /* Footer improvements for very small devices */
  .footer {
    padding: 30px 0 0;
  }

  .footer-content {
    padding: 0 15px;
    gap: 20px;
  }

  .footer-contact {
    padding: 20px 15px;
    margin: 0 5px;
    max-width: 320px;
  }

  .footer-contact h3 {
    font-size: 1rem;
    margin-bottom: 15px;
  }

  .footer-contact p {
    font-size: 0.8rem;
    gap: 8px;
    margin-bottom: 10px;
  }

  .footer-contact i {
    font-size: 0.9rem;
    width: 16px;
  }

  .footer-logo h3 {
    font-size: 1.2rem;
  }

  .footer-links h3 {
    font-size: 1rem;
  }

  .footer-links ul {
    gap: 10px;
  }

  .footer-links a {
    font-size: 0.8rem;
    padding: 6px 10px;
  }

  .social-links {
    gap: 10px;
  }

  .social-links a {
    width: 32px;
    height: 32px;
    font-size: 0.8rem;
  }

  .footer-bottom {
    padding: 20px 0;
    margin-top: 25px;
  }

  .footer-bottom p {
    font-size: 0.8rem;
    margin-bottom: 12px;
  }

  .footer-iconTop a {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .btn {
    padding: 8px 16px;
    font-size: 0.8rem;
  }

  /* Improve touch targets */
  .menu-toggle,
  .navbar a,
  .tab-btn,
  .btn,
  .project-link,
  .social-links a {
    min-height: 44px;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

/* Extremely small mobile devices */
@media (max-width: 320px) {
  /* Portfolio fixes for very small screens */
  .portfolio-container {
    padding: 0 8px;
    gap: 12px;
  }

  .portfolio-box {
    height: 230px;
    max-width: 290px;
  }

  .portfolio-image-container {
    height: 68%;
  }

  .portfolio-title {
    height: 32%;
    padding: 8px 10px;
  }

  .portfolio-title h3 {
    font-size: 0.75rem;
    line-height: 1.2;
  }

  /* Footer styles */
  .footer-content {
    padding: 0 10px;
    gap: 15px;
  }

  .footer-contact {
    padding: 15px 12px;
    margin: 0 2px;
    max-width: 280px;
  }

  .footer-contact h3 {
    font-size: 0.95rem;
    margin-bottom: 12px;
  }

  .footer-contact p {
    font-size: 0.75rem;
    gap: 6px;
    margin-bottom: 8px;
  }

  .footer-contact i {
    font-size: 0.8rem;
    width: 14px;
  }

  .footer-logo h3 {
    font-size: 1.1rem;
  }

  .footer-links h3 {
    font-size: 0.95rem;
  }

  .footer-links ul {
    gap: 8px;
  }

  .footer-links a {
    font-size: 0.75rem;
    padding: 5px 8px;
  }

  .social-links {
    gap: 8px;
  }

  .social-links a {
    width: 30px;
    height: 30px;
    font-size: 0.75rem;
  }

  .footer-bottom {
    padding: 15px 0;
    margin-top: 20px;
  }

  .footer-bottom p {
    font-size: 0.75rem;
    margin-bottom: 10px;
  }

  .footer-iconTop a {
    width: 35px;
    height: 35px;
    font-size: 0.9rem;
  }
}

/* Animations */
