/* Overall. */

html,
body {
  font-family: sans-serif;
  margin: 0;
  padding: 0;
}

body {
  overflow-y: scroll;
  margin: 40px;
}

img {
  animation: fade 0.5s ease-in-out;
}

@keyframes fade {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

.hidden {
  display: none;
}

.discreet-link {
  text-decoration: none;
  color: black;
}

img {
  border-radius: 2%;
}

/* Header. */

header h1 {
  font-family: serif;
  margin-bottom: 0;
  font-size: 24px;
  margin-top: 0px;
}

.top {
  font-size: 12px;
  display: flex;
  opacity: 1;
}

.top img {
  animation: none;
}

.top ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

.top .intermediate {
  font-style: italic;
}

.email {
  color: gray;
  font-family: "Courier New", Courier, monospace;
}

@media (max-width: 540px) {
  header h1 {
    font-size: 32px;
  }
  .top .role-detail {
    display: block;
    padding-left: 1em;
  }
  .comma {
    display: none;
  }
  .one {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
  }
  .top {
    flex-direction: column;
    font-size: 16px;
    margin-top: 40px;
    margin-bottom: 30px;
  }
  .top li {
    margin-top: 15px;
  }
  .role-detail {
    margin-top: 4px;
  }
  .top img {
    width: 60px;
    margin-bottom: 15px;
  }
  .two .name-detail {
    display: none;
  }
}

@media (min-width: 541px) {
  .role {
    padding-right: 0.4em;
  }
  header h1 {
    font-size: 36px;
  }
  .top {
    font-size: 16px;
    margin-top: 60px;
    margin-bottom: 40px;
  }
  .top li {
    margin-top: 10px;
  }
  .top img {
    width: 100px;
    margin-right: 40px;
  }
  .one .name-detail {
    display: none;
  }
}

@media (max-width: 320px) {
  .top .role-detail.long {
    display: none;
  }
}

@media (min-width: 321px) {
  .top .role-detail.brief {
    display: none;
  }
}

/* Home page. */

.columns {
  -webkit-column-count: 1;
  -webkit-column-gap: 40px;
  -webkit-column-fill: balance;
  -moz-column-count: 1;
  -moz-column-gap: 40px;
  -moz-column-fill: balance;
  column-count: 1;
  column-gap: 40px;
  column-fill: balance;
}

.pin {
  display: inline-block;
  -webkit-column-break-inside: avoid;
  -moz-column-break-inside: avoid;
  column-break-inside: avoid;
  margin: 0 2px 40px;
}

.pin img {
  width: 100%;
  max-width: 350px;
}

.pin img:hover {
  opacity: 0.8;
}

@media (min-width: 540px) {
  .columns {
    -webkit-column-count: 2;
    -moz-column-count: 2;
    column-count: 2;
  }
}

@media (min-width: 860px) {
  .columns {
    -webkit-column-count: 3;
    -moz-column-count: 3;
    column-count: 3;
  }
}

@media (min-width: 1200px) {
  body {
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
  }
}

.other-projects {
  font-weight: bold;
}

/* Project page. */

.detail .top {
  opacity: 0.5;
}

.detail .roles {
  display: none;
}

@media (max-width: 540px) {
  .detail .email {
    display: none;
  }
  .detail .top .two {
    display: none;
  }
}

/* Essay page. */

.essay .top {
  display: none;
}

.essay h2 {
  margin-block-end: 0.2em;
}

.essay p,
.essay ul {
  margin-block-start: 0.5em;
  margin-block-end: 0.5em;
}

.essay main {
  max-width: 700px;
  font-family: sans-serif;
}

.essay pre {
  padding: 10px;
  background-color: #eee;
}

.essay pre .c {
  color: #777;
}

.essay table {
  padding: 10px;
  background-color: #eee;
}

/* Project pages */

.project main {
  display: flex;
  flex-direction: column;
}

.project .desc {
  padding-bottom: 40px;
}

.project main img {
  max-width: 100%;
  display: block;
  margin-bottom: 40px;
}

@media (min-width: 860px) {
  .project main {
    display: flex;
    flex-direction: row;
  }
  .project img {
    max-width: 500px;
    max-height: 400px;
  }
  .project .desc {
    width: 300px;
    flex-shrink: 0;
    padding-right: 40px;
    padding-bottom: 0;
  }
}

.project a.project-link {
  color: gray;
  font-family: "Courier New", Courier, monospace;
}

/* consultation page. */

.consultation .top {
  opacity: 0.5;
}

@media (max-width: 540px) {
  .consultation .top .two {
    display: none;
  }
}

.custom-table th,
.custom-table td {
  padding: 5px;
}
