@import url('https://fonts.googleapis.com/css2?family=Patrick+Hand&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans:ital,wght@0,100..900;1,100..900&display=swap');

body{
    background: rgb(255,255,255);
    background: radial-gradient(circle, rgba(255,255,255,1) 0%, rgba(242,247,255,1) 100%);
    margin: 0;

    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

.navigation{
    position: fixed;
    top: 32px;
    left: 50%;
    transform: translate(-50%, 0);
    width: 90vw;
    height: 56px;
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 128px;
    border-bottom-right-radius: 500px;

    box-shadow: 0 0 22px rgba(0,0,0,0.1), 0 0 22px rgba(0,0,0,0.03) inset;

    animation: slowBounce 15s infinite alternate-reverse;

    z-index: 999;
}

.navigation::before{
    content: "";
    position: absolute;
    right: 0;
    top: 0;
    height: 56px;
    width: 256px;
    background: url(./silly.png);
    border-bottom-right-radius: 500px;

    opacity: 0.5;
}

.navigation *{
    margin: 0;
}

.navigation .left{
    position: absolute;
    left: 32.01px;
    top: 50%;
    transform: translate(0, -50%);
}

.navigation .right{
    position: absolute;
    right: 224px;
    top: 50%;
    transform: translate(0, -50%);
    display: flex;
    flex-direction: row;
    gap: 16px;
}

.navigation .right img{
    animation: drawn 1s infinite;
    animation-timing-function: steps(1, end);
    opacity: 0.6;
    transition: 0.05s;
}

.navigation .right img:hover{
    transform: scale(1.1) !important;
    transition: 0.05s;
}

#coding398{
    font-size: x-large;
}

#coding398 span{
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
    letter-spacing: -5px;

    display: inline-block;
    width: 10px;
    text-align: center;

    animation: titleBounce 5s infinite;
    animation-delay: calc(var(--o) * -500ms);

    color: rgba(0,0,0,0.6);
}

@keyframes titleBounce {
    0%, 100%{
        font-family: 'Courier New', Courier, monospace;
        transform: translateY(-3px) rotate(3deg);
    }
    25%{
        font-family: cursive;
        transform: translateY(0px) rotate(0deg);
    }
    50%{
        font-family: "Noto Sans";
        transform: translateY(3px) rotate(-3deg);
    }
    75%{
        font-family: Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif;
        transform: translateY(0px) rotate(0deg);
    }
}

@keyframes slowBounce{
    0%, 100%{
        transform: translate(-50%, -6px) rotate(0deg);
    }
    25%{
        transform: translate(-50%, 6px) rotate(0.5deg);
    }
    50%{
        transform: translate(-50%, -6px) rotate(0deg);
    }
    75%{
        transform: translate(-50%, 6px) rotate(-0.5deg);
    }
}

@keyframes drawn{
    0%{
        transform: rotate(-6deg);
    }
    50%{
        transform: rotate(6deg);
    }
}

.tippy-box{
    background-color: rgba(0,0,0,0.5);
    color: white;
    font-family: "Patrick Hand";
    font-weight: 900;
    letter-spacing: 2px;
    position: relative;
}

.tapeMe, #me{
    position: relative;
    width: 328px;
}
.tapeMe{
    transform: translate(228px, 50%);
}

.tapeMe::after{
    display: block; content: "";
    width: 150px; height: 30px;
    position: absolute; top: 10px; left: 10px;
    rotate: -10deg;
    animation: tapeA 1s forwards;
    animation-delay: 0.2s;
    border-radius: 2px;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 5px,
        black 5px,
        black 10px
      );;
    opacity: 0.3;
}

.tapeMe::before{
    display: block; content: "";
    width: 120px; height: 30px;
    position: absolute; bottom: 16px; right: 10px;
    rotate: -8deg;
    animation: tapeB 1s forwards;
    animation-delay: 0.4s;
    z-index: 999;
    border-radius: 2px;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 5px,
        black 5px,
        black 10px
      );;
    opacity: 0.3;
}


.section.hero{
    width: 100vw;
    height: 70vh;
    background: linear-gradient(111deg, rgba(150,180,255,0.7) 0%, rgba(200,220,255,0.9) 50%), url(./img/muffin.webp);
    background-size: cover;
    background-position: center;

    position: relative;

    font-family: "Noto Sans", sans-serif;
}

#defaultCanvas0{
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 70vh;
    z-index: 1;
}

.section.hero *{
    z-index: 2;
}

