/* VARIABLES */
@import url('https://fonts.googleapis.com/css2?family=Google+Sans+Code:ital,wght,MONO@0,300..800,1;1,300..800,1&display=swap');
@import url('https://fonts.googleapis.com/css2?family=DM+Mono:ital,wght@0,300;0,400;0,500;1,300;1,400;1,500&family=Source+Code+Pro:ital,wght@0,200..900;1,200..900&display=swap');

:root {
    --bg1: #121212;
    --bg2: #141414;
    --orange: #ff8c00;
    --bg-footer: #2e2e2e;

    --desc-text: #676767;

    --black: #010101;
    --grey-light: #414141;
    --grey: #1e1e1e;
    --grey-darker: #111111;
    --white: #fefefe;
    --white-glow: #fefefe24;
}

/* GENERAL — no forced flex here anymore. Native block/inline stays. */
*:not(script) {
    box-sizing: border-box;
    padding: 0;
    margin: 0;

    font-family: "Google Sans Code", monospace;
    color: var(--white);
    text-decoration: none;
    text-align: center;
    transition: ease 0.2s;
}

.hidden {
    display: none;
}

body {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
    justify-content: space-between;
    overflow: auto;

    /** NEVER REMOVE IT! **/
    background-image: url("https://i.pinimg.com/736x/64/fb/35/64fb35d2126cbdd70eab59b20f27b3c4.jpg");
    background-size: cover;
    backdrop-filter: blur(75px);
    /** old, plain and WORSE background **/
    /**background: linear-gradient(to top, var(--bg1) 55%, var(--bg2) 55%);**/
}

a {
    display: inline-block;
    padding: 0.1vw 0.2vw;
    color: var(--orange);
}

strong {
    font-weight: 600;
}

header {
    display: flex;
    justify-content: center;
    width: auto;
    padding: 0.5vw;
    background: var(--orange);
    box-shadow: rgba(0, 0, 0, 0.1) 0px 5px 15px;
    z-index: 1;
}

header p {
    color: var(--white);
    font-weight: 600;
    font-size: 12px;
}

footer {
    display: flex;
    justify-content: center;
    width: auto;
    background: var(--black);
    padding: 0.8vw;
    box-shadow: rgba(0, 0, 0, 0.1) 0px 5px 15px;
}

footer div {
    display: flex;
    flex-direction: row;
    gap: 1vw;
}

footer p, footer a {
    color: var(--grey-light);
    font-weight: 400;
    font-size: 12px;
}

footer a:hover {
    color: var(--white);
}

span {
    color: var(--orange);
}

svg {
    display: inline-block;
    scale: 1.2;
    margin: 0.2vw 0 0.2vw 0.75vw;
}

li > a {
    display: block;
    text-align: left;
    text-decoration: wavy var(--grey-darker) underline;
    width: fit-content;
}

li > a:hover {
    text-decoration: wavy var(--grey) underline;
}

.main-group {
    display: flex;
    flex-direction: row;
    align-self: center;
    gap: 4vw;
}

.main-bar {
    height: auto;
    width: 0.2vw;
    overflow: hidden;
    background: var(--orange);
    z-index: 0;
}



/* MAIN MENU */
.menu {
    display: flex;
    flex-direction: column;
    margin-left: 4vw;
    align-self: center;
}

.menu-title, .menu-options {
    margin: 1vw;
}

.menu-title {
    font-weight: 900;
    text-shadow: 0 0 20px var(--white-glow);
}

.menu-options {
    display: flex;
    flex-direction: column;
}

.menu > *, .menu-option {
    margin: 0.5vw;
    align-self: flex-end;
    color: var(--white);
    font-weight: 500;
}

.menu-option:hover {
    transform: scale(1.2);
    background: var(--orange);
    color: var(--white);
    box-shadow: rgba(0, 0, 0, 0.4) 0px 5px 15px;
}

.menu-option-selected {
    margin: 0.5vw;
    align-self: flex-end;
    font-weight: 500;
    transform: scale(1.2);
    color: var(--white);
    background: var(--orange);
    box-shadow: rgba(0, 0, 0, 0.4) 0px 5px 15px;
}

/* SECTIONS */

.sections {
    display: flex;
    flex-direction: row;
}

.section-group {
    padding: 2vw;
    margin: 4vw 5vw 4vw 0;

    align-self: center;
    background: var(--black);

    max-height: 60vh;
    overflow-y: scroll;
}

.section-desc {
    font-family: "Source Code Pro", monospace;
    color: var(--desc-text);
    font-size: small;
    margin-bottom: 2vw;
}

