/* ===================== Base Variables ===================== */
:root {
  --primary-color: #6c5ce7;
  --secondary-color: #a29bfe;
  --accent-color: #fd79a8;
  --dark-color: #2d3436;
  --light-color: #f5f6fa;
  --text-color: #636e72;
  --white: #ffffff;
  --black: #000000;
  --transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  --shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 15px 30px rgba(0, 0, 0, 0.2);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 62.5%;
}

body {
  font-family: 'Poppins', sans-serif;
  background-color: var(--light-color);
  color: var(--text-color);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* ===================== Background & Floating Elements ===================== */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 20% 50%, rgba(108, 92, 231, 0.1) 0%, rgba(253, 121, 168, 0.05) 100%);
  z-index: -1;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 5%;
}

/* ===================== Typography ===================== */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', sans-serif;
  color: var(--dark-color);
  font-weight: 700;
  line-height: 1.2;
}

h1 { font-size: 5.5rem; margin-bottom: 1.5rem; }
h2 { font-size: 4rem; margin-bottom: 1.5rem; }
h3 { font-size: 3.5rem; margin-bottom: 3rem; position: relative; display: inline-block; }
h3::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 60%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  border-radius: 2px;
}
h4 { font-size: 2.5rem; margin-bottom: 1rem; }
p { font-size: 1.6rem; margin-bottom: 1.5rem; }
a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

/* ===================== Floating Background ===================== */
.floating-background {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: -10;
  pointer-events: none;
}
.glass-circle {
  position: absolute;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(108, 92, 231, 0.35), rgba(253, 121, 168, 0.25));
  backdrop-filter: blur(60px);
  box-shadow: 0 0 60px rgba(253, 121, 168, 0.2), 0 0 120px rgba(108, 92, 231, 0.15);
  animation: float-glow 20s infinite ease-in-out alternate;
}
@keyframes float-glow {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(20px, -30px) scale(1.1); }
  100% { transform: translate(-20px, 30px) scale(1); }
}

/* ===================== Header and Navigation ===================== */
#header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 2rem 5%;
  z-index: 1000;
  transition: var(--transition);
  backdrop-filter: blur(10px);
  background-color: rgba(255, 255, 255, 0.8);
}
#header.scrolled {
  background-color: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow);
  padding: 1.5rem 5%;
}
nav ul {
  display: flex;
  justify-content: center;
  list-style: none;
  gap: 3rem;
}
.nav-link {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--dark-color);
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  transition: var(--transition);
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: var(--transition);
}
.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}
.nav-link.active {
  color: var(--primary-color);
}

/* ===================== Burger Menu ===================== */
.burger-menu {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 30px;
  height: 25px;
  cursor: pointer;
  background: none;
  border: none;
  z-index: 1100;
}
.burger-line {
  height: 3px;
  background: var(--dark-color);
  border-radius: 2px;
  width: 100%;
  transition: var(--transition);
}
.burger-menu.active .burger-line:nth-child(1) {
  transform: rotate(45deg) translateY(8px);
}
.burger-menu.active .burger-line:nth-child(2) {
  opacity: 0;
}
.burger-menu.active .burger-line:nth-child(3) {
  transform: rotate(-45deg) translateY(-8px);
}

/* Navigation Overlay */
.nav-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.4);
  opacity: 0;
  visibility: hidden;
  z-index: 900;
  transition: var(--transition);
}
.nav-overlay.active {
  opacity: 1;
  visibility: visible;
}
.no-scroll {
  overflow: hidden;
}

/* Sections */
section {
  padding: 10rem 5%;
  min-height: 100vh;
  position: relative;
}

/* Hero Section */
.home-section {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 5rem;
  align-items: center;
  width: 100%;
}

.hero-text h1 {
  font-size: 6rem;
  line-height: 1.1;
  margin-bottom: 2rem;
}

