:root {
    overflow-x: hidden;
}

@keyframes header-text-move {
    0% {transform: translateY(-45px);}
    15% {transform: translateY(5px);}
    35% {transform: translateY(-10px);}
    50% {transform: translateY(0);}
    100% {transform: translateY(0);}
}

body {
    background-color: #0b0c10;
    font-family: 'Roboto Condensed', sans-serif;
    color: #e4dddd;

    /* dot pattern from url('https://www.magicpattern.design/tools/css-backgrounds') */
    background-image:  radial-gradient(#1f2833 2px, transparent 2px), radial-gradient(#1f2833 2px, #0b0c10 2px);
    background-size: 80px 80px;
    background-position: 0 0,40px 40px;
}

#wrapper {
    margin: 1em 0.5em;

    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto auto;
    grid-template-areas: 
        'head'
        'bio'
        'skills'
        'projects';
    
}

.border {
    margin: 0.2em;
    position: relative;
    background: linear-gradient(45deg, #66fcf1, #1f2833, #1f2833);
    padding: 0.01em;
    box-shadow: 3px 5px 4px #030305;
    border-radius: 8px;

    transition:all 0.3s ease-out; 
    -webkit-transition:all 0.3s ease-out;
}

.border>* {
    margin: 0.2em;
    padding: 1em;
    justify-self: center;
    background-color: #1f2833;
    border-radius: 5px;
}

#header {
    grid-area: head;
    display: grid;
    grid-template-columns: auto auto auto;
    justify-self: start;
}

.tab {
    transition: 0.5s;
}

.tab:hover {
    background-color: #45a29e;
    box-shadow: 0px 0px 10px #66fcf1;
}

#for-bio {
    grid-area: bio;
}

#bio {
    text-align: right;
}

#for-skills {
    grid-area: skills;
}

#for-projects {
    grid-area: projects;
}

#project-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 1em;
    justify-content: space-around;
}

::-webkit-scrollbar {
    width: 10px;
  }
::-webkit-scrollbar-track {
    background: #0b0c10;
  }
::-webkit-scrollbar-thumb {
    background: #1f2833;
    border-radius: 5px;
  }
::-webkit-scrollbar-corner {
    background: #0b0c10;
  }

/* highlight */
::selection {
    background: #0b0c10; 
  } 
::-moz-selection {
    background: #0b0c10;
  }
/* Text */
h2 {
    font-family: 'Kanit', sans-serif;
    margin: 0.3em;
    background: -webkit-linear-gradient(#45a29e, #66fcf1);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation-name: header-text-move;
    animation-duration: 1.2s;
}

a {
    text-decoration: none;
    font-weight: 600;
    color: #c5c6c7;
    transition: 0.5s;
}

a>i:hover {
    color: #45a29e;
}

.tab:hover>a {
    color: #0b0c10;
}

ul {
    column-count: 3;
}

.fa-li:hover {
    color: #66fcf1;
}

/* Images */
.icons {
    padding-right: 2em;
}

#idphoto {
    float: left;
    margin-right: 2em;
    border-style: solid;
    border-width: 2px;
    border-radius: 3px;
    border-color: #3D5467;
}

#idphoto:hover {
    transition: 0.5s;
    box-shadow: 0px 0px 10px #66fcf1;
    border-color: #66fcf1;
}

.placeholder {
    width: 200px;
}

.project-display {
    height: 350px;
    width: 200px;
    display: flex;
    flex-direction: column;
    text-align: center;
}

.project-display:hover {
    transform: scale(105%);
    transition: all 0.2s;
}

/* Tablet Display */
@media screen and (min-width: 680px) {

    @keyframes menu-move {
        0% {transform: rotate(0);}
        33% {transform: rotate(-3deg);}
        66% {transform: rotate(3deg);}
        100% {transform: rotate(0);}
    }

    #wrapper>* {
        margin: 0.5em;
    }

    #for-bio {
        width: fit-content;
        justify-self: right;
        margin-right: 2.5em;
    }

    #for-skills {
        margin-right: 4em;
    }

    #for-projects {
        margin-left: 2em;
    }

    #header {
        margin-left: 3em;
    }

    #header>.border:hover {
        animation-name: menu-move;
        animation-duration: 2s;
        animation-iteration-count:infinite;
    }
}

/* Desktop Display */
@media screen and (min-width: 1024px) {

    #wrapper {
        grid-template-columns: 2fr 1fr;
        grid-template-rows: auto auto 95%;
        grid-template-areas: 
            'head bio'
            'skills bio'
            'projects projects';
    }

    #wrapper>* {
        height: fit-content;
    }

    #for-bio {
        justify-self: center;
    }

    #for-skills {
        margin: 1em;
        justify-self: center;
        align-self: end;
    }

    #for-projects {
        width: 90vw;
    }

}

@media (prefers-reduced-motion) {
    * {
        transition: none;
    }
  }