* {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    display: -ms-grid;
    display: grid;
    place-items: center;
    height: 100vh;
    background-color: black;
    margin: 0rem;
    overflow: hidden;
    font-family: 'Space Mono', monospace;
}

h1 {
    font-size: clamp(3rem, 10vw, 10rem);
    color: white;
    -webkit-border-radius: clamp(0.4rem, 0.75vw, 1rem);
    -moz-border-radius: clamp(0.4rem, 0.75vw, 1rem);
    border-radius: clamp(0.4rem, 0.75vw, 1rem);
}

.container {
    display: -webkit-box;
    display: -webkit-flex;
    display: -moz-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -webkit-flex-direction: column;
    -moz-box-orient: vertical;
    -moz-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -moz-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    -moz-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    height: 100vh;
}

.grid-container {
    display: -webkit-box;
    display: -webkit-flex;
    display: -moz-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: horizontal;
    -webkit-box-direction: normal;
    -webkit-flex-direction: row;
    -moz-box-orient: horizontal;
    -moz-box-direction: normal;
    -ms-flex-direction: row;
    flex-direction: row;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -moz-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    -moz-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    height: 100%;
}

.grid {
    display: -ms-grid;
    display: grid;
    -ms-grid-columns: 1fr 10px 1fr 10px 1fr;
    grid-template-columns: repeat(3, 1fr);
    -ms-grid-rows: 1fr 10px 1fr 10px 1fr;
    grid-template-rows: repeat(3, 1fr);
    grid-gap: 10px;
    width: 40vw;
    -webkit-border-radius: 10px;
    -moz-border-radius: 10px;
    border-radius: 10px;
    top: 0px;
}

.grid>*:nth-child(1) {
    -ms-grid-row: 1;
    -ms-grid-column: 1;
}

.grid>*:nth-child(2) {
    -ms-grid-row: 1;
    -ms-grid-column: 3;
}

.grid>*:nth-child(3) {
    -ms-grid-row: 1;
    -ms-grid-column: 5;
}

.grid>*:nth-child(4) {
    -ms-grid-row: 3;
    -ms-grid-column: 1;
}

.grid>*:nth-child(5) {
    -ms-grid-row: 3;
    -ms-grid-column: 3;
}

.grid>*:nth-child(6) {
    -ms-grid-row: 3;
    -ms-grid-column: 5;
}

.grid>*:nth-child(7) {
    -ms-grid-row: 5;
    -ms-grid-column: 1;
}

.grid>*:nth-child(8) {
    -ms-grid-row: 5;
    -ms-grid-column: 3;
}

.grid>*:nth-child(9) {
    -ms-grid-row: 5;
    -ms-grid-column: 5;
}

.grid-item {
    background-color: #949090;
    border-radius: 10px;
    -webkit-border-radius: 10px;
    -moz-border-radius: 10px;
    -ms-border-radius: 10px;
    -o-border-radius: 10px;
    aspect-ratio: 1/1;
    height: 90%;
    -webkit-animation-fill-mode: forwards;
    -moz-animation-fill-mode: forwards;
    -o-animation-fill-mode: forwards;
    animation-fill-mode: forwards;
    /* transition: background-color 0.3s ease; */
}

.grid-item:hover {
    -moz-animation: fade-in-out 5s forwards;
    -o-animation: fade-in-out 5s forwards;
    animation: fade-in-out 5s forwards;
    -webkit-animation: fade-in-out 5s forwards;
}

.personal-info {
    font-size: clamp(1rem, 2vw, 2rem);
    margin-left: 20px;
    color: #fff;
}

h3,
h2 {
    margin: 0 0 10px 0;
    line-height: 1.5;
    color: #fff;
    font-weight: lighter;
}

a {
    color: #fff;
    text-decoration: none;
    border-bottom: 1px solid #fff;
    -webkit-transition: border-bottom 0.2s ease-in-out;
    -o-transition: border-bottom 0.2s ease-in-out;
    -moz-transition: border-bottom 0.2s ease-in-out;
    transition: border-bottom 0.2s ease-in-out;
}

a:hover {
    border-bottom: 1px solid transparent;
}

@-webkit-keyframes fade_in {
    0% {
        background-color: var(--bg-color, #949090);
    }
    100% {
        background-color: var(--hover-color);
    }
}

@-moz-keyframes fade_in {
    0% {
        background-color: var(--bg-color, #949090);
    }
    100% {
        background-color: var(--hover-color);
    }
}

@-o-keyframes fade_in {
    0% {
        background-color: var(--bg-color, #949090);
    }
    100% {
        background-color: var(--hover-color);
    }
}

@keyframes fade_in {
    0% {
        background-color: var(--bg-color, #949090);
    }
    100% {
        background-color: var(--hover-color);
    }
}

@-webkit-keyframes fade_out {
    0% {
        background-color: var(--bg-color, #949090);
    }
    100% {
        background-color: #949090;
    }
}

@-moz-keyframes fade_out {
    0% {
        background-color: var(--bg-color, #949090);
    }
    100% {
        background-color: #949090;
    }
}

@-o-keyframes fade_out {
    0% {
        background-color: var(--bg-color, #949090);
    }
    100% {
        background-color: #949090;
    }
}

@keyframes fade_out {
    0% {
        background-color: var(--bg-color, #949090);
    }
    100% {
        background-color: #949090;
    }
}


/* set the hover color for each element using the data-hover-color attribute */

.grid-item[data-hover-color="green"] {
    --hover-color: green;
}

.grid-item[data-hover-color="brown"] {
    --hover-color: #7B3F00;
}

.grid-item[data-hover-color="red"] {
    --hover-color: red;
}

.grid-item[data-hover-color="purple"] {
    --hover-color: purple;
}

.grid-item[data-hover-color="black"] {
    --hover-color: black;
}

.grid-item[data-hover-color="orange"] {
    --hover-color: #F08000;
}

.grid-item[data-hover-color="blue"] {
    --hover-color: blue;
}

.grid-item[data-hover-color="pink"] {
    --hover-color: #9F2B68;
}

.grid-item[data-hover-color="yellow"] {
    --hover-color: yellow;
}

#shortmail,
#shortgit {
    display: none;
}

@media only screen and (max-width: 600px) {
    .grid {
        display: none;
    }
    .grid-container {
        height: 100vh;
        width: 100vw;
    }
    .personal-info {
        height: 100vh;
        width: 100vw;
        display: -webkit-box;
        display: -webkit-flex;
        display: -moz-box;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
        -webkit-flex-direction: column;
        -moz-box-orient: vertical;
        -moz-box-direction: normal;
        -ms-flex-direction: column;
        flex-direction: column;
        -webkit-box-align: center;
        -webkit-align-items: center;
        -moz-box-align: center;
        -ms-flex-align: center;
        align-items: center;
        -webkit-box-pack: center;
        -webkit-justify-content: center;
        -moz-box-pack: center;
        -ms-flex-pack: center;
        justify-content: center;
    }
    h1 {
        font-size: 7.5rem;
    }
    h2 {
        font-size: 3rem;
    }
    h3 {
        font-size: 1.25rem;
    }
    #shortmail,
    #shortgit {
        display: block;
    }
    #mail,
    #git {
        display: none;
    }
}