@font-face {
    font-family: 'nexa_boldregular';
    font-weight: bold;
    font-style: normal;
    src: url('../fonts/nexa_boldfree_macroman/Nexa_Free_Bold-webfont.eot');
    src: url('../fonts/nexa_boldfree_macroman/Nexa_Free_Bold-webfont.eot?#iefix') format('embedded-opentype'), url('../fonts/nexa_boldfree_macroman/Nexa_Free_Bold-webfont.woff2') format('woff2'), url('../fonts/nexa_boldfree_macroman/Nexa_Free_Bold-webfont.woff') format('woff'), url('../fonts/nexa_boldfree_macroman/Nexa_Free_Bold-webfont.ttf') format('truetype'), url('../fonts/nexa_boldfree_macroman/Nexa_Free_Bold-webfont.svg#nexa_boldregular') format('svg');
}

*,
*::after,
*::before {
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
}

body {
    --background-color: #1d1b22;
    --background-color-2: #342560;
    --background-color-3: #553e9a;
    --text-color: #fff;
    --link-color: #fff;
    --link-hover-color: #fff;
    font-family: 'Roboto Mono', monospace;
    font-weight: 500;
    color: #fff;
    color: var(--text-color);
    background-color: #363dc2;
    background-color: var(--background-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Page Loader */
.js .loading::before {
    content: '';
    position: fixed;
    z-index: 10000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--background-color);
}

.js .loading::after {
    content: '';
    position: fixed;
    z-index: 10000;
    top: calc(50% - 30px);
    left: calc(50% - 30px);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 10px solid var(--background-color-2);
    border-left-color: var(--text-color);
    animation: loaderAnim 0.8s linear infinite forwards;
}

@keyframes loaderAnim {
    to {
        transform: rotate(360deg);
    }
}

main {
    position: relative;
    width: 100%;
    overflow: hidden;
}

a {
    text-decoration: none;
    color: var(--link-color);
    outline: none;
}

a:hover,
a:focus {
    color: var(--link-hover-color);
    outline: none;
}

.hidden {
    position: absolute;
    overflow: hidden;
    width: 0;
    height: 0;
    pointer-events: none;
}

/* Icons */
.icon {
    display: block;
    width: 1.5em;
    height: 1.5em;
    margin: 0 auto;
    fill: currentColor;
}

/* SVG Morph */
.morph-wrap {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.morph {
    position: relative;
    height: 100%;
    fill: var(--background-color-2);
    flex: none;
}

#me {
    /*position: absolute;*/
    width: 400px;
    border: white solid 2px;
    border-radius: 50%;
}

.content {
    position: relative;
    display: grid;
}

.content--fixed {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    z-index: 100;
    pointer-events: none;
    padding: 1.5em;
    grid-template-rows: auto auto 4em;
    grid-template-areas: "header ..."
		"... decotitle"
		"demos decotitle";
}

.content--fixed a {
    pointer-events: auto;
}

.content--layout {
    pointer-events: auto;
    justify-content: center;
    align-content: center;
    grid-template-columns: 150px 150px 150px 150px;
    grid-template-rows: 150px 75px 75px;
    grid-template-areas:
		"... title title title"
		"author ... desc desc"
		"author ... link link";
}

.content__img {
    grid-column: 1 / 3;
    grid-row: 1 / 3;
    opacity: 0.6;
    width: 300px;
    height: 300px;
    border-radius: 5%;
    cursor: pointer;
}

.content__title {
    grid-area: title;
    font-family: 'nexa_boldregular', sans-serif;
    letter-spacing: -0.025em;
    font-size: 8em;
    line-height: 160px;
    margin: 0;
    text-transform: lowercase;
    z-index: 10;
    cursor: pointer;
}

.content-wrap {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    pointer-events: none;
}

.content__home {
    font-family: 'nexa_boldregular', sans-serif;
    letter-spacing: -0.025em;
    font-size: 6em;
    line-height: 160px;
    margin: 0;
}

.content__subtitle {
    text-align: center;
    letter-spacing: -0.025em;
    font-size: 3em;
    /*line-height: 120px;*/
    min-height: 3rem;
    margin: 0;
}

.content__about {
    text-align: center;
    letter-spacing: -0.025em;
    font-size: 1.5em;
    width: 50%;
}

.content__about > p {
    margin-top: 20px;
}

.content__author {
    grid-area: author;
    margin: 0;
    text-transform: uppercase;
    -webkit-writing-mode: vertical-lr;
    writing-mode: vertical-lr;
    padding: 1em;
    text-align: right;
    z-index: 10;
    cursor: pointer;
}

.content__desc {
    grid-area: desc;
    margin: 0;
    z-index: 10;
    padding: 0 1em;
    cursor: pointer;
}

.content__img,
.content__title,
.content__author,
.content__desc {
    transition: transform 0.3s ease-out;
}

.content__link {
    pointer-events: auto;
    grid-area: link;
    align-self: end;
    justify-self: start;
    z-index: 10;
    padding: 0 0.5em 0.15em;
}

/* Different layouts */

/* layout-2 */
.content--layout-2 {
    grid-template-areas:
		"... title title title"
		"desc desc ... author"
		"link link ... author";
}

.content--layout-2 .content__img {
    grid-column: 3 / 5;
    grid-row: 1 / 3;
}

.content--layout-2 .content__desc {
    text-align: right;
}

.content--layout-2 .content__link {
    justify-self: end;
}

.content--layout-2 .content__author {
    justify-self: end;
    align-self: start;
}

/* layout-3 */
.content--layout-3 {
    grid-template-rows: 75px 75px 150px;
    grid-template-areas: "... ... desc desc"
		"author title title title"
		"author ... link link";
}

.content--layout-3 .content__img {
    grid-column: 1 / 3;
    grid-row: 1 / 3;
}

.content--layout-3 .content__desc {
    align-self: end;
}

.content--layout-3 .content__author {
    justify-self: start;
    align-self: start;
}


/* layout-4 */

.content--layout-4 {
    grid-template-areas:
		"title ... ... ..."
		"... author desc desc"
		"... author ... link";
}

.content--layout-4 .content__img {
    grid-column: 2 / 4;
    grid-row: 1 / 3;
}

.content--layout-4 .content__desc {
    align-self: start;
}

.content--layout-4 .content__author {

    justify-self: start;
    align-self: start;
}

/* Header */
.header {
    position: relative;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    z-index: 100;
    grid-area: header;
    align-self: start;
    justify-self: start;
}

.header__title {
    font-size: 1em;
    padding: 0.75em 0;
    margin: 0;
    font-weight: 500;
}

/* Demos */
.demos {
    grid-area: demos;
    align-self: end;
}

.demo {
    display: inline-block;
    position: relative;
    font-size: 0.85em;
    margin: 0 0.25em 0.5em 0;
    padding: 0.35em;
}

.demo .decoshape {
    display: none;
}

.demo--current {
    color: var(--link-hover-color);
    border-color: currentColor;
}

.demo--current .decoshape {
    display: block;
    z-index: -1;
}

/* Deco elements */
.deco {
    pointer-events: none;
}

.deco--title {
    grid-area: decotitle;
    -webkit-writing-mode: vertical-lr;
    writing-mode: vertical-lr;
    text-align: right;
    align-self: end;
    justify-self: end;
}

.pagetop {
    display: none;
    pointer-events: none;
    position: relative;
    font-size: 0.85em;
    margin: 0 0.25em 0.5em 0;
}

.typewriter {
    width: 100%;
    display: inline-block;
    position: relative;
    font-size: 2em;

}

.typewriter:after {
    animation: cursor 1.25s none infinite;
    content: '';
    display: inline-block;
    font-weight: 300;
    width: 0;

}

@keyframes cursor {
    to {
        content: '|';
    }
}

/* Media queries */
@media screen and (max-width: 50em) {

    #me {
        display: block;
        margin-left: auto;
        margin-right: auto;
        margin-top: 25vh;
        width: 80%;
    }

    .content-wrap {
        height: auto;
        min-height: 0px;
    }

    .content--fixed {
        height: auto;
        min-height: 0;
        display: block;
        z-index: 1000;
        position: absolute;
    }

    .content__home {
        margin-top: 1rem;
        font-size: 2.7em;
        line-height: 40px;
    }

    .content__subtitle {
        min-height: 240px;
        font-size: 1.5em;
        line-height: 30px;
        margin-top: 20px;
        width: 90%;
    }

    .content__about {
        text-align: left;
        width: 100%;
        padding: 5px;
        font-size: 1.5em;
        margin: 15vh 5px;

    }

    .header {
        align-items: center;
        flex-direction: column;
    }

    .deco--title {
        display: none;
    }

    .demos {
        text-align: center;
    }

    .hide {
        display: none;
    }

    .pagetop {
        pointer-events: all;
        display: inline-block;
        padding-left: 2em;
        padding-bottom: 2em;
    }
}

@media screen and (max-width: 40em) {
    .content--layout {
        transform: scale3d(0.8, 0.8, 1);
    }
}

@media screen and (max-width: 36em) {
    .content--layout {
        transform: scale3d(0.7, 0.7, 1);
    }
}

@media screen and (max-width: 32em) {
    .content--layout {
        transform: scale3d(0.6, 0.6, 1);
    }

    .content__author,
    .content__desc,
    .content__link,
    .content__link2 {
        font-size: 1.35em;
    }
}