:root {
    --font-family: "Montserrat", sans-serif;
    --font-title: "Abril Fatface", serif;
    --background-color: #eef2f3;
    --title-color: #000;
    --text-color: #000;
    --border: 1.9px solid black;
    --border-radius: 30px;
    --shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
    --spacing: 1.5rem;
    --padding-subtitles: 0.7rem 2.7rem;
    --padding-section: 4.1rem;
    --first-bubble-color: #eec7f2;
    --second-bubble-color: #c2e7f7;
}

:root[data-theme="dark"] {
    --background-color: #142031;
    --text-color: #d3ddff;
    --title-color: linear-gradient(90deg, #adfbda 0, #35c3ff 30%, #fda399 50%, #76d880 70%, #ebf38b 90%, #adfbda 100%);
    --border: 1.9px solid #fff;
    --shadow: #eef2f3 0px 0px 0px 3px;
    --first-bubble-color: #1B2A40;
    --second-bubble-color: #1A2A42;
}

:root[data-theme="dark"] .scroll-arrow-img {
    -webkit-filter: invert(1);
    -ms-filter: invert(1);
    -o-filter: invert(1);
    filter: invert(1);
}

:root[data-theme="dark"] header img {
    filter: invert(1);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: var(--font-family);
    background-color: var(--background-color);
    color: var(--text-color);
}

main {
    min-height: 100vh;
    backdrop-filter: blur(2.5rem);
    display: flex;
    flex-direction: column;
    align-items: center;
}

section {
    min-height: 80vh;
}

h1 {
    font-family: var(--font-title);
    font-size: 3.5rem;
    margin-bottom: 7.5vh;
    color: transparent;
    background: var(--title-color);
    background-clip: text;
}

.subtitle {
    text-transform: uppercase;
    border: var(--border);
    border-radius: var(--border-radius);
    padding: var(--padding-subtitles);
    font-weight: 200;
}

p {
    line-height: 1.9;
    font-weight: 200;
    margin-top: var(--spacing);
}

span {
    font-weight: 200;
}

a {
    text-decoration: none;
    color: var(--text-color);
}

.fa-caret-down {
    font-size: 2.8rem;
    cursor: pointer;
    color: var(--text-color);
    transition: all 0.8s ease-in-out;

    &:hover {
        scale: 1.4;
    }
}

.scroll-arrow-img {
    display: none;
}

.bulle.un {
    height: 45vh;
    width: 34vw;
    background-color: var(--first-bubble-color);
    border-radius: 61% 39% 45% 55% / 61% 24% 76% 39%;
    position: fixed;
    top: 32vh;
    left: 30vw;
}

.bulle.deux {
    height: 30vh;
    width: 24vw;
    background-color: var(--second-bubble-color);
    border-radius: 20% 80% 45% 55% / 61% 62% 38% 39%;
    position: fixed;
    top: 33vh;
    right: 28vw;
}

/*   HEADER   */

header {
    width: 100%;
    position: fixed;
    z-index: 2;
    padding: calc(var(--spacing) * 2);
    padding-bottom: var(--spacing);
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-transform: uppercase;
    background-color: var(--background-color);
}

header img {
    margin-right: 5.5rem;
}

.darkmode-checkbox-container {
    position: absolute;
    right: 7rem;
    top: 4.5rem;
}

.darkmode-checkbox {
    opacity: 0;
    position: absolute;
}

.darkmode-checkbox-label {
    background-color: #111;
    width: 3.1rem;
    height: 1.6rem;
    border-radius: 3.1rem;
    position: relative;
    padding: 0.3rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.fa-moon {
    color: #f6f8f9;
}

.fa-sun {
    color: #f1f9c3;
}

.darkmode-checkbox-label .darkmode-ball {
    background-color: #fff;
    width: 1.3rem;
    height: 1.3rem;
    position: absolute;
    left: 0.125rem;
    top: 0.125rem;
    border-radius: 50%;
    transition: transform 0.2s linear;
}

.darkmode-checkbox:checked+.darkmode-checkbox-label .darkmode-ball {
    transform: translateX(1.5rem);
}

#menu-toggle {
    opacity: 0;
}

#menu-toggle:checked+.menu-btn>span {
    transform: rotate(45deg);
}

