/*=============== GOOGLE FONTS ===============*/
@import url('https://fonts.googleapis.com/css2?family=Amiri:ital,wght@0,400;0,700;1,400;1,700&family=Tajawal:wght@400;500;700&display=swap');

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

  /*========== Colors =========*/
  /* Main Palette: Dark, Gold, Red */
  --first-color: hsl(38, 56%, 65%);
  --first-color-alt: hsl(38, 56%, 55%);
  --secondary-color: hsl(0, 50%, 45%);
  --title-color: hsl(0, 0%, 95%);
  --text-color: hsl(0, 0%, 80%);
  --text-color-light: hsl(0, 0%, 60%);
  --body-color: hsl(0, 0%, 12%);
  --container-color: hsl(0, 0%, 16%);

  /*========== Font and typography ==========*/
  --body-font: 'Tajawal', sans-serif;
  --title-font: 'Amiri', serif;
  --biggest-font-size: 2.25rem;
  --h1-font-size: 1.75rem;
  --h2-font-size: 1.25rem;
  --h3-font-size: 1rem;
  --normal-font-size: .938rem;
  --small-font-size: .813rem;
  --smaller-font-size: .75rem;

  /*========== Font weight ==========*/
  --font-medium: 500;
  --font-bold: 700;

  /*========== Margenes Bottom ==========*/
  --mb-0-5: .5rem;
  --mb-0-75: .75rem;
  --mb-1: 1rem;
  --mb-1-5: 1.5rem;
  --mb-2: 2rem;
  --mb-2-5: 2.5rem;

  /*========== z index ==========*/
  --z-tooltip: 10;
  --z-fixed: 100;
}

/* Responsive typography */
@media screen and (min-width: 968px) {
  :root {
    --biggest-font-size: 4rem;
    --h1-font-size: 2.5rem;
    --h2-font-size: 1.5rem;
    --h3-font-size: 1.25rem;
    --normal-font-size: 1rem;
    --small-font-size: .875rem;
    --smaller-font-size: .813rem;
  }
}

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

html {
  scroll-behavior: smooth;
}

body,
button,
input,
textarea {
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
}

body {
  background-color: var(--body-color);
  color: var(--text-color);
  transition: .4s; /* For dark mode animation */
}

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

ul {
  list-style: none;
}

a {
  text-decoration: none;
}

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

button {
  cursor: pointer;
  border: none;
  outline: none;
}

/*=============== REUSABLE CSS CLASSES ===============*/
.container {
  max-width: 968px;
  margin-left: var(--mb-1-5);
  margin-right: var(--mb-1-5);
}

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

.section {
  padding: 4.5rem 0 1rem;
}

.section__title,
.section__subtitle {
  text-align: center;
}

.section__title {
  font-size: var(--h1-font-size);
  margin-bottom: var(--mb-2);
}

.section__subtitle {
  display: block;
  color: var(--first-color);
  font-family: var(--title-font);
}

/*=============== HEADER ===============*/
.header {
  width: 100%;
  background-color: transparent;
  position: fixed;
  top: 0;
  right: 0;
  z-index: var(--z-fixed);
  transition: .4s;
}

