* {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background: white;
    color: black;
    width: 100%;
}

header {
    position: fixed;
    background-color: white;
    top: 0px;
    width: 100%;
    z-index: 1000;
}

nav {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    margin: auto;
    top: 0;
    background-color: white;

}

nav ul {
    display: flex;
    justify-content: center;
    text-align: center;
    max-width: 100%;
}


nav ul li {
    display: inline-block;
    list-style: none;
    margin: 10px 20px;
    justify-content: center;
}

nav ul li a {
    color: black;
    text-decoration: none;
    font-size: 18px;
    position: relative;
    font-weight: bold;
}

nav ul li a::after {
    content: '';
    width: 0;
    height: 3px;
    background: black;
    position: absolute;
    left: 0;
    bottom: -6px;
    transition: 0s;
}

nav ul li a:hover::after {
    width: 100%;
}

.header-text {
    margin-top: 36%;
    font-size: 30px;
}


.header-text h1 span {
    color: #000080;
}

.container .profile-pic {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-top: 310px;
}

.container .profile-pic img {
    width: 500px;
    height: 500px;
    max-width: 100%;
    max-height: 100%;
    border-radius: 50%;
    margin-bottom: 50px;
}

.container .profile-pic p {
    font-size: 30px;
}

.container .profile-pic i {
    margin-top: 30px;
    font-size: 40px;
}

/*---------------Timelines------------*/

.timeline {
    position: relative;
    max-width: 1200px;
    margin: 100px auto;
    margin-top: 200px;
}

.box {
    padding: 10px 50px;
    position: relative;
    width: 50%;
    animation: movedown 1s linear forwards;
    opacity: 0;
}

#codingclubsmall {
    width: 70px;
    right: -35px;
}

#socialbookclubsmall {
    width: 60px;
}

@keyframes movedown {
    0% {
        opacity: 1;
        transform: translateY(-30px);
    }

    100% {
        opacity: 1;
        transform: translateY(0px);
    }
}

.timeline img:nth-child(1),
.box:nth-child(1) {
    animation-delay: 0s;
}

.box:nth-child(2),
.box:nth-child(2) {
    animation-delay: 1s;
}

.box:nth-child(3) .box:nth-child(3) {
    animation-delay: 2s;
}

.box:nth-child(4),
.box:nth-child(4) {
    animation-delay: 3s;
}

.box:nth-child(5),
.box:nth-child(5) {
    animation-delay: 4s;
}


.text-box {
    padding: 20px 30px;
    background: #E5E4E2;
    position: relative;
    border-radius: 6px;
    font-size: 15px;
}

.text-box p {
    margin-bottom: 10px;
}

.left-container {
    left: 0;
}

.right-container {
    left: 50%;
}

.box img {
    position: absolute;
    width: 50px;
    border-radius: 50%;
    right: -20px;
    top: 32px;
    z-index: 10;
}

.box .right-container {
    text-decoration: none;
    color: black;
}

.right-container img {
    left: -20px;
}

.timeline img {
    position: absolute;
    left: 50%;
    width: 50px;
    border-radius: 50%;
    z-index: 10;
    transform: translateX(-50%);
}

.timeline img:nth-child(1) {
    top: 185px;
}

.timeline img:nth-child(2) {
    top: 30px;
}

.timeline img:nth-child(3) {
    top: 340px;
}

.timeline img:nth-child(4) {
    top: 490px;
}

.timeline img:nth-child(5) {
    top: 650px;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 100%;
    background: black;
    top: 0;
    left: 50%;
    margin-left: -3px;
    z-index: -1;
    animation: moveline 6s linear forwards;
}

@keyframes moveline {
    0% {
        height: 0;
    }

    100% {
        height: 100%;
    }
}

.text-box h2 {
    font-weight: 600;
    display: inline-block;
    margin-bottom: 15px;
}

.left-container-arrow {
    height: 0;
    width: 0;
    position: absolute;
    top: 28px;
    z-index: 1;
    border-top: 15px solid transparent;
    border-bottom: 15px solid transparent;
    border-left: 15px solid #E5E4E2;
    right: -15px;

}

.right-container-arrow {
    height: 0;
    width: 0;
    position: absolute;
    top: 28px;
    z-index: 1;
    border-top: 15px solid transparent;
    border-bottom: 15px solid transparent;
    border-right: 15px solid #E5E4E2;
    left: -15px;

}


@media screen and (max-width: 600px) {

    .timeline {
        margin: 50px auto;
    }

    .timeline img {
        position: absolute;
        left: 8%;
        width: 50px;
        border-radius: 50%;
        z-index: 10;
        transform: translateX(-50%);
    }

    .timeline::after {
        left: 31px;
    }

    .box {
        width: 100%;
        padding-left: 80px;
        padding-right: 25px;
    }

    .text-box {
        font-size: 13px;
    }

    .text-box p {
        margin-bottom: 10px;
    }

    .right-container {
        left: 0;
    }

    .left-container img,
    .right-container img {
        left: 10px;
    }

    .left-container-arrow,
    .right-container-arrow {
        border-right: 15px solid #fff;
        border-left: 0;
        left: -15px;
    }

    #codingclubsmall {
        width: 70px;
    }


}

/*-----------------community, projects------------ */

