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

@font-face {
    font-family: 'Stop Bullying';
    src: url("../font/stop-bullying.otf");
}

.wip {
    text-align: center;
    position: fixed;
    top: 80px;
    right: 10px;
    z-index: 99;
    font-size: var(--fs-little);
    color: var(--clr-light);
}















/* Custom properties */
:root {
    --ff-primary: 'Roboto', sans-serif;
    --ff-secondary: 'Roboto Mono', monospace;
    --ff-title: 'Stop Bullying', sans-serif;

    --fw-reg: 300;
    --fw-bold: 900;

    --clr-white: #eee;
    --clr-light: #d6d6d6;
    --clr-grey: #888;
    --clr-dark: #333;
    --clr-black: #1a1a1a;
    --clr-accent: #6988e0;
    --clr-gradient: linear-gradient(45deg, #12b4c3, #8c4cfa);
    --clr-nav-1: #12b4c3; /*00ffff*/
    --clr-nav-2: #579cd5; /*aeff00*/
    --clr-nav-3: #7a75eb; /*ffac00*/
    --clr-nav-4: #8c4cfa; /*ff0044*/

    --fs-h1: 3rem;
    --fs-h2: 2.25rem;
    --fs-h3: 1.25rem;
    --fs-nav: .95rem;
    --fs-body: 1rem;
    --fs-little: .8rem;

    --bs: 0.25em 0.25em 0.75em rgba(0,0,0,.25),
            0.125em 0.125em 0.25em rgba(0,0,0,.15);
}

@media (min-width: 800px) {
    :root {
        --fs-h1: 4.5rem;
        --fs-h2: 3.75rem;
        --fs-h3: 1.5rem;
        --fs-nav: 1.3rem;
        --fs-body: 1.125rem;
        --fs-little: .95rem;
    }
}












/* General styles */
html {
    scroll-behavior: smooth;
}

body {
    background: var(--clr-light);
    color: var(--clr-dark);

    position: relative;
    margin: 0;
    font-family: var(--ff-primary);
    font-size: var(--fs-body);
    line-height: 1.6;

    overflow-x: hidden;
}

section {
    padding: calc(5em + 100px) 10vw 20px 10vw;
    min-height: 100vh;
}

section.home {
    padding-top: calc(20vh + 100px);
}

img {
    display: block;
    max-width: 100%;
}

strong {
    font-weight: var(--fw-bold);
}

.logo {
    margin-left: 10vw;
}

.back-to-top {
    position: fixed;
    bottom: 1.5em;
    left: 1em;
    z-index: 5;
    cursor: pointer;
    transition: transform .5s ease-in-out, filter .1s linear;
}

.back-to-top__hidden {
    transform: translateX(-200%) rotate(-180deg);
}

.back-to-top:hover {
    filter: brightness(75%);
}












/* Buttons */
.btn {
    display: inline-block;
    padding: .5em 2.5em;
    background: var(--clr-accent);
    color: var(--clr-dark);
    text-decoration: none;
    cursor: pointer;
    font-size: .8em;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: var(--fw-bold);
    transition: transform 200ms ease-in-out;
}

.btn:hover {
    transform: scale(1.1);
}














/* Typography */
h1,
h2,
h3 {
    line-height: 1;
    margin: 0;
}

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

h2 {
    font-size: var(--fs-h2);
}

h3 {
    font-size: var(--fs-h3);
}

.nav__link {
    color: inherit;

    font-family: var(--ff-title);
    font-weight: var(--fw-reg);
    font-size: var(--fs-nav);
}

.nav__link--active {

}

.section__title {
    margin-bottom: .25em;
}

.section__title--home {
    font-weight: var(--fw-reg);
}

.section__title--home strong {
    display: block;
}

.section__subtitle {
    margin: 0;
    font-size: var(--fs-h3);
}

.section__subtitle--home,
.section__subtitle--about {
    background: var(--clr-gradient);
    font-family: var(--ff-secondary);
    color: var(--clr-white);

    box-shadow: var(--bs);

    margin-bottom: 1em;
    padding: .25em 1em;
}

.section__subtitle--projects {
    color: var(--clr-accent);
    font-weight: var(--fw-bold);
    margin-bottom: 4em;
}

.about__body {
    font-size: var(--fs-body);
    margin-top: 2em;
}















/* Header */
header {
    display: flex;
    justify-content: space-between;
    padding: 1em;
}

.logo {
    width: 65px;
}

.logo a {
    display: inline-grid;
    grid-template-columns: 65px 1fr;
    grid-template-rows: calc(100px - 1em);
}

.logo a img {
    align-self: stretch;
}

.logo a img + img {
    padding-left: 10px;
    display: none;
    align-self: center;
}

.nav {
    position: fixed;
    background: var(--clr-black);
    color: var(--clr-light);
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;

    transform: translateX(100%);
    transition: transform 250ms cubic-bezier(.5, 0, .5, 1);
}

.nav__list {
    list-style: none;
    display: flex;
    height: 100%;
    flex-direction: column;
    justify-content: space-evenly;
    align-items: center;
    margin: 0 0;
    padding: 0;
}

.nav__link {
    text-decoration: none;
    transition: text-shadow 100ms linear;
}

.nav__link:hover {
    text-shadow: var(--clr-nav-3) 4px 8px 3px;
}

.nav__item:first-child .nav__link:hover {
    text-shadow: var(--clr-nav-1) 4px 8px 3px;
}

.nav__item:last-child .nav__link:hover {
    text-shadow: var(--clr-nav-4) 4px 8px 3px;
}

.nav__item:nth-child(2) .nav__link:hover {
    text-shadow: var(--clr-nav-2) 4px 8px 3px;
}

.nav-toggle {
    padding: 1em .5em;
    background: transparent;
    border: 0;
    cursor: pointer;
    position: absolute;
    right: 1em;
    top: 1em;
    z-index: 1000;
}

.nav-open .nav {
    transform: translateX(0);
}

.nav-open .nav-toggle {
    position: fixed;
}

.nav-open .hamburger {
    transform: rotate(.625turn);
}

.nav-open .hamburger::after {
    opacity: 0;
}

.nav-open .hamburger::before {
    transform: rotate(90deg) translateX(-10px);
}

.nav-open .hamburger,
.nav-open .hamburger::before,
.nav-open .hamburger::after {
    background: var(--clr-accent);
}

.hamburger {
    display: block;
    position: relative;
}

.hamburger,
.hamburger::before,
.hamburger::after {
    background: var(--clr-dark);
    width: 2em;
    height: 3px;
    border-radius: 1em;
    transition: transform 250ms ease-in-out;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
}

.hamburger::before {
    top: 10px;
}

.hamburger::after {
    bottom: 10px;
}

.fixed-background {
    object-fit: cover;
    position: fixed;
    z-index: -999;
    margin: 0;
    height: 100vh;
    width: 100vw;
    top: 0;
    left: 0;
}

@media (min-width: 600px) {
    header {
        position: fixed;
        padding: 0.5em;
        z-index: 9;
        width: 100%;
        background-color: var(--clr-black);
        top: 0;
        height: 100px;
    }

    .nav {
        position: static;
        color: var(--clr-light);
        top: 0;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 100;

        transform: translateX(0%);
        transition: none;
    }

    .nav__list {
        list-style: none;
        display: flex;
        height: 100%;
        flex-direction: row;
        justify-content: space-evenly;
        align-items: center;
        margin: 0;
        padding: 1em;
    }

    .nav__item + .nav__item .nav__link {
        padding-left: 3vw;
    }

    .nav-toggle {
        display: none;
    }
}

@media (min-width: 1000px) {
    .logo {
        width: 250px;
    }

    .logo a img + img {
        display: block;
    }
}

















/* Home section */
.home {
    position: relative;
}

.section__title--home {
    background-color: var(--clr-light);
    padding: .5em .4em;
}

@media (min-width: 600px) {
    .home {
        align-items: flex-end;
        padding-top: 25vh;
        display: grid;
        width: min-content;
        margin: 0 auto;
        grid-column-gap: 2vw;
        grid-template-areas:
            "img title"
            "img subtitle";
        grid-template-columns: min-content 1fr;
        grid-template-rows: 160px min-content;
        background-color: var(--clr-light);
    }

    .home__img {
        box-shadow: var(--bs);
        border-radius: 3em;
        grid-area: img;
        min-width: 250px;
        position: relative;
        z-index: 2;
    }

    .section__subtitle--home {
        align-self: start;
        grid-row: 2;
        text-align: right;
        position: relative;
        margin-top: 1em;
        border-radius: .7em;
    }

    .section__title--home {
        background-color: transparent;
        margin: 0;
        padding: 1em 0 0 0;
    }
}

@media (min-width: 1000px) {
    .home {
        grid-template-rows: 175px min-content;
    }

    .home__img {
        min-width: 350px;
    }

    .section__title--home {
        padding: 0;
    }
}



















/* About section */
.about {
    width: 100%;
    background-color: var(--clr-light);
}

.about__img {
    max-width: 100%;
    display: block;
}

.about__img-little {
    display: none;
}

@media (min-width: 600px) {
    .about__content {
        display: grid;
        grid-template-columns: 5fr 3fr;
        grid-template-rows: 100px min-content 1fr;
        grid-column-gap: 2em;

        /*grid-template-areas:*/
        /*"title img"*/
        /*"subtitle img"*/
        /*"text text";*/
    }

    .section__title--about {
        /*grid-area: title;*/
        margin-top: .25em;
    }

    .section__subtitle--about {
        grid-row: 2;
        position: relative;
        padding-left: 1em;
        border-radius: .7em;
        align-self: flex-start;
        margin-bottom: 0;
    }

    /*.about__img {*/
    /*    display: none;*/
    /*}*/

    /*.about__img-little {*/
    /*    grid-area: img;*/
    /*    position: relative;*/
    /*    z-index: 2;*/
    /*    display: block;*/
    /*}*/

    .about__body {
        /*grid-area: text;*/
        grid-column: 1 / -1;
    }
}

@media (min-width: 1300px) {
    .about__content {
        /*grid-template-areas:*/
        /*    "title img"*/
        /*    "subtitle img"*/
        /*    "text img";*/
    }

    /*.about__img {*/
    /*    grid-area: img;*/
    /*    position: relative;*/
    /*    z-index: 2;*/
    /*    display: block;*/
    /*}*/

    /*.about__img-little {*/
    /*    display: none;*/
    /*}*/

    /* temp */
    .about__body {
        font-size: 1.5em;
    }
}


















/* Projects section */
.projects {
    background-color: var(--clr-dark);
    color: var(--clr-light);
    text-align: center;
}

.portfolio {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    position: relative;
    z-index: 0;
}

.portfolio__item {
    /*background: var(--clr-accent);*/
    overflow: hidden;
    border-radius: .7em;
    margin: .3em;
    transition: transform 100ms ease-in-out;
    position: relative;
    pointer-events: none;
}

.portfolio__item::before {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
    z-index: 10;
    content: '';
    opacity: 0;
    box-shadow: inset 0 0 3em var(--clr-accent);
    transition: opacity 300ms ease-in-out;
}

.portfolio__img {
    transition: transform 750ms cubic-bezier(.5, 0, .5, 1);
    position: relative;
    z-index: -1;
    pointer-events: auto;
}

.portfolio__item:hover {
    transform: translateY(-10px);
}

.portfolio__item:hover::before {
    opacity: 1;
}

.portfolio__img:hover {
    transform: scale(1.2);
}




















/* Stream section */
.stream {
    background-color: var(--clr-dark);
    background-image: url(../img/background/services-bg.jpg);
    background-size: cover;
    background-position: center;
    color: var(--clr-light);
    text-align: center;
}

.section__title--stream {
    color: var(--clr-accent);
    position: relative;
}

.section__title--stream::after {
    content: '';
    display: block;
    width: 25%;
    height: 1px;
    margin: .5em auto 1em;
    background: var(--clr-light);
    /*background: currentColor;*/
    opacity: .25;
}

.services {
    margin-bottom: 4em;
}

.service {
    max-width: 500px;
    margin: 0 auto;
}

@media (min-width: 800px) {
    .services {
        display: flex;
        max-width: 1000px;
        margin-left: auto;
        margin-right: auto;
    }

    .service + .service {
        margin-left: 2em;
    }
}















/* Footer */
.footer {
    width: 100%;
    background: var(--clr-black);
    text-align: center;
}

.footer__absolute {
    position: absolute;
    bottom: 0;
}

.footer a {
    text-decoration: none;
}

.footer div {
    padding-top: 1.5em;
    font-size: var(--fs-little);
    color: var(--clr-grey);
}

.legals__mobile {
    font-size:  var(--fs-h3);
}

.legals {
    display: none;
}

.footer__mail {
    color: var(--clr-accent);
}

.footer__link {
    color: var(--clr-light);
}

.social-list {
    list-style: none;
    display: flex;
    justify-content: center;
    padding: 0 0 .5em;
    margin: 0;
}

.social-list__link {
    padding: .5em;
    color: var(--clr-accent);
}

.footer__mail:hover,
.footer__link:hover {
    text-decoration: underline;
}

.footer__mail:hover,
.footer__link:hover,
.social-list__link:hover {
    opacity: .7;
    cursor: pointer;
}

.footer__mail,
.social-list {
    font-size: var(--fs-h3);
}

@media(min-width: 600px)
{
    .footer div {
        margin: 0 115px;
    }

    .legals__mobile {
        display: none;
    }

    .legals {
        display: block;
    }

    .social-list__item {
        margin: 0 .5em;
    }
}