:root {
    --black: #211F26;
    --white: #FCFCFC;
}

*{
    padding: 0;
    margin: 0;
    text-decoration: none;
    list-style: none;
    transition: .2s;
    font-family: "Open Sans", sans-serif;
    font-optical-sizing: auto;
    font-weight: 300;
    font-style: normal;
    font-variation-settings: "wdth" 100;
}

html, body {
    width: 100%;
    height: 100%;
    max-width: 100vw;
}

body {
    width: 100vw;
    height: 100%;
    overflow-x: hidden;
}

/* HERO PAGE --------------------------------------------------------- */

#hero {
    background-image: url("assets/images/sky_background.webp");
    background-size: 100% 100%;
    background-repeat: no-repeat;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

#card {
    position: relative;
    width: 50%;
    height: 50%;
    border: 1px dashed rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1); /* couleur semi-transparente */
    backdrop-filter: blur(10px);          /* flou de l’arrière-plan */
    -webkit-backdrop-filter: blur(10px);  /* pour Safari */
}

#cardbox {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: row;
}

#cardbox .left {
    width: 60%;
    height: 100%;
    padding-left: 4%;
    padding-right: 4%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
#cardbox .left p {
    max-width: 90%;
}
#hello {
    font-size: clamp(1.5rem, 2vw, 2rem);
    font-weight: bolder;
    color: var(--black);
}
#title {
    font-size: clamp(2rem, 3vw, 3rem);
    font-weight: bold;
    color: var(--black);
}
#intro {
    font-size: clamp(.8rem, 1.5vw, 2rem);
    font-weight: bolder;
    color: var(--black);
}
#buttons {
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
    gap: 10%;
    margin-top: 10%;
}
#buttons .button {
    width: 8em;
    height: 2.5em;
    border-radius: 5px;
    border: 1px dashed var(--black);
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
    align-items: center;
}
#buttons .button p {
    font-weight: bolder;
    color: var(--black);
}
#buttons .button svg path {
    fill: var(--black)
}
#buttons .button:hover {
    border-color: rgba(0, 0, 0, 0);
    background-color: var(--black);
}
#buttons .button:hover :is(p, svg path) {
    color: var(--white);
    fill: var(--white);
}

#cardbox .right {
    width: 40%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 4%;
    padding-right: 4%;
}
#cardbox .right svg {
    fill: var(--black);
}

#cloud1 {
    position: absolute;
    bottom: 0;
    left: 0;
    transform: translate(-20%, 40%);
    height: 50%;
    z-index: 2;
    will-change: transform;
}
#cloud2 {
    position: absolute;
    bottom: 0;
    right: 0;
    transform: translate(20%, 40%);
    height: 50%;
    z-index: 2;
    will-change: transform;
}

/* ABOUT PAGE --------------------------------------------------------- */
#about {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.section-title {
    font-weight: bold;
    font-family: 'SFMono';
    font-size: 3em;
    color: var(--black);
}
.section-title::after {
    content: "|";
    animation: blinking 1.5s ease-in-out 3s infinite alternate-reverse;
}

#presentation {
    display: flex;
    flex-direction: row;
    gap: 2em;
    justify-content: center;
    align-items: center;
    margin: 5em auto auto auto ;
}

.frame {
    padding: 5px;
    border: 1px dashed var(--black);
    border-radius: 12px;
    width: fit-content;
}
.inner-frame {
    position: relative;
    border-radius: 7px;
    width: fit-content;
    overflow: hidden;
}
#picture {
    display: block;
    width: 20em;
}
#presentation .text {
    width: fit-content;
    display: inline-block;
    max-width: 30%;
}
#presentation .text p {
    font-weight: bolder;
    margin: 10px auto 10px auto;
    font-size: clamp(1rem, 1vw, 2rem);
    color: var(--black);
}
#presentation .button {
    margin-top: 5%;
    width: 9em;
    height: 2.5em;
    border-radius: 5px;
    border: 1px dashed var(--black);
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
    align-items: center;
}
#presentation .button p {
    margin: 0;
    font-weight: bolder;
    color: var(--black);
}
#presentation .button svg path {
    fill: var(--black)
}
#presentation .button:hover {
    border-color: rgba(0, 0, 0, 0);
    background-color: var(--black);
}
#presentation .button:hover :is(p, svg path) {
    color: var(--white);
    fill: var(--white);
}

/* PROJECTS PAGE --------------------------------------------------------- */
#projects {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* FUN PAGE --------------------------------------------------------- */
#fun {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-bottom: 100px;
}
#fun > p {
    color: var(--black);
    margin: 50px 20% 40px 20%;
    font-weight: bolder;
    font-size: clamp(1rem, 1vw, 2rem);
}
#fun > p strong {
    font-size: clamp(1.1rem, 1.1vw, 2.2rem);
    font-weight: bold;
}
#fun .frame {
    position: relative;
}
#music-display {
    display: flex;
    padding: 10px;
    background-image: url("assets/images/music_placeholder.webp");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 100%;
    position: relative;
    border-radius: 7px;
    overflow: hidden;
}
#music-blur {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background: rgba(137, 137, 137, 0.2); /* couleur semi-transparente */
    backdrop-filter: blur(10px);          /* flou de l’arrière-plan */
    -webkit-backdrop-filter: blur(10px);  /* pour Safari */
}
#cover {
    width: 100px;
    height: 100px;
    display: block;
    border-radius: 8px;
    z-index: 2;
    margin-right: 10px;
}
#music-infos {
    height: 100px;
    width: 160px;
    z-index: 2;
    overflow: hidden;
}
#music-name {
    color: var(--white);
    opacity: .9;
    font-weight: bolder;
    font-size: 1.2rem;
    white-space: nowrap;
}
.animated-scroll {
    animation: hscroll 5s linear 0s infinite forwards alternate-reverse;
}
#artist-name {
    color: var(--white);
    opacity: .7;
    font-weight: bolder;
    font-size: 1rem;
}
#spotify-logo {
    width: 25px;
    position: absolute;
    right: 0;
    top: 0;
    transform: translate(25%, -25%);
    z-index: 2;
}
#spectrum {
    display: none;
    width: 90%;
}

