* {

    margin: 0;
    padding: 0;
    box-sizing: border-box; 
    font-family: 'lato',sans-serif;
}

body{
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: url(../pictures/Home1.jpg) no-repeat;
    background-size: cover;
    overflow: hidden;
}
header{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 0px 10px; 
    background: rgba(255,255,255, .5);
    border: 2px 0px solid rgba(255,255,255, .5);
    border-radius: 0px;
    display: flex;
    justify-content: space-between;
    align-items: center ;
    z-index: 99;
}

.pic{
    height:70px;
    padding-left: 60px;
    padding-right: 0;
    padding-top: 12px;
  
}

.navigation a {
    position: relative;
    font-size: 1.1em;
    color: #000;
    text-decoration: none;
    font-weight: 500;
    margin-left: 2px;
    margin-right: 80px;
    gap: 2px;

}

nav a.active:before{
    position:absolute;
    content: " ";
    width:50%;
    height: 3px;
    border-bottom: 3px solid black;
    border-radius: 5px;
    bottom:-6px;
    
}
.navigation a::after{
    content:'';
    position: absolute;
    left: 0;
    bottom:-6px;
    width:50%;
    height: 3px;
    background: black;
    border-radius: 5px;
    transform-origin: right;
    transform:scaleX(0);
    transition: transform .5s;
}

.navigation a:hover::after{
    transform:scaleX(1);
    transform-origin: left;
}


/* Animation Part */

.container{
    width: 98%;
    overflow: hidden;
    margin-left: 8%;
}
.container .text{
    position: relative;
    color: #4070F4;
    font-size: 60px;
    font-weight: 600;
}
.container .text.first-text{
    color: #FFF;
}


/* first paragraph*/
.text.first-text:before{
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background-color: #010718;
    border-left: 2px solid #FFF;
    animation: animate 10s linear infinite;
}

@keyframes animate{
    0%{
        left: 100%; /* move from right to left */
    }
    100%{
        left: 0%; /* reset to starting position */
    }
}

  
/* second paragraph*/

.text.sec-text:before{
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background-color: #010718;
    border-left: 2px solid #4070F4;
    animation: animate 10s steps(12) infinite;
}
@keyframes animate{
    40%, 60%{
        left: calc(100% + 4px);
    }
    100%{
        left: 0%;
    }
}
 

/* resizing for different screen */

@media (max-width: 576px) {
    header {
        flex-direction: column;
        padding: 5px;
    }
    nav{
        display: flex;
        gap: 10px;
        flex-direction: row;
    }
    
    .pic {
        height: 40px;
        padding: 0;
        margin-left: 0px;
    }
    
    .navigation a {
        margin-left: 5px;
        margin-right: 0;
        margin-top: 10px;
    }
    
    nav a.active:before {
        bottom: -8px;
    }
    
    .container {
        margin-left: 0;
    }
    
    .container .text {
        font-size: 40px;
    }
    
    .text.first-text:before {
        border-left: none;
        border-top: 2px solid #FFF;
        animation: animate2 10s linear infinite;
    }
    
    .text.sec-text:before {
        border-left: none;
        border-top: 2px solid #4070F4;
        animation: animate2 10s steps(12) infinite;
    }
    
    @keyframes animate2 {
        0% {
            top: 100%;
        }
        100% {
            top: 0%;
        }
    }
}