.nav {
  height: var(--header-height);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav__logo {
  color: var(--title-color);
  font-family: var(--title-font);
  font-weight: var(--font-bold);
  font-size: var(--h2-font-size);
}

.nav__toggle {
  font-size: 1.25rem;
  color: var(--title-color);
  cursor: pointer;
}

.nav__menu {
    position: fixed;
    background-color: hsla(0, 0%, 10%, .8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    width: 80%;
    top: calc(var(--header-height) + 1rem);
    right: -100%;
    padding: 2rem 1.5rem;
    border-radius: 1rem;
    transition: right .4s;
}

.nav__list {
  display: flex;
  flex-direction: column;
  text-align: center;
  gap: 1.5rem;
}

.nav__link {
  color: var(--title-color);
  font-family: var(--title-font);
  font-weight: var(--font-medium);
  transition: .3s;
}

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


/* Show menu */
.show-menu {
  right: 1.5rem;
}

/* Change background header */
.scroll-header {
  background-color: var(--body-color);
  box-shadow: 0 4px 8px hsla(0, 0%, 4%, .3);
}

/* Active link */
.active-link {
  color: var(--first-color);
  position: relative;
}

.active-link::before {
  content: '';
  position: absolute;
  bottom: -.5rem;
  right: 45%;
  width: 6px;
  height: 6px;
  background-color: var(--first-color);
  border-radius: 50%;
}


/*=============== HOME ===============*/
.home__container {
  padding-top: 2.5rem;
  row-gap: 2.5rem;
}

.home__greeting {
  font-size: var(--small-font-size);
  font-weight: var(--font-medium);
  color: var(--text-color-light);
  display: block;
  margin-bottom: var(--mb-0-5);
}

.home__name {
  font-size: var(--biggest-font-size);
}

.home__education {
  font-size: var(--h2-font-size);
  font-weight: var(--font-medium);
  color: var(--text-color);
  margin-bottom: var(--mb-2-5);
}

.home__handle {
  justify-self: center;
  width: 250px;
  height: 250px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 4px solid var(--first-color);
}

.home__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home__buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
}

.home__social {
  position: absolute;
  bottom: 5rem;
  right: 1.5rem;
  display: grid;
  row-gap: .5rem;
}

.home__social-link {
  color: var(--first-color);
  font-size: 1.25rem;
  transition: .3s;
}

.home__social-link:hover {
  color: var(--first-color-alt);
}

.home__scroll {
  position: absolute;
  bottom: 5rem;
  left: 1.5rem;
  display: grid;
  justify-items: center;
  row-gap: .25rem;
  color: var(--first-color);
}

.home__scroll-icon {
  font-size: 1.25rem;
}

.home__scroll-name {
  font-size: var(--smaller-font-size);
}


/*=============== BUTTONS ===============*/
.button {
  display: inline-block;
  background-color: var(--first-color);
  color: var(--body-color);
  padding: .75rem 1.5rem;
  border-radius: .5rem;
  font-weight: var(--font-medium);
  transition: .3s;
}

.button:hover {
  background-color: var(--first-color-alt);
}

.button--ghost {
  background-color: transparent;
  border: 2px solid var(--first-color);
  color: var(--first-color);
}

/*=============== ABOUT ===============*/
.about__container {
  row-gap: 2.5rem;
}

.about__img-container {
  justify-self: center;
  width: 280px;
  border-radius: 1rem;
  overflow: hidden;
}

.about__data {
  text-align: center;
}

.about__info {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .5rem;
  margin-bottom: var(--mb-2);
}

.about__box {
  background-color: var(--container-color);
  border-radius: .75rem;
  padding: .75rem .5rem;
}

.about__icon {
  font-size: 1.5rem;
  color: var(--first-color);
  margin-bottom: var(--mb-0-5);
}

.about__title {
  font-size: var(--small-font-size);
}

.about__subtitle {
  font-size: var(--smaller-font-size);
}

.about__description {
  padding: 0 1rem;
  margin-bottom: var(--mb-2-5);
}

/*=============== SKILLS (SONGS) ===============*/
.skills__container {
  row-gap: 2rem;
}

.skills__content {
  background-color: var(--container-color);
  padding: 1.5rem;
  border-radius: 1rem;
}

.skills__title {
  font-size: var(--normal-font-size);
  font-weight: var(--font-medium);
  color: var(--first-color);
  text-align: center;
  margin-bottom: var(--mb-1-5);
}

.skills__box {
    display: flex;
    justify-content: center;
    column-gap: 3rem;
}

.skills__group {
    display: grid;
    align-content: flex-start;
    row-gap: 1.5rem;
}

.skills__data {
    display: flex;
    column-gap: .5rem;
    align-items: center;
}

.skills__data i {
    font-size: 1rem;
    color: var(--first-color);
}

.skills__name {
    font-size: var(--normal-font-size);
    font-weight: var(--font-medium);
    line-height: 18px;
}

.skills__level {
    font-size: var(--smaller-font-size);
}


/*=============== SERVICES (TIMELINE) ===============*/
.services__container {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.services__card {
  background-color: var(--container-color);
  padding: 2.5rem 1.5rem 1.5rem;
  border-radius: 1rem;
  text-align: center;
}

.services__title {
  font-size: var(--h3-font-size);
  margin-bottom: var(--mb-1);
}

.services__button {
  color: var(--first-color);
  font-size: var(--small-font-size);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  column-gap: .25rem;
}

.services__button i {
  transition: .3s;
}

.services__button:hover i {
  transform: translateX(-.25rem);
}

.services__modal {
  position: fixed;
  inset: 0;
  background-color: hsla(0, 0%, 12%, .7);
  padding: 2rem 1.5rem;
  display: grid;
  place-items: center;
  visibility: hidden;
  opacity: 0;
  z-index: var(--z-fixed);
  transition: .4s;
}

.services__modal-content {
  position: relative;
  background-color: var(--body-color);
  padding: 4.5rem 1.5rem 2.5rem;
  border-radius: 1.5rem;
  text-align: center;
}

.services__modal-title,
.services__modal-description {
  margin-bottom: var(--mb-1-5);
}

.services__modal-description {
  font-size: var(--small-font-size);
  line-height: 1.6;
}

.services__modal-close {
  position: absolute;
  top: 1.5rem;
  left: 1.5rem;
  font-size: 1.5rem;
  color: var(--first-color);
  cursor: pointer;
}

/*Active modal*/
.active-modal {
  opacity: 1;
  visibility: visible;
}


/*=============== WORK ===============*/
.work__filters {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: .75rem;
  margin-bottom: var(--mb-2);
}

.work__item {
  cursor: pointer;
  color: var(--title-color);
  padding: .25rem .75rem;
  font-weight: var(--font-medium);
  border-radius: .5rem;
}

.work__card {
  background-color: var(--container-color);
  padding: 1rem;
  border-radius: 1rem;
  position: relative;
  overflow: hidden;
}

.work__img {
  border-radius: 1rem;
}

.work__title {
  position: absolute;
  bottom: -100%;
  right: 1rem;
  font-size: var(--normal-font-size);
  color: var(--body-color);
  transition: .3s;
}

.work__button {
  position: absolute;
  bottom: -100%;
  left: 1rem;
  color: var(--body-color);
  font-size: 1.25rem;
  transition: .3s;
}

.work__card:hover .work__title,
.work__card:hover .work__button {
    bottom: 1rem;
}

.work__card:hover::before {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, hsla(38, 56%, 65%, 0.1), hsla(38, 56%, 65%, 0.9));
}


/* Active item work*/
.active-work {
  background-color: var(--first-color);
  color: var(--body-color);
}

/*=============== TESTIMONIAL ===============*/
.testimonial__container {
  padding-bottom: 2.5rem;
}

.testimonial__card {
  background-color: var(--container-color);
  padding: 1.5rem;
  border-radius: 1.5rem;
  text-align: center;
}

.testimonial__img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  margin: 0 auto var(--mb-1);
  object-fit: cover;
}

