/* Font size for large devices */
@media screen and (min-width: 968px) {
    :root {
        --big-font-size: 2.75rem;
        --h1-font-size: 2.0625rem;
        --h2-font-size: 1.375rem;
        --h3-font-size: 1.125rem;
        --normal-font-size: 0.9375rem;
        --small-font-size: 0.8125rem;
        --smaller-font-size: 0.75rem;
    }
}

@media screen and (max-width: 767px) {
    /* Room for home indicator + fixed bar stays above browser chrome on iOS */
    .header {
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }

    body {
        margin: 0 0 calc(var(--header-height) + env(safe-area-inset-bottom, 0px)) 0;
    }

    .show-scroll {
        bottom: calc(5rem + env(safe-area-inset-bottom, 0px));
    }

    .nav__menu {
        position: fixed;
        bottom: -100%;
        left: 0;
        width: 100%;
        background-color: var(--body-color);
        padding: 2rem 1.5rem 4rem;
        padding-bottom: calc(4rem + env(safe-area-inset-bottom, 0px));
        box-shadow: 0 -1px 4px rgba(0, 0, 0, 0.15);
        border-radius: 1.5rem 1.5rem 0 0;
        transition: 0.3s;
    }
}

/*==================== MEDIA QUERIES ====================*/
/* For small devices */
@media screen and (max-width: 350px) {
    .container {
        margin-left: var(--mb-1);
        margin-right: var(--mb-1);
    }

    .nav__menu {
        padding: 2rem 0.25rem 4rem;
    }

    .nav__list {
        column-gap: 0;
    }

    .home__content {
        grid-template-columns: 0.25fr 3fr;
    }

    .home__blob {
        width: 180px;
    }

    .skills__title {
        font-size: var(--normal-font-size);
    }

    .qualification__data {
        gap: 0.5rem;
    }

    .projects__container {
        grid-template-columns: max-content;
        justify-content: center;
    }

    .projects__card {
        padding: 3.5rem 0.9rem 1.25rem;
    }

    .projects__modal {
        padding: 0 0.5rem;
    }

    .hiring__img {
        width: 200px;
    }

    .highlights__meta,
    .highlights__head {
        flex-direction: column;
        align-items: center;
    }

    .highlights__img,
    .highlights__icon {
        margin-right: 0;
        margin-bottom: var(--mb-0-25);
    }

    .highlights__meta,
    .highlights__text {
        text-align: center;
    }
}

/* For medium devices */
@media screen and (min-width: 568px) {
    .home__content {
        grid-template-columns: max-content 1fr 1fr;
    }

    .home__data {
        grid-column: initial;
    }

    .home__img {
        order: 1;
        justify-self: center;
    }

    .about__container,
    .skills__container,
    .portfolio__content,
    .hiring__container,
    .contact__container {
        grid-template-columns: repeat(2, 1fr);
    }

    .qualification__sections {
        display: grid;
        grid-template-columns: 0.6fr;
        justify-content: center;
    }
}