.section.hero h1::after{
    content: "";
    background-image: url(./img/sparkle.png);
    width: 36px;
    height: 36px;
    background-size: cover;
    position: absolute;
    top: 4px;
}

.section.hero .text{
    position: absolute;
    right: 128px;
    width: calc(75% - 328px);
    top: 50%;
    transform: translate(0, -50%);
}

.sectionDivider{
    width: 100vw;
    height: 12px;
    transform: translate(0, -6px);
    background-image: url(./img/divider.png);
}

/* Projects */
.section.projects{
    width: 100vw;
    height: 65vh;
    margin-top: 128px;
    margin-bottom: 32px;
    position: relative;
}

.project .info{
    position: absolute;
    left: 128px;
    height: 100%;
    width: 30vw;

    font-family: "Noto Sans", sans-serif;
}

.project .info h1{
    font-weight: 900;
    position: relative;
}

.info h1 img{
    position: absolute;
    top: 0;
    height: 36px;
    transform: translate(0px, -18px);
}

.info p img{
    display: inline;
    height: 24px;
    position: absolute;
    transform: translate(0, -6px);
    margin-left: 3px;
}

.project .info i{
    opacity: 0.5;
}
.project .info iframe{
    width: 100%;
    height: 190px;
}
.project .info h3{
    font-weight: 600;
}
.project .info svg, .lib{
    height: 32px;
    opacity: 0.7;
    margin-right: 12px;
}

.project .info button{
    display: inline-flex;
    background: transparent;
    border: 2px solid black;
    color: black;

    align-items: center;
    gap: 12px;
    font-family: "Noto Sans", sans-serif;
    font-weight: 600;
    padding-left: 12px;
    padding-right: 12px;
    margin-right: 12px;

    box-shadow: 6px 6px 0 rgba(0,0,0, 0.1);
}
.project .info button img{
    filter: invert(1);
}

.project .info button:disabled{
    opacity: 0.5;
}

#pong{
    position: absolute;
    bottom: 124px;
    right: 1028px;
    width: 300px;
    z-index: 999;

    animation: windowBop1 4s infinite alternate-reverse;
    animation-delay: -2s;
}
#pong .content{
    background-color: rgb(50,50,50);
}

.section.projects .view{
    position: absolute;

    right: 1200px;
}

.section.projects .view .window:first-child{
    position: absolute;
    top: 0;
    left: 0;
    animation: windowBop1 4s infinite alternate-reverse;
}
.section.projects .view .window:nth-child(2){
    position: absolute;
    top: 124px;
    left: 400px;
    animation: windowBop2 6s infinite alternate-reverse;
}

.section.projects .window{
    width: 600px;
    aspect-ratio: 16/10;
    background-color: rgb(230,230,230);
    outline: 6px solid rgb(150,150,150);

    box-shadow: 24px 24px 3px rgba(0,0,0, 0.1);

    border-radius: 1px;
}
.window .bar{
    width: 100%;
    height: 36px;
    border-bottom: 6px solid rgb(150,150,150);

    box-shadow: 0 0 5px rgba(0,0,0,0.2) inset;
}
.bar button{
    float: right;
    height: 100%;
    aspect-ratio: 1/1;
    background: rgb(200, 0, 0);
    border: none;
    border-left: 6px solid rgb(150,150,150);

    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: row;

    box-shadow: 0 0 5px rgba(0,0,0,0.1) inset;
}
.bar button img{
    height: 75%;
}

.bar h1{
    float: left;
    font-size: large;
    margin: 0;
    margin-left: 24px;
    line-height: 36px;
    font-family: "Noto Sans", sans-serif;
    opacity: 0.5;
}

.window .content{
    height: calc(100% - 36px);
    box-shadow: 0 0 26px rgba(0,0,0,0.2) inset;

    background-size: cover;
    background-position: center;
}

@keyframes windowBop1 {
    0%{
        transform: rotate(-0.5deg) translateY(6px);
    }
    100%{
        transform: rotate(0.5deg)  translateY(-6px);
    }
}

@keyframes windowBop2 {
    0%{
        transform: rotate(0.5deg) translateY(6px);
    }
    100%{
        transform: rotate(-0.5deg)  translateY(-6px);
    }
}

.project.out .info{
    opacity: 0;
    pointer-events: none;
    scale: 0.95;
    transition: 0.5s;
}

.project.out .window{
    background: none !important;
    box-shadow: none !important;
    outline: none !important;
    pointer-events: none;
}