.hero-text h1 span {
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-text h2 {
  font-size: 3rem;
  margin-bottom: 3rem;
  color: var(--primary-color);
}

.hero-text p {
  font-size: 1.8rem;
  margin-bottom: 3rem;
  max-width: 600px;
}

.hero-image {
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-circle {
    margin-left: px;
    width: 350px;
    height: 350px;
    border-radius: 50%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    overflow: hidden;
    position: relative;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.8);
    border: 5px solid var(--accent-color); 
    transition: transform 0.5s ease, box-shadow 0.5s ease, filter 0.3s ease;
    animation: bounceIn 1s ease-in-out;
}

.profile-circle::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 50%;
    z-index: -1;
    animation: glow-effect 4s infinite alternate;
}

.profile-circle:hover {
    transform: scale(1.05); 
    box-shadow: 0 20px 40px var(--accent-color); 
    filter: brightness(1.2); 
}

.profile-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    transition: transform 0.5s ease;
}

.profile-circle img:hover {
    transform: scale(1.1); 
}
/* About Section */
.about-section {
  background-color: var(--white);
}

.about-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 5rem;
  margin-bottom: 5rem;
}

.about-text p {
  font-size: 1.7rem;
  margin-bottom: 2rem;
}

.about-image {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.about-image img {
  width: 100%;
  max-width: 400px;
  border-radius: 2rem;
  box-shadow: var(--shadow);
  transition: var(--transition);
  transform: perspective(1000px) rotateX(-5deg);
}

.about-image:hover img {
  transform: perspective(1000px) rotateX(0deg);
  box-shadow: var(--shadow-hover);
}

.skills {
  margin-top: 5rem;
}

.skills h4 {
  margin-bottom: 3rem;
}

.skills ul {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  list-style: none;
}

.skills li {
  background-color: var(--primary-color);
  color: var(--white);
  padding: 1rem 2rem;
  border-radius: 50px;
  font-size: 1.4rem;
  font-weight: 600;
  transition: var(--transition);
}

.skills li:hover {
  background-color: var(--accent-color);
  transform: translateY(-3px);
}

/* Portfolio Section */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 3rem;
  margin-top: 5rem;
}

.portfolio-item {
  position: relative;
  border-radius: 1.5rem;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  aspect-ratio: 1/1;
}

.portfolio-item:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-hover);
}

.portfolio-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.portfolio-overlay {
  position: absolute;
  bottom: -100%;
  left: 0;
  width: 100%;
  padding: 2rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  color: var(--white);
  transition: var(--transition);
}

.portfolio-item:hover .portfolio-overlay {
  bottom: 0;
}

.portfolio-overlay h4 {
  color: var(--white);
  margin-bottom: 0.5rem;
}

.portfolio-overlay p {
  font-size: 1.4rem;
  opacity: 0.9;
}

/* Contact Section */
.contact-section {
  background-color: var(--white);
}

.contact-form {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-top: 5rem;
}

.contact-form div {
  margin-bottom: 2rem;
}

.contact-form label {
  display: block;
  font-size: 1.6rem;
  margin-bottom: 1rem;
  color: var(--dark-color);
  font-weight: 600;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 1.5rem;
  border: 1px solid #ddd;
  border-radius: 0.5rem;
  font-size: 1.6rem;
  font-family: inherit;
  transition: var(--transition);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.2);
}

.contact-form textarea {
  resize: vertical;
  min-height: 150px;
}

.contact-info {
  margin-top: 5rem;
}

.contact-info p {
  font-size: 1.6rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.contact-info a {
  color: var(--primary-color);
  transition: var(--transition);
}

.contact-info a:hover {
  color: var(--accent-color);
}

.social-links {
  display: flex;
  gap: 2rem;
  margin-top: 3rem;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background-color: var(--light-color);
  color: var(--dark-color);
  font-size: 1.8rem;
  transition: var(--transition);
}

.social-links a:hover {
  background-color: var(--primary-color);
  color: var(--white);
  transform: translateY(-3px);
}

/* Buttons */
.btn {
  display: inline-block;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  color: var(--white);
  padding: 1.5rem 3rem;
  border-radius: 50px;
  font-size: 1.6rem;
  font-weight: 600;
  transition: var(--transition);
  box-shadow: var(--shadow);
  border: none;
  cursor: pointer;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  background: linear-gradient(90deg, var(--accent-color), var(--primary-color));
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 3rem;
  right: 3rem;
  width: 5rem;
  height: 5rem;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: var(--white);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2rem;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 999;
}

.back-to-top.active {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-5px) scale(1.1);
  box-shadow: var(--shadow-hover);
}

