@import url("https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Caveat:wght@400..700&display=swap");

:root {
  --background-color: whitesmoke;
  --text-color: rgb(26, 26, 26);
  --secondary-text-color: lightslategrey;
  --third-text-color: rgb(255, 255, 255);
  --primary-color: rgb(255, 65, 65);
  --primary-color-dark: rgb(253, 69, 69);
  --card-bg-color: rgba(255, 255, 255, 0.5);
  --card-shadow-color: rgba(211, 211, 211, 0.5);
  --card-border: rgba(211, 211, 211, 0.5);
  --border-color: rgb(210, 210, 210);
  --header-title-color: rgb(43, 44, 49);
  --hover-background-color: rgb(230, 230, 230);
  --link-hover-rotate-color: grey;
  --navbar-height: 80px;
  --navbar-height-stuck: 60px;
}

.dark-mode {
  --background-color: #121212;
  --text-color: rgb(230, 230, 230);
  --secondary-text-color: rgb(150, 150, 150);
  --third-text-color: rgb(15, 15, 15);
  --primary-color: rgb(255, 110, 110);
  --primary-color-dark: rgb(230, 70, 70);
  --card-bg-color: rgba(32, 32, 32, 0.5);
  --card-shadow-color: rgba(0, 0, 0, 0.5);
  --card-border: rgba(50, 50, 50, 0.5);
  --border-color: rgb(50, 50, 50);
  --header-title-color: rgb(230, 230, 230);
  --hover-background-color: rgb(40, 40, 40);
  --link-hover-rotate-color: lightgrey;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-decoration: none;
  font-family: "Montserrat", sans-serif;
  font-optical-sizing: auto;
  font-weight: 500;
  font-style: normal;
}

html {
  width: 100%;
  height: fit-content;
  min-height: 800px;
  display: flex;
  justify-content: center;
  scroll-behavior: smooth;
}

body {
  width: 100%;
  min-width: 320px;
  max-width: 1500px;
  height: fit-content;
  background-color: var(--background-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: hidden;
  margin: auto 0;
}

svg {
  color: var(--text-color);
}

#navbar {
  width: 100vw;
  height: var(--navbar-height);
  background-color: var(--background-color);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  flex-direction: row;
  justify-content: space-around;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(20px);
  transition: background-color 0.5s ease, height 0.5s ease;
}

#navbar.stuck {
  background-color: var(--card-bg-color);
  height: var(--navbar-height-stuck);
}

.left {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  width: fit-content;
}

.left a {
  height: 100%;
  height: fit-content;
}

.left a svg {
  color: var(--text-color);
}

.left a:first-child {
  font-family: "Caveat", cursive;
  font-size: 22px;
  font-weight: 600;
  color: var(--text-color);
  user-select: none;
}

menu {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  position: relative;
}

menu .theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1/1;
  padding: 0.5rem;
  animation: wait 1s ease;
  border-radius: 0.5rem;
  cursor: pointer;
  user-select: none;
}
menu .theme-toggle:hover,
menu .mobile-menu-toggle:hover {
  background-color: var(--hover-background-color);
}

menu .language-toggle {
  aspect-ratio: 1/1;
  padding: 0.5rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  cursor: pointer;
  transition: transform 0.2s ease;
}

menu .language-toggle > svg {
  transition: transform 1s ease-in-out;
}

menu .language-toggle.active {
  border: 1px solid var(--border-color);
  transform: scale(1.1);
  background-color: var(--hover-background-color);
}

menu .language-toggle:active {
  transition: background-color transform 0.1s ease;
  transform: scale(0.9);
}

menu .language-toggle:hover {
  background-color: var(--hover-background-color);
}

.language-toggle-container {
  position: relative;
  display: flex;
}

.language-box {
  display: none;
  position: absolute;
  flex-direction: column;
  top: 45px;
  left: 50%;
  transform: scale(95%) translateX(-50%);
  background-color: var(--background-color);
  border: 1px solid var(--border-color);
  box-shadow: 0px 0px 16px var(--card-shadow-color);
  z-index: 1002;
  width: fit-content;
  height: fit-content;
  padding: 0.3rem;
  border-radius: 0.5rem;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: top 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
  gap: 0.2rem;
}

