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

/*=============== VARIABLES CSS ===============*/
:root {
    /*========== Colors ==========*/
    /*Color mode HSL(hue, saturation, lightness)*/
    /*
      Blue: hsl(207, 90%, 61%)
      Purple: hsl(250, 66%, 75%)
      Pink: hsl(356, 66%, 75%)
      Teal: hsl(174, 63%, 62%)
  */

    --hue: 207;
    --sat: 90%;
    --lig: 61%;
    --first-color: hsl(100, var(--sat), var(--lig));
    --first-color-alt: hsl(100, var(--sat), 45%); /* -4% */
    --title-color: hsl(var(--hue), 12%, 15%);
    --text-color: hsl(var(--hue), 35%, 45%);
    --text-color-light: hsl(var(--hue), 8%, 75%);
    --text-color-lighten: hsl(var(--hue), 15%, 92%);
    --body-color: hsl(var(--hue), 100%, 99%);
    --container-color: #fff;

    /*========== Font and typography ==========*/
    /*.5rem = 8px | 1rem = 16px ...*/
    --body-font: "Poppins", sans-serif;
    --h2-font-size: 1.25rem;
    --h3-font-size: 1rem;
    --normal-font-size: 0.938rem;
    --small-font-size: 0.813rem;
    --smaller-font-size: 0.75rem;
    --title-font-size: 20px
}

@media screen and (min-width: 968px) {
    :root {
        --h2-font-size: 1.5rem;
        --h3-font-size: 1.25rem;
        --normal-font-size: 1rem;
        --small-font-size: 0.875rem;
        --smaller-font-size: 0.813rem;
        --title-font-size: 22px
    }
}

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

body {
    min-width: 300px;
    font-family: var(--body-font);
    font-size: var(--normal-font-size);
    background-color: var(--body-color);
    color: var(--text-color);
    transition: 0.3s; /* For animation dark mode */
}

main {
    max-width: 1400px;
    margin: auto;
}

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

ul {
    list-style: none;
}

a {
    text-decoration: none;
}

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

/*=============== THEME ===============*/
.change-theme {
    position: absolute;
    top: 1.5rem;
    right: 0rem;
    font-size: 1.25rem;
    color: var(--title-color);
    cursor: pointer;
    transition: 0.3s;
}

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

/*========== Variables Dark theme ==========*/
body.dark-theme {
    --title-color: hsl(var(--hue), 12%, 95%);
    --first-color: hsl(var(--hue), 71%, var(--lig));
    --first-color-alt: hsl(var(--hue), 71%, 45%); /* -4% */
    --text-color: hsl(var(--hue), 12%, 75%);
    --body-color: hsl(var(--hue), 40%, 8%);
    --container-color: hsl(var(--hue), 24%, 12%);
}

/*========== 
    Color changes in some parts of 
    the website, in light theme
==========*/
.dark-theme .button__gray {
    background-color: var(--container-color);
}

.dark-theme .button__gray:hover {
    background-color: hsl(var(--hue), 24%, 16%);
}

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

.dark-theme::-webkit-scrollbar {
    background-color: hsl(var(--hue), 8%, 16%);
}

.dark-theme::-webkit-scrollbar-thumb {
    background-color: hsl(var(--hue), 8%, 24%);
}

.dark-theme::-webkit-scrollbar-thumb:hover {
    background-color: hsl(var(--hue), 8%, 32%);
}

/*=============== REUSABLE CSS CLASSES ===============*/
.container {
    margin-left: 1.5rem;
    margin-right: 1.5rem;
}

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

/*=============== PROFILE ===============*/
.profile {
    position: relative;
    padding-top: 3.5rem;
}

.profile__container {
    display: grid;
    /* grid-template-columns: repeat(2, 1fr); */
}

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

.profile__details {
    text-align: center;
    display: flex;
    flex-direction: column;
    margin-top: 0.7rem;
}