#menu-toggle:checked+.menu-btn>span::before {
    top: 0;
    transform: rotate(0deg);
}

#menu-toggle:checked+.menu-btn>span::after {
    top: 0;
    transform: rotate(90deg);
}

#menu-toggle:checked~.menu-box {
    right: 0 !important;
}

.menu-btn {
    position: fixed;
    right: calc(var(--spacing) * 2);
    width: 26px;
    height: 26px;
    cursor: pointer;
    z-index: 2;
}

.menu-btn>span,
.menu-btn>span::before,
.menu-btn>span::after {
    display: block;
    position: absolute;
    width: 100%;
    height: 2px;
    background-color: var(--text-color);
    transition-duration: .25s;
}

.menu-btn>span::before {
    content: '';
    top: -8px;
}

.menu-btn>span::after {
    content: '';
    top: 8px;
}

.menu-box {
    display: block;
    position: fixed;
    top: 0;
    right: -100%;
    width: 16vw;
    height: 100%;
    margin: 0;
    padding: 6rem 0;
    list-style: none;
    transition-duration: .25s;
    z-index: 1;
}

.menu-item {
    display: block;
    padding: 14px 24px;
    font-size: 1rem;
    transition-duration: .25s;
}

.menu-box li:nth-child(1) {
    padding-top: 30px;
}

.menu-item:hover {
    font-size: 1.1rem;
}

/*   LANDING PAGE   */

#landing-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2.5rem;
    padding-top: 19vh;
    text-align: center;
    word-wrap: break-word;
}

#landing-page h1 {
    font-size: 6rem;
    margin-bottom: 5vh;
}

#landing-page i {
    margin-top: 9vh;
}

/*   ABOUT   */

#about-section {
    display: flex;
    padding: var(--padding-section);
    padding-top: 26vh;
}

#about-section img {
    max-height: 60vh;
    box-shadow: var(--shadow);
}

#about-section i {
    margin-top: 4vh;
}

.presentation-container {
    margin-left: 5rem;
}

/*   PROJECTS   */

#projects-section {
    display: flex;
    align-items: center;
    padding: var(--padding-section);
    padding-top: 30vh;
}

.presentation-projects {
    max-width: 45%;
    margin-right: 10rem;
}

.list-projects-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2.1rem;
}

.list-projects-container span {
    width: 24rem;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.list-projects-container .subtitle {
    transition: transform 0.4s ease-in;

    &:hover {
        transform: scale(1.1);
    }
}

/*   SINGLE PROJECT   */

.main-project {
    flex-direction: initial;
    justify-content: center;
    min-width: 100vw;
    padding-top: 25vh;
}

.illustrations-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.illustration-project {
    background-size: 100%;
    background-position: center;
    background-color: white;
    background-repeat: no-repeat;
    min-width: 25em;
    box-shadow: var(--shadow);
}

#illustration-1 {
    min-height: 13.9em;
    position: relative;
}

#illustration-2 {
    min-height: 7.9em;
}

#previous,
#next {
    font-size: 2.4rem;
    cursor: pointer;
    position: absolute;
    top: 46%;
    transition: transform 0.2s ease-in;

    &:hover {
        transform: scale(1.2);
    }
}

#previous {
    left: -2rem;
}

#next {
    right: -2rem;
}

.title-description-section {
    max-width: 36%;
    margin-left: 7rem;
}

.main-project p {
    margin-bottom: var(--spacing);
}

.title-description-section .subtitle {
    transition: all 0.4s ease-in;

    &:hover {
        transform: scale(1.1);
        background-color: pink;
    }
}

/*   CONTACT   */

#contact-section {
    display: flex;
    padding: var(--padding-section);
    margin-top: 26vh;
}

