@import url('https://fonts.googleapis.com/css2?family=Alegreya&family=Playfair+Display&display=swap');

@keyframes fadein{
    0%{
        transform: scale(200%, 0%);
        filter: opacity(0) saturate(0%);
    }
    100%{
        transform: scale(100%, 100%);
        filter: opacity(100%) saturate(0%);
    }
}

@keyframes flashin{
    0%{
        transform: scale(0%, 0%);
        filter: saturate(200%) brightness(200%);
        box-shadow: inset 0 0 99999px white;
        filter: saturate(0%)
    }
    50%{
        box-shadow: inset 0 0 10px white;
        transform: scale(100%, 100%);
    }
    60%{
        box-shadow: inset 0 0 5px white, var(--white_glow);
    }
    100%{
        box-shadow: inset 0 0 0px white, var(--white_glow);
    }
}

@keyframes leftfadeslide{
    0%{
        transform: translateX(-100%);
        opacity: 0;
    }
    90%{
        opacity: 100%;
    }
    100%{
        transform: translateX(0%);
    }
}

@keyframes shinytitle{
    0%{
        background-position: left;
    }
    50%{
        background-position: center;
    }
    100%{
        background-position: right;
    }
}

:root{
    --black: #0f0f0f;
    --gold: #c99509;
    --white: #EAEAEA;
    --white_glow: 0 0 5px var(--white),
                  0 0 7px var(--white),
                  0 0 10px var(--white),
                  0 0 12px var(--white),
                  0 0 16px var(--white);
}

html{
    scroll-behavior: smooth;
    width: 100%;
}

*{
    z-index: 100;
    font-family: 'Alegreya', 'Playfair Display', serif;
}

.fadeintransition, .flashintransition, .leftfadeslidetransition{
    visibility: hidden;
}

img{
    max-width: 100%;
}

#hp a{
    overflow: hidden;
}

a{
    text-decoration: none;
    color: var(--black);
    transition: text-shadow 0.2s ease-in-out;

    text-shadow: 0 0 5px var(--white),
                 0 0 7px var(--white),
                 0 0 10px var(--white),
                 0 0 12px var(--white),
                 0 0 16px var(--white),
                 0 0 50px var(--white),
                 0 0 70px var(--white);
}

a:hover{
    color: var(--white);
    text-shadow: 0 0 5px var(--gold),
                 0 0 7px var(--gold),
                 0 0 10px var(--gold),
                 0 0 12px var(--gold),
                 0 0 16px var(--gold),
                 0 0 50px var(--gold),
                 0 0 70px var(--gold);
}

a.redirects, div#contact > a{
    filter: saturate(0%);
    transition: box-shadow 0.15s ease-in-out, filter 0.2s ease
}

a.redirects:hover, div#contact > a:hover{
    box-shadow: 0 0 5px var(--gold),
                 0 0 7px var(--gold),
                 0 0 10px var(--gold),
                 0 0 12px var(--gold),
                 0 0 16px var(--gold),
                 0 0 50px var(--gold),
                 0 0 70px var(--gold);
    filter: saturate(100%);
}

p{
    padding: 10px;
    line-height: normal;
}

wbr{
    margin-right: 3vw;
}

body{
    display: flex;
    flex-direction: column;
    width: 100%;
    margin: 0;
    background-color: var(--black);
    min-height: 100vh;
}

nav{
    position: sticky;
    display: flex;
    top: 0px;
    width: 100%;
    z-index: 1000;
    height: 8vh;
    border-radius: 0 0 30px 30px;
    align-self: center;
    justify-content: center;

    background-image: url(../media/obsidian.jpg);
    background-size: 2000px;
    background-position: top 200px left;
}

nav > a{
    position: relative;
    top: 50%;
    transform: translateY(-50%);
    flex: 1 2 50px;

    text-align: center;
    color: var(--black);
    font-size: calc(1em + 1vw);
    font-family: "Playfair Display", serif;
}

a#logo{
    margin: 0;
    padding: 0;
    background: none;
    box-shadow: none;
    backdrop-filter: none;
}

