/*========== Responsive typography ==========*/
@media screen and (min-width: 1150px) {
  :root {
    --biggest-font-size: 4.5rem;
    --h1-font-size: 3rem;
    --h2-font-size: 1.5rem;
    --h3-font-size: 1.25rem;
    --normal-font-size: 1rem;
    --small-font-size: 0.875rem;
    --smaller-font-size: 0.813rem;
  }
}

/* Navigation for mobile devices */
@media screen and (max-width: 1150px) {
  .nav__menu {
    position: fixed;
    top: -150%;
    left: 0;
    background-color: rgba(0, 0, 0, 0.75);
    width: 100%;
    padding-block: 1.8rem 5rem;
    text-align: center;
    backdrop-filter: blur(8px);
    transition: top 0.4s ease;
  }

  .show-menu {
    top: 0;
  }
}

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

  .home__image {
    width: 180px;
  }

  .about__image {
    width: 180px;
  }

  .about__shadow {
    height: 330px;
    right: -2.5rem;
  }

  .contact__data {
    width: 100%;
  }

  .contact__data .section__title-2 {
    transform: translateX(0);
  }

  .contact__mail {
    padding: 5rem 0.5rem 2.5rem;
  }
}

@media screen and (max-width: 385px) {
  .about__buttons {
    column-gap: 0.5rem;
  }

  .about__buttons .button {
    padding-inline: 0.5rem;
  }
}

/* For medium devices */
@media screen and (min-width: 576px) {
  .home__container,
  .about__container,
  .projects__container {
    grid-template-columns: 350px;
    justify-content: center;
  }

  .button__ghost {
    padding: 0.75rem;
  }

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

  .contact__data {
    width: 350px;
    padding: 4rem 1.5rem;
    margin-inline: auto;
  }

  .contact__container {
    grid-template-columns: 500px;
    justify-content: center;
  }

  .contact__group {
    grid-template-columns: repeat(2, 1fr);
    column-gap: 1rem;
  }

  .contact__social {
    background-color: transparent;
  }

  .contact__social-arrow {
    filter: invert(1);
  }

  .contact__social-description-1 {
    color: var(--text-color);
  }

  .contact__social-description-2 {
    color: var(--title-color);
  }

  .dark-theme .contact__social-arrow {
    filter: none;
  }
}

