:root {
  --primary-color: #1a202c;
  --secondary-color: #f6f7fb;
  --text-color: #333;
  --accent-color: #007bff;
  --background-color: #f0f4f8;
  --shadow-color: rgba(0, 0, 0, 0.1);
}

body {
  font-family: 'Kalam', cursive;
  font-size: 16px;
  color: var(--text-color);
  background-color: var(--background-color);
  margin: 0;
  padding: 0;
  line-height: 1.6;
}

.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-bottom: 2rem;
}

#nameImage {
  width: 150px; /* Reduced size of the name logo */
  height: auto;
}

.lang {
  display: flex;
  gap: 1rem;
}

.hindi,
.english {
  padding: 0.5rem 1.5rem;
  border-radius: 20px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.3s, color 0.3s;
}

.hindi {
  background-color: var(--primary-color);
  color: #fff;
}

.english {
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
}

.english:hover {
  background-color: var(--secondary-color);
  color: var(--primary-color);
}

.greetings {
  font-size: 1.5rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center; /* Center the text horizontally */
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 3rem;
  color: var(--primary-color);
  text-align: center;
  height: 60px; /* Fixed height to prevent bounce effect */
  overflow: hidden; /* Hide overflow to avoid layout shifts */
  position: relative; /* For smooth text transitions */
}

.greeting {
  position: absolute; /* Position each greeting absolutely */
  opacity: 0; /* Start with hidden text */
  transition: opacity 0.5s ease-in-out; /* Smooth fade transition */
}

.greeting.active {
  opacity: 1; /* Show the active greeting */
}

.introduction {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--secondary-color);
  border-radius: 20px;
  padding: 1.5rem;
  width: 100%;
  margin-bottom: 2rem;
  box-shadow: 0 4px 8px var(--shadow-color);
  gap: 1.5rem;
}

.leftContent {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  color: var(--primary-color);
}

.details {
  font-weight: 700;
  font-size: 1.2rem;
}

.connect {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}

.socials a img {
  filter: grayscale(100%);
  transition: filter 0.3s ease-in-out;
}

.socials a img:hover {
  filter: grayscale(0%);
}

#Resume {
  padding: 0.6rem 1.5rem;
  border: 2px solid var(--text-color);
  border-radius: 20px;
  color: var(--text-color);
  font-weight: 700;
  width: 7rem;
  text-decoration: none;
  transition: background-color 0.3s, color 0.3s;
  cursor: pointer;
}

#Resume:hover {
  background-color: var(--secondary-color);
  color: var(--primary-color);
}

#picture {
  border-radius: 50%;
  width: 200px; /* Slightly reduced size */
  height: 200px;
  box-shadow: 0 4px 8px var(--shadow-color);
  object-fit: cover;
}

.box {
  width: 100%;
  padding: 1rem;
  background-color: var(--secondary-color);
  border-radius: 16px;
  text-align: center;
  font-weight: 700;
  margin-top: 1rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
  box-shadow: 0 4px 8px var(--shadow-color);
}

.subBox {
  width: 100%;
  display: flex;
  flex-direction: column; /* Changed to column for list format */
  gap: 1.5rem;
}

.Developments {
  display: flex;
  flex-direction: row; /* Align items in a row */
  text-align: center;
  align-items: center;
  background-color: white;
  border-radius: 16px;
  box-shadow: 0 4px 8px var(--shadow-color);
  padding: 2rem;
  transition: transform 0.3s, box-shadow 0.3s;
}

.Developments:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px var(--shadow-color);
}

.coverImageProjects,
.coverImageBlogs {
  width: 100px; /* Reduced size for list format */
  height: 100px;
  border-radius: 12px;
  margin-right: 1rem; /* Added margin for spacing */
  object-fit: cover;
}

.detail {
  flex: 1;
  text-align: left; /* Align text to the left */
  color: var(--text-color);
}

#projectName {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s;
}

#projectName:hover {
  color: var(--accent-color);
}

#text {
  font-weight: 400;
  color: var(--text-color);
}

.github {
  padding: 0.5rem 1rem;
  border: 1px solid #cdcdcd;
  border-radius: 8px;
  text-decoration: none;
  color: var(--primary-color);
  transition: background-color 0.3s;
}

.github:hover {
  background-color: #ececec;
}

.footer {
  width: 100%;
  text-align: center;
  padding: 2rem 0;
  color: var(--primary-color);
}

#nameImageFooter {
  width: 100px;
  margin-bottom: 0.5rem;
}

/* Enhanced Responsiveness */
@media (max-width: 1200px) {
  .container {
    padding: 1.5rem;
  }

  .introduction {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.5rem;
  }

  .leftContent {
    align-items: center;
    text-align: center;
  }

  #picture {
    margin: 1.5rem 0 0;
  }

  .Developments {
    flex-direction: column; /* Stack items vertically on smaller screens */
    align-items: center;
    text-align: center;
  }

  .coverImageProjects,
  .coverImageBlogs {
    margin-right: 0;
    margin-bottom: 1rem;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 1rem;
  }

  .header {
    flex-direction: column;
    gap: 1rem;
  }

  .greetings {
    font-size: 1.25rem;
  }

  .lang {
    flex-direction: column;
    gap: 0.5rem;
  }

  .hindi,
  .english {
    width: 100%;
    text-align: center;
  }

  .introduction {
    padding: 1rem;
  }

  .box {
    padding: 0.75rem;
  }

  .Developments {
    padding: 1rem;
  }

  .coverImageProjects,
  .coverImageBlogs {
    width: 80px;
    height: 80px;
  }

  #projectName {
    font-size: 1rem;
  }

  #text {
    font-size: 0.875rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0.5rem;
  }

  .greetings {
    font-size: 1rem;
  }

  .introduction {
    padding: 0.75rem;
  }

  .box {
    padding: 0.5rem;
  }

  .Developments {
    padding: 0.75rem;
  }

  .coverImageProjects,
  .coverImageBlogs {
    width: 60px;
    height: 60px;
  }

  #projectName {
    font-size: 0.875rem;
  }

  #text {
    font-size: 0.75rem;
  }

  .github {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
  }
}