:root {
    --text-color: white;
    --text-color-on-white: black;
    --background-gradient: radial-gradient(ellipse at top, #060e40 30%, #400183 100%);
    --neon-pink: rgb(255, 0, 255);
    --neon-pink-opacify: rgba(255, 0, 255, 0.7);
    --neon-green: rgb(0, 255, 0);
    --neon-green-opacify: rgba(0, 255, 0, 0.7);
    --neon-blue: rgb(0, 255, 255);
    --neon-blue-opacify: rgba(0, 255, 255, 0.7);
    --moon-color: #eee1b4;
    --line-color: white;
    --slider-background: rgba(0, 255, 255, 0.7);
    --slider-border: rgb(100, 100, 100);
    --techno-background-color: rgba(219, 208, 46, 0.9);
    --contact-button-color: rgb(100, 15, 100);
    --contact-button-hover: rgb(5, 86, 115);
    --contact-button-shadow-hover: rgb(88, 230, 255);
    --round: 50%;
    --robotic: Audiowide, Arial, Helvetica, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
    font-family: Arial, Helvetica, sans-serif;
}

html {
    overflow-x: hidden;
}

body {
    width: 100vw;
    height: 100vh;
}

ul {
    list-style-type: none;
}

/* Header */
header {
    height: 100%;
    background-image: url("img/header-calque1.jpg");
    background-size: cover;
    background-position: top;
    background-repeat: no-repeat;
    position: relative;
    overflow: hidden;
}

/* navigation */
nav {
    position: fixed;
    width: 100%;
    height: 60px;
    display: flex;
    z-index: 100;
}

nav ul {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 40%;
    margin: auto;
}

nav li {
    padding: 5px 20px;
    box-sizing: border-box;
    border-radius: 25px;
    z-index: 15;
    position: relative;
    overflow: visible;
    text-align: center;
}

nav li img {
    top: -15px;
}

nav li::before {
    content: "";
    display: block;
    height: 40px;
    width: 3px;
    position: absolute;
    z-index: -1;
    left: calc(50% - 3px);
    bottom: calc(50% - 20px);
    transition: 0.7s;
    border-radius: 5px;
}

nav li:hover::before {
    width: 100%;
    left: 0;
    border-radius: 25px;
}

nav li:first-of-type::before {
    background-color: var(--neon-pink-opacify);
    box-shadow: 0px 0px 5px 3px var(--neon-pink);
}

nav li:nth-of-type(2)::before {
    background-color: var(--neon-green-opacify);
    box-shadow: 0px 0px 5px 3px var(--neon-green);
}

nav li:nth-of-type(3)::before {
    background-color: var(--neon-blue-opacify);
    box-shadow: 0px 0px 5px 3px var(--neon-blue);
}

nav li:first-of-type:hover::before {
    background-color: var(--neon-pink);
    box-shadow: 0px 0px 15px 3px var(--neon-pink);
}

nav li:nth-of-type(2):hover::before {
    background-color: var(--neon-green);
    box-shadow: 0px 0px 15px 3px var(--neon-green);
}

nav li:nth-of-type(3):hover::before {
    background-color: var(--neon-blue);
    box-shadow: 0px 0px 15px 3px var(--neon-blue);
}

nav li:hover a {
    color: var(--text-color-on-white);
}

nav li a {
    font-size: 1.5rem;
    color: var(--text-color);
    text-decoration: none;
    cursor: pointer;
    transition: 1s;
}

#mobile-menu-container {
    width: 0px;
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

#burger-menu {
    visibility: hidden;
    background-image: url(img/burger-menu.svg);
    background-size: cover;
    background-position: center;
    background-color: transparent;
    border: none;
    width: 80px;
    height: 80px;
    z-index: 9;
    cursor: pointer;
    transition: 0.2s;
}

.close {
    background-image: url(img/close.svg) !important;
}

#mobile-menu {
    width: 100%;
    position: relative;
    height: 200px;
}

#mobile-menu ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    scale: 1;
}

#mobile-menu ul li::before {
    left: 15px;
}

#mobile-menu ul li:hover::before {
    width: 82%;
}

#mobile-menu li:last-of-type {
    display: flex;
    gap: 50px;
}

#mobile-menu li a img {
    max-width: 50px;
    max-height: 50px;
}

.close-list {
    scale: 0 !important;
}

/* header content */
h1 {
    position: relative;
    font-size: 6rem;
    color: var(--text-color);
    top: calc(50% - 10rem);
    text-align: center;
    z-index: 4;
}

h1 span {
    font-size: 9rem;
}

header img:first-of-type {
    position: absolute;
    width: 100%;
    z-index: 1;
}

