@font-face {
    font-family: 'Moolbor';
    src: url('/fonts/moolbor.ttf');
}

:root {
    --border-color: rgb(82, 0, 166);
    --background-colorA: rgb(48, 10, 46);
    --background-colorB: rgb(41, 7, 40);
    --band-color: #001c27;
    --text-color: white;
    --scroll-top-radius: 0.25em;
    /*background: 
      linear-gradient(135deg,#0000 20.5%,var(--background-colorB) 0 29.5%,#0000 0) 0 18px,
      linear-gradient( 45deg,#0000 8%,var(--background-colorB) 0 17%, #0000 0 58%) 36px 0,
      linear-gradient(135deg,#0000 8%,var(--background-colorB) 0 17%, #0000 0 58%,var(--background-colorB) 0 67%,#0000 0),        
      linear-gradient( 45deg,#0000 8%,var(--background-colorB) 0 17%, #0000 0 58%,var(--background-colorB) 0 67%,#0000 0 83%,var(--background-colorB) 0 92%,#0000 0);
    background-size: 72px 72px;*/
    background: url("/images/bg.png");
    background-color: var(--background-colorB);

    padding-bottom: 100vh; /* Web development is truly incomprehensible. This prevents the gradient top from cutting into the bottom ???? */

    touch-action: manipulation;

}

img.svg {
    filter: invert(100%);
}

body {
    margin: 0.416vw;
    margin-top: 0;

    font-family: "Roboto", sans-serif;
    font-weight: 400%;
    font-style: normal;
    line-height: 1.2;

    overflow-y: scroll;
    overflow-x: hidden;
}

a {
    color: var(--text-color);
}

div.topbar {
    color: var(--text-color);

    margin: 0;
    margin-left: -0.5em;
    margin-top: 1em;
    z-index: 2711;

    width: 100%;
    height: 20em;
    transition: height 0.6s;

    background: var(--band-color);
    position: fixed;
    display: flex;

    overflow: hidden;

    border: 0.6em ridge;
    border-color: var(--border-color);
    border-left: none;
    border-right: none;
    
    font-family: "Bai Jamjuree", sans-serif;
}

div.topbar.scrolled {
    height: 5em;
}

div.topbar>.name {
    align-self: center;
    border-left: dotted;
    padding-left: 1em;
    margin-left: 2vw;
}

div.topbar.scrolled>.name {
    display: flex;
    align-items: center;
}

div.topbar>h1+h3 {
    margin-top: -1.04vw;
}

div.name>h1 {
    font-size: 3em;
    transition: font-size 0.6s;
}

.scrolled>div.name>h1 {
    font-size: 2em;
}

div.name>h3 {
    font-size: 1.5em;
    transition: all 0.6s;
}

div.topbar.scrolled>div.name>h3::before {
    content: "—  ";
    padding-left: 0.6em;
}

div.topbar>img {
    height: calc(100% - 4em);
    align-self: center;
    margin: 1em;
    margin-left: 2em;
    object-fit: cover;

    border: 0.6em ridge;
    border-color: var(--border-color);
    
    transition: all 0.6s;
}

div.topbar.scrolled>img {
    height: 100%;
    margin: 0;
    margin-left: 2em;
}

div.contact-list {
    align-content: center;
    position: absolute;
    left: 70%;
    height: 100%;
    opacity: 100%;

    transition: opacity 0.6s;
}

.scrolled>div.contact-list {
    opacity: 0%;
}

div.contact {
    display: flex;
    align-items: center;
}

div.contact>a {
    padding-left: 0.3em;
    color: var(--text-color);
    text-shadow: rgb(0, 0, 0) 1px 0 25px, rgb(0, 0, 0) 1px 0 25px, rgb(0, 0, 0) 1px 0 25px, rgb(0, 0, 0) 1px 0 25px;
    font-size: 1.3em;
}

div.content {
    transform: translateY(20em);
    margin: 0;
    padding: -1em;
    width: 100%;

    scroll-behavior: smooth;
    transition: transform 0.6s;
}

div.content.scrolled {
    transform: translateY(12em);
}

div.cards {
    display: flex;
    flex-wrap: wrap;
}

div.card {
    margin: 1em;
    border-radius: 1em;
    position: relative;
    overflow: hidden;
    display: block;
    text-align: center;
    align-items: center;
    align-content: center;
    width: calc(50% - 2em);
    height: 17.5em;
    
    background-size: 100%;
    background-position-y: var(--bg-offset);

    transition: none;

    cursor: pointer;
}

div.card:hover {
    margin: 0.7em;

    width: calc(50% - 1.4em);
    height: 18.1em;

    transition: all 0.1s;
}

div.card.selected {
    width: calc(100% - 1.4em);
    height: calc(var(--card-height) + 10em);
    margin: 1em;
    background-size: auto 100%;
    background-position-y: 0;
    background-position-x: center;
    
    cursor: default;

    transition: all 0.1s;
}

div.blur {
    backdrop-filter: blur(2px);
    
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;

    transition: backdrop-filter 0.3s;
}

div.card.expanded>div.blur {
    backdrop-filter: blur(20px) brightness(40%);
}

