/*===============================================
== Variables
=================================================*/

:root {
    --transitionSpeed: 0.1s;
    --altHoverSpeed: 0.5s;
    --animationSpeed: 2s;

    /* Sizes */
    --padding: 10px;
    --shadowSize: 4px;
    --borderSize: 2px;
    --radius: 8px;
    --buttonSize: 20px;
    --sidebarSize: 350px;

    /* Text colors */
    --textColor-lightContrast: rgb(240, 240, 250);
    --textColor-light: rgb(180, 180, 190);
    --textColor-dark: rgb(20, 20, 24);
    --textColor-darkContrast: rgb(4, 4, 6);

    /* Panel colors */
    --color-highlight: rgb(130, 130, 146);
    --color-midTint: rgb(80, 80, 94);
    --color-mid: rgb(44, 44, 48);
    --color-base: rgb(30, 30, 34);
    --color-dark: rgb(18, 18, 20);

    /* Accent colors */
    --color-blue: rgb(40, 223, 247);
    --color-lightblue: rgb(175, 255, 255);
    --color-indigo: rgb(91, 111, 133);
    --color-purple: rgb(113, 117, 179);

    /* Transparent colors */
    --color-shadow: rgba(0, 0, 0, 0.5);
}

/*===============================================
== Fonts
=================================================*/

@font-face {
    font-family: 'TellYouWhat';
    src: url(./src/TellYouWhatv1b.woff);
}

@font-face {
    font-family: 'TellYouWhat-light';
    src: url(./src/TellYouWhatlight.woff);
}

/*===============================================
== Animations
=================================================*/

@keyframes fly-in-right {
    from {
        opacity: 0;
        top: 100px;
        left: -100vw;
        transform: rotate(-20deg);
    }
    to {
        opacity: 1;
        top: 0px;
        left: 0px;
        transform: rotate(0deg);
    }
}

@keyframes fly-in-left {
    from {
        opacity: 0;
        top: 100px;
        left: 100vw;
        transform: rotate(20deg);
    }
    to {
        opacity: 1;
        top: 0px;
        left: 0px;
        transform: rotate(0deg);
    }
}

@keyframes fade-in {
    from {
        opacity: 0;
        top: 20px;
    }
    to {
        opacity: 1;
        top: 0px;
    }
}

@keyframes fade-out {
    from {
        opacity: 1;
        top: 0px;
    }
    to {
        opacity: 0;
        top: 20px;
    }
}

.fly-right {
    animation-name: fly-in-right;
    animation-timing-function: cubic-bezier(0.075, 0.82, 0.165, 1);
    animation-duration: var(--animationSpeed);
}

.fly-left {
    animation-name: fly-in-left;
    animation-timing-function: cubic-bezier(0.075, 0.82, 0.165, 1);
    animation-duration: var(--animationSpeed);
}

.fade-in {
    animation-name: fade-in;
    animation-timing-function: cubic-bezier(0.445, 0.05, 0.55, 0.95);
    animation-duration: var(--animationSpeed);
}

.fade-out {
    animation-name: fade-in;
    animation-timing-function: cubic-bezier(0.075, 0.82, 0.165, 1);
    animation-duration: var(--animationSpeed);
}

/*===============================================
== Comon
=================================================*/

body {
    padding: 0px;
    margin: 0px 0px 50px;

    background-image: linear-gradient(var(--color-base), var(--color-dark));
    /* background-image: url(./src/SpaceBG.jpg); */
    background-attachment: fixed;

    color: var(--textColor-light);
    font-family: 'TellYouWhat-light';
    font-size: 16px;

    text-align: center;
    /* overflow: hidden; */
}

h1 {
    position: relative;
    display: block;

    /* margin: 5vw auto; */
    margin: 25px 0px;

    font-size: 50px;

    background: linear-gradient(var(--color-blue), var(--color-lightblue));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;

    font-family: 'TellYouWhat';
    font-weight: normal;
    /* letter-spacing: 0.05em; */

    /* text-shadow: 0px 10px 20px var(--color-shadow); */
    /* text-shadow: 0px 10px 20px red; */

    z-index: 10;
}

h2 {
    font-weight: normal;
    font-size: 40px;
}

/*===============================================
== Header
=================================================*/

.header {
    display: block;
    position: relative;

    top: 0px;
    left: 0px;

    padding: 25px 0px 50px 0px;
    /* margin: 5vw auto; */

    width: 100%;
    height: auto;
    /* height: 80px; */

    /* line-height: 80px; */

    background-color: var(--color-shadow);
}

