/*=============== GOOGLE FONTS ===============*/
@import url('https://fonts.googleapis.com/css2?family=Lora:wght@400;500;600&family=Montserrat&family=Poppins:wght@300;400;500;600&family=Roboto:wght@400;500&display=swap');

/*=============== VARIABLES CSS ===============*/
:root {
  --header-height: 3.5rem;

  /*========== Colors ==========*/
  /* Change the first number for different colors*/

  --first-color: hsl(300, 11%, 52%);
  --title-color: hsl(300, 4%, 16%);
  --text-color: hsl(300, 4%, 28%);
  --text-color-light: hsl(300, 4%, 56%);
  --body-color: hsl(300, 4%, 99%);
  --container-color: hsl(300, 4%, 95%);
  --gradient-color: linear-gradient(
    180deg,
    hsla(300, 48%, 72%, 0),
    hsla(300, 11%, 52%, 1)
  );

  /*========== Font and typography ==========*/
  /* 1rem = 16px */

  --body-font: 'Poppins', sans-serif;
  --title-font: 'lora', serif;
  --fs-1: 3rem;
  --fs-2: 2rem;
  --fs-3: 1.5rem;
  --fs-4: 1.25rem;
  --fs-5: 1rem;
  --fs-6: 0.8rem;

  /*========== Font weight ==========*/

  --fw-500: 500;
  --fw-600: 600;

  /*========== z index ==========*/

  --z-normal: 1;
  --z-tooltip: 10;
  --z-fixed: 100;
}

/**--- Responsive typography ---**/
@media screen and (min-width: 1024px) {
  :root {
    --fs-1: 3.5rem;
    --fs-2: 2.25rem;
    --fs-3: 1.75rem;
    --fs-4: 1.5rem;
    --fs-5: 1.25rem;
    --fs-6: 1rem;
  }
}

/*=============== BASE ===============*/
* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--body-font);
  font-size: var(--fs-5);
  background-color: var(--body-color);
  color: var(--text-color);
  transition: background 0.4s; /* for dark mode animation */
}

h1,
h2,
h3 {
  color: var(--title-color);
  font-family: var(--title-font);
  font-weight: var(--fw-500);
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
}

.button {
  border: 2px solid var(--first-color);
  padding: 0.75rem 1rem;
  margin-top: 2.5rem;
  border-radius: 1rem;
  font-weight: var(--fw-500);
}

.button-primary,
.button-ghost:hover {
  background: var(--first-color);
  color: var(--body-color);
  transition: 0.4s;
}

.button-ghost,
.button-primary:hover {
  background: transparent;
  color: var(--first-color);
  transition: 0.4s;
}

/*=============== THEME ===============*/

.nav__buttons {
  display: flex;
  align-items: center;
  column-gap: 1.5rem;
}

.change-theme {
  font-size: var(--fs-4);
  color: var(--title-color);
  cursor: pointer;
  transition: color 0.3s;
}

/*========== Variables Dark theme ==========*/
body.dark-theme {
  --title-color: hsl(300, 4%, 95%);
  --text-color: hsl(300, 4%, 65%);
  --body-color: hsl(300, 4%, 10%);
  --container-color: hsl(300, 4%, 12%);
}

/*========== 
    Color changes in some parts of 
    the website, in light theme
==========*/

.dark-theme .nav,
.dark-theme .nav__menu,
.dark-theme .scrollup {
  background: var(--container-color);
  box-shadow: 0 4px 20px hsla(300, 24%, 8%, 0.4);
}

.dark-theme .shape-circle {
  filter: invert(1);
}

.dark-theme .section__border {
  border-bottom: 1px solid hsl(300, 4%, 32%);
}

.dark-theme::-webkit-scrollbar {
  background: hsl(300, 4%, 15%);
}

.dark-theme::-webkit-scrollbar-thumb {
  background: hsl(300, 4%, 25%);
}

.dark-theme::-webkit-scrollbar-thumb:hover {
  background: hsl(300, 4%, 35%);
}

/*=============== REUSABLE CSS CLASSES ===============*/
.container {
  max-width: 1024px;
  margin-inline: auto;
  padding-inline: 2rem;
}

.grid {
  display: grid;
  gap: 1.5rem;
}

.section {
  padding-block: 5rem;
}