/* Footer */
footer {
  text-align: center;
  padding: 3rem;
  background-color: var(--dark-color);
  color: var(--white);
  font-size: 1.6rem;
}

/* Animations */
.animate {
  opacity: 0;
  transition: all 0.8s cubic-bezier(0.215, 0.61, 0.355, 1);
}

.animate-from-left {
  transform: translateX(-100px);
}

.animate-from-right {
  transform: translateX(100px);
}

.animate-from-bottom {
  transform: translateY(100px);
}

.animate-from-top {
  transform: translateY(-100px);
}

.animate-scale {
  transform: scale(0.8);
}

.animate.show {
  opacity: 1;
  transform: translateX(0) translateY(0) scale(1);
}

.delay-1 { transition-delay: 0.2s !important; }
.delay-2 { transition-delay: 0.4s !important; }
.delay-3 { transition-delay: 0.6s !important; }
.delay-4 { transition-delay: 0.8s !important; }

@media (max-width: 768px) {
  html { font-size: 55%; }
  h1 { font-size: 4.5rem; }
  h2 { font-size: 3.5rem; }

  /* Show burger */
  .burger-menu {
    display: flex;
    position: absolute;
    top: 2rem;
    right: 5%;
  }

  /* Hide nav links on mobile */
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    flex-direction: column;
    background-color: var(--white);
    width: 250px;
    height: 100vh;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    transition: var(--transition);
    z-index: 1000;
    box-shadow: var(--shadow);
  }

  .nav-links.active {
    right: 0;
  }

  .hero {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-image {
    margin-top: 5rem;
  }

  .contact-form {
    grid-template-columns: 1fr;
  }

  .contact-form div:last-child {
    grid-column: span 1;
  }
  .portfolio-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .portfolio-item {
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
  }

  .portfolio-item:hover {
    transform: translateY(-5px);
  }

  .portfolio-item img {
    width: 100%;
    height: auto;
    display: block;
  }

  .portfolio-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white;
    padding: 1.5rem;
  }

  .portfolio-overlay h3 {
    margin-bottom: 0.5rem;
    font-size: 2rem;
  }

  .portfolio-overlay p {
    font-size: 1.4rem;
    margin-bottom: 1rem;
  }

  /* Add some breathing room between sections */
  section {
    padding: 8rem 5%;
  }
}

@media (max-width: 480px) {
  html { font-size: 50%; }
  section { padding: 8rem 3%; }
  .skills ul {
    justify-content: center;
  }
  .portfolio-item {
    margin-bottom: 2rem;
  }

  /* Improve typography hierarchy */
  h1 { font-size: 3.8rem; }
  h2 { font-size: 3rem; }
  h3 { font-size: 2.5rem; }
  p, li { font-size: 1.6rem; }
}
/* Add this to your existing CSS */
.animate {
  opacity: 0;
  transition: all 0.8s cubic-bezier(0.215, 0.61, 0.355, 1);
  /* Ensure transforms are properly reset */
  transform: translate3d(0, 0, 0);
}

/* For specific animation types */
.animate-from-left {
  transform: translate3d(-100px, 0, 0);
}
.animate-from-right {
  transform: translate3d(100px, 0, 0);
}
.animate-from-bottom {
  transform: translate3d(0, 100px, 0);
}
.animate-from-top {
  transform: translate3d(0, -100px, 0);
}
.animate-scale {
  transform: translate3d(0, 0, 0) scale(0.8);
}

.animate.show {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
}