@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@100;200;300;400;500;600;700;800;900&display=swap");

:root {
    --accent-color: #008cdd;
    --accent-color-2: #008cdd77;
    --overlay-color: #008cdde0;
    --background-color: #006fb3;
    --background-color-2: #006fb3;
    --background-color-3: #005e93;
    --text-color: #545454;
    --light-grey: #C2C2C2;
    --border-radius: 30px;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: 10px;
}

.content:hover::-webkit-scrollbar-thumb {
    background: var(--light-grey);
}

* {
    padding: 0;
    margin: 0;
    font-family: "Montserrat", sans-serif;
}
html {
    font-size: 16px;
    font-family: "Montserrat", sans-serif;
    background-color: var(--background-color);
    background: -moz-linear-gradient(145deg, var(--background-color) 0%, var(--background-color-3) 100%);
    background: -webkit-linear-gradient(145deg, var(--background-color) 0%, var(--background-color-3) 100%);
    background: linear-gradient(145deg, var(--background-color) 0%, var(--background-color-3) 100%);
    color: var(--text-color);
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#014f7b",endColorstr="#004369",GradientType=1);
}

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

p {
    line-height: 1.35rem;
    margin-bottom: 0.3rem;
}

h1 {
    line-height: 4rem;
    text-align: center;
}

h2 {
    line-height: 2rem;
    font-weight: normal;
    text-align: center;
}

.col-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    width: 100%;
}

.col-2 h1{
    font-size: 1.2rem;
}

.container {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
}

.cursor {
    display: inline-block;
    vertical-align: bottom;
    width: 2px;
    height: 1.3em;
    margin-left: 5px;
    background-color: var(--text-color);
    animation: blink 1s infinite;
}

#welcome-name{
    color: var(--accent-color);
}

.switch {
    position: absolute;
    margin: 10px;
    display: block;
    --width-of-switch: 4em;
    --height-of-switch: 2em;
    --size-of-icon: 1.4em;
    --slider-offset: 0.3em;
    width: var(--width-of-switch);
    height: var(--height-of-switch);
    transform: translateY(-200px);
}

/* Hide default HTML checkbox */
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

/* The slider */
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #fff;
    transition: .4s;
    border-radius: 30px;
    /* inner shadow */
    box-shadow: inset 0 0 2px 2px rgba(0, 0, 0, 0.1);
}

.slider:before {
    position: absolute;
    content: "";
    height: var(--size-of-icon,1.4em);
    width: var(--size-of-icon,1.4em);
    border-radius: 20px;
    left: var(--slider-offset,0.3em);
    top: 50%;
    transform: translateY(-50%);
    background-image: url("img/france.png"), url("img/uk.png");
    background-size: cover;
    transition: .4s;
}

input:checked + .slider:before {
    left: calc(100% - (var(--size-of-icon,1.4em) + var(--slider-offset,0.3em)));
    background-image: url("img/uk.png");
}

.menu {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    order: 2;
    background: #fff;
    width: 70px;
    margin-left: 20px;
    border-radius: 35px;
    padding: 15px 0;
    box-shadow: 0 0 20px 1px rgba(0, 0, 0, 0.1);
}

.menu-icon {
    font-size: 2rem;
    color: var(--light-grey);
    padding: 15px;
    transition: .1s;
}

.menu-icon:hover {
    color: var(--accent-color);
    transform: scale(1.25);
}

.adjacent{
    transform: scale(1.1);
    color: var(--accent-color-2);
}

.portfolio {
    display: flex;
    background: var(--background-color-2);
    height: 80vh;
    width: 85vw;
    max-width: 1200px;
    border-radius: var(--border-radius);
    box-shadow: 0 0 20px 1px rgba(0, 0, 0, 0.1);
}

.header {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 500px;
    height: 100%;
    border-radius: var(--border-radius);
    color: white;
    overflow: auto;
}

.header-img {
    width: 150px;
    height: auto;
    border-radius: 50%;
    margin: 100px 10px 10px;
    box-shadow: 0 0 10px 2px rgba(0, 0, 0, 0.5);
}

.header h1 {
    font-size: 2.5rem;
}

.header h2 {
    font-size: 1rem;
    padding: 10px 10px 0 10px;
    line-height: 25px;
}

.socials {
    margin: 20px;
    font-size: 2rem;
}

.socials a {
    color: white;
    margin: 0 10px;
    transition: 0.2s linear;
    transition-property: background-color, color;
}