.section__title,
.section__subtitle {
  text-align: center;
  font-weight: var(--fw-500);
}

.section__title,
.home__name {
  font-size: var(--fs-2);
  font-weight: var(--fw-600);
  letter-spacing: 0.3px;
}

.section__title {
  margin-bottom: 4rem;
}

.section__subtitle {
  display: block;
  font-size: var(--fs-5);
  color: var(--text-color-light);
  margin-bottom: 0.25rem;
}

.main {
  overflow: hidden; /* For animation */
}

/*=============== HEADER & NAV ===============*/

.header {
  width: 100%;
  position: fixed;
  bottom: 2rem;
  z-index: var(--z-fixed);
}

.nav {
  height: calc(var(--header-height) + 0.5rem);
  width: 90%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--body-color);
  box-shadow: 0 4px 20px hsla(300, 24%, 35%, 0.1);
  padding-inline: 1.5rem;
  border-radius: 3rem;
  transition: background 0.4s;
}

.nav__logo,
.nav__toggle,
.nav__close {
  color: var(--title-color);
}

.nav__logo {
  font-family: var(--title-font);
  font-weight: var(--fw-500);
}

.nav__toggle {
  display: flex;
  font-size: var(--fs-4);
  cursor: pointer;
}

@media screen and (max-width: 1023px) {
  .nav__menu {
    position: fixed;
    width: 88%;
    left: 0;
    right: 0;
    bottom: -60%;
    margin: 0 auto;
    padding: 2rem 1.5rem 5rem;
    box-shadow: 0 4px 20px hsla(300, 24%, 35%, 0.1);
    border-radius: 2rem;
    background: var(--body-color);
    transition: bottom 0.3s;
  }
}

.nav__list {
  grid-template-columns: repeat(3, max-content);
  justify-content: space-evenly;
  gap: 3rem;
}

.nav__link {
  display: flex;
  flex-direction: column;
  align-items: center;
  row-gap: 0.25rem;
  font-size: var(--fs-6);
  color: var(--text-color-light);
  transition: color 0.3s;
}

.nav__link:hover {
  color: var(--title-color);
}

.nav__link i {
  font-size: var(--fs-4);
}

.nav__close {
  position: absolute;
  right: 1.5rem;
  bottom: 0.7rem;
  font-size: var(--fs-3);
  cursor: pointer;
}

/* Show menu */

.show-menu {
  bottom: 2rem;
}

/* Active link */

.active-link {
  color: var(--title-color);
}

/*=============== HOME ===============*/
.home__container {
  position: relative;
  row-gap: 4.5rem;
  padding-top: 3rem;
}

.home__content {
  text-align: center;
}

.home__profession {
  color: var(--text-color);
  font-size: var(--fs-5);
  font-weight: var(--fw-500);
  margin-top: 0.6rem;
  margin-bottom: 2rem;
}

.home__blob {
  position: relative;
  width: 260px;
  height: 350px;
  border-radius: 15rem;
  background: var(--body-color);
  border: 2px solid var(--text-color-light);
  justify-self: center;
  place-items: center;
  transition: background 0.4s;
}

