* {
  box-sizing: border-box;
  padding: 0;
}


/* Attributes */

body {
  -ms-text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
  background-color: #fafafa;
  color: #222;
  font-family: -apple-system, helvetica, arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  margin: auto;
}

a {
  border-bottom: 1px solid #888;
  color: inherit;
  text-decoration: none;
  transition: 0.2s;
}

a:hover {
  color: #000;
  border-bottom: 1px solid #ddd;
}

blockquote,
ol,
p,
pre,
ul {
  margin: 1rem 0;
}

blockquote {
  border-left: 0.25rem solid #ddd;
  color: #888;
  padding: 0 1rem;
}

code {
  background-color: #f0f0f0;
  border-radius: 0.25rem;
  font-family: Menlo, Consolas, Courier, monospace;
  font-size: 85%;
  padding: 0.2rem 0.4rem;
}

footer {
  border-top: 1px solid #ddd;
}

h1,
h2,
h3 {
  font-weight: 600;
  line-height: 1.25;
  margin: 1.5rem 0 1rem;
}

h1 {
  font-size: 2rem;
}

h2 {
  font-size: 1.5rem;
}

h3 {
  font-size: 1.25rem;
}

header {
  border-bottom: 1px solid #ddd;
}

hr {
  border: none;
  height: 1px;
  background-color: #ddd;
}

img {
  display: block;
  margin: 1rem auto;
  max-width: 100%;
}

li ol,
li ul {
  margin: 0;
}

ol,
ul {
  padding-left: 2rem;
}

pre {
  background-color: #f8f8f8;
  line-height: 1.45;
  max-width: 100vw;
  overflow: auto;
  padding: 1rem;
}

pre code {
  background-color: transparent;
  padding: 0;
}

sup {
  line-height: 0;
}

table {
  border-bottom: 0.1rem solid #dfe2e5;
  border-top: 0.1rem solid #dfe2e5;
  border-collapse: collapse;
  font-size: 90%;
  margin: 1rem auto;
}

table td,
table th {
  padding: 0.25rem 0.5rem;
  vertical-align: top;
}

table th {
  border-bottom: 0.1rem solid #dfe2e5;
  font-weight: bold;
}


/* Containers */

.banner {
  margin-bottom: 2rem;
}

.content {
  margin: 0 auto;
  max-width: 100vw;
  width: calc(600px + 2rem);
}

.container {
  margin: 0 1rem;
}

.container::after {
  clear: both;
  content: "";
  display: table;
}

.container::before {
  content: "";
  display: table;
}

.main {
  background-color: white;
  min-height: calc(100vh - 3.5rem - 3.2rem - 0.2rem);
}


/* Header, footer and footnotes */

.header a {
  border: none;
  display: inline-block;
  margin: 1rem 0.5rem;
  margin-left: 0;
}

.header a:first-of-type {
  font-weight: 600;
  margin-right: 1rem;
}

.footer {
  color: #888;
  font-size: 80%;
  text-align: center;
}

.footnotes {
  border-top: 0.1rem solid #ddd;
  font-size: 80%;
}

.footnotes hr {
  display: none;
}

/* Home page */

#portrait {
  border-radius: 1rem;
  box-shadow: 0 0.25rem 0.25rem 0 #ddd;
  width: 240px;
}


/* Blog and research pages */

.abstract {
  background-color: #f8f8f8;
  border: 1px solid #ddd;
  font-size: 90%;
  margin: 0.5rem 0;
  padding: 0.5rem;
}

.page-index {
  list-style: none;
  padding: 0;
}

.page-index li {
  margin: 0.5rem 0;
}

.page-index-date {
  color: #888;
  font-size: 80%;
  text-transform: uppercase;
}

.rounded-link {
  border: 1px solid #ddd;
  border-radius: 0.25rem;
  display: inline-block;
  font-size: 80%;
  margin: 0.2rem 0.1rem;
  padding: 0.125rem 0.25rem;
  white-space: nowrap;
}

.rounded-link:hover {
  background-color: #f8f8f8;
  text-decoration: none;
}


/* Syntax highlighting */

.bp,
.kc,
.m {
  color: #7650c1;
}

.c1,
.o {
  opacity: 0.5;
}

.kn,
.kr {
  color: crimson;
}

.s {
  color: green;
}
