@import url('gruvbox.dark.css');
@import url('gruvbox.light.css');

:root {
    --round: 4px;
    --bg: #293955;
    --fg: #3f5270;
    --fg-alt: #21476e;
    --text: #f2e5e5;
    --text-dark: #333;
    --link: #18aee9;
    --link-hover: #405e7c;
    --white: #eee;
    --white-dull: #a4b3bc;
    --shadow: #0c1f4d40;
}

html[data-theme='dark'] {
    --bg: #293955;
    --fg: #3f5270;
    --fg-alt: #21476e;
    --text: #f2e5e5;
    --link: #18aee9;
    --link-hover: #405e7c;
    --white-dull: #a4b3bc;
    --shadow: #0c1f4d40;
}

html[data-theme='light'] {
    --bg: #a1a7b2;
    --fg: #e1e2e9;
    --fg-alt: #cee0f2;
    --text: #333;
    --link: #2b6fae;
    --link-hover: #6f94b9;
    --white-dull: #5a6973;
    --shadow: #33456f40;
}

* {
    vertical-align: baseline;
	font-family: inherit;
	font-style: inherit;
	font-size: 100%;
	border: 0 none;
	outline: 0;
}

body {
    background-color: var(--bg);
    width: 100%;
    color: var(--text);
    font-family: 'Roboto Mono', sans-serif;
    margin: 0;
}

h1,h2,h3,h4,h5,h6 {
    font-family: 'Roboto Mono', monospace;
}

a {
    text-decoration: none;
    color: var(--link);
}

a:hover {
    text-decoration: 0.15em underline;
}

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

img {
    border-radius: var(--round);
    max-height: 500px;
    max-width: 100%;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.linkButton {
    font-size: 1.5em;
    background-color: var(--link);
    color: var(--white);
    border-radius: var(--round);
    padding: 15px;
    margin: 10px;
}

.linkButton:hover {
    transition: background-color 0.1s ease-out;
    background-color: var(--link-hover);
}

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

#meetingBox {
    font-size: 1.5em;
    background-color: var(--white);
    padding: 15px;
    margin: 10px;
    color: var(--text-dark);
    border-radius: var(--round);
    text-align: center;
}

#meetingBox:hover {
    transition: background-color 0.1s ease-out;
    background-color: var(--link-hover);
    text-decoration: none;
}

#meetingLink:hover {
    text-decoration: none;
}

/* Header */

header {
    font-family: 'Roboto Mono', 'Roboto', sans-serif;
    height: 100px;
    width: 100%;
    box-shadow: 0 10px 20px var(--shadow);
    display: flex;
    justify-content: flex-end;
    color: var(--white);
}

#headerLogoLink {
    margin-right: auto;
}

#headerLogo {
    height: 9.3em;
    margin: 25px;
    margin-left: 35px;
    background-color: var(--bg);
    box-shadow: 0 10px 20px var(--shadow);
    border-radius: 50%;
    max-height: none;
    max-width: none;
}

.navlink {
    height: 100px;
    margin-left: 1%;
    margin-right: 1%;
    font-size: 1.125em;
    display: flex;
    align-items: center;
    color: var(--white);
}

.nava {
    color: var(--white-dull);
}

.nava.current {
    color: var(--text);
    text-decoration: 2px underline;
}

.nava:hover {
    text-decoration: 2px underline;
}

#mobileHeader {
    display: none;
    text-align: right;
    position: relative;
    margin: auto 20px auto 0;
    font-size: 2rem;
}

#mobileDropdown {
    display: none;
}
#mobileDropdown ~ #header-closed {
    display: inline-block;
}
#mobileDropdown ~ #header-open,
#mobileDropdown ~ div > #mobileLinks {
    color: var(--white-dull);
    display: none;
}
#mobileDropdown:checked ~ #header-closed {
    display: none;
}
#mobileDropdown:checked ~ #header-open,
#mobileDropdown:checked ~ div > #mobileLinks {
    display: inline-block;
}

#mobileLinks {
    background-color: var(--fg-alt);
    border-radius: var(--round);
    box-shadow: -5px 5px 40px var(--shadow);
    padding: 0.4rem;
    position: absolute;
    right: 0;
    font-size: 1.3rem;
}
#mobileLinks > .navlink {
    height: min-content;
    padding: 0.4rem;
}

#theme-toggle {
    width: 1.5rem;
    height: min-content;
    margin-top: auto;
    margin-bottom: auto;
    padding-right: 7px;
    color: var(--text);
}
#theme-toggle:hover {
    color: var(--white-dull);
    cursor: pointer;
}

