@font-face {
    font-family: "Public Sans";
    src: url(fonts/Public_Sans/PublicSans-VariableFont_wght.ttf);
}
@font-face {
    font-family: "Public Sans Bold";
    src: url(fonts/Public_Sans/static/PublicSans-Bold.ttf);
}


* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

html, body {
    padding:0;
    margin:0;
    height: 100%;
    width: 100%;
    font-family: 'Raleway', sans-serif;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    background-color: rgb(255, 244, 224);
}


nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 4px solid black;
    height: 10%;
    min-height: 4rem;
    width: 100%;
    background-color:brown;
    position: fixed;
    z-index: 100;
}

nav a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 20%;
    height: 100%;
    color: black;
    text-decoration: none;
    font-size: 2.4rem;

}

#logo{
    border-right: 3px solid rgb(0, 0, 0);
}

nav ul {
    display: flex;
    justify-content: flex-end;
    flex: 1;
    align-items: center;
    list-style: none;
    padding-right: 3rem;
    gap: 20px;
}

nav ul li a {
    font-size: 1.3rem;
    font-weight: 600;
    cursor: pointer;
}

nav ul li a:hover {
    color: rgb(255, 244, 224);;
}

nav img {
    display: none;
}

main {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    gap: 10rem;
    
    height: auto;
    width: 100%;
    padding: 10rem 5rem 3rem 5rem;

    background-color: rgb(253, 151, 69);
}

section {
    height: 29.4rem;
    width: 100%;
}

#home  {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    
    gap: 1.5rem;
    padding: 1rem;
}

#home #container {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
    position: relative;
    height: auto;
    width: 100%;
    padding: 20px;
    font-size: 1.4rem;
    line-height: 1.4;
    background-color: rgb(255, 244, 224);
    transform-origin: bottom;
    z-index: 2;

    animation: home-card 0.7s ease-out 0.1s ;
    animation-fill-mode: forwards;


    border: 4px solid black;
    border-radius: 8px;
    box-shadow: 8px 8px black;
 
}

#home a {
    color: black;
}

#line {
    margin-top: 1rem;
    height: 2px;
    width: 85%;
    background-color: black;
}

#about {
    margin-top: 1rem;
    padding: 0 18px;
    overflow: hidden;
}

#about p:first-child {
    text-align: center;
    margin-bottom: 1rem;
}

#cv {
    padding: 0.5rem;
    font-size: 1.5rem;
    font-weight: 600;
    position: relative;
    top: 0%;
    cursor: pointer;
    color: black;
    text-decoration: none;
    background-color: rgb(255, 244, 224);
    z-index: 1;
    transform-origin: center;

    animation: call-to-action-start 1.5s ease-out 1, swing ease-in-out 2.5s infinite;
    animation-delay: 0s, 3s;
    animation-fill-mode: forwards;         
    border: 4px solid black;
    border-radius: 8px;
    box-shadow: 8px 8px black;
}

#cv:hover {
    animation-duration: 0s, 0s;
}


.section-title {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 600;
    background-color: rgb(255, 244, 224);

    height: 3rem;
    width: 8rem;

    border: 5px solid black;
    border-radius: 8px;
    box-shadow: 4px 4px black;
}

#phantom-projets {
    position: relative;
}

#skill {
    width: 100%;
    padding: 2rem 1rem 1rem 1rem;
    border: 4px solid black;
    border-radius: 8px;
    box-shadow: 8px 8px black;
    background-color: rgb(255, 244, 224);

    font-size: 1.4rem;
    position: relative;
}

#skill .section-title {
    position: absolute;
    top: -5%;
    left: 5%;
}

#skill-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 20px;
}


#hardskill {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(2, 1fr);
    grid-column-gap: 0px;
    grid-row-gap: 0px;
    width: 100%;
}
    
#div1 { grid-area: 1 / 1 / 2 / 2; display: flex; flex-direction: column; align-items: center; }
#div2 { grid-area: 1 / 3 / 2 / 4; display: flex; flex-direction: column; align-items: center; }
#div3 { grid-area: 1 / 5 / 2 / 6; display: flex; flex-direction: column; align-items: center; }
#div4 { grid-area: 2 / 2 / 3 / 3; display: flex; flex-direction: column; align-items: center; }
#div5 { grid-area: 2 / 4 / 3 / 5; display: flex; flex-direction: column; align-items: center; }