.language-box a {
  border-radius: 0.3rem;
  padding: 0.5rem 0.8rem;
  color: var(--text-color);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  font-size: 13px;
  font-weight: 500;
  user-select: none;
  cursor: pointer;
  width: 100%;
  text-transform: capitalize;
  gap: 0.5rem;
}

.language-box a.active {
  font-weight: 700;
  background-color: var(--border-color);
  color: var(--text-color);
  cursor: not-allowed;
}

.language-box a.active:hover {
  background-color: var(--border-color);
  color: var(--text-color);
}

.language-box a.active:active {
  background-color: var(--border-color);
  color: var(--text-color);
  transform: none;
}

.language-box a:hover {
  transition: 0.2s ease;
  background-color: var(--hover-background-color);
}

.language-box a:active {
  transition: 0.1s ease;
  transform: scale(95%);
}

.language-box a img {
  height: fit-content;
  width: 18px;
  object-fit: contain;
}

.nav-links {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
}

.nav-links > a {
  color: var(--text-color);
  font-size: 14px;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  transition: background-color 0.2s ease, transform 0.2s ease;
  user-select: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
}

.nav-links > a:active {
  transition: background-color 0.1s ease, transform 0.1s ease;
  transform: scale(0.9);
}

.nav-links > a:hover {
  background-color: var(--hover-background-color);
}

.nav-links .get-in-touch {
  border: 1px solid var(--border-color);
  border-radius: 100px;
  background-color: var(--primary-color-dark);
  color: var(--third-text-color);
}

.nav-links .get-in-touch:hover {
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
  background-color: var(--hover-background-color);
}

.mobile-menu-toggle {
  display: none;
}

@keyframes wait {
  0% {
    opacity: 0;
  }
  50% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@keyframes test {
  0% {
    rotate: 0deg;
  }
  100% {
    rotate: 360deg;
  }
}

header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4rem;
  padding: 5rem 0;
}

header p {
  color: var(--primary-color);
  text-transform: uppercase;
  font-size: 18px;
  font-weight: 400;
}

header h1 {
  font-size: 62px;
  font-weight: 700;
  color: var(--header-title-color);
  text-transform: capitalize;
  width: 700px;
  text-align: center;
  line-height: 5rem;
}

header h5 {
  font-size: 18px;
  font-weight: 500;
  color: var(--secondary-text-color);
  max-width: 1000px;
  text-align: center;
  line-height: 2rem;
}

header h5 strong {
  color: var(--primary-color);

  text-decoration: wavy underline;
  text-decoration-color: var(--secondary-text-color);
}

main {
  width: 1450px;
  height: 500px;
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 1rem;
  position: relative;
}

.card {
  width: 300px;
  height: 420px;
  background-color: var(--card-bg-color);
  backdrop-filter: blur(20px);
  border-radius: 1rem;
  box-shadow: 0 0 20px var(--card-shadow-color);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: absolute;
  transition: 0.2s ease;
  transition: transform 0.5s ease-in-out, rotate 0.5s ease-in-out;
  border: 1px solid var(--card-border);
}

.card:nth-of-type(1) {
  top: 50%;
  left: calc(2% + 150px);
  rotate: -2deg;
  z-index: 10;
  transform: translate(-50%, -50%);
}

.card:nth-of-type(2) {
  top: 55%;
  left: calc(20% + 150px);
  rotate: 1deg;
  z-index: 9;
  transform: translate(-50%, -50%);
}

.card:nth-of-type(3) {
  top: 45%;
  left: 50%;
  rotate: 0deg;
  z-index: 10;
  transform: translate(-50%, -50%);
}

.card:nth-of-type(4) {
  top: 55%;
  right: calc(20% - 150px);
  rotate: 3deg;
  z-index: 11;
  transform: translate(-50%, -50%);
}

.card:nth-of-type(5) {
  top: 45%;
  right: calc(2% - 150px);
  rotate: 2deg;
  z-index: 12;
  transform: translate(-50%, -50%);
}

.card:hover {
  transform: scale(110%) translate(-45%, -45%);
  rotate: 0deg;
  z-index: 15;
}

