/* Base Styles */
:root {
  --primary-color: #2563eb;
  --secondary-color: #1e40af;
  --dark-color: #0f172a;
  --light-color: #f8fafc;
  --gray-color: #94a3b8;
  --transition: all 0.3s ease;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Roboto', sans-serif;
  line-height: 1.6;
  color: var(--dark-color);
  background-color: var(--light-color);
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(37, 99, 235, 0.05) 0%, transparent 20%),
    radial-gradient(circle at 90% 80%, rgba(30, 64, 175, 0.05) 0%, transparent 20%),
    radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.8) 0%, transparent 30%);
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

.section-padding {
  padding: 100px 0;
  position: relative;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.section-padding.visible {
  opacity: 1;
  transform: scale(1);
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 60px;
  position: relative;
  font-weight: 700;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.section-padding.visible .section-title {
  opacity: 1;
  transform: translateY(0);
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: var(--primary-color);
  border-radius: 2px;
}

.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
  border: none;
  cursor: pointer;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.primary-btn {
  background: var(--primary-color);
  color: white;
}

.primary-btn:hover {
  background: var(--secondary-color);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.secondary-btn {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.secondary-btn:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-3px);
}

/* Header & Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow);
  z-index: 1000;
  transition: var(--transition);
  backdrop-filter: blur(10px);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

.nav-logo {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
}

.nav-menu {
  display: flex;
  list-style: none;
}

.nav-item:not(:last-child) {
  margin-right: 30px;
}

.nav-link {
  text-decoration: none;
  color: var(--dark-color);
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

.nav-link:hover {
  color: var(--primary-color);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: var(--transition);
}

.nav-link:hover::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.bar {
  width: 25px;
  height: 3px;
  background: var(--dark-color);
  margin: 3px 0;
  transition: var(--transition);
}

/* Hero Section */
.hero {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 10% 20%, rgba(37, 99, 235, 0.1) 0%, transparent 20%),
    radial-gradient(circle at 90% 80%, rgba(30, 64, 175, 0.1) 0%, transparent 20%);
  z-index: -1;
}

.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    linear-gradient(45deg, #f0f9ff 25%, transparent 25%, transparent 75%, #f0f9ff 75%),
    linear-gradient(45deg, #f0f9ff 25%, transparent 25%, transparent 75%, #f0f9ff 75%);
  background-size: 60px 60px;
  background-position: 0 0, 30px 30px;
  opacity: 0.3;
  z-index: -2;
}

.hero-container {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: 0 20px;
  animation: zoomIn 1s ease;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 15px;
  color: var(--dark-color);
  text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.hero-subtitle {
  font-size: 1.5rem;
  margin-bottom: 30px;
  color: var(--gray-color);
  animation: fadeInUp 1s ease;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 40px;
  animation: fadeIn 1.5s ease;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: white;
  color: var(--primary-color);
  font-size: 1.2rem;
  transition: var(--transition);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(20px);
}

.social-links a:nth-child(1) { animation: fadeInUp 0.5s ease 0.3s forwards; }
.social-links a:nth-child(2) { animation: fadeInUp 0.5s ease 0.5s forwards; }
.social-links a:nth-child(3) { animation: fadeInUp 0.5s ease 0.7s forwards; }
.social-links a:nth-child(4) { animation: fadeInUp 0.5s ease 0.9s forwards; }

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

/* About Section */
.about {
  background: 
    radial-gradient(circle at 15% 80%, rgba(37, 99, 235, 0.05) 0%, transparent 15%),
    radial-gradient(circle at 85% 20%, rgba(30, 64, 175, 0.05) 0%, transparent 15%);
}

.about-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
}

.about-text p {
  margin-bottom: 20px;
  font-size: 1.1rem;
  color: #334155;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.section-padding.visible .about-text p {
  opacity: 1;
  transform: translateY(0);
}

.about-info {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 15px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.info-item:nth-child(1) { transition-delay: 0.1s; }
.info-item:nth-child(2) { transition-delay: 0.2s; }
.info-item:nth-child(3) { transition-delay: 0.3s; }

.section-padding.visible .info-item {
  opacity: 1;
  transform: translateY(0);
}

.info-item i {
  font-size: 1.2rem;
  color: var(--primary-color);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(37, 99, 235, 0.1);
  border-radius: 50%;
}

/* Education Section */
.education-timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.education {
  background: 
    linear-gradient(to bottom, transparent 50%, rgba(37, 99, 235, 0.03) 100%);
}

.education-timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
  left: 50%;
  margin-left: -2px;
  border-radius: 2px;
}

.education-item {
  position: relative;
  margin-bottom: 50px;
  width: 100%;
  padding: 0 40px;
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.education-item:nth-child(1) { transition-delay: 0.1s; }
.education-item:nth-child(2) { transition-delay: 0.3s; }

.section-padding.visible .education-item {
  opacity: 1;
  transform: scale(1);
}

.education-item:nth-child(odd) {
  padding-right: calc(50% + 40px);
  text-align: right;
}

.education-item:nth-child(even) {
  padding-left: calc(50% + 40px);
}

.education-date {
  display: inline-block;
  padding: 5px 15px;
  background: var(--primary-color);
  color: white;
  border-radius: 20px;
  font-weight: 500;
  margin-bottom: 15px;
}

.education-title {
  font-size: 1.4rem;
  margin-bottom: 10px;
  color: var(--dark-color);
}

.education-institute {
  font-size: 1.1rem;
  color: var(--gray-color);
  margin-bottom: 10px;
}

.education-grade {
  font-weight: 500;
  color: var(--secondary-color);
}

/* Experience Section */
.experience {
  background: 
    radial-gradient(circle at 50% 10%, rgba(30, 64, 175, 0.05) 0%, transparent 10%);
}

.experience-item {
  max-width: 800px;
  margin: 0 auto;
  padding: 30px;
  background: white;
  border-radius: 10px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.6s ease, transform 0.6s ease;
  border-top: 4px solid var(--primary-color);
}

.section-padding.visible .experience-item {
  opacity: 1;
  transform: scale(1);
}

.experience-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.experience-date {
  display: inline-block;
  padding: 5px 15px;
  background: var(--primary-color);
  color: white;
  border-radius: 20px;
  font-weight: 500;
  margin-bottom: 15px;
}

.experience-title {
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.experience-company {
  font-size: 1.2rem;
  color: var(--gray-color);
  margin-bottom: 20px;
}

.experience-details {
  list-style-type: none;
}

.experience-details li {
  position: relative;
  padding-left: 30px;
  margin-bottom: 15px;
}

.experience-details li::before {
  content: '▹';
  position: absolute;
  left: 0;
  color: var(--primary-color);
  font-size: 1.2rem;
}

/* Projects Section */
.projects {
  background: 
    radial-gradient(circle at 90% 90%, rgba(37, 99, 235, 0.05) 0%, transparent 15%);
}

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

.project-card {
  background: white;
  border-radius: 10px;
  padding: 30px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  opacity: 0;
  transform: scale(0.9);
}

.project-card:nth-child(1) { 
  transition: opacity 0.6s ease, transform 0.6s ease;
  transition-delay: 0.1s;
}

.project-card:nth-child(2) { 
  transition: opacity 0.6s ease, transform 0.6s ease;
  transition-delay: 0.3s;
}

.section-padding.visible .project-card {
  opacity: 1;
  transform: scale(1);
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.project-title {
  font-size: 1.4rem;
  margin-bottom: 10px;
  color: var(--dark-color);
}

.project-tech {
  color: var(--primary-color);
  font-weight: 500;
  margin-bottom: 20px;
}

.project-details {
  list-style-type: none;
}

.project-details li {
  position: relative;
  padding-left: 30px;
  margin-bottom: 15px;
}

.project-details li::before {
  content: '▹';
  position: absolute;
  left: 0;
  color: var(--primary-color);
  font-size: 1.2rem;
}

.project-details a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
}

.project-details a:hover {
  text-decoration: underline;
}

/* Skills Section */
.skills {
  background: 
    linear-gradient(to bottom, rgba(37, 99, 235, 0.03) 0%, transparent 30%),
    radial-gradient(circle at 10% 90%, rgba(30, 64, 175, 0.05) 0%, transparent 15%);
}

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

.skill-category {
  background: white;
  padding: 25px;
  border-radius: 10px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  opacity: 0;
  transform: scale(0.9);
}

.skill-category:nth-child(1) { transition: opacity 0.6s ease, transform 0.6s ease; transition-delay: 0.1s; }
.skill-category:nth-child(2) { transition: opacity 0.6s ease, transform 0.6s ease; transition-delay: 0.2s; }
.skill-category:nth-child(3) { transition: opacity 0.6s ease, transform 0.6s ease; transition-delay: 0.3s; }
.skill-category:nth-child(4) { transition: opacity 0.6s ease, transform 0.6s ease; transition-delay: 0.4s; }
.skill-category:nth-child(5) { transition: opacity 0.6s ease, transform 0.6s ease; transition-delay: 0.5s; }
.skill-category:nth-child(6) { transition: opacity 0.6s ease, transform 0.6s ease; transition-delay: 0.6s; }

.section-padding.visible .skill-category {
  opacity: 1;
  transform: scale(1);
}

.skill-category:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.skill-category h3 {
  font-size: 1.3rem;
  margin-bottom: 15px;
  color: var(--primary-color);
}

.skill-category p {
  color: #334155;
}

.competitive-programming ul {
  list-style-type: none;
  max-width: 800px;
  margin: 0 auto;
}

.competitive-programming li {
  position: relative;
  padding-left: 30px;
  margin-bottom: 15px;
}

.competitive-programming li::before {
  content: '▹';
  position: absolute;
  left: 0;
  color: var(--primary-color);
  font-size: 1.2rem;
}

/* Contact Section */
.contact {
  background: 
    radial-gradient(circle at 50% 90%, rgba(37, 99, 235, 0.05) 0%, transparent 15%);
}

.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
}

.contact-info h3 {
  font-size: 1.8rem;
  margin-bottom: 20px;
}

.contact-info p {
  margin-bottom: 30px;
  color: #334155;
  font-size: 1.1rem;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 15px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.contact-item:nth-child(1) { transition-delay: 0.1s; }
.contact-item:nth-child(2) { transition-delay: 0.2s; }
.contact-item:nth-child(3) { transition-delay: 0.3s; }
.contact-item:nth-child(4) { transition-delay: 0.4s; }

.section-padding.visible .contact-item {
  opacity: 1;
  transform: translateY(0);
}

.contact-item i {
  font-size: 1.2rem;
  color: var(--primary-color);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(37, 99, 235, 0.1);
  border-radius: 50%;
}

.contact-item a {
  text-decoration: none;
  color: var(--dark-color);
  font-size: 1.1rem;
  transition: var(--transition);
}

.contact-item a:hover {
  color: var(--primary-color);
}

.contact-form .form-group {
  margin-bottom: 20px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.contact-form .form-group:nth-child(1) { transition-delay: 0.2s; }
.contact-form .form-group:nth-child(2) { transition-delay: 0.3s; }
.contact-form .form-group:nth-child(3) { transition-delay: 0.4s; }

.section-padding.visible .contact-form .form-group {
  opacity: 1;
  transform: translateY(0);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 15px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  font-family: 'Roboto', sans-serif;
  font-size: 1rem;
  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(37, 99, 235, 0.2);
}

/* Footer */
footer {
  background: var(--dark-color);
  color: white;
  text-align: center;
  padding: 30px 0;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

footer.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Animations */
@keyframes float {
  0% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-20px) rotate(10deg);
  }
  100% {
    transform: translateY(0px) rotate(0deg);
  }
}

@keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale(0.5);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

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

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* Floating Elements in Hero Section */
.floating {
  position: absolute;
  z-index: 1;
  animation: float 6s ease-in-out infinite;
}

.floating-1 {
  top: 10%;
  left: 10%;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.2), rgba(30, 64, 175, 0.2));
  animation-delay: 0s;
}

.floating-2 {
  top: 20%;
  right: 15%;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.3), rgba(30, 64, 175, 0.3));
  animation-delay: 1s;
}