.testimonial__name {
  font-size: var(--normal-font-size);
  font-family: var(--title-font);
  margin-bottom: var(--mb-0-5);
}

.testimonial__description {
  font-size: var(--small-font-size);
}

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

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

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

/*=============== FOOTER ===============*/
.footer {
  background-color: var(--container-color);
}

.footer__container {
  padding: 2rem 0 6rem;
  text-align: center;
}

.footer__title {
  font-size: var(--h1-font-size);
  margin-bottom: var(--mb-1);
}

.footer__list,
.footer__social {
  display: flex;
  justify-content: center;
}

.footer__list {
  margin-bottom: var(--mb-2);
  column-gap: 1.5rem;
}

.footer__link {
  color: var(--text-color);
}

.footer__link:hover {
  color: var(--first-color);
}

.footer__social {
  column-gap: 1.25rem;
}

.footer__social-link {
  background-color: var(--body-color);
  padding: .5rem;
  border-radius: .5rem;
  color: var(--first-color);
  font-size: 1.25rem;
  display: inline-flex;
}

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

/*=============== SCROLL UP ===============*/
.scrollup {
  position: fixed;
  background-color: var(--first-color);
  right: 1.5rem;
  bottom: -20%;
  display: inline-flex;
  padding: .4rem;
  border-radius: .4rem;
  z-index: var(--z-tooltip);
  opacity: .8;
  transition: .4s;
}

