:root {
  --primary: #6366f1;
  --primary-light: #818cf8;
  --secondary: #f59e0b;
  --dark: #1e293b;
  --light: #ffffff;
  --gray: #94a3b8;
  --success: #10b981;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

body {
  background-color: var(--light);
  color: var(--dark);
  overflow-x: hidden;
  scroll-behavior: smooth;
}

/* Header Styles */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 5%;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: all 0.3s ease;
}

header.scrolled {
  padding: 1rem 5%;
  background: rgba(255, 255, 255, 0.95);
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo i {
  font-size: 1.8rem;
}

nav {
  display: flex;
  gap: 2rem;
}

nav a {
  color: var(--dark);
  text-decoration: none;
  font-weight: 500;
  position: relative;
  transition: all 0.3s ease;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s ease;
}

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

nav a:hover::after {
  width: 100%;
}

.menu-btn {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--dark);
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 6rem 0;
  position: relative;
  overflow: hidden;
}

.hero-container {
  position: relative;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5%;
}

.hero-content {
  position: relative;
  z-index: 10;
  max-width: 600px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(5px);
  padding: 2rem;
  border-radius: 15px;
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  line-height: 1.2;
}

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

.typewriter {
  font-size: 1.8rem;
  font-weight: 400;
  color: var(--gray);
  margin-bottom: 1.5rem;
  min-height: 60px;
}

.hero p {
  font-size: 1.1rem;
  color: var(--gray);
  margin-bottom: 2rem;
  line-height: 1.6;
}

.btn {
  display: inline-block;
  background: var(--primary);
  color: white;
  padding: 0.8rem 2rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn:hover {
  background: var(--primary-light);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
  margin-left: 1rem;
}

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

.socials {
  display: flex;
  gap: 1rem;
  margin: 2rem 0;
}

.socials a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: white;
  color: var(--primary);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

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

/* Hero Image */
.hero-image {
  position: relative;
  width: 400px;
  height: 400px;
  z-index: 1;
}

.floating-image {
  animation: float 6s ease-in-out infinite;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 30px rgba(0, 0, 0, 0.2);
}

.floating-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

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

/* Floating Cards */
.floating-card {
  animation: float-card 4s ease-in-out infinite;
  transition: all 0.3s ease;
}

.floating-card:hover {
  animation-play-state: paused;
  transform: translateY(-10px) !important;
}

@keyframes float-card {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}

/* Floating Buttons */
.float-btn {
  transition: all 0.3s ease;
  animation: float-btn 3s ease-in-out infinite;
}

.float-btn:hover {
  animation-play-state: paused;
  transform: translateY(-5px) !important;
}

@keyframes float-btn {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-5px); }
  100% { transform: translateY(0px); }
}

/* Floating Social Icons */
.float {
  animation: float-social 5s ease-in-out infinite;
  transition: all 0.3s ease;
}

.float:hover {
  animation-play-state: paused;
  transform: translateY(-5px) !important;
}

@keyframes float-social {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
  100% { transform: translateY(0px); }
}

/* Motion Text */
.motion-text {
  display: inline-block;
  animation: motion-text 1s ease-in-out infinite alternate;
}

@keyframes motion-text {
  from { transform: translateY(0); }
  to { transform: translateY(-5px); }
}

/* Sections */
section {
  padding: 6rem 0;
  position: relative;
  scroll-margin-top: 100px;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 5%;
}

.section-title {
  text-align: center;
  margin-bottom: 4rem;
  position: relative;
}

.section-title h2 {
  font-size: 2.5rem;
  color: var(--dark);
  display: inline-block;
}

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

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

.about-img {
  flex: 1;
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 30px rgba(0, 0, 0, 0.1);
  max-width: 400px;
}

.about-img img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.5s ease;
}

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

.about-text {
  flex: 1;
}

.about-text h3 {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  color: var(--dark);
}

