/*
Some basics
=========== */
body {
  font-family: Raleway, "Titillium Web", Puritan, Assistant, Athiti, Assistant, Lato, georgia, sans-serif;
  padding: 90px 0 0;
  margin: 0;
  color: #fff;
}
@media screen and (max-width: 600px) {
  body {
    padding-top: calc($masthead / 2);
  }
}

#resume, .lightbox {
  color: #333;
}
#resume a, .lightbox a {
  color: #333;
}
#resume a:active, #resume a:visited, .lightbox a:active, .lightbox a:visited {
  color: rgba(51, 51, 51, 0.8);
}

h3 {
  text-shadow: none;
}

.lightbox {
  color: #333;
}

strong {
  font-weight: 900;
}

a {
  color: #fff;
}
a:visited {
  color: #fff;
}
a:active {
  color: rgba(255, 255, 255, 0.8);
}

/* 
The title across the top of the page (and some links nearby)
============================================================ */
h1 {
  z-index: 3;
  box-sizing: border-box;
  text-align: left;
  float: left;
  height: 45px;
  font-weight: 100;
  font-size: 15px;
  margin: 22.5px 0 0;
  padding: 0 20px;
  box-sizing: border-box;
  line-height: 45px;
  border-right: 1px solid rgba(255, 255, 255, 0.4);
}
@media screen and (max-width: 1000px) {
  h1 {
    font-size: 15px;
  }
}
@media screen and (max-width: 800px) {
  h1 {
    margin: 0;
    border-right-width: 0;
  }
}
h1 a {
  text-decoration: none;
}

#langlinks, #langlinks li {
  display: inline;
  font-size: 1em;
  list-style-type: none;
  padding: 0;
  margin: 0;
}

#langlinks {
  font-size: .9em;
  line-height: 45px;
  height: 45px;
  z-index: 7;
  font-weight: bold;
  float: right;
  clear: right;
  margin-right: 20px;
}
@media screen and (max-width: 800px) {
  #langlinks {
    position: absolute;
    top: 0;
    right: 0;
  }
}
@media screen and (max-width: 600px) {
  #langlinks {
    top: 0;
    right: 90px;
  }
}
#langlinks a {
  font-weight: normal;
  text-decoration: none;
}
#langlinks a:hover {
  text-decoration: underline;
}
#langlinks li > span {
  border-bottom: 2px solid rgba(255, 255, 255, 0.8);
  padding-bottom: .5em;
}
@media screen and (max-width: 600px) {
  #langlinks li#english {
    display: inline;
  }
  #langlinks a {
    text-decoration: underline;
  }
  #langlinks li > span {
    border-bottom-width: 0;
  }
}

li#english {
  padding-right: 10px;
}

.full {
  display: inline;
}

.abbreviation {
  display: none !important;
}

@media screen and (max-width: 800px) {
  .full {
    display: none !important;
  }

  .abbreviation {
    display: inline !important;
  }
}
#contact, #styleswitcher {
  font-size: .9em;
  float: right;
  clear: right;
  white-space: nowrap;
  line-height: 45px;
  padding-right: 20px;
  box-sizing: border-box;
  z-index: 3;
}
#contact a, #styleswitcher a {
  text-decoration: none;
}
#contact span, #styleswitcher span {
  text-decoration: underline;
}
#contact svg, #styleswitcher svg {
  padding-right: .25em;
}
#contact svg path, #styleswitcher svg path {
  fill: #fff;
}
@media screen and (max-width: 1000px) {
  #contact, #styleswitcher {
    position: absolute;
    top: 45px;
    right: 0;
  }
  #contact span, #styleswitcher span {
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    position: absolute !important;
    white-space: nowrap !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
  }
}
@media screen and (max-width: 600px) {
  #contact, #styleswitcher {
    right: 30px;
    top: 0;
  }
}

#styleswitcher {
  clear: none;
}
@media screen and (max-width: 1000px) {
  #styleswitcher {
    right: 30px;
  }
}
@media screen and (max-width: 600px) {
  #styleswitcher {
    right: 60px;
  }
}

/* 
The navigational links
====================== */
header {
  position: fixed;
  height: 90px;
  top: 0;
  right: 0;
  width: 100%;
  z-index: 7;
}
@media screen and (max-width: 600px) {
  header {
    height: calc($masthead / 2);
  }
}
header.about-nav {
  background-color: #81cbcc;
  box-shadow: 0 0 20px 20px #81cbcc;
}
header.works-nav {
  background-color: #d53162;
  background-image: url(/images/works-bg.jpg);
  background-size: cover;
  background-position: 0 0;
}
header.resume-nav {
  background-color: #4ab94f;
  box-shadow: 0 0 20px 20px #81cbcc;
}
header.colophon-nav {
  background-color: #A96B90;
  box-shadow: 0 0 20px 20px #A96B90;
}

