html, body {
  height: 100%;
  margin: 0;
  font-family: serif;
  background-image: url("/bg.gif");
  max-width: 800px;
}

.center {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

div.page {
  position: relative;
  min-height: 100%;
  margin-left: 10px;
  margin-right: 10px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

div.header {
  margin-top: 10px;
  flex-shrink: 0;
}

div.main {
  flex-grow: 1;
  flex-shrink: 0;
}

div.m {
  margin: 12px 0px;
}

footer {
  font-size: small;
  margin-bottom: 10px;
  flex-shrink: 0;
}

nav.home {
  position: absolute;
  top: 0;
  right: 0;
  margin-top: 10px;
}

img.photo {
  max-width: 30%;
  max-height: 180px;
  margin-right: 10px;
  float: left;
  box-shadow: 3px 3px 5px #888888;
}

img.icon {
  width: 1em;
}

a { text-decoration:none; }
a:hover { text-decoration:underline; }
a.ref:target {
  background-color: rgba(255,255,204,0.6);
}

p.fn {
  font-size: small;
}
/* highlight text spans whose id matches the page fragment id in url */
p.fn:target {
  /*background-color: #ffffcc;*/
  background-color: rgba(255,255,204,0.6);
  /*background-color: #bfefff;*/
  /*background-color: rgba(191,239,255,0.6);*/
}

hr {
  clear: left;
  color: gray;
  border-top: thin solid;
  border: 1px inset #eeeeee;
}

h1 {
  margin: 0;
}
h2,h3 {
  margin: 10px 0px;
}

table {
  border-spacing: 0;
  border-collapse: collapse;
}
td {
  vertical-align: top;
}
td.date {
  padding-right: 1em;
  white-space: nowrap;
}
td.job {
  padding-bottom: 1em;
}

ul {
  margin: 0;
  padding-left: 1.5em;
}

table.gallery {
}

table.gallery, tr, td {
  padding: 20px 10px 20px 10px;
  text-align: center;
  vertical-align: middle;
}

img.gallery {
  max-height: 240px;
  max-width: 240px;
}

#zoom_overlay {
  position: fixed;
  display: none;  /* hide by default */
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 2; /* in front of everything */
}

#zoom_overlay_img {
  position: absolute;
  max-width: 90%;
  max-height: 90%;
  top: 50%;
  left: 50%;
  transform: translate(-50%,-50%);
  touch-action: none;  /* don't scroll while swiping overlay */
}

#next {
  position: absolute;
  top: 50%;
  left: 99%;
  transform: translate(-1em);
}
#prev {
  position: absolute;
  top: 50%;
  left: 1%;
  transform: translate(-1em);
}

@media (max-width: 600px) {
  img.photo {
    float: right;
  }
  nav.home {
    position: relative;
    margin-left: auto;
  }
  img.gallery {
    max-width: 100%;
  }
  table.gallery, tr, td {
    padding: 10px;
  }
}