.about-text p {
  color: var(--gray);
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

/* Skills */
.skills {
  margin-top: 2rem;
}

.skill-item {
  margin-bottom: 1.5rem;
}

.skill-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.skill-bar {
  height: 10px;
  background: #e2e8f0;
  border-radius: 5px;
  overflow: hidden;
}

.skill-progress {
  height: 100%;
  background: var(--primary);
  border-radius: 5px;
  width: 0;
  transition: width 1.5s ease;
}

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

.skill-category {
  background: white;
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.skill-category h3 {
  font-size: 1.3rem;
  margin-bottom: 1.5rem;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Projects Section */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
}

.project-card {
  background: white;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.project-img {
  height: 220px;
  overflow: hidden;
}

.project-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.project-card:hover .project-img img {
  transform: scale(1.1);
}

.project-info {
  padding: 1.5rem;
}

.project-info h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  color: var(--dark);
}

.project-info p {
  color: var(--gray);
  margin-bottom: 1rem;
  line-height: 1.6;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.project-tag {
  background: #e0e7ff;
  color: var(--primary);
  padding: 0.3rem 0.8rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 500;
}

.project-links {
  display: flex;
  gap: 1rem;
}

.project-links a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

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

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

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 100%;
  background: var(--primary);
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  width: 50%;
  padding: 1.5rem 2.5rem;
  box-sizing: border-box;
}

.timeline-item:nth-child(odd) {
  left: 0;
}

.timeline-item:nth-child(even) {
  left: 50%;
}

.timeline-item::after {
  content: '';
  position: absolute;
  top: 2rem;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: white;
  border: 4px solid var(--primary);
  box-sizing: border-box;
}

.timeline-item:nth-child(odd)::after {
  right: -12px;
}

.timeline-item:nth-child(even)::after {
  left: -12px;
}

.timeline-content {
  background: white;
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.timeline-content h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: var(--primary);
}

.timeline-content h4 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: var(--dark);
}

.timeline-content p {
  color: var(--gray);
  font-size: 0.9rem;
}

.timeline-date {
  display: block;
  font-weight: 600;
  color: var(--primary-light);
  margin-bottom: 0.5rem;
}

/* Contact Section */
.contact-container {
  display: flex;
  gap: 3rem;
}

.contact-info {
  flex: 1;
  background: white;
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.contact-info h3 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--dark);
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.contact-icon {
  width: 50px;
  height: 50px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.contact-text h4 {
  font-size: 1.1rem;
  color: var(--dark);
  margin-bottom: 0.3rem;
}

.contact-text p {
  color: var(--gray);
}

.contact-form {
  flex: 1;
  background: white;
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--dark);
  font-weight: 500;
}

.form-control {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

textarea.form-control {
  min-height: 150px;
  resize: vertical;
}
/* Footer */
footer {
  background: var(--dark);
  color: white;
  padding: 2rem 5%;
  text-align: center;
}

.footer-content {
  max-width: 800px;
  margin: 0 auto;
}

.footer-logo {
  font-size: 1.8rem;
  font-weight: 700;
  color: white;
  margin-bottom: 1.5rem;
  display: inline-block;
}

/* Horizontal links container */
.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

/* Remove links-column division since we want horizontal */
.footer-links a {
  color: var(--gray);
  text-decoration: none;
  transition: color 0.3s ease;
  font-size: 0.95rem;
  white-space: nowrap; /* Prevents text wrapping */
  padding: 0.3rem 0.5rem; /* Better touch targets */
}

.footer-links a:hover {
  color: white;
}

/* Social icons - horizontal */
.footer-socials {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.footer-socials a {
  color: white;
  font-size: 1.3rem;
  transition: color 0.3s ease;
  padding: 0.3rem;
}

.footer-socials a:hover {
  color: var(--primary-light);
}

.copyright {
  color: var(--gray);
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

/* Mobile adjustments for horizontal layout */
@media (max-width: 600px) {
  .footer-links {
    gap: 0.8rem;
    margin-bottom: 1.5rem;
  }
  
  .footer-links a {
    font-size: 0.85rem;
    padding: 0.2rem 0.4rem;
  }
  
  .footer-socials {
    gap: 1rem;
  }
  
  .footer-socials a {
    font-size: 1.2rem;
  }
  
  .footer-logo {
    font-size: 1.6rem;
    margin-bottom: 1.2rem;
  }
}
/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 5px 20px rgba(99, 102, 241, 0.3);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 999;
}

.back-to-top.active {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--primary-light);
  transform: translateY(-3px);
}

/* Responsive Styles */
@media (max-width: 1200px) {
  .hero-image {
    width: 350px;
    height: 350px;
  }
}

@media (max-width: 992px) {
  .hero-image {
    display: none;
  }

  .hero-content {
    text-align: center;
    max-width: 100%;
    margin: 0 auto;
  }

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

  .about-img {
    max-width: 400px;
    margin-bottom: 2rem;
  }

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

@media (max-width: 768px) {
  nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    height: 100vh;
    background: white;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    transition: right 0.3s ease;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
    z-index: 999;
  }

  nav.active {
    right: 0;
  }

  .menu-btn {
    display: block;
    z-index: 1000;
  }

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

  .typewriter {
    font-size: 1.5rem;
  }

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

  .timeline-item {
    width: 100%;
    padding-left: 70px;
    padding-right: 25px;
  }

  .timeline-item:nth-child(even) {
    left: 0;
  }

  .timeline-item::after {
    left: 21px;
  }

  .timeline-item:nth-child(odd)::after {
    right: auto;
  }
}

@media (max-width: 576px) {
  .hero h1 {
    font-size: 2rem;
  }

  .typewriter {
    font-size: 1.2rem;
    min-height: 50px;
  }

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

  .projects-grid {
    grid-template-columns: 1fr;
  }
}
/* Download Button States */
#download-resume-btn.downloaded {
  background-color: #10b981 !important;
  border-color: #10b981 !important;
  opacity: 0.8;
}

#download-resume-btn.downloaded:hover {
  transform: none !important;
  box-shadow: none !important;
  cursor: not-allowed;
}