.blur {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  backdrop-filter: none;
  z-index: 12;
  transition: backdrop-filter 0.5s ease;
}

.blur.active {
  backdrop-filter: blur(1px);
}

.card img {
  width: 100%;
  height: 180px;
  border-radius: 0.5rem;
  background-color: lightgrey;
  user-select: none;
  border: 1px solid var(--card-border);
  object-fit: cover;
  opacity: 0;
  animation: loading-image 1s ease forwards;
}

.card:nth-child(1) img {
  animation-delay: 0.8s;
}

.card:nth-child(2) img {
  animation-delay: 0.6s;
}

.card:nth-child(3) img {
  animation-delay: 0.4s;
}

.card:nth-child(4) img {
  animation-delay: 0.6s;
}

.card:nth-child(5) img {
  animation-delay: 0.8s;
}

@keyframes loading-image {
  0% {
    opacity: 0;
    filter: blur(5px);
  }
  50% {
    opacity: 1;
    filter: blur(5px);
  }
  100% {
    opacity: 1;
    filter: blur(0px);
  }
}

.card span {
  font-size: 18px;
  font-weight: 600;
  color: var(--primary-color);
  text-transform: capitalize;
  margin-top: 0.5rem;
  font-family: "Caveat", cursive;
}

.card h5 {
  font-size: 20px;
  font-weight: 700;
  color: var(--header-title-color);
  text-transform: capitalize;
}

.card p {
  font-size: 14px;
  font-weight: 400;
  color: var(--secondary-text-color);
}

.card a {
  width: 32px;
  height: 32px;
  background-color: var(--card-bg-color);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  transition: 0.2s ease;
  user-select: none;
  cursor: pointer;
}

.card a:hover {
  background-color: var(--hover-background-color);
  rotate: 45deg;
  box-shadow: 0 0 10px var(--primary-color-dark);
}

.card a:active {
  rotate: 0deg;
  transition: 0.1s ease;
  border-color: grey;
  transform: scale(80%);
}

.card a svg {
  color: var(--link-hover-rotate-color);
}

#skills {
  display: flex;
  flex-direction: row;
  align-items: start;
  justify-content: space-between;
  gap: 5rem;
  padding: 0;
  width: 1200px;
  margin-top: 5rem;
  height: fit-content;
}

#skills > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  width: 50%;
  border-radius: 1rem;
  padding: 1rem;
  gap: 0.5rem;
}

#skills > div > h5 {
  font-size: 46px;
  font-weight: 700;
  width: 100%;
  color: var(--primary-color);
  text-transform: capitalize;
  font-family: "Caveat", cursive;
}