header img:nth-of-type(2) {
    position: absolute;
    top: -20%;
    right: 0;
    animation: levitating 5s ease infinite;
    z-index: 2;
}

header img:nth-of-type(3) {
    position: absolute;
    top: -2%;
    left: 0;
    animation: header-spaceship 1.5s ease-in;
    z-index: 3;
}

header img:nth-of-type(4) {
    position: absolute;
    height: 100%;
    bottom: 0;
    left: 0;
    z-index: 5;
}

header img:nth-of-type(5) {
    position: absolute;
    height: 100%;
    bottom: 0;
    right: 0;
    z-index: 6;
}

header img:nth-of-type(6) {
    position: absolute;
    height: 100%;
    bottom: 0;
    right: 0;
    z-index: 7;
}

header img:nth-of-type(7) {
    position: absolute;
    height: 100%;
    bottom: 0;
    left: 0;
    z-index: 8;
}

header img:nth-of-type(8) {
    position: absolute;
    height: 100%;
    bottom: -10%;
    right: 20%;
    z-index: 9;
}

header img:nth-of-type(9) {
    position: absolute;
    height: 100%;
    bottom: 0;
    left: 0;
    z-index: 10;
}

header img:nth-of-type(10) {
    position: absolute;
    height: 100%;
    bottom: 0;
    right: 0;
    z-index: 11;
}

header img:last-of-type {
    position: absolute;
    bottom: -5%;
    z-index: 12;
    animation: levitating-inverted 5s ease infinite;
}

/* Main */
main {
    height: auto;
    background: var(--background-gradient);
}

section {
    height: 100dvh;
    position: relative;
}

/* About me section */
#about-me {
    background-image: url("img/header-calque1.png");
}

#presentation {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60%;
    position: relative;
}

#presentation img:not(#portrait) {
    max-width: 500px;
    width: 100%;
    max-height: 500px;
}

#photo {
    height: 70%;
    max-width: 500px;
    margin-right: 30px;
    filter: drop-shadow(0 0 10px var(--moon-color));
    position: relative;
}

#portrait {
    width: 300px;
    border-radius: var(--round);
    z-index: 2;
}

#photo button {
    width: 100px;
    height: 100px;
    background: url("img/MoonCV.png");
    background-size: contain;
    box-sizing: border-box;
    border: none;
    border-radius: var(--round);
    cursor: pointer;
    font-family: "Roboto Condensed", Arial, Helvetica, sans-serif;
    font-size: 0.95rem;
    transition: .2s;
    position: absolute;
    right: 0;
    bottom: 0;
    animation: resume-light 2s linear infinite;
}

#description {
    flex-grow: 1;
    color: var(--text-color);
    flex-basis: 200;
}

#description h2 {
    font-size: 6rem;
    text-align: center;
}

#description p {
    padding: 10px 50px;
    text-align: justify;
}

/* skills  */
#skills {
    width: 80%;
    height: 40%;
    margin: auto;
    background-image: url("img/skills-constellation.png");
    background-size: contain;
    background-repeat: no-repeat;
    background-position-x: calc(50% - 100px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#skills h3 {
    font-size: 2rem;
    color: var(--text-color);
    padding-bottom: 40px;
}

#skills ul {
    width: 70%;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-evenly;
}

#skills li img {
    width: 90px;
}

/* Projects section */
#projects {
    position: relative;
    display: flex;
    margin-top: 50px;
    scroll-margin-top: 50px;
}

#projects h2 {
    font-size: 5rem;
    color: var(--text-color);
    writing-mode: vertical-rl;
    text-orientation: mixed;
    position: absolute;
    top: -40px;
    left: 2px;
}

/* Solar system */
#solar-system {
    width: 100%;
    margin-top: 60px;
    height: 90%;
    position: relative;
}
  
.line {
    border-radius: 100% 0 0 100% / 50%;
    box-sizing: border-box;
    border: 2px solid var(--line-color);
    height: 100%;
    width: 100%;
}

.project {
    position: absolute;
    box-sizing: border-box;
}

.project.four {
    width: 90%;
    height: 93%;
    right: -10px;
    top: 3.5%;
}

.project.three {
    width: 80%;
    height: 90%;
    right: 0;
    top: 5%;
}

.project.two {
    width: 60%;
    height: 80%;
    right: 0;
    top: 10%;
}

.project.one {
    width: 50%;
    height: 70%;
    right: 0;
    top: 15%;
}

.sun {
    width: 65%;
    height: 65%;
    border-radius: var(--round);
    background: radial-gradient(circle at right, yellow, white);
    right: -30.5%;
    top: 17.5%;
    filter: drop-shadow(-10px 1px 20px white);
}

