body {
  border: 0;
  display: flex;
  flex-direction: column;
  font-family: sans-serif;
  font-size: 14px;
  height: 100%;
  line-height: 24px;
  margin: 0;
  padding: 0;
}

p {
  margin-block: 0 16px;
}

h1 {
  margin-block-start: 0;
  font-size: 24px;
}

h2 {
  margin-block-start: 0;
  font-size: 18px;
}

hr {
  border: 0;
  border-top: 1px solid #ddd;
  margin-bottom: 16px;
}

a {
  font-size: 14px;
}

a:link    { color: #00f; }
a:visited { color: #005; }
a:hover   { color: #00f; }
a:active  { color: #00f; }

th {
  text-align: left;
  border-bottom: 1px solid #ccc;
}

td {
  vertical-align: top;
}

table {
  width: 100%;
}

table.site-keys td:nth-child(1) {
  width: 96px;
}

table.site-links td:nth-child(1) {
  padding-right: 16px;
}

.site-container {
  padding:   32px;
  max-width: 1056px;
  margin:    0 auto;
}

@media (max-width: 639px) {
  .site-container {
    padding:   0;
    margin:    0 auto;
  }
}

.site-date {
  font-family: monospace;
}

.site-mail-container {
  vertical-align: middle;
}

.site-mail {
  font-family: monospace;
  font-weight: bold;
  vertical-align: middle;
}

.site-mail-icon {
  display: inline;
  vertical-align: middle;
}

.site-keys {
  font-family: monospace;
  font-size: 13px;
  margin-bottom: 16px;
}

.site-keys a {
  font-size: 13px;
}

/*
 * Navigation menu.
 */

header nav {
  display: flex;
  flex-direction: row;
  justify-content: center;
  width: 100%;
  overflow: auto hidden;
  color: #000;
  background-color: #000;
  border: 1px solid #000;
}

@media (min-width: 640px) {
  ul.site-navigation-menu {
    display: flex;
    height: 32px;
    margin: 0;
    padding: 0;
  }

  ul.site-navigation-menu > li {
    list-style: none;
    width: 96px;
    height: 32px;
    vertical-align: top;
    text-align: center;
    text-transform: uppercase;
    font-weight: bold;
    color: #fff;
    border: 1px solid #fff;
  }

  ul.site-navigation-menu > li > a {
    display: block;
    line-height: 32px;
    width: 100%;
    font-family: monospace;
    font-size: 13px;
    color: #fff;
  }
}

@media (max-width: 639px) {
  ul.site-navigation-menu {
    display: grid;
    grid-template-rows: repeat(2, auto);
    grid-auto-flow: column;
    height: 64px;
    margin: 0;
    padding: 0;
  }

  ul.site-navigation-menu > li {
    list-style: none;
    width: 96px;
    height: 32px;
    vertical-align: top;
    text-align: center;
    text-transform: uppercase;
    font-weight: bold;
    color: #fff;
    border: 1px solid #fff;
  }

  ul.site-navigation-menu > li > a {
    display: block;
    line-height: 32px;
    width: 100%;
    font-family: monospace;
    font-size: 13px;
    color: #fff;
  }
}

ul.site-navigation-menu > li > a:hover {
  background-color: #fff;
  color: #000;
}

/*
 * External navigation menu.
 */

#contact nav {
  background-color: #fff;
  color: #000;
  display: flex;
  flex-direction: row;
  justify-content: center;
  overflow: auto hidden;
  width: 100%;
  margin-bottom: 16px;
}

@media (min-width: 640px) {
  ul.site-navigation-external-menu {
    display: flex;
    height: 32px;
    margin: 0;
    padding: 0;
  }

  ul.site-navigation-external-menu > li {
    list-style: none;
    width: 144px;
    height: 32px;
    vertical-align: top;
    text-align: center;
    text-transform: uppercase;
    font-weight: bold;
    color: #000;
    border: 1px solid #000;
  }

  ul.site-navigation-external-menu > li > a {
    display: block;
    line-height: 32px;
    width: 100%;
    font-family: monospace;
    font-size: 13px;
    color: #000;
  }
}

@media (max-width: 639px) {
  ul.site-navigation-external-menu {
    display: grid;
    grid-template-rows: repeat(2, auto);
    grid-auto-flow: column;
    height: 64px;
    margin: 0;
    padding: 0;
  }

  ul.site-navigation-external-menu > li {
    list-style: none;
    width: 144px;
    height: 32px;
    vertical-align: top;
    text-align: center;
    text-transform: uppercase;
    font-weight: bold;
    color: #000;
    border: 1px solid #000;
  }

  ul.site-navigation-external-menu > li > a {
    display: block;
    line-height: 32px;
    width: 100%;
    font-family: monospace;
    font-size: 13px;
    color: #000;
  }
}

ul.site-navigation-external-menu > li > a:hover {
  background-color: #000;
  color: #fff;
}

/*
 * Software group lists.
 */

@media (min-width: 640px) {
  ul.site-software-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-block: 0;
    margin-bottom: 32px;
    padding-inline-start: 0;
  }

  ul.site-software-group > li {
    list-style: none;
    break-inside: avoid;
    padding-left: 16px;
    border-left: 1px solid #ddd;
  }
}

@media (max-width: 639px) {
  ul.site-software-group {
    column-count: 1;
    margin-block: 0;
    margin-bottom: 32px;
    padding-inline-start: 0;
  }

  ul.site-software-group > li {
    list-style: none;
    break-inside: avoid;
    margin-bottom: 16px;
  }
}

/*
 * Interest lists.
 */

@media (min-width: 640px) {
  ul.site-interests {
    column-count: 2;
    column-gap: 16px;
    margin-block: 0;
    margin-bottom: 32px;
    padding-inline-start: 0;
  }

  ul.site-interests > li {
    list-style: none;
    break-inside: avoid;
    padding-left: 16px;
    border-left: 1px solid #ddd;
    display: inline-block;
    margin-bottom: 16px;
  }
}

@media (max-width: 639px) {
  ul.site-interests {
    column-count: 1;
    margin-block: 0;
    margin-bottom: 32px;
    padding-inline-start: 0;
  }

  ul.site-interests > li {
    list-style: none;
    break-inside: avoid;
    margin-bottom: 16px;
  }
}

/*
 * Art.
 */

@media (min-width: 640px) {
  ul.site-art {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-block: 0;
    margin-bottom: 16px;
    padding-inline-start: 0;
  }

  ul.site-art > li {
    list-style: none;
    break-inside: avoid;
    padding-left: 16px;
    border-left: 1px solid #ddd;
  }
}

@media (max-width: 639px) {
  ul.site-art {
    column-count: 1;
    margin-block: 0;
    margin-bottom: 16px;
    padding-inline-start: 0;
  }

  ul.site-art > li {
    list-style: none;
    break-inside: avoid;
    margin-bottom: 16px;
  }
}

/*
 * Documents.
 */

@media (min-width: 640px) {
  ul.site-documents {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-block: 0;
    margin-bottom: 16px;
    padding-inline-start: 0;
  }

  ul.site-documents > li {
    list-style: none;
    break-inside: avoid;
    padding-left: 16px;
    border-left: 1px solid #ddd;
  }
}

@media (max-width: 639px) {
  ul.site-documents {
    column-count: 1;
    margin-block: 0;
    margin-bottom: 16px;
    padding-inline-start: 0;
  }

  ul.site-documents > li {
    list-style: none;
    break-inside: avoid;
    margin-bottom: 16px;
  }
}

/*
 * Main elements.
 */

main {
  display: flex;
  flex-flow: column;
  flex-grow: 1;
  flex-shrink: 0;
  justify-content: flex-start;
  padding: 0;
  margin: 0;
  width: 100%;
  border-left: 1px solid #000;
  border-right: 1px solid #000;
}

section {
  margin: 0;
  background-color: #fff;
}

section.section-top-level {
  padding: 16px;
  overflow: auto;
  border-bottom: 1px solid #000;
}

footer {
  font-family: monospace;
  padding: 16px;
  border-left: 1px solid #000;
  border-right: 1px solid #000;
  border-bottom: 1px solid #000;
  background-color: #fff;
}

#contact {
  padding-top: 0;
}

#contact p.intro {
  margin-left: auto;
  margin-right: auto;
  width: 70%;
  text-align: center;
}