#hardskill img {
    height: 4rem;
    width: 4rem;
}

#skill ul li {
    list-style: none;
}

#softskill {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;

    text-align: center;
    justify-content: center;
}


.gauge-bar-container {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.gauge-bar {
    height: 1.2rem;
    flex: 3;
    margin-right: 2rem;
    background-color: black;
    border: 3px solid black;
    border-radius: 8px;
    overflow: hidden;
}

.gauge-bar-container p{
    margin-left: 2em;
    flex: 1;
    display: flex;
    gap: 5px;
    white-space: nowrap;
}

.gauge-bar-container p > {
    margin-left: 2rem;
    flex: 1;
    display: flex;
    gap: 5px;
    white-space: nowrap;
}

.gauge-bar-content {
    height: 100%;
    width: 100%;
    background-color: white;
    animation: fill 3s ease-in-out 0s 1;
    animation-fill-mode: forwards;   
    position: relative;   
}

.percent {
    position: absolute;
    right: 1%;
    font-size: 0.8rem;
}

#softskill .gauge-bar-container:nth-child(1) .gauge-bar-content{
    animation: fill 1.5s ease-in-out 0s 1;
    animation-fill-mode: forwards;     
}


#softskill .gauge-bar-container:nth-child(2) .gauge-bar-content{
    animation: fill 1s ease-in-out 0s 1;
    animation-fill-mode: forwards;     
}

#softskill .gauge-bar-container:nth-child(3) .gauge-bar-content{
    animation: fill 2s ease-in-out 0s 1;
    animation-fill-mode: forwards;     
}

#softskill .gauge-bar-container:nth-child(4) .gauge-bar-content{
    animation: fill 2.5s ease-in-out 0s 1;
    animation-fill-mode: forwards;     
}

#softskill .gauge-bar-container:nth-child(5) .gauge-bar-content{
    animation: fill 1.75s ease-in-out 0s 1;
    animation-fill-mode: forwards;     
}

#projets {
    margin-bottom: 10rem;
}

#projets-title {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 600;
    background-color: rgb(255, 244, 224);

    height: 3rem;
    width: 8rem;

    border: 5px solid black;
    border-radius: 8px;
    box-shadow: 4px 4px black;

}

#card-container {
    margin-top: 1rem;
    display: flex;
    gap: 20px;
    flex-direction: column;
}

.card {
    display: flex;
    flex-direction: column;
    gap: 5px;
    height: 14rem;
    padding: 1.0rem;
    color: rgb(255, 244, 224);
   
    line-height: 1.4;
    border: 5px solid rgb(0, 0, 0);
    border-radius: 8px;
    background: linear-gradient(270deg, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 70%);
    position: relative;
}

.card h1{
    text-decoration: underline;
}


.card a {
    height: 2rem;
    padding-left: 1rem;
    padding-right: 1rem;
    color: rgb(255, 244, 224);
    background-color: black;
    border: 3px solid rgb(255, 244, 224);
    border-radius: 8px;
}


.summary-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.summary-content a {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}

#button-container {
    display: flex;
    gap: 20px;
}


.card:nth-child(1){
    height: 100%;
    background-image: linear-gradient(270deg, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 25%), url(images/smartcards/smartcards_1.png);
    background-color: black;
    background-position: right;
    background-size: contain;
    background-repeat: no-repeat;
}

.card:nth-child(2){
    height: 100%;
    background-image: linear-gradient(270deg, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 25%), url(images/azul-app/azul-app3.png);
    background-color: black;
    background-position: right;
    background-size: contain;
    background-repeat: no-repeat;
}

.card:nth-child(3){
    height: 100%;
    background-image: linear-gradient(270deg, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 25%), url(images/space-invaders/title.jpg);
    background-color: black;
    background-position: right;
    background-size: contain;
    background-repeat: no-repeat;
}

.card:nth-child(4){
    justify-content: center;
    background-color: black;
    
}

.card:nth-child(4) h1{
    text-decoration: none;
}

