/*-----------------------------------*\
  General things
\*-----------------------------------*/

header, section, footer, aside, nav, article, figure { 
  display: block; 
}

body {
  font-family: 'PT Serif', Georgia, Helvetica Neue, Helvetica, Arial, serif;
  margin: 3rem 0;
}

nav {
  display: inline;
}

a {
  color: #B91313;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/*-----------------------------------*\
  Miscellaneous
\*-----------------------------------*/


h2 {
  font-style: italic;
}

ul, ol {
  list-style-position: inside;
  margin-bottom: 30px;
  margin-bottom: 1.5rem;
  padding-left: 0.25rem;
  padding-left: 5px;
}

ul {
  list-style-type: square;
}

ol {
  list-style-type: decimal;
}

ul li {
  text-indent: -1em;
  margin-left: 1em;
}

ol li {
  text-indent: -1.1em;
  margin-left: 1.1em;
}

/*
ul li:before {
  content: "\00BB \0020";
  color: #888;
  margin-bottom: -0.75rem;
}
*/

ul p {
  margin-left: 15px;
  margin-bottom: 0.75rem;
}

/* Responsive images and embeds */
img, iframe {
  max-width: 100%;
}

/* Image drow shadow */
.dropshadow {
  width:98%;
  padding: 5px;
  border: solid 1px #CCC;
  -moz-box-shadow: 1px 1px 5px #999;
  -webkit-box-shadow: 1px 1px 5px #999;
  box-shadow: 1px 1px 5px #999;
}

/* For align center */
.center, .align-center {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

#email {
  unicode-bidi: bidi-override;
  direction: rtl;
}

blockquote {
  color: #404040;
  font-style: italic;
  padding-left: 10px;
  border-left: 4px solid #eee;
}

textarea, pre {
  background: #eee;
  padding: 20px;
  overflow: auto;
  /*margin: 10px 30px;*/
  /*margin: 0.5rem 1.5rem;*/
  margin-top: 10px;
  margin-top: 0.5rem;
  margin-bottom: 30px;
  margin-bottom: 1.5rem;
}

code, tt {
  padding: 1px 4px 1px 4px;
  border: 1px solid #888;
}

/*-----------------------------------*\
  Projects list
\*-----------------------------------*/

#dijkstravis       { background: url(../img/dijkstravis-teaser.png)       center no-repeat; }
#rotordisplay      { background: url(../img/rotordisplay-teaser.jpg)      center no-repeat; }
#wiimotelogger     { background: url(../img/wiimotelogger-teaser.png)     center no-repeat; }
#wiimotewhiteboard { background: url(../img/wiimotewhiteboard-teaser.png) center no-repeat; }

.teaser {
  margin-bottom: 20px;
  margin-bottom: 1rem;
  text-align: center;
}

.teaser a {
  display: block;
  height: 240px;
}

.teaser a div {
  position: absolute;
  left: 50%;
  bottom: 0;
}

.teaser a p {
  color: white;
  margin: 0;
  padding: 5px;
  width: 300px;
  /*http://stackoverflow.com/questions/1776915/how-to-center-absolute-element-in-div*/
  position: relative;
  left: -50%;
  /*http://stackoverflow.com/questions/806000/css-semi-transparent-background-but-not-text*/
  /* Fallback for web browsers that doesn't support RGBa */
  background: rgb(0, 0, 0) transparent;
  /* RGBa with 0.6 opacity */
  background: rgba(0, 0, 0, 0.6);
  /* For IE 5.5 - 7*/
  filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000);
  /* For IE 8*/
  -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000)";
}

/*-----------------------------------*\
  List of articles
\*-----------------------------------*/

#articles article {
  margin-bottom: 20px;
  margin-bottom: 1rem;
}

time {
  color: #888;
}

#articles time {
  padding: 0;
  width: 6rem;
  margin-right: 1rem;
  float: left;
  text-align: right;
  clear: both;
}

#articles header a {
  color: #B91313;
}
#articles header a:hover {
  text-decoration: underline;
}

/*-----------------------------------*\
  Banner & footer
\*-----------------------------------*/

#banner hr {
  margin: 0;
  width: 100%;
  /*margin: 10px 60px;*/
  /*margin: 0.5rem 3rem;*/
  margin-top: 10px;
  margin-top: 0.5rem;
  margin-bottom: 60px;
  margin-bottom: 3rem;
}

#banner h1 {
  font-style: normal;
  font-size: 30px;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  display: inline-block;
}

#banner h1 span {
  font-weight: 400;
}

#banner h1 small {
  font-weight: 400;
  color: #888;
}

#banner ul {
  /*color: #404040;*/
  font-size: 20px;
  font-size: 1rem;
  line-height: 2;
  float: right;
  display: inline;
  list-style: none;
  margin-bottom: 0;
  /*margin-bottom: 1.5rem;*/
}

#banner ul li {
  display: inline;
  margin-left: 6px;
}

#banner ul li:before {
  content: "";
  color: #888;
  position: absolute;
  margin: 0;
}

footer p {
  color: #888;
  text-transform: uppercase;
  font-size: 13px;
  font-size: 0.65rem;
}


/*-----------------------------------*\
  Article and page headers
\*-----------------------------------*/

header h1, header h2 {
  margin-bottom: 0;
  line-height: 1;
}

header time {
  display: block;
  margin-bottom: 25px;
  margin-bottom: 1.5rem;
}

header a {
  /*font-size:40px;*/
  color: black;
  /*text-align:center;*/
  /*letter-spacing:-.1px;*/
  /*margin-bottom:0;*/
}

header a:hover {
  text-decoration: none;
}

/*-----------------------------------*\
  Adjustments for smaller screen size
\*-----------------------------------*/

@media screen and (max-width: 540px) {

  #banner {
    text-align: center;
  }

  #banner ul {
    float: none;
  }

  #banner ul li {
    margin-left: 3px;
    margin-right: 3px;
  }

  #banner h1 {
    font-size: 30px;
    font-size: 1.5rem;
    display: block;
  }

  #articles article, #articles time {
    text-align: left;
  }

  #articles time {
    padding: 0;
    width: 100%;
    margin-right: 0;
    float: none;
    display: block;
    margin-bottom: 0;
  }

  footer p {
    font-size: 10px;
    font-size: 0.5rem;
  }


}
