/*
 * Dark-mode Color Palette
 * #eee - light gray (text)
 * #222 - dark gray (body background)
 * #333 - dark gray (backgrounds)
 * #444 - grey (borders)
 * #bca - light olive green (special text, blockquotes, code)
 * #674 - olive green (highlight important elements)
 * #a97 - tan (links and headers)
 */

/*
 * Light-mode Color Palette
 * #333 - dark gray (text)
 * #eee - light gray (body background)
 * #ddd - light gray (backgrounds)
 * #ccc - gray (borders)
 * #341 - dark olive green (special text, blockquotes, code)
 * #9b5 - light olive green (highlight important elements)
 * #653 - dark tan (links and headers)
*/

html {
    min-width: 320px;
    -webkit-text-size-adjust: 4em;
    -ms-text-size-adjust: 4em;
    min-height: 100%;
    background: #222;
}

html.light-mode {
    background: #ddd;
}

body {
    display: flex;
    flex-direction: column;
    color: #eee;
    background: #333;
    font-family: Georgia,Palatino,palatino linotype,Times,times new roman,serif;
    font-size: 16px;
    line-height: 1.5em;
    padding: 1em;
    margin: 0 auto;
    max-width: 1000px;
    min-height: 100vh;
    box-sizing: border-box;
}

body.light-mode {
    color: #333;
    background: #eee;
}

header {
    background: #222;
    border: 0.25em solid #444;
    margin-bottom: 1em;
}

header.light-mode {
    background: #ddd;
    border: 0.25em solid #ccc;
}

header nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

header nav ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav{
  min-width: 100%;
}

header nav ul li {
    display: inline-flex;
    background-color: transparent;
    margin: 0 0.5em;
    color: #eee;
    text-decoration: none;
    cursor: pointer;
    justify-content: center;
}

header nav ul li:hover,
header nav ul li a:hover {
    background-color: #bca;
    color: #a97;
}

header nav ul li a {
    text-decoration: none;
    text-decoration: none;
    font-size: 1.5em;
    line-height: 1.5em;
    display: flex;
    padding: 1em;
    max-width: 100%;
    max-height: 100%;
    width: 100%;
    justify-content: center;
}

header nav ul li a:hover {
  color: #eee;
}

.menu-toggle {
    display: none;
    font-size: 1.5em;
    background-color: #222;
    border: 0.125em solid #444;
    margin: -0.125em;
    padding: 0.5em;
    cursor: pointer;
    text-align: center;
}

.menu-toggle.light-mode {
    background-color: #ddd;
    border: 0.125em solid #ccc;
}

.user-account {
    margin-left: -4.5em;
    padding-left: 1em;
    background: #222;
}

.user-account.light-mode {
    background: #ddd;
}

.settings-cog {
    width: 2em;
    height: auto;
    fill: #eee;
    color: #eee;
    background: #222;
    top: 0.5em;
    margin-right: 1em;
    cursor: pointer;
}

.settings-cog.light-mode {
    color: #222;
    fill: #222;
    background: #ddd;
}

#login-register-logout {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0, 0.5);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    display: none;
}

#login-register-logout .centering {
    text-align: center;
}

#login-register-logout #close-button {
    position: absolute;
    top: 0;
    right: 0;
    font-size: 2em;
    font-weight: bold;
    background-color: transparent;
    border: none;
    color: #FFF;
    cursor: pointer;
    padding: 1em;
}

#close-button.light-mode {
    color: #000;
}

main {
    flex: 1;
    background: #222;
    border: 0.25em solid #444;
    padding: 0em;
    display: flex;
    justify-content: center;
    align-items: center;
}

main.light-mode {
    background: #ddd;
    border: 0.25em solid #ccc;
}

.center-vertically {
    display: block;
    margin: auto;
    padding: 1em;
    width: 100%;
}

.toggle .title {
    background: #333;
    padding: 0.5em;
    cursor: pointer;
}