.home__pfp {
  width: 200px;
  height: 290px;
  background: var(--gradient-color);
  border-radius: 7rem;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

.home__pfp img {
  width: 170px;
}

.shape-circle {
  width: 200px;
  position: absolute;
  opacity: 0.1;
  z-index: -1;
  transform: rotate(11deg);
}

.top {
  left: -3rem;
  top: -1.3rem;
}

.bottom {
  bottom: -1.3rem;
  right: -3rem;
}

.home__social,
.home__scroll-button {
  justify-self: center;
  display: flex;
  margin-top: 0.5rem;
}

.home__social {
  font-size: var(--fs-4);
  column-gap: 1.25rem;
}

.home__scroll-button {
  column-gap: 0.5rem;
  align-items: center;
}

.home__social-link,
.home__scroll-button {
  color: var(--text-color-light);
  /*transition: color 0.3s;*/
  transition: transform 0.3s;
}

.home__social-link:hover,
.home__scroll-button:hover {
  color: var(--title-color);
  transform: translateY(-0.15rem);
}

.home__scroll-button:hover {
  transform: translate(-0.15rem);
}

/*=============== ABOUT ===============*/
.about__container {
  position: relative;
}

.about__description {
  text-align: justify;
}

.about__buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.button i {
  margin-left: 0.3rem;
  font-weight: var(--fw-600);
}

/*=============== SKILLS ===============*/
.skills__container {
  row-gap: 3.5rem;
}

.skills__title {
  display: flex;
  justify-content: center;
  align-items: center;
  column-gap: 0.5rem;
  font-size: var(--fs-5);
  font-weight: var(--fw-600);
  margin-bottom: 2.5rem;
}

.skills__title i {
  font-size: var(--fs-4);
  font-weight: initial;
}

.skills__info,
.skills__data,
.skills__blob {
  display: grid;
}

.skills__info {
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem 1rem;
}

.skills__data {
  justify-content: center;
  text-align: center;
}

.skills__blob {
  width: 80px;
  height: 100px;
  background: var(--container-color);
  border-radius: 3rem;
  place-items: center;
  margin-bottom: 1rem;
  transition: background 0.4s;
}

.skills__blob img {
  width: 40px;
}

.skills__name {
  font-size: var(--fs-6);
  margin-bottom: 0.25rem;
}

/* Animation skills */

.skills__blob:hover img {
  animation: bounce-skills 0.6s;
}

@keyframes bounce-skills {
  0% {
    transform: translate(0);
  }
  20% {
    transform: translateY(-6px);
  }
  40% {
    transform: translate(0);
  }
  60% {
    transform: translateY(-3px);
  }
  80% {
    transform: translate(0);
  }
}

/*=============== PROJECTS ===============*/
.projects__container {
  overflow: initial;
}

.projects__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.projects__img {
  width: 300px;
  border-radius: 0.75rem;
  margin-bottom: 1.25rem;
}

.projects__title {
  font-size: var(--fs-3);
  margin: 2rem 0 1.25rem;
  text-align: center;
}

.projects__buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
}

.projects__button {
  display: inline-flex;
  align-items: center;
  column-gap: 0.5rem;
  color: var(--title-color);
  font-size: var(--fs-6);
}

.projects__button i {
  font-size: var(--fs-5);
  transition: transform 0.3s;
}

.projects__button:hover i {
  transform: translateX(0.25rem);
}

/**--- Swiper class ---**/

.projects__container .swiper-button-prev::after,
.projects__container .swiper-button-next::after {
  content: '';
}

.projects__container .swiper-button-prev,
.projects__container .swiper-button-next {
  width: initial;
  height: initial;
  margin: initial;
  font-size: 2.5rem;
  color: var(--title-color);
}

.projects__container .swiper-button-prev {
  left: -1rem;
  top: 30%;
}

.projects__container .swiper-button-next {
  right: -1rem;
  top: 30%;
}

.projects__container .swiper-slide {
  margin-bottom: 4.5rem;
}

.projects__container .swiper-pagination-bullets {
  bottom: 0;
}

.projects__container .swiper-pagination-bullet {
  background: var(--text-color-light);
  opacity: initial;
}

.projects__container .swiper-pagination-bullet-active {
  background: var(--title-color);
}

/*=============== CONTACT ===============*/

.contact__form {
  display: grid;
  position: relative;
  row-gap: 2.5rem;
}

.contact__form-div {
  position: relative;
  height: 4rem;
}

.contact__form-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 2px solid var(--text-color-light);
  border-radius: 1.5rem;
  padding: 1.5rem;
  font-size: var(--fs-5);
  font-family: var(--title-font);
  color: var(--title-color);
  background: none;
  outline: none;
  z-index: 1;
}

.contact__form-tag {
  position: absolute;
  top: -0.95rem;
  left: 1.25rem;
  z-index: 10;
  background: var(--body-color);
  color: var(--title-color);
  font-size: var(--fs-6);
  font-weight: var(--fw-500);
  padding: 0.35rem;
  transition: background 0.4s;
}

.contact__form-area {
  height: 10rem;
}

.contact__form-area textarea {
  resize: none;
}

.contact__button {
  display: inline-flex;
  justify-content: center;
  border: none;
  background: none;
  color: var(--title-color);
  font-size: var(--fs-3);
  font-family: var(--title-font);
  font-weight: var(--fw-600);
  cursor: pointer;
  margin-top: 0.75rem;
}

