/*
 * HTML5 Boilerplate
 */

/* =============================================================================
   HTML5 element display
   ========================================================================== */

article, aside, details, figcaption, figure, footer, header, hgroup, nav, section { display: block; }
audio[controls], canvas, video { display: inline-block; *display: inline; *zoom: 1; }

/* =============================================================================
   Base
   ========================================================================== */

/*
 * 1. Correct text resizing oddly in IE6/7 when body font-size is set using em units
 *    http://clagnut.com/blog/348/#c790
 * 2. Force vertical scrollbar in non-IE
 * 3. Remove Android and iOS tap highlight color to prevent entire container being highlighted
 *    www.yuiblog.com/blog/2010/10/01/quick-tip-customizing-the-mobile-safari-tap-highlight-color/
 * 4. Prevent iOS text size adjust on device orientation change, without disabling user zoom
 *    www.456bereastreet.com/archive/201012/controlling_text_size_in_safari_for_ios_without_disabling_user_zoom/
 */

html {
  font-size: 100%;
  overflow-y: scroll;
  -webkit-tap-highlight-color: rgba(0,0,0,0);
  -ms-text-size-adjust: 100%;
  -webkit-text-size-adjust: none;
  background-color: #000;
}

body { margin: 0; font-size: 14px; line-height: 1.61; font-weight: 400; }
body, button, input, select, textarea { font-family: 'Open Sans', sans-serif; color: #333; }

/*
 * These selection declarations have to be separate
 * No text-shadow: twitter.com/miketaylr/status/12228805301
 */

::-moz-selection { background: #bfbebd; color: #222; text-shadow: none; }
::selection { background: #bfbebd; color: #222; text-shadow: none; }


/* =============================================================================
   Links
   ========================================================================== */

a { color: #12C; }
a:visited { color: #61C; }
a:focus { outline: thin dotted; }

/* Improve readability when focused and hovered in all browsers: people.opera.com/patrickl/experiments/keyboard/test */
a:hover, a:active { color: #c00; outline: 0; }

/* =============================================================================
   Typography
   ========================================================================== */

abbr[title] { border-bottom: 1px dotted; }

b, strong { font-weight: bold; }

blockquote { margin: 1em 40px; }

dfn { font-style: italic; }

hr { display: block; height: 1px; border: 0; border-top: 1px solid #ccc; margin: 1em 0; padding: 0; }

ins { background: #ff9; color: #000; text-decoration: none; }

mark { background: #ff0; color: #000; font-style: italic; font-weight: bold; }

/* Redeclare monospace font family: en.wikipedia.org/wiki/User:Davidgothberg/Test59 */
pre, code, kbd, samp { font-family: monospace, monospace; _font-family: 'courier new', monospace; font-size: 1em; }

/* Improve readability of pre-formatted text in all browsers */
pre { white-space: pre; white-space: pre-wrap; word-wrap: break-word; }

q { quotes: none; }
q:before, q:after { content: ""; content: none; }

small { font-size: 85%; }

/* Position subscript and superscript content without affecting line-height: gist.github.com/413930 */
sub, sup { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline; }
sup { top: -0.5em; }
sub { bottom: -0.25em; }


/* =============================================================================
   Lists
   ========================================================================== */

ul, ol { margin: 1em 0; padding: 0 0 0 40px; }
dd { margin: 0 0 0 40px; }
nav ul, nav ol { list-style: none; margin: 0; padding: 0; }


/* =============================================================================
   Embedded content
   ========================================================================== */

/*
 * Improve image quality when scaled in IE7
 * code.flickr.com/blog/2008/11/12/on-ui-quality-the-little-things-client-side-image-resizing/
 */

img { border: 0; -ms-interpolation-mode: bicubic; }

/*
 * Correct overflow displayed oddly in IE9
 */

svg:not(:root) {
    overflow: hidden;
}


/* =============================================================================
   Figures
   ========================================================================== */

figure { margin: 0; }


/* =============================================================================
   Forms
   ========================================================================== */

form { margin: 0; }
fieldset { border: 0; margin: 0; padding: 0; }

/*
 * 1. Correct color not inheriting in IE6/7/8/9
 * 2. Correct alignment displayed oddly in IE6/7
 */

legend { border: 0; *margin-left: -7px; padding: 0; }

/* Indicate that 'label' will shift focus to the associated form element */
label { cursor: pointer; }

/*
 * 1. Correct font-size not inheriting in all browsers
 * 2. Remove margins in FF3/4 S5 Chrome
 * 3. Define consistent vertical alignment display in all browsers
 */

button, input, select, textarea { font-size: 100%; margin: 0; vertical-align: baseline; *vertical-align: middle; }

/*
 * 1. Define line-height as normal to match FF3/4 (set using !important in the UA stylesheet)
 * 2. Correct inner spacing displayed oddly in IE6/7
 */

button, input { line-height: normal; *overflow: visible; }

/*
 * 1. Display hand cursor for clickable form elements
 * 2. Allow styling of clickable form elements in iOS
 */

button, input[type="button"], input[type="reset"], input[type="submit"] { cursor: pointer; -webkit-appearance: button; }

/*
 * Consistent box sizing and appearance
 */

input[type="checkbox"], input[type="radio"] { box-sizing: border-box; }
input[type="search"] { -moz-box-sizing: content-box; -webkit-box-sizing: content-box; box-sizing: content-box; }

/*
 * Remove inner padding and border in FF3/4
 * www.sitepen.com/blog/2008/05/14/the-devils-in-the-details-fixing-dojos-toolbar-buttons/
 */

button::-moz-focus-inner, input::-moz-focus-inner { border: 0; padding: 0; }

/* Remove default vertical scrollbar in IE6/7/8/9 */
textarea { overflow: auto; vertical-align: top; }

/* Colors for form validity */
input:valid, textarea:valid {  }
input:invalid, textarea:invalid { background-color: #f0dddd; }


/* =============================================================================
   Tables
   ========================================================================== */

table { border-collapse: collapse; border-spacing: 0; }


/* =============================================================================
   Primary styles
   Author: Ilya Grigorik
   ========================================================================== */

body { background: #fff; }

#container {
    /*min-width: 40em;*/
}
.content, #copyright .group, #meta .group, #hero .group {
  max-width: 55em;
  margin: 0 auto;
}

header, #copyright {
  background: #000;
  color: #fff;
}

header, #main {
  padding: 1em 2em;
}

header span {
  font-size: 13px;
  color: #bfbfbf;
}

header a, header a:visited, footer a, footer a:visited, #hero a, #hero a:visited {
  color: #fff; text-decoration: none;
}

header a:hover, footer a:hover, #hero ul a:hover, #hero ul a:active { color: #bfbfbf; text-decoration: none; }

#icons a:hover { opacity: 0.75;}

#main {
  background: #fff;
  padding-top: 1em;
}

h1 {
  margin-top: 0;
  padding-top: 0.5em;
}

.byline {
  font-size:13px;
  color: #999;
  margin: -1.5em 0 1.5em 0;
  font-style: italic;
}

#small-about {
  margin-top:2em;
}

#small-about img {
  float: left;
  margin: 0.2em 0.75em 0 0;
}

#small-about p {
  font-size:85%;
  /*width:65%;*/
  font-style:italic;
  color:#555;
}

#dsq-global-toolbar, .dsq-trackback-url {
  display: none;
}

#meta, #hero {
  background: #272727;
  color: #858585;
}

