/* The variables of colors */
:root {
    --dark:rgb(59, 59, 121);
    --light:rgb(117, 230, 236);
    --gray:rgb(235, 230, 230);
    --black:black;
    --background:rgb(202, 230, 241);
}

* {
    margin:0;
    padding:0;
    box-sizing:boder-box;
    font-family:'Segoe UI', Tahoma, Geneva, Verdana, sans-serif
}

body{
    background-color:var(--gray);
}

header {
    background-color:rgb(73, 69, 69);
    padding:5px 0;
    display:flex;
    justify-content:space-between;
    align-items:center;
    flex-direction:row;
    flex-wrap: wrap;   
}

/* For name */
h1 {   
    font-family:Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;
    font-size:40px;
    font-weight:bold;
    color:var(--dark);
    background-color:var(--light);
    padding: 5px 1% 5px 5%;   
    margin-right: 5px 30px;
}  

/* For "About Me" "Work" "Contact Me" */
h2 {
    flex:0 0 20%;
    text-align:right;
    font-size:4vw;
    color:var(--dark);
    margin-right:20px;
}

/* For five projects title */
h3{
   position:absolute;
   bottom:0;
   left:0; 
   border:20px solid var(--light);
   background-color:var(--light);
}

/* Styling <nav> part */
nav ul{
    margin: 10px 5px;   
}

nav ul li {
    font-size:20px;
    font-weight:bold;
    display:inline-block;
    justify-content:space-between;
    margin:15px;
    text-decoration: underline;
}

nav ul li a{
    color:var(--light);
}

/* For styling the effection when the cursor hover the navigation bar */
nav ul li :hover{
    background-color:var(--light);
    color:var(--dark);
    font-size:120%;
    cursor:grab;
}

/* For styling three main parts in HTML */
section {
    margin:30px 50px;
    display:flex;
    justify-content: flex-start
}

/* For styling all the links */
a{
    text-decoration:none;
    color:var(--black);
}

/* For styling the tools using for each projects*/
span{
    position:absolute;
    bottom:0;
    left:30px;
}

div{
    border-left:5px solid var(--dark);
    display:block;  
}

p{
    color:var(--dark);
    margin:20px 20px;
}

.background-img {
    height: 300px;
    width: 100%;
    background-image:url('../image/Background.jpg');
    background-color:var(--background);
    background-size:contain;
    background-repeat: no-repeat;
    background-position:center;
}

/* For styling each link under class "projects" */
.projects a > *{
    position:relative;
    text-align:center;
    display:flex;
    border:5px solid var(--light);
    margin:20px; 
    filter:brightness(70%)      
}

/* For styling the cursor hover the 5 projects parts */
.projects a :hover{
   cursor:pointer;   
   filter:brightness(100%);
}

.project-one figure img{
    width:100%;
    height:20vw; 
}

/* For styling the last four projects */
.flex-item{
    display:flex;
    flex-direction:row;
    justify-content: space-between;
    margin:5px;
}

.flex-item img{
    width:100%;
    height:auto;
}

.contact-me div ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
}

.contact-me div ul li{
    list-style-type: none;
    color:var(--black);
    border-bottom: 3px solid var(--dark);  
    margin:4vw;
    height:100%;  
    font-size: 1.5vw; 
}

.contact-me div ul :hover{
    cursor:grab;
    background-color: var(--light);
    font-size:25px;
}

/* For presenting a responsive layout that adapts different device screens */
@media screen and (max-width:980px){
    header{
        justify-content: center;
        text-align:center;  
    }

    nav ul{
        display:flex;
        flex-direction:column;
        justify-content:center;
        text-align:left;
        margin-left:25px;
    }

    section{
        display:block;
    }

    h2{
        font-size: 5vw;
        border-bottom: 5px solid var(--dark);
    }

    div{
        border-left:none;
    }

    .flex-item{
        display:block;
    }

    .flex-item img{
        width:100%;
        height:20vw;
    }

    .contact-me ul{
        display:block;
        text-align:right;
    }
    
    .contact-me ul li{
        font-size:4vw;
    }
}