footer{
    position: relative;
    bottom: 0;
    display: flex;
    width: 90%;
    padding: 20px 2.5%;
    align-self: center;
    justify-content: space-between;
    align-items: center;
    gap: 3vw;
    flex-flow: wrap;

    background-color: var(--black);
    box-shadow: var(--white_glow);
    border-radius: 25px 25px 0 0;
}

footer *{
    position: relative;
}

footer > a{
    bottom: 0;
    height: 100%;
    display: flex;
    place-self: center;
    gap: 1vw;
    filter: saturate(0%);
    transition: filter 0.2s ease;
}

footer > a:hover{
    filter: saturate(100%);
}

footer > a > img{
    width: 30px;
    height: 30px;
    object-fit: contain;
    place-self: center;
    box-shadow: var(--white_glow);
    border-radius: 10px;
    background-color: var(--white);
    padding: 2px
}

footer > a > p{
    place-self: center;
    font-size: 16pt;
    transition: text-shadow 0.2s ease-in-out;
}

form{
    display: grid;
    grid-template-columns: 1fr 1fr;
    background-color: var(--black);
    box-shadow: var(--white_glow), inset 0 0 40px 10px var(--white);
    margin: 30px;
    padding: 30px;
}

form *{
    margin: 1em 0;
    place-self: center;
}

form > header{
    font-size: calc(2rem + 0.4vw);
    grid-column: 1/-1;
    text-align: center;
    
    height: 50px;
}

label{
    color: var(--white);
    font-size: calc(1rem + 0.4vw);
    text-align: center;
    display: grid;
}

input, textarea{
    box-shadow: 0 0 5px var(--gold),
                0 0 7px var(--gold),
                0 0 10px var(--gold),
                0 0 12px var(--gold),
                0 0 16px var(--gold),
                0 0 50px var(--gold),
                0 0 70px var(--gold);
    font-size: calc(0.8rem + 0.4vw);
    margin: 10px;
}


input[type="text"], input[type="tel"], input[type="email"], textarea{
    width: 100%;
}

input[type="radio"], input[type="checkbox"]{
    width: 25px;
    height: 25px;
}


::placeholder{
    font-size: inherit;
}

form > div{
    width: 90%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    place-items: center;
}

button{
    width: 30%;
    height: 50px;
    margin: 3em;
    transition: box-shadow 0.15s ease-in-out, filter 0.2s ease
}

button[type="submit"]:hover{
    box-shadow: 0 0 5px rgb(4, 177, 62),
                 0 0 7px rgb(4, 177, 62),
                 0 0 10px rgb(4, 177, 62),
                 0 0 12px rgb(4, 177, 62),
                 0 0 16px rgb(4, 177, 62),
                 0 0 50px rgb(4, 177, 62),
                 0 0 70px rgb(4, 177, 62);
}

@media screen and (max-width: 820px){
    a#logo{
        display: block;
    }
}

@media screen and (max-width: 1000px){
    div#hp{
        display: grid;
        grid-template-columns: 1fr;
        grid-template-rows: repeat(4, 0.5fr 0.75fr);
        grid-template-areas: "tales"
                             "taleslink"
                             "skills"
                             "skillslink"
                             "progress"
                             "progresslink"
                             "contacts"
                             "contactslink";
        padding: 10vh 0;
        width: 90%;
        column-gap: 3vw;
    }

    div#hp > h1{
        align-self: self-end;
    }
}

@media (prefers-reduced-motion: no-preference) {
    .fadein{
        animation: fadein;
        animation-duration: 1s;
        animation-iteration-count: 1;
        animation-timing-function: cubic-bezier(1, 0, 0, 1);
    }

    .flashin{
        animation: flashin;
        animation-duration: 1s;
        animation-iteration-count: 1;
        animation-timing-function: cubic-bezier(1, 0, 0, 1);
    }

    .leftfadeslide{
        animation: leftfadeslide;
        animation-duration: 2s;
        animation-iteration-count: 1;
        animation-timing-function: cubic-bezier(1, 0, 0, 1);
    }

    .shiny{
        animation: shinytitle;
        animation-duration: 3s;
        animation-iteration-count: infinite;
    }
}