body { display: flex; flex-direction: column; width: 100%; height: 100vh; font-size: 20px; font-family: 'Fira Sans', sans-serif; font-weight: 400; margin: 0; } /* ------------- */ /* Responsive UI */ /* ------------- */ @media screen and (max-width: 799px) { .is-mobile { display: block; } .is-desktop { display: none !important; } } @media screen and (min-width: 800px) { .is-mobile { display: none !important; } .is-desktop { display: block; } } /* ------ */ /* Header */ /* ------ */ header { width: 100%; height: 3em; display: flex; align-items: center; font-size: .9em; box-shadow: 1px 3px 3px 0 #bbb; } header .name { font-family: 'Poppins', sans-serif; margin-left: .333em; } header .item { margin: 0 1em; } header a { color: initial; opacity: .8; text-decoration: none; } header a:hover { opacity: .5; } header a.logo { opacity: .9; } header a.logo:hover { opacity: .75; } header .left, header .right { display: flex; align-items: center; width: 50%; } header .right { justify-content: right; position: relative; } header .right.is-mobile button { position: absolute; right: 0; } header .logo { display: flex; align-items: center; } header .logo img { width: 2.5em; height: 2.5em; margin: auto .5em; } header .menu-icon { background: none; border: none; cursor: pointer; } header .menu-icon img { height: 2.5em; padding-top: .25em; } /* ---- */ /* Main */ /* ---- */ main { height: calc(100% - 3em); overflow: auto; position: relative; line-height: 1.5em; color: rgb(75, 75, 75); text-rendering: optimizelegibility; margin-top: .2em; } main a { color: initial; opacity: .5; text-decoration: none; border-bottom: 1px dotted #444; } main a:hover { opacity: .25; } main section { width: 100%; display: flex; align-items: center; flex-wrap: wrap; } main section:nth-child(even) { background: #ecffec; } main section .title { font-size: 1.5em; font-weight: bold; padding: 1em 0; } @media screen and (max-width: 799px) { main section .left, main section .right { width: calc(100% - 2em); padding: .5em 1em; } main section:nth-child(even) { flex-direction: column-reverse; } } @media screen and (min-width: 800px) { main section .left, main section .right { width: calc(50% - 2em); padding: 1em; } } main section img { width: 100%; } /* ********** */ /* Code block */ /* ********** */ .code { width: 90%; background: #123; color: #eee; font-size: .9em; font-family: 'Fira Code', monospace; padding: 1em; border-radius: .5em; white-space: pre; overflow: auto; } .code .string { color: #e47; } .code .comment { color: #999; } .code .keyword { color: #3a5; } /* *********** */ /* Mobile menu */ /* *********** */ @media screen and (min-width: 799px) { #mobile-menu { display: none !important; } } #mobile-menu { display: none; } #mobile-menu.visible { width: 10em; height: calc(100% - .1em); position: fixed; top: 2.75em; right: 0; display: flex; flex-direction: column; background: white; box-shadow: 0 3px 3px 3px #bbb; } #mobile-menu .item { height: 2.5em; display: flex; font-family: 'Poppins', sans-serif; font-weight: 300; box-shadow: 2px 2px 1px -1px #bbb; } #mobile-menu .item:hover { background: #d8ffe8; } #mobile-menu .item a { width: calc(100% - 1em); height: calc(100% - 1em); padding: .5em; color: initial; text-decoration: none; } #mobile-menu .item a:hover { opacity: .6; }