/* style.css */
:root {
  --primary-color: #4299e1;
  --secondary-color: #2b6cb0;
  --text-color: #2d3748;
  --bg-color: #f8fafc;
  --card-bg: #ffffff;
  --dark-text: #f8fafc;
  --dark-bg: #1a202c;
  --dark-card: #2d3748;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  transition: background-color 0.3s, color 0.3s;
}

body {
  font-family: 'Poppins', sans-serif;
  color: var(--text-color);
  background-color: var(--bg-color);
  line-height: 1.6;
  overflow-x: hidden;
}

.dark-mode {
  --text-color: var(--dark-text);
  --bg-color: var(--dark-bg);
  --card-bg: var(--dark-card);
  /* border: 2px solid red; */
}

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

section {
  padding: 100px 0;
}

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

.btn {
  display: inline-block;
  padding: 12px 30px;
  border-radius: 5px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  font-size: 1rem;

}

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

.btn-primary:hover {
  background-color: var(--secondary-color);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(66, 153, 225, 0.4);
}

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

.btn-secondary:hover {
  background-color: rgba(66, 153, 225, 0.1);
  transform: translateY(-3px);
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 60px;
  text-align: center;
  position: relative;
}

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

/* Header Styles */
.header {
  position: fixed;
  border: 2px solid rgb(244, 244, 244);
  top: 0;
  left: 0;
  width: 100%;
  padding: 20px 0;
  background-color: var(--card-bg);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  transition: all 0.3s ease;
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;

}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-color);
  text-decoration: none;
  position: absolute;
  left: 20px;
}

.navbar {
  display: flex;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  align-items: center;
  gap: 30px;
  /* border: 2px solid red; */
  padding-top: 5px;
}

.navbar a {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
  position: relative;
  white-space: nowrap;
}

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

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

.navbar a:hover::after {
  width: 100%;
}

#dark-mode-toggle {
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  color: var(--text-color);
  position: absolute;
  right: 20px;
  /* padding-top: 5px; */
  /* border: 2px solid red; */
}

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
  cursor: pointer;
  position: absolute;
  right: 20px;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .navbar {
    /* position: fixed; */
    /* top: -30px; */
    right: -100%;
    width: 80%;
    height: calc(100%);
    flex-direction: column;
    background-color: var(--card-bg);
    padding: 20px 0;
    box-shadow: -10px 0 10px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    gap: 15px;
    z-index: 999;
    /* border: 2px solid blue; */
    margin-left: 150px;
    margin-top: -35px;
  }

  .navbar.active {
    right: 0;
    left: auto;
  }

  .mobile-menu-btn {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 25px;
    cursor: pointer;
    position: absolute;
    right: 20px;
    z-index: 1001;
    /* border: 2px solid red; */
    margin-top: -30px;
  }

  .mobile-menu-btn span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--text-color);
    border-radius: 3px;
    transition: all 0.3s ease;
  }

  .mobile-menu-btn.active span:nth-child(1) {
    transform: translateY(10px) rotate(45deg);
  }

  .mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
  }

  .mobile-menu-btn.active span:nth-child(3) {
    transform: translateY(-10px) rotate(-45deg);
  }

  .logo {
    position: static;
    transform: none;
  }

  #dark-mode-toggle {
    /* position: static; */
    margin-left: auto;
    margin-right: 230px;
    margin-top: 8px;
    /* border: 2px solid red; */
  }

  body.menu-open::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 998;
  }
}


/* Home Section */
.home-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.dark-mode .home-section {
  background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
}

.home-section .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.home-content {
  flex: 1;
  padding-right: 50px;
}

.home-title {
  font-size: 3.5rem;
  margin-bottom: 20px;
  color: var(--text-color);
}

.highlight {
  color: var(--primary-color);
}

.home-subtitle {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 25px;
  color: var(--text-color);
  opacity: 0.9;
}

.home-description {
  font-size: 1.2rem;
  line-height: 1.6;
  margin-bottom: 40px;
  color: var(--text-color);
  opacity: 0.8;
  max-width: 600px;
}

.home-buttons {
  display: flex;
  gap: 20px;
}

.home-image {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.home-image img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-20px);
  }

  100% {
    transform: translateY(0px);
  }
}

/* Colorful Social Marquee */
.social-marquee {
  width: 100%;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.03);
  padding: 15px 0;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  margin-bottom: 20px;
}