.toggle .title.light-mode {
    background: #eee;
}

footer {
    background: #222;
    border: 0.25em solid #444;
    padding: 1em;
    margin-top: 1em;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

footer.light-mode {
    background: #ddd;
    border: 0.25em solid #ccc;
}

/* links */
a {
    color: #eee;
    text-decoration: underline;
}

a.light-mode {
    color: #333;
}

a:visited {
    color: #eee;
}

a:visited.light-mode {
    color: #333;
}

a:hover {
    color: #a97;
}

a:hover.light-mode {
    color: #653;
}

a:active {
    color: #a97;
}

a:active.light-mode {
    color: #653;
}

a:focus {
    outline: thin dotted;
}

/* selections*/
::-moz-selection {
    background: #eee;
    color: #222;
}

::-moz-selection.light-mode {
    background: #333;
    color: #eee;
}

::selection {
    background: #eee;
    color: #222;
}

::selection.light-mode {
    background: #333;
    color: #eee;
}

a::-moz-selection {
    background: #eee;
    color: #222;
}

a::-moz-selection.light-mode {
    background: #333;
    color: #eee;
}

a::selection {
    background: #eee;
    color: #222;
}

a::selection.light-mode {
    background: #333;
    color: #eee;
}

/* paragraphs */
p {
    margin: 1em 0;
}

/* all the headers */
h1, h2, h3, h4, h5, h6 {
    font-weight: normal;
    color: #a97;
    line-height: 1em;
}

h1.light-mode, h2.light-mode, h3.light-mode, h4.light-mode, h5.light-mode, h6.light-mode {
    color: #653;
}

h4,h5,h6 {
    font-weight: bold;
}

h1 {
    font-size: 2.5em;
}

h2 {
    font-size: 2em;
}

h3 {
    font-size: 1.5em;
}

h4 {
    font-size: 1.2em;
}

h5 {
    font-size: 1.1em;
}

h6 {
    font-size: 1em;
}

/* blockquotes */
blockquote {
    color: #bca;
    margin: 0;
    padding-left: 3em;
    border-left: 0.5em #674 solid;
}

blockquote.light-mode {
    color: #341;
    border-left: 0.5em #9b5 solid;
}

/* horizontal rules, breaks in the page */
hr {
    display: block;
    height: 2px;
    border: 0;
    border-top: 1px solid #674;
    border-bottom: 1px solid #bca;
    margin: 1em 0;
    padding: 0;
}

hr.light-mode {
    border-top: 1px solid #9b5;
    border-bottom: 1px solid #341;
}

/* code blocks */
code {
    color: #bca;
    font-family: monospace, monospace;
    _font-family: 'courier new', monospace;
    padding-left: 3em;
    border-left: 0.5em #674 solid;
}

code.light-mode {
    color: #341;
    border-left: 0.5em #9b5 solid;
}

/* bold fonts */
b, strong {
    font-weight: bold;
}

/* tags with <dfn>text</dfn> have an italic font, they're used for definitions */
dfn {
    font-style: italic;
}

/* tags with <ins>text</ins> have an underline */
ins {
    text-decoration: underline;
}

/* tags with <del>text</del> have a crosthrough through them */
del {
    text-decoration: line-through;
}

/* italicize and bold text within mark tags */
mark {
    font-style: italic;
    font-weight: bold;
}

/* subscript and superscript */
sub, sup {
    font-size: 0.7em;
    line-height: 0;
    position: relative;
    vertical-align: baseline;
}

sup {
    top: -0.5em;
}

sub {
    bottom: -0.25em;
}

/* lists */
ul, ol {
    margin: 1em 0;
    padding: 0 0 0 2em;
}

/* list items */
li p:last-child {
    margin: 0;
}

/* definition lists */
dd {
    margin: 0 0 0 2em;
}

/* images */
img {
    max-width: 100%;
    -ms-interpolation-mode: bicubic;
    vertical-align: middle;
    border: 0;
}

/* a gallery of images */
.gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.galleryImage {
  position: relative;
  margin: 10px;
  overflow: hidden;
}

.galleryImage img {
    width: 100%;
}

.gallery .galleryImage img {
  display: block;
  width: 280px;
  height: auto;
  border-radius: 5px;
}

.galleryImage .caption {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    background-color: rgba(34,34,34,.9);
    color: #eee;
    text-align: center;
    transition: all .5s ease;
    opacity: 50%;
}

.galleryImage .caption.light-mode {
    background-color: rgba(221,221,221,.9);
    color: #333;
}

.galleryImage:hover .caption {
  bottom: 20%;
  opacity: 1;
}

/* tables */
table {
    border-collapse: collapse;
    border-spacing: 0;
}

/* table cells */
td {
    vertical-align: top;
}

/* dark-mode light-mode transition */
#toggleBtn {
    display: inline-block;
    width: 4em;
    height: 2em;
    border-radius: 2em;
    border: 0.25em solid #444;
    background-color: #222;
    position: relative;
    transition: all 0.3s ease;
    cursor: pointer;
}