#main-nav {
  float: left;
  margin: 0 1em;
  height: calc($masthead / 2);
  font-weight: 300;
  z-index: 8;
  margin-top: 22.5px;
  box-sizing: border-box;
  position: relative;
}
@media screen and (max-width: 800px) {
  #main-nav {
    clear: left;
    margin: 0;
  }
}
@media screen and (max-width: 600px) {
  #main-nav {
    clear: none;
    height: 45px;
    max-width: 100%;
    overflow: hidden;
    cursor: pointer;
    z-index: 5;
    position: absolute;
    top: 0;
    right: 0;
  }
}
#main-nav #menu-icon {
  display: none;
}
@media screen and (max-width: 600px) {
  #main-nav #menu-icon {
    display: block;
    margin: 15px 20px;
    box-sizing: border-box;
    z-index: 4;
    fill: #fff;
    float: right;
  }
}
#main-nav ul {
  margin: 0;
  list-style-type: none;
  display: block;
  padding: 0;
  text-align: center;
  z-index: 3;
  /* mobile */
}
@media screen and (max-width: 600px) {
  #main-nav ul {
    position: relative;
    clear: right;
  }
}
#main-nav ul.open li {
  display: block;
}
#main-nav li {
  display: block;
  margin: 0 20px;
  padding: 0;
  line-height: 45px;
  font-weight: 300;
  text-shadow: 0 0 4px rgba(0, 0, 0, 0.2);
  float: left;
  box-sizing: border-box;
  font-size: 20px;
}
@media screen and (max-width: 1200px) {
  #main-nav li {
    margin: 0 calc($hpadding / 2);
  }
}
@media screen and (max-width: 1000px) {
  #main-nav li {
    font-size: 15px;
    margin: 0 calc($hpadding / 2);
  }
}
@media screen and (max-width: 800px) {
  #main-nav li {
    margin: 0 20px;
  }
}
@media screen and (max-width: 600px) {
  #main-nav li {
    position: relative;
    display: none;
    float: none;
    background-color: #fff;
    border-bottom: 1px solid #eee !important;
    text-align: left;
    padding: 0 1em;
    height: auto;
    line-height: auto;
  }
}
#main-nav li.active {
  font-weight: 700;
  border-width: 0;
  border-bottom: 2px solid rgba(255, 255, 255, 0.5);
}
@media screen and (max-width: 600px) {
  #main-nav li.active {
    border-bottom-width: 0;
  }
}
#main-nav li a {
  color: white;
  display: block;
  text-decoration: none;
}
@media screen and (max-width: 600px) {
  #main-nav li a {
    width: 100%;
    box-sizing: border-box;
    color: #000;
  }
}

.fyi {
  font-weight: bold;
}

/* 
The text on the white background (and stuff)
============================================ */
#content {
  text-align: center;
  box-sizing: border-box;
}
@media screen and (max-width: 600px) {
  #content {
    width: 100%;
  }
}
#content .section {
  clear: left;
  padding-bottom: 90px;
  box-sizing: border-box;
  text-align: left;
  background-attachment: fixed;
}
@media screen and (max-width: 600px) {
  #content .section {
    padding: 0 0 20px;
  }
}
#content .section::before {
  content: "";
  display: block;
  margin-top: -90px;
  height: 90px;
}
@media screen and (max-width: 600px) {
  #content .section::before {
    margin-top: calc(-$masthead / 2);
    height: calc($masthead / 2);
  }
}
#content .section::after {
  content: "";
  display: block;
  clear: both;
}
#content .section .section-inner {
  max-width: 1000px;
  margin: auto;
  padding: 0 20px 45px;
  position: relative;
  z-index: 4;
}
#content .section .section-inner .column {
  width: 50%;
  max-width: 500px;
  box-sizing: border-box;
  float: left;
}
#content .section .section-inner .column:nth-of-type(1) {
  padding-right: calc($padding / 2);
}
#content .section .section-inner .column:nth-of-type(2) {
  padding-left: calc($padding / 2);
}
@media screen and (max-width: 800px) {
  #content .section .section-inner .column {
    float: none;
    max-width: none;
    width: 100%;
    padding: 0 !important;
  }
}
#content h2 {
  margin: 1em 0 0;
  font-size: 2em;
  font-weight: 400;
  text-shadow: 0 0 3px rgba(0, 0, 0, 0.25);
  min-height: 90px;
}
#content h3 {
  font-size: 1.45em;
  font-weight: 200;
  margin: 1em 0 .5em;
  text-shadow: 0 0 3px rgba(0, 0, 0, 0.25);
}