#contact {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    width: 100%;
    padding-bottom: 10%;
    gap: 3rem;
}

#contact p {
    font-size: clamp(2.5dvw, 1.5dvw, 1.5rem);
}

footer {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 5%;
    min-height: 2.5rem;
    width: 100%;
    color: rgb(240, 235, 232);
    background-color: rgba(0, 0, 0, 0.8);
}

@media screen and (max-width: 700px) {
    #home #container {
        display: flex;
        flex-direction: column;
        gap: 5px;
        font-size: 1.2rem;
    }

    #hardskill img {
        height: 4rem;
        width: 4rem;
    }

    .card:nth-child(1){
        background-image: linear-gradient(270deg, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 30%), url(images/smartcards/smartcards_1.png);
    }
    
}

@media screen and (max-width: 550px) {
    section {
        height: 29.4rem;
        width: 115%;
    }
    main {
        gap: 18rem;
        height: auto;
        width: 100%;
        padding: 6rem 3rem 3rem 3rem;
    
    }

    #home #container {
        padding: 10px;
    }

    nav > ul, nav a {
        display: none;
    }

    nav {
        background-color: transparent;
        border-bottom: 0; 

    }

    nav img {
        display: unset;
        position: absolute;
        left: 90%;
        cursor: pointer;
    }

    [id=nav-phone-to-open] {
        display: unset;
    }

    [id=nav-phone-to-close] {
        display: none;
    }

   

    #home #container {
        display: flex;
        flex-direction: column;
        text-align: center;
        gap: 5px;
        font-size: 1.1rem;
    }

    #home h1, #home h2 {
        line-height: 25px;
    }

    #about {
        text-align: left;
    }

    #skill .section-title {
        position: absolute;
        left: 25%;
    }

    #hardskill {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(3, 1fr);
        }
        
        #div1 { grid-area: 1 / 1 / 2 / 2; }
        #div2 { grid-area: 1 / 2 / 2 / 3; }
        #div3 { grid-area: 2 / 1 / 3 / 2; }
        #div4 { grid-area: 2 / 2 / 3 / 3; }
        #div5 { grid-area: 3 / 1 / 4 / 3; }

    #hardskill img {
        height: 3rem;
        width: 3rem;
    }

    #hardskill p {
        font-size: 0.8rem;
    }

    #softskill {
        width: 110%;
        max-width: 110%;
        font-size: 1.1rem;
    }


    .card:nth-child(1){
        background-image: linear-gradient(270deg, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 70%), url(images/smartcards/smartcards_1.png);
    }

    .card:nth-child(2){
        background-image: linear-gradient(270deg, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 70%), url(images/azul-app/azul-app3.png);
    }

    .card:nth-child(3){
        background-image: linear-gradient(270deg, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 70%), url(images/space-invaders/title.jpg);
    }

    .button-container {
        display: flex;
        gap: 0.5rem;
    }

    .button-container a {
        font-size: 1rem;
    }
    
    .summary-content a {
        padding-top: 0.25rem;
        padding-bottom: 0rem;
    }

    

    #contact p {
        font-size: 5dvw;

    }
    
}


@keyframes home-card {
    from {
        transform: translateY(-300%);
    }

    to {
        transform: translateY(0%);
    }
    
}



@keyframes call-to-action-start {
    0% {
        transform: translateY(0%);
        opacity: 0;
        visibility: hidden;
    }

    50% {
        transform: translateY(-150%);
        opacity: 0;
    }

    51% {
        opacity: 1;
    }

    80% {
        transform: translateY(10%);
    }

    100% {
        transform: translateY(0%);
    }
    
}


@keyframes swing {
    0% {
        transform: rotate(0deg);
    }
    30% {
        transform: rotate(8deg);
    }
    40% {
        transform: rotate(-7deg);
    }

    50% {
        transform: rotate(3deg);
    }

    60% {
        transform: rotate(-2deg);
    }

    70% {
        transform: rotate(1deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

@keyframes fill {
    0% {
        transform: translateX(-100%);
        background-color: red;

    }
    99% {
        transform: translateX(0);

    }
    100% {
        background-color: rgb(46, 255, 46);

    }
    
}