@font-face {
    font-family: 'Lilex';
    src: url('assets/Lilex-VariableFont_wght.ttf') format('truetype');
    font-weight: 100 900;
    font-style: normal;
}

@font-face {
    font-family: 'Lilex';
    src: url('assets/Lilex-Italic-VariableFont_wght.ttf') format('truetype');
    font-weight: 100 900;
    font-style: italic;
}

@font-face {
    font-family: 'wingdings_x';
    src: url('assets/wingding.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

a {
    user-select: none;
}

:root {
    --content-width: 1000px;
    
    --main-colour: rgb(90, 90, 90);
    --main-colour-2: rgb(9, 9, 9);
    --main-background: rgb(241, 241, 241);
    
    --main-spacing: 16px;
    --medium-spacing: 10px;
    --small-spacing: 6px;
    --content-spacing: 30px;

    --title-font: 30px;
    --title-font-medium: 26px;
    --title-font-small: 20px;

    --large-font: 24px;
    --large-font-medium: 20px;
    --large-font-small: 16px;

    --medium-font: 16px;
    --medium-font-medium: 14px;
    --medium-font-small: 13px;
}


html {
    scrollbar-width: thin;
    scrollbar-color: var(--main-colour) var(--main-background);
}

html::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

html::-webkit-scrollbar-track {
    background: var(--main-background);
}

html::-webkit-scrollbar-thumb {
    background: var(--main-colour);
    border-radius: 999px;
    border: 2px solid var(--main-background);
}

* {
    margin: 0;
    box-sizing: border-box;
    font-family: 'Lilex', 'arial', sans-serif;
    font-weight: 300;
}

.wings {
    font-family: 'wingdings_x', monospace;
}

html {
    background-color: var(--main-background);
}

body {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    width: 100%;
    height: 100vh;
    height: calc(var(--vh, 1vh) * 100);

    background-color: var(--main-background);
}

h1, h2, h3, h4, h5, h6, a {
    color: var(--main-colour-2) !important;
}

p, .sub-title-letter {
    color: var(--main-colour) !important;
}

h1 {
    font-size: var(--title-font);
}

h2, h3, h4, h5, h6 {
    font-size: var(--large-font);
    letter-spacing: 0.06em;
}

p, a {
    font-size: var(--medium-font);
}

#error-elem {
    user-select: none;
    white-space: nowrap;
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: black;
    color: #BADA55;
    text-shadow: rgb(11, 11, 48) -3px -3px 2px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    justify-content: center;
    font-family: monospace;
    font-size: 20px;
}

#error-elem::after {
    content: "oops...";
}

#dankie-button {
    z-index: 100;
    display: none;
    position: absolute;
    top: 0;
    cursor: pointer;
    right: 0;
    width: 100px;
    background-color: rgba(86, 118, 85, 0.6);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: justify;
}

#dankie-button * {
    font-family: monospace !important;
    font-size: 11px;
    color: #BADA55;
    user-select: none;
}

#dankie-text {
    margin-top: 5px;
    width: calc(100% - 10px);
}

#dankie-text > div {
    width: 100%;
    align-items: center;
    justify-content: space-between;
}

#dankie-text > div:first-child {
    display: flex;
}

#dankie-text > div:last-child {
    display: none;
}

#dankie-monkey {
    display: flex;
    align-items: center;
    justify-content: center;
    width: calc(100% - 10px);
    margin: 5px 0px;
    padding: 0px 0px;
    background-color: rgba(186, 218, 85, 0.4);
    border: 1px solid #BADA55;
}

#dankie-monkey p {
    font-size: 25px;
}

#dankie-monkey p:first-child {
    display: block;
}

#dankie-monkey p:last-child {
    display: none;
}

/* MAIN */

.loading-wrap {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 69;
    width: 100%;
    height: 100%;
    background-color: var(--main-background);
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
}

@keyframes loading-text-animation {
    0% {
        content: "Q";
    }
    14.2857% {
        content: "U";
    }
    28.5714% {
        content: "E";
    }
    42.8571% {
        content: "E";
    }
    57.1429% {
        content: "N";
    }
    71.4286% {
        content: "I";
    }
    85.7143% {
        content: "E";
    }
    100% {
        content: "Q";
    }
}

.loading-text {
    font-size: 30px;
}

.loading-text::after {
    content: "Q";
    animation: loading-text-animation 0.35s infinite;
}

main {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    
    width: 100%;
    height: 100%;

    box-sizing: border-box;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

#content {
    box-sizing: border-box;
    height: 100%;
    width: 100%;

    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
}

#content-primary {
    z-index: 100;
    width: 100%;

    /* before content collapse */
    position: absolute;
    top: 0;
    left: 0;
    padding: var(--main-spacing);
}

#main-title-wrap {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    margin-bottom: var(--main-spacing);
    z-index: 420;
    text-decoration: none !important;
}

a#main-title-wrap {
    cursor: pointer;
}

a#main-title-wrap:visited {
    text-decoration: none !important;
}

#glitch-title, #sub-title {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    background-color: var(--main-background);
}

.title-letter {
    font-size: var(--title-font);
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 24px;
}