#planet1, #planet2, #planet3, #planet4 {
    position: absolute;
    cursor: pointer;
    border: none;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    text-align: center;
    font-weight: 600;
    font-size: 1rem;
}

#planet1 {
    width: 150px;
    height: 150px;
    bottom: 82%;
    left: 45%;
    background-image: url("img/planet4.png");
    filter: drop-shadow(0 0 5px rgb(0, 255, 155));
}

#planet2 {
    width: 120px;
    height: 120px;
    bottom: 61%;
    left: 5%;
    background-image: url("img/planet3.png");
    filter: drop-shadow(0 0 10px rgb(255, 155, 155));
}

#planet3 {
    width: 130px;
    height: 130px;
    bottom: -3%;
    left: 40%;
    background-image: url("img/planet2.png");
    filter: drop-shadow(0 0 10px rgb(0, 150, 255));
}

#planet4 {
    width: 140px;
    height: 140px;
    bottom: 56%;
    left: 0%;
    background-image: url("img/planet1.png");
    filter: drop-shadow(0 0 15px rgb(100, 100, 100));
}


















/* pour le déplacement des planètes focus : planet:focus > not:focus  */























/* slider */
#projects-slider {
    position: absolute;
    width: 85dvw;
    height: 84dvh;
    top: calc(50% - 45dvh);
    left: calc(50% - 42dvw);
    background-color: var(--slider-background);
    backdrop-filter: blur(2px);
    box-sizing: border-box;
    border: 4px solid var(--slider-border); 
    border-radius: 15px;
    z-index: 25;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

#projects-slider h3 {
    font-size: 2.5rem;
    font-family: var(--robotic);
}

#slider-nav {
    display: flex;
    justify-content: space-between;
    width: 90%;
    max-width: 1500px;
    position: absolute;
}

#slider-nav button {
    height: 50px;
    width: 50px;
    border-radius: var(--round);
    box-sizing: border-box;
    border: 3px dotted black;
    background-color: transparent;
    cursor: pointer;
}

#slider-after:hover {
    animation: nav-button 10s linear infinite;
}

#slider-before:hover {
    animation: nav-button-inverted 10s linear infinite;
}

#slider-after:hover span {
    animation: nav-button-inverted 10s linear infinite;
}

#slider-before:hover span {
    animation: nav-button 10s linear infinite;
}

#slider-nav button span {
    transform: translate(50 50);
}

#slider-content {
    width: 80%;
    max-width: 1200px;
    height: 82%;
    position: relative;
    display: flex;
    overflow: hidden;
    margin: 10px auto;
}

.slider-project {
    min-width: 100%;
    height: 100%;
    display: flex;
    gap: 10px;
    position: relative;
}

.slider-project div {
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
}

.planet-design {
    position: absolute;
    right: 0;
    top: 0;
    z-index: -1;
    width: 40px;
    height: 40px;
}

iframe {
    width: 400%;
    max-width: 800px;
    height: 100%;
    box-sizing: border-box;
    border: none;
    border-radius: 10px;
}

#tools {
    display: flex;
    flex-wrap: wrap;
}

.info {
    font-family: var(--robotic);
    font-size: 1.3rem;
}

.tool {
    padding: 2px 10px;
    margin: 1px 10px;
    background-color: var(--techno-background-color);
    box-sizing: border-box;
    border-radius: 2px;
}

/* Contact Me section */
#contact-me {
    background-image: url("img/footer.png");
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    position: relative;
    display: flex;
    flex-direction: column;
}

#contact {
    margin: auto;
    position: relative;
    width: 40%;
    height: 60%;
    font-size: 3rem;
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    row-gap: 30px;
}

small {
    color: #f67080;
    position: absolute;
    right: 10px;
    bottom: 3px;
}

.box {
    display: flex;
    justify-content: flex-start;
}

.text-container {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}
  
.cursor {
    font-weight: bold;
    animation: blink 0.7s steps(2) infinite;
}

.mail {
    width: 60%;
    height: 20%;
    cursor: pointer; 
    background-color: var(--text-color);
    transition: .3s;
    box-sizing: border-box;
    border: none;
    border-radius: 5px;
    font-size: 2.5rem;
    color: var(--contact-button-color);
    font-family: var(--robotic);
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    text-align: center;
    filter: drop-shadow(2px 2px 25px var(--contact-button-color));
}

.mail:hover {
    color: var(--contact-button-hover);
    filter: drop-shadow(2px 2px 25px var(--contact-button-shadow-hover));
}

