:root {
  --primary-color: #1a4b84;
  --primary-light: #2d6ab8;
  --secondary-color: #ffffff;
  --accent-color: #3498db;
  --accent-dark: #2980b9;
  --background-color: #f8f9fa;
  --text-color: #2c3e50;
  --text-light: #6c7a89;
  --font-size-base: 1.25rem;
  --font-size-sm: 1.125rem;
  --font-size-lg: 1.75rem;
  --font-size-xl: 2.25rem;
  --selection-color: rgba(13, 183, 230, 0.649);
  --scrollbar-color: #3498db;
}

body {
  background-color: var(--background-color);
  color: var(--text-color);
  font-family: Arial, sans-serif;
  font-size: var(--font-size-base); /* Use base font size */
}

/* Change selection color */
::selection {
  background: var(--selection-color);
  color: var(--text-color);
}

@media (max-width: 768px) {
  body {
    font-size: var(--font-size-sm); /* Use small font size on smaller screens */
  }
}
@media (max-width: 768px) {
  .section-title {
    font-size: 2rem; /* Adjust font size for smaller screens */
  }
  .hero-section h1 {
    font-size: 2rem; /* Adjust hero section title font size for smaller screens */
  }
  .hero-section p {
    font-size: 1rem; /* Adjust hero section paragraph font size for smaller screens */
  }
}
.navbar {
  background: linear-gradient(135deg, var(--primary-color), var(--text-color));
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  padding: 1rem 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--secondary-color) !important;
  transition: color 0.3s ease;
}

.nav-link {
  color: var(--secondary-color) !important;
  position: relative;
  padding: 0.5rem 1rem;
  transition: color 0.3s ease;
  opacity: 0.9;
}