.title-letter:last-child {
    margin-right: 0;
}

.title-space-letter {
    opacity: 0;
}

nav {
    margin-bottom: var(--medium-spacing);
}

nav {
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
}

nav p, nav a {
    margin: 0;
    color: var(--main-colour);
    margin-bottom: var(--small-spacing);
    background-color: var(--main-background);
}

nav a {
    text-decoration: underline;
}

nav p {
    position: relative;
    font-style: italic;
}

nav p::after {
    position: absolute;
    right: -18px;
    font-size: 14px;
    top: -1px;
    transform: rotate(180deg);
    font-family: 'wingdings_x', monospace;
    content: "Q";
}

#external-links-wrap {
    margin-bottom: var(--medium-spacing);
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
}

#external-links-wrap p {
    margin-bottom: var(--small-spacing);
    background-color: var(--main-background);
}

#cms-content-primary {
    width: 100%;
    height: 100%;

    overflow-y: auto;
}

#cms-content-wrap {
    width: var(--content-width);
    max-width: 100%;
    margin: 0 auto;
}

/* before content collapse */
#cms-content-primary > *:first-child {
    margin-top: 24vh;
}

#cms-content {
    width: 100%;
}

/* mixed content elems */

.double-content-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--content-spacing);
}

.mixed-content-elem {
    position: relative;
    width: 100%;
    margin-bottom: var(--content-spacing);
    opacity: 0;
    transition: opacity 0.3s linear;
}

.content-loading {
    height: 120px;
    border: 1px solid var(--main-colour);
}

.mixed-content-elem:first-child {
    margin-top: 30px;
}

.mixed-content-elem:last-child {
    margin-bottom: 160px;
}

.double-content-wrap > .mixed-content-elem {
    width: calc(50% - var(--content-spacing) / 2);
    margin-bottom: 0 !important;
    margin-top: 0 !important;
}


/* rich text */

.rich-text > p {
    margin-bottom: var(--medium-spacing);
}

.rich-text > p:last-child {
    margin-bottom: 0;
}

.rich-text-center-align {
    text-align: center;
}

/* image */

.image {
    width: 100%;
    opacity: 0;
    transition: opacity 0.3s linear;
}

.image img {
    display: none;
    width: 100%;
}

#cms-content > .mixed-content-elem.image.image-portrait {
    display: flex;
    align-items: center;
    justify-content: center;
}

#cms-content > .mixed-content-elem.image.image-portrait > img {
    width: 50%;
}


/* video */

.video {
    width: 100%;
    opacity: 1;
    transition: opacity 0.3s linear;
}

.iframe-video {
    position: relative;
    width: 100%;
}

.iframe-video-landscape {
    aspect-ratio: 16 / 9;
}

.iframe-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* soundcloud embed */

.soundcloud-embed {
    width: 100%;
    opacity: 1;
    transition: opacity 0.3s linear;
}

.iframe-soundcloud {
    position: relative;
    width: 100%;
}

.iframe-soundcloud iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
}

@media (hover: hover) {
    #dankie-button:hover #dankie-monkey {
        background-color: rgba(186, 218, 85, 0.6);
    }

    #dankie-button:hover #dankie-text > div:first-child {
        display: none;
    }

    #dankie-button:hover #dankie-text > div:last-child {
        display: flex;
    }

    #dankie-button:hover #dankie-monkey p:first-child {
        display: none;
    }

    #dankie-button:hover #dankie-monkey p:last-child {
        display: block;
    }
}

/*  after content collapse */
@media screen and (max-width: 1360px) {
    body {
        overflow-y: auto;
    }
    
    body, main, #content {
        height: unset;
    }
    
    #content {
        padding: 16px 16px 0 16px;
    }

    #content-primary {
        position: unset;
        top: unset;
        left: unset;
        padding: 0;
    }

    #cms-content-primary {
        overflow: unset;
    }

    #cms-content-primary > *:first-child {
        margin-top: var(--content-spacing);
    }
}

@media screen and (max-width: 1000px) {
    .title-letter {
        font-size: var(--title-font-medium);
        width: 22px;
    }
    
    #content {
        width: 100%;
        height: 100%;
        max-width: none;
    }

    h1 {
        font-size: var(--title-font-medium);
    }

    h2, h3, h4, h5, h6 {
        font-size: var(--large-font-medium);
    }

    p, a {
        font-size: var(--medium-font-medium);
    }
}

@media screen and (max-width: 600px) {
    .title-letter {
        width: 16px;
        font-size: var(--title-font-small);
    }
    
    #content {
        padding: 8px 8px 0 8px;
    }

    .mixed-content-elem:first-child {
        margin-top: var(--medium-spacing);
    }

    .mixed-content-elem {
        margin-bottom: var(--medium-spacing);
    }

    h1 {
        font-size: var(--title-font-small);
    }

    h2, h3, h4, h5, h6 {
        font-size: var(--large-font-small);
    }

    p:not(nav p):not(#external-links-wrap p), a:not(nav a):not(#external-links-wrap a) {
        font-size: var(--medium-font-small);
    }
}