@import url('https://fonts.googleapis.com/css2?family=Lexend+Zetta:wght@100..900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Kanit:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Tektur:wght@400..900&display=swap');

@font-face {
    font-family: Dystopian;
    src: url("public/dystopian.otf") format("opentype");
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
}

body {
    color: #ccc;
    background: url("public/cyberpunk.png") fixed;
    font-family: 'Lexend Zetta', sans-serif;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow: scroll;
}

/* #region glitch */
.hero {
    font-size: clamp(30px, 7vw, 70px);
    line-height: 1;
    display: inline-block;
    color: #fff;
    z-index: 2;
    letter-spacing: 10px;
    filter: drop-shadow(0 1px 3px);
    font-family: 'Tektur', sans-serif;
}

.layers {
    position: relative;
}

.layers::before,
.layers::after {
    content: attr(data-text);
    position: absolute;
    width: 110%;
    z-index: -1;
}

.layers::before {
    top: 10px;
    left: 15px;
    color: #e0287d;
}

.layers::after {
    top: 5px;
    left: -10px;
    color: #1bc7fb;
}

@keyframes paths {
    0% {
        clip-path: polygon(0% 43%,
                83% 43%,
                83% 22%,
                23% 22%,
                23% 24%,
                91% 24%,
                91% 26%,
                18% 26%,
                18% 83%,
                29% 83%,
                29% 17%,
                41% 17%,
                41% 39%,
                18% 39%,
                18% 82%,
                54% 82%,
                54% 88%,
                19% 88%,
                19% 4%,
                39% 4%,
                39% 14%,
                76% 14%,
                76% 52%,
                23% 52%,
                23% 35%,
                19% 35%,
                19% 8%,
                36% 8%,
                36% 31%,
                73% 31%,
                73% 16%,
                1% 16%,
                1% 56%,
                50% 56%,
                50% 8%);
    }

    5% {
        clip-path: polygon(0% 29%,
                44% 29%,
                44% 83%,
                94% 83%,
                94% 56%,
                11% 56%,
                11% 64%,
                94% 64%,
                94% 70%,
                88% 70%,
                88% 32%,
                18% 32%,
                18% 96%,
                10% 96%,
                10% 62%,
                9% 62%,
                9% 84%,
                68% 84%,
                68% 50%,
                52% 50%,
                52% 55%,
                35% 55%,
                35% 87%,
                25% 87%,
                25% 39%,
                15% 39%,
                15% 88%,
                52% 88%);
    }

    30% {
        clip-path: polygon(0% 53%,
                93% 53%,
                93% 62%,
                68% 62%,
                68% 37%,
                97% 37%,
                97% 89%,
                13% 89%,
                13% 45%,
                51% 45%,
                51% 88%,
                17% 88%,
                17% 54%,
                81% 54%,
                81% 75%,
                79% 75%,
                79% 76%,
                38% 76%,
                38% 28%,
                61% 28%,
                61% 12%,
                55% 12%,
                55% 62%,
                68% 62%,
                68% 51%,
                0% 51%,
                0% 92%,
                63% 92%,
                63% 4%,
                65% 4%);
    }

    45% {
        clip-path: polygon(0% 33%,
                2% 33%,
                2% 69%,
                58% 69%,
                58% 94%,
                55% 94%,
                55% 25%,
                33% 25%,
                33% 85%,
                16% 85%,
                16% 19%,
                5% 19%,
                5% 20%,
                79% 20%,
                79% 96%,
                93% 96%,
                93% 50%,
                5% 50%,
                5% 74%,
                55% 74%,
                55% 57%,
                96% 57%,
                96% 59%,
                87% 59%,
                87% 65%,
                82% 65%,
                82% 39%,
                63% 39%,
                63% 92%,
                4% 92%,
                4% 36%,
                24% 36%,
                24% 70%,
                1% 70%,
                1% 43%,
                15% 43%,
                15% 28%,
                23% 28%,
                23% 71%,
                90% 71%,
                90% 86%,
                97% 86%,
                97% 1%,
                60% 1%,
                60% 67%,
                71% 67%,
                71% 91%,
                17% 91%,
                17% 14%,
                39% 14%,
                39% 30%,
                58% 30%,
                58% 11%,
                52% 11%,
                52% 83%,
                68% 83%);
    }

    76% {
        clip-path: polygon(0% 26%,
                15% 26%,
                15% 73%,
                72% 73%,
                72% 70%,
                77% 70%,
                77% 75%,
                8% 75%,
                8% 42%,
                4% 42%,
                4% 61%,
                17% 61%,
                17% 12%,
                26% 12%,
                26% 63%,
                73% 63%,
                73% 43%,
                90% 43%,
                90% 67%,
                50% 67%,
                50% 41%,
                42% 41%,
                42% 46%,
                50% 46%,
                50% 84%,
                96% 84%,
                96% 78%,
                49% 78%,
                49% 25%,
                63% 25%,
                63% 14%);
    }

    90% {
        clip-path: polygon(0% 41%,
                13% 41%,
                13% 6%,
                87% 6%,
                87% 93%,
                10% 93%,
                10% 13%,
                89% 13%,
                89% 6%,
                3% 6%,
                3% 8%,
                16% 8%,
                16% 79%,
                0% 79%,
                0% 99%,
                92% 99%,
                92% 90%,
                5% 90%,
                5% 60%,
                0% 60%,
                0% 48%,
                89% 48%,
                89% 13%,
                80% 13%,
                80% 43%,
                95% 43%,
                95% 19%,
                80% 19%,
                80% 85%,
                38% 85%,
                38% 62%);
    }

    1%,
    7%,
    33%,
    47%,
    78%,
    93% {
        clip-path: none;
    }
}

