/* Reset & Base Styles with Animation Support */
:root {
  --primary: #6e8efb;
  --secondary: #a777e3;
  --accent: #ffd700;
  --dark: #333;
  --light: #f9f9f9;
  --text: #555;
  --shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  --transition: all 0.5s cubic-bezier(0.65, 0, 0.35, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', 'Arial', sans-serif;
}

body {
  line-height: 1.6;
  color: var(--dark);
  background-color: var(--light);
  overflow-x: hidden;
}

/* Smooth Scroll */
html {
  scroll-behavior: smooth;
}

/* Preloader */
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: white;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s, visibility 0.5s;
}

.preloader .loader {
  width: 50px;
  height: 50px;
  border: 5px solid var(--primary);
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  100% {
    transform: rotate(360deg);
  }
}

/* Navigation with Logo */
nav {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  transition: var(--transition);
}

nav.scrolled {
  padding: 0.5rem 0;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

nav ul {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  list-style: none;
  padding: 1.5rem;
  transition: var(--transition);
}

nav.scrolled ul {
  padding: 0.5rem;
}

.logo {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--primary);
  text-decoration: none;
  margin-right: auto;
  padding-left: 2rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: var(--transition);
}

.logo:hover {
  transform: scale(1.05);
}

nav ul li {
  position: relative;
  margin: 0 1.5rem;
}

nav ul li a {
  text-decoration: none;
  color: var(--dark);
  font-weight: 600;
  font-size: 1.1rem;
  transition: var(--transition);
  position: relative;
  padding: 0.5rem 0;
}

nav ul li a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transition: var(--transition);
}

nav ul li a:hover::after {
  width: 100%;
}

nav ul li a.active::after {
  width: 100%;
}

/* Hamburger Menu (Mobile) */
.menu-toggle {
  display: none;
  cursor: pointer;
  padding: 1rem;
  position: absolute;
  right: 1rem;
  top: 1rem;
}

.bar {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px auto;
  background-color: var(--dark);
  transition: var(--transition);
}

/* Hero Section */
.hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  padding-top: 80px;
}

.hero::before {
  content: '';
  position: absolute;
  width: 300%;
  height: 300%;
  top: -100%;
  left: -100%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 70%);
  transform: rotate(30deg);
  animation: bubble 15s infinite linear;
}

.hero-content {
  position: relative;
  z-index: 1;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 1s cubic-bezier(0.65, 0, 0.35, 1) forwards;
  animation-delay: 0.3s;
}

.hero h1 {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  font-weight: 700;
  text-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.hero p {
  font-size: 1.5rem;
  max-width: 700px;
  margin: 0 auto 2rem;
  opacity: 0.9;
}

.highlight {
  color: var(--accent);
  position: relative;
  display: inline-block;
}

.highlight::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 10px;
  bottom: 5px;
  left: 0;
  background-color: var(--accent);
  opacity: 0.3;
  z-index: -1;
  border-radius: 20px;
}

/* About Section */
.about {
  background-color: #fff;
  position: relative;
  overflow: hidden;
  padding: 100px 0;
}

.about::before {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(110, 142, 251, 0.1) 0%, rgba(110, 142, 251, 0) 70%);
  top: -250px;
  right: -250px;
  z-index: 0;
}

.about::after {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(167, 119, 227, 0.1) 0%, rgba(167, 119, 227, 0) 70%);
  bottom: -150px;
  left: -150px;
  z-index: 0;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.section-title {
  text-align: center;
  font-size: 3rem;
  margin-bottom: 5rem;
  position: relative;
  display: inline-block;
  left: 50%;
  transform: translateX(-50%);
}

.section-title span {
  color: var(--primary);
}

.section-title::after {
  content: '';
  position: absolute;
  width: 50%;
  height: 4px;
  bottom: -10px;
  left: 25%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 2px;
}

.about-content {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5rem;
}