.profile__perfil {
    width: 100px;
    height: 100px;
    background: linear-gradient(
        180deg,
        hsla(var(--hue), var(--sat), var(--lig), 1) 0%,
        hsla(var(--hue), var(--sat), var(--lig), 0.2) 100%
    );
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.profile__perfil img {
    width: 100px;
}

.profile__border {
    border: 3.5px solid var(--first-color);
    justify-self: center;
    width: 115px;
    height: 115px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    margin-bottom: 0.75rem;
}

.profile__name {
    font-size: var(--h2-font-size);
}

.profile__profession {
    font-size: var(--smaller-font-size);
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.profile__social {
    display: flex;
    justify-content: center;
    column-gap: 0.75rem;
}

.profile__social-link {
    font-size: 1.25rem;
    color: var(--title-color);
    transition: 0.3s;
}

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

.profile__buttons {
    column-gap: 1rem;
}

.profile__buttons-small {
    column-gap: 0.25rem;
}

/*=============== BUTTONS ===============*/
.button {
    display: inline-flex;
    align-items: center;
    column-gap: 0.5rem;
    background-color: var(--first-color);
    color: #fff;
    padding: 1.15rem 1.5rem;
    border-radius: 0.5rem;
    transition: 0.3s;
    box-shadow: 0 8px 24px hsla(var(--hue), var(--sat), var(--lig), 0.25);
}

.button i {
    font-size: 1.25rem;
}

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

.button__small {
    padding: 0.75rem;
    box-shadow: none;
}

.button__gray {
    background-color: var(--text-color-lighten);
    color: var(--title-color);
}

.button__gray:hover {
    background-color: var(--text-color-light);
}

/*=============== SUMMARY ===============*/

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

.summary__card {
    width: 100%;
}

.summary__group {
    border-left: 1px solid var(--first-color);
    padding-left: 1rem;
    margin-left: 2rem;
}

.summary__subgroup {
    display: flex;
    flex-direction: column;
    position: relative;
    height: 43%;
    gap: 0.6rem;
}

.summary__subgroup::before {
    content: "";
    position: absolute;
    width: 13px;
    height: 13px;
    left: -24px;
    top: 0px;
    margin-right: 10rem;
    border-radius: 50px;
    background: var(--first-color);
    border: 1px solid var(--first-color);
}

.summary__title {
    font-size: var(--title-font-size);
    color: var(--title-color);
    margin-bottom: 1.5rem;
    margin-left: 1.5rem;
}

.summary__subtitle {
    color: var(--title-color);
}

.summary__time {
    color: var(--title-color);
}

.summary__para {
    margin-bottom: 2rem;
}

/*=============== FILTERS TABS===============*/
.filters__content {
    width: 300px;
    margin: 2.5rem auto;
    background-color: var(--text-color-lighten);
    padding: 0.375rem;
    border-radius: 0.75rem;
    display: flex;
    justify-content: space-between;
    column-gap: 0.5rem;
}

.filters__button {
    width: 100%;
    border: none;
    outline: none;
    padding: 1rem;
    color: var(--title-color);
    font-size: var(--normal-font-size);
    font-family: var(--body-font);
    font-weight: 500;
    border-radius: 0.75rem;
    cursor: pointer;
    background-color: transparent;
    transition: 0.3s;
}

.filters__button:hover {
    background-color: var(--body-color);
}

/*=============== PROJECTS ===============*/
.projects__card {
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
}

.projects__card img {
    width: 100%;
    height: 100%;
}

.projects__modal {
    position: absolute;
    width: 100%;
    height: 100%;
    bottom: -100%;
    left: 0;
    background: linear-gradient(
        180deg,
        hsla(var(--hue), 24%, 40%, 0.3) 0%,
        hsla(var(--hue), 24%, 4%, 1) 95%
    );
    display: grid;
    align-items: flex-end;
    padding: 1.5rem 1.25rem;
    transition: 0.3s;
}

.projects__subtitle,
.projects__title {
    color: #fff;
}

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

.projects__title {
    font-size: var(--h3-font-size);
    margin-bottom: 0.75rem;
}

.projects__button {
    padding: 0.5rem;
}

.projects__card:hover .projects__modal {
    bottom: 0;
}

/*=============== SKILLS ===============*/
.skills__title {
    font-size: 20px;
    text-align: center;
    margin-bottom: 2rem;
}

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

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

.skills__data {
    display: flex;
    column-gap: 0.5rem;
}

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

.skills__container {
    text-align: center;
}

.skills__name {
    font-size: 15px;
    font-weight: 500;
    line-height: 18px;
}

/* Hide and show projects & skills */
.filters [data-content] {
    display: none;
}

.filters__active[data-content] {
    display: grid;
}

/* Activate button filter */
.filter-tab-active {
    background-color: var(--body-color);
}

/*=============== FOOTER ===============*/
.footer__copy {
    display: block;
    margin: 3rem 0 2rem;
    text-align: center;
    font-size: var(--smaller-font-size);
    color: var(--text-color);
}

/*=============== SCROLL BAR ===============*/
::-webkit-scrollbar {
    width: 0.6rem;
    border-radius: 0.5rem;
    background-color: hsl(var(--hue), 8%, 66%);
}

::-webkit-scrollbar-thumb {
    background-color: hsl(var(--hue), 8%, 54%);
    border-radius: 0.5rem;
}

::-webkit-scrollbar-thumb:hover {
    background-color: hsl(var(--hue), 8%, 44%);
}

/*=============== BREAKPOINTS ===============*/
/* For small devices */
@media screen and (max-width: 320px) {
    .container {
        margin-left: 1rem;
        margin-right: 1rem;
    }

    .profile__data {
        flex-direction: column;
    }

    .profile__img {
        margin: 0 auto;
    }

    .profile__buttons {
        flex-direction: column;
        row-gap: 1rem;
    }

    .skills__box {
        column-gap: 1rem;
    }
}

@media screen and (min-width: 321px) {
    .profile__data {
        flex-direction: row;
    }

    .profile__img {
        margin-right: 1rem;
    }
}

/* for summary lecture */
@media screen and (max-width: 575px) {
    .summary__container {
        margin-top: 3rem;
        flex-direction: column;
    }

    .skills__content {
        justify-content: center;
        gap: 3rem;
    }
}

/* For medium devices */
@media screen and (min-width: 576px) {
    .filters__content {
        width: 300px;        
        margin: 2.5rem auto;
        margin-top: 1.5rem;
    }

    .skills__content {
        grid-template-columns: repeat(3, 20%);
        justify-content: center;
        justify-items: center;
    }

    .skills__area {
        max-width: 150px;
    }
}

/* for summary lecture */
@media screen and (max-width: 775px) {
    .summary__container {
        flex-direction: column;
    }
}

@media screen and (min-width: 776px) {
    .projects__content {
        grid-template-columns: repeat(2, 45%);
        justify-content: center;
    }

    .summary__container {
        flex-direction: row;
    }

    .summary__card {
        width: 50%;
    }
}

/* For large devices */
@media screen and (min-width: 992px) {
    .change-theme {
        top: 2.5rem;
        right: 2.5rem;
    }

    .profile {
        padding-top: 4rem;
    }
    
    .profile__border {
        width: 135px;
        height: 135px;
        margin-bottom: 1rem;
    }

    .profile__perfil {
        width: 120px;
        height: 120px;
    }

    .profile__perfil img {
        width: 120px;
    }

    .profile__profession {
        margin-bottom: 1rem;
    }

    .profile__buttons {
        column-gap: 2rem;
    }

    .projects__content {
        gap: 2rem 3rem;
    }
    
    .projects__modal {
        padding: 1.5rem;
    }

    .footer__copy {
        margin: 4.5rem 0 2.5rem;
    }
}
