@font-face {
  font-family: 'Gentium Book Basic';
  src: url(gbb-r.ttf);
}
@font-face {
  font-family: 'Gentium Book Basic';
  font-weight: bold;
  src: url(gbb-b.ttf);
}
@font-face {
  font-family: 'Gentium Book Basic';
  font-weight: bold;
  font-style: italic;
  src: url(gbb-bi.ttf);
}
@font-face {
  font-family: 'Gentium Book Basic';
  font-style: italic;
  src: url(gbb-i.ttf);
}
@font-face {
    font-family: 'Sketched Alphabet';
    src: url(SketchedAlphabet.ttf);
}
body {
  font-size: 12pt;
  font-family: 'Gentium Book Basic', serif;
  text-align: center;
  margin: 5vw 5px 5px 5px;
  padding: 0;
}
h1 {
  font-size: 4.7vw;
  line-height: 1.2em;
  color: green;
  padding: calc(0.5 * 25vw - 1.2em) 0 calc(0.5 * 25vw - 1.2em + 1vw) 23vw;
  vertical-align: middle;
  background: url(cat-big.jpg) 0% 50% no-repeat;
  background-size: 25vw;
  height: 2.4em;
  margin: auto;
}
div.chasm {
    height: 5vw;
}
a {
  text-decoration: none;
  color: green;
  font-weight: bold;
}
a:hover {
  text-decoration: none;
}
div.content {
    padding: 0px;
}
div.content ul {
    list-style-type: none;
}
div.content li {
    padding-bottom: 10px;
}
#contact div.name {
  font-weight: bold;
}
#contact .addresses {
    clear: left;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    -webkit-flex-wrap: wrap;
    -webkit-justify-content: space-around;
    -moz-flex-wrap: wrap;
    -moz-justify-content: space-around;
    -ms-flex-wrap: wrap;
    -ms-justify-content: space-around;
    margin: 0;
    padding: 0;
}
#contact div.content .addresses li {
  display: block;
  white-space: pre-line;
  font-size: 12pt;
  line-height: 1.1em;

  text-align: left;
/*  float: left;*/
  width: 180px;
  margin: 10px;
}
#contact div.content .addresses .home {
    width: 170px;
}
#contact div.content .addresses .work {
    width: 190px;
}
#contact div.content .addresses .office {
    width: 180px;
}

#contact div.content .addresses .title {
	font-style: italic;
	font-size: 13pt;
	font-weight: bold;
	line-height: 1.3em;
}
	
#contact div.phone ul {
	list-style: none;
	margin-left: 0;
	padding-left: 0;
}
#contact div.phone ul li {
    padding-bottom: 0;
}
#contact div.phone ul .comment {
	font-style: italic;
}

.prime-factorization {
    display: none;
}
.prime-factorization + .comment {
    display: none;
}

.nav {
	width: 100%;
	max-width: 790px;
	padding: 0;
	margin: 0 auto;
}
/* Line plus space between subsequent nav sections: */
.nav+.nav {
    margin-top: 10px;
    border-top: 2px solid rgb(50%, 50%, 50%);
    padding-top: 10px;
}
.nav>li {
	display: inline-block;
	margin: 0;
	padding: 0;
	margin: 8px;
	margin: 1vw;
	border: 1px solid rgb(50%,50%,50%);
	border-radius: 1vw;
	box-shadow: rgba(0, 0, 0, 0.75) 0.4vw 0.4vw 1.2vw;
    width: 20vw;
    width: calc(23vw - 13px);
    height: 21vw;
    overflow: hidden;
}
.nav>li>a {
	display: block;
    float: left;
	padding: 16vw 0 2vw 0;
    font-family: 'Sketched Alphabet', serif;
	font-size: 3vw;
	font-weight: bold;
	line-height: 100%;
    background-color: white;
	background-position: 50% 2%;
	background-repeat: no-repeat;
	background-size: 70%;
	width: 20vw;
	width: calc(23vw - 13px);
    height: 3vw;
	min-width: 100px;
    min-height: 14px;
    border: 1px solid rgb(50%,50%,50%);
    border-top: none;
    border-left: none;
	border-bottom-right-radius: 1vw;
}
.nav>li>h2 {
  margin: 0 0 10px 0;
  padding: 3px;
  font-size: 14pt;
  font-weight: bold;
  line-height: 100%;
  height: 14pt;
  overflow: hidden;
  background-color: white;
  border-bottom: thin solid green;
  background-color: rgb(80%, 80%, 80%);
}
/*.nav>li.contact { width: calc(92vw - 4*13px + 9vw); }*/

.nav>li:hover {
	box-shadow: rgba(0, 0, 0, 0.85) 0.6vw 0.6vw 2.4vw;
}
/* Excellent hand-drawn icons by Aleksandra Wolska (see http://imaginary.ca/olawolska-icons/about.txt) */
.nav>li#contact>a { background-image: url(olawolska-icons/256x256/home.png); }
.nav>li#blog>a { background-image: url(olawolska-icons/256x256/comment.png); }
.nav>li#photos>a { background-image: url(olawolska-icons/256x256/photo-camera.png); }
.nav>li#teaching>a { background-image: url(olawolska-icons/256x256/statistic.png); }
.nav>li#research>a { background-image: url(olawolska-icons/256x256/notepad.png); }
.nav>li#software>a { background-image: url(olawolska-icons/256x256/disc-floopy.png); }
.nav>li#cv>a { background-image: url(olawolska-icons/256x256/clasp.png); }
.nav>li#webmail>a { background-image: url(olawolska-icons/256x256/mail.png); }

.nav>li#zabbix>a { background-image: url(olawolska-icons/256x256/datebase.png); }
.nav>li#piwik>a { background-image: url(olawolska-icons/256x256/earth.png); }
.nav>li#bandwidth>a { background-image: url(olawolska-icons/256x256/wifi-on.png); }
.nav>li#R>a { background-image: url(rstudio-gray.png); }
.nav>li#links>a { background-image: url(olawolska-icons/256x256/rss.png); }

.nav>li.expanded { width: calc(98vw - 34px); height: auto; }

@media screen and (max-width: 400px) {
h1 {
    background-size: 100px;
    padding: calc(50px - 1.2em) 0 calc(54px - 1.2em) 92px;
}
}

@media screen and (max-width: 466px) {
/** We hit minimum size here, and don't want things to keep shrinking */
.nav>li {
    margin: 5px;
    border-radius: 4.66px;
    box-shadow: rgba(0,0,0,0.75) 1.864px 1.864px 5.592px;
    width: 93px;
    height: 97px;
}
.nav>li>a {
    padding: 74px 0 9px 0;
	font-size: 14px;
    width: 93px;
    height: 14px;
}
}
@media screen and (min-width: 800px) {
/* Stop expanding once we hit 800px width */
body {
    margin-top: 40px;
}
div.chasm {
    height: 40px;
}
h1 {
    font-size: 38px;
    padding: calc(100px - 1.2em) 0 calc(108px - 1.2em) 184px;
    background-size: 200px;
    width: 590px;
}
.nav>li {
	margin: 8px;
	box-shadow: rgba(0, 0, 0, 0.75) 3.2px 3.2px 9.6px;
	border-radius: 8px;
    width: 171px;
    height: 168px;
}
.nav>li:hover {
	box-shadow: rgba(0, 0, 0, 0.85) 4.8px 4.8px 19.2px;
}
.nav>li>a {
	font-size: 24px;
	width: 171px;
    height: 24px;
    padding: 128px 0 16px 0;
    border-bottom-right-radius: 8px;
}
.nav>li.expanded {
    width: 750px;
}
}