/* CONTACT PAGE --------------------------------------------------------- */
#contact {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: var(--black);
}
#contact .section-title {
    color: var(--white);
    margin-top: 50px;
}
#contact-mail {
    border: 1px dashed var(--white);
    border-radius: 12px;
    padding: 20px;
    margin-top: 100px;
    width: 40%;
}
#contact-mail h3 {
    color: var(--white);
    font-weight: bolder;
    font-size: 2rem;
    margin-bottom: 20px;
}
#contact-mail input, #contact-mail textarea {
    border: 1px dashed var(--white);
    background-color: var(--black);
    border-radius: 5px;
    padding: 5px;
    margin: 10px auto;
    width: 100%;
    box-sizing: border-box;
    color: var(--white);
    font-size: 1rem;
    resize: none;
    font-weight: lighter;
}
#contact-mail textarea{
    height: 100px;
}
#contact-mail input::placeholder, #contact-mail textarea::placeholder {
    color: var(--white);
    opacity: .8;
}
#button-submit {
    width: fit-content;
    margin: auto;
}
button {
    width: 8em;
    height: 2.5em;
    border-radius: 5px;
    border: 1px dashed var(--white);
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
    align-items: center;
    background-color: var(--black);
    position: relative;
}
button {
    font-weight: bolder;
    color: var(--white);
}
button svg path {
    fill: var(--white)
}
button:hover {
    border-color: rgba(0, 0, 0, 0);
    background-color: var(--white);
}
button:hover, button:hover svg path {
    color: var(--black);
    fill: var(--black);
}
.contact-text {
    color: var(--white);
    font-size: clamp(1rem, 1.5vw, 2rem);
    margin: 50px auto
}
#links {
    display: flex;
    gap: 2rem;
}
.link {
    border: 1px dashed var(--white);
    border-radius: 100%;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.link svg path {
    fill: var(--white);
}
a:hover .link {
    border-color: rgba(0,0,0,0);
    background-color: var(--white);
}
a:hover .link svg path {
    fill: var(--black);
}
#mail-loading {
    animation: spin 1s ease-in-out infinite;
    display: none;
}
.mail-result {
    position: absolute;
    top: -1;
    left: -1;
    width: 8em;
    height: 2.5em;
    border-radius: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
}
#mail-fail {
    background-color: #E5484D;
    border: 1px solid #E5484D;
}
#mail-fail svg path {
    fill: #FFDBDC;
}
#mail-success {
    background-color: #30A46C;
    border: 1px solid #30A46C;
}
#mail-success svg path {
    fill: #D6F1DF;
}
.fade-in-out {
    animation: fade-in-out 2s ease-in-out;
}


/* FOOTER --------------------------------------------------------- */
footer {
    background-color: var(--black);
    padding: 20px;
    padding-top: 50px;
}
footer p {
    color: var(--white);
}

.separation {
    width: 300px;
    border-bottom: 1px dashed var(--black);
    margin: 100px auto;
}

.separation::before {
  content: "";
  display: block;
  height: 100%;
}

/* tests */

#wait {
    color: var(--black);
    margin: 50px 20% 100px 20%;
    font-size: clamp(1rem, 1vw, 2rem);
    font-weight: bolder;
}

/* PORTRAIT */

@media (max-width: 768px) and (orientation: portrait) {
    #hero {
        background-size: auto 100%;
    }
    #card {
        height: fit-content;
        padding: 10% 5%
    }
    #cardbox {
        display: block;
    }
    #cardbox .left {
        width: fit-content;
        padding: auto 20% auto 20%;
    }
    #cardbox .right {
        display: none;
    }
    #buttons {
        width: fit-content;
        min-width: 60%;
        margin-top: 10%;
        margin-left: auto;
        margin-right: auto;
        justify-content: space-around;
    }
    #buttons .button {
        width: 2rem;
        height: 2rem;
        border-radius: 100%;
        margin-left: auto;
        margin-right: auto;
    }
    #buttons .button p {
        display: none;
    }
    #cloud1 {
        left: -50%;
    }
    #cloud2 {
        right: -50%;
    }

    #presentation {
        flex-direction: column;
    }

    .frame-photo {
        width: 50%;
        border-radius: 100%;
        aspect-ratio: 1/1;
    }
    .inner-frame {
        width: 100%;
        border-radius: 100%;
        aspect-ratio: 1/1;
    }
    #picture {
        width: 100%;
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
    }
    #presentation .text {
        width: 70%;
        max-width: 70%;
    }
    #presentation .button {
        margin: 10% auto auto auto ;
    }

    #contact-mail {
        width: 80%;
    }
}

/* animations */

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

@keyframes hscroll {
    0% {transform: translateX(0);}
    15% {transform: translateX(0);}
    100% {transform: translateX(-100%);}
}

@keyframes spin {
    0% {transform: rotate(0deg);}
    100% {transform: rotate(360deg);}
}

@keyframes fade-in-out {
    0% {opacity: 0;}
    50% {opacity: 1;}
    100% {opacity: 0;}
}
/* polices */

@font-face {
    font-family: 'SFMono';
    src: url('assets/fonts/SFMonoMedium.otf') format('opentype');
    font-weight: bold;
}

@font-face {
    font-family: 'SFMono';
    src: url('assets/fonts/SFMonoRegular.otf') format('opentype');
    font-weight: normal;
}