/* font imports */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono&display=swap');

/* variables */

:root {
    --text-color: #ccc;
    --accent-color: #329977;
    --main-link-filter: invert(65%);
    --main-link-hover-filter: invert(85%);
    --project-link-filter: invert(95%);
    --startup-animation-delay: 0.05s;
}

/* onload animation */

@keyframes slide-in {
    0% {
        transform: translateY(1.5em);
        opacity: 0;
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

/* background */

#background {
    z-index: -1;
    width: 100vw;
    min-height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background-color: #121C25;
    transition: opacity 0.7s ease 0.75s;
}

/* text colors */

.header,
.description,
.text,
project {
    color: var(--text-color);
}

strong {
    color: var(--accent-color);
    font-weight: normal;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: 0.3s ease;
}

a:hover {
    filter: brightness(120%);
}

/* text fonts */

.header {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: normal;
    display: inline;
}

.description,
.text,
project {
    font-family: 'IBM Plex Mono', monospace;
}

/* text font sizes */

h1 {
    font-size: 3.3em;
}

h2 {
    font-size: 2em;
}

h3 {
    font-size: 1.5em;
}

.description {
    font-size: 1.3em;
}

.text {
    font-size: 1.2em;
}

/* horizontal rules */

hr {
    border: 0.11em solid var(--text-color);
    opacity: 50%;
}

/* text spacing */

ul {
    padding-left: 1.2em;
}

li {
    margin-top: 1.5em;
}

.paragraph {
    margin-top: 1.5em;
}

/* nav bar */

#nav {
    width: fit-content;
    margin: 2em auto 0;
    text-align: center;
    transition: opacity ease 0.7s;
    animation: 0.5s backwards calc(var(--startup-animation-delay) + 0.2s) 1 slide-in;
    position: relative;
}

#navIcon {
    width: 2em;
    filter: var(--project-link-filter);
    opacity: 40%;
    transition: ease 0.3s;
}

#navContent {
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);

    /* Position */
    width: 11em;
    position: absolute;
    z-index: 1;
    left: 50%;
    transform: translate(-50%, -5%);


    /* Layout */
    border-radius: 20px;
    display: grid;
    gap: 0.75em;
    padding: 1em;
    visibility: hidden;
    opacity: 0;
    transition-duration: 0.3s;
}

.navSection {
    display: inline-grid;
    gap: 0.5em;
}

#nav:hover>#navIcon {
    opacity: 60%;
    transform: rotate(180deg);
}

#nav:hover>#navContent {
    visibility: visible;
    opacity: 1;
    transform: translate(-50%);
}


/* main div spacing */

#mainContent {
    margin: auto;
    width: 72.5%;
    max-width: 60em;
    transition: opacity ease 0.7s;
    transition-delay: 0.2s;
}

#me {
    /* margin-top: 1em; */
    margin-bottom: 4em;
    animation: 0.5s backwards calc(var(--startup-animation-delay)) 1 slide-in;
}

/* top link icons */

#linkIcons {
    display: inline;
    float: right;
}

#linkIcons img {
    position: relative;
    top: 1em;
    filter: var(--main-link-filter);
    width: 2.75em;
    height: 2.75em;
    transition-timing-function: ease;
    transition-duration: 0.3s;
}

#linkIcons img:hover {
    top: 0.85em;
    filter: var(--main-link-hover-filter);
}

#linkIcons a+a {
    color: transparent;
    margin-left: 1.5em;
}

/* secondary information divs */

#info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: min-content 1fr;
    grid-column-gap: 5vw;
    grid-template-areas:
        "a b"
        "c b";
}

#info>div {
    margin-bottom: 2.2em;
}

#workingOn {
    grid-area: a;
    animation: 0.5s backwards ease calc(var(--startup-animation-delay) + 0.5s) 1 slide-in;
}

#projects {
    grid-area: b;
    animation: 0.5s backwards ease calc(var(--startup-animation-delay) + 0.6s) 1 slide-in;
}

#more {
    grid-area: c;
    animation: 0.5s backwards ease calc(var(--startup-animation-delay) + 0.7s) 1 slide-in;
}

/* current work */

.currentThumbnail {
    width: 90%;
    margin: 1em 5% 0;
    border-radius: 5px;
    border: 1px solid #CCC;
    filter: drop-shadow(0 0 1em black);
}

/* projects */

.project {
    margin-top: 1.75em;
}

/* Fallback Styling */

project {
    display: block;
    font-size: 1.2em;
    margin: 1em 0;
}

project::before {
    content: "•"
}

.projectThumbnail {
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-top: 0.5em;
    margin-bottom: 3em;
    max-width: 100%;
    max-height: 15em;
    filter: drop-shadow(0 0 0.5em #0006);
}

/* project icons */

.projectIcons {
    display: inline;
    float: right;
}

.projectIcons img {
    position: relative;
    top: 0.5em;
    filter: var(--project-link-filter);
    width: 1.5em;
    height: 1.5em;
    transition-timing-function: ease;
    transition-duration: 0.3s;
    opacity: 50%;
}

.projectIcons img:hover {
    top: 0.4em;
    opacity: 90%;
}

.projectIcons a {
    color: transparent;
    margin-left: 0.5em;
}


/* enlightenment */

.hidden {
    display: none;
}

#enlightenment {
    margin-top: -2em;
    position: relative;
    margin-bottom: 1em;
    text-align: center;
}

#enlightenmentButton {
    cursor: pointer;
    background: transparent;
    border: none;
}

#enlightenmentButton img {
    width: 1.75em;
    filter: var(--main-link-filter);
    opacity: 95%;
    transition-duration: 500ms;
}

#enlightenmentTooltip {
    display: flex;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    visibility: hidden;
    margin-top: 0.5em;
    align-items: center;
    justify-content: center;
    width: 15em;
    height: 2em;
    border-radius: 0.5em;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(2px);
    /* animation */
    opacity: 0;
    bottom: 130%;
    transition-duration: 0.3s;
    user-select: none;
}

#enlightenmentTooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -0.5em;
    border-width: 0.5em;
    border-style: solid;
    border-color: rgba(0, 0, 0, 0.4) transparent transparent;
    backdrop-filter: blur(2px);
}

#enlightenmentButton:hover>img {
    filter: var(--main-link-hover-filter);
    transform: rotate(45deg);
}

#enlightenmentButton:hover+#enlightenmentTooltip {
    bottom: 150%;
    visibility: visible;
    opacity: 1;
}

/* Mobile device support */

@media only screen and (max-width: 800px) {

    /* spacing */
    #background {
        /* background hotfix for dynamic browser UIs */
        min-height: 120vh;
    }

    #mainContent {
        width: 95%;
        gap: 0;
    }

    #me {
        position: relative;
        margin-bottom: 6em;
    }

    #linkIcons {
        position: absolute;
        display: flex;
        z-index: 3;
        left: 50%;
        transform: translate(-50%);
        bottom: -3.5em;
    }

    #linkIcons a+a {
        margin-left: 2em;
    }

    #info {
        display: grid;
        grid-template-columns: 95vw;
        grid-column-gap: 0;
        grid-template-rows: repeat(min-content, 3);
        grid-template-areas:
            "a"
            "b"
            "c";
    }

    #info>div {
        width: 95%;
    }

    /* text font sizes */

    h1 {
        font-size: 3em;
    }

    h2 {
        font-size: 2em;
    }

    h3 {
        font-size: 1.5em;
    }

    .description {
        font-size: 1.2em;
    }

    .text {
        font-size: 1.2em;
    }

    /* enlightenment */

    #enlightenmentTooltip {
        display: none;
    }
}