#media {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

/* Animations */
@keyframes levitating {
    0% {

    }

    50% {
        transform: translateY(1%);
    }

    100% {

    }
}

@keyframes resume-light {
    0%, 100% {

    }

    50% {
        filter: drop-shadow(1px 1px 20px var(--moon-color));
    }
}

@keyframes levitating-inverted {
    0% {
        transform: translateY(1%);
    }

    50% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(1%);
    }
}

@keyframes header-spaceship {
    0% {
        top: 50%;
    }

    100% {

    }
}

@keyframes css-spaceship {
    0% {

    }

    50% {
        bottom: 120%;
    }

    100% {

    }
}

@keyframes nav-button {
    0% {
        scale: 1.1;
        translate: 50 50;
        rotate: 0deg;
    }

    100% {
        rotate: 360deg;
    }
}

@keyframes nav-button-inverted {
    0% {
        scale: 1.1;
        translate: 50 50;
        rotate: 0deg;
    }

    100% {
        rotate: -360deg;
    }
}

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

/* Media queries */
@media screen and (max-width: 1400px) {
    small {
        position: unset;
        text-align: center;
        padding-bottom: 3px;
    }
}

@media screen and (max-width: 1200px) {
    nav ul {
        width: 80%;
    }

    header img:nth-of-type(8) {
        right: calc(50% - 533px);
    }

    header img:nth-of-type(10) {
        right: -10%;
    }

    #description p {
        padding: 10px 0;
    }

    #skills ul {
        width: 90%;
    }

    .mail {
        width: 100%;
    }

    #contact {
        height: 70%;
    }
}

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

    /* header */
    header img:nth-of-type(2) {
        top: -5%;
        right: -25%;
    }

    header img:nth-of-type(3) {
        top: 5%;
        left: -5%;
    }

    header img:nth-of-type(4), header img:nth-of-type(5), header img:nth-of-type(6), header img:nth-of-type(7), header img:nth-of-type(9), header img:nth-of-type(10) {
        bottom: -25%;
    }

    header img:nth-of-type(8) {
        right: calc(50% - 575px);
        bottom: -25%;
    }

    header img:last-of-type {
        bottom: 0;
    }

    h1, h1 span{
        font-size: 5rem;
    }

    h1 {
        top: calc(50% - 10rem);
    }

    /* about me section */ 
    #about-me {
        height: 100dvh;
        display: flex;
        flex-direction: column;
        justify-content: space-evenly;
    }

    #presentation {
        height: auto;
    }

    #photo {
        height: unset;
    }

    #description h2 {
        font-size: 5rem;
    }

    #skills {
        margin: 0 auto;
        height: auto;
    }

    #skills ul {
        width: 100%;
    }

    /* contact */
    #contact {
        width: 95%;
    }

    .mail {
        width: 80%;
    }
}

@media screen and (max-width: 450px) {
    body {
        max-width: 100%;
    }
    /* header */
    nav ul {
        width: 100%;
        margin: 0;
    }

    .desktop {
        visibility: hidden;
    }

    #burger-menu {
        visibility: visible;
    }

    #moving-planets {
        width: 800px;
        top: 0px;
        left: -280px;
    }

    #spaceship-illu {
        width: 800px;
        top: 190px;
    }

    #cloud-left, #cloud-right, #mountain-left, #mountain-right, #sand-dune-left, #sand-dune-right, #astronaut-on-top {
        width: 700px;
        height: unset;
    }

    #sand-dune-left {
        left: -120px;
    }

    #sand-dune-right {
        right: -120px;
    }

    #floating-objects {
        width: 800px;
        bottom: 20px;
    }

    #astronaut-on-top {
        right: calc(50% - 350px);
    }

    h1, h1 span{
        font-size: 3rem;
    }

    h1 {
        top: calc(50% - 6rem);
    }

    .parallax, .parallaxL, .parallaxR, .parallaxB {
        transform: none !important;
        will-change: auto;
    }

    /* section about-me */
    #about-me {
        height: auto;
    }

    #presentation {
        flex-direction: column;
        gap: 30px;
    }

    #presentation img:not(#portrait) {
        position: absolute;
        width: 20%;
    }

    #presentation img:not(#portrait):first-of-type {
        left: 0;
    }

    #presentation img:not(#portrait):last-of-type {
        right: 0;
    }

    #photo {
        margin: 30px 0 0 0;
    }

    #skills {
        width: 95%;
        background-image: unset;
        margin-top: 30px;
    }

    /* footer */
    #contact {
        width: 95%;
        height: 70%;
    }

    .mail {
        width: 80%;
    }
}