/* Form submission loading state */
button[disabled] {
  opacity: 0.7;
  cursor: not-allowed;
}
/* Custom Alert Styles */
.custom-alert {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 10000;
  align-items: center;
  justify-content: center;
}

.custom-alert-content {
  background: white;
  padding: 2rem;
  border-radius: 15px;
  max-width: 400px;
  width: 90%;
  text-align: center;
}

.custom-alert h3 {
  color: var(--primary);
  margin-bottom: 1rem;
}

.custom-alert p {
  margin-bottom: 2rem;
  font-size: 1.1rem;
}
/* Add this to your CSS */
.certifications {
  padding: 4rem 0;
  position: relative;
}

.cert-slider {
  display: flex;
  gap: 1.5rem;
  padding: 2rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.cert-slide {
  scroll-snap-align: start;
  flex: 0 0 300px;
}

.cert-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
  transition: transform 0.3s;
  aspect-ratio: 4/3;
}

.cert-card:hover {
  transform: translateY(-5px);
}

.cert-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cert-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  color: white;
  padding: 1.5rem;
  transform: translateY(100%);
  transition: transform 0.3s;
}

.cert-card:hover .cert-overlay {
  transform: translateY(0);
}

.view-btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 50px;
  cursor: pointer;
  margin-top: 0.5rem;
  transition: background 0.3s;
}

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

/* Slider Controls */
.slider-prev, .slider-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  background: white;
  border: none;
  border-radius: 50%;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  cursor: pointer;
  z-index: 10;
}

.slider-prev {
  left: 1rem;
}

.slider-next {
  right: 1rem;
}

/* Lightbox */
.cert-lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.cert-lightbox img {
  max-width: 80%;
  max-height: 80%;
  border: 2px solid white;
  border-radius: 8px;
}

.close-lightbox {
  position: absolute;
  top: 2rem;
  right: 2rem;
  color: white;
  font-size: 2rem;
  cursor: pointer;
}

/* Hide scrollbar but keep functionality */
.cert-slider::-webkit-scrollbar {
  display: none;
}
.error-message {
  color: #ff4444;
  font-size: 0.8rem;
  display: block;
  margin-top: 0.25rem;
  text-align: left;
}

.form-control.invalid {
  border-color: #ff4444;
}

/* Add this to your existing CSS */
.form-group {
  margin-bottom: 1.5rem;
  position: relative;
}

.form-control {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  transition: border-color 0.3s;
}

.form-control:focus {
  border-color: var(--primary);
  outline: none;
}
/* Enhanced Certifications Section */
.certifications {
  background: #f8fafc;
  padding: 6rem 0;
  position: relative;
}

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

.cert-slider {
  display: flex;
  gap: 2rem;
  padding: 2rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  max-width: 1200px;
  margin: 0 auto;
}

.cert-slide {
  scroll-snap-align: center;
  flex: 0 0 350px;
}

.cert-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  transition: transform 0.3s;
  height: 250px;
  width: 350px;
}

.cert-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cert-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  color: white;
  padding: 1.5rem;
  transform: translateY(100%);
  transition: transform 0.3s;
}

.cert-card:hover .cert-overlay {
  transform: translateY(0);
}

/* Slider controls */
.slider-prev, .slider-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--primary);
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.slider-prev { left: 20px; }
.slider-next { right: 20px; }

/* Pause on hover */
.cert-slider:hover {
  animation-play-state: paused;
}

/* Lightbox styles */
.cert-lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.cert-lightbox img {
  max-width: 80%;
  max-height: 80%;
  border: 2px solid white;
  border-radius: 8px;
}

.close-lightbox {
  position: absolute;
  top: 2rem;
  right: 2rem;
  color: white;
  font-size: 2rem;
  cursor: pointer;
}

/* Hide scrollbar but keep functionality */
.cert-slider::-webkit-scrollbar {
  display: none;
}