#meta a { color: #bfbfbf; }
#meta a.postlink { font-size:13px; }
#meta a:hover { color: #fff; }

#meta a.archive {
  font-size:13px;
  text-decoration:none;
}

#meta h3 { margin:0; }

#ilya, #book {
  font-size: 15px;
  font-weight: 400;
  color: #bfbfbf;
  height: 263px;
}

#ilya div {
  margin-top: -1.5em;
  font-size: 14px;
  opacity: 0.4;
}

#ilya h2 {
  margin: 0.5em 0 0.8em 0;
}

#book {
  /*width:60%;*/
}

#hero .group {
  min-height: 275px;
}

#hero .group {
  background: url('/images/ilya-1x.jpg') no-repeat 100% 3px;
}

#home .book-cover, #meta .book-cover {
  display:block;
  width: 137px;
  height: 178px;
  float:left;
  margin-right: 1em;
  margin-top: 0.8em;
  background: url('/posts/projects/book-cover-1x.png') no-repeat left top;
}

@media
only screen and (-webkit-min-device-pixel-ratio: 2),
only screen and ( min--moz-device-pixel-ratio: 2),
only screen and ( -o-min-device-pixel-ratio: 2/1),
only screen and ( min-device-pixel-ratio: 2),
only screen and ( min-resolution: 192dpi),
only screen and ( min-resolution: 2dppx) {
  #hero .group {
    background: url('/images/ilya-2x.jpg') no-repeat 100% 3px;
    background-size: 772px 276px;
  }

  #home .book-cover, #meta .book-cover {
    background: url('/posts/projects/book-cover-2x.png') no-repeat left top;
    background-size: 137px 178px;
  }
}