.experience .items {
  display: flex;
  width: 100%;
  height: fit-content;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.experience .items img {
  width: fit-content;
  height: 100%;
  object-fit: contain;
  border-radius: 0.5rem;
  background-color: var(--border-color);
  padding: 0.5rem;
  aspect-ratio: 1/1;
  animation: fade-in 0.5s ease;
}

@keyframes fade-in {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

.experience .items .item {
  background-color: var(--card-bg-color);
  box-shadow: 0 0 20px var(--card-shadow-color);
  backdrop-filter: blur(20px);
  height: 90px;
  padding: 1rem;
  border-radius: 1rem;
  width: 100%;
  border: 1px solid var(--card-border);
  color: var(--text-color);
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1rem;
}

.experience .item .details {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-evenly;
  height: 100%;
  width: 100%;
  gap: 0.5rem;
}

.experience .item .details .top {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1rem;
  width: 100%;
}

.experience .item .details .top h5 {
  flex-shrink: 0;
}

.experience .item .details .top p {
  font-family: "Caveat", cursive;
  font-size: 20px;
  color: var(--primary-color-dark);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.experience .details h5 {
  font-size: 20px;
  font-weight: 700;
  color: var(--header-title-color);
}

.experience .progress-bar {
  height: 15px;
  background-color: var(--border-color);
  width: 100%;
  border-radius: 0.3rem;
  overflow: hidden;
}

.experience .progress {
  height: 100%;
  background-color: var(--primary-color-dark);
  border-radius: 0.3rem;
  position: relative;
  animation: progress 1s ease-in-out forwards;
}

@keyframes progress {
  0% {
    width: 0%;
  }
}

.experience .progress-text {
  position: absolute;
  right: 0.2rem;
  font-size: 12px;
  font-weight: 700;
  color: var(--third-text-color);
  width: fit-content;
  opacity: 0;
  animation: fade-in 0.5s ease forwards;
  animation-delay: 1s;
}

.languages .items {
  display: flex;
  width: 100%;
  height: fit-content;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.languages .items img {
  width: fit-content;
  height: 100%;
  object-fit: contain;
  aspect-ratio: 1/1;
  animation: fade-in 0.5s ease;
}

.languages .items .item {
  background-color: var(--card-bg-color);
  box-shadow: 0 0 20px var(--card-shadow-color);
  backdrop-filter: blur(20px);
  height: 100px;
  border-radius: 1rem;
  width: 100%;
  border: 1px solid var(--card-border);
  color: var(--text-color);
  display: flex;
  flex-direction: row;
  align-items: end;
  gap: 1rem;
  position: relative;
  overflow: hidden;
}

.languages .item .wrap {
  display: flex;
  flex-direction: row;
  height: calc(100% - 1rem);
  width: calc(100% - 1rem);
  gap: 0.5rem;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: var(--card-bg-color);
  box-shadow: 0 0 20px var(--card-shadow-color);
  backdrop-filter: blur(20px);
  padding: 1rem;
  border-radius: 0.6rem;
  z-index: 11;
  border: 1px solid var(--card-border);
  gap: 1.5rem;
}

.languages .item .progress-bar {
  width: 100%;
  height: 100%;
  z-index: 10;
  display: flex;
  align-items: end;
  justify-content: center;
}

.languages .item .progress-bar .progress {
  width: 100%;
  background-color: var(--primary-color-dark);
  display: flex;
  align-items: end;
  justify-content: center;
  animation: progress2 1s ease-in-out forwards;
  border-radius: 0.3rem;
}

@keyframes progress2 {
  0% {
    height: 0%;
  }
}

.languages .details {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  width: 100%;
  gap: 0.5rem;
}

.languages .details h5 {
  font-size: 20px;
  font-weight: 700;
  color: var(--header-title-color);
}

.languages .details p {
  font-size: 18px;
  font-weight: 500;
  color: var(--header-title-color);
}

#projects {
  scroll-margin-block-start: 45vh;
}

#skills {
  scroll-margin-block-start: 10vh;
}

#contact {
  padding: 5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  height: fit-content;
  width: 100%;
  margin-top: 5rem;
}

.contact .icon {
  background-color: var(--card-border);
  border-radius: 2rem;
  height: 100%;
  width: fit-content;
}

.contact {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: start;
  min-height: 250px;
  background-color: red;
  width: 750px;
  border-radius: 3rem;
  background-color: var(--card-bg-color);
  box-shadow: 0 0 20px var(--card-shadow-color);
  backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  padding: 2rem;
  gap: 2rem;
  color: var(--text-color);
}

.contact .right {
  display: flex;
  flex-direction: column;
  align-items: start;
  justify-content: center;
  gap: 1rem;
}

.contact .right h5 {
  font-size: 28px;
  font-weight: 700;
  color: var(--header-title-color);
}

.contact .info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact .item {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: start;
  gap: 1rem;
}

.contact .details label {
  font-size: 18px;
  font-weight: 500;
  color: var(--primary-color-dark);
  text-transform: capitalize;
  font-family: "Caveat", cursive;
}

.contact .details p,
.contact .details a {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-color);
  transition: color 0.2s ease;
}

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

footer {
  width: 100%;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--background-color);
  z-index: -1;
}

footer span {
  font-family: "Caveat", cursive;
  font-size: 18px;
  color: var(--primary-color);
}

