$font-stack: Helvetica, sans-serif;
$primary-color: #333;
$background-color: #222;
$window-chrome: #498584;
$footer-chrome: #2f6564;
$window-chrome-active: black;
$window-text: white;

@mixin window-chrome {
  border: 4px solid $window-chrome;
  border-top-width: 2.6rem;
  background-color: white;
  box-shadow: 0px 3px 0px rgba(0,0,0,0.3);
}

[x-cloak] {
  display: none !important;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  list-style: none;
}

body {
  font: 100% $font-stack;
  color: $primary-color;
  background-color: $background-color;
  position: relative;
  background-image: url(../images/wood.png);
}

footer {
  height: 50px;
  width: 100%;
  bottom: 0px;
  right: 0px;
  position: absolute;
  background-color: $footer-chrome;
  z-index: 10;
}

h1, #logo span {
  font-family: 'VT323', sans-serif;
  position: absolute;
  font-size: 2rem;
  line-height: 1.3em;
  font-weight: 400;
  top: -42px;
  color: $window-text;
  width: 100%;
  padding-left: 0px;
  cursor: pointer;
  -webkit-user-select: none; /* Safari */
  -ms-user-select: none; /* IE 10 and IE 11 */
  user-select: none; /* Standard syntax */
  text-shadow: 0px 3px rgba(0,0,0,0.5);
}
h1::before, #logo span::before {
  content: "";
  display: inline-block;
  position: relative;
  vertical-align: -6px;
  margin: 0 6px;
  background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALQAAAAeCAMAAACylMSIAAAACVBMVEX///8AAAD///9+749PAAAAAnRSTlMAf7YpoZUAAAC3SURBVHja7ZbRCoQwDATd/v9HHxQM4SYJxYNehcyDD013O4qI107G5Peelt4sPRz1toX4w35GsoaW/pe0pKI3PHWAbKqJH7X066QL70LLgn5KXQbXpXXT0rulQVbEW7IiZkeCBeuzsufV0sdKs46v76K0927pl0ozY1oe3TAl6evKDeufvJY+TZrrJJwGxhMY4wis2HpLnyYtyQ54/KvNcits6cOlBcINV06RIjYNd4Yrklp6u/QHWCYPKBXAoUwAAAAASUVORK5CYII=');
  width: 30px;
  height: 30px;
  background-size: 180px 30px; 
  background-position: 30px 0;
}

article {
  .content {
    padding: 18px 30px;
  }
  @include window-chrome();
  position: absolute;
  padding: 4px 0px;
  min-width: 500px;
  max-width: 880px;
  line-height: 1.3em;
  font-size: 1.2rem;
  top: 55px;
  right: 30px;
  width: calc( 100% - 390px );
  z-index: 30;
  transition: border 0.2s ease-in-out;
  &.ontop {
    z-index: 120;
  }
  &.expanded {
    border-color: $window-chrome-active;
    z-index: 120 !important;
  }
  pre {
    font-family: 'Noto Sans Mono', monospace;
    background-color: #233733;
    color: #85dcb5;
    font-size: 1rem;
    line-height: 1.1em;
  }
}

#article1 {
  right: 60px;
  .content {
    padding: 0px;
  }
  &.expanded {
    padding: 0px;
  }
  width: 595px;
  h1::before {
    background-position: 120px 0;
  }
  .content {
    overflow-y: scroll;
  }
}

#article2 {
  top: 132px;
  right: 147px;
  z-index: 29;
  width: calc( 100% - 460px );
  h1::before {
    background-position: 150px 0;
  }
}

#article3 {
  top: 173px;
  right: 77px;
  z-index: 28;
  width: calc( 100% - 600px );
  h1::before {
    background-position: 60px 0;
  }
}

#article4 {
  top: 243px;
  right: auto;
  left: 77px;
  z-index: 27;
  width: calc( 100% - 600px );
  h1::before {
    background-position: 90px 0;
  }
}

#logo {
  //width 680px 510px 425px 340px 289px
  //height 400px 300px 250px 200px 170px
  width: 800px;
  height: 600px;
  max-width: calc( 100vw - 60px );
  max-height: calc( 100vh - 60px );
  top: 35px;
  left: 140px;
  background-size: 680px 400px;
  &.sidebar {
    width: 300px;
    height: 230px;
    background-size: 285px 190px;
    background-position: 0px -9px;
    left: 30px;
    top: 30px;
    z-index: 10;
    border-color: $window-chrome;
  }
  span::before {
    background-position: 0px 0;
  }
  z-index: 50;
  @include window-chrome();
  border-color: black;
  transition: all 0.3s ease-in-out;
  position: absolute;
  background-position: calc( 50% - 30px ) 50%;
  background-repeat: no-repeat;
  margin: 0;
  display: block;
  background-image: url('data:image/png;base64,[encoded data, 8224 characters]');
}