/* GLOBAL */
*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,body{
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    font-family: 'Oswald', sans-serif;
    font-size: 62.5%; /* Equal 10px, =10/16 */
    color: black;
    background-color: #302e2e;
}
@media screen and (min-device-width: 150px) and (max-device-width: 768px) {
    html,body {
        background-color: #1f004d;
        width: 100%;
    }
}

/* HEADER */
header{
    width: 80%;
    height: 10rem;
    margin: 2rem auto 0 auto;
    background-color:darkslateblue;
    color:aliceblue;
    border-top-left-radius: 1rem;
    border-top-right-radius: 1rem;
}
@media screen and (min-device-width: 150px) and (max-device-width: 768px) {
    header{
    height: 5rem;
}
}

header .banner{
    font-size: 3rem;
    line-height: 10rem;
    text-transform: uppercase;
    font-weight: 700;
    white-space: nowrap;
    display: flex;
    justify-content: center;
}
@media screen and (min-device-width: 150px) and (max-device-width: 768px) {
        header .banner{
        font-size: 0.8rem;
        line-height: 5rem;
    }
}

header .banner h1{
    letter-spacing: 0.5rem;
    overflow: hidden;
    width: max-content;
    border-right: 1rem solid aliceblue;
    animation: headtext 2.5s steps(23) 1,
    typing 1s steps(2) infinite;
    /* Thay linear bằng step(n) với n là số bước cần animate. */
    /* Ở typing: step(2) tức là đi từ 0% tới 100% luôn */
    /* Ở headertext: step(23) tức là đi qua từng ký tự của chuỗi text trên */
}

/* Tạo hiệu ứng nhấp nháy trỏ chuột như đang typing */
@keyframes typing{
    from{
        border-color: transparent;
    }to{
        border-color: aliceblue;
    }
}

@keyframes headtext {
    from{
        width: 0;
    }to{
        width: 55%;
        /* 60% là vừa tới hết chữ, thay đổi theo ngữ cảnh */
    }
}

.item_img{
    position: relative;
}

h4{
    position: absolute;
    top: 20%;
    left:20%;
    padding: 0 auto;
    font-size: 30px;
    font-weight: bold;
    color: whitesmoke;
    text-shadow: 2px 2px gray;
}

.title__underline{
    width: 50rem;
    max-width: 80%;
    height: 0.2rem;
    background-color: gray;
    opacity: 0.3;
    margin: 0 auto 3rem auto;
    border-radius: 1rem;
}

/* NUMBER */
.number{
    width: 80%;
    margin: 0 auto;
    background-color: black;
    color: white;
}

.number__container{
    width: 90%;
    height: 20rem;
    margin: 0 auto;
    padding: 15px 0;
    display: flex;
    justify-content: center;
    align-items: center;
}
@media screen and (max-device-width: 991.98px) {
    .number__container{
        width: 100%;
        height: max-content;
    }
}
@media screen and (min-device-width: 150px) and (max-device-width: 768px) {
    .number__container{
        flex-wrap: wrap;
        height: max-content;
    }
}

.number__list{
    width: 35rem;
    height: 50%;
    text-align: center;
}

.number__list h2{
    font-size: 4rem;
    font-weight: 300;
}
@media screen and (min-device-width: 150px) and (max-device-width: 768px) {
    .number__list h2{
    font-size: 2rem;
}
}

.number__list p{
    text-transform: uppercase;
    font-size: 2rem;
    color: #888888;
}
@media screen and (min-device-width: 150px) and (max-device-width: 768px) {
    .number__list p{
    font-size: 1rem;
}
}

/* PROJECTS */
.projects{
    width: 80%;
    margin: 0 auto;
    padding: 2rem 0;
    background-color: #F3F3F3;
}

.projects__title{
    color: white;
    width: 90%;
    margin: auto;
    text-align: center;
}

.projects__title h1{
    font-size: 2.5rem;
    color: #47476b;
    font-weight: 800;
    padding: 3rem 0 0.1rem 0;
    text-transform: uppercase;
}
@media screen and (min-device-width: 150px) and (max-device-width: 768px) {
    .projects__title h1{
    font-size: 1.5rem;
}
}

.projects__list{    
    width: 90%;
    margin: auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    gap: 2rem;
}
@media screen and (min-device-width: 150px) and (max-device-width: 768px) {
    .projects__list{
    font-size: 1.5rem;
    justify-content: center;
}
}

.projects__list img{
    width: 20rem;
    height: 35rem;
    display: block; /* để khắc phục khoảng hở bên dưới hình khi thêm text bên trên trong phần overlay */
    background-position: center;
    object-fit: cover; /* để sửa lại hình không bị méo, giống background-size: cover */
    filter: grayscale(50%) contrast(50%);
}

.projects__item{
    position: relative;
}