.section-group > div > * {
    font-size: small;
    text-align: left;
}

/* POSTS */

.post-list {
    display: flex;
    flex-direction: column;
    gap: 0.5vw;
}

.post-list-option, .main-post {
    display: flex;
    flex-direction: row;
    gap: 4vw;
    justify-content: space-between;
    justify-items: center;
    background: var(--black);
    padding: 0.2vw 1vw;
    list-style-type: none;
    font-size: small;
}

.post-list-option:hover {
    cursor: pointer;
    transform: scale(1.08);
}

.post-list-option > p {
    color: var(--grey);
}

.post-list-all-posts {
    justify-content: center;
    margin-top: 1vw;
}

.post-list-all-posts > li {
    display: flex;
    flex-direction: row;
    font-weight: 400;
}

.main-post {
    margin: 4vw 4vw 2vw 4vw;
    padding: 2vw;
    overflow: scroll;
}

.post-content {
    overflow: auto;
}

.post-content > * {
    text-align: left;
    margin-bottom: 1vw;
}

.post-content > * > * {
    display: contents;
}

.post-content > h1,
.post-content > h2,
.post-content > h3,
.post-content > h4,
.post-content > h5,
.post-content > h6 {
    color: var(--orange);
    font-weight: 700;
    font-size: x-large
}

.post-content > p {
    font-size: medium;
    font-weight: 300;
}

.post-content > p > code {
    color: var(--orange);
}

.post-content > .highlight, .post-content > pre {
    padding: 1vw;
    background: var(--grey-darker);
    border: 1px ridge var(--orange);
}

.post-content > .highlight > pre > code > span > span,
.post-content > pre > code {
    color: inherit;
}

.post-content > ul {
    display: block;
    padding-left: 1vw;
    list-style: square;
    font-size: medium;
    font-weight: 300;
}

.post-content > ul > li::marker {
    color: var(--orange);
}

.post-content > ul > li {
    display: list-item;
    text-align: left;
}

.post-highlight {
    margin: 0;
    padding: 0;
}

.return-button {
    display: flex;
    flex-direction: row;

    align-self: center;
    margin: 0 2vw 2vw 2vw;
    padding: 1vw;
    width: fit-content;

    font-size: small;
    background: var(--black);
    cursor: pointer;
}

.return-button:hover {
    transform: scale(0.95);
}

/* TODO: Make it underline wavy at links */
/***
.post-content > p > a {
    display: inline-block;
    width: fit-content;
    text-decoration: wavy var(--grey-darker) underline;
}

.post-content > p > a:hover {
    text-decoration: wavy var(--grey) underline;
}
***/

/* LISTS */

.main-list {
    margin: 4vw;
    max-width: auto;
    align-self: center;
}

/** avoid black background at post listing **/
#section1 {
    background: none;
    margin-left: -2vw;
}

/* MOBILE PORTRAIT */
@media screen and (orientation: portrait) {
    header > p, footer > div > a {
        font-size: smaller;
        padding: 1vw 0;
    }

    footer > div {
        gap: 4vw;
        flex-wrap: wrap;
    }
    
    svg {
        margin-left: 2vw;
        margin-top: 0.25vw;
    }

    .main-group {
        flex-direction: column;
        align-items: center;
        gap: 6vw;
        padding: 4vw 0;
    }

    .menu {
        margin-top: 4vw;
        margin-left: 0;
        align-items: center;
        text-align: center;
    }

    .menu-options {
        gap: 1vw;
    }

    .menu-title {
        font-size: clamp(1.2rem, 7vw, 2rem);
    }

    .menu > *, .menu-option, .menu-option-selected {
        align-self: center;
    }

    .main-bar {
        padding: 0.4vw;
        width: 90%;
    }

    .sections {
        flex-direction: column;
    }

    .section-group {
        width: 90vw;
        margin: 4vw;
        max-height: 65vh;
    }

    #section1 {
        margin: 0;
    }

    .post-list {
        display: flex;
        gap: 2vw;
        padding: 0 4vw
    }

    .post-list-all-posts {
        margin-top: 2vw;
    }

    .return-button {
        margin: 4vw 0 6vw 0;
    }

    .post-list-option, .main-post {
        flex-wrap: wrap;
        gap: 2vw;
        padding: 1vw 2vw;
    }

    .post-content, .section-title, .section-desc {
        padding: 0 4vw;
    }

    .section-title {
        padding-top: 4vw;
    }

    .section-desc {
        color: var(--white);
    }

    .post-content > * {
        margin-bottom: 4vw;
    }
}
