@font-face {
    font-family: 'Tiny5';
    src: url('fonts/Tiny5-Regular.ttf');
}

:root {
    --grid-title-size: 24px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    width: 100%;
    height: 100%;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 100%;
    height: 100%;
    color: white;
    font-family: 'Verdana';
}

h1, h2 {
    font-family: Tiny5;
}

a {
    color: cyan;
    cursor: pointer;

    &:hover {
        text-decoration: none;
    }
}

.header {
    grid-area: header;
    display: flex;
    align-items: end;
}

.scroll-y {
    overflow-y: scroll;
}

a.invisible-link {
    text-decoration: none;
    color: white;
}

.wip::after {
    content: ' (WIP)';
}

::-webkit-scrollbar {
    width: 3px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: white;
}

/* Background */
.background {
    position: fixed;
    background-color: black;
    background-image: url('images/stars.png');
    background-position-x: -2559px;
    background-repeat: repeat;
    z-index: -9999;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    animation: scroll 120s linear infinite;
    -webkit-animation: scroll 120s linear infinite;
}

@keyframes scroll {
    0% {
        background-position-x: 0;
    }
    100% {
        background-position-x: 2559px;
    }
}

/* Grid */
.grid {
    display: grid;
    grid-gap: 1.2rem;
}

.grid .block {
    background: black;
    border: 2px solid white;
    display: flex;
    flex-direction: column;
    transition: transform 0.5s ease;
}

@media(min-width: 1140px) {
    .grid .block:hover {
        transform: scale(1.01);
    }
}

.grid .title {
    margin: 0;
    padding: 2px;
    background: white;
    color: black;
    text-align: center;
    font-size: var(--grid-title-size);
}

/* Base */
main {
    grid-area: main;
    min-height: 100%;
}

.menu { grid-area: menu; }
footer { grid-area: footer; }

.grid.base {
    height: 70%;
    width: 60%;
    /* min-width: 600px; */
    grid-template-columns: 1fr 4fr;
    grid-template-rows: auto 1fr auto;
    grid-template-areas:
        "header header"
        "menu   main"
        "footer footer";
}

.menu {
    font-size: 1em;
}

.main-block {
    height: 100%;
}

/* Home */
#about-block { grid-area: about; }
#news-block { grid-area: news; }
#buttons-block { grid-area: buttons; }
#projects-block { grid-area: projects; }
#other-block { grid-area: other; }
#friends-block { grid-area: friends; }

.grid.home {
    width: 100%;
    height: 100%;
    grid-template-columns: 1.5fr 1fr 1fr;
    grid-template-rows: 1fr 1fr 2fr 2fr;
    grid-template-areas:
        "about about    about"
        "news  projects buttons"
        "news  projects friends"
        "news  other    other";
}

.block-content {
    padding: 10px;
}

/* About */
#about p {
    padding: 10px;
}

/* Friends */
#friends {
    display: grid;
    grid-gap: 1em;
}

/* My Button(s) */
#buttons {
    display: flex;
    flex-direction: column;

    textarea {
        resize: none;
    }
}

/* Projects */
#projects {
    display: flex;
    flex-direction: column;
    overflow-y: scroll;
}

.project {
    display: flex;
    flex-direction: row;
    border: 2px dashed white;
    padding: 10px;
    margin-bottom: 10px;
}

.project p {
    font-size: 0.8em;
    color: gray;
}

/* News */
#news {
    overflow-y: scroll;
}

.listed-post {
    border: 2px dashed white;
    padding: 10px;
    margin-bottom: 10px;
}

.listed-post-meta {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: top;
}

.meta-value {
    color: gray;
}

/* Other */
#other {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}

/* Footer */
footer {
    display: flex;
    flex-direction: column;
    padding: 5px;
    margin-bottom: 36px;
}

footer .bottom {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

/* Trees */
.tree {
    --disabled: #666;

    position: relative;
    padding: 10px 30px 10px 30px;
    line-height: 1.5;
    list-style: none;
    margin: 0;

    li::before {
        position: relative;
        top: 4px;
        left: -6px;
        content: url('icons/folder.svg');
    }

    li.wip::before {
        color: var(--disabled);
    }

    li {
        padding: 5px 0 5px 0;
    }
    li.wip {
        filter: brightness(50%);
    }

    ul {
        padding-left: 5px;
        list-style: none;

        li {
            position: relative;
            padding-top: 5px;
            padding-bottom: 5px;
            padding-left: 15px;
            -webkit-box-sizing: border-box;
            -moz-box-sizing: border-box;
            box-sizing: border-box;

            &:before {
                position: absolute;
                top: 18px;
                left: 0;
                width: 10px;
                height: 2px;
                margin: auto;
                content: '';
                background-color: white;
            }

            &:after {
                position: absolute;
                top: 3px;
                bottom: 0;
                left: 0;
                width: 2px;
                height: 100%;
                content: '';
                background-color: white;
            }

            &:first-child {
                margin-top: 5px;
            }

            &:last-child:after {
                height: 15px;
            }
        }
    }
}

/* Hover Menu */
.hover-menu {
    position: absolute;
}

.hover-menu > .hover-content {
    display: none;
    border: 2px solid white;
}

.hover-menu:hover {
    .hover-content {
        display: block;
    }
}

.hover-menu::before {
    content: url('/icons/eye.svg');
    color: black;
    padding: 2px;
    display: block;
}

/* Compatibility */
@media(max-width: 1640px) {
    .grid.base {
        width: 80%;
        height: 80%;
    }
}

@media(max-width: 1400px) {
    .grid.base {
        width: 90%;
        height: 90%;
    }
}

@media(max-width: 1140px) {
    .grid {
        display: flex;
        flex-direction: column;
    }

    .grid.base {
        width: 100%;
        height: 100%;
        margin: 20px;
    }

    body {
        min-height: 100%;
    }

    main {
        min-height: auto;
    }

    .main-block {
        height: auto;
    }
}

@media(max-width: 640px) {
    #other-block {
        display: none;
    }
}