.item__overlay{
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background-color: rgba(51, 204, 255, 0.6);
    opacity: 0;
    transition: all 0.5s;
}

.item__overlay:hover{
    opacity: 1;
}

.item__overlay .search{
    font-size: 2rem;
    color: black;
    width: 3.5rem;
    height: 3.5rem;
    background-color: white;
    border-radius: 5px;
    cursor: pointer;
    position: absolute;
    top: 8rem;
    right: 3rem;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.5s;
    /* z-index: -1;  */
    /* z-index: Di chuyển phần này xuống dưới hình, số càng thấp sẽ nằm dưới */
}

.item__overlay .search:hover i{
    background-color: #007399;
    color: white;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.projects__item:hover .search{
    top: 30px;
}

.projects__item:hover .overlay__title{
    bottom: 30px;
    opacity: 1;
    z-index: 1;
}

.overlay__title{
    color: white;
    position: absolute;
    left: 30px;
    bottom: 0;
    transition: all 0.5s;
}

.overlay__title p:first-child{
    color: black;
    font-size: 2rem;
}

.overlay__title p:nth-child(2){
    font-weight: 600;
    font-size: 2rem;
}

.overlay__title a{
    text-decoration: none;
    color: white;
}

/* CAPSTONE */
.capstone{
    width: 80%;
    margin: 0 auto;
    padding: 2rem 0;
    background-color: #F3F3F3;
}

.capstone__title{
    color: white;
    width: 90%;
    margin: auto;
    text-align: center;
}

.capstone__title h1{
    font-size: 2.5rem;
    color:#47476b;
    font-weight: 800;
    padding: 3rem 0 0.1rem 0;
    text-transform: uppercase;
}
@media screen and (min-device-width: 150px) and (max-device-width: 768px) {
    .capstone__title h1{
    font-size: 1.5rem;
    justify-content: center;
}
}

.capstone__list{    
    width: 90%;
    margin: auto;
    display: flex;
    justify-content: space-around;
    gap: 2rem;
}
@media screen and (min-device-width: 150px) and (max-device-width: 768px) {
    .capstone__list{
    font-size: 1.5rem;
    justify-content: center;
}
}

.capstone__list img{
    width: 20rem;
    height: 30rem;
    display: block; /* để khắc phục khoảng hở bên dưới hình khi thêm text bên trên trong phần overlay */
    background-position: center;
    object-fit: cover; /* để sửa lại hình không bị méo, giống background-size: cover */
    filter: grayscale(50%) contrast(50%);
}

.capstone__item{
    position: relative;
}

.capstone__item:hover .search{
    top: 30px;
}

.capstone__item:hover .overlay__title{
    bottom: 30px;
    opacity: 1;
    z-index: 1;
}

.item__overlay-3{
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background-color: rgba(96, 231, 84, 0.658);
    opacity: 0;
    transition: all 0.5s;
}

.item__overlay-3:hover{
    opacity: 1;
}

.item__overlay-3 .search{
    font-size: 2rem;
    color: black;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 5px;
    background-color: white;
    cursor: pointer;
    position: absolute;
    top: 8rem;
    right: 3rem;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.5s;
    /* z-index: -1;  */
    /* z-index: Di chuyển phần này xuống dưới hình, số càng thấp sẽ nằm dưới */
}

.item__overlay-3 .search:hover i{
    background-color: #1b9403;
    color: white;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* NOMADMAN */
.nomadman{
    width: 80%;
    margin: 0 auto;
    padding: 2rem 0;
    background-color: #F3F3F3;
}

.nomadman__title{
    color: white;
    width: 90%;
    margin: auto;
    text-align: center;
}

.nomadman__title h1{
    font-size: 2.5rem;
    color:#47476b;
    font-weight: 800;
    padding: 3rem 0 0.1rem 0;
    text-transform: uppercase;
}
@media screen and (min-device-width: 150px) and (max-device-width: 768px) {
    .nomadman__title h1{
    font-size: 1.5rem;
    justify-content: center;
}
}

.nomadman__list{    
    width: 90%;
    margin: auto;
    display: flex;
    justify-content: space-around;
    gap: 2rem;
}
@media screen and (min-device-width: 150px) and (max-device-width: 768px) {
    .nomadman__list{
    font-size: 1.5rem;
    justify-content: center;
}
}

.nomadman__list img{
    width: 20rem;
    height: 30rem;
    display: block; /* để khắc phục khoảng hở bên dưới hình khi thêm text bên trên trong phần overlay */
    background-position: center;
    object-fit: cover; /* để sửa lại hình không bị méo, giống background-size: cover */
    filter: grayscale(50%) contrast(50%);
}

.nomadman__item{
    position: relative;
}

.nomadman__item:hover .search{
    top: 30px;
}

.nomadman__item:hover .overlay__title{
    bottom: 30px;
    opacity: 1;
    z-index: 1;
}

.item__overlay-4{
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background-color: rgba(96, 231, 84, 0.658);
    opacity: 0;
    transition: all 0.5s;
}

.item__overlay-4:hover{
    opacity: 1;
}

.item__overlay-4 .search{
    font-size: 2rem;
    color: black;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 5px;
    background-color: white;
    cursor: pointer;
    position: absolute;
    top: 8rem;
    right: 3rem;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.5s;
    /* z-index: -1;  */
    /* z-index: Di chuyển phần này xuống dưới hình, số càng thấp sẽ nằm dưới */
}

.item__overlay-4 .search:hover i{
    background-color: #1b9403;
    color: white;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* JAVASCRIPT */
.learning{
    width: 80%;
    margin: 0 auto;
    padding: 2rem 0;
    background-color: #F3F3F3;
}

.learning__title{
    color: white;
    width: 90%;
    margin: auto;
    text-align: center;
}

.learning__title h1{
    font-size: 2.5rem;
    color:#47476b;
    font-weight: 800;
    padding: 3rem 0 0.1rem 0;
    text-transform: uppercase;
}
@media screen and (min-device-width: 150px) and (max-device-width: 768px) {
    .learning__title h1{
    font-size: 1.5rem;
    justify-content: center;
}
}

.learning__list{    
    width: 90%;
    margin: auto;
    display: flex;
    justify-content: space-around;
    gap: 2rem;
}
@media screen and (min-device-width: 150px) and (max-device-width: 768px) {
    .learning__list{
    font-size: 1.5rem;
    justify-content: center;
}
}

.learning__list img{
    width: 20rem;
    height: 30rem;
    display: block; /* để khắc phục khoảng hở bên dưới hình khi thêm text bên trên trong phần overlay */
    background-position: center;
    object-fit: cover; /* để sửa lại hình không bị méo, giống background-size: cover */
    filter: grayscale(50%) contrast(50%);
}

.learning__item{
    position: relative;
}

.learning__item:hover .search{
    top: 30px;
}

.learning__item:hover .overlay__title{
    bottom: 30px;
    opacity: 1;
    z-index: 1;
}

.item__overlay-2{
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background-color: rgba(204, 153, 255, 0.6);
    opacity: 0;
    transition: all 0.5s;
}

.item__overlay-2:hover{
    opacity: 1;
}

.item__overlay-2 .search{
    font-size: 2rem;
    color: black;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 5px;
    background-color: white;
    cursor: pointer;
    position: absolute;
    top: 8rem;
    right: 3rem;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.5s;
    /* z-index: -1;  */
    /* z-index: Di chuyển phần này xuống dưới hình, số càng thấp sẽ nằm dưới */
}

.item__overlay-2 .search:hover i{
    background-color: #6600cc;
    color: white;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* JAVASCRIPT */
.javascript{
    width: 80%;
    margin: 0 auto;
    padding: 2rem 0;
    background-color: #F3F3F3;
}

.javascript__title{
    color: white;
    width: 90%;
    margin: auto;
    text-align: center;
}

.javascript__title h1{
    font-size: 2.5rem;
    color:#47476b;
    font-weight: 800;
    padding: 3rem 0 0.1rem 0;
    text-transform: uppercase;
}
@media screen and (min-device-width: 150px) and (max-device-width: 768px) {
    .javascript__title h1{
    font-size: 1.5rem;
    justify-content: center;
}
}

.javascript__list{    
    width: 90%;
    margin: auto;
    display: flex;
    justify-content: space-evenly;
    gap: 2rem;
}

.javascript__list a{    
    font-size: 20px;
    text-decoration: none;
}

.javascript__list li{    
    list-style: none;
    float: left;
    width: 33.33%;
}
@media screen and (max-device-width: 991.98px) {
    .javascript__list a{    
        font-size: 20px;
        text-decoration: none;
    }
    .javascript__list li{    
        list-style: none;
        float: left;
        width: 50%;
    }
}
@media screen and (min-device-width: 150px) and (max-device-width: 768px) {
    .javascript__list{
    font-size: 1.5rem;
    justify-content: center;
    }
    .javascript__list a{    
        font-size: 18px;
        text-align: center;
        text-decoration: none;
    }
    .javascript__list li{    
        list-style: none;
        float: left;
        width: 100%;
    }
}

/* FOOTER */
footer{
    width: 80%;
    height: 10rem;
    text-align: center;
    margin: 0 auto 2rem auto;
    background-color:darkslateblue;
    color:aliceblue;
    border-bottom-left-radius: 1rem;
    border-bottom-right-radius: 1rem;
}

footer p{
    font-size: 2rem;
    line-height: 10rem;
}
@media screen and (min-device-width: 150px) and (max-device-width: 768px) {
    footer p{
    font-size: 1.5rem;
}
}