/* light theme */
:root {
  --main-color: #7e459b;
  --second-color: #c1b6fc;
  --light-color: #fbfbfe;
  --dark-color: #333333;
  --main-font: 'Poppins', sans-serif;
}

/* dark theme */
:root[data-theme='dark'] {
  --main-color: #7e459b;
  --second-color: #c1b6fc;
  --light-color: #191627;
  --dark-color: #fbfbfe;
}

html {
  scroll-behavior: smooth;
}

* {
  box-sizing: border-box;
}

body {
  margin: auto;
  font-family: var(--main-font);
  background-color: var(--light-color);
}

nav,
main,
footer {
  margin: 0 auto;
}

main {
  width: 60%;
  padding-top: calc(1.5rem * 2 + 1rem);
  color: var(--dark-color);
}

footer {
  width: 100%;
  padding: 1.5rem 7rem;
}

nav {
  position: fixed;
  width: 100%;
  padding: 1.5rem 7rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--dark-color);
  border-bottom: 1px solid #6f7a7e1c;
  background-color: var(--light-color);
  z-index: 10000;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
}

.hamburger-line {
  width: 22px;
  height: 2px;
  background: var(--dark-color);
  border-radius: 2px;
}

.links {
  display: flex;
  gap: 2rem;
}

.links.show {
  display: flex;
  animation: slideDown 200ms ease;
}

.links a {
  display: block;
  padding: 0.75rem 1rem;
  font-size: 14px;
  text-decoration: none;
  color: var(--dark-color);
}

h1 {
  font-size: 2.25rem;
  color: var(--dark-color);
}

h2 {
  font-size: 1.5rem;
  color: var(--dark-color);
}

h3 {
  font-size: 1.25rem;
}

h1,
h2,
h3,
p {
  margin: 0;
}

button {
  padding: 1rem;
  font-family: var(--main-font);
  cursor: pointer;
  border: none;
  border-radius: 0.5rem;
  color: var(--light-color);
  background-color: var(--main-color);
}

section {
  padding-top: 6rem;
}

.titles {
  text-align: center;
  margin-bottom: 3rem;
}

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

.bio-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.bio-img {
  width: 50%;
  border-radius: 0.5rem;
}

.profile,
.skills,
.portfolio,
.contact {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.skills-info {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  max-width: 800px;
  margin: 0 auto;
}

.skills-info div {
  padding: 1.5rem;
  text-align: center;
  color: var(--main-color);
  border-radius: 0.5rem;
  box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;
  transition: transform 0.2s ease;
}

.skills-info div:hover {
  color: var(--second-color);
  transform: scale(1.05);
}

.profile-container {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
}

.profile-img {
  width: 40%;
  border-radius: 0.5rem;
}

.profile-info {
  max-width: 60%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 1rem;
}

.profile-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.profile-links li a {
  font-size: 1.5rem;
  text-decoration: none;
  color: var(--main-color);
  transition: color 0.3s;
}

.profile-links li a:hover {
  text-decoration: none;
  color: var(--dark-color);
  transition: color 0.3s;
}

.profile button a {
  text-decoration: none;
  color: var(--light-color);
}

.carousel-container {
  width: 100%;
  position: relative;
  padding: 0 3rem;
  overflow: hidden;
}

.carousel {
  display: flex;
  gap: 2rem;
  padding: 1rem;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-behavior: smooth;
}

.carousel::-webkit-scrollbar {
  display: none;
}

.carousel-arrows {
  top: 50%;
  position: absolute;
  border: none;
  font-size: 2rem;
  color: var(--main-color);
  background-color: transparent;
  transform: translateY(-50%);
}

.prev {
  left: 10px;
}

.next {
  right: 10px;
}

.card {
  min-width: 320px;
  height: 350px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding-bottom: 1rem;
  border-radius: 0.5rem;
  box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;
}

.card a {
  color: var(--light-color);
  text-decoration: none;
}

.project {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.project-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.project-img {
  width: 100%;
  height: 100%;
  border-radius: 0.5rem 0.5rem 0 0;
}

.form-container {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

form {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-bottom: 3rem;
}

form div {
  width: 80%;
}

form input,
form textarea {
  width: 100%;
  height: 3rem;
  padding: 1rem;
  margin-top: 0.3rem;
  font-family: var(--main-font);
  border: none;
  border-radius: 0.5rem;
  color: var(--dark-color);
  background-color: var(--second-color);
}

form input:focus,
form textarea:focus {
  outline: none;
  border: 1px solid var(--main-color);
}

form textarea {
  height: 150px;
}

form button {
  width: 80%;
}

label {
  color: var(--dark-color);
}

#back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 1000;
  font-size: 1.6rem;
  cursor: pointer;
  color: var(--second-color);
}

footer {
  color: var(--light-color);
  background-color: var(--main-color);
}

@media (max-width: 1024px) {
  main {
    width: 90%;
    padding-top: 3rem;
  }

  .bio {
    justify-content: center;
  }

  .bio-info {
    width: 40%;
  }

  .bio-img {
    width: 50%;
    max-width: 350px;
  }

  .profile-container {
    flex-direction: column;
    align-items: center;
  }

  .profile-links {
    flex-direction: row;
  }

  .profile-img {
    width: 80%;
    max-width: 350px;
  }

  .profile-info {
    max-width: 100%;
    align-items: center;
    text-align: center;
  }

  .skills-info {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }
}

@media (max-width: 768px) {
  nav {
    padding: 1rem 2rem;
    width: 100vw;
  }

  .skills-info {
    width: 80vw;
  }

  .menu-toggle {
    display: flex;
  }

  .links {
    flex-direction: column;
    max-height: 0;
    padding: 0;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    opacity: 0;
    z-index: 100;
    border-radius: 0 0 12px 12px;
    background: var(--light-color);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    transition: max-height 0.3s ease, opacity 0.3s ease;
  }

  .links.show {
    max-height: 500px;
    opacity: 1;
    padding: 0.5rem 0;
  }

  .bio-info {
    align-items: center;
    text-align: center;
  }

  .bio-img {
    display: none;
  }

  .skills-info {
    gap: 1rem;
  }

  .carousel-container {
    padding: 0 1rem;
  }

  .carousel {
    gap: 1rem;
  }

  .card {
    min-width: 80%;
    height: auto;
  }

  .project-img {
    height: auto;
  }

  form div {
    width: 90%;
  }

  form button {
    width: 90%;
  }
}