@media screen and (min-width: 768px) {
  .projects__container {
    grid-template-columns: repeat(2, 1fr);
  }

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

/* For large devices */
@media screen and (min-width: 1150px) {
  .container {
    margin-inline: auto;
  }

  .section {
    padding-block: 7rem 2rem;
  }

  .section__title-1::after,
  .section__title-2::after {
    width: 70px;
    height: 48px;
  }

  .geometric-box {
    transform: scale(1.2);
  }

  .nav {
    height: calc(var(--header-height) + 2rem);
    column-gap: 4rem;
  }

  .nav__close,
  .nav__toggle,
  .nav__name,
  .nav__title {
    display: none;
  }

  .nav__list {
    flex-direction: row;
    column-gap: 4rem;
  }

  .nav__menu {
    margin-left: auto;
  }

  .nav__link {
    color: var(--text-color);
    font-size: var(--normal-font-size);
  }

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

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

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

  .nav__link-button {
    background-color: var(--black-color);
    color: var(--white-color);
    padding: 1.1rem 1.5rem;
  }

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

  .nav__link-button::after {
    background-color: transparent;
  }

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

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

  .home__container {
    grid-template-columns: repeat(2, 460px);
    gap: 2rem 4rem;
    align-items: center;
    padding-block: 5.5rem;
  }

  .home__perfil {
    grid-column: 2 / 3;
    grid-row: 1 / 3;
  }

  .home__image {
    width: 350px;
  }

  .home__shadow {
    right: -1.25rem;
    bottom: -1.25rem;
    border: 6px solid var(--black-color);
  }

  .home__name,
  .home__description {
    text-align: initial;
  }

  .home__name {
    margin-top: auto;
  }

  .home__info {
    margin-top: 0;
    margin-bottom: auto;
  }

  .home__description {
    position: relative;
    font-size: var(--h2-font-size);
    margin-bottom: 5.5rem;
    padding-left: 3rem;
  }

  .home__description::after {
    content: "";
    width: 32px;
    height: 2px;
    background-color: var(--title-color);
    position: absolute;
    left: 0;
    top: 14px;
  }

  .home__scroll {
    margin: 0;
    display: flex;
    align-items: center;
    column-gap: 0.75rem;
  }

  .home__scroll-text {
    display: block;
    color: var(--text-color);
    font-size: var(--small-font-size);
    font-weight: var(--font-medium);
  }

  .home__scroll-box {
    width: 44px;
    height: 44px;
  }

  .home__scroll-box i {
    font-size: 1.5rem;
  }

  .home__perfil .geometric-box {
    top: 15rem;
  }

  .home__arrow {
    top: 2.5rem;
    left: -7rem;
    rotate: 70deg;
    width: 80px;
  }

  .home__line {
    left: -15rem;
    bottom: 4rem;
    width: 80px;
    rotate: 30deg;
  }

  .home__social {
    left: initial;
    right: -6rem;
  }

  .home__social-link {
    padding: 0.5rem;
    font-size: 1.5rem;
  }

  .about__container {
    grid-template-columns: 440px 525px;
    gap: 1rem 9rem;
    align-items: center;
    padding-block: 1rem;
  }

  .about__perfil {
    order: -1;
    grid-row: 1 / 3;
  }

  .about__image {
    width: 350px;
  }

  .about__img {
    border: 8px solid var(--white-color);
  }

  .about__shadow {
    width: 240px;
    height: 615px;
    top: -4rem;
    right: -5.5rem;
    border-bottom: 6px solid var(--first-color);
  }

  .about__perfil .geometric-box {
    right: -4rem;
    top: 4.5rem;
  }

  .about__line {
    width: 80px;
    right: -2rem;
    top: 10rem;
  }

  .about__box {
    width: 64px;
    height: 64px;
    right: -0.75rem;
  }

  .about__container .section__title-1 {
    align-self: flex-end;
    margin-inline: 0;
  }

  .about__info {
    align-self: flex-start;
    padding-left: 3rem;
  }

  .about__description {
    font-size: var(--h2-font-size);
    margin-bottom: 2rem;
  }

  .about__description::after {
    width: 32px;
    height: 2px;
    top: 14px;
    left: -3rem;
  }

  .about__list {
    margin-bottom: 5rem;
  }

  .about__buttons {
    justify-content: initial;
  }

  .experience__container {
    gap: 3rem;
    padding-block: 1rem;
  }

  .experience__box {
    padding: 2rem 2rem 3rem;
  }

  .projects__container {
    grid-template-columns: repeat(3, 352px);
    padding-block: 3rem 1rem;
  }

  .projects__card {
    padding: 1.25rem 1.25rem 2.5rem;
  }

  .projects__image {
    margin-bottom: 1rem;
  }

  .projects__content {
    margin-bottom: 2rem;
  }

  .projects__button {
    right: 1.25rem;
  }

  .contact__container {
    grid-template-columns: 440px 670px;
    grid-template-rows: initial;
    padding-bottom: 2rem;
  }

  .contact__mail {
    grid-column: 2 / 3;
    grid-row: 1 / 3;
    padding: 7rem 5.5rem 6rem 7.5rem;
    margin-top: 0;
  }

  .contact__title {
    font-size: var(--h3-font-size);
    text-align: initial;
  }

  .contact__box {
    height: 60px;
  }

  .contact__form .contact__area {
    height: 11rem;
  }

  .contact__button {
    margin-top: 1.25rem;
    width: max-content;
  }

  .contact__data {
    width: 392px;
    height: 375px;
    padding: 4.5rem 3.5rem 3.5rem;
    margin: 7.5rem 0 0 8rem;
    border-bottom: 6px solid var(--first-color);
  }

  .contact__data .section__title-2 {
    margin: 0 0 2rem;
    transform: translateX(-6.5rem);
  }

  .contact__social {
    margin-left: 8rem;
    text-align: initial;
    row-gap: 0;
  }

  .contact__social-data {
    flex-direction: row;
    align-items: center;
    column-gap: 1.25rem;
  }

  .contact__social-arrow {
    width: 80px;
  }

  .contact__social-link {
    font-size: 1.5rem;
    padding: 0.5rem;
  }

  .contact__message {
    bottom: -2.5rem;
  }

  .dark-theme .contact__data {
    box-shadow: 4px 0 8px hsla(0, 0%, 4%, 0.3);
  }

  .dark-theme .contact__social {
    background-color: var(--container-color);
  }

  .footer__container {
    padding-block: 4rem;
    grid-template-columns: repeat(2, 1fr);
    justify-content: space-between;
  }

  .footer__links {
    column-gap: 3rem;
    order: 1;
  }
}