.about-img {
  flex: 1 1 300px;
  text-align: center;
  position: relative;
  opacity: 0;
  transform: translateX(-50px);
  animation: fadeRight 1s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

.about-img img {
  width: 100%;
  max-width: 400px;
  border-radius: 10px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  position: relative;
  z-index: 1;
}

.about-img:hover img {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.about-img::before {
  content: '';
  position: absolute;
  width: 90%;
  height: 100%;
  border: 6px solid var(--primary);
  border-radius: 10px;
  top: -5px;
  left: 20px;
  z-index: 0;
  transition: var(--transition);
}

.about-img:hover::before {
  top: 15px;
  left: 15px;
}

.about-text {
  flex: 1 1 500px;
  opacity: 0;
  transform: translateX(50px);
  animation: fadeLeft 1s cubic-bezier(0.65, 0, 0.35, 1) forwards;
  animation-delay: 0.3s;
}

.about-text h3 {
  font-size: 2rem;
  margin-bottom: 2rem;
  color: var(--dark);
  position: relative;
  display: inline-block;
}

.about-text h3::after {
  content: '';
  position: absolute;
  width: 50%;
  height: 3px;
  bottom: -10px;
  left: 0;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 2px;
}

.about-text p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 2rem;
}

/* Skills */
.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 2rem 0;
}

.skill-tags span {
  background: rgba(110, 142, 251, 0.1);
  padding: 0.5rem 1.5rem;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--primary);
  transition: var(--transition);
  opacity: 0;
  transform: translateY(20px);
}

.skill-tags span:nth-child(1) { animation: fadeUp 0.5s ease-out forwards; animation-delay: 0.6s; }
.skill-tags span:nth-child(2) { animation: fadeUp 0.5s ease-out forwards; animation-delay: 0.7s; }
.skill-tags span:nth-child(3) { animation: fadeUp 0.5s ease-out forwards; animation-delay: 0.8s; }
.skill-tags span:nth-child(4) { animation: fadeUp 0.5s ease-out forwards; animation-delay: 0.9s; }
.skill-tags span:nth-child(5) { animation: fadeUp 0.5s ease-out forwards; animation-delay: 1.0s; }
.skill-tags span:nth-child(6) { animation: fadeUp 0.5s ease-out forwards; animation-delay: 1.1s; }
.skill-tags span:nth-child(7) { animation: fadeUp 0.5s ease-out forwards; animation-delay: 1.2s; }
.skill-tags span:nth-child(8) { animation: fadeUp 0.5s ease-out forwards; animation-delay: 1.3s; }

.skill-tags span:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-3px);
}

/* Projects Section */
.projects {
  background-color: var(--light);
  position: relative;
  overflow: hidden;
  padding: 100px 0;
  z-index: 1;
}

.projects::before {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(110, 142, 251, 0.1) 0%, rgba(110, 142, 251, 0) 70%);
  top: -150px;
  left: -150px;
  z-index: 0;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.project-card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  opacity: 0;
  transform: translateY(30px);
  position: relative;
}

.project-card.animate {
  animation: fadeUp 0.8s cubic-bezier(0.65, 0, 0.35, 1) forwards;
  opacity: 1 !important;
  transform: translateY(0) !important;
}

.project-card:nth-child(1) { animation-delay: 0.2s; }
.project-card:nth-child(2) { animation-delay: 0.4s; }
.project-card:nth-child(3) { animation-delay: 0.6s; }
.project-card:nth-child(4) { animation-delay: 0.8s; }

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.project-card img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  transition: var(--transition);
}

.project-card:hover img {
  transform: scale(1.05);
}

.project-info {
  padding: 1.5rem;
}

.project-info h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--dark);
}

.project-info p {
  color: var(--text);
  margin-bottom: 1.5rem;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.project-tech span {
  background: rgba(110, 142, 251, 0.1);
  padding: 0.3rem 0.8rem;
  border-radius: 50px;
  font-size: 0.8rem;
  color: var(--primary);
}

.project-links {
  display: flex;
  gap: 1rem;
}

.project-links a {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1.5rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}

.project-links a:first-child {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
}

.project-links a:last-child {
  border: 1px solid var(--primary);
  color: var(--primary);
}

.project-links a:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.project-links a i {
  margin-left: 0.5rem;
}

/* Contact Section */
.contact {
  background-color: #fff;
  position: relative;
  overflow: hidden;
  padding: 100px 0;
}

.contact::before {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(167, 119, 227, 0.1) 0%, rgba(167, 119, 227, 0) 70%);
  top: -200px;
  right: -200px;
  z-index: 0;
}

.contact-content {
  display: flex;
  flex-wrap: wrap;
  gap: 3rem;
  justify-content: center;
}

