/*
  general structure
*/
body {
  font: normal 0.9em/1.3em "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;
  color: #414141;
}

a {
  color: #236592;
}

header {
  padding: 10px;
}

footer {
	clear: both;
	height: 1em;
}

p {
  margin-bottom: 1em;
}

ul {
  list-style: disc; margin-bottom: 1em; margin-left: 1em;
}


blockquote:before,blockquote:after,
q:before,q:after {
  color: #aaa;
  font-size: 3em;
  line-height: 0.1em;
  margin-right: 0.25em;
  vertical-align: -0.4em;
  }
  blockquote:before, q:before {
    content: open-quote;
    }
    blockquote:after,q:after {
      content: close-quote;
      }
        blockquote, q {
    font-size: 1.3em;
    line-height: 1.3em;
    margin: 1em 10px;
    padding: 0.5em 10px;
  }
  cite {
    display: block;
    text-align: right;
    font-style: italic;
  }
  cite:before {
    content: '—'
  }
h1, h2 {
  font: 500 1.5em/1.3em "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;
}
h3 {
  font: 300 1.3em/1.2em "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;
}
h4 {
  font-style: italic;
  margin-bottom: .4em;
}
header h1 {
  font: 400 1.2em/1.3em "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;
}
header h1 a {
	color: inherit;
	text-decoration: none;
}

#summary {
  padding: 10px;
}

#content {
    display: -webkit-box;      /* OLD - iOS 6-, Safari 3.1-6 */
    display: -moz-box;         /* OLD - Firefox 19- (buggy but mostly works) */
    display: -ms-flexbox;      /* TWEENER - IE 10 */
    display: -webkit-flex;     /* NEW - Chrome */
    display: flex;
    flex-wrap: wrap;
}

/*
  navigation elements
*/
nav {
  padding-top: 4px;
}
header#main h1, header#main nav, header#main ul {
  display: inline;
  margin-right: 1em;
}
nav li {
  display: inline;
}
#main nav li a {
  font: 300 1.2em/1.3em "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;
  margin-right: 1em;
}
#summary nav {
  margin-bottom: 1em;
}

#filter a, #tags a {
  text-decoration: none;
}
#filter li, #tags li {
  padding: 0 5px;
  margin-bottom: 3px;
  background-color: #c8f2f0;
  border-radius: 3px;
  display: inline-block;
  opacity: .6;
}
#filter .selected, #tags .selected {
    opacity: 1;
}

#filter .topic, #tags .topic {
  background-color: #c8e1f2;
}

#filter .stage, #tags .stage {
  background-color: #e8daf6;
}

/*
  cards - the building block of the layout
  
  A card's main content space is 300pt wide by 450pt high, with a padding of 10pt for a footprint of 320 x 470 (or 640px x 940px). 
  The top/left padding is masked, and the bottom/right is not. In addition, images are anchored at top/left and slightly scaled up to make sure the bottom/right bleeds enough. 
  Ideal whole-card images are 640x940, double-wide 1280x940, and triple-wide 1920x940.
*/

/* effective window: 320px by 470px, 0.68:1 */
.card {
  padding: 20px;
  overflow: hidden;
  opacity: 1;
  transition: opacity .2s, display .2s, margin: .2s, padding: .2s;
  vertical-align: top;
  float: left;
  margin-right: 30px;
  margin-bottom: 30px;
}
/* effective window: 640px by 470px, 1.36:1 */
.card.doublewide {
  width: 600px;
}
/* effective window: 960px by 470px, 2.04:1 */
.card.triplewide {
  width: 920px;
}
.card img, .card video {
  zoom: .25;
  min-height: 105%;
  min-width: 105%;
 }
.card.center img {
  padding-left: 50%;
  margin-left: -100%;
  padding-top: 50%;
  margin-top: -100%;
}
.linebreak {
  float: none;
}

#work .card h3 {
  font-size: 1.1em;
  line-height: 1.2em;
}
#work .card a {
  text-decoration: none;
}
.card.filtered {
  opacity: 0;
  padding: 0;
  margin: 0;
}

#contact .card, #cv .card {
  height: auto;
  width: 95%;
  max-width: 600px;
}


#project .card h3 {
    margin-bottom: .5em;
}

/*
  mobile devices
*/
@media screen and (max-width: 645px) {
  .card {
    width: 100vw;
    max-height: 90vh;
    transition: max-height .3s;
    display: block;
    margin-bottom: 0;
  }
  .card.filtered {
    max-height: 0;
    opacity: 0;
  }
  .card img, .card video {
    margin-left: -40px;
  }
  .card.fit img {
    margin-left: -10px;
    zoom: 2;
    min-height: 1%;
    min-width: 1%;
    max-height: 110%;
    max-width: 110%;
  }
}

/*
  bigger devices
*/
@media screen and (min-width: 645px) {
  .card {
    width: 280px;
    height: 430px;
    transition: width .2s;
  }
  .card.filtered {
    width: 0;
  }
  .card.doublewide {
    max-width: none;
  }
  .card.triplewide {
    max-width: none;
  }
  .card.fit img {
    zoom: 4;
    min-height: 1%;
    min-width: 1%;
    max-height: 103%;
    max-width: 103%;
  }
}
