:root {
    --size-in-px: calc(96px * 6);
    --size-in-px-2: calc(96px * 5);
    --size-in-px-3: calc(96px * 4);
}
.pixel-art {
    image-rendering: pixelated;
}

/*
When changing Mega Man size, it has to be done in two different places:
--size-in-px
@keyframes moveSpriteSheet
*/
* {
    margin: 0px;
}
@font-face {
    font-family: 'megaman';
    src: url(fonts/megaman-copy.ttf);
}
@font-face {
    font-family: 'press-start';
    src: url(fonts/press-startk.ttf);
}
body {
    background-color: #02EFEE;
}
.text {
    font-family: press-start;
    color: black;
}
.brown {
    color: brown;
}
.white {
    color: white;
}
p {
    margin-bottom: 20px;
}
a {
    text-decoration: none;
    color: black;
    font-family: press-start;
}
.hidden {
    display: none;
}
a:hover {
    cursor: pointer;
    cursor: url('images/assets/icon/buster-with-bar.svg') 22 13, auto;
}
a:active {
    cursor: url('images/assets/icon/buster-shooting.svg') 38 13, auto;
}




/********** HEADER */
#header-wrapper {
}
header {
    background-color: #E7FAFA;
    border-bottom: 10px solid #0400f8;
    padding: 30px 0 25px 15px;
}
h1 a {
    font-family: megaman;
    font-size: 40px;
    color: #0400f8;
    padding-bottom: 20px;
}
header h2 {
    font-size: 24px;
    padding-top: .6em;
}








/**********  HOME PAGE */
#home {
    width: 100%;
    display: flex;
    flex-direction: row-reverse;
    justify-content: space-evenly;
    padding-top: 10px;
}




/**********  START OF MEGA MAN */

#robot-container {
    /*    96px * 4 frames = 384px    */
    /* background-color: rgba(128, 128, 128, 0.33); */
    width: var(--size-in-px);
    padding-top: 80px;
    overflow: hidden;
    /* the entire sprite sheet is still there, it's just hidden and only showing the currently selected sprite */
}

/* animation: name, duration, timing-function, delay, iteration-count, direction, fill-mode, play-state, timeline */
#spritesheet {
    /* background-color: rgba(128, 128, 128, 0.381); */
}

.blinking {
    animation: blinkAnimation 4s steps(3) infinite;
    width: calc(var(--size-in-px) * 4);
}
.hit {
    animation: hitAnimation .5s steps(7) 1 forwards;
    width: calc(var(--size-in-px) * 8);
}

@keyframes blinkAnimation {
    /* sprite sheet animation begins at number of frames, minus 1 frame that it begins with */
    /* 4 frames - 1 = 3 frames */
    /* 3 frames * 96px(size of frame) = 288px */
    /* translate3d(-288px,0,0) */

    0% {
        /* this has to be changed manually */
        transform: translate3d(calc(var(--size-in-px) * 3 * -1), 0, 0); /* -1728px */
    }
    10% {
        transform: translate3d(0, 0, 0);
    }
}
@keyframes hitAnimation {
    0% {
        transform: translate3d(0, 0, 0);
    }
    100% {
        transform: translate3d(calc(var(--size-in-px) * 7 * -1), 0, 0);
    }
}



/**********  END OF MEGA MAN */









/**********  START OF NAV */
#nav-container {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: space-around;
    width: 50%;
    height: 100%;
}
nav {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: white;
    border-radius: 15em;
    width: 80%;
    padding: 5% 6% 3%;
}

/* 
    each .dialogue will start with no visibility
    when the .typed class is applied, it receives visibility
    the .typed class will also apply the animation
*/
#nav-prompt {
    display: inline-block;
    font-size: 1em;
    text-align: center;
    line-height: 1.8em;
    padding-bottom: 30px;
    text-transform: uppercase;
}
.dialogue {
    visibility: hidden;
}
.typed {
    visibility: visible;
    overflow: hidden;
    white-space: nowrap;
    width: 0;
    animation: typing 1.5s steps(30, end) forwards;
}
@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}


#line1 {
    padding: 0 10px;
}
#line2 {
}
#line3 {
}
#line4 {
    margin-top: 10px;
}

nav ul {
    list-style-type: none;
    text-align: center;
    padding-inline-start: 0;
}
nav li {
    line-height: 2.4em;
}


