$dark-highlight-color: #8181F7
$border-color: #595959
$text-color: #AAA
$highlight-background: #456

@mixin caption
  font-size: 12px
  text-transform: uppercase
  line-height: 1.2em
  code, pre
    font-size: 12px
    text-transform: none
  a, a:link, a:visited,
    color: #99A
  img
    padding-top: 10px
    display: block

@mixin caption-highlight
  background-color: $highlight-background
  color: $text-color
  pre, code 
    border: 1px solid #668
    background-color: #345
    color: #888



/* document fonts
body
  background-color: #4A5059
  font-family: 'Helvetica Neue', Helvetica, sans-serif
  font-size: 14px
  line-height: 1.5em
  letter-spacing: 0.05em
  color: $text-color
blockquote 
  border-left: 5px solid #888
  margin-left: 0
  padding-left: 2em
  color: #888 
a, a:link, a:visited
  text-decoration: none
  color: #99B
h1, h2, h3, h3, h4, h5, h6, h7
  font-size: 14px
  text-transform: uppercase
  color: #888
  margin: 0
  padding-top: 4em
  padding-bottom: 0em
  font-weight: normal
  letter-spacing: 0.3em
  line-height: 1.2em
h1
  font-size: 30px
  padding-top: 120px
  padding-bottom: 10px
h2
  font-size: 16px
code 
  padding: 1px 4px 
pre 
  padding: 5px 20px 
code, pre 
  overflow: auto
  background-color: #444
  border: 1px solid #555
  border-radius: 5px
  color: #AAA
  font-size: 12px 
  line-height: 1.5em 


/* LAYOUT
#table-of-contents, 
#main-text,
#figure-list
  position: absolute
  height: 100%
  overflow: auto
#table-of-contents
  width: 250px
  border-right: 1px solid $border-color
  padding-top: 180px
  display: none
#main-text
  width: 450px
  padding-left: 50px
  padding-right: 100px
#figure-list
  border-left: 1px solid $border-color
  display: none


/* font override

#table-of-contents
  font-size: 12px
  font-weight: normal
  line-height: 1.5em
  .toc 
    h1, h2
      text-transform: uppercase
      padding-top: 4px
    h3, h4, h5, h6, h7
      font-style: italic
    a
      text-decoration: none
      display: block
      &:link, &:visited
        color: $text-color
      &.active
        background-color: $highlight-background

#main-text
  a.figlink.active 
    padding: 4px 0px
    background-color: $highlight-background
    &:link, &:visited
      color: #99C
      text-decoration: underline
  .timestamp 
    margin-top: 6em
    text-align: right
    border-top: 1px solid #CCC
  .fig-in-text
    @include caption
    @include caption-highlight
    padding: 10px 10px
    img
      width: 100%

#figure-list 
  .fig-in-figlist
    @include caption
    &.active
      @include caption-highlight
    padding: 20px 10px


@media (max-width: 1200px)
  #main-text
    padding-left: 15px
    padding-right: 15px
  h1
    font-size: 25px


@media (max-width: 480px)
  h1
    font-size: 20px
    padding-top: 70px
  .fig-in-text
    display: block


