@import "style/globals.css";
@import "style/fonts.css";
@import "style/theme.css";

/*
TODO: refactor css into separate files
TODO: add @media rules for motion, contrast, and dark-mode
TODO: add @supports rules for compatibility
TODO: use semantic markup elements for accessibility
TODO: use more modular classes for styling
*/

/* debug rendering */
.debug, .debug * {
    outline: red solid 1px;
}

/* hide state selectors */
body > input[type="checkbox"] {
    display: none;
}

/* position "body" element */
#body {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;

}
/* add global styles to "body" element */
#body {
    background-color: var(--background-color);
    color: var(--color);
    transition: var(--transition-time);
}

/* element styles */
a {
    color: inherit;
}

/* composable class styles */
.content-item ~ .content-show,
.content-item:target ~ .content-hide {
    opacity: 0;
    pointer-events: none;
}
.content-item:target ~ .content-show,
.content-item ~ .content-hide {
    opacity: 1;
    pointer-events: inherit;
}

#about ~ .about-show {
    opacity: 0;
    transition: opacity var(--transition-time);
}
#about:target ~ .about-show {
    opacity: 1;
}

.svg-ui {
    width: 3.5em;
    height: 3.5em;
    /* brightness filter used because svg cannot be styled by an external stylesheet */
    filter: brightness(70%);
    transition: ease-out var(--transition-time);
}
.svg-ui:hover {
    height: 4em;
    width: 4em;
    filter: brightness(100%);
    cursor: pointer;
}

.svg-links {
    display: inline-block;
    width: 1em;
    height: 1em;
    background-size: cover;
    outline: none;
}

.fixed {
    position: fixed;
}



/* unique styles */
#content {
    position: absolute;
    top: 10%;
    left: 10%;
    height: 80%;
    width: 80%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-evenly;
}

#menu {
    top: 30%;
    left: 20%;
    height: 40%;
    width: 60%;
    display: flex;
    align-items: center;
    justify-content: space-around;
    flex-direction: column;
}


.menu-item {
    font-size: x-large;
    border: 5px solid var(--color);
    border-radius: 0.5em;
    padding: 0.5em;
    margin: 0.3em;
    transition: ease-out var(--transition-time);
    text-transform: uppercase;
}

.menu-item {
    color: var(--activecolor);
    text-decoration: inherit;
}

/*
style hovered item, separate from active item styling
because `has` may not be supported everywhere (Firefox)
*/
.menu-item:hover{
    border-color: var(--activecolor);
    font-size: xx-large;
}

#content:not(:has(.menu-item:hover)):has(#about:target) #menu-item-about,
#content:not(:has(.menu-item:hover)):has(#portfolio:target) #menu-item-portfolio,
#content:not(:has(.menu-item:hover)):has(#links:target) #menu-item-links {
    border-color: var(--activecolor);
    font-size: xx-large;
}


@media (hover: none) {
    .menu-item {
        font-size: xx-large;
    }
}
/* TODO: add transparency gradient clip to bottom of content-items to make text
appearing/disappearing look nicer */

.content-item {
    color: var(--activecolor);
    height: 0;
    transition:
        height var(--transition-time),
        visibility 0.7s;
    overflow: hidden;
    min-width: 80%;
    position: relative;
    visibility: hidden;
}
.content-item:target {
    height: 100%;
    transition: height 1s 0.7s, visibility 0s;
    visibility: visible;
}

#menu-sections {
    display: flex;
    align-items: center;
    justify-content: space-around;
}

.content-item a:hover {
    color: var(--color);
}

.content-heading {
    margin-bottom: 0;
}
.subheading {
    font-size: large;
    font-style: italic;

    margin-top: 0;
}

#splash {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100vmax;
    min-height: 100vmax;
    overflow: visible;
    margin: auto;
    z-index: -100;
    opacity: 0.18;
    transition: opacity 3s;
}
.content-item:target ~ #splash {
    opacity: 0;
    transition: opacity 5s;
}
#splash img {
    min-width: 100%;
    min-height: 100%;
}
@supports not selector(:has(a, b)) {
    #profile {
        display: none;
    }
}

#back {
    position: fixed;
    top: 0;
    left: 0;
    margin: 1em;
    background-image: var(--back-icon);
}



footer {
    position: absolute;
    bottom: 0;
    width: 90%;
    padding: 1em 5%;
    display: flex;
    justify-content: space-between;
}


#state-toggles {
    position: fixed;
    top: 0;
    right: 0;
}

#nav-colorscheme {
    background-image: var(--theme-icon);
    display: block;
    margin: 1em;
}

#github-icon {
    display: none;
    position: relative;
    left: 0.3em;
    top: 0.1em;
    background-image: url("github-mark/github-mark.svg");
}

#links-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
}
