*{
    margin: 0;
    padding: 0;
    font-family: monospace;
    /* background-color: black; */
}

/* Performance optimizations */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

/* Optimize animations for better performance */
.containerA, .containerB, .containerC, .containerD {
    will-change: transform, opacity;
}

/* Reduce repaints */
.amazingB, .fadeAlpha {
    transform: translateZ(0);
}
:root{
    --bwhite: white;
    --bblack: #333;
    --bdwhite: rgb(216, 216, 216);
    --bwriten: black;
    --bwritenb: white;
    --bcolor: black;
}

body{
    background: var(--bwhite);
    color: var(--bwriten);
    transition: background-color 0.5s ease;
}


#containerA{
    opacity: 0;
    width: 20%;
    /* border: 1px solid var(--bwhite); */
    background-color: var(--bblack);
    position: sticky;
    top: 63px;
    margin: auto;
    height: 400px;
    line-height: 1.8;
    padding: 20px;
    z-index: 1;
    /* animation: name duration timing-function delay iteration-count direction fill-mode; */
    animation: amazingA linear;
    -o-animation: amazingA linear;
    -moz-animation: amazingA linear;
    -webkit-animation: amazingA linear;
    animation-timeline: scroll();
    -o-animation-timeline: scroll();
    -moz-animation-timeline: scroll();
    -webkit-animation-timeline: scroll();
    animation-duration: 1ms;
    -moz-animation-duration: 1ms;
    -webkit-animation-duration: 1ms;
}
.containerA{
    /* border: 1px solid var(--bwhite); */
    background-color: var(--bblack);
    position: sticky;
    top: 63px;
    margin: auto;
    height: 400px;
    line-height: 1.8;
    padding: 20px;
    z-index: 1;
    opacity: 0;
    width: 20%;
    transition: opacity 2s linear,width 1s linear;
}
.amazingB {
    opacity: 1;
    width: 80%;
}



#downarrow{
    opacity: 1;
    animation: blink 1.4s infinite;
}

#containerAHead {
    color: var(--bblack);
    background-color: var(--bwhite);
    display: inline;
}
#paraA p{
    background-color: var(--bblack);
    font-size: 14.5px;
    color: var(--bwritenb);
}
#containerB{
    background-color: var(--bblack);
    margin: 20% 0px 0px 5%;
    display: inline-block;
    position: relative;
    z-index: 0;
    opacity: 0;
    animation: fadeB linear;
    -moz-animation: fadeB linear;
    -webkit-animation: fadeB linear;
    -o-animation: fadeB linear;
    animation-duration: 1ms;
    -webkit-animation-duration: 1ms;
    -o-animation-duration: 1ms;
    -moz-animation-duration: 1ms;
    animation-timeline: scroll();
    -o-animation-timeline: scroll();
    -moz-animation-timeline: scroll();
    -webkit-animation-timeline: scroll();
}
.containerB{
    background-color: var(--bblack);
    margin: 20% 0px 0px 5%;
    display: inline-block;
    position: relative;
    z-index: 2;
    opacity: 0;
    top: 250px;
    transition: opacity 2s linear;


}
@keyframes fadeB {
    10%{
        z-index: 2;
    }
    50%{
        opacity: 1;
        position: sticky;
        top: 250px;
        z-index: 2;
        
    }
    99%{
        opacity: 1;
        z-index: 2;
        position: sticky;
        top: 250px;

    }
    
    100%{
        z-index: 2;
        opacity: 1;
        position: sticky;
        top: 250px;
           
    }
}

#tablehead th{
    background-color: var(--bwhite);
    /* padding: 5px; */
    color: var(--bblack);
    border: 1px solid var(--bwhite);
}
.containerB .skills td{
    border: 1px solid var(--bwhite);
    padding: 9px;
    color: var(--bwritenb);
}
#containerC{
    background-color: var(--bblack);
    width: fit-content;
    position: relative;
    z-index: 0;
    opacity: 0;
    border: 1px solid red;
    margin: 20% auto 0px auto;
    animation: fadeC linear;
    -moz-animation: fadeC linear;
    -webkit-animation: fadeC linear;
    -o-animation: fadeC linear;
    animation-duration: 1ms;
    -webkit-animation-duration: 1ms;
    -o-animation-duration: 1ms;
    -moz-animation-duration: 1ms;
    animation-timeline: scroll();
    -o-animation-timeline: scroll();
    -moz-animation-timeline: scroll();
    -webkit-animation-timeline: scroll();
    /* animation-timeline: view(150px 0px); */
}
.containerC{
    background-color: var(--bblack);
    width: fit-content;
    position: relative;
    z-index: 2;
    opacity: 0;
    border: 1px solid red;
    margin: 20% auto 0px auto;
    top: 250px;
    transition: opacity 2s linear;

}