#meta .book {
  padding: 1.5em 2em 1.5em 2em;
  color: #bfbfbf;
}

#home ul.posts {
  list-style-type: none;
  padding-left: 0;
}

#home ul.posts li {
  border-bottom: 1px solid #DDD;
  padding: 3px 0 2px 0;
}

#home ul.posts li time, #home ul.posts li .extra, #home ul.posts li span.featured {
  color: #999;
  display: inline-block;
  font-family: 'Lucida Sans Typewriter', Monaco, 'Courier', 'Courier New', monospace;
  font-size: 12px;
  white-space: nowrap;
}

#home ul.posts li .extra, #home ul.posts li time { float:right; }

time { margin-left: 1em; }

#home .featured {
  padding: 1px 1em;
  background: #eee;
  border-radius: 5px;
  margin-left: 1em;
}

#home ul li a {
  text-decoration: none;
}

#home .more {
  float:right;
  font-size: 13px;
}

#home h3 {
  margin: 0.5em 0;
}

ul.posts {
  list-style-type:circle;
}

ul.posts span {
  color: #4a4a4a;
  font-size:12px;
}

kbd {
  padding: 2px 4px;
  white-space: nowrap;
  background: #eee;
  border-width: 1px 2px 2px 1px;
  border-style: solid;
  border-color: #ccc #aaa #888 #bbb;
}

pre code {
  padding: 1em !important;
  border-radius: 1em;
  background: #272727;
  display: block;
  color: #bfbfbf;
}

code {
  padding: 1px 4px 3px 4px;
  border-radius: 5px;
  color: #666;
}

code a, code a:visited, code a:hover { color: #E6DB74; }

div.download {
  background: #dedede url('/images/download.png') no-repeat 1em;
  padding: 0.75em 4em;
  border-radius: 5px;
  color: #666;
}

code.bash .nv {
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -o-user-select: none;
  user-select: none;
}

blockquote {
  color: #888;
  font-style:italic;
}

blockquote:before {
  font-family: Helvetica;
  content: '\201C';
  font-size: 50px;
  vertical-align: bottom;
  margin-left: -40px;
  padding-right: 20px;
  line-height: 0px;
}

blockquote[cite]::after, blockquote footer {
  display: block;
  text-align: right;
  content: attr(cite);
  font-size: 13px;
  padding-top:0.75em;
  color: #333;
}

blockquote pre {
  font-family: Verdana, sans-serif;
  font-size: 12px;
  margin-top: -1.5em;
}

blockquote footer a, blockquote footer a:visited, blockquote footer a:hover {
  color: #000;
  text-decoration: underline;
}

img.left {
  float: left;
  margin-right: 1em;
}

img.center {
  margin-right: auto;
  margin-left: auto;
  display: block;
}

#ilya, #book {
  padding: 15px 2em 0 2em;
}

#hero ul, #hero ul {
  list-style-type: circle;
  padding-left: 0;
}

#hero h2 {
  color: #fff;
}

.about a, .about a:visited {
  color: #222;
}

.about a:hover {
  color: #c00;
}

a.about {
  float:right;
  font-size:13px;
  padding-left:3em;
}

#comments {
  margin-top: 1em;
}

#copyright {
  background: #000;
  padding: 1em 2em;
}

#copyright span {
  font-size: 11px;
  color: #bfbfbf;
}

/* social sprites */
#icons {
  padding: 0.5em 0 0.7em 0;
  height: 38px;
}
#icons a {
  display:block;
  float:left;
  margin-right: 0.5em;
}

.twitter-share-button {
  margin-right:20px;
}

.twitter-follow-button {
  margin-left: -12px;
}

.ytvideo {
  max-width:750px;
  height:421px;
}