.project.out .window *{
    opacity: 0;
    pointer-events: none;
}
.project.out .window::after{
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    content: "";

    width: 128px;
    height: 128px;
    background-image: url(./img/pop.png);
    background-size: cover;

    animation: pop 0.5s forwards cubic-bezier(0.36, 0, 0.66, -0.56);
}

@keyframes pop{
    100%{ width: 0; height: 0; opacity: 0; }
}

.project.in .info{
    animation: projectIn 0.5s;
}

.project.in .window{
    opacity: 0;
}
.project.in .window:first-child{
    transform: translate(32px, 128px);
    animation-delay: 0.5s !important;
    animation: windowIn1 0.8s forwards cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    animation-delay: 0.5s !important;
}
.project.in .window:nth-child(2){
    transform: translate(-32px, -128px);
    animation: windowIn2 0.75s forwards cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    animation-delay: 0.55s !important;
}

@keyframes projectIn{
    0%{
        opacity: 0;
        scale: 0.95;
    }
}

@keyframes windowIn1 {
    100%{
        transform: rotate(0.5deg) translateY(-6px);
        opacity: 1;
    }
}
@keyframes windowIn2 {
    100%{
        transform: rotate(-0.5deg) translateY(-6px);
        opacity: 1;
    }
}

.section.projects #andMore{
    position: absolute;
    bottom: 0;
    right: 50%;
    transform: translate(50%, 0);
    font-family: "Noto Sans", sans-serif;
    opacity: 0.5;
}

a{
    color: inherit;
    text-decoration: underline wavy rgba(150,180,255,1);
}

/* What i know */
.section.whatIKnow{
    width: 100vw;
    background: linear-gradient(0deg, rgba(150,180,255,0.2) 0%, rgba(200,220,255,0.4) 80%, transparent 100%);

    text-align: center;
    color: black;
    font-family: "Noto Sans", sans-serif;
    box-sizing: border-box;
    padding: 64px;
}

#what{
    display: flex;
    width: 100%;
    flex-direction: row;
    gap: 24px;

    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}
#what *{
    flex-shrink: 0;
    height: 48px;
    opacity: 0.9;
}

.whatIKnow h1{
    display: flex; /* war crimes */
    align-items: center;
    justify-content: center;
    gap: 12px;
}

/* say hi */
.section.hi{
    display: flex;
    justify-content: center;
    align-items: flex-end;
    width: 100vw;
    background: rgba(150,180,255,0.2);

    position: relative;
}

.hiContainerContainer{
    position: relative;
}
.hiContainer{
    position: absolute;
    top: 10%;
    left: 20%;
    width: 60%;
    height: 60%;
    color: black;
    font-family: "Noto Sans", sans-serif;
    font-weight: 600;

    display: flex;
    justify-content: center;
    flex-direction: column;
}
.hiContainer *{
    margin: 6px;
}

.butSocials{
    width: 70%;
    left: 15%;
    font-size: small;
}

#gift{
    position: absolute;
    right: 0;
    scale: 0.5;
}

@media screen and (max-width: 1950px) {
    .section.projects .view{
        right: 1100px;
    }
}
@media screen and (max-width: 1800px) {
    .section.projects .view{
        right: 1000px;
    }
    #pong{
        right: 928px;
    }
}
@media screen and (max-width: 1700px) {
    .section.projects .view{
        right: 900px;
    }
    #pong{
        right: 828px;
    }
    .section.projects .window{
        width: 550px;
    }
    .section.projects .view .window:nth-child(2){
        left: 300px;
        top: 182px;
    }
}
@media screen and (max-width: 1550px) {
    .section.projects .view{
        right: 800px;
    }
    #pong{
        right: 658px;
    }
    .section.projects .window{
        width: 500px;
    }
    .section.projects .view .window:nth-child(2){
        left: 250px;
    }
}
@media screen and (max-width: 1500px) {
    .tapeMe{
        transform: translate(128px, 50%);
    }
}
@media screen and (max-width: 1350px) {
    .section.projects .view{
        right: 700px;
    }
    .section.projects .view .window:nth-child(2){
        left: 150px;
    }
    #pong{ right: 450px; bottom: 64px; }
    #gift{display: none;}
}
@media screen and (max-width: 1200px) {
    .section.projects .view{
        right: 600px;
    }
    .section.projects .view .window:nth-child(2){
        left: -48px;
        top: 240px;
    }
    #pong{ display: none; }
}
@media screen and (max-width: 1100px) { /* they probably just have a mobile phone */
    .section.projects{
        margin-top: 64px;
        height: 105vh;
    }
    .project .info{
        width: calc(100% - 256px);
    }
    .section.projects .view{
        right: 90%;
        top: 412px;
    }
    .section.projects .view .window:nth-child(2){
        left: 25vw;
        top: 144px;
    }
    .hiContainerContainer img{
        height: 400px;
    }
    .hiContainer.butSocials{
        font-size: x-small;
    }
    .tapeMe{
        transform: translate(34px, 50%);
    }
    .section.hero .text{
        width: 55%;
        right: 34px;
    }
}

