/* CSS reset */
html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{border:0;font-size:100%;font:inherit;vertical-align:baseline;margin:0;padding:0}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:none}table{border-collapse:collapse;border-spacing:0 }

@font-face {
  font-family: 'Caslon-Doric';
    src: url('../fonts/Caslon-Doric-Expanded-Light.woff') format('woff');
  font-style:   normal;
  font-weight:  400;
}


* {
	box-sixing: border-box;
	-webkit-box-sizing: border-box;
	-moz-box-sizing: border-box;
}

html {
	font-size: 62.5%;
}

body {
	font-family:'Helvetica';
	font-size: 1.6rem;
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
	padding: 0;
	margin: 0;
  border: 2px solid white;
}

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

a:hover {
  color: #F63;
}

main {
  text-align: center;
  /*border: 1px solid red;;*/
  margin: 60px 0px;
}

nav {
  /*border: 1px solid red;;*/
  text-align: center;
  padding: 23px 0 0 0;
  position: fixed;
  top: 0px;
  left: 0px;
  z-index: 9999;
  margin: 0 auto;
  width: 100%;
  background-color: #FFF;
}

header {
  position: fixed;
  top: 20px;
  left: 30px;
  width: 20px;
  /*border: 1px solid blue;*/
  z-index: 99999;
}

h1 {
  font-family: 'Caslon-Doric';
  font-weight: normal;
  font-size: 2.5rem;
  /*padding-bottom: 30px;*/
}

.desktop {
  margin-right: 40px;
}

/* ---- .grid-item ---- */

.grid-sizer,
.grid-item {
  width: 33.333%;
}

.grid-item {
  float: left;
}

.grid-item img, .grid-item video {
  display: block;
  max-width: 100%;
  border: 2px solid white;
}

/* ---- button ---- */

.button {
  display: inline-block;
  padding: 0px 4px;
  margin-bottom: 10px;
  background: #FFF;
  border: none;
  /*border-radius: 7px;*/
  /*background-image: linear-gradient( to bottom, hsla(0, 0%, 0%, 0), hsla(0, 0%, 0%, 0.2) );*/
  color: #444;
  font-family: sans-serif;
  font-size: 1.4rem;
  /*text-shadow: 0 1px white;*/
  cursor: pointer;
}

.button:hover {
  /*background-color: #222;*/
  /*text-shadow: 0 1px hsla(0, 0%, 100%, 0.5);*/
  color: #F63;
}

.button:active,
.button.is-checked {
  /*background-color: #222;*/
}

.button.is-checked {
  color: #0C4;
  /*text-shadow: 0 -1px hsla(0, 0%, 0%, 0.8);*/
}

.button:active {
  /*box-shadow: inset 0 1px 10px hsla(0, 0%, 0%, 0.8);*/
}

/* ---- button-group ---- */

.button-group:after {
  content: '';
  display: block;
  clear: both;
}

.button-group .button {
  /*float: left;*/
  border-radius: 0;
  margin-left: 0;
  margin-right: 0px;
}

button:focus {outline:0;}

/*.button-group .button:first-child { border-radius: 0.5em 0 0 0.5em; }
.button-group .button:last-child { border-radius: 0 0.5em 0.5em 0; }*/

/* ---- isotope ---- */

.grid {
  /*border: 1px solid #EEE;*/
}

/* clear fix */
.grid:after {
  content: '';
  display: block;
  clear: both;
}



/* ---- RESPONSIVE CSS ---- */



@media(max-width: 1200px) {
  .grid-sizer,
  .grid-item {
    width: 50%;
  }

  nav {
    text-align: right;
    padding: 17px 30px 0 0;
  }

  .desktop {
    margin-right: 0px;
  }

  h1 {
    font-size: 2rem;
  }

  main {
    margin: 48px 0px;
  }

  header {
    top: 16px;
    left: 20px;
  }

}

@media(max-width: 600px) {
  .grid-sizer,
  .grid-item {
    width: 100%;
	}

  .mobile {
    display: none;
  }

  header {
    margin: 0 auto;
    width: 100%;
    top: 17px;
    left: 0px;
  }

  nav {
    padding: 42px 0 0 0;
    text-align: center;
    height: 70px;
  }

}




/* ---- .element-item ---- */

.element-item {
  position: relative;
  float: left;
  width: 100px;
  height: 100px;
  margin: 5px;
  /*padding: 10px;*/
  /*background: #888;*/
  color: #262524;
}

.element-item > * {
  margin: 0;
  padding: 0;
}

.element-item .name {
  position: absolute;

  left: 10px;
  top: 60px;
  text-transform: none;
  letter-spacing: 0;
  font-size: 12px;
  font-weight: normal;
}

.element-item .symbol {
  position: absolute;
  left: 10px;
  top: 0px;
  font-size: 42px;
  font-weight: bold;
  color: white;
}

.element-item .number {
  position: absolute;
  right: 8px;
  top: 5px;
}

.element-item .weight {
  position: absolute;
  left: 10px;
  top: 76px;
  font-size: 12px;
}

.element-item.alkali          { background: #F00; background: hsl(   0, 100%, 50%); }
.element-item.alkaline-earth  { background: #F80; background: hsl(  36, 100%, 50%); }
.element-item.lanthanoid      { background: #FF0; background: hsl(  72, 100%, 50%); }
.element-item.actinoid        { background: #0F0; background: hsl( 108, 100%, 50%); }
/*.element-item.transition      { background: #0F8; background: hsl( 144, 100%, 50%); }*/
.element-item.post-transition { background: #0FF; background: hsl( 180, 100%, 50%); }
.element-item.metalloid       { background: #08F; background: hsl( 216, 100%, 50%); }
.element-item.diatomic        { background: #00F; background: hsl( 252, 100%, 50%); }
.element-item.halogen         { background: #F0F; background: hsl( 288, 100%, 50%); }
.element-item.noble-gas       { background: #F08; background: hsl( 324, 100%, 50%); }
