/* MOBILE */
.home-page {
    margin-top: 2rem;
}

.home-page__container:not(:last-child) {
    margin-bottom: 3rem;
}

.small-size-container,
.medium-size-container,
.large-size-container {
    grid-column: 1/-1;
}

/* description */
.home-page__description p {
    max-width: unset !important;
}

.home-page__description p:not(:first-child) {
    display: none;
}

.home-page__description h2 {
    margin-bottom: 2rem;
}

/* core */
.home-page__core {
    grid-column: 1/-1;
}
.home-page__core--header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding: 0 1rem;
    margin-bottom: 2rem;
    height: 2rem;
}

.home-page__core--header button {
    display: block;
    margin-top: -2rem;
}

.home-page__core--header button img {
    height: 18px;
    width: 18px;
}

.home-page__core--header button span {
    display: none;
    transition: 750ms;
}

.home-page__core--header button.hidden {
    opacity: 0;
}

.home-page__core--main {
    width: 100vw;
    overflow-x: scroll;
    display: flex;
    scroll-snap-type: x mandatory;
    -ms-overflow-style: none;
    scrollbar-width: none;
    /* margin: 0 -1rem; */
}

.home-page__core--main::-webkit-scrollbar {
    display: none;
}

/* 
    Core CARD 
*/
.home-page__core--main_content {
    min-width: calc(100vw / 6 * 5);
    min-width: calc(100vw / 6 * 5);
    scroll-snap-align: center;
    margin: 0 0.5rem;
    display: flex;
    flex-direction: column;
}

.home-page__core--main_content:hover h2 {
    text-decoration: underline;
}

.home-page__core--main_content figure {
    width: 100%;
    padding-top: 60%;
    position: relative;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.home-page__core--main_content figure img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 2px;
    object-fit: cover;
}

.home-page__core--main_content article {
    margin: 0.75rem 0;
}

#carousel-prev:hover span {
    transform: translateX(-8px);
}
#carousel-next:hover span {
    transform: translateX(8px);
}

.home-page__core--header button span.pre-animation {
    opacity: 0;
}

@keyframes button-text-intro {
    0% {opacity: 0%;}
    100% {opacity: 1;}
}

.button-text-intro {
    animation-name: button-text-intro;
    animation-duration: 750ms;
    animation-timing-function: ease-in-out;
    animation-delay: 300ms;
}

/* 
    Description and ESAD 
*/
.home-page__default,
.home-page__esad {
    grid-column: 1/-1;
    margin: 1rem 0 1rem;
}

.home-page__default__text,
.home-page__default__aside {
    grid-column: 1/-1;
    margin-bottom: 2rem;
}

.home-page__esad__text {
    grid-column: 1/-1;
    margin-top: 1rem;
}

.home-page__esad__aside {
    grid-column: 1/4;
    grid-row: 1;
}
.home-page__esad__link {
    grid-row: 1;
    grid-column: 4/-1;
}

.home-page__esad__aside img {
    width: 6rem;
    margin: 0.25rem 0 1rem;
}

.home-page__esad__images {
    grid-column: 1/-1;
    margin: 3rem 0 2rem;
}

.frame {
    position: sticky;
    align-self: flex-start;
    width: 100%;
    height: 100vw;
    top: 4rem;
    border-radius: 6px;
    box-shadow: rgba(100, 100, 111, 0.2) 0px 7px 29px 0px;
    opacity: 0;
}

.frame.visible {
    opacity: 1;
}

.bar {
    position: sticky;
    top: calc(100vw + 6rem);
    background-color: rgb(240, 240, 240);
    margin: 0 2rem;
    border-radius: 6px;
}

.bar__progress {
    width: var(--progress);
    background-color: black;
    height: 6px;
    border-radius: 6px;
}


/* 
    Research 
*/

.home-page__research {
    position: relative;
}

.home-page__images-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
}

