:root {
  --primary-color: #3498db;
  --secondary-color: #2c3e50;
  --accent-color: #e74c3c;
  --light-color: #ecf0f1;
  --dark-color: #2c3e50;
  --text-color: #333;
  --text-light: #7f8c8d;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: #f9f9f9;
  color: var(--text-color);
  line-height: 1.6;
}

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

section {
  padding: 80px 0;
}

h1,
h2,
h3 {
  margin-bottom: 20px;
  color: var(--secondary-color);
}

h2 {
  font-size: 2.5rem;
  text-align: center;
  position: relative;
  margin-bottom: 50px;
}

h2::after {
  content: "";
  display: block;
  width: 80px;
  height: 4px;
  background-color: var(--primary-color);
  margin: 10px auto;
}

p {
  margin-bottom: 15px;
}

a {
  text-decoration: none;
  color: var(--primary-color);
  transition: all 0.3s ease;
}

a:hover {
  color: var(--accent-color);
}

.btn {
  display: inline-block;
  padding: 10px 20px;
  background-color: var(--primary-color);
  color: white;
  border-radius: 5px;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

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

/* Navbar Styles */
header {
  background-color: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--secondary-color);
}

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

.nav-links li {
  margin-left: 30px;
}

.nav-links a {
  color: var(--text-color);
  font-weight: 500;
  position: relative;
}

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

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

.nav-links a.active::after {
  width: 100%;
}

.hamburger {
  display: none;
  cursor: pointer;
}

/* Hero Section */
#home {
  height: 90vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  padding-top: 80px;
}

.hero-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.hero-text {
  flex: 1;
  min-width: 300px;
  padding-right: 40px;
}

.hero-text h1 {
  font-size: 3rem;
  margin-bottom: 20px;
  color: var(--secondary-color);
}

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

.hero-text p {
  font-size: 1.1rem;
  margin-bottom: 30px;
  color: var(--text-light);
}

.hero-image {
  flex: 1;
  min-width: 300px;
  text-align: center;
}

.profile-img {
  width: 300px;
  height: 300px;
  border-radius: 50%;
  object-fit: cover;
  border: 5px solid var(--primary-color);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  align-items: center;
  margin-top: 20px;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #333;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.social-links a:hover {
  background-color: #f0f0f0;
  transform: translateY(-2px);
}

.social-links i {
  font-size: 1.2rem;
}

/* Experience Section */
#experience {
  background-color: white;
}

.experience-container {
  max-width: 800px;
  margin: 0 auto;
}

.experience-card {
  background-color: var(--light-color);
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.experience-header {
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #eee;
}

.experience-header h3 {
  color: var(--primary-color);
  font-size: 1.5rem;
  margin-bottom: 5px;
}

.company {
  font-weight: 600;
  color: var(--secondary-color);
  margin-bottom: 5px;
}

.duration {
  color: var(--text-light);
  font-style: italic;
}

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

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

.experience-details li::before {
  content: "▹";
  position: absolute;
  left: 0;
  color: var(--primary-color);
}

@media (max-width: 768px) {
  .experience-card {
    padding: 20px;
  }
}

/* Skills Section */
#skills {
  background-color: white;
}

.skills-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.skill-item {
  background-color: var(--light-color);
  padding: 15px 25px;
  border-radius: 30px;
  font-weight: 500;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.skill-item:hover {
  background-color: var(--primary-color);
  color: white;
  transform: translateY(-5px);
}

/* Projects Section */
#projects {
  background-color: #f9f9f9;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
  align-items: start; /* This prevents stretching */
}

.project-card {
  background: white;
  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-image {
  aspect-ratio: 16/9; /* Adjust to your preferred ratio */
  overflow: hidden;
}

.project-image img {
  width: 83%;
  height: auto; /* Ensures aspect ratio is maintained */
  display: block;
  object-fit: contain;
  transition: transform 0.5s ease;
}

.project-details {
  padding: 20px 20px 20px;
}

.project-details h3 {
  text-align: center;
  font-size: 1.5rem;
  margin-bottom: 15px;
}

.project-details p {
  text-align: center;
}

.project-links {
  align-items: center;
  justify-content: center;
  display: flex;
  gap: 10px;
}

/* Make it responsive */
@media (max-width: 1024px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

.project-card:hover {
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

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

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

.project-details h3 {
  font-size: 1.5rem;
  margin-bottom: 15px;
}

.project-details ul {
  margin-bottom: 20px;
  padding-left: 20px;
}

.project-details ul li {
  margin-bottom: 10px;
}

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

/* Achievements Section */
#achievements {
  background-color: white;
}

.achievement-card {
  background-color: var(--light-color);
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  margin-bottom: 30px;
}

.achievement-card h3 {
  color: var(--primary-color);
  margin-bottom: 15px;
}

/* Education Section */
#education {
  background-color: #f9f9f9;
}

.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.timeline::before {
  content: "";
  position: absolute;
  width: 2px;
  background-color: var(--primary-color);
  top: 0;
  bottom: 0;
  left: 50%;
  margin-left: -1px;
}

.timeline-item {
  padding: 10px 40px;
  position: relative;
  width: 50%;
  box-sizing: border-box;
}

.timeline-item::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  background-color: white;
  border: 4px solid var(--primary-color);
  border-radius: 50%;
  top: 15px;
  z-index: 1;
}

.left {
  left: 0;
}

.right {
  left: 50%;
}

.left::after {
  right: -10px;
}

.right::after {
  left: -10px;
}

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

.timeline-content h3 {
  margin-bottom: 10px;
  color: var(--primary-color);
}

.timeline-content p {
  color: var(--text-light);
}

/* Footer */
footer {
  background-color: var(--secondary-color);
  color: white;
  text-align: center;
  padding: 30px 0;
}

/* Responsive Styles */
@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 80px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 80px);
    background-color: white;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.5s ease;
  }

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

  .nav-links li {
    margin: 20px 0;
  }

  .hamburger {
    display: block;
  }

  .hero-content {
    flex-direction: column;
    text-align: center;
  }

  .hero-text {
    padding-right: 0;
    margin-bottom: 40px;
  }

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

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

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

  .left::after,
  .right::after {
    left: 21px;
  }

  .right {
    left: 0%;
  }
}
