/*
Some basics
=========== */
body {
  font-family: "Open Sans", Heebo, Quicksand, georgia, sans-serif;
  font-weight: 400;
  padding: 0;
  margin: 0;
  background-color: #fff;
  color: #333;
}

h1, h2, h3, h4, h5, h6, header {
  font-family: Catamaran, "Open Sans", Montserrat, georgia, sans-serif;
}

a {
  color: #b00;
}
a:visited {
  color: #666;
}
a:active {
  color: #ce6247;
}

.mfp-fade.mfp-wrap .mfp-content .lightbox {
  opacity: 1;
  transform: rotate(-180deg) scaleX(-1);
  width: 400px;
  height: 300px;
  border-radius: 255px 15px 225px 15px/15px 225px 15px 255px;
}
.mfp-fade.mfp-wrap .mfp-content .lightbox * {
  opacity: 0;
  transition: opacity 1s;
}
.mfp-fade.mfp-wrap.mfp-ready .mfp-content .lightbox {
  background-color: #fff;
  background-image: none;
  transform: rotate(0deg) scaleX(1);
  transition: all 1s;
  transition-delay: 1s;
  border-radius: 0;
  left: 30px;
  width: calc(100% - 60px);
}
@media screen and (max-width: 600px) {
  .mfp-fade.mfp-wrap.mfp-ready .mfp-content .lightbox {
    left: 15px;
    width: calc(100% - 30px);
  }
}
.mfp-fade.mfp-wrap.mfp-ready .mfp-content .lightbox * {
  opacity: 1;
  transition: opacity 1s;
  transition-delay: 1s;
}
.mfp-fade.mfp-wrap.mfp-removing .mfp-content .lightbox {
  width: 400px;
  height: 300px;
  opacity: 1;
  transform: rotate(180deg) scaleX(-1);
  overflow: hidden !important;
  transition-delay: 0s;
  border-radius: 255px 15px 225px 15px/15px 225px 15px 255px;
}
.mfp-fade.mfp-wrap.mfp-removing .mfp-content .lightbox * {
  opacity: 0;
  transition: opacity 0s;
}

button.mfp-close, button.mfp-close:active {
  right: 30px;
}
@media screen and (max-width: 600px) {
  button.mfp-close, button.mfp-close:active {
    right: 15px;
  }
}

/* 
The black bar across the top of the page (and the links nearby)
=============================================================== */
header {
  z-index: 11;
  position: fixed;
  height: calc(70% - (calc($navheight / 2)) - 1px);
  width: 100%;
  height: 45px;
  line-height: 45px;
  background-color: #222;
  overflow: hidden;
  top: 0;
  left: 0;
  color: #fff;
  box-sizing: border-box;
  text-transform: lowercase;
}
header a {
  color: #fff;
}

h1 {
  text-align: center;
  position: relative;
  z-index: 11;
  font-size: 1.2em;
  font-weight: 300;
  line-height: 45px;
  height: 45px;
  margin: 0;
}
h1 a {
  letter-spacing: .5em;
  text-decoration-color: #444;
  position: relative;
}
h1 a:after {
  margin-left: -.5em;
  position: absolute;
  width: .5em;
  content: ".";
  text-indent: -9999px;
  height: 45px;
  background-color: #222;
}
h1 a:visited {
  color: currentColor;
}
@media screen and (max-width: 600px) {
  h1 {
    clip: rect(0 0 0 0) !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
  }
}

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

#langlinks {
  line-height: normal;
  position: absolute;
  top: 0;
  right: 30px;
  line-height: 45px;
  height: 45px;
  z-index: 11;
  font-weight: bold;
}
#langlinks a {
  font-weight: normal;
}

li#english {
  border-right: 1px solid #999;
  padding-right: .5em;
  margin-right: .25em;
}

.full {
  display: inline;
}

.abbreviation {
  display: none !important;
}

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

  .abbreviation {
    display: inline !important;
  }
}
#contact, #styleswitcher {
  display: inline;
  white-space: nowrap;
  box-sizing: border-box;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 11;
  height: 45px;
  line-height: 45px;
  margin-left: 15px;
}
#contact a, #styleswitcher a {
  text-decoration: none;
}
#contact span, #styleswitcher span {
  text-decoration: underline;
}
#contact svg, #styleswitcher svg {
  display: none;
}

