/* first define portrait mode, then make changes for landscape */

/* import fonts */
/*
@import url(http://fonts.googleapis.com/css?family=Crimson+Text:400,600);
@import url(http://fonts.googleapis.com/css?family=Rosario);
*/

@font-face {
  font-family: Rosario;
  font-style: normal;
  src: url(../fonts/Rosario-Regular.ttf);
}

@font-face {
  font-family: Rosario;
  font-style: italic; 
  src: url(../fonts/Rosario-Italic.ttf);
}

@font-face {
  font-family: "Crimson Text";
  font-style: normal;
  font-weight: normal;
  src: url(../fonts/CrimsonText-Roman.ttf);
}

@font-face {
  font-family: "Crimson Text";
  font-style: italic;
  font-weight: normal;
  src: url(../fonts/CrimsonText-Italic.ttf);
}

@font-face {
  font-family: "Crimson Text";
  font-style: normal;
  font-weight: bold;
  src: url(../fonts/CrimsonText-Bold.ttf);
}

@font-face {
  font-family: "Crimson Text";
  font-style: italic;
  font-weight: bold;
  src: url(../fonts/CrimsonText-BoldItalic.ttf);
}

@font-face {
  font-family: garden;
  src: url(G24-Egyptian-Bold.ttf);
}

@-o-navigation {
  nav-up: -o-link-rel(index);
  nav-right: -o-link-rel(next);
  nav-left: -o-link-rel(previous);
}

/* set initial style */

html, body, div, h1, h2, h3, p, blockquote, ul, ol, li, pre { margin: 0; padding: 0; widows: 0; orphans: 0 }
blockquote { font-style: italic; margin: 1em }

html {
  font: 16px Crimson Text;
}

li { margin-left: 2em }

h1, h2, h3 {
  font-weight: normal;
  color: #0c5689;
}

/* settings for masthead */

#mast {
  position: relative;
  height: 100px;
  width: 100%;
}

#mast h1 {
  font: 50px garden;
  color: #047;
  position: absolute;
  top: 10px; left: 10px;
}


#mast h1 span {
  color: #bcd;
}

#mast .date {
  position: absolute;
  right: 10px;
  top: 33px;
}

/* settings for menu */

#menu {
  position: absolute;
  top: 70px;
  left: 0px;
  right: 0px;
  padding-left: 10px;
  box-sizing: border-box;
  background: #bcd;
}

#menu ul, #menu li {
  list-style-type: none;
  margin: 0;
  padding: 0 0.4em 0 0;
  display: inline;
}

#menu li { color: red }
#menu li:nth-child(5n) { color: green }
#menu li:nth-of-type(5n+1) { color: blue }
#menu li:nth-of-type(5n+2) { color: magenta }
#menu li:nth-of-type(5n+3) { color: brown }

/* describe the index page */


#entries {
  position: absolute;
  top: 110px;
  left: 10px;
  bottom: 0px;
  right: 10px;
  overflow: -o-paged-x;
  columns: 20em;
  column-fill: auto;
}


.entry {
  break-inside: avoid;
  padding: 1em 0;
  min-height: 100px;
}

.entry h1 {
  border: thin solid black;
}

.entry p.lead {
   font-size: 16px;
}

.entry img {
  padding: 0.5em 0 0.5em 0.3em;
  float: right;
}

.entry a {
  color: #0c5689; text-decoration: none;
}



/* describe landscape mode */

@media (orientation: landscape) {

#content {
  columns: 4;
}

.head, .fig { 
  float: -o-top;
  column-span: -o-integer(2);
}

.fig {
  float: -o-top-corner;
  column-span: -o-integer(2);
}

}

/* on narrow screens, remove some content and lay things out differently */

@media (max-width: 500px) {
  #menu { position: static }
  #mast h1 { font-size: 40px }
  #mast .date { top: 50px }
  #entries { overflow: visible; position: static; padding: 1em; }
  .entry img { float: none; display: block; padding: 0; width: 100% }
  .entry { break-inside: auto; width: 45%; float: left; padding: 0.5em }
  .entry .lead { display: none }
  .entry:nth-child(2n+1) { clear: both }
  .entry h2 { line-height: 1 }
}