.home-page__research--title {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 20;
    width: fit-content;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.home-page__research--title h2 {
    margin-bottom: 1rem;
    text-align: center;
}

.home-page__research--title p {
    display: none;
}

        /* research CARD */
.home-page__research_content {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}
.home-page__research_content.desktop {
    display: none;
}
.home-page__research_content.mobile {
    display: flex;
}

.home-page__research_content--title {
    display: none;
}

.home-page__research_content:nth-child(4) { margin-bottom: 3rem; }
.home-page__research_content:nth-child(6) { margin-top: 3rem; }

.home-page__research_content--image {
    width: calc(100% / 3);
    height: 6rem;
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: 2000ms;
    margin: 0.5rem 0;
}

.home-page__research_content--image img {
    width: 2.5rem;
    height: auto;
    box-shadow: rgba(100, 100, 111, 0.2) 0px 7px 29px 0px;
}

    /* PROJECTS */
.home-page__projects--header {
    display: flex;
    justify-content: space-between;
}

.home-page__projects {
    width: 100%;
    margin-top: 1rem;
}

.home-page__projects > * {
    grid-column: 1/-1;
    margin-bottom: 2rem;
}

    /* NEWS */
.home-page__news--header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 0.75rem;
}

.home-page__news {
    display: grid;
    grid-template-columns: repeat(6,1fr);
    column-gap: 0.75rem;
}

.home-page__news a {
    grid-column: 1/-1;
    margin-bottom: 1rem;
}
.home-page__news a.desktop {
    display: none;
}

    /* publications */
.home-page__container--publications {
    background: rgb(255,255,255);
    background: linear-gradient(0deg, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 10%, rgba(255,255,255,0) 90%, rgba(255,255,255,1) 100%);
    padding: 4rem 0;
    margin: 0 -1rem;
    position: relative;
}

