/*
 * Blue Static Site
 *
 * Copyright (c)2010 by Blue Static. All Rights Reserved.
 * This file may not be reproduced in any way without permission.
 */

* {
  box-sizing: border-box;
}

/* Main body formatting, only used as the main background panel */
body {
  margin: 0px auto;
  padding: 0px;

  max-width: 750pt;

  background-color: white;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

/* Navigation bar on the LHS of the page. */
header {
  display: flex;
  flex-wrap: wrap;

  background-color: var(--menu-dark);
}

header h1 {
  margin: 0 .5em;
  flex: 2 0;

  line-height: 1.6em;
  height: 1.7em;

  white-space: nowrap;
  text-transform: uppercase;
  vertical-align: middle;
  color: var(--text-bright);
}

  header h1 a {
    color: var(--text-bright);
    font-size: 24pt;
    text-decoration: none;
  }

header nav {
  display: flex;
  flex-wrap: wrap;
}

header label[for="expand-menu"], header #expand-menu {
  display: none;
}

header label[for="expand-menu"] {
  color: var(--text-bright);
  font-size: 24pt;
  padding: 0 .25em 0 0;
}

header section#menu {
  flex: 1 0 100%;
}

header nav ul {
  padding: 0px;
  margin: 0px;
  list-style: none;
  text-align: right;
}

/* Style navigation items. */
header nav li {
  display: inline-block;
  padding: 0 1em;
  height: 100%;
  line-height: 3em;
}

  header nav li:hover {
    background-color: var(--menu-highlight);
  }

/* Style navigation links */
header nav li a {
  font-family: var(--secondary-font);
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--menu-highlight);

  border: none;
  text-decoration: none;
}

  header nav li:hover a {
    color: var(--menu-dark);
  }

/* The left-hand menu */
#menu {
  font-family: var(--secondary-font);
  font-size: 13pt;
  letter-spacing: 0px;

  display: flex;

  background-color: var(--menu-highlight);
}

/* Important navigation links. */
#menu .important, #menu .important a {
  color: var(--text-accent);
}

#menu div {
  margin-left: .5em;
  padding: .5em;
}

#menu ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
  display: flex;
}

#menu li {
  padding: .5em 1em;
  display: inline-block;
}

  #menu li a {
    text-decoration: none;
    color: var(--menu-dark);
  }

  #menu li:hover {
    background-color: var(--menu-dark);
  }

  #menu li:hover a {
    color: var(--menu-highlight);
  }

@media only screen and (max-width: 640px) {
  header nav {
    text-align: center;
  }

  header nav {
    display: none;
    text-align: center;
    width: 100%;
    flex: 2 0 100%;
    order: 2;
  }

  header {
    vertical-align: middle;
  }

  header h1 {
    margin: 0 .2em;
  }

  header nav ul {
    width: 100%;
    text-align: center;
  }

  header section#menu {
    order: 1;
    display: none;
  }

  header label[for="expand-menu"] {
    display: inline-block;
    line-height: 1.6em;
  }

  header #expand-menu:checked + nav {
    display: flex;

    background-color: var(--menu-dark);

    box-sizing: border-box;
    box-shadow: -1px 5px 10px 0px rgba(0,0,0,.45);

    border-style: solid;
    border-width: .2em 0 .2em 0;
    border-color: var(--text-bright2);
  }

  header #expand-menu:checked + nav + section#menu {
    display: flex;
  }

  section#menu ul {
    border-style: solid;
    border-width: .2em 0 0 0;
    border-color: var(--text-bright2);
    width: 100%;
  }

  section#menu ul:empty {
    border: none;
  }

  header nav ul li {
    display: block;
    width: 100%;
    height: auto;
  }

  #menu {
    flex-wrap: wrap;
  }

  #menu ul {
    flex-direction: row;
    flex-wrap: wrap;
  }

  #menu li {
    display: block;
    width: 100%;
  }
}

main {
  padding: .5em;
}

/* The panel where all textual content goes */
#content, .post {
  margin-bottom: 20px;

  border-width: 0 0 1px 0;
  border-style: solid;
  border-color: var(--menu-highlight);
}

/* Footer and copyright */
#footer {
  text-align: right;
  font-family: var(--secondary-font);
  font-weight: 200;
  font-size: 8pt;

  padding: 3px;
}