#about {
  text-shadow: 0 0 5px rgba(0, 50, 50, 0.6);
}
#about h2 {
  margin-top: calc($masthead / 2);
}

body {
  background-color: #81cbcc;
  background-image: url(/images/about-bg.jpg);
  background-size: auto auto;
  /* instead of cover to make sure the background-position lines up as desired */
  background-attachment: fixed;
  background-position: 50% -180px;
}

#works {
  background-color: #d53162;
  background-image: url(/images/works-bg.jpg);
  background-size: cover;
  background-position: 0 0;
  text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}
@media screen and (orientation: portrait) {
  #works {
    background-size: contain;
  }
}
#works .section-inner {
  max-width: 1500px !important;
}

#colophon {
  background-color: #a96b90;
  background-image: url(/images/colophon-bg.jpg);
  background-position: 50% 90px;
  background-size: 100% auto;
  text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}
@media screen and (orientation: portrait) {
  #colophon {
    background-size: auto 100%;
    background-position: 50% 0;
  }
}

#resume {
  background-color: #f6ffff;
}
#resume h2, #resume h3 {
  text-shadow: none;
}
#resume .section-inner {
  max-width: 800px !important;
}
#resume .section-inner > h2 {
  float: left;
}

#resume-links {
  float: right;
  padding-top: 45px !important;
}
@media screen and (max-width: 600px) {
  #resume-links {
    padding-top: 0 !important;
    margin: 0 0 1em;
  }
}

/* Work samples on the page
=========================== */
.work-container {
  position: relative;
  width: 49%;
  max-width: 750px;
  box-sizing: border-box;
  display: inline-block;
  vertical-align: top;
  transition: all .3s;
  padding: 0;
}
.work-container#oerpub1, .work-container#cnx, .work-container#static {
  padding-right: calc($padding / 2);
}
.work-container#oerpub2, .work-container#reskinning, .work-container#books {
  padding-left: calc($padding / 2);
}
@media screen and (max-width: 600px) {
  .work-container {
    width: 100%;
    max-width: none;
    padding: 0 !important;
  }
}
@media screen and (max-width: 1000px) {
  .work-container#oerpub2 {
    /* at this point this demo becomes rather unusable */
    display: none;
  }
}
.work-container .work {
  padding: .5em .75em;
  position: relative;
}
.work-container .work h3 {
  font-size: 1.35em;
  margin: 0 0 .5em;
  color: #fff;
  text-decoration: underline;
}
@media screen and (-webkit-min-device-pixel-ratio: 0) {
  .work-container .work h3 {
    text-decoration: none;
  }
}
.work-container .work .work-details {
  margin-bottom: 1em;
}
@media screen and (max-width: 1000px) {
  .work-container .work .work-details {
    width: auto;
    float: none;
    margin-right: 0;
  }
}
.work-container .work .work-details .fake-link {
  display: block;
  margin-top: .5em;
  color: #fff;
  text-decoration: underline;
  text-align: right;
}
.work-container .work .work-thumb img {
  width: 100%;
}
.work-container .work .work-thumb svg {
  position: absolute;
  right: .5em;
  top: .5em;
}
.work-container .work .work-thumb svg path {
  transform: rotate(90deg);
  transform-origin: 4px 4px;
}
.work-container .work .work-thumb svg:nth-child(1) {
  fill: #fff;
}
.work-container:hover {
  color: #fff;
}
.work-container:hover .work {
  background-color: rgba(108, 93, 166, 0.8);
}
.work-container:hover img {
  opacity: .2;
}
.work-container:hover h3 {
  color: #fff;
  text-decoration: none;
}
.work-container:hover .work-details, .work-container:hover .work-description .fake-link {
  color: #fff;
}
.work-container:focus-within {
  color: #fff;
}
.work-container:focus-within .work {
  background-color: rgba(108, 93, 166, 0.8);
}
.work-container:focus-within img {
  opacity: .2;
}
.work-container:focus-within h3 {
  color: #fff;
  text-decoration: none;
}
.work-container:focus-within .work-details, .work-container:focus-within .work-description .fake-link {
  color: #fff;
}