@media screen and (max-width: 900px) {
    .section.hero{
        height: 90vh;
    }
    .tapeMe{
        left: 50%;
        transform: translate(-50%, 50%);
    }
    .section.hero .text{
        width: 90%;
        right: 50%;
        transform: translate(50%, 128px);
    }
    .navigation .right{
        right: 64px;
    }
    .navigation::before{
        opacity: 0.2;
    }
}

@media screen and (max-width: 800px) {
    .section.projects .view .window:nth-child(2){
        left: 15vw;
        top: 144px;
    }
}

@media screen and (max-width: 750px) {
    .hiContainerContainer img{
        height: 500px;
    }
    .hiContainerContainer:first-child{
        float: right;
    }
    .hiContainerContainer:nth-child(2){
        float: left;
    }
    .hiContainer{
        font-size: small;
    }
    .section.hi{
        display: flow-root; /* this works */
    }


    .section.projects .view .window{
        width: 70vw;
    }
    .section.projects .view{
        right: 90%;
        top: 462px;
    }
    .section.projects .view .window:nth-child(2){
        left: 15vw;
        top: 144px;
    }
    #andMore{
        width: 90%;
        left: 5%;
        transform: none !important;
        text-align: center;
    }
    .section.whatIKnow h1 img{
        position: absolute;
        right: 0;
    }
    .section.whatIKnow h1 img:first-child{
        left: 0;
    }
}

@media screen and (max-width: 600px) {
    .project .info{
        width: 90%;
        left: 5%;
    }
    .hiContainerContainer img{
        height: 400px;
    }
    .hiContainer.butSocials{
        font-size: x-small;
    }
    .section.whatIKnow{
        padding-bottom: 64px;
    }
}
@media screen and (max-width: 500px) {
    .navigation .right{
        display: none;
    }
    .section.hero .text{
        width: 90%;
        right: 50%;
        transform: translate(50%, 88px);
        font-size: small;
    }
    .section.projects{
        height: 100vh;
    }
    .hiContainerContainer img{
        width: 100vw;
        height: initial;
    }
    .hiContainerContainer:has(.butSocials){ display: none; }
    .hiContainer.butSocials{
        font-size: x-small;
        top: 7%;
    }
}
@media screen and (min-width: 900px) and (max-height: 850px) {
    /* help me */
    .tapeMe{
        transform: translate(20%, 30%);
    }
    .section.projects{
        height: 100vh;
    }
}
@media screen and (max-width: 900px) and (max-height: 850px) {
    .tapeMe{
        transform: translate(-50%, 30%);
    }
    .section.hero .text{
        font-size: small;
        transform: translate(50%, 20%);
    }
    .section.projects{
        height: 120vh;
    }
}
@media screen and (max-width: 900px) and (max-height: 750px) {
    .section.hero .text{
        transform: translate(50%, 40%);
    }
    .section.projects{
        height: 140vh;
    }
}
@media screen and (max-width: 900px) and (max-height: 700px) {
    .tapeMe{
        scale: 0.5;
        left: 25%;
        transform: translate(-35%, 30%);
    }
    .section.hero .text{
        font-size: small;
        transform: translate(50%, 10%);
    }
    .section.projects{
        height: 140vh;
    }
}

@media screen and (max-width: 900px) and (min-height: 1000px){
    .section.projects{
        height: 100vh;
    }
}
@media screen and (max-width: 900px) and (min-height: 1100px){
    .section.projects{
        height: 90vh;
    }
}
@media screen and (max-width: 650px) and (min-height: 1000px){
    .section.projects{
        height: 80vh;
    }
}

@media (prefers-reduced-motion) {
    #coding398 span{
        animation: none;
    }
    .navigation{
        animation: none;
    }
    .navigation .right img{
        animation: none;
    }
    .section.projects .view .window{
        animation: none;
    }

    .project.in .info{
        animation: none;
    }
}