.scrollup:hover {
  opacity: 1;
}

.scrollup__icon {
  font-size: 1.5rem;
  color: var(--body-color);
}

/* Show scroll */
.show-scroll {
    bottom: 5rem;
}

/*=============== MEDIA QUERIES ===============*/
/* For small devices */
@media screen and (max-width: 320px) {
  .container {
    margin-left: var(--mb-1);
    margin-right: var(--mb-1);
  }
  .home__buttons {
    flex-direction: column;
  }
  .about__info {
    grid-template-columns: repeat(2, 1fr);
  }
  .skills__box {
    column-gap: 1rem;
  }
}

/* For medium devices */
@media screen and (min-width: 576px) {
    .nav__menu {
        width: 342px;
    }
    .about__info {
        grid-template-columns: repeat(3, 140px);
        justify-content: center;
    }
    .about__description {
        padding: 0 5rem;
    }
    .work__container {
        grid-template-columns: repeat(2, 1fr);
    }
    .testimonial__card {
        width: 450px;
        margin: 0 auto;
    }
}

@media screen and (min-width: 767px) {
  body {
    margin: 0;
  }
  .section {
    padding: 7rem 0 2rem;
  }
  .nav {
    height: calc(var(--header-height) + 1.5rem);
  }
  .nav__logo {
    font-size: var(--h3-font-size);
  }
  .nav__toggle {
    display: none;
  }
  .nav__menu {
    position: static;
    background: none;
    width: auto;
    padding: 0;
    right: 0;
  }
  .nav__list {
    flex-direction: row;
    column-gap: 2.5rem;
  }
  .nav__link {
    font-size: var(--normal-font-size);
  }
  .home__container {
    grid-template-columns: repeat(2, 1fr);
    align-items: center;
    padding-top: 4rem;
  }
  .home__handle {
      order: 1;
  }
  .home__data {
      text-align: initial;
  }
  .home__buttons {
      justify-content: flex-start;
  }
  .home__social {
      bottom: initial;
      top: 50%;
      transform: translateY(-50%);
      right: -2rem;
  }
    .home__scroll {
      bottom: 3rem;
      left: initial;
      right: calc(50% - 75px);
    }

  .about__container {
    grid-template-columns: repeat(2, 1fr);
    align-items: center;
  }
  .about__data {
    text-align: initial;
  }
  .about__description {
    padding: 0 4rem 0 0;
  }

  .skills__container {
    grid-template-columns: repeat(2, 1fr);
  }
  .skills__content {
    padding: 2rem 4rem;
  }
.footer__container {
    padding: 2rem 0;
}
.footer__list {
    column-gap: 3rem;
}
.footer__social {
    column-gap: 2rem;
}
.footer__copy {
    margin-top: 5rem;
}  

}

/* For large devices */
@media screen and (min-width: 992px) {
  .container {
    margin-left: auto;
    margin-right: auto;
  }
  .section__title {
    margin-bottom: 3.5rem;
  }
  .home__container {
    column-gap: 4rem;
  }
  .home__handle {
    width: 320px;
    height: 320px;
  }
  .home__social {
      right: -4rem;
  }
  .about__container {
      column-gap: 7rem;
  }
  .about__img-container {
      width: 350px;
  }
  .work__container {
      grid-template-columns: repeat(3, 1fr);
  }
  .testimonial__container {
      padding-bottom: 4rem;
  }
}
