@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&family=Rubik:ital,wght@0,300..900;1,300..900&display=swap');

:root {
    --main-color: #222831;
    --second-color: #31363F;
    --third-color: #535b69;
    --white-color: #EEEEEE;

    --detail-color: #0B60B0;
  }

html{
    scroll-behavior:smooth
}

body {
    background-color: var(--main-color);
    color: #EEEEEE;
    font-family: "Rubik", sans-serif , "Arial";
    margin: 0px;
}

*::-webkit-scrollbar {
    width: 12px;
}

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

*::-webkit-scrollbar-thumb {
    border-radius: 8px;
    background-color: var(--detail-color);
}

a:link {
    color: var(--white-color);
}

a:visited {
    color: var(--white-color);
}

header{
    position: fixed;
    display: flex;
    background-color: var(--second-color);
    left: 20px;
    top: 20px;
    border: 2px solid var(--main-color);
    border-radius: 20px;
    padding: 0px 20px 0px 20px;
    z-index: 1;
}
header > a {
    padding: 10px;
    text-decoration: none;
    transition: all 0.1s ease-out;
}

header > a:hover {
    color: white;
}

#menu {
    display: none;
    background-color: unset;
    border: none;
    padding: 2px 10px 2px 10px;
}

#menu > img {
    width: 40px;
}

#home {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    justify-content: space-between;
    height: 100vh;
}

#home > div {
    display: flex;
    align-items: center;
    justify-content: center;
}

#home > div:nth-child(2){
    width: 100%;
}

#infos {
    font-weight: 600;
    margin: 4vw;
}

#infos > p {
    margin: 0px; 
    line-height: 4.5vw;
}

#infos > p:nth-child(1){
    font-size: 7vw;
}
#infos > p:nth-child(2){
    font-size: 2.5vw;
    text-indent: 0.2vw;
    color: #535b69;
}

#home > div > img {
    width: 30vw;
    border-radius: 100%;
}

.topics {
    margin: 20px;
    margin-bottom: 150px;
}

.topics::before {
    content: "";
    display: block;
    height: 60px;
    margin-top: -60px;
    visibility: hidden;
}

#aboutme > p {
    margin: 0px 10px 0px 10px;
}

.subheading {
    font-size: 2em;
    font-weight: 500;
    margin: 0px 0px 0px 10px;
}
#aboutme > p:nth-child(3) {
    font-size: 1.2em;
    text-align: justify;
}

hr {
    border-color: var(--third-color);
    border-style: solid;
}

#skills > div {
    display: flex;
    flex-wrap: wrap;
    box-sizing: border-box;
    gap: 10px;
    width: 100%;
    padding: 10px;
}

.skill{
    position: relative;
    background-color: var(--detail-color);
}

.skill > img {
    width: 120px;
    height: 120px;
    transition: all 0.1s ease-out;
}

.skill > p {
    position: absolute;
    filter: opacity(0%);
    margin: 0px;
    left: 3px;
    top: 2px;
    transition: all 0.1s ease-out;
}

.skill:hover > img{
    filter: brightness(25%);
}

.skill:hover > p{
    filter: opacity(100%);
}

#projects > a {
    float: right;
    margin-top: 20px;
}

#projects > div {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px;
}

.project {
    position: relative;
    background-color: var(--detail-color);
}

.project > img{
    width: 40vw;
    aspect-ratio: 40/24;
    min-width: 410px;
    object-fit: cover;
    filter: brightness(25%);
    transition: all 0.3s ease-out;
}

.project > p {
    position: absolute;
    left: 50%;
    top: 40%;
    transform: translate(-50%,-50%);
    font-size: 2em;
    font-weight: 600;
    text-wrap: nowrap;
    transition: all 0.3s ease-out;
}

.project:hover {
    cursor: pointer;
}

.project:hover > img {
    filter: brightness(100%);
}

.project:hover > p {
    filter: opacity(0%);
}

#contacts > div {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: left;
    margin: 20px;
}

#contacts img {
    background-color: var(--second-color);
    width: 70px;
    border: 10px solid var(--second-color);
    border-radius: 10px;
    margin-right: 10px;
}

#contacts a {
    flex-basis: calc(50% - 10px);
    min-width: 310px;
    text-decoration: none;
    transition: all 0.1s ease-out;
}

#contacts a:hover {
    background-color: #31363F;
    border-radius: 10px;
    cursor: pointer;
}

#contacts table p {
    margin: 0px;
    font-size: 1.3em;
}

#contacts table td > p:nth-child(2) {
    color: var(--third-color);
}


.menuOn{
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    left: 0px;
    top: 0px;
    border: none;
    border-radius: 0px;
    padding: 0px;
    overflow-y: auto;
}
.menuOn > a {
    display: block;
    font-size: 13vw;
}

.menuOn > button {
    display: none;
}

.allProjects {
    background-color: var(--second-color);
    width: 80vw;
    font-size: 1.3em;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    display: none;
    padding: 20px 0px 20px 0px;
}

.allProjects:hover {
    cursor: pointer;
    filter: brightness(120%);
}


@media (orientation: portrait) {
    header {
        padding: 0px;
    }

    header:not(.menuOn) > a {
        display: none;
    }

    header:not(.menuOn) > #menu {
        display: block;
    }

    #home {
        flex-direction: column-reverse;
        height: auto;
        gap:  30px;
        margin: 50px;
    }

    #home > div > img {
        width: 80%;
    }

    #infos > p {
        line-height: 9vw;
    }

    #infos > p:nth-child(1){
        font-size: 15vw;
    }
    #infos > p:nth-child(2){
        font-size: 6.2vw;
    }

    .project > img{
        width: 80vw;
        min-width: 0;
    }

    .project > p {
        font-size: 6vw;
        font-weight: 600;
    }

    #projects > a {
        display: none;
    }
    
    .allProjects {
        display: block;
    }
}