/* Base styling */

html {
  font: 1rem/1.4 "Wremena", serif;
  font-feature-settings: "lnum" 1;
  height: 100%;
}

h1, h2, h3, p, ul {
  margin: 1rem 0;
  font-weight: normal;
}

h2 {
  font-size: 1.5rem;
}

h3 {
  font-size: 1.25rem;
}

img {
  font-size: 0.75rem;
  max-width: 100%;
  height: auto;
}

a, .link-style {
  color: #00f;
  text-decoration: underline;
  cursor: pointer;
}

/* Screen reader text */

.srt {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}

/* Image Containers */

.imgbox {
  position: relative;
}

.imgbox-inner {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

.imgbox img {
  max-width: 100%;
  max-height: 100%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Toggle functionality
 *
 * Note: we have the toggle content hidden by :not(:checked) instead of
 * shown by :checked to account for browsers that don't support :checked
 * without relying on a Javascript polyfill (which would fail if the
 * browser also has Javascript turned off).
 */

.toggle-mech {
  display: none;
}
.toggle-label {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}
.toggle-labeloff {
  display: none;
}

.toggle-mech:not(:checked) + .toggle-container .toggle-labeloff {
  display: inline;
}
.toggle-mech:not(:checked) + .toggle-container .toggle-labelon,
.toggle-mech:not(:checked) + .toggle-container .toggle-contents {
  display: none;
}

/* Page layout */

.page {
  box-sizing: border-box;
  max-width: 80rem;
  min-height: 100%;
  margin: auto;
  padding: 0 0 2rem;
  border-bottom: 1rem solid #ccc;
}

.page-menu {
  margin: 0 0.5rem;
  padding: 1rem 0;
  border-bottom: 1px solid #999;
}
.page-nav {
  margin-bottom: 1rem;
}

.page-about {
  margin: 0 0 0.25rem;
}
.page-about::after {
  content: "";
  display: block;
  clear: both;
}
.page-pfp {
  display: block;
  float: left;
  width: 96px;
  height: 96px;
  margin-top: 0.375rem;
  margin-right: 1rem;
}
.page-about p {
  text-indent: -0.375em;
  max-width: 24em;
  margin: 0;
}
@media (min-width: 35em) {
  .page-about p {
    margin-left: 116px;
  }
}
@media (min-width: 56em) {
  .page-menu {
    /* new stacking context */
    position: relative;
    z-index: 0;
  }
  .page-about {
    margin: 0;
    position: absolute;
    left: 20rem;
  }
}

.page-nav ul,
.page-nav ol {
  margin: 0;
  padding-left: 1rem;
}
.page-nav-site {
  list-style-type: disc;
}
.page-nav-social {
  list-style-type: circle;
}
.page-nav-email {
  list-style-type: square;
}

.page-gallery {
  margin: 0;
  padding: 1.25rem;
  text-align: center;
  line-height: 1;
}
.page-galleryitem {
  box-sizing: border-box;
  display: inline-block;
  width: 7.5rem;
  margin: 0.625rem 0.5rem;
}
.page-galleryitem-small {
  padding: 0.25rem;
}
@media (min-width: 40em) {
  .page-galleryitem {
    width: 10rem;
    margin: 1rem 0.75rem;
  }
  .page-galleryitem-small {
    padding: 0.5rem;
  }
}
@media (min-width: 60em) {
  .page-gallery {
    padding: 1.5rem;
  }
  .page-galleryitem {
    width: 15rem;
    margin: 2rem 1.5rem;
  }
  .page-galleryitem-small {
    padding: 1.2rem;
  }
}

.page-galleryitem a img {
  border: 1px solid #ccc;
}
.page-galleryitem a:hover img {
  border: 1px solid #00f;
}

.page-title {
  margin: 0.5rem 0.5rem 1rem;
  font-size: 1.25rem;
}

.page-article {
  margin: 2rem 0.5rem;
}
@media (min-width: 30em) {
  .page-article {
    margin: 2rem 3rem;
  }
}

.page-article h2 {
  font-weight: bold;
  font-size: 1rem;
  margin: 2rem 0 1rem;
  text-transform: uppercase;
}

.page-article p {
  max-width: 30em;
}

/* Single layout */

.single {
  height: 100%;
  max-height: 67rem;
  margin: auto;
  overflow: visible;
  /* create new stacking context with position and z-index */
  position: relative;
  z-index: 0;
}

.single-main {
  position: absolute;
  box-sizing: border-box;
  top: 0;
  left: 0;
  right: 0;
  bottom: 8rem;
  padding: 2rem 0;
}
.single-main-small {
  padding: 4rem 2rem;
}
.single-maininner {
  height: 100%;
  margin: auto;
}
@media (min-width: 30em) {
  .single-main {
    padding: 1rem;
  }
  .single-main-small {
    padding: 3rem;
  }
}

.single-header {
  position: absolute;
  box-sizing: border-box;
  left: 0;
  right: 0;
  bottom: 0;
  height: 7rem;
  padding: 0 0.25rem 0.5rem;
  margin: 0 0.5rem;
  border-top: 1px solid #999;
}
@media (min-width: 36em) {
  .single-header {
    height: 6rem;
  }
}

@media (min-width: 60em) {
  .single {
    max-width: 96rem;
    max-height: 50rem;
  }

  .single-main {
    right: 15rem;
    bottom: 0;
  }

  .single-header {
    top: 0;
    left: auto;
    height: auto;
    width: 15rem;
    margin: 0;
    padding: 0;
    border-top: none;
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }
}

.single-nav {
  padding: 0.375rem 0 0;
  margin-bottom: 1rem;
}
.single-nav::after {
  content: "";
  display: table;
  clear: both;
}
.single-description {
  padding: 0 0 1rem;
  max-width: 24em;
}
@media (min-width: 60em) {
  .single-nav {
    margin: 1rem 2rem 2rem 3rem;
    padding: 0.5rem 1rem 1rem;
    border-bottom: 1px solid #999;
    border-left: 1px solid #999;
  }
  .single-description {
    position: absolute;
    bottom: 0;
    margin: 2rem 2rem 1rem 3rem;
  }
}

.single-dirlink {
  margin: 0;
  float: left;
}
.single-dirlink a::after {
  content: "↑";
}
.single-pagination {
  float: right;
}
.single-prevlink,
.single-nextlink {
  display: inline;
  margin: 0;
}
.single-nextlink a::before {
  content: "→";
}
.single-prevlink a::before {
  content: "←";
}
.single-prevlink + .single-nextlink::before {
  content: "·";
  color: #00f;
  padding: 0 0.625em;
}
@media (min-width:60em) {
  .single-dirlink a::before {
    content: "↑";
  }
  .single-dirlink a::after {
    content: none;
  }

  .single-dirlink,
  .single-pagination {
    float: none;
  }
  .single-dirlink {
    margin-bottom: 1rem;
  }
}

.single-title,
.single-caption {
  display: inline;
  margin: 0;
}
.single-title {
  font-weight: bold;
}
.single-title + .single-caption::before {
  content: "·";
  margin: 0 0.5em 0 0.25em;
}