#toggleBtn.light-mode {
    border: 0.25em solid #ccc;
    background-color: #eee;
}

#toggleBtn:before {
    content: "";
    width: 2em;
    height: 2em;
    border-radius: 2em;
    background-color: #ccc;
    position: absolute;
    left: -0.5em;
    top: -0.25em;
    transition: all 0.3s ease;
}

#toggleBtn.light-mode:before {
    left: 2em;
    background-color: #333;
}

/* stuff to make my website dynamically responsive!! */

/* Large devices (desktops, 992px and up) */
@media only screen and (min-width: 992px) {
    body {
        font-size: 16px;
    }
    header nav ul {
        display: flex;
    }
}

/* Medium devices (tablets, 768px and up) */
@media only screen and (max-width: 992px) {
    body {
        font-size: 14px;
    }
    header nav ul {
        display: flex;
    }
}

/* Small devices (phones) */
@media only screen and (max-width: 768px) {
    body {
        font-size: 12px !important;
    }
    header nav {
        display: block;
        padding: 0;
        margin: 0;
    }
    header nav ul {
        display: none;
        width: 100%;
        padding-left: 0em;
    }
    header nav ul li {
        display: flex;
        flex-wrap: wrap;
        width: 100%;
        margin: 0;
        padding: 0;
    }
    .menu-toggle {
        display: block;
    }
    .settings-cog {
        display: none;
    }
    .user-account {
        margin-left: 0em;
        padding-left: 0em;
    }
    .user-account ul {
        width: 100%;
    }
}

@media print {
  * {
    background: white !important;
    color: black !important;
    filter: none !important;
    -ms-filter: none !important;
  }

  body {
    font-size: 12pt;
    max-width: 100% !important;
    border: none !important;
  }

  header {
      display: none;
  }

  #toggleBtn {
    display: none;
  }

  header, main, footer {
    border: 0.25em solid transparent !important;
  }


  a, a:visited {
    text-decoration: underline;
  }

  hr {
    height: 1px;
    border: 0;
    border-bottom: 1px solid black;
  }

  a[href]:after {
    content: " (" attr(href) ")";
  }

  abbr[title]:after {
    content: " (" attr(title) ")";
  }

  .ir a:after, a[href^="javascript:"]:after, a[href^="#"]:after {
    content: "";
  }

  pre, blockquote {
    border: 1px solid #999;
    padding-right: 1em;
    page-break-inside: avoid;
  }

  tr, img {
    page-break-inside: avoid;
  }

  img {
    max-width: 100% !important;
  }
  @  page :left {
    margin: 15mm 20mm 15mm 10mm;
  }
  @  page :right {
    margin: 15mm 10mm 15mm 20mm;
  }

  p, h2, h3 {
    orphans: 3;
    widows: 3;
  }

  h2, h3 {
    page-break-after: avoid;
  }
}