.button {
  background: #77d42a;
  background: -moz-linear-gradient(top,  #77d42a 0%, #5cb811 100%);
  background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#77d42a), color-stop(100%,#5cb811));
  background: -webkit-linear-gradient(top,  #77d42a 0%,#5cb811 100%);
  background: -o-linear-gradient(top,  #77d42a 0%,#5cb811 100%);
  background: -ms-linear-gradient(top,  #77d42a 0%,#5cb811 100%);

  padding: 0.5em 1.25em;
  border-radius: 8px;
  border: 1px solid #268A16;
  font-weight: bold;
  color: #306108;
  text-shadow: 1px 1px 0px #AADE7C;
  text-decoration: none !important;
}

.ofps-blue {
  background: -webkit-gradient( linear, left top, left bottom, color-stop(0.05, rgb(42, 192, 212)), color-stop(1, rgb(17, 131, 184)) );
  border: 1px solid rgb(22, 110, 138);
  color: rgb(8, 54, 97);
  text-shadow: 1px 1px 0px rgb(124, 195, 222);
}

.ofps {
  background: #cacaca;
  background: -moz-linear-gradient(top,  #cacaca 0%, #969696 100%);
  background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#cacaca), color-stop(100%,#969696));
  background: -webkit-linear-gradient(top,  #cacaca 0%,#969696 100%);
  background: -o-linear-gradient(top,  #cacaca 0%,#969696 100%);
  background: -ms-linear-gradient(top,  #cacaca 0%,#969696 100%);

  border: 1px solid rgb(138, 138, 138);
  color: rgb(78, 78, 78);
  text-shadow: 1px 1px 0px rgb(197, 197, 197);
}

.button:hover {
  color: rgb(0,0,143);
}

.note {
  margin-left: 1em;
  font-size: 90%;
  /*font-style: italic;*/
  color: #888;
}

.testimonial {
  width:45%;
  float:left;
  font-size:90%;
  font-style: italic;
  margin-right:4%;
}

.testimonial .profile {
  float:left;
  border:1px solid #000;
  margin-right:1em;
}

.toc {
  width:50%;
  margin-right:5%;
  float:left;
  font-size:95%;
}

.toc h3 {
  margin-bottom:0em;
}

.toc h3.wip {
  color: #888;
}

.toc .part {
  color: #888;
}

.toc .status {
  float: right;
  font-size: 62%;
  color: rgb(19, 177, 63);
  text-decoration: none;
  font-weight: normal;
  padding-top: 0.25em;
}

.action {
  width:35%;
  float:right;
  margin-top:1em;
  background:#F6FFF2;
  padding:1.5em;
  border-radius:15px;
  font-size:90%;
}

.book-social {
  width:35%;
  float:right;
  padding:1.5em;
}

.book-cover {
  width: 138px;
  height: 200px;
  float: left;
  margin-right: 1.5em;
}

/* ------------------------ */
/* Timeline                 */
/* ------------------------ */
#timeline {
  background-color: #272727;
  font-size:0.9em;
  width:100%;
  cursor: -webkit-grab;
  cursor: -moz-grab;
  cursor: grab;

  height: 0;
  overflow: hidden;
  -moz-transition: all 1s ease-in-out;
  -ms-transition: all 1s ease-in-out;
  -o-transition: all 1s ease-in-out;
  -webkit-transition: all 1s ease-in-out;
  transition: all 1s;
}

#arrow {
  position: absolute;
  top: 250px;
  left: 105px;
  font-size:7em;
}
#life{
  border-top: 1px solid #858585;
  position: relative;
  overflow-y: hidden;
  padding-top: 40px;
  padding-bottom: 1em;
}
#life section.year{
  min-height: 100%;
  box-sizing: border-box;
  -moz-box-sizing: border-box;
  border-left: 1px dashed rgba(255,255,255,.1);
  color: rgba(255,255,255,.3);
  position: absolute;
  top: 0;
  bottom: 0;
  padding-left: 10px;
  padding-top: 10px;
  pointer-events: none;
  white-space: nowrap;
}
#life .event{
  padding-right: 20px;
  padding-bottom: 5px;
  vertical-align: middle;
  white-space: nowrap;
}
#life .event b {
  padding-right:0.5em;
  /*font-weight: normal;*/
  /*color: rgba(255,255,255,.5);*/
}
#life .event .time{
  display: inline-block;
  overflow: hidden;
  height: 0;
  border: 4px solid #fff;
  border-radius: 4px;
  margin-right: 10px;
  opacity: .5;
  position: relative;
  left: -2px;
}
#life .tag-postrank .time {
  border: 4px solid #F6841F;
}
#life .tag-google .time {
  border: 4px solid #00A3FF;
}
#life .tag-award .time {
  border: 4px solid #4EFC19;
}
#life .tag-uw .time {
  border: 4px solid #FCD712;
}
#life .event:hover .time{
  opacity: 0.8;
}