#bubble-pointer {
    position: absolute;
    width: 150px;
    height: 150px;
    background-color: white;
    border-radius: 100%;
    left: 15%;
    bottom: -10%;
    z-index: -1;
}
/* create a pseudo-element to mask the left side */
#bubble-pointer::after {
    content: "";
    display: inline-block;
    width: 150px;
    height: 150px;
    background-color: #02EFEE;
    position: absolute;
    border-radius: 40%;
    left: -40%;
    z-index: -2;
    bottom: -10px;

}
#bubble-pointer.negativeSpace::after {
    animation: robotClick .1s;
}
/**********  END OF NAV */















/**********  START OF MAIN */

main {
    display: flex;
    flex-direction: column;
    line-height: 2em;
    margin: 80px 8%;
}
main h3 {
    color: #0400f8;
    text-align: center;
    margin-bottom: 60px;
}
main h4 {
    color: #0400f8;
}


#about-me {
    display: none;
    grid-template-columns: 40% 60%;
    grid-template-rows: 1fr;
}
#my-pic {
    float: right;
    width: 30%;
    border: 3px solid #0400f8;
    border-radius: 10px;
    box-shadow: 5px 10px 20px;
    margin: 0 0 10px 10px;
}



/* -------------------------------------- */
/* start of PROJECTS */
#projects {
    display: none;
    margin-right: 10%;
    margin-left: 10%;
}

#projects {
    text-align: right;
}
.project {
    margin-bottom: 60px;
}
.project img {
    width: 60%;
    border: 3px solid #0400f8;
    box-sizing: border-box;
    border-radius: 10px;
    box-shadow: 5px 10px 20px;
}
.project:first-of-type {
    margin-top: 100px;
}
.project:nth-child(odd) {
    text-align: left;
}
.project .title {
    color: brown;
    margin-bottom: 10px;
}
.project .description {
    margin: 10px 0;
    margin-top: 10px;
}
.project a {
    position: relative;
}
.project a .work-in-progress-icon {
    width: 80px;
    border: none;
    box-shadow: none;
    position: absolute;
    bottom: -30px;
    right: -15px;
}


/* -------------------------------------- */



#skills {
    margin-left: 5%;
    display: none;
}

#cyber {
    text-align: center;
    margin: auto;
}
#cyber h3 {
    margin-bottom: 80px;
}
#cyber img {
    width: 100%;
    margin-bottom: 80px;
}

#cyber-img-small {
    display: none;
}

#my-pic {
    float: right;
    width: 30%;
    border: 3px solid #0400f8;
    border-radius: 10px;
    box-shadow: 5px 10px 20px;
    margin: 0 0 10px 10px;
}

#cyber-documentations {
    margin-top: 100px;
}
#cyber-documentations h4 {
    margin-bottom: 50px;
}
.cyber-docs-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}
.cyber-papers-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
}
.cyber-doc {
    display: flex;
    flex-direction: column;
    width: 45%;
}
.cyber-doc .title {
    color: brown;
}
.cyber-doc .description {
}
.cyber-doc .doc-img-anchor {

}







/**********  END OF MAIN */

footer {
    display: grid;
    background-color: #0001cb;
    border-top: 3px solid white;
    text-align: center;
    padding-top: 20px;
    padding-bottom: 20px;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: 1fr 1fr;

    margin-top: 100px;
}
footer h2 {
    color: white;
    padding-bottom: 30px;
    grid-column: 2 / 3;
    grid-row: 1 / 2;
}


#footer1 {
    grid-column: 1 / 2;
    grid-row: 2 / 3;
}
#footer2 {
    grid-column: 2 / 3;
    grid-row: 2 / 3;
}
#footer3 {
    grid-column: 3 / 4;
    grid-row: 2 / 3;
}


@media only screen and (max-width: 1100px) {
    .blinking {
        animation: blinkAnimation1100 5s steps(3) infinite;
        width: calc(var(--size-in-px-2) * 4);
    }
    .hit {
        animation: hitAnimation1100 .5s steps(7) 1 forwards;
        width: calc(var(--size-in-px-2) * 8);
    }
    nav {
        font-size: .9em;
    }
    #nav-prompt {
        margin-bottom: 6%;
        padding: 2% 8% 0; 
    }
    #robot-container {
        display: flex;
        padding-top: 100px;
        width: var(--size-in-px-2) /* 480px */
    }
    #spritesheet {
        height: var(--size-in-px-2); 
        /* 480px */
    }
    
}