@media screen and (min-width: 768px) {
    .container {
        margin-left: auto;
        margin-right: auto;
    }

    body {
        margin: 0;
    }

    .section {
        padding: 6rem 0 2rem;
    }

    .section__subtitle {
        margin-bottom: 4rem;
    }

    .header {
        top: 0;
        bottom: initial;
        overflow: visible;
    }

    .header,
    .main,
    .footer__container {
        padding: 0 1rem;
    }

    .nav {
        height: calc(var(--header-height) + 1.5rem + 0.75rem);
        padding: 0.375rem 0;
        box-sizing: border-box;
        column-gap: 1rem;
        overflow: visible;
    }

    .nav__link {
        line-height: 1.45;
    }

    .nav__logo {
        line-height: 1.3;
    }

    .nav__icon,
    .nav__close,
    .nav__toggle {
        display: none;
    }

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

    .nav__menu {
        margin-left: auto;
    }

    .change-theme {
        margin: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        line-height: 1;
    }

    .home__container {
        row-gap: 5rem;
    }

    .home__content {
        padding-top: 5.5rem;
        column-gap: 2rem;
    }

    .home__blob {
        width: 270px;
    }

    .home__title {
        white-space: nowrap;
    }

    .home__tagline {
        white-space: nowrap;
    }

    .home__scroll {
        display: block;
    }

    .home__scroll-button {
        margin-left: 3rem;
    }

    .about__container {
        column-gap: 5rem;
    }

    .about__img {
        width: 350px;
    }

    .about__description {
        text-align: initial;
    }

    .about__info {
        justify-content: space-between;
    }

    .about__buttons {
        justify-content: initial;
    }

    .qualification__tabs {
        justify-content: center;
    }

    .qualification__button {
        margin: 0 var(--mb-1);
    }

    .projects__icon {
        font-size: 2rem;
    }

    .projects__card {
        padding: 3.5rem 1.5rem 2rem;
    }

    .projects__modal-content {
        width: min(100%, 450px);
    }

    .portfolio__img {
        width: 320px;
    }

    .portfolio__content {
        align-items: center;
    }

    .hiring {
        text-align: initial;
    }

    .hiring__bg {
        background: none;
    }

    .hiring__container {
        background-color: var(--first-color-second);
        border-radius: 1rem;
        padding: 0 0 0 2rem;
        grid-template-columns: 1fr max-content;
        column-gap: 3rem;
    }

    .hiring__content {
        padding-top: 0.8rem;
    }

    .hiring__img {
        border-radius: 0 1rem 1rem 0;
    }

    .footer__container {
        grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.5fr) auto;
        align-items: start;
        column-gap: 1.5rem;
    }

    .footer__container > div:first-of-type {
        min-width: 0;
    }

    .footer__title {
        white-space: nowrap;
        max-width: 100%;
        font-size: clamp(1.0625rem, 0.7rem + 0.9vw, var(--h1-font-size));
    }

    .footer__bg {
        padding: 3rem 0 3.5rem;
    }

    .footer__links {
        flex-direction: row;
        flex-wrap: nowrap;
        column-gap: 1.25rem;
        justify-content: center;
        min-width: 0;
        max-width: 100%;
    }

    .footer__socials {
        justify-content: flex-end;
    }

    .footer__copy {
        margin-top: 4.5rem;
    }
}

/* For large devices */

@media screen and (min-width: 1024px) {

    .header,
    .main,
    .footer__container {
        padding: 0;
    }

    .home__blob {
        width: 320px;
    }

    .home__social {
        transform: translateX(-6rem);
    }

    .projects__container {
        grid-template-columns: repeat(3, 238px);
    }

    .portfolio__content {
        column-gap: 5rem;
    }

    .swiper-portfolio-icon {
        font-size: 3.5rem;
    }

    .swiper-button-prev {
        left: -3.5rem;
    }

    .swiper-button-next {
        right: -3.5rem;
    }

    .swiper-container-horizontal>.swiper-pagination-bullets {
        bottom: -4.5rem;
    }

    #highlights .highlights__pagination.swiper-pagination-horizontal,
    #highlights .swiper-pagination.highlights__pagination {
        bottom: 0 !important;
    }

    .contact__form {
        width: 460px;
    }

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


/* MOBILE DEVICES  */
@media (min-width:320px) and (max-width:480px) {
    .home__content {
        padding-top: 0px;
    }

    .home__img {
        display: flex;
        justify-content: center;
    }

    .footer__copy {
        margin-right: 20px;
    }
}

/* TABLET DEVICES  */
@media (min-width:481px) and (max-width:768px) {
    .home__content {
        padding-top: 0px;
    }

    .home__img {
        display: flex;
        justify-content: center;
    }
}

/* LAPTOP DEVICES  */
@media (min-width:769px) and (max-width:1023px) {
    .home__content {
        padding-top: 0px;
    }
}

/* Mobile / small tablet: hero = centered image, row of social icons under image, then text */
@media screen and (max-width: 767px) {
    .home__content {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .home__img {
        order: 1;
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .home__social {
        order: 2;
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        column-gap: 1.25rem;
        row-gap: 0.5rem;
        margin-top: 1.25rem;
    }

    .home__data {
        order: 3;
        grid-column: auto;
        width: 100%;
        max-width: 32rem;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .home__data .button {
        justify-content: center;
    }

    .home__intro {
        max-width: 100%;
    }

    .home__tagline {
        border-left: none;
        border-top: 2px solid var(--first-color);
        padding: 0.75rem 0.5rem 0;
        text-align: center;
        background: transparent;
    }

    /* Hiring section: image rounded on top only (stacked layout) */
    .hiring__img {
        border-radius: 1rem 1rem 0 0;
    }

    /* Footer: one column, nav links left-stacked, socials one centered row */
    .footer__container {
        grid-template-columns: 1fr;
    }

    .footer__container > div:first-of-type,
    .footer__container .footer__socials,
    .footer__container .footer__links {
        grid-column: 1;
        grid-row: auto;
    }

    .footer__links {
        flex-direction: column;
        flex-wrap: nowrap;
        align-items: flex-start;
        justify-content: flex-start;
    }

    .footer__socials {
        justify-content: center;
        width: 100%;
    }
}