/* Media Adjustments */
@media screen and (max-width: 900px) {
    #mobileHeader {
        display: block;
    }
    .desktopLink {
        display: none;
    }
    #indexPage {
        height: auto !important;
    }
    #bigTitle {
        text-align: center;
        flex-direction: column;
    }
    #post-holder {
        grid-template-columns: 100% !important;
    }
    #toc {
        position: static !important;
        width: auto !important;
        margin: 50px 5% auto 5% !important;
    }
    #textpost-toc {
        margin-top: 10px !important;
    }
    #textpost, #textpost-toc {
        margin-left: 5% !important;
        margin-right: 5% !important;
        margin-bottom: 10px !important;
        width: auto !important;
    }
    #textpost {
        margin-top: 50px !important;
    }

    #headerLogo {
        height: 7em;
    }

    #finalNavlink {
        margin-right: 5%;
    }

    footer {
        margin-top: 20px;
    }
}

/* Home Page */

#indexPage {
    min-height: calc(100vh - 140px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#bigTitle {
    font-size: 2.1em;
    display: flex;
    align-items: center;
    max-width: 80%;
}

#titleLogo {
    width: 9em;
    margin: 30px;
}

/* Text pages */

#textpost, #textpost-toc {
    font-family: 'Roboto', sans-serif;
    width: 72%;
    margin-left: 10%;
    margin-right: 10%;
    margin-top: 100px;
    margin-bottom: 100px;
    word-wrap: break-word;
    padding: 4%;
    background-color: var(--fg);
    border-radius: var(--round);
    color: var(--text);
    line-height: 1.5;
}

#textpost-toc {
    margin-left: 0;
    width: auto;
}

#textpost > p:last-child, #textpost-toc > p:last-child {
    margin-bottom: 0;
}

#post-holder {
    display: grid;
    grid-template-columns: 24% 70%;
    grid-column-gap: 4em;
}

#toc {
    position: -webkit-sticky;
    position: sticky;
    top: 30px;
    left: 30px;
    height: min-content;
    margin-top: 100px;
    padding: 10px;
    background-color: var(--fg-alt);
    border-radius: var(--round);
}

.toc-current {
    color: var(--text);
    font-weight: 600;
}

pre.highlight {
  counter-reset: line;
  background-color: var(--fg-alt);
  outline: 2px solid var(--bg);
  padding: 0.75em 1.25em;
  overflow: scroll;
  border-radius: var(--round);
  margin: 1em 0;
}

.lineno {
    color: var(--white-dull);
}

code.language-plaintext.highlighter-rouge {
  background-color: var(--fg-alt);
  outline: 2px solid var(--bg);
  border-radius: var(--round);
  padding: 0 2px;
}

#googlecal {
    width: 100%;
    height: 80vh;
}

hr {
    border: 2px solid var(--white-dull);
    margin-top: 10px;
    margin-bottom: 10px;
}

h1 {
    font-size: 1.875em;
    font-weight: bold;
    margin-top: 0;
    margin-bottom: 0;
}

h2 {
    font-size: 1.5em;
    font-weight: bold;
    margin-bottom: 0;
}

h3 {
    font-size: 1.25em;
    font-weight: bold;
}

p {
    margin-top: 0;
    font-size: 1.125rem;
}

li {
    font-size: 1.125rem;
}

li::marker {
    color: var(--white-dull);
}

.italic {
    font-style: italic;
}

.bold {
    font-weight: bold;
}

/* Posts */
.postListing > h2, .postListing > p {
    margin: 0;
}

#postDate {
    margin-top: 0;
}

/* Resource */

.resource {
    background-color: var(--fg-alt);
    border-radius: var(--round);
    padding: 1em;
    margin: 0.4em;
}
.resource-title {
    font-family: 'Roboto Mono', monospace;
    font-size: 1.2em;
    font-weight: 600;
}
.resource-author {
    color: var(--text)
}
.resource-date {
    font-style: italic;
    color: var(--white-dull)
}
.resource-link:hover,
.resource-author:hover,
.resource-date:hover {
    text-decoration: none;
}
.resource-link:hover .resource {
    background-color: var(--bg);
}

/* Login */

form {
    color: var(--white);
    font-size: 1.5em;
}

#admin {
    display: none;
}

input {
    background-color: var(--link-hover);
    border: 2px dashed var(--white);
    color: var(--white);
    padding: 10px;
}

.red {
    font-size: 1.5em;
    color: darkred;
}

.green {
    font-size: 1.5em;
    color: green;
}

/* Footer */

footer {
    width: 100%;
    text-align: center;
    font-size: 0.75em;
    margin-bottom: 10px;
}