.nav-link:hover {
  opacity: 1;
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 50%;
  background-color: var(--secondary-color);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

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

.navbar.sticky-top {
  position: sticky;
  top: 0;
  background: rgba(106, 140, 175, 0.8); /* Low opacity background */
  backdrop-filter: blur(10px); /* Blur effect */
  z-index: 1000; /* Ensure it stays above other content */
}

.navbar-brand,
.nav-link {
  color: white !important;
}

.section-title {
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  font-size: var(
    --font-size-xl
  ); /* Use extra large font size for section titles */
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
  border: none;
  color: var(--secondary-color);
  padding: 0.75rem 2rem;
  border-radius: 30px;
  font-weight: 600;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.9rem;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.hero-section {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: var(--secondary-color);
  padding: 8rem 0;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><rect width="20" height="20" fill="none"/><circle cx="3" cy="3" r="1" fill="rgba(255,255,255,0.1)"/></svg>') repeat;
  opacity: 0.1;
}

.hero-section h1 {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  animation: fadeInUp 1s ease;
}

.hero-section p {
  font-size: 1.75rem;
  margin-bottom: 2.5rem;
  animation: fadeInUp 1s ease 0.2s;
  opacity: 0;
  animation-fill-mode: forwards;
}

section {
  padding: 5rem 0; /* Consistent padding for all sections */
}

.bg-light {
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
}

footer {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: var(--primary-color);
  color: var(--secondary-color);
  font-weight: bold;
  padding: 1.5rem;
  text-align: center;
  font-size: var(--font-size-base); /* Use base font size */
  flex-wrap: wrap;
}

footer p {
  margin: 0 0.5rem;
  transition: color 0.3s ease; /* Added transition for hover effect */
}

footer p:hover {
  color: var(--text-color);
}

#contact {
  padding: 3rem 0;
}

#contact .lead {
  font-size: var(
    --font-size-lg
  ); /* Use large font size for contact lead text */
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.contact-icons {
  display: flex;
  gap: 1rem;
  margin-left: 1rem;
}

.contact-icons a {
  color: var(--text-color);
  font-size: 1.5rem;
  transition: color 0.3s ease;
}

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

.contact-details {
  display: flex;
  justify-content: center;
  flex-wrap: nowrap;
  font-size: var(--font-size-lg); /* Use large font size for contact details */
}

.contact-details p {
  margin: 0.5rem 1rem;
  display: flex;
  align-items: center;
  font-size: 60px;
}

.contact-details p a {
  color: var(--text-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

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

.contact-details p i {
  margin-right: 0.5rem;
}

.skill-item {
  background-color: var(--secondary-color);
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  text-align: center;
  height: 100%; /* Ensure all skill items have the same height */
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.skill-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.skill-item i {
  font-size: 2.5rem;
  color: var(--accent-color);
  margin-bottom: 1.5rem;
}

.skill-title {
  font-size: var(--font-size-lg);
  margin-bottom: 0.5rem;
}

.skill-text {
  font-size: var(--font-size-base);
  margin-bottom: 0.5rem;
}

.project-item {
  position: relative;
  border-radius: 15px;
  overflow: hidden;
  transition: all 0.3s ease;
  background: var(--secondary-color);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  height: 100%;
  margin-bottom: 0.5rem; /* Reduce bottom margin for cards */
  display: flex; /* Ensure consistent alignment */
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start; /* Align items to the left */
  text-align: left; /* Align text to the left */
  height: auto; /* Allow cards to adjust height dynamically */
}

.project-content {
  padding: 1.5rem;
  text-align: left; /* Ensure content inside cards is left-aligned */
}

.project-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  font-size: var(--font-size-lg);
}

.project-title a {
  color: var(--accent-color);
  transition: color 0.3s ease;
}

.project-title a:hover {
  color: var(--primary-color);
  transform: scale(1.1);
}

.project-text {
  color: var(--text-color);
  margin-bottom: 0.75rem;
  font-size: var(--font-size-base);
}

#projectsContainer {
  display: flex;
  flex-wrap: wrap; 
  gap: 0.5rem; 
  justify-content:space-evenly; 
}

.experience-item {
  background: var(--secondary-color);
  border-radius: 15px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.experience-item:hover {
  transform: translateX(10px);
}

.experience-logo,
.education-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  margin-right: 1rem;
  padding: 0.25rem;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.experience-item:hover .experience-logo,
.education-item:hover .education-logo {
  transform: scale(1.1);
}

.education-item {
  background: var(--secondary-color);
  border-radius: 15px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.education-item:hover {
  transform: translateX(10px);
}

.show-more-btn {
  background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
  color: var(--secondary-color);
  border: none;
  padding: 0.75rem 2rem;
  border-radius: 30px;
  font-weight: 600;
  transition: all 0.3s ease;
  margin-top: 2rem;
  display: none;
}

.show-more-btn:hover {
  background: linear-gradient(135deg, var(--accent-dark), var(--primary-light));
  transform: translateY(-2px);
}

.show-more-btn i {
  margin-right: 0.5rem;
}

/* Improve card hover effects */
.project-item:hover {
  transform: translateY(-10px);
}

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


/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: var(--background-color);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, var(--primary-color), var(--accent-color));
  border-radius: 6px;
  border: 2px solid var(--background-color);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(to bottom, var(--primary-light), var(--accent-dark));
}

/* Back to Top Button */
#backToTopBtn {
  display: block; /* Ensure it's initially visible for testing */
  opacity: 0; /* Start hidden */
  position: fixed;
  width: 60px;
  height: 60px;
  bottom: 20px;
  right: 20px;
  text-align: center;
  z-index: 99;
  font-size: 24px;
  border: none;
  outline: none;
  background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
  color: var(--secondary-color);
  cursor: pointer;
  border-radius: 50%; /* Circular shape */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Add shadow for depth */
  transition: opacity 0.3s ease, transform 0.3s ease;
}

#backToTopBtn.show {
  opacity: 1; /* Fully visible */
  transform: translateY(0); /* Reset any transform */
}

#backToTopBtn.hide {
  opacity: 0; /* Fully hidden */
  transform: translateY(10px); /* Slight downward movement */
}

#backToTopBtn i {
  line-height: 60px; /* Center the icon vertically */
}

.project-item img{
  width: 100%;
  height: 50%;
  border-radius: 10px;
  margin-bottom: 1rem;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.project-item:hover img,
.experience-item:hover img {
  transform: scale(1.05);
  transition: transform 0.3s ease;
}

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

.extra-project,.extra-experience,.extra-education{
  display: none;
}

/* Date / Location metadata styling */
.title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.title-row .right {
  text-align: right;
}
.date {
  display: inline-block;
  color: var(--primary-color);
  font-weight: 700;
  font-size: 0.95rem;
}
.location {
  display: inline-block;
  color: var(--text-light);
  font-style: italic;
  font-weight: 600;
}
.specialization {
  color: var(--text-light);
  font-weight: 600;
}

/* Slight spacing for meta items inside title rows */
.title-row .left .location,
.title-row .left .specialization {
  margin: 0;
}

/* Make dates more visible on small screens */
@media (max-width: 768px) {
  .title-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  .title-row .right {
    text-align: left;
  }
}