.home-page__publications--header {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.home-page__publications {
    width: 100%;
    margin-top: 4rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-evenly;
}

.home-page__container--publications .link {
    width: 100%;
    text-align: center;
    margin: 0 auto;
}

/* TABLET */
@media only screen and (min-width: 475px) {
    .small-size-container,
    .medium-size-container {
        grid-column: 2/-2;
    }
    
    .large-size-container {
        grid-column: 1/-1;
    }

    .home-page__container:not(:last-child) {
        margin-bottom: 3rem;
    }

    .home-page__esad__link {
        grid-column: 3/-1;
    }

    .home-page__core--header button {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: calc(100vw / 3);
        font: 16px/18px 'Graphik', sans-serif !important;
        margin-top: 4px;
        transition: 300ms;
    }

    .home-page__core--header button span {
        display: block;
        width: 70%;
        opacity: 0;
    }

    .home-page__core--header > div {
        align-self: center;
    }

    .home-page__core--main_filler {
        min-width: calc(calc(100vw - 2rem) / 8);
        max-width: calc(calc(100vw - 2rem) / 8);
        margin: 0;
    }

    .home-page__core--main_content {
        min-width: calc(calc(calc(100vw - 2rem) / 8) * 6);
        max-width: calc(calc(calc(100vw - 2rem) / 8) * 6);
        margin: 0 0.5rem;
    }

    .home-page__core--main_content article {
        margin: 0.75rem 2.5rem;
    }

    .home-page__research_content {
        width: 50%;
        margin: 2rem 0;
    }

    .home-page__research {
        margin-bottom: 0;
        margin: -2rem 0 8rem !important;
    }

    .home-page__research--title p {
        width: 640px;
        display: block;
        text-align: center;
        margin-bottom: 1rem;
    }

    .home-page__projects > * {
        grid-column: span 4;
    }

    .home-page__container--publications {
        padding: 4rem 0 2rem;
    }

    .home-page__publications > * {
        width: calc(100% / 2);
    }
}



/* DESKTOP */
@media only screen and (min-width: 1024px) {
    .home-page {
        margin-top: 0;
    }

    .home-page__core {
        margin: 0 -1rem;
    }

    .home-page__container:not(:last-child) {
        margin-bottom: 8rem;
    }

    .small-size-container {
        grid-column: 4/10;
    }
    .medium-size-container {
        grid-column: 3/11;
    }
    .large-size-container {
        padding: 0 2rem;
    }

    .home-page__core--header {
        padding: 0 2rem;
        height: 2.5rem;
    }

    /* Description and ESAD */
    .home-page__default {
        margin: 4rem 0 2rem;
    }

    .home-page__default__aside,
    .home-page__esad__aside {
        grid-column: 2/4;
        grid-row: 1;
    }

    .home-page__default__text {
        grid-column: 4/11;
    }
    
    .home-page__esad__text {
        grid-column: 4/10;
        padding-right: 2rem;
        margin-top: 0;
    }

    .home-page__esad__link {
        grid-column: 10/12;
    }

    /* FRAMES */
    .home-page__esad__images {
        grid-column: 2/-2;
        margin: 3rem 0 2rem;
    }

    .frame {
        height: calc(100vh - 8rem);
    }

    .bar {
        top: calc(100% - 2.5rem);
    }

    /* Core */

    .home-page__core--header button {
        display: flex;
        justify-content: space-between;
        width: calc(100vw / 12 * 3);
        font: 16px/18px 'Graphik', sans-serif !important;
        margin-top: 4px;
        transition: 300ms;
    }

    .home-page__core--header button span {
        opacity: 1;
        width: 100%;
        margin: 0 2rem;
    }

    /* core CARD */
    .home-page__core--main_filler {
        min-width: calc(calc(calc(100vw - 10.25rem) / 12) * 3);
        max-width: calc(calc(calc(100vw - 10.25rem) / 12) * 3);
    }

    .home-page__core--main_content {
        min-width: calc(calc(calc(100vw - 8.25rem) / 11) * 6);
        max-width: calc(calc(calc(100vw - 8.25rem) / 11) * 6);
        margin: 0 calc(calc(100vw - 10.25rem) / 12);
    }

    .home-page__core--main_content:hover h2 {
        text-decoration: none;
    }

    .home-page__core--main_content figure {
        padding-top: 65%;
        border-radius: 4px;
        position: relative;
        overflow: hidden;
    }

    .home-page__core--main_content img {
        position: absolute;
        top: 0;
        left: 0;
        height: 100%;
        width: 100%;
        object-fit: cover;
        border-radius: 4px;
        transition: 300ms;
    }

    .home-page__core--main_content:hover img {
        transform: scale(1.025);
    }

    .home-page__core--main_content article {
        margin: 0.75rem 6rem;
    }


    /* research */
    .home-page__research {
        margin: 0 0 6rem;
        padding: 2rem;
    }

    /* research CARD */
    .home-page__research_content {
        width: calc(45% - 2rem);
        margin: 1rem 0;
    }
    .home-page__research_content.mobile {
        display: none;
    }
    .home-page__research_content.desktop {
        display: flex;
    }

    .home-page__research_content--title {
        display: flex;
        flex-direction: column;
        width: 100%;
        text-align: center;
        padding: 2rem 0;
        z-index: -5;
    }

    .home-page__research_content--title * {
        margin: 0 auto;
    }

    .home-page__research_content--image {
        width: 25%;
        height: 8rem;
    }

    .home-page__research_content--image img {
        width: 2rem;
        transition: 800ms ease;
    }

    .home-page__research_content:hover .home-page__research_content--image {
        transform: translate(0) !important;
        transition: 800ms ease;
    }
    
    .home-page__research_content:hover .home-page__research_content--image img {
        margin: 0 !important;
    }

    /* PROJECTS */
    .home-page__projects > * {
        grid-column: span 3;
        margin-bottom: none;
    }

    .home-page__publications > * {
        width: 25%;
    }

    /* NEWS */
    .home-page__news a {
        grid-column: span 3;
    }

    .home-page__news a.mobile {
        display: none;
    }

    .home-page__news a.desktop {
        display: block;
    }

    /* PUBLICATIONS */
    .home-page__container--publications {
        padding: 4rem 0 2rem;
    }
}