@media (max-width: 1499px) {
  main {
    width: 100%;
  }
  #skills {
    width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

@media (max-width: 1200px) {
  .card:nth-child(1) img {
    animation-delay: 0.4s;
  }

  .card:nth-child(2) img {
    animation-delay: 0.5s;
  }

  .card:nth-child(3) img {
    animation-delay: 0.6s;
  }

  .card:nth-child(4) img {
    animation-delay: 0.7s;
  }

  .card:nth-child(5) img {
    animation-delay: 0.8s;
  }

  header h1 {
    font-size: 54px;
    width: 90%;
    line-height: 4.5rem;
  }
  header h5 {
    font-size: 17px;
    max-width: 90%;
    line-height: 1.8rem;
  }

  main {
    width: 95%;
    height: auto;
    padding-top: 2rem;
    padding-bottom: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
  }

  .card {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    rotate: 0deg !important;
    transform: none !important;
    width: 100%;
    max-width: 700px;
    margin: 0;
    z-index: 1 !important;
    height: auto;
    padding-bottom: 4rem;
  }
  .card:hover {
    transform: none !important;
    z-index: 1 !important;
  }
  .card:nth-of-type(1),
  .card:nth-of-type(2),
  .card:nth-of-type(3),
  .card:nth-of-type(4),
  .card:nth-of-type(5) {
    top: auto !important;
    left: auto !important;
    right: auto !important;
    rotate: 0deg !important;
    transform: none !important;
    z-index: 1 !important;
  }
  .blur {
    display: none;
  }

  #skills {
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 3rem;
  }
  #skills > div {
    width: 100%;
    max-width: 700px;
  }

  .languages .item .details h5 {
    font-size: 18px;
    font-weight: 700;
  }
  .languages .item .details p {
    font-size: 16px;
    font-weight: 500;
  }

  #contact {
    padding: 3rem 1rem;
  }
  .contact {
    width: 100%;
    max-width: 700px;
    padding: 1.5rem;
  }
  .contact .right h5 {
    font-size: 26px;
  }

  .contact .item .details label {
    font-size: 14px;
    font-weight: 700;
  }
  .contact .item .details p,
  .contact .item .details a {
    font-size: 16px;
    font-weight: 500;
  }
}

@media (max-width: 992px) {
  #navbar {
    justify-content: space-between;
    padding: 0 1.5rem;
  }
  .left {
    gap: 0.8rem;
  }
  .left a:first-child {
    font-size: 20px;
  }
  .left a svg {
    width: 18px;
    height: 18px;
  }
  menu {
    gap: 0.3rem;
  }

  menu .theme-toggle,
  menu .language-toggle {
    padding: 0.4rem;
  }
  menu .language-toggle svg,
  menu .theme-toggle svg {
    width: 18px;
    height: 18px;
  }

  header {
    padding: 4rem 1rem;
    gap: 3rem;
    text-align: center;
  }
  header h1 {
    font-size: 46px;
    line-height: 4rem;
    width: 100%;
  }
  header h5 {
    font-size: 16px;
    width: 100%;
  }

  main {
    gap: 2rem;
  }
  .card {
    max-width: 450px;
  }

  #skills > div > h5 {
    font-size: 40px;
    text-align: center;
  }

  .languages .item .wrap {
    padding: 0.8rem;
    gap: 0.8rem;
    align-items: center;
  }
  .languages .item .wrap img {
    height: 28px;
  }
  .languages .item .details h5 {
    font-size: 17px;
  }
  .languages .item .details p {
    font-size: 15px;
  }

  .contact {
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
    max-width: 400px;
  }
  .contact .icon {
    height: 80px;
    width: 80px;
    padding: 1rem;
  }
  .contact .icon svg {
    width: 100%;
    height: 100%;
  }
  .contact .right {
    align-items: center;
  }
  .contact .right h5 {
    margin-bottom: 1rem;
  }
}