.containerC #headC{
    background-color: var(--bwhite);
    color: var(--bblack);
    text-align: center;
}
.containerC .projects .eleC a{
    color: rgb(207, 2, 207);
    text-decoration: none;
    display: block;
    padding: 5px;
}
.containerC .projects h3{
    color: var(--bwhite);
}
.containerC .projects .eleC{
    padding: 5px;
    display: inline-block;
    border: 1px solid var(--bwhite);
}
#containerD{
    margin: 20% 5% 0px auto;
    padding: 10px;
    background-color: var(--bdwhite);
    color: var(--bblack);
    width: fit-content;
    text-align: center;
    position: relative;
    z-index: 0;
    opacity: 0;
    animation: fadeC linear;
    -moz-animation: fadeC linear;
    -webkit-animation: fadeC linear;
    -o-animation: fadeC linear;
    animation-duration: 1ms;
    -webkit-animation-duration: 1ms;
    -o-animation-duration: 1ms;
    -moz-animation-duration: 1ms;
    animation-timeline: scroll();
    -o-animation-timeline: scroll();
    -moz-animation-timeline: scroll();
    -webkit-animation-timeline: scroll();
    }
.containerD{
    margin: 20% 5% 0px auto;
    padding: 10px;
    background-color: var(--bdwhite);
    color: var(--bblack);
    width: fit-content;
    text-align: center;
    position: relative;
    z-index: 2;
    opacity: 0;
    top: 250px;
    transition: opacity 2s linear;

}
.fadeAlpha{
    opacity: 1;
    position: sticky;
}


@keyframes amazingA {
    15%{
        opacity: 1;
    }

    100%{
        width: 80%;
        opacity: 1;

    }   
}

@keyframes fadeC {
    10%{
        z-index: 2;
        position: sticky;
        top: 250px;
    }
    50%{
        opacity: 1;
        position: sticky;
        top: 250px;
        z-index: 2;
        
    }
    99%{
        opacity: 1;
        z-index: 2;
        position: sticky;
        top: 250px;


    }
    
    100%{
        z-index: 2;
        opacity: 1;
        position: sticky;
        top: 250px;

        /* bottom: 119px; */
        /* position: fixed; */
           
    }
}
@keyframes blink{
    0%{
        opacity: 1;
    }

    100%{
        opacity: 0;
    }
} 
/* #containerA,#containerB,#containerC,#containerD{
    opacity: 1;
    animation: opazero linear;
    animation-timeline: scroll();
}
*/

#containerE{
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    margin: 15% 0px 1% 0px;
    
}
#containerE .headE h3{
    color: var(--bwhite);
}

.form-main {
    border: 1px solid grey;
    
    background-color: var(--bblack);
    color: var(--bwhite);
    padding: 40px;
    /* font-size: clamp(.5rem, 2vw, 1rem); */

}
.form-main form label {
    
    margin-bottom: 5px;
}

.form-main form input, .form-main form select {
    border: 1px solid #ccc;

    color: var(--bwhite);

}

.form-main form input[type="submit"] {
    background-color: var(--bblack);
    color: var(--bwhite);
    border: none;
    border-radius: 4px;
    padding: 5px 20px;
    cursor: pointer;
}

.form-main form input[type="submit"]:hover {
    background-color: var(--bwhite);
    color: red;
}

footer{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--bwhite);
}

@media screen and (max-width: 700px){
   body{
       background: linear-gradient(0deg, #000, #fff);
       background-size: 200% 200%;
       animation: gradientAnimation 5s ease infinite;

   }
   @keyframes gradientAnimation {
       0% {
           background-position: 0% 50%;
       }
       50% {
           background-position: 100% 50%;
       }
       100% {
           background-position: 0% 50%;
       }
   }
    main{
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
       
    }

    .containers{
        position: relative;
    }
    .containerA,#containerA{
        height: fit-content;
        position: relative;
        opacity: 1;
        transition: none;
        width: 70%;
        margin: 0;
        animation: none;
        /* padding: 0; */
    }
    .containerB,#containerB{
        height: fit-content;
        position: relative;
        opacity: 1;
        transition: none;
        margin: 0;
        animation: none;
        top: 80px;
        font-size: 2.4vw;
    }

    .containerC,#containerC{
        top: 100px;
        font-size: 2.7vw;
        position: relative;
        opacity: 1;
        transition: none;
        animation: none;
        margin: 10px;
        font-size: 2.3vw;
    }
    .containerD,#containerD{
        top: 100px;
        width: fit-content;
        position: relative;
        opacity: 1;
        transition: none;
        margin: 10px;
        animation: none;
    }
    #containerC .projects{
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
    }
    #containerE{
        top: 100px;
        flex-wrap: wrap;
    }
    #containerE form{
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }

}