#services {
    padding: 0px 0;
}

.services-list {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 50px;
    flex-wrap: wrap;
    gap: 200px;
}

#socialbookclub {
    width: 300px;
}

#codingclub {
    width: 350px;
}

.services-list div i {
    font-size: 50px;
}

.services-list h2 {
    font-size: 30px;
    font-weight: 500;
    margin-bottom: 15px;
    text-align: center;
}

.services-list a {
    text-decoration: none;
    color: black;
}

.services-list-project {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    margin-bottom: 60px;
    gap: 30px;
}



.services-list-project i {
    display: flex;
    justify-content: center;
    flex-direction: row;
    margin-bottom: 30px;
    font-size: 40px;
    /* Adjust the size of the icons */
}

.services-list-project img {
    display: block;
    margin-left: auto;
    margin-right: auto;
    justify-content: center;
    width: 300px;
    height: 300px;
    border-radius: 50%;
}


/* Why does it not hover? */

.services-list a img::after {
    content: '';
    width: 0;
    height: 3px;
    color: white;
    background: white;
    position: absolute;
    left: 0;
    bottom: -6px;
    transition: 0s;
}

.services-list img a:hover::after {
    width: 100%;
}

/* How do I make it flipping the page with a picture? */

.services-list a:hover {
    color: black;
    transform: translateY(-10px);
}

.services-list a:hover a {
    color: black;
}



#formvalidator {
    border: 2px solid black;
    border-radius: 50%;
    width: 300px;
}

#typewriterportfolio {
    border: 2px solid black;
    border-radius: 50%;
    width: 350px;
}

#unitconverter {
    border: 2px solid black;
    border-radius: 50%;
    width: 300px;
}

.iconwrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-left: auto;
    margin-right: auto;
    gap: 10px;
}

/*---------Books----------*/

#portfolio {
    padding: 50px 0;
}

.sub-title {
    margin-top: 100px;
    text-align: center;
    margin-bottom: 80px;
}

.work img {
    align-items: center;
}

.layer p {
    text-align: center;
}


/*----------Contact--------*/

.contact-h1 {
    text-align: center;
    margin-bottom: 10px;
    margin-top: 30px;
}

#contact .sub-title {
    text-align: center;
}

.row {
    text-align: center;
}

.contact-left {
    flex-basis: 100%;
    display: inline-block;
}

.sub-title h1 {
    text-align: center;
}

.contact-right {
    flex-basis: 60%;
}

.contact-left h1 {
    text-align: center;
}

.contact-left p {
    margin-top: 30px;
    text-align: center;
}

.contact-left p i {
    color: navy;
    margin-right: 15px;
    font-size: 25px;
    text-align: center;
}

.social-icons {
    margin-top: 30px;
}

.social-icons a {
    text-decoration: none;
    font-size: 30px;
    margin-right: 15px;
    color: #ababab;
    display: inline-block;
    transition: transform 0.5s;
}

.social-icons a:hover {
    color: navy;
    transform: translateY(-5px);
}

.btn.btn2 {
    display: inline-block;
    background: navy
}

.btn:hover {
    background: white;
    color: navy;
}

.contact-right form {
    width: 100%;
}

form input,
form textarea {
    width: 100%;
    border: 0;
    outline: none;
    background: grey;
    padding: 15px;
    margin: 15px 0;
    color: #fff;
    font-size: 18px;
}

form btn2 {
    padding: 14px 60px;
    font-size: 18px;
    margin-top: 20px;
    cursor: pointer;

}

.copyright {
    width: 100%;
    text-align: center;
    padding: 25px 0;
    background: grey;
    font-weight: 300;
    margin-top: 20px;
    color: white;
}

.copyright i {
    color: red;
}

@media only screen and (max-width: 600px) {

    header {
        position: fixed;
        background-color: white;
        top: 0px;
        width: 100%;
        z-index: 1000;
    }

    ul #sidemenu {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 100%;
        margin: auto;
        position: sticky;
        top: 0;
        background-color: white;
        z-index: 10;
    }

    nav ul {
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        margin-left: auto;
        margin-right: auto;
    }


    nav li {
        font-size: 2px;
        margin: 0;
    }

    nav ul li a {
        font-size: 10px;
    }

    .container .profile-pic img {
        width: 200px;
        height: 200px;
    }

    .container .profile-pic {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        margin-top: 180px;
    }

    .profile-pic h1 {
        font-size: 20px;
    }

    .profile-pic {
        margin-bottom: 130px;
    }

    .container .profile-pic p {
        font-size: 12px;
    }

    .services-list-project img {
        width: 200px;
        height: 200px;
    }

    .services-list {
        display: flex;
        justify-content: center;
        align-items: center;
        margin-top: 0px;
        flex-wrap: wrap;
        gap: 0px;
    }


    #socialbookclub {
        width: 200px;
        height: 200px;
    }

    #codingclub {
        margin-top: 25px;
        width: 250px;
        height: 250px;
    }

    .contact-left,
    .contact-right {
        flex-basis: 100%;
    }

    .copyright {
        font-size: 14px;

    }

    .iconwrapper {
        display: flex;
        justify-content: center;
        align-items: center;
        margin-left: auto;
        margin-right: auto;
        gap: 10px;
    }
}