@offset: 15px;
@min-width: 400px;

@txtcol: #eee;
@bodycol: #333;

.text-shadow(@off: -1px, @c: #000) {
  text-shadow: 0 @off 0px @c;
  -moz-text-shadow: 0 @off 1px @c;
  -webkit-text-shadow: 0 @off 1px @c;
  -o-text-shadow: 0 @off 1px @c;
}
.box-shadow(@ho: 0px, @vo: 0px, @blur: 5px, @spread: 0px, @col: black) {
  -webkit-box-shadow: @arguments;
     -moz-box-shadow: @arguments;
          box-shadow: @arguments;
}
.no-box-shadow() { .box-shadow(0px, 0px, 0px, 0px, transparent); }
.box-shadow-inset(@ho: 0px, @vo: 0px, @blur: 5px, @spread: 3px, @col: black, @mode: inset) {
  -webkit-box-shadow: @arguments;
     -moz-box-shadow: @arguments;
          box-shadow: @arguments;
}

body, html { margin: 0; padding: 0; }
div, article, section, aside, nav { display: block;}

body {
  background: url(../img/bg-jpeg.jpg) top left scroll #333;
  color: @txtcol;
  font-family: Asap, Arial;
  font-weight: 400;
  font-size: 18px;
  line-height: 1.5em;
}

a { color: inherit; }
h1, h2, h3, h4 {
  font-family: 'Exo', 'Futura Light', Arial;
}
h1 { font-size: 1.5em; margin-top: 0; margin-bottom: 0.4em; border-bottom: 1px solid #eee; }
h2 { font-size: 1.4em; margin-bottom: 0.3em; }
h3 { font-size: 1.3em; font-family: Asap, Arial; font-weight: 400; margin-bottom: 0.2em; }
h4 { font-size: 1.2em; }
p  { margin: 0em 0 1em 0; }
nav {
  margin: 100px 10px 15px 10px;
  height: 85px;
}
@sdt-dark: #000;
@sdt-w: 170px;
@sdt-h: 85px;

.size () { width: @sdt-w; height: @sdt-h; }
.sdt {
  padding: 0;
  line-height: 1.1em;
  margin: 0;

  &, ul { list-style: none; padding: 0; }

  * { margin: 0; }
  a { text-decoration: none; }
  .menu-box { display: none; }

  > li {
    float: left;
    .size;
    position: relative;
    cursor: pointer;

    > a {
      position: absolute;
      top: 0; left: 0;
      z-index: 12;
      .size;
      background: transparent url(/img/menu-item-overlay.png) bottom right no-repeat;
      .box-shadow;
    }
    a img {
      border: none;
      position: absolute;
      width: 0; height: 0;
      bottom: 0;
      left: @sdt-w / 2;
      z-index: 100;
      .box-shadow(0px, 0px, 3px, 0px);
    }
    .wrap {
      position: absolute;
      top: 25px;
      left: 0px;
      width: @sdt-w;
      height: 60px;
      z-index: 15;
    }

  }
  .txt, .tagline, .menu-box a {
    font-family: Exo, Arial;
    font-weight: 700;
    .text-shadow;
  }
  .txt, .tagline { margin-left: 15px; }
  .txt {
    color: white;
    float: left;
    clear: both;
    font-size: 24px;
  }
  .tagline {
    float: left;
    clear: both;
    display: block;
    font-size: 10px;
    color: lighten(#0B75AF, 20%);
    font-family: Arial;
    text-transform: uppercase;
  }
  li {
    .menu-box {
      display:block;
      position:absolute;
      width: @sdt-w;
      overflow:hidden;
      height: 170px;
      top: @sdt-h;
      left:0px;
      display:none;
      background:#000;
      cursor: default;

      a {
        color: #0B75AF;
        font-size: 80%;
        font-family: Asap, Arial;
        font-weight: 400;
        color: darken(@txtcol, 10%);
        text-decoration: none;
        display: block;
        padding: 4px 4px 4px 15px;
        &:hover { background-color: lighten(@sdt-dark, 10%); }
      }
      li:first-child { margin-top: 15px; }
      a:hover { color: white; }
    }

    /* for non-JS clients */
    &:hover .menu-box {
      display: block;
      position: absolute;
      bottom: 0; left: 0;
    }
    span.active {
      position: absolute;
      background: #111;
      top: @sdt-h;
      width: @sdt-w;
      height: 0;
      left: 0;
      z-index: 14;
      .box-shadow-inset(0px, 0px, 4px);
    }
  }
}

#wrapper { display: block; }
#contents {
  color: @bodycol;
}
  #main-contents {
    background: white top left scroll;
  }
  #main-contents img {
    height: auto;
  }
  #main-contents pre {
    overflow: auto
  }
  #main-contents img.constrained {
    max-width: 100%;
  }
  #more-content {
    background: #222 top left scroll;
    color: @txtcol;
  }
  .twitter-follow-button {
    margin: 20px 0 0 0;
  }
  .floater {
    max-width: 40%;
    margin: 0 0 5px 10px;
    float: right;
    border: 15px solid black;
  }

.vcard {
  display: none !important; /* TODO: new business card */
  text-indent: -999em;
  height: 580px;
  background: url(../img/vcard.png) top left no-repeat scroll transparent;
  background-size: 100% auto;
}

.gitbadge { float: right; margin: 0 0 0 1em; }

blockquote {
  background: #f9f9f9;
  border-left: 10px solid #ccc;
  margin: 1.5em 10px;
  padding: 0.5em 10px;
  quotes: "\201C""\201D""\2018""\2019";
}
blockquote:before {
  color: #ccc;
  content: open-quote;
  font-size: 4em;
  line-height: 0.1em;
  margin-right: 0.25em;
  vertical-align: -0.4em;
}
blockquote p {
  display: inline;
}

/* Media Queries
========================= */
/* Smaller than standard 1440 (devices and browsers) */

@media only screen and (min-width: 1440px) {
  #main-contents {
  /*padding-right: 250px;*/
  }
}

@media only screen and (max-width: 1439px) {
}

@media only screen and (min-width: 960px) and (max-width: 1439px) {}

/* Tablet Portrait size to standard 960 (devices and browsers) */
@media only screen and (min-width: 768px) and (max-width: 959px) {
    .padded { padding: 20px 20px 10px 20px; }
    .padded.alpha { padding: 0px 0px 10px 20px; }
    .padded.omega { padding: 0px 20px 10px 0px; }
}

/* All Mobile Sizes (devices and browser) */
@media only screen and (max-width: 767px) {

    body { font-size: 14px; }

    nav#main-nav { margin-top: @offset; height: auto }
    nav#main-nav .sdt {
      a, a * { position: static; background: none; .no-box-shadow; }
      li { float: none; height: 45px; }
      .menu-box, .active, img { display: none; visibility: hidden; }
    }

    .padded { padding: 20px 20px 10px 20px; }
}

/* Mobile Landscape Size to Tablet Portrait (devices and browsers) */
@media only screen and (min-width: 480px) and (max-width: 767px) {}

/* Mobile Portrait Size to Mobile Landscape Size (devices and browsers) */
@media only screen and (max-width: 479px) {
  .padded { padding: 10px 10px 5px 10px; }
}