.callout {
  font-size: 95%;
  font-style: italic;
  background-color: rgb(240, 240, 240);
  padding: 1em;
  border-radius: 6px;
  border-top: 1px solid rgb(150,150,150);
  border-bottom: 1px solid rgb(150,150,150);
}

.author-callout {
  font-size: 95%;
  font-style: italic;
  background-color: rgb(250, 250, 255);
  padding: 1em;
  margin-top:2em;
  border-top: 1px solid rgb(182,182,182);
}
.author-callout img {
  float: left;
  margin: 0.2em 0.75em 0 0;
}

.social {
  padding: 0.5em 1em;
  background-color: #EEE;
  border-top: 1px solid rgb(182,182,182);
  border-bottom: 1px solid rgb(182,182,182);
}

.social a {
  text-decoration:none;
  font-weight:bold;
}


/* =============================================================================
   Non-semantic helper classes
   Please define your styles before this section.
   ========================================================================== */

/* For image replacement */
.ir { display: block; text-indent: -999em; overflow: hidden; background-repeat: no-repeat; text-align: left; direction: ltr; }
.ir br { display: none; }

/* Hide for both screenreaders and browsers:
   css-discuss.incutio.com/wiki/Screenreader_Visibility */
.hidden { display: none; visibility: hidden; }

/* Hide only visually, but have it available for screenreaders: by Jon Neal.
  www.webaim.org/techniques/css/invisiblecontent/  &  j.mp/visuallyhidden */
.visuallyhidden { border: 0; clip: rect(0 0 0 0); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; }

/* Extends the .visuallyhidden class to allow the element to be focusable when navigated to via the keyboard: drupal.org/node/897638 */
.visuallyhidden.focusable:active, .visuallyhidden.focusable:focus { clip: auto; height: auto; margin: 0; overflow: visible; position: static; width: auto; }

/* Hide visually and from screenreaders, but maintain layout */
.invisible { visibility: hidden; }

/* Contain floats: nicolasgallagher.com/micro-clearfix-hack/ */
.clearfix:before, .clearfix:after { content: ""; display: table; }
.clearfix:after { clear: both; }
.clearfix { zoom: 1; }

/* Smartphones (portrait) */
@media only screen and (max-width: 480px) {
  header span, header b, footer .rss { display: none; }
  #meta .group, #hero .group {
    background: #272727;
    background-image:none;
  }
  #meta { max-height:none; }
  #meta a.postlink { font-size:12px; }

  #home ul.posts li time { display:none; }
  #home ul.posts li { font-size: 12px; }
  #home ul.posts li span.featured, #home ul.posts li .extra { display:none; }

  .toc { float:none; width:100%; }
  .action, .book-social { float: none; width: 85%; }

  .plusbutton { display: none; }
  .comments { margin-right: 20px; }
}

@media only screen and (max-device-width: 768px) {
  header, #main, #copyright {
    padding: 1em 1em;
  }
}

/* =============================================================================
   Print styles.
   Inlined to avoid required HTTP connection: www.phpied.com/delay-loading-your-print-css/
   ========================================================================== */

@media print {
  * { background: transparent !important; color: black !important; text-shadow: none !important; filter:none !important; -ms-filter: none !important; } /* Black prints faster: sanbeiji.com/archives/953 */
  a, a:visited { color: #444 !important; text-decoration: underline; }
  a[href]:after { content: " (" attr(href) ")"; }
  abbr[title]:after { content: " (" attr(title) ")"; }
  .ir a:after, a[href^="javascript:"]:after, a[href^="#"]:after { content: ""; }  /* Don't show links for images, or javascript/internal links */
  pre, blockquote { border: 1px solid #999; page-break-inside: avoid; }
  thead { display: table-header-group; } /* css-discuss.incutio.com/wiki/Printing_Tables */
  tr, img { page-break-inside: avoid; }
  img { max-width: 100% !important; }
  @page { margin: 0.5cm; }
  p, h2, h3 { orphans: 3; widows: 3; }
  h2, h3{ page-break-after: avoid; }
  .social {display:none;}
  #meta {display:none;}
  #comments {display:none;}
}