#styleswitcher {
  display: none;
}

/* 
The navigation bar at top 
========================= */
#main-nav {
  position: fixed;
  width: 100%;
  height: 75px;
  font-weight: 300;
  z-index: 11;
  box-sizing: border-box;
  top: 45px;
  left: 0;
  box-sizing: border-box;
  overflow: hidden;
  background-color: #fff;
}
@media screen and (max-width: 600px) {
  #main-nav {
    height: 45px;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    cursor: pointer;
    z-index: 5;
  }
}
#main-nav #menu-icon {
  display: none;
}
@media screen and (max-width: 600px) {
  #main-nav #menu-icon {
    display: block;
    margin: 14px 15px 16px;
    box-sizing: border-box;
    text-align: center;
    z-index: 4;
    position: absolute;
    left: 0;
  }
}
#main-nav ul {
  list-style-type: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin: 0;
  margin-right: 30px;
  padding: 0;
  text-align: right;
  z-index: 4;
  /* mobile */
}
@media screen and (max-width: 600px) {
  #main-nav ul {
    justify-content: flex-start;
    position: relative;
    width: auto;
    z-index: 3;
    padding-top: 30px;
    bottom: 30px;
    margin: 0;
  }
}
#main-nav ul.open {
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}
#main-nav ul.open li {
  display: block;
}
#main-nav li {
  display: inline;
  margin: 0;
  font-size: 20px;
  line-height: 75px;
  transition: all 1s;
}
@media screen and (max-width: 600px) {
  #main-nav li {
    text-align: left;
    border-left-width: 0;
    padding-left: 0;
    position: relative;
    display: none;
    line-height: 45px;
    width: 100%;
  }
}
#main-nav li.active {
  transition: all 1s;
  font-weight: 600;
  font-size: 30px;
}
@media screen and (max-width: 600px) {
  #main-nav li.active {
    position: static;
    display: block;
    font-size: 20px;
    font-weight: 700;
  }
}
#main-nav li.active a {
  transition: all 1s;
  text-decoration: none;
}
#main-nav li a {
  padding: 0 .5em;
  color: #b00;
}
@media screen and (max-width: 600px) {
  #main-nav li a {
    padding: 0 15px 0 45px !important;
    height: 45px;
    line-height: 45px;
    width: 100%;
    background-color: #fff;
    box-sizing: border-box;
    display: block;
  }
}

/* 
The 4 major divisions of the site ("Works" being rather different in v3)
======================================================================== */
@media (prefers-reduced-motion) {
  *, *::before, *::after {
    transition: all 1ms !important;
  }
}
.section h2 {
  margin: 0;
  font-size: 2em;
  font-weight: 400;
  text-shadow: 0 0 3px rgba(255, 255, 255, 0.5);
}
.section h3 {
  font-size: 1.6em;
  font-weight: 400;
  margin: 1em 0 .5em;
}

@keyframes swipe-away {
  0% {
    left: 30px;
    transform: skew(0deg);
  }
  100% {
    left: -100%;
    transform: skew(45deg);
  }
}
@keyframes disappear {
  100% {
    left: -100%;
  }
}
@keyframes swipe-down {
  0% {
    top: 120px;
    transform: scale(1);
  }
  100% {
    top: 100%;
    transform: scale(0.1);
  }
}
@keyframes bounce-down {
  0% {
    top: -100%;
    transform: scale(0);
  }
  20% {
    transform: scale(0.05);
  }
  65% {
    top: 170px;
    transform: scale(0.8);
  }
  100% {
    top: 120px;
    transform: scale(1);
  }
}
@keyframes appear {
  100% {
    top: 120px;
  }
}
main {
  padding-top: 120px;
}