.movement {
    /* Normally this position would be absolute & on the layers, set to relative here so we can see it on the div */
    position: relative;
    animation: movement 8s step-end infinite;
}

@keyframes movement {
    0% {
        top: 0px;
        left: -20px;
    }

    15% {
        top: 10px;
        left: 10px;
    }

    60% {
        top: 5px;
        left: -10px;
    }

    75% {
        top: -5px;
        left: 20px;
    }

    100% {
        top: 10px;
        left: 5px;
    }
}

.opacity {
    animation: opacity 5s step-end infinite;
}

@keyframes opacity {
    0% {
        opacity: 0.1;
    }

    5% {
        opacity: 0.7;
    }

    30% {
        opacity: 0.4;
    }

    45% {
        opacity: 0.6;
    }

    76% {
        opacity: 0.4;
    }

    90% {
        opacity: 0.8;
    }

    1%,
    7%,
    33%,
    47%,
    78%,
    93% {
        opacity: 0;
    }
}

.font {
    animation: font 7s step-end infinite;
}

@keyframes font {
    0% {
        font-weight: 100;
        color: #e0287d;
        filter: blur(3px);
    }

    20% {
        font-weight: 500;
        color: #fff;
        filter: blur(0);
    }

    50% {
        font-weight: 300;
        color: #1bc7fb;
        filter: blur(2px);
    }

    60% {
        font-weight: 700;
        color: #fff;
        filter: blur(0);
    }

    90% {
        font-weight: 500;
        color: #e0287d;
        filter: blur(6px);
    }
}

.glitch span {
    animation: paths 5s step-end infinite;
}

.glitch::before {
    animation: paths 5s step-end infinite, opacity 5s step-end infinite,
        font 8s step-end infinite, movement 10s step-end infinite;
}

.glitch::after {
    animation: paths 5s step-end infinite, opacity 5s step-end infinite,
        font 7s step-end infinite, movement 8s step-end infinite;
}

/* #endregion glitch */

#wrapper {
    display: flex;
    flex-direction: column;
    height: 80%;
    width: 80%;
    padding: 1em;
    border: 1px dashed #8b7eff;
    border-radius: 5px;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    overflow: scroll;
}

.header {
    flex: 0;
    display: flex;
    justify-content: space-between;
    padding: 10px;
}

.name {
    flex: 0;
}

.navbar {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1;
}

.navbar a {
    color: white;
    padding: 10px;
    margin: 10px;
    font-size: large;
}

.navbar img {
    width: 30px;
    height: 30px;
    margin: 10px;
}

.navbar-item {
    display: flex;
    justify-content: center;
    align-items: center;
}

@media screen and (max-width: 800px) {
    .content {
        overflow: visible !important;
    }

    .intro {
        font-size: 14px !important;
    }

    .project-card {
        font-size: 14px !important;
    }

    body {
        text-align: center !important;
    }
}

@media screen and (max-width: 1200px) {
    .header {
        flex-direction: column;
    }

    .name {
        text-align: center;
    }

    #wrapper {
        height: 100%;
        width: 100%;
        border: none;
        overflow: scroll;
    }

    body {
        padding: 0;
    }

    .projects-header {
        padding: 3px;
        border-radius: 3px;
        background-color: rgba(255, 255, 255, 0.1);
        /* box-shadow: 0px 0px 10px 0px rgb(26, 26, 26); */
    }

    .intro {
        margin-top: 1em;
    }
}

.invert {
    filter: invert(1);
}

a {
    color: white;
    transition: color 0.2s;
}

a:hover {
    color: rgb(87, 213, 255);
}

.content {
    flex: 1;
    padding: 10px;
    overflow: scroll;
}

.highlight {
    color: #8b7eff;
    font-weight: bold;
}

.no-margin {
    margin: 0 !important;
}

.projects {
    display: flex;
    flex-direction: column;
    color: #ddd;
}

.projects-header {
    margin-top: 1em;
    font-family: 'Dystopian', sans-serif;
    filter: drop-shadow(0 1px 3px);
    letter-spacing: 0.1em;
}

.project-card {
    position: relative;
    font-family: 'Lexend Zetta', sans-serif;
    padding: 10px;
    border-radius: 5px;
    margin-top: 1em;
    transition: all 0.5s;
}

.project-card:hover {
    filter: brightness(150%);
    transform: translateY(-2px) scale(1.02);
}

.project-card-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    border-radius: 5px;
    overflow: hidden;
}

.project-card-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.1;
}

.card-orange {
    border-left: 3px solid #8f4000;
    border-right: 3px solid #8f4000;
    background-color: rgba(255, 172, 65, 0.1);
}

.card-green {
    border-left: 3px solid #008f30;
    border-right: 3px solid #008f30;
    background-color: rgba(0, 255, 55, 0.1);
}

.card-aqua {
    border-left: 3px solid #008f5f;
    border-right: 3px solid #008f5f;
    background-color: rgba(62, 255, 207, 0.1);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Dystopian', sans-serif;
}

.project-name {
    font-size: large;
}

.project-link {
    display: flex;
    justify-content: center;
    align-items: center;
}

.project-link img {
    width: 30px;
    height: 30px;
    /* filter: drop-shadow(0 0px 5px); */
    filter: invert(1);
    margin-right: 10px;
}

.footer {
    flex: 0;
    padding: 10px;
    font-size: small;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}
