@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600&display=swap");

body {
  background-color: #0a192f; /* Dark blue background */
  font-family: "Poppins", Arial, sans-serif; /* Modern font */
  margin: 0;
  color: #ccd6f6; /* Light blue text */
  scroll-behavior: smooth; /* Smooth scroll for anchor links */
}

header {
  background-color: rgba(10, 25, 47, 0.9);
  padding: 20px;
  display: flex;
  justify-content: flex-end;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  transition: background-color 0.3s; /* Smooth background transition */
}

header nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
}

header nav ul li {
  margin-left: 30px;
}

header nav ul li a {
  color: #64ffda;
  text-decoration: none;
  font-weight: 600;
  font-size: 18px;
  transition: color 0.3s ease-in-out, transform 0.2s;
}

header nav ul li a:hover {
  color: #ccd6f6;
  transform: scale(1.1);
}

section {
  padding: 60px 15px;
  max-width: 1200px;
  margin: 0 auto;
}

#home {
  text-align: center;
  padding: 20px 15px;
}

/* Updated About Section for Centering */
#about {
  text-align: center;
  margin: 15px auto; /* Centers the block horizontally */
  max-width: 800px; /* Restricts width so it matches other sections */
  background: #112240;
  border-radius: 8px;
  padding: 30px 20px;
}

.intro img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  margin-bottom: 20px;
  border: 4px solid #64ffda;
  transition: transform 0.3s ease;
}

.intro img:hover {
  transform: scale(1.1);
}

.intro h1 {
  margin: 20px 0;
  font-size: 42px;
  color: #64ffda;
}

.intro p {
  color: #8892b0;
  font-size: 18px;
  line-height: 1.6;
}

.social-icons {
  margin: 30px 0;
}

.social-icons a {
  margin: 0 15px;
  color: #64ffda;
  font-size: 36px;
  transition: color 0.3s, transform 0.3s;
}

.social-icons a:hover {
  color: #ccd6f6;
  transform: scale(1.2);
}

h2 {
  color: #64ffda;
  font-size: 36px;
  text-align: center;
  margin-bottom: 40px;
  position: relative;
}

h2::after {
  content: "";
  width: 60px;
  height: 4px;
  background-color: #64ffda;
  display: block;
  margin: 10px auto;
}

#education-work {
  background-color: #0a192f;
  color: #ccd6f6;
}

#education {
  background-color: #0a192f;
  color: #ccd6f6;
  padding: 15px;
}

.timeline-education {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.timeline-item-edu {
  background-color: #112240;
  width: 250px; /* Set a fixed width */
  height: 150px;
  padding: 15px;
  border-radius: 8px;
  text-align: center;
  perspective: 1000px; /* Adds perspective to the flip effect */
}

.timeline-item-edu:hover {
  transform: translateY(-5px);
  background-color: #1e3a5f;
}

.timeline-item-edu h3 {
  font-size: 1.4em;
  margin: 10px;
  color: #64ffda;
}

.timeline-item-edu-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s; /* Transition for flip effect */
  transform-style: preserve-3d; /* Ensures the children are 3D transformed */
}

.timeline-item-edu:hover .timeline-item-edu-inner {
  transform: rotateY(180deg); /* Flip effect on hover */
}

.timeline-item-edu-front,
.timeline-item-edu-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden; /* Hides the back when facing away */
}

.timeline-item-edu-back {
  transform: rotateY(180deg); /* Rotate back face to be hidden */
  background-color: #1e3a5f; /* Background for the back side */
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64ffda;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.timeline-item {
  background-color: #112240;
  padding: 20px;
  border-radius: 8px;
  text-align: center;
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.timeline-item:hover {
  transform: translateY(-5px);
  background-color: #1e3a5f;
}

.timeline-item h3 {
  font-size: 1.4em;
  margin: 10px 0;
  color: #64ffda;
}

.skills-section {
  padding: 20px;
  background-color: #1e3a5f;
  border-radius: 8px;
  max-width: 800px; /* Optional: restricts the width for better layout */
  margin: 0 auto; /* Centers the section */
  text-align: center;
}

.skills-list {
  display: flex;
  flex-direction: column; /* Stacks skill items vertically */
  gap: 15px; /* Spacing between skill items */
}

.skill-item {
  display: flex;
  flex-direction: column; /* Aligns text and bar vertically */
  align-items: flex-start; /* Aligns text to the start */
}

.skill-name {
  font-weight: bold;
  margin-bottom: 5px;
  color: white;
}

.skill-bar {
  width: 100%; /* Full width of the container */
  background-color: #ddd; /* Background of the skill bar */
  border-radius: 5px;
  overflow: hidden; /* Ensures the skill level bar stays within bounds */
}

.skill-level {
  height: 10px; /* Height of the skill level bar */
  border-radius: 5px; /* Rounded corners */
  transition: width 0.3s ease; /* Smooth transition for skill levels */
}

.python { width: 70%; background-color: #3572a5; } 
.ls { width: 75%; background-color: #3ca5b3; } 
.ml { width: 80%; background-color: #ffd700; } 
.bi { width: 90%; background-color: #ff4500; } 
.power_bi { width: 90%; background-color: #ff00f2; } 
.sql { width: 90%; background-color: #00a854; } 
.bq { width: 80%; background-color: #8a2be2; } 
.dl { width: 75%; background-color: #ff69b4; } 

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

.project-item {
  background-color: #0a192f;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
  text-align: center;
  transition: transform 0.3s ease;
}

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

.project-item img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  margin-bottom: 20px;
  border: 3px solid #64ffda;
}

.contact-section {
  padding: 20px 20px; 
  background-color: #f9f9f9;
  border-radius: 8px;
  text-align: center;
  margin: 20px 0;
  max-width: 800px; 
  margin-left: auto; 
  margin-right: auto; 
}

.contact-section h2 {
  margin-bottom: 10px;
}

.contact-section p {
  margin-bottom: 15px;
  font-size: 16px;
  color: #333;
}

.contact-button {
  display: inline-block;
  padding: 10px 15px;
  margin-bottom: 15px;
  background-color: #007bff; /* Primary button color */
  color: white;
  text-decoration: none;
  border-radius: 5px;
  transition: background-color 0.3s;
}

.contact-button:hover {
  background-color: #0056b3; /* Darker shade on hover */
}

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

.social-icons a {
  font-size: 24px;
  color: #333;
  transition: color 0.3s;
}

.social-icons a:hover {
  color: #007bff; /* Change color on hover */
}

footer {
  background-color: #112240;
  color: #8892b0;
  text-align: center;
  padding: 40px 20px;
  border-top: 1px solid #64ffda;
}

footer p {
  margin: 0;
  color: #ccd6f6;
}

@media (max-width: 768px) {
  header nav ul {
    flex-direction: column; /* Stack links on mobile */
    align-items: center;
  }

  header nav ul li {
    margin: 10px 0; /* Adjust margin for mobile */
  }

  .intro h1 {
    font-size: 34px; /* Adjust font size for smaller screens */
  }

  .intro p {
    font-size: 16px; /* Adjust font size for smaller screens */
  }

  h2 {
    font-size: 30px; /* Adjust font size for smaller screens */
  }

  .skills-list {
    flex-direction: column; /* Stack skills on mobile */
    align-items: center; /* Center align skills */
  }

  .project-grid {
    grid-template-columns: 1fr; /* Single column on mobile */
  }
}