div.card>h2 {
    color: white;
    font-family: 'Moolbor', 'Georgia', serif;
    word-spacing: 0.15em;
    font-size: 6em;
    text-shadow: 0 0 0.52vw rgb(154, 154, 154), 0 0 1.04vw white, 0 0 30px #e60073;
    
    padding-top: 0.2em;
    user-select: none;
    
    position: absolute;
    left: 0;
    width: 140%;
    top: 50%;
    transform: scale(0.7, 1) translateX(-20%) translateY(-50%);

    transition: all 0.3s;
}
div.card>h3 {
    color: white;
    font-family: 'Moolbor', 'Georgia', serif;
    word-spacing: 0.15em;
    font-size: 3em;
    text-shadow: 0 0 0.52vw rgb(56, 56, 56), 0 0 1.04vw white, 0 0 20px #36071e;
    
    padding-top: 2.7em;
    user-select: none;
    
    position: absolute;
    left: 0;
    width: 140%;
    top: 50%;
    transform: scale(0.8, 1) translateX(-17.25%) translateY(-50%);

    transition: all 0.3s;
}

div.card.expanded>h2 {
    top: 1em;
}

div.card.expanded>h3 {
    top: 2em;
}

div.card>video {
    position: absolute;
    width: 102%;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    
    opacity: 0%;
    transition: opacity 0.2s;
}

div.card:hover>video {
    opacity: 100%;
}

div.card.selected>video {
    opacity: 0%;
}

div.card-content {
    display: none;
    position: absolute;
    top: 10em;
    bottom: auto;
    left: 0;
    right: 0;
    min-width: calc(100vw - 12em);

    padding: 4em;

    text-align: justify;
    color: white;
    font-size: large;
    font-family: "Bai Jamjuree", sans-serif;

    transition: opacity 0.8s;
    opacity: 0%;
}

div.selected>div.card-content {
    display: block;
}

div.expanded>div.card-content {
    opacity: 100%;
}

div.card-content-imgrow {
    display: flex;
    justify-content: center;
    margin-left: 7.5%;
    margin-right: 7.5%;
}

div.card-content-imgrow>figure {
    width: calc(33.33%);
    margin-bottom: 1em;
}

div.card-content-imgrow>figure+figure {
    margin-left: 1em;
}

div.card-content-row {
    display: flex;
    width: 100%;
    justify-content: center;
}

div.card-content>p {
    margin-bottom: 1em;
    line-height: 1.5em;
    margin-left: 7.5%;
    margin-right: 7.5%;
}

div.card-content-row>p {
    margin-bottom: 1em;
    line-height: 1.5em;
    width: 40%;
    align-self: center;
}

div.card-content-row>figure {
    margin-bottom: 1em;
    width: 40%;
}

div.card-content-row>p+figure {
    margin-left: 5%;
}

div.card-content-row>figure+figure {
    margin-left: 5%;
}

div.card>span.back {
    position: absolute;
    top: 1em;
    right: 1em;

    font-size: 3em;
    color: white;
    user-select: none;

    opacity: 0%;
}

div.card.expanded>span.back {
    opacity: 100%;
    transition: opacity 0.5s;

    cursor: pointer;
}

figure>img {
    width: 100%;
}

figure>video {
    width: 100%;
}

figcaption {
    width: 100%;
    text-align: center;
    color: lightskyblue;
}

div.bg-canvas {
    display: block;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    position: absolute;
    min-height: 20em;
    z-index: -100;
}

div.bg-canvas>canvas {
    width: 100%;
    height: 100%;
}



::-webkit-scrollbar {
    width: 0.52vw;
}

::-webkit-scrollbar-track {
    background: var(--border-color);
}

::-webkit-scrollbar-thumb {
    background: white;
    border-radius: 0.25em;
    border-top-left-radius: var(--scroll-top-radius);
    border-top-right-radius: var(--scroll-top-radius);
}

::-webkit-scrollbar-thumb:hover {
    background: #cccccc;
}



.splide__slide>img {
    height: 25em;
    border: solid 0.6em;
    border-left: solid 0.3em;
    border-right: solid 0.3em;
    border-color: var(--border-color);
    margin: 0 0em 0 0em;
}

.splide__track::after {
    border-left: double 0.5em;
    border-right: double 0.5em;
    border-color: var(--border-color);
    
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
}

.splide__arrow {
    background-color: var(--border-color);
    border-radius: 100%;
    border: 0.4em solid;
    border-color: var(--border-color);
}

.splide__arrow--next {
    right: 0.2em;
}

.splide__arrow--prev {
    left: 0.2em;
}



@media only screen and (max-width: 1200px) {
    div.card {
        width: calc(100% - 2em);
    }

    div.card:hover {
        margin: 0.7em;
        width: calc(100% - 1.4em);
    }

    div.topbar>.name {
        max-width: 30%;
    }

    div.topbar.scrolled>.name {
        max-width: none;
    }

    div.topbar>img {
        height: 70%;
    }

    div.contact-list {
        left: 65%;
    }

    div.card.selected {
        height: calc(var(--card-height) + 5em);
        width: calc(100% - 2em);
        margin: 1em;
    }

    div.card-content {
        font-size: xx-large;
        padding: 2em;
        top: 4em;
    }

    div.card-content-row {
        display: block;
    }

    div.card-content-imgrow {
        display: block;
        margin-left: 0;
        margin-right: 0;
    }

    div.card-content>p {
        margin-left: 0;
        margin-right: 0;
    }

    div.card-content-row>p {
        width: 100%;
    }

    div.card-content-row>figure {
        width: 100%;
        margin-bottom: 2em;
    }
    
    div.card-content-row>p+figure {
        margin-left: 0;
    }
    
    div.card-content-row>figure+figure {
        margin-left: 0;
    }

    div.card-content-imgrow>figure {
        width: 100%;
    }

    div.card-content-imgrow>figure+figure {
        margin-left: 0;
    }

    div.card>span.back {
        top: 0.5em;
        right: 0.3em;

        font-size: 6em;
    }
}