@media (max-width: 850px) {
  #navbar {
    flex-wrap: wrap;
    height: auto; /* Allow navbar to grow */
    min-height: var(
      --navbar-height-stuck
    ); /* Ensure it's at least the stuck height */
  }
  #navbar.stuck {
    min-height: var(--navbar-height-stuck);
  }

  menu {
    flex-wrap: wrap;
    gap: 0.1rem;
    justify-content: flex-end; /* Push items to the right */
    width: auto; /* Allow menu to not take full width if .left is large */
  }

  .mobile-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem; /* Match theme-toggle on this screen size */
    border-radius: 0.5rem;
    cursor: pointer;
    order: 3; /* Ensure it's after theme and language toggles */
  }
  .mobile-menu-toggle svg {
    color: var(--text-color);
    width: 18px; /* Match theme/language icon size */
    height: 18px;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    width: 100vw; /* Span full width of navbar */
    background-color: var(--background-color);
    border-bottom: 1px solid var(--border-color);

    order: 4; /* Ensure it is below other items */
    position: absolute;
    top: 45px;
    right: -1.5rem;
    z-index: 1001;
    padding: 1rem;
  }

  #navbar.nav-open .nav-links {
    display: flex;
  }

  .nav-links a {
    width: 100%;
    padding: 0.8rem 1rem;
    text-align: left;
    border-radius: 0;
  }
  .nav-links a:not(:last-child) {
    border-bottom: 1px solid var(--border-color);
  }

  .nav-links .get-in-touch {
    margin-top: 0.5rem;
    text-align: center;
    border-radius: 100px;
    padding: 0.6rem 1rem !important;
    font-size: 13px;
  }

  .language-box {
    transform: scale(95%) translateX(-50%);
  }

  header {
    padding: 3rem 1rem;
    gap: 2rem;
  }
  header p {
    font-size: 16px;
  }
  header h1 {
    font-size: 36px;
    line-height: 3rem;
  }
  header h5 {
    font-size: 15px;
    line-height: 1.6rem;
  }

  .card {
    width: 95%;
    max-width: 400px;
  }
  .card img {
    height: 180px;
    object-fit: cover;
  }
  .card span {
    font-size: 17px;
  }
  .card h5 {
    font-size: 18px;
  }
  .card p {
    font-size: 13px;
  }

  #skills {
    gap: 2rem;
    margin-top: 3rem;
    width: 95%;
  }
  #skills > div {
    width: 100%;
  }
  #skills > div > h5 {
    font-size: 34px;
  }

  .experience .items .item {
    gap: 0.8rem;
  }
  .experience .item img {
    padding: 0.4rem;
  }
  .experience .item .details .top {
    gap: 0.3rem;
  }
  .experience .item .details .top p {
    font-size: 14px;
  }
  .experience .details h5 {
    font-size: 18px;
  }

  .languages .item .details h5 {
    font-size: 16px;
  }
  .languages .item .details p {
    font-size: 14px;
  }

  #contact {
    margin-top: 3rem;
    padding: 2rem 1rem;
  }
  .contact {
    width: 95%;
    padding: 1.5rem;
  }
  .contact .right h5 {
    font-size: 22px;
  }
  .contact .item .details label {
    font-size: 13px;
  }
  .contact .item .details p,
  .contact .item .details a {
    font-size: 15px;
  }
  .contact .item svg {
    width: 20px;
    height: 20px;
  }

  footer span {
    font-size: 16px;
    text-align: center;
    padding: 0 1rem;
  }
}

@media (max-width: 550px) {
  .left a:first-child {
    font-size: 18px;
  }
  header h1 {
    font-size: 24px;
    line-height: 2.5rem;
  }
  header h5 {
    font-size: 12px;
  }

  .card {
    max-width: 350px;
  }
  .card img {
    height: 160px;
  }
  .card h5 {
    font-size: 17px;
  }

  #skills > div > h5 {
    font-size: 28px;
  }

  #skills {
    padding: 0.5rem;
  }
  #skills > div {
    padding: 0;
  }

  .experience .items .item {
    background-color: var(--card-bg-color);
    box-shadow: 0 0 20px var(--card-shadow-color);
    backdrop-filter: blur(20px);
    height: 70px;
    padding: 0.5rem;
  }

  .experience .item .details .top p {
    font-size: 12px;
  }
  .experience .details h5 {
    font-size: 14px;
  }
  .experience .progress-text {
    font-size: 10px;
  }

  .languages .items .item {
    height: 60px;
  }

  .languages .item .details h5 {
    font-size: 15px;
  }
  .languages .item .details p {
    font-size: 13px;
  }

  .contact .right h5 {
    font-size: 18px;
  }
  .contact .item .details label {
    font-size: 12px;
  }
  .contact .item .details p,
  .contact .item .details a {
    font-size: 12px;
  }
}
