/* CSS reseting */
* {
  margin: 0;
  padding: 0;
}

:root {
  --text-color: black;
  --sidebar-background-color: white;
  --background-color: #f5f5f7;
  --border-color: #d7d7d7;
  --black-heading-color: #1d1d1e;
  --dark-gray: #1d1d1f;
  --button-color: #0066cc;
}

html {
  scroll-behavior: smooth;
}

h1 {
  text-align: center;
  margin-top: 1em;
  margin-bottom: 0.5em;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-color);
  min-height: 100vh;
  background-color: var(--body-background-color);
}

body.light-theme {
  --primarty-color: #007aff;
  --text-color: black;
  --sidebar-background-color: white;
  --background-color: #f5f5f7;
  --border-color: #d7d7d7;
  --black-heading-color: #1d1d1e;
  --body-background-color: white;
  --button-color: #0066cc;
}

body.dark-theme {
  --primarty-color: #007aff;
  --text-color: white;
  --sidebar-background-color: black;
  --background-color: #1d1d1f;
  --border-color: #d7d7d7;
  --black-heading-color: #1d1d1e;
  --body-background-color: black;
  --button-color: #0066cc;
}

/* Header section*/
.header-heading {
  font-weight: normal;
}
.logo img {
  height: 2.5em;
  width: 2.5em;
}
header {
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  background-color: var(--background-color);
  position: sticky;
  top: 0;
}
.sidebar {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: 100vw;
  z-index: 999;
  background-color: var(--sidebar-background-color);
  display: none;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
}

.sidebar li {
  width: 100%;
  padding: 10px;
  border: none;
  border-bottom: 2px solid var(--border-color);
  align-items: center;
  margin-left: 10%;
  color: var(--text-color);
}
.menu-btn {
  display: none;
}
.sidebar a {
  width: 80%;
}
nav {
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  list-style: none;
}
li {
  margin-right: 2em;
}
a {
  text-decoration: none;
  color: var(--text-color);
}
.popup {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #1d1d1f;
  color: #fff;
  padding: 10px 18px;
  border-radius: 6px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease-in-out;
  z-index: 999;
}
.popup.show {
  opacity: 1;
}

/* Home page*/
.about-me-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-left: 5em;
  margin-right: 5em;
}

.about-me-section p {
  font-size: 1.2em;
  line-height: 1.5em;
  font-weight: 300;
  letter-spacing: 0.1rem;
  width: 60%;
  margin-bottom: 1em;
}
.about-me-section p a {
  color: var(--button-color);
}

.about-me-section p a:hover {
  color: var(--button-color);
  text-decoration: underline;
}

.avatar-container {
  width: 40vh;
  height: 40vh;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2em;
}

.avatar-container img {
  height: 100%;
  width: 100%;
  object-fit: cover;
}
.name {
  margin-top: 1.5em;
}
.bio {
  margin-bottom: 1.5em;
  font-weight: normal;
}
.contacts-container {
  display: flex;
  justify-content: space-between;
  gap: 1em;
  margin-top: 1em;
  margin-bottom: 1em;
  padding: 10px;
  border-radius: 10px;
  background-color: var(--background-color);
}

.contacts-container img {
  height: 2.5em;
}

/* Projects page */
.projects-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 1.5em;
  margin-left: 5em;
  margin-right: 5em;
}
.projects-container {
  display: grid;
  grid-template-columns: repeat(4, minmax(20vw, 1fr));
  gap: 2em;
  margin-top: 1.5em;
  margin-bottom: 1.5em;
}
.project-card img.thumbnail {
  width: 100%;
  height: 50%;
  margin-bottom: 1em;
  object-fit: cover;
}
.project-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background-color: var(--background-color);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  padding: 1em;
  border-radius: 10px;
  width: auto;
  height: auto;
}
.project-card:hover {
  scale: 1.01;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  transition: all 0.8s ease;
}
.buttons-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1em;
}
.demo-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  background-color: transparent;
  color: var(--text-color);
  padding: 0.5em 1em;
  border-color: var(--button-color);
  border-radius: 20px;
  border-width: 1px;
  border-style: solid;
  cursor: pointer;
}
.demo-btn:hover {
  background-color: var(--button-color);
  color: white;
}
.github-btn-icon {
  height: 30px;
  width: 30px;
  background-color: transparent;
  border: none;
  cursor: pointer;
}
footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--background-color);
  color: var(--text-color);
}
.footer-parent-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-left: 5em;
  margin-right: 5em;
  padding: 1em;
  width: 100%;
}
.email-compose-link:hover,.phone-call-link:hover {
  text-decoration: underline;
  color: var(--button-color);
}
.theme-selector-container {
  display: flex;
  height: 20px;
  border-radius: 10px;
  justify-content: space-between;
  background: transparent;
}
.theme-button {
  border: none;
  background: transparent;
  padding-left: 10px;
  padding-right: 10px;
  border-radius: 10px;
  height: 100%;
  cursor: pointer;
  color: var(--button-color);
  font-size: small;
  font-weight: normal;
}
.theme-button.active {
  background: var(--button-color);
  color: white;
}

/* Our lab page styles*/

.lab-images-section {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 10%;
  margin-right: 10%;
  margin-bottom: 1em;
}

.lab-image-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    place-items: center;
    gap: 1em;
}

.lab-image-container img {
  height: 45vh;
  width: 45vh;
  object-fit: cover;
}

.lab-page-para {
  font-size: 1.2em;
  text-align: center;
  margin-bottom: 1em;
}

@media (max-width: 760px) {
  .hide-on-mobile {
    display: none;
  }
  header {
    justify-content: space-between;
    width: 100%;
  }
  .logo {
    margin-left: 2em;
  }
  .menu-btn {
    display: block;
    margin-right: 2em;
  }
  body svg {
    fill: var(--text-color);
  }
  .avatar-container {
    width: 30vh;
    height: 30vh;
  }
  .about-me-section {
    margin-left: 2em;
    margin-right: 2em;
  }
  .about-me-section p {
    font-size: 1em;
    font-weight: 300;
    width: 100%;
    color: var(--text-color);
  }
  .experience-card,
  .education-card {
    width: 100%;
  }
  
  .skill-card img {
    height: 40px;
    width: 40px;
    margin-bottom: 0.5em;
  }
  .projects-section,
  .education-section,
  .experience-section {
    margin-left: 2em;
    margin-right: 2em;
  }
  .projects-container {
    display: flex;
    flex-direction: column;
    gap: 1em;
    width: 100%;
  }
  .footer-parent-container {
    display: flex;
    flex-direction: column;
    margin-left: 2em;
    margin-right: 2em;
    width: 100%;
  }
  .footer-parent-container p {
    font-size: 0.6em;
  }
  .footer-parent-container {
    justify-content: space-between;
    margin-left: 5em;
    margin-right: 5em;
    gap: 0.5em;
    padding: 1em;
    width: 100%;
  }
  .email-compose-link,.phone-call-link {
    text-decoration: underline;
    color: var(--button-color);
  }

    /* Our lab page media query */
  .lab-image-container {
    display: flex;
    flex-direction: column;
  }

  .lab-image-container img {
    height: 100%;
    width: 100%;
    object-fit: cover;
  }
  .lab-images-section {
    margin-left: 10%;
    margin-right: 10%;
    margin-bottom: 1em;
  }
  .lab-page-para {
    margin-left: 6%;
    margin-right: 6%;
  }
}