.section {
  position: fixed;
  top: 120px;
  left: 30px;
  z-index: 1;
  height: calc(100% - 75px - 45px - 30px);
  width: calc(100% - 60px);
  color: #fff;
  box-sizing: border-box;
  box-shadow: -5px -5px 10px rgba(0, 0, 0, 0.2);
  background-size: auto auto, auto 100%;
  background-position: 50% 50%, right bottom;
  background-repeat: repeat, no-repeat;
}
@media screen and (max-width: 600px) {
  .section {
    left: 15px;
    top: 105px;
    width: calc(100% - 30px);
    height: calc(100% - 45px - 45px - 15px);
  }
}
.section a {
  color: #fff;
}
.section:not(.opened):not(#works) {
  display: none;
}
.section.opened:not(#works) {
  display: block;
  animation-name: bounce-down;
  animation-duration: 1s;
  animation-timing-function: linear;
  z-index: 10;
  overflow-y: auto;
}
@media (prefers-reduced-motion) {
  .section.opened:not(#works) {
    animation-name: appear;
    animation-duration: 1ms;
  }
}
.section.closed:not(#works) {
  transform: rotate(0deg);
  animation-name: swipe-away;
  animation-duration: .5s;
  opacity: 1;
  animation-timing-function: cubic-bezier(0.55, 0.085, 0.68, 0.53);
  display: block;
}
@media (prefers-reduced-motion) {
  .section.closed:not(#works) {
    animation-name: disappear;
    animation-duration: 1ms;
  }
}
@media screen and (max-width: 800px) {
  .section.closed:not(#works) {
    animation-name: swipe-down;
  }
}
@media screen and (max-width: 800px) and (prefers-reduced-motion) {
  .section.closed:not(#works) {
    animation-name: disappear;
    animation-duration: 1ms;
  }
}

.section .section-inner {
  padding: 30px;
  max-width: 750px;
}
@media screen and (max-width: 600px) {
  .section .section-inner {
    padding: 15px;
  }
}

.fyi {
  font-weight: 700;
}

.close-x {
  float: right;
  margin: 1em;
}

#intro-v3 {
  text-align: center;
  margin: 0 1em 1em;
  opacity: 1;
  transition: opacity .5s;
}
.non-works-opened #intro-v3 {
  opacity: 0;
}
#intro-v3 a {
  color: #b00;
}

#about {
  background-image: linear-gradient(90deg, rgba(186, 67, 67, 0.9), rgba(163, 67, 104, 0.9)), url(/images/chimp-04.jpg);
}

#works {
  width: calc(100% - 60px);
  opacity: 1;
  transition: opacity .5s;
  transform: rotate(0deg);
  display: block;
  position: relative;
  box-shadow: none;
  padding-top: 15px;
  left: 30px;
  top: auto;
  text-align: center;
}
#works:hover h2 {
  animation-name: none;
}
#works h2 {
  clip: rect(0 0 0 0) !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  white-space: nowrap !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}
#works .section-inner {
  max-width: none;
  padding: 0;
}
.non-works-opened #works {
  opacity: 0;
}

#banana {
  background-image: linear-gradient(135deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0)), url(/images/banana-04.png);
  background-repeat: no-repeat;
  background-position: right bottom;
  background-size: 200px;
  height: 130px;
  transition: all 1s;
}
@media (prefers-reduced-motion: no-preference) {
  #banana:hover {
    background-position: left bottom;
    transition: all 1s;
  }
}

#resume {
  background-image: linear-gradient(135deg, #0C4767, #6E8990);
  background-image: linear-gradient(90deg, rgba(43, 108, 122, 0.9), rgba(49, 115, 97, 0.9)), url(/images/chimp-02.jpg);
}
#resume h2 {
  float: left;
}
#resume #resume-text h3 {
  color: #fff;
}
#resume #resume-text h4 {
  font-size: 1.3em;
  margin: 0;
}
#resume #resume-text h4 .employer-explanation {
  font-size: 1.1rem;
}
#resume #resume-text h5 {
  font-size: 1.1em;
  margin: .25em 0 .25em .25em;
}
#resume #resume-text .resume-bullet svg {
  fill: #fff;
}
#resume #resume-text p:first-of-type {
  text-align: right;
}
#resume #resume-links {
  margin-top: .5em;
}
@media (max-width: 900px) {
  #resume #resume-links {
    clear: right;
  }
}

#colophon {
  background-image: linear-gradient(90deg, rgba(56, 96, 133, 0.9), rgba(96, 88, 138, 0.9)), url(/images/chimp-03.jpg);
}

/* Work samples on the page
=========================== */
#gwlib {
  background-image: linear-gradient(0deg, rgba(0, 0, 0, 0.25), transparent), linear-gradient(#BA4976, #BA4976);
}

