:root {
    --mainBG: rgb(251, 231, 238);
    --mainFG: rgb(58, 46, 57);
    --subFG: rgb(230, 57, 99);
    --mainAccent: rgb(184, 15, 46);

    --darkBG: rgb(35, 20, 30);
    --darkFG: rgb(251, 231, 238);
    --darkSubFG: rgb(247, 161, 181);
    --darkAccent: rgb(230, 57, 99);

    box-sizing: border-box;
}

html,
body {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont,
        'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell,
        'Open Sans', 'Helvetica Neue', sans-serif;

    margin: 0;
    scroll-behavior: smooth;
    user-select: none;

    overflow-x: hidden;

    background: var(--mainBG);
    color: var(--mainFG);

    transition: background 1s, color 1s;
}

* {
    box-sizing: border-box;
}

a {
    text-decoration: none;
    font-family: 'Roboto Mono', monospace;

    color: inherit;
}

a:hover,
.pageLabel:hover {
    transition: color 0.25s;
    text-decoration: underline;

    color: var(--mainAccent);
}

/* =========================
   TYPEWRITER
========================= */

#typewriterContainer {
    width: fit-content;
}

#hello {
    display: inline-block;

    white-space: nowrap;
    overflow: hidden;

    animation:
        typewriter 2s 1s steps(30, start) infinite alternate,
        blink 1s infinite;

    font-family: 'Roboto Mono', monospace;
    font-weight: bold;

    border-right: 2px solid var(--mainAccent);
}

.subtitle {
    font-family: 'Roboto Mono', monospace;
}

/* =========================
   MAIN CONTENT
========================= */

.container {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;

    width: calc(100% - clamp(220px, 22vw, 320px));

    margin-left: clamp(220px, 22vw, 320px);

    min-height: 100vh;

    padding: 5vh clamp(20px, 3vw, 60px);

    box-sizing: border-box;
}

.greeting {
    width: 100%;
    max-width: 1600px;

    text-align: left;
}

#page2,
#page3,
#page4,
#page5,
#page6,
#page7 {
    min-height: 100vh;
}

#page3 p,
#page4 p {
    line-height: 1.8;
}

#page1 {
    animation: fadeIn 1.5s;
}

/* =========================
   SIDEBAR
========================= */

#sidebar {
    display: flex;
    flex-direction: column;
    justify-content: center;

    height: 100vh;

    width: clamp(220px, 22vw, 320px);
    min-width: clamp(220px, 22vw, 320px);

    position: fixed;

    top: 0;
    left: 0;

    padding: 3vh 0;

    z-index: 100;

    overflow: hidden;

    background: rgba(251, 231, 238, 0.9);

    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    animation: sidebarSlideIn 0.5s;
}

#sidebarContainer {
    width: 60%;

    display: flex;
    flex-direction: column;

    gap: 0.7rem;

    margin: auto 0;

    padding-left: 1rem;
}

.pageLabel {
    letter-spacing: 2px;

    font-family: 'Roboto Mono', monospace;

    font-size: clamp(0.7rem, 0.8vw, 0.95rem);
    font-weight: bold;

    transition: color 0.3s;

    color: var(--subFG);
}

.separator {
    width: 0.8em;
    height: 12px;

    opacity: 0.5;
}

/* =========================
   DARK MODE BUTTON
========================= */

#funstuff {
    width: 60%;

    position: absolute;

    bottom: 25px;
    left: 20%;

    display: flex;
    align-items: center;

    cursor: pointer;

    z-index: 200;
}

#dmTooltip {
    font-size: x-small;

    margin-left: 1.5rem;

    font-family: 'Roboto Mono', monospace;

    letter-spacing: 2px;
    font-weight: bold;

    opacity: 0;

    color: var(--subFG);

    transition: opacity 0.25s, color 0.25s;
}

#funstuff:hover #dmTooltip {
    opacity: 1;
}

#darkMode {
    display: inline-flex;
    flex-direction: column;

    height: 1em;
    width: 1em;

    overflow-y: hidden;
}

#sunImage,
#moonImage {
    width: 1em;
    height: 1em;

    transition: margin 0.25s;
}

/* =========================
   IMAGE
========================= */

#image1 {
    width: min(100%, 700px);

    position: relative;

    border-radius: 16px;
    border: 4px solid var(--mainAccent);

    box-shadow: 0 0 20px rgba(230, 57, 99, 0.15);

    transition: opacity 0.25s, bottom 0.25s;
}

/* =========================
   BOXES
========================= */

.sectionBox,
.subContainer {
    width: 100%;

    padding: 1.5rem;
    margin-top: 1.5rem;

    border-radius: 18px;

    border: 2px solid var(--mainAccent);

    background-color: rgba(255, 255, 255, 0.12);

    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);

    box-shadow: 0 0 15px rgba(230, 57, 99, 0.08);
}