.socials a:hover {
    color: var(--accent-color);
    transition: 0.2s linear;
    transition-property: background-color, color;
}

.header .cta {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.2);
    padding: 10px 20px;
    margin: 10px 0;
    border-radius: 30px;
    transition: 0.2s linear;
    transition-property: background-color, color;
    box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;
}

.header .cta:hover {
    color: var(--accent-color);
    background-color: #fff;
    transition: 0.2s linear;
    transition-property: background-color, color;
}

.content {
    border-radius: var(--border-radius);
    background: white;
    width: 100%;
    height: 100%;
    scroll-behavior: smooth;
    overflow: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.content-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100%;
    margin: 0 50px;
}

.home h1 {
    font-size: 3.5rem;
    font-weight: bolder;
    text-align: center;
    margin: 20px;
}

.about {
    display: flex;
    flex-direction: column;
}

.about-item {
    width: 100%;
}

.about-me{
    text-align: justify;
}

.about-me p {
    opacity: 0;
}

.about-me p:nth-child(2) {
    animation-delay: 0.2s;
}

.about-me p:nth-child(3) {
    animation-delay: 0.4s;
}

.language {
    margin-bottom: 15px;
}

.language p {
    margin: 0;
}

.tooltip{
    position: absolute;
    background-color: #e7f3ff;
    color: var(--background-color);
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.85rem;
    pointer-events: none;
    z-index: 999;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s;
    box-shadow: 0 0 10px 1px rgba(0, 0, 0, 0.1);
}

.bar {
    background: rgba(0, 0, 0, 0.1);
    display: block;
    height: 8px;
    border-radius: 10px;
    overflow: hidden;
}

.bar span {
    height: 8px;
    float: left;
    background: var(--accent-color);
}

.skill {
    background-color: var(--accent-color);
    color: #fff;
    margin: 5px 0 0 0;
    padding: 3px 7px;
    border-radius: 15px;
    display: inline-flex;
    vertical-align: middle;
    opacity: 0;
}

.skill img{
    margin-right: 5px;
    align-self: center;
    height: 13px;
}

.skill a{
    text-decoration: none;
    color: #fff;
}

.skill a:hover{
    text-decoration: underline;
}

.skillTitle{
    width: 100%;
    font-size: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: justify;
    white-space: nowrap;
}

.skillTitle:before,.skillTitle:after{
    content: "";
    display: inline-block;
    width: 100%;
    height: 1px;
    background-color: var(--text-color);
    vertical-align: middle;
    margin: 5px;
}

.project-list {
    margin: 20px 0;
}

.project-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: end;
    background: var(--light-grey);
    color: transparent;
    width: 100%;
    height: 300px;
    margin: auto;
    overflow: hidden;
    box-shadow: 0 0 10px 1px rgba(0, 0, 0, 0.1);
    opacity:0;
}

.project-tile img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    filter: contrast(70%) brightness(110%) grayscale(20%);
}

.overlay {
    background: var(--overlay-color);
    display: flex;
    flex-direction: column;
    justify-content: end;
    width: 0;
    height: 100%;
    color: white;
    z-index: 2;
    transition: 0.5s ease;
    text-align: justify;
}

.project-description {
    line-height: normal;
    min-width: 80%;
    max-width: 80%;
    margin: 20px;
    position: absolute;
    left: -340px;
    transition: 0.5s ease;
}

.berni{
    max-width: 270px;
}

.berni p{
    line-height: 1rem;
    font-size: 0.8rem;
}

.project-tile:hover .overlay {
    width: 100%;
    cursor: pointer;
    transition: 0.5s ease;
}

.project-tile:hover .project-description {
    left: 0;
    cursor: pointer;
    transition: 0.5s ease;
}

.timeline {
    position: relative;
    text-align: justify;
}

.timeline::before {
    content: "";
    position: absolute;
    width: 2px;
    top: 55px;
    height: calc(100% - 100px);
    background-color: var(--accent-color);
    z-index: 100;
}

.timeline-date {
    position: relative;
}

.timeline-date::before {
    content: "";
    position: absolute;
    background-color: var(--accent-color);
    left: -25px;
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.timeline-items {
    margin-left: 20px;
}

.timeline-item {
    margin: 20px 0;
    opacity: 0;
}

form {
    width: 100%;
    max-width: 600px;
}

.input-box {
    display: flex;
    align-items: center;
}

.input-box #body{
    height: 180px;
}