.dark-mode .social-marquee {
  background: rgba(255, 255, 255, 0.03);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.social-marquee-content {
  display: inline-block;
  white-space: nowrap;
  animation: marquee 25s linear infinite;
}

.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 25px;
  font-size: 2.2rem;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  transition: all 0.4s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Platform-specific colors */
.social-icon.github {
  color: #fff;
  background: #333;
}

.social-icon.linkedin {
  color: #fff;
  background: #0077b5;
}

.social-icon.leetcode {
  color: #fff;
  background: #ffa116;
}

.social-icon.hackerrank {
  color: #fff;
  background: #2ec866;
}

.social-icon.gfg {
  color: #fff;
  background: #2f8d46;
}

.social-icon.codechef {
  color: #fff;
  background: #744e0e;
}

.social-icon:hover {
  transform: scale(1.2) translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  z-index: 10;
}

@keyframes marquee {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

/* Pause animation on hover */
.social-marquee:hover .social-marquee-content {
  animation-play-state: paused;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .social-icon {
    font-size: 1.8rem;
    width: 50px;
    height: 50px;
    margin: 0 15px;
  }
}


/* About Section Styles */
.about-content {
  display: flex;
  gap: 30px;
  transition: all 0.3s ease;
}

.about-image {
  flex: 1;
}

.about-image img {
  width: 100%;
  border-radius: 10px;
  max-width: 300px;
}

.about-text {
  flex: 2;
}

.about-buttons {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}


/* Education Content Styles */
.education-content {
  display: none;
  padding: 20px;
  background-color: rgba(66, 153, 225, 0.05);
  border-radius: 10px;
  margin-top: 20px;
}

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

.education-item {
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 1px dashed #e2e8f0;
}

.education-item:last-child {
  border-bottom: none;
}

.education-item h4 {
  color: #2d3748;
  margin-bottom: 5px;
}

.institute {
  color: #718096;
  margin-bottom: 5px;
}

.duration {
  color: #4a5568;
  font-size: 0.9rem;
}

.full-time {
  background-color: #ebf8ff;
  color: #3182ce;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 500;
  margin-right: 10px;
}

#back-to-about {
  margin-top: 20px;
}

.dark-mode .education-content {
  background-color: rgba(66, 153, 225, 0.1);
  color: #f7fafc;
  /* Light text for dark mode */
}

.dark-mode .education-item h4 {
  color: #ebf8ff;
  /* Lighter heading color in dark mode */
}

.dark-mode .institute,
.dark-mode .duration {
  color: #cbd5e0;
  /* Light gray for secondary text in dark mode */
}

.dark-mode .education-item {
  border-bottom-color: #4a5568;
  /* Darker border for dark mode */
}

.dark-mode .full-time {
  background-color: #3182ce;
  color: white;
}

.dark-mode #back-to-about {
  background-color: #4a5568;
  color: white;
  border-color: #4a5568;
}

.dark-mode #back-to-about:hover {
  background-color: #3182ce;
}

@media (max-width: 768px) {
  .about-content {
    flex-direction: column;
  }

  .about-image img {
    max-width: 100%;
  }
}





/* Skills Section */
.skills-container {
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
  justify-content: center;
}

