@import url('https://fonts.googleapis.com/css2?family=Assistant:wght@300&family=Kreon:wght@400;700&family=Red+Hat+Mono:wght@300&display=swap');
@import url('https://fonts.googleapis.com/icon?family=Material+Icons');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css');
@import url('https://unpkg.com/aos@next/dist/aos.css');

:root {
    --dark: #0e172c;
    --h3-background: rgba(254, 199, 215, 0.5);
    --p-background: rgba(255, 255, 255, 0.9);
    --lilac: #d9d4e7;
    --vivid-purple: #a786df;
    --off-white: #fffffe;
    --light-pink: #fec7d7;
  }

* {
    box-sizing: border-box; 
    color: var(--dark);
    font-size: calc(16px + 1vw);
    line-height: calc(1.1em + 0.5vw);
  }

html {
    scroll-behavior: smooth;
}

body {
    display: flex;
    min-height: 100vh;
    flex-direction: row;
    margin: 0;
}

h1 a {
    font-family: 'Kreon', serif;
    font-weight: 700;
    font-size: 1rem;
}

@media (min-width: 50em) {
    h1 a {
      font-size: 50px;
    }
  }

h2 {
    font-family: 'Kreon', serif;
    font-weight: 700;
    font-size: calc(1rem + 1vw);
    line-height: 0;
}

h3 {
    font-family: 'Kreon', serif;
    font-weight: 400;
    font-size: calc(0.25rem + 1vw);
    width: 100%;
    background: var(--h3-background);
    padding: 1vw 1vw 0 1vw;
    text-align: right;
    margin-top: -2vw;
    border-bottom: 0.25vmin solid var(--lilac);
}

p {
    font-family: 'Assistant', sans-serif;
    font-size: 0.75rem;
    background:rgba(255, 255, 255, 0.9);
    box-shadow: .25vmin .25vmin .5vmin rgba(0,0,0,0.1);
    border-left: 1vmin solid var(--vivid-purple);
    padding: 1vmin;
}

code, ul {
    font-family: 'Red Hat Mono', monospace;
    width: 100vmin;
    font-size: 2.5vmin;
    background: var(--lilac);
    display: block;
    padding: 2vmin 5vmin;
    border: .25vmin solid var(--vivid-purple);
    border-radius: 1vmin;
    margin: 0 auto;
    box-shadow: .5vmin .5vmin .5vmin rgba(0,0,0,0.2);
}

ul {
    list-style-position: inside;
}

li {
    font-family: 'Red Hat Mono', monospace;
    font-size: 2.5vmin;
}

.short-text { 
    display: none; 
}

.full-text {
    display: block;
}

.nav-link {
    padding: 0.25rem;
    text-decoration: none;
    font-size: 0.5rem;
    color: var(--dark);
    font-family: 'Kreon';
}

.nav-link:hover {
    background-color: #0e172c;
    color: var(--off-white);
}

nav {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    background: var(--light-pink);
    width: 30vmin;
    font-size: 3.5vmin;
    padding: 1vmin;
    box-shadow: .5vmin 0 .5vmin rgba(0,0,0,0.2);
}

#topnav {
    display: flex;
    flex-direction: column;
}

a.icon {
    display: none;
}

main {
    margin-left: 30vmin;
    padding: 5vmin;
}

picture img { 
    width: 7rem;
    float: right;
}

@media (orientation: portrait) {
    body {
        flex-direction: column;
    }

    h2 {
        line-height: 1rem;
    }

    h3 {
        font-size: 0.75rem;
        margin-top: -5vw;
    }

    main {
        margin: 2rem 0 0;
    }

    code, ul {
        max-width: 80vw;
    }

    nav {
        position: fixed;
        bottom: unset;
        width: 100%;
        max-width: 100vw;
        background: var(--lilac);
        z-index: 999;
        padding: 0;
    }

    h1 {
        padding: 1vmin 0 0 1vmin;
    }

    #topnav {
        display: grid;
        grid-template-columns: auto auto;
        gap: 5px;
        background: var(--lilac);
        width: 100%;    
        padding: 10px;
        transition: all 300ms;
        opacity: 1;
        visibility: visible;
    }

     .hidden {
        opacity: 0 !important;
        height: 0;
        padding: 0 !important;
        visibility: collapse !important;
    }

    #topnav a {
        display: block;
        padding: 14px 16px;
        text-decoration: none;
        font-size: 17px;
        background: var(--p-background);
    }

    #topnav a:hover {                
        background-color: var(--dark);
        color: var(--off-white);
    }

    a.icon {
        display: block;
        position: absolute;
        right: 2vmin;
        top: 2vmin;
    }


}

@media (orientation: landscape) {
    #topnav {
        display: flex !important;
    }

    #topBtn {
        display: none !important;
    }
}

#topBtn {
    display: none; 
    position: fixed; 
    cursor: pointer;
    bottom: 20px; 
    right: 30px; 
    z-index: 99; 
    border: .5vmin solid var(--lilac);
    outline: none; 
    background-color: var(--lilac); 
    color: var(--vivid-purple); 
    padding: 0.5vmin; 
    border-radius: 50%; 
    font-size: calc(16px + 1vw); 
    height: calc(30px + 1vw);
    width: calc(30px + 1vw);
    text-align: center;
    box-shadow: 0 0 2vmin rgba(0,0,0,0.5);
}

#topBtn:hover {
    background-color: var(--vivid-purple); 
    color: var(--off-white);
}