.contact__button i {
  font-weight: initial;
  font-size: var(--fs-3);
  margin-left: 0.5rem;
  transition: transform 0.3s;
}

.contact__button:hover i {
  transform: translateX(0.25rem);
}

.contact__alert {
  font-size: var(--fs-6);
  position: absolute;
  bottom: 2.8rem;
  left: 1.5rem;
}

/* Status color */

.color-red {
  color: hsl(4, 71%, 50%);
}

.color-green {
  color: var(--first-color);
}

/*=============== FOOTER ===============*/

.footer__container {
  padding: 5rem 0 6rem;
  text-align: center;
  border-top: 2px solid var(--text-color-light);
}

.footer__title {
  font-size: var(--fs-2);
  font-weight: var(--fw-600);
  margin-bottom: 0.5rem;
}

footer p {
  margin-bottom: 1rem;
}

.footer__social {
  display: flex;
  justify-content: center;
  column-gap: 1.25rem;
  margin-top: 3rem;
}

.footer__social-link {
  font-size: var(--fs-4);
  color: var(--text-color-light);
  transition: color 0.3s;
  transition: transform 0.3s;
}

.footer__social-link:hover {
  transform: translateY(-0.15rem);
  color: var(--title-color);
}

.footer__copy {
  display: block;
  margin-top: 4.5rem;
  font-size: var(--fs-6);
  color: var(--text-color-light);
}

/*=============== SCROLL BAR ===============*/

::-webkit-scrollbar {
  width: 0.6rem;
  border-radius: 0.5rem;
  background: hsl(300, 4%, 75%);
}

::-webkit-scrollbar-thumb {
  background: hsl(300, 4%, 65%);
  border-radius: 0.5rem;
}

::-webkit-scrollbar-thumb:hover {
  background: hsl(300, 4%, 55%);
}

/*=============== SCROLL UP ===============*/
.scrollup {
  display: inline-block;
  position: fixed;
  right: 1rem;
  bottom: -30%;
  padding: 0.35rem;
  background: var(--body-color);
  color: var(--title-color);
  box-shadow: 0 4px 12px hsla(300, 24%, 35%, 0.15);
  border-radius: 1.1rem;
  z-index: var(--z-tooltip);
  transition: bottom 0.3s, transform 0.3s;
}

.scrollup:hover {
  transform: translateY(-0.25rem);
}

/* Show Scroll Up*/

.show-scroll {
  bottom: 7.5rem;
}

/*=============== BREAKPOINTS ===============*/
/** SMALL DEVICES **/

@media screen and (max-width: 340px) {
  .container {
    margin-inline: 1rem;
  }

  .nav__menu {
    padding-bottom: 4rem;
  }

  .nav__list {
    gap: 1rem 1.25rem;
  }

  .skills__info {
    grid-template-columns: repeat(2, 1fr);
  }

  .projects__img {
    width: 200px;
    justify-self: center;
  }
}

/** MEDIUM DEVICES **/

@media screen and (min-width: 540px) {
  .container {
    padding-inline: 3rem;
  }

  .nav,
  .nav__menu {
    width: 380px;
  }

  .nav {
    margin-inline: auto;
    padding-inline: 2rem;
  }

  .home__social,
  .home__scroll-button {
    position: absolute;
  }

  .home__social {
    display: grid;
    grid-template-columns: max-content;
    row-gap: 1.25rem;
    bottom: 25%;
    left: 0;
    font-size: var(--fs-4);
  }

  .home__scroll-button {
    display: grid;
    row-gap: 2.7rem;
    justify-items: center;
    right: -7%;
    bottom: 33.5%;
    font-size: var(--fs-5);
  }

  .home__scroll-name {
    transform: rotate(90deg);
  }

  .skills__container {
    justify-content: center;
  }

  .skills__info {
    grid-template-columns: repeat(4, 1fr);
    gap: 2.5rem 2rem;
  }

  .projects__container {
    overflow: hidden;
  }

  .projects__container .swiper-button-prev {
    left: 0;
  }

  .projects__container .swiper-button-next {
    right: 0;
  }

  .projects__img {
    width: 370px;
  }

  .contact__container {
    justify-content: center;
  }

  .contact__form-div {
    margin-inline: 2rem;
  }

  .contact__form {
    width: 550px;
  }
}