.floating-3 {
  bottom: 20%;
  left: 15%;
  width: 50px;
  height: 50px;
  border-radius: 15px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.25), rgba(30, 64, 175, 0.25));
  animation-delay: 2s;
  transform: rotate(45deg);
}

.floating-4 {
  bottom: 15%;
  right: 10%;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.15), rgba(30, 64, 175, 0.15));
  animation-delay: 3s;
}

/* Responsive Design */
@media screen and (max-width: 992px) {
  .hero-title {
    font-size: 3rem;
  }
  
  .about-content {
    grid-template-columns: 1fr;
  }
  
  .contact-content {
    grid-template-columns: 1fr;
  }
}

@media screen and (max-width: 768px) {
  .nav-menu {
    position: fixed;
    left: -100%;
    top: 70px;
    flex-direction: column;
    background-color: white;
    width: 100%;
    text-align: center;
    transition: 0.3s;
    box-shadow: var(--shadow);
    padding: 20px 0;
  }

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

  .nav-item {
    margin: 15px 0;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-toggle.active .bar:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .nav-toggle.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    font-size: 1.2rem;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .education-item:nth-child(odd),
  .education-item:nth-child(even) {
    padding: 0 40px;
    text-align: left;
  }

  .education-timeline::before {
    left: 31px;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

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

@media screen and (max-width: 576px) {
  .section-padding {
    padding: 60px 0;
  }

  .section-title {
    font-size: 2rem;
  }

  .hero-title {
    font-size: 2rem;
  }

  .container {
    width: 95%;
  }
}