.presentation-contact {
    margin-left: 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.list-contact-container {
    min-width: 50%;
    display: flex;
    flex-direction: column;
    gap: var(--spacing)
}

.list-contact-container .subtitle {
    text-transform: initial;
    padding: 0.5rem;
    text-align: center;

    &:hover {
        border: 2.1px solid black;
    }
}

.scroll-to-landing {
    rotate: 180deg;
}

@media screen and (max-width: 800px) {

    *,
    *::before,
    *::after {
        box-sizing: inherit;
    }

    html,
    body {
        height: 100%;
    }

    body {
        font-size: 1.2rem;
        padding: 0 1rem;
    }

    .bulle {
        z-index: 0;
    }

    .bulle.un {
        width: 39%;
        top: 35%;
        left: 28%;
    }

    .bulle.deux {
        width: 29%;
        top: 38%;
        right: 26%;
    }

    .scroll-arrow-img {
        display: block;
        max-width: 6rem;
        transform: rotate(90deg);
    }

    main,
    .main-project {
        backdrop-filter: blur(1.2rem);
        -webkit-backdrop-filter: blur(1.2rem);
        position: absolute;
        z-index: 2;
    }

    section {
        min-height: 100vh;
        padding: 2rem;
    }

    h1 {
        font-size: 2.5rem;
        margin-bottom: 5.5vh;
    }

    .subtitle {
        font-size: 0.8rem;
        padding: 0.7rem 2rem;
    }

    p {
        line-height: 1.5;
    }

    header {
        padding: var(--spacing);
        position: fixed;
        z-index: 3;
        width: 90%;
    }

    header img {
        display: none;
    }

    .darkmode-checkbox-container {
        font-size: 0.9rem;
        right: 7rem;
        top: 1.4rem;
    }

    .darkmode-checkbox-label {
        width: 2.3rem;
        height: 1rem;
    }

    .darkmode-checkbox-label .darkmode-ball {
        width: 1.37rem;
        height: 1.36rem;
    }

    .menu-btn {
        top: 2rem;
    }

    .menu-box {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .menu-item {
        padding: 10px 20px;
    }

    #landing-page {
        padding-top: 45%;
        padding-bottom: 15%;
    }

    #landing-page h1 {
        font-size: 4.5rem;
        max-width: 67%;
    }

    #landing-page i {
        margin-top: 11vh;
    }

    #about-section {
        flex-direction: column;
        align-items: center;
        padding-top: 13vh;
    }

    #about-section img {
        max-height: 40vh;
    }

    .presentation-container {
        margin: 1rem 0;
        padding: 0 1rem;
    }

    .presentation-container i {
        display: none
    }

    #projects-section {
        flex-direction: column;
    }

    .presentation-projects {
        max-width: initial;
        margin-right: initial;
    }

    .list-projects-container {
        margin-top: 8vh;
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .fa-caret-down.scroll-to-contact {
        display: none;
    }

    .main-project {
        flex-direction: column-reverse;
        justify-content: center;
        align-items: center;
        padding-top: 2% 0;
        gap: 1rem;
    }

    .title-description-section,
    .illustrations-section {
        margin: 0;
        padding: 1rem 1.5rem;
        min-height: initial;
    }

    .title-description-section {
        max-width: initial;
        margin-left: initial;
    }

    .illustration-project {
        min-width: 16em;
    }

    #illustration-1 {
        min-height: 10em;
    }

    #illustration-2 {
        min-height: 6em;
    }

    #contact-section {
        flex-direction: column-reverse;
        align-items: center;
        margin-top: 10%;
        margin-bottom: 6%;
    }

    .list-contact-container {
        width: 100%;
        padding: 0 1rem;
        gap: 0.5rem;
    }

    .presentation-contact {
        margin-left: initial;
        margin-top: 2rem;
        padding: 0 1rem;
    }

    .scroll-to-landing {
        margin-bottom: 6%;
    }
}

@media screen and (min-width: 1400px) {
    .fa-caret-down {
        font-size: 4.6rem;
    }

    h1 {
        font-size: 4.7rem;
        margin-bottom: 7.5vh;
    }

    .subtitle {
        font-size: 1.4rem;
    }

    p {
        margin-top: var(--spacing);
        font-size: 1.4rem;
    }

    header img {
        margin-left: 214px;
    }

    #landing-page {
        padding-top: 27vh;
    }

    #landing-page h1 {
        font-size: 6.4rem;
    }

    .list-projects-container .subtitle {
        padding: 1rem 3.8rem;
    }

    .illustration-project {
        min-width: 29em;
    }

    #illustration-1 {
        min-height: 20em;
    }

    #illustration-2 {
        min-height: 12em;
    }

    .list-contact-container {
        padding-top: 13vh;
    }
}