.contact-info {
  flex: 1 1 300px;
  background: #fff;
  padding: 3rem;
  border-radius: 10px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  opacity: 0;
  transform: translateX(-50px);
  animation: fadeRight 1s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

.contact-info:hover {
  transform: translateY(-10px) !important;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.info-box {
  margin-bottom: 2rem;
  position: relative;
  padding-left: 3rem;
}

.info-box i {
  font-size: 1.5rem;
  color: var(--primary);
  position: absolute;
  left: 0;
  top: 0;
}

.info-box h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: var(--dark);
}

.info-box p {
  color: var(--text);
  line-height: 1.6;
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  background: rgba(110, 142, 251, 0.1);
  border-radius: 50%;
  color: var(--primary);
  transition: var(--transition);
  font-size: 1.2rem;
}

.social-links a:hover {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  transform: translateY(-5px);
}

.contact-form {
  flex: 1 1 500px;
  background: #fff;
  padding: 3rem;
  border-radius: 10px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  opacity: 0;
  transform: translateX(50px);
  animation: fadeLeft 1s cubic-bezier(0.65, 0, 0.35, 1) forwards;
  animation-delay: 0.3s;
}

.contact-form:hover {
  transform: translateY(-10px) !important;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.input-group {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 1rem;
  margin-bottom: 1rem;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 1rem;
  transition: var(--transition);
  background: rgba(110, 142, 251, 0.05);
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(110, 142, 251, 0.2);
  background: white;
}

.contact-form textarea {
  min-height: 150px;
  resize: vertical;
}

/* Button */
.btn {
  display: inline-flex;
  align-items: center;
  padding: 1rem 2.5rem;
  background: white;
  color: var(--dark);
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  margin-top: 2rem;
  transition: var(--transition);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
  border: none;
  cursor: pointer;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  z-index: -1;
  transition: var(--transition);
  opacity: 0;
}

.btn:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
  color: white;
}

.btn:hover::before {
  opacity: 1;
}

.btn i {
  margin-left: 0.5rem;
  transition: var(--transition);
}

.btn:hover i {
  transform: translateX(5px);
}

/* Footer */
footer {
  background: var(--dark);
  color: white;
  text-align: center;
  padding: 2rem;
  position: relative;
}

footer p {
  margin-bottom: 1rem;
}

.back-to-top {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 50%;
  color: white;
  font-size: 1.5rem;
  margin-top: 1rem;
  transition: var(--transition);
}

.back-to-top:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Animations */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeRight {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeLeft {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes bubble {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes floating {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-15px);
  }
  100% {
    transform: translateY(0px);
  }
}

/* Responsive Design */
@media (max-width: 992px) {
  .hero h1 {
    font-size: 3rem;
  }
  
  .section-title {
    font-size: 2.5rem;
  }

  .about-img::before {
    content: '';
    position: absolute;
    width: 58%;
    height: 100%;
    border: 6px solid var(--primary);
    border-radius: 10px;
    top: -6px;
    left: 140px;
    z-index: 0;
    transition: var(--transition);
  }

  .logo {
    position: block;
    top: 120px;
    padding: 50px;
    font-size: 1.9rem;
  }

}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
    top: -0.5rem;
  }
  
  nav ul {
    position: fixed;
    top: 42px;
    left: -100%;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    background: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    transition: var(--transition);
  }
  
  nav ul.active {
    left: 0;
  }
  
  .logo {
    position: block;
    left: 1rem;
    top: 1.9rem;
    font-size: 1.5rem;
  }
  
  nav ul li {
    margin: 1rem 0;
    width: 100%;
  }
  
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .hero p {
    font-size: 1.2rem;
  }
  
  .section-title {
    font-size: 2rem;
    margin-bottom: 3rem;
  }
  
  .about-content {
    flex-direction: column;
    gap: 3rem;
  }
  
  .contact-content {
    flex-direction: column;
  }
  
  .input-group {
    flex-direction: column;
    gap: 0;
  }

  .about-img::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border: 6px solid var(--primary);
    border-radius: 10px;
    top: -6px;
    left: -5px;
    z-index: 0;
    transition: var(--transition);
  }

}

@media (max-width: 576px) {
  .menu-toggle {
    display: block;
    top: -0.8rem;
  }

  .hero h1 {
    font-size: 2rem;
  }
  
  .project-grid {
    grid-template-columns: 1fr;
  }
  
  .section-title {
    font-size: 1.8rem;
  }
  
  .logo {
    font-size: 1.2rem;
  }

  .about-img::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border: 6px solid var(--primary);
    border-radius: 10px;
    top: -6px;
    left: -5px;
    z-index: 0;
    transition: var(--transition);
  }

  nav ul {
    position: fixed;
    top: 35px;
    left: -100%;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    background: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    transition: var(--transition);
  }
  

}