/* CODE BY OOPS.LOL 
READ BELOW FOR A HEADSTART ON EDITING


this layout uses CSS flexbox and grid for most positioning
the guides below have great visual aids

FLEXBOX: https://css-tricks.com/snippets/css/a-guide-to-flexbox/
GRID: https://css-tricks.com/snippets/css/complete-guide-grid/

it also uses a media quesry for mobile responsiveness:
https://www.w3schools.com/css/css_rwd_mediaqueries.asp

*/

/* CSS RESET below, basically makes code less annoying to deal with by default */

@font-face {
font-family: "victor mono";
font-style: normal;
font-weight: 400;
src: url('fonts/victor mono.ttf') format('truetype');
}

@font-face {
  font-family: 'victor mono italic';
  font-weight: 100;
  src: url('fonts/victor mono italic.ttf') format('truetype');
}

@font-face {
font-family: "sylmono";
font-style: normal;
font-weight: 400;
src: url('fonts/sylmono.ttf') format('truetype');
}

*,
*::before,
*::after {
    box-sizing: border-box;
}
* {
    margin: 0;
    scrollbar-color: #0435ca17 #d6dadb14;
}
img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
}

/* main body & text details.nav */
body {
    background: #e5def9;
    background-image: radial-gradient(rgb(4, 16, 70) 1px, transparent 0);
    background-size: 30px 30px;
    background-position: -29px -29px;
    background-attachment: fixed;
    color: #0f0e13;
    font-size: 14pt;
    font-family: sylmono, victor mono, Courier, monospace;
    text-align: center;
    height: -webkit-fit-content;
    height: -moz-fit-content;
    height: fit-content;
    min-height: 100dvh;
    width: 100vw;
    display: flex;
    justify-content: center;
    align-items: center;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow: hidden;
}

/* text details */
p {
    max-width: 95%;
    margin: 0.4rem auto;
}
a,
a:visited {
    color: #e794c7;
}
a:hover {
    color: #a191d4;
}
strong {
    font-weight: bold;
    color: #0a191d4;
}
em {
    font-style: italic;
    color: #e794c7;
}

/* grid & boxes */
#grd {
    height: 80vh;
    width: 80vh;
    display: grid;
    grid-template-areas: "main log" "nav misc";
    position: relative;
    gap: 0.4rem;
    padding: 0.4rem;
    background-color: rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(1px);
            backdrop-filter: blur(1px);
    grid-template-columns: calc(40vh - 0.6rem) calc(40vh - 0.6rem);
    grid-template-rows: calc(40vh - 0.6rem) calc(40vh - 0.6rem);
}
main {
    grid-area: main;
    height: 100%;
    width: 100%;
    justify-self: right;
    align-self: end;
    background-color: #e794c7;
    z-index: 2;
    text-align: left;
}
#log {
    grid-area: log;
    height: 65%;
    width: 100%;
    justify-self: left;
    align-self: end;
    background-color: #9AA0CA;
    z-index: 2;
    font-family: monospace;
}
nav {
    grid-area: nav;
    height: 100%;
    width: 75%;
    justify-self: right;
    align-self: start;
    background-color: #ADA2CA;
    z-index: 2;
}
#misc {
    grid-area: misc;
    height: 90%;
    width: 90%;
    justify-self: left;
    align-self: start;
    background-color: #A1ACBA;
    z-index: 2;
    text-align: right;
}

/* classes */
.scroll {
    height: calc(100% - 2.7rem);
    overflow: auto;
    margin: 0.3rem;
    background: #ffffff36;
    width: calc(100% - 0.6rem);
}
.bareBorder {
    border: 2px solid rgba(0, 0, 0, 0.1);
}
.flexCol {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    justify-content: space-evenly;
}

/* sticker */
#sticker {
    position: absolute;
    left: -20%;
    bottom: 5%;
    width: 40%;
    z-index: 1;
    transform: rotate(36deg);
    opacity: 0.5;
}

/* alternating nav links + log entries, misc log/nav styling */
#log span:nth-of-type(2n) {
    background-color: #A4AFCA;
}
#log span:nth-of-type(2n + 1) {
    background-color: #A4ACCC;
}
#log span {
    width: 100%;
}
#log em {
    font-family: courier;
    font-weight: bold;
}
#log > .scroll {
    font-size: 0.7rem;
}

nav a:nth-of-type(2n) {
    background-color: #B6ADD8;
}
nav a:nth-of-type(2n + 1) {
    background-color: #B4B1D9;
}
nav a, nav a:visited {
    width: 100%;
}

/* alternating side subheaders */
main h3 {
    text-align: right;
}
#misc h3 {
    text-align: left;
}

/* font size changes for specified boxes */
main > .scroll {
    font-size: 0.85rem;
}
#misc > .scroll {
    font-size: 0.8rem;
}


/* styled headers */
h1 {
    position: absolute;
    left: 60%;
    font-size: 2.2rem;
    font-family: 'victor mono italic', Courier, monospace;
    width: 150%;
    text-align: left;
    opacity: 0.6;
    bottom: 82%;
}
h2 {
    font-size: 1.3rem;
    font-family: 'victor mono italic', Courier, monospace;
    letter-spacing: 0.2rem;
    color: #00000094;
    border-bottom: 0.15rem solid #00000042;
    padding: 0 0.3rem;
}
h3 {
    color: #00000094;
    background: #fff;
    font-size: 1.1rem;
    font-family: 'victor mono italic', Courier, monospace;
    letter-spacing: 0.3rem;
    border-bottom: 0.1rem dotted #00000042;
    padding-left: 0.2rem;
}

/* mobile code */
@media only screen and (max-width: 768px) {
    /* change grid size + reorder */
    #grd {
        height: 50vh;
        width: 100vw;
        display: grid;
        grid-template-areas: 
        "nav" 
        "main" 
        "log" 
        "misc";
        grid-template-columns: auto;
        grid-template-rows: -webkit-min-content -webkit-min-content -webkit-min-content -webkit-min-content;
        grid-template-rows: min-content min-content min-content min-content;
        align-content: space-between;
        margin-top: 5rem;
    }
    /* set boxes to be centered + fixed heights to just show headers */
    main,
    nav,
    #log,
    #misc {
        height: 2.7em;
        overflow: hidden;
        justify-self: center;
        align-self: center;
        width: 96%;
    }
    /* use :hover + :active to make boxes open on click */
    main:hover, main:active, 
    nav:hover, nav:active, 
    #log:hover, #log:active,
    #misc:hover, #misc:active {
        height: calc(50vh - 0.7rem); /* grd height minus padding */
        overflow: auto;
        position: absolute; /* below 4 lines move current box to top of the grid (nav), above everything else */
        grid-area: nav;
        z-index: 5;
        top: 0;
    }
    /* since h1 + sticker are positioned absolute in grd, we can just shuffle them around a bit */
    h1 {
        width: 100%;
        left: 0;
        height: -webkit-fit-content;
        height: -moz-fit-content;
        height: fit-content;
        padding: 0 0.5rem;
        bottom: 50vh;
    }
    #sticker {
        left: 0;
        bottom: -50%;
        width: 70%;
        transform: rotate(100deg);
        right: 0;
        margin: auto;
    }
}