@media screen and (min-width: 640px) {
  .skills__info {
    grid-template-columns: repeat(5, 1fr);
  }

  .contact__form {
    width: 600px;
  }
}

@media screen and (min-width: 740px) {
  .home__container,
  .about__container,
  .projects__container {
    max-width: 780px;
  }

  .home__scroll-button {
    display: grid;
    row-gap: 3rem;
    justify-items: center;
    right: -7%;
    bottom: 33.5%;
    font-size: var(--fs-5);
  }

  .container {
    padding-inline: 3rem;
  }

  .nav {
    padding-inline: 1.5rem;
  }

  .skills__info {
    grid-template-columns: repeat(5, 1fr);
  }

  .skills__title i {
    font-size: var(--fs-4);
  }

  .skills__name {
    font-size: var(--fs-5);
  }

  .skills__info {
    gap: 3rem;
  }

  .projects__container .swiper-button-prev {
    left: 1rem;
  }

  .projects__container .swiper-button-next {
    right: 1rem;
  }

  .contact__form {
    width: 710px;
  }
}

/** LARGE DEVICES **/

@media screen and (min-width: 1023px) {
  .header {
    width: 100vw;
    top: 0;
    bottom: initial;
    background: var(--body-color);
    transition: 0.5s;
  }

  .nav {
    width: 100%;
    height: calc(var(--header-height) + 1.3rem);
    box-shadow: none;
    border-radius: 0;
    column-gap: 3rem;
  }

  .nav__link i,
  .nav__toggle,
  .nav__close {
    display: none;
  }

  .nav__menu {
    width: initial;
    background: var(--body-color);
    transition: background 0.4s;
  }

  .nav__list {
    display: flex;
    column-gap: 3rem;
  }

  .nav__link {
    font-size: var(--fs-5);
  }

  .home__container {
    padding-top: 5rem;
  }

  .dark-theme .nav,
  .dark-theme .nav__menu {
    background: var(--body-color);
    box-shadow: none;
  }

  .change-theme {
    color: var(--text-color-light);
  }

  .change-theme:hover {
    color: var(--title-color);
  }

  .scrollup {
    right: 3rem;
  }

  .show-scroll {
    bottom: 5rem;
  }

  /** CHANGE HEADER BACKGROUND **/

  .bg-header {
    box-shadow: 0 4px 20px hsla(300, 24%, 35%, 0.1);
  }

  .dark-theme .bg-header {
    box-shadow: 0 4px 20px hsla(300, 24%, 8%, 0.6);
  }
}

@media screen and (min-width: 1048px) {
  .container {
    margin-inline: auto;
  }
}

@media screen and (min-width: 1200px) {
  .home__container,
  .about__container {
    max-width: 990px;
  }

  .home__blob {
    width: 400px;
    height: 580px;
    border-radius: 12.5rem;
  }

  .home__pfp {
    width: 340px;
    height: 520px;
    border-radius: 10.6rem;
  }

  .home__pfp img {
    width: 300px;
  }

  .home .shape-circle {
    width: 300px;
  }

  .top {
    left: -3rem;
    top: -3rem;
  }

  .bottom {
    bottom: -3rem;
    right: -3rem;
  }

  .home__name,
  .section__title {
    font-size: var(--fs-1);
  }

  .home__content {
    row-gap: 3rem;
  }

  .home__social {
    column-gap: 2rem;
  }

  .home__social-link {
    font-size: 1.8rem;
  }

  .skills__title i {
    font-size: var(--fs-4);
  }

  .skills__name {
    font-size: var(--fs-5);
  }

  .skills__info {
    gap: 3rem;
  }

  .projects__container {
    max-width: 1000px;
  }

  .projects__container .swiper-button-prev,
  .projects__container .swiper-button-next {
    font-size: var(--fs-1);
    top: 20%;
  }

  .projects__container .swiper-button-prev {
    left: -1rem;
  }

  .projects__container .swiper-button-next {
    right: -1rem;
  }

  .projects__container .swiper-slide {
    margin-bottom: 7rem;
  }

  .projects__img {
    width: 320px;
    margin-bottom: 2rem;
  }

  .contact__form {
    width: 900px;
  }
}