.sectionBox h3,
.sectionBox h4,
.subContainer h4 {
    margin-top: 0;
}

.contentPlaceholder,
.imagePlaceholder {
    margin-top: 1rem;

    padding: 1rem;

    border-radius: 12px;

    border: 2px dashed var(--mainAccent);

    font-family: 'Roboto Mono', monospace;

    color: var(--darkSubFG);

    background: rgba(255, 255, 255, 0.05);
}

.imagePlaceholder {
    padding: 2rem;
    text-align: center;
}

.codeBlock {
    margin-top: 1rem;

    padding: 1rem;

    border-radius: 12px;

    overflow-x: auto;

    background: rgba(35, 20, 30, 0.9);

    color: var(--darkFG);

    font-family: 'Roboto Mono', monospace;
    font-size: 0.9rem;
}

/* =========================
   OUTPUT CONTAINERS
========================= */

.subContainerGrid {
    display: flex;
    flex-direction: column;

    gap: 1.5rem;

    width: 100%;
}

.subContainer {
    overflow-wrap: break-word;
}

/* =========================
   DOCUMENT VIEWER
========================= */

.documentViewer {
    width: 100%;

    margin-top: 1.5rem;

    border-radius: 16px;
    overflow: hidden;

    border: 3px solid var(--mainAccent);

    background: rgba(255, 255, 255, 0.08);

    box-shadow: 0 0 18px rgba(230, 57, 99, 0.08);
}

.documentViewer iframe {
    width: 100%;

    height: min(90vh, 1200px);

    min-height: 500px;

    border: none;

    background: white;
}

/* =========================
   DINO FOOTER
========================= */

#dinoFooter {
    position: absolute;

    bottom: 0;
    right: 0;

    width: 100%;
    height: 120px;

    overflow: hidden;

    pointer-events: none;

    z-index: 1;
}

#ground {
    position: absolute;

    bottom: 15px;
    left: 0;

    width: 300%;
    height: 4px;

    background: var(--mainAccent);

    animation: moveGround 8s linear infinite;
}

#dino {
    position: absolute;

    bottom: 18px;
    right: -120px;

    width: 100px;
    height: auto;

    animation: runDino 18s linear infinite;
}

/* =========================
   CREDITS
========================= */

.credits {
    width: 100%;

    margin-top: 4rem;

    font-family: 'Roboto Mono', monospace;
    font-size: smaller;

    color: var(--subFG);
}

/* =========================
   ANIMATIONS
========================= */

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes sidebarSlideIn {
    from {
        opacity: 0;
        margin-left: -40px;
    }

    to {
        opacity: 1;
        margin-left: 0;
    }
}

@keyframes typewriter {
    0% {
        width: 0%;
    }

    100% {
        width: 100%;
    }
}

@keyframes blink {
    0%,
    100% {
        border-color: transparent;
    }

    50% {
        border-color: var(--mainAccent);
    }
}

@keyframes runDino {
    0% {
        right: -120px;
    }

    100% {
        right: 110%;
    }
}

@keyframes moveGround {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* =========================
   MOBILE
========================= */

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

    .container {
        width: 100vw;

        margin-left: 0;

        padding: 5vh 5vw;
    }

    .greeting,
    .credits {
        width: 100%;
    }

    #image1 {
        width: 100%;
    }

    #sidebar {
        width: 100vw;
        min-width: 100vw;

        opacity: 0;
        z-index: -1;

        animation: none;

        transition: opacity 0.25s;
    }

    #sidebarContainer {
        align-items: center;

        padding-left: 0;
    }

    .pageLabel {
        font-size: 1rem;
    }

    .separator {
        width: 2em;
    }

    #mobileNavBar {
        position: fixed;

        top: 0;

        z-index: 200;

        width: 100vw;
        height: 6vh;

        display: flex;
        align-items: center;
        justify-content: center;
    }

    #menu {
        height: 2em;

        overflow-y: hidden;

        display: flex;
        flex-direction: column;
    }

    #burger,
    #close {
        height: 2em;
    }

    #close {
        margin-top: -2em;
    }

    #funstuff {
        left: 50%;

        transform: translateX(-50%);
    }

    .documentViewer iframe {
        height: 65vh;
        min-height: 450px;
    }

    #dino {
        width: 70px;
    }

    #dinoFooter {
        height: 90px;
    }
}

@media only screen and (min-width: 601px) {

    #mobileNavBar {
        display: none;
    }
}

@media only screen and (min-width: 1800px) {

    .greeting {
        max-width: 1800px;
    }
}

@media only screen and (max-height: 700px) and (orientation: landscape) {

    #funstuff {
        display: none;
    }
}

@media only screen and (hover: none) {

    .pageLabel:hover {
        text-decoration: none;
    }
}