.skill-category {
  flex: 1;
  min-width: 300px;
  background-color: var(--card-bg);
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.skill-category h3 {
  font-size: 1.5rem;
  margin-bottom: 25px;
  color: var(--primary-color);
  text-align: center;
}

.skill-item {
  margin-bottom: 20px;
}

.skill-item p {
  margin-bottom: 8px;
  font-weight: 500;
}

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

.dark-mode .skill-bar {
  background-color: #4a5568;
}

.skill-bar span {
  display: block;
  height: 100%;
  background-color: var(--primary-color);
  border-radius: 5px;
  position: relative;
}

.skill-bar span::after {
  content: attr(data-percent);
  position: absolute;
  right: 10px;
  top: -25px;
  font-size: 0.8rem;
  color: var(--text-color);
}

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

.certification-card {
  background-color: var(--card-bg);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

.certification-card:hover {
  transform: translateY(-10px);
}

.certification-image {
  height: 200px;
  overflow: hidden;
}

.certification-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.certification-content {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.certification-content h3 {
  font-size: 1.3rem;
  margin-bottom: 10px;
}

.certification-content p {
  margin-bottom: 5px;
  font-size: 0.95rem;
  opacity: 0.9;
}

.certification-content .btn {
  margin-top: auto;
  align-self: flex-start;
  margin-top: 15px;
}

@media (max-width: 768px) {
  .certifications-container {
    grid-template-columns: 1fr;
  }
}

/* Projects Section */
.projects-section {
  padding: 100px 0;
  position: relative;
}

.projects-container-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding: 20px 0;
  margin: 0 auto;
}

.projects-container {
  display: flex;
  gap: 30px;
  padding: 10px 40px;
  /* Equal padding on both sides */
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  -ms-overflow-style: none;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.projects-container::-webkit-scrollbar {
  display: none;
}

.project-card {
  flex: 0 0 auto;
  min-width: 300px;
  max-width: 350px;
  width: 100%;
  scroll-snap-align: center;
  background-color: var(--card-bg);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.project-card:hover {
  transform: translateY(-10px);
}

.project-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  z-index: 10;
  opacity: 0;
  transition: opacity 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-nav-left {
  left: 10px;
}

.project-nav-right {
  right: 10px;
}

.projects-container-wrapper:hover .project-nav {
  opacity: 1;
}

.project-nav:hover {
  background: rgba(0, 0, 0, 0.8);
}

.project-image {
  height: 200px;
  overflow: hidden;
}

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

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

.project-content {
  padding: 25px;
}

.project-content h3 {
  font-size: 1.5rem;
  margin-bottom: 15px;
  color: var(--text-color);
}

.project-content p {
  margin-bottom: 20px;
  color: var(--text-color);
  opacity: 0.9;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.project-tech span {
  background-color: rgba(66, 153, 225, 0.1);
  color: var(--primary-color);
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 0.8rem;
  font-weight: 500;
}

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

/* Contact Section */
.contact-container {
  display: flex;
  gap: 50px;
}

.contact-info {
  flex: 1;
  background-color: var(--card-bg);
  padding: 40px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.contact-info h3 {
  font-size: 1.8rem;
  margin-bottom: 30px;
  color: var(--text-color);
}

.info-item {
  display: flex;
  align-items: center;
  margin-bottom: 25px;
}

.info-item i {
  font-size: 1.2rem;
  color: var(--primary-color);
  margin-right: 15px;
  width: 30px;
  text-align: center;
}

.info-item p {
  color: var(--text-color);
  opacity: 0.9;
}

.social-links {
  display: flex;
  gap: 20px;
  margin-top: 40px;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: rgba(66, 153, 225, 0.1);
  color: var(--primary-color);
  border-radius: 50%;
  font-size: 1.2rem;
  transition: all 0.3s ease;
}

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

.contact-form {
  flex: 1;
  background-color: var(--card-bg);
  padding: 40px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.form-group {
  margin-bottom: 25px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #e2e8f0;
  border-radius: 5px;
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  background-color: var(--card-bg);
  color: var(--text-color);
  transition: border-color 0.3s;
}

.dark-mode .form-group input,
.dark-mode .form-group textarea {
  border-color: #4a5568;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

/* Footer */
.footer {
  background-color: var(--card-bg);
  padding: 30px 0;
  text-align: center;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.footer p {
  color: var(--text-color);
  opacity: 0.8;
}

.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background-color: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  text-decoration: none;
  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-color: var(--secondary-color);
  transform: translateY(-3px);
}

/* Responsive Design */
@media (max-width: 992px) {
  .home-section .container {
    flex-direction: column;
    text-align: center;
    padding-top: -100px;
    /* border: 2px solid greenyellow; */
    margin-top: -20px;
  }

  .home-content {
    padding-right: 0;
    margin-bottom: 50px;
  }

  .home-buttons {
    justify-content: center;
  }

  .home-title {
    font-size: 2.8rem;
  }

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

@media (max-width: 768px) {
  section {
    padding: 80px 0;
  }

  .section-title {
    font-size: 2rem;
    margin-bottom: 50px;
  }

  .navbar {
    position: fixed;
    top: 80px;
    left: -100%;
    width: 100%;
    flex-direction: column;
    background-color: var(--card-bg);
    padding: 20px 0;
    box-shadow: 0 10px 10px rgba(0, 0, 0, 0.1);
    transition: left 0.3s ease;
    gap: 15px;
  }

  .navbar.active {
    left: 0;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .mobile-menu-btn.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
  }

  .mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
  }

  .mobile-menu-btn.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
  }

  .home-title {
    font-size: 2.2rem;
  }

  .home-subtitle {
    font-size: 1.5rem;
  }

  .home-buttons {
    flex-direction: column;
    gap: 15px;
  }

  .btn {
    width: 100%;
    text-align: center;
  }

  .project-card {
    width: 280px;
  }

  .project-nav {
    opacity: 0.7;
    /* Always visible on mobile */
    width: 30px;
    height: 30px;
  }
}

@media (max-width: 480px) {
  .home-title {
    font-size: 1.8rem;
  }

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

  .project-card {
    width: 85vw;
  }
}