a {
    position: relative;
    /* top: 30px; */
    margin: auto 5px;
    z-index: 10;
}

.header > a {
    display: inline-block;
    position: relative;

    height: 20px;

    text-decoration: none;
    color: var(--textColor-light);
    line-height: 20px;
    white-space: nowrap;

    vertical-align: middle;

    border-bottom: 2px solid #ffffff00;
    transition: 0.2s;
}

.header > a:hover {
    border-bottom: 2px solid #ffffff88;
}

.header > a > img {
    display: inline-block;
    position: relative;

    height: 20px;
}

.header > a > span {
    display: inline-block;
    position: relative;

    top: -4px;
    height: 20px;
    padding-left: 8px;
}

.header h1 {
    margin: 25px auto;
}

/*===============================================
== Background
=================================================*/

#background-canvas, #background-color {
    display: inline-block;
    position: fixed;

    width: 100%;
    height: 100%;

    top: 0px;
    left: 0px;
}

#background-canvas {
    filter: brightness(1.25) contrast(1.125);
    /* filter: contrast(1.5); */
}

#background-color {
    /* background-image: linear-gradient(-45deg, var(--color-indigo), var(--color-blue), var(--color-indigo)); */
    background-image: radial-gradient(var(--color-blue), var(--color-purple));
    mix-blend-mode: color;
    opacity: 0.25;
}

/*===============================================
== Projects
=================================================*/

.link-holder {
    display: inline-block;
    position: relative;

    padding-top: var(--padding);

    width: 100%;
    height: auto;

    z-index: 0;

    user-select: none;
}

.link-project {
    all: unset;
    position: relative;
    display: inline-block;

    top: 0px;
    left: 0px;

    margin: var(--padding);

    width: 300px;
    height: 150px;

    /* background: linear-gradient(var(--color-dark), var(--color-base)); */
    background: transparent;

    border-radius: var(--radius);
    border: var(--borderSize) solid var(--color-mid);

    box-shadow: none;

    overflow: hidden;
    cursor: pointer;

    transition: var(--transitionSpeed);
}

.link-project:hover {
    border: var(--borderSize) solid var(--color-lightblue);
    box-shadow: 0px 0px 15px var(--color-blue);
}

.link-project img {
    position: absolute;
    display: block;

    width: 300px;
    height: 150px;
    border-radius: var(--radius);

    /* filter: blur(5px); */
    transform: scale(1.05);

    transition: var(--altHoverSpeed);

    z-index: -1;
}

.link-project > div {
    position: absolute;
    display: flex;
    flex-direction: column;
    text-align: center;
    justify-content: center;

    width: 300px;
    height: 150px;
    border-radius: var(--radius);

    /* color: var(--color-blue); */

    /* background-image: url(./src/Pannel_Single.png);
    background-size: contain;
    background-position: center; */

    transform: scale(1.05);

    transition: var(--altHoverSpeed);

    z-index: -1;
}

.link-project > div > h1 {
    opacity: 1;
    transition: calc(var(--transitionSpeed) * 2);

}

.link-project:hover > div > h1 {
    opacity: 0;
}

.link-project > div::after, .link-project > div::before {
    display: block;
    position: absolute;
    content: "";
    width: 100%;
    height: 100%;
    top: 0px;
    left: 0px;
    background-size: contain;
    background-position: center;
    
    transition: calc(var(--transitionSpeed) * 2);
    z-index: 1;
}

.link-project > div::after {
    background-image: url(./src/panel_door_top.png);
}

.link-project > div::before {
    background-image: url(./src/panel_door_bottom.png);
}

.link-project:hover > div::after {
    top: -75px;
}

.link-project:hover > div::before {
    top: 75px;
}

.link-project .behind {
    z-index: -2;
}

.link-project:hover * {
    transform: scale(1);
}

.link-project .prev {
    opacity: 0;
    transition: var(--altHoverSpeed);
    transition-delay: calc(var(--altHoverSpeed) / 2);
}

.link-project:hover .prev {
    opacity: 1;
}

.link-cover {
    display: inline-block;
    position: absolute;

    width: 100%;
    height: 20px;

    margin: 65px auto;

    top: 0px;
    left: 0px;

    line-height: 20px;

    background-color: var(--color-shadow);
}