@keyframes blinkAnimation1100 {
    0% {
        transform: translate3d(calc(var(--size-in-px-2) * 3 * -1), 0, 0); /* -1728px */
    }
    10% {
        transform: translate3d(0, 0, 0);
    }
}
@keyframes hitAnimation1100 {
    0% {
        transform: translate3d(0, 0, 0);
    }
    100% {
        transform: translate3d(calc(var(--size-in-px-2) * 7 * -1), 0, 0);
    }
}


@media only screen and (max-width: 850px) {
    .blinking {
        animation: blinkAnimation850 5s steps(3) infinite;
        width: calc(var(--size-in-px-3) * 4);
    }
    .hit {
        animation: hitAnimation850 .5s steps(7) 1 forwards;
        width: calc(var(--size-in-px-3) * 8);
    }
    nav {
        font-size: .8em;
        padding: 30px 20px;
    }
    #nav-prompt {
        padding: 3%;
    }
    #robot-container {
        display: flex;
        padding-top: 100px;
        width: var(--size-in-px-3) 
        /* 480px */
    }
    #spritesheet {
        height: var(--size-in-px-3); 
        /* 480px */
    }
}
@keyframes blinkAnimation850 {
    0% {
        transform: translate3d(calc(var(--size-in-px-3) * 3 * -1), 0, 0); /* -1728px */
    }
    10% {
        transform: translate3d(0, 0, 0);
    }
}
@keyframes hitAnimation850 {
    0% {
        transform: translate3d(0, 0, 0);
    }
    100% {
        transform: translate3d(calc(var(--size-in-px-3) * 7 * -1), 0, 0);
    }
}


@media only screen and (max-width: 750px) {
    #home {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    #nav-container {
        padding-bottom: 70px;
        margin-right: -20%;
        width: 70%;
    }
    nav {
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding: 30px;
        right: 0px;
    }
    #bubble-pointer {
        left: auto;
        right: 30%;
        bottom: -8%;
        z-index: -1;
    }


    nav ul {
        padding: 0;
    }
    #robot-container {
        padding-top: 0;
        margin-top: -50px;
    }
    main {
        margin: 0 5%;
    }
    #about-me {
        margin-left: 5%;
        margin-right: 5%;
    }
    #my-pic {
        width: 50%;
    }
    #about-me p {
        font-size: 14px;
        font-family: monospace, Arial, Helvetica, sans-serif;
    }


    #projects {
        text-align: unset;
    }
    .project:nth-child(odd) {
        text-align: unset;
    }
    .project .title {
        text-align: center;
    }
    .project .description {
        font-size: .8em;
    }
    .project img {
        width: 100%;
    }

    #cyber-img-small {
        display: block;
    }
    #cyber-img-large {
        display: none;
    }
}

@media only screen and (max-width: 500px) {
    nav {
        width: 80%;
        border-radius: 13em;
    }
    #nav-container {
        padding-bottom: 35px;
        margin-right: 0;
        width: 90%;
    }
    #nav-prompt {
        font-size: 13px;
    }
    .nav-item a {
        color: brown;
    }
    #robot-container {
        padding-top: 0;
        margin-top: -20px;
    }

    #my-pic {
        width: 60%;
    }

    .cyber-docs-container {
        display: block;
    }
    .cyber-papers-container {
        display: block;
    }
    .cyber-doc {
        width: 100%;
        margin: auto;
    }
}
@media only screen and (max-width: 400px) {
    h1 {
        text-align: center;
    }
    h1 a {
        font-size: 100%;
        text-align: center;
    }
    header h2 {
        text-align: center;
        font-size: 120%;
        line-height: 1.3;
    }
    nav {
        padding: 11% 7%;
    }
    

    footer {
        display: block;
    }
    footer h2 {
        padding-bottom: 20px;
    }
    footer div {
        padding-bottom: 10px;
    }
    footer div:last-of-type {
        padding-bottom: 0;
    }
}

.useRobotClick {
    animation: robotClick .1s;
}

@keyframes robotClick {
    0% {background-color: #02EFEE;}
    50% {background-color: #0001cb;}
    100% {background-color: #02EFEE;}
}