#gwfloormaps {
  background-image: linear-gradient(0deg, rgba(0, 0, 0, 0.25), transparent), linear-gradient(#CC4949, #CC4949);
}

#oerpub1 {
  background-image: linear-gradient(0deg, rgba(0, 0, 0, 0.25), transparent), linear-gradient(#56822E, #56822E);
}

#oerpub2 {
  background-image: linear-gradient(0deg, rgba(0, 0, 0, 0.25), transparent), linear-gradient(#1D8567, #1D8567);
}

#cnx {
  background-image: linear-gradient(0deg, rgba(0, 0, 0, 0.25), transparent), linear-gradient(#268094, #268094);
}

#reskinning {
  background-image: linear-gradient(0deg, rgba(0, 0, 0, 0.25), transparent), linear-gradient(#3C74A6, #3C74A6);
}

#static {
  background-image: linear-gradient(0deg, rgba(0, 0, 0, 0.25), transparent), linear-gradient(#736AA6, #736AA6);
}

#books {
  background-image: linear-gradient(0deg, rgba(0, 0, 0, 0.25), transparent), linear-gradient(#8A4D99, #8A4D99);
}

.work-container {
  position: relative;
  box-shadow: -5px -5px 10px rgba(0, 0, 0, 0.2);
  width: 400px;
  height: 300px;
  margin: 0 1em 1.4em 0;
  display: inline-block;
  overflow: hidden;
  box-sizing: border-box;
  border: 1px solid transparent;
  vertical-align: top;
  transition: all .3s;
  padding: 1.5em;
  border-radius: 255px 15px 225px 15px/15px 225px 15px 255px;
  /* Thank you to Tiffany Rayside for this trick https://codepen.io/tmrDevelops/pen/VeRvKX */
  background-color: #fff !important;
  text-align: left;
  /*
  &::after {
    box-shadow: inset -25px -25px 25px rgba(0, 0, 0, .2);
    content: "";
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    position: absolute;
    display: block;
    z-index: 2;
  }
  */
}
@media screen and (max-width: 600px) {
  .work-container {
    margin: 0 -.5em 1em;
    width: calc(100% + 1em);
    height: 350px;
  }
}
.work-container.lightbox-opened * {
  display: none;
}
.work-container .work-description {
  display: none;
  width: 105%;
}
@media screen and (max-width: 800px) {
  .work-container .work-description {
    display: block;
    width: 100%;
  }
}
@media screen and (max-width: 1000px) {
  .work-container#oerpub2 {
    /* at this point this demo becomes rather unusable */
    display: none;
  }
}
.work-container .work h3 {
  font-size: 1.35em;
  line-height: 1.25em;
  margin: 0 0 .75em;
}
@media screen and (-webkit-min-device-pixel-ratio: 0) {
  .work-container .work h3 {
    text-decoration: none;
  }
}
.work-container .work .work-details {
  width: 50%;
}
.work-container .work .work-details .fake-link {
  display: block;
  margin-top: .5em;
  text-decoration: underline;
}
@media screen and (max-width: 600px) {
  .work-container .work .work-details {
    width: 100%;
  }
}
.work-container .work .work-thumb {
  position: absolute;
  left: 55%;
  top: 20%;
  width: 100%;
}
.work-container .work .work-thumb img {
  width: 100%;
  box-sizing: border-box;
}
.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;
}
@media screen and (max-width: 600px) {
  .work-container .work .work-thumb {
    position: static;
    margin-top: 1.5em;
  }
}
.work-container:hover h3 {
  color: #fff;
  text-decoration: none;
}
.work-container:hover .work-description {
  display: block;
}
@media (prefers-reduced-motion: no-preference) {
  .work-container:hover .work-thumb {
    left: 60%;
    top: 25%;
    transition: all .5s;
  }
}
.work-container:focus-within {
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.9);
}
.work-container:focus-within h3 {
  color: #fff;
  text-decoration: none;
}
.work-container:focus-within .work-description {
  display: block;
}
@media (prefers-reduced-motion: no-preference) {
  .work-container:focus-within .work-thumb {
    left: 60%;
    top: 25%;
    transition: all .5s;
  }
}