.input-box input,
textarea {
    width: 100%;
    max-width: 100%;
    min-width: 100%;
    margin: 1rem;
    color: var(--accent-color);
    font-size: 1rem;
    padding-left: 0.3rem;
}

.input-box input::placeholder,
textarea::placeholder {
    color: var(--accent-color);
    font-size: 1rem;
    padding-left: 0.3rem;
}

.input-box textarea::placeholder {
    padding-top: 0.3rem;
}

.input-box input:focus,
textarea:focus {
    box-shadow: 0 0 10px 1px rgba(0, 0, 0, 0.1);
    outline: none;
}

.text-input {
    height: 2rem;
    background-color: transparent;
    border: none;
    border-bottom: solid 2px var(--accent-color);
}

textarea {
    height: 4rem;
    border: none;
    border-bottom: solid 2px var(--accent-color);
}

.submit-btn {
    color: var(--accent-color);
    background-color: #fff;
    padding: 10px 20px;
    margin: 50px 0;
    border-radius: 30px;
    border: none;
    transition: 0.2s linear;
    transition-property: background-color, color;
    box-shadow: 0 0 10px 2px rgba(0, 0, 0, 0.1);
}

.submit-btn:hover {
    color: #fff;
    background-color: var(--accent-color);
    transition: 0.2s linear;
    transition-property: background-color, color;
    cursor: pointer;
}

.toUp{
    animation: toUp 1s ease-in-out forwards;
}

@keyframes toUp {
    0%{
        opacity: 0;
        transform: translateY(100px);
    }
    100%{
        opacity: 1;
        transform: translateY(0);
    }
}

.french.langLoad {
    animation: frLangLoad 1s ease-in-out forwards;
}

.english.langLoad {
    animation: enLangLoad .9s ease-in-out forwards;
}

.toRight{
    animation: toRight .4s ease-in-out forwards;
}

@keyframes frLangLoad {
    0%{
        width: 0;
    }
    100%{
        width: 100%;
    }
}

@keyframes enLangLoad {
    0%{
        width: 0;
    }
    100%{
        width: 90%;
    }
}

@keyframes toRight {
    0% {
        opacity: 0;
        transform: translateX(-20px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes blink {
    0% {
        opacity: 0;
    }
    49% {
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    99% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

@media screen and (max-width: 1200px) {
    html {
        scroll-behavior: smooth;
    }
    .container {
        height: auto;
        flex-direction: column;
    }
    .portfolio {
        flex-direction: column;
        height: 100%;
        margin: 30px 0 100px;
    }
    .content {
        padding-bottom: 100px;
    }
    .header {
        width: 100%;
        height: 100%;
    }

    .content-card {
        padding: 100px 0 0;
    }
    .menu {
        flex-direction: row;
        position: fixed;
        bottom: 15px;
        z-index: 1000;
        width: auto;
        height: fit-content;
        border-radius: 50px;
        margin: 0;
    }
    .menu-icon {
        font-size: 2rem;
        padding: 0 15px;
    }
    .home h1 {
        font-size: 3rem;
    }

    .switch {
        transform: translate(200px, 0);
    }

    ::-webkit-scrollbar {
        width: 0.5em;
        display: none;
    }

    ::-webkit-scrollbar-track {
        background: var(--background-color);
    }

    ::-webkit-scrollbar-thumb {
        background: #fff;
        border-radius: 1em;
    }
}

@media screen and (max-width: 750px) {
    .col-2 {
        grid-template-columns: 1fr;
    }

    .menu-icon {
        font-size: 1.5rem;
    }

    ::-webkit-scrollbar {
        display: none;
    }

    @media screen and (max-width: 400px) {
        .content-card {
            margin: 0 30px;
        }

        .home h1 {
            font-size: 2rem;
            line-height: 2.5rem;
        }
    }

    #navbar {
        position: fixed;
        margin: 0;
        padding: 0;
        width: 0;
        height: 0;
    }
    .project-tile .overlay {
        width: 100%;
        cursor: pointer;
        transition: 0.5s ease;
        background-color: var(--accent-color-2);
    }
    .project-tile .project-description {
        left: 0;
        cursor: pointer;
        transition: 0.5s ease;
    }
    .changeLanguage {
        border-radius: 50% 0 0 50%;
        margin: 10px 0 0 0;
    }
    .changeLanguage img {
        left: 55%;
    }
    .switch {
        position: absolute;
        transform: translate(0, -50px);
    }
    .header h1 {
        font-size: 2em;
    }
}