:root {
  --base-font-family: "Roboto", "Helvetica Neue", helvetica, arial, sans-serif;
  --base-font-size: 16px;
  --small-font-size: calc(var(--base-font-size) * 0.875);
  --base-line-height: 1.5;
  --spacing-unit: 20px;
  --text-color: #111;
  --background-color: #fdfdfd;
  --brand-color: #2a7ae2;
  --grey-color: #828282;
  --grey-color-light: #e8e8e8;
  --grey-color-dark: #424242;
  --content-width: 720px;
  --on-palm: 600px;
  --on-laptop: 720px;
}

/**
 * Reset some basic elements
 */
body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
hr,
dl,
dd,
ol,
ul,
figure {
  margin: 0;
  padding: 0;
}

/**
 * Basic styling
 */
body {
  font-family: var(--base-font-family);
  font-size: var(--base-font-size);
  line-height: var(--base-line-height);
  color: var(--text-color);
  background-color: var(--background-color);
  text-size-adjust: 100%;
}

/**
 * Set `margin-bottom` to maintain vertical rhythm
 */
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
ul,
ol,
dl,
figure {
  margin-bottom: calc(var(--spacing-unit) / 2);
}

hr {
  border-style: none;
  border-top: 1px solid #e8e8e8;
  margin-top: 30px;
  margin-bottom: 30px;
}

table {
  border-spacing: 0;
  border-collapse: collapse;
  margin: 10px 0;
}

table th {
  text-align: left;
}

table th,
table td {
  padding: 4px 8px;
  border: 1px solid var(--grey-color-light);
}

/**
 * Images
 */
img {
  max-width: 100%;
  vertical-align: middle;
}

/**
 * Figures
 */
figure > img {
  display: block;
}

figcaption {
  font-size: var(--small-font-size);
}

/**
 * Lists
 */
ul,
ol {
  margin-left: var(--spacing-unit);
}

li {
  > ul,
  > ol {
    margin-bottom: 0;
  }
}

/**
 * Headings
 */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: normal;
}

h1 {
  font-size: 32px;
}

/**
 * Links
 */
a {
  color: var(--brand-color);
  text-decoration: none;
}

a:visited {
  color: var(--brand-color);
}

a:hover {
  color: var(--text-color);
  text-decoration: underline;
}

/**
 * Blockquotes
 */
blockquote {
  color: var(--grey-color-dark);
  border-left: 4px solid var(--grey-color-light);
  padding-left: calc(var(--spacing-unit) / 2);
}

blockquote > :last-child {
  margin-bottom: 0;
}

/**
 * Code formatting
 */
pre,
code {
  border: 1px solid var(--grey-color-light);
  border-radius: 3px;
  font-size: 13px;
  background-color: #f6f6f6;
  vertical-align: middle;
}

code {
  padding: 1px 5px;
}

pre {
  padding: 8px 12px;
  overflow-x: auto;
}

pre > code {
  border: 0;
  padding-right: 0;
  padding-left: 0;
}

/**
 * Wrapper
 */
.wrapper {
  max-width: calc(var(--content-width) - (var(--spacing-unit) * 2));
  margin-right: auto;
  margin-left: auto;
  padding-right: var(--spacing-unit);
  padding-left: var(--spacing-unit);
}

/**
 * Icons
 */
.icon > svg {
  display: inline-block;
  width: 16px;
  height: 16px;
  vertical-align: middle;
}

.icon > svg path {
  fill: var(--grey-color);
}

/**
 * Site header
 */
.site-header {
  border-top: 5px solid var(--grey-color-dark);
  border-bottom: 1px solid var(--grey-color-light);
  min-height: 56px;
  position: relative;
}

.site-title {
  font-size: 26px;
  line-height: 56px;
  letter-spacing: -1px;
  margin-bottom: 0;
  float: left;
  display: flex;
  align-items: center;
  color: var(--grey-color-dark);
}

.site-title .logo {
  width: 42px;
  height: 42px;
  background: url("/static/images/logo.svg") no-repeat center;
  background-size: contain;
  margin-right: 8px;
  opacity: 0.9;
}

.site-title:visited {
  color: var(--grey-color-dark);
}

.site-nav {
  float: right;
  line-height: 56px;
}

.site-nav .menu-icon {
  display: none;
}

.site-nav .page-link {
  color: var(--text-color);
  line-height: var(--base-line-height);
}

.site-nav .page-link:not(:first-child) {
  margin-left: 20px;
}

/**
 * Site footer
 */
.site-footer {
  border-top: 1px solid var(--grey-color-light);
  padding: var(--spacing-unit) 0;
}

.footer-item {
  display: flex;
  align-items: center;
}

.footer-item-icon {
  margin-right: 8px;
}

/**
 * Page content
 */
.page-content {
  padding: var(--spacing-unit) 0;
}

.post-list {
  margin-left: 0;
  list-style: none;
}

.post-list > li {
  margin-bottom: var(--spacing-unit);
  padding-bottom: var(--spacing-unit);
  border-bottom: 1px solid var(--grey-color-light);
}

.post-list > li:last-child {
  border-bottom: none;
}

.post-meta {
  font-size: var(--small-font-size);
  color: var(--grey-color);
}

.post-date {
  font-size: var(--small-font-size);
  color: var(--grey-color);
  margin-bottom: 10px;
}

.post-link {
  display: block;
  font-size: 24px;
}

/**
 * Posts
 */
.post-header {
  margin-bottom: var(--spacing-unit);
}

.post-title {
  line-height: 1;
}

.post-content {
  margin-bottom: var(--spacing-unit);
}

.post-content h2 {
  font-size: 28px;
}

.post-content h3 {
  font-size: 22px;
}

.post-content h4 {
  font-size: 18px;
}

.item {
  border: 1px solid var(--grey-color-light);
  border-radius: 4px;
  padding: 10px;
  margin-bottom: 5px;
}

.item .title {
  font-size: 1.1rem;
}

.item .brief {
  font-size: 0.6rem;
}

.item .content {
  margin-right: 130px;
}

.item .content .title .subtitle {
  color: gray;
  font-size: 14px;
}

.item .content .fileinfo-table {
  font-size: 14px;
  line-height: 20px;
  margin: 2px 0 0;
}

.item .content .fileinfo-table td {
  border: none;
  padding: 0;
}

.item .content .fileinfo-table td.name {
  padding-right: 8px;
}

.item .download {
  float: right;
}

.item .download .button {
  border: 1px solid #689068;
  border-radius: 4px;
  font-size: 18px;
  padding: 5px 10px;
  color: #f2f2f2;
  background-color: #71a871;
  display: flex;
  align-items: center;
}

.item .download .label {
  margin-left: 5px;
}

.item .download a.button:hover {
  text-decoration: none;
  background-color: #679b67;
}

.item .meta {
  display: none;
}

.page-post .post-content img {
  max-width: 70%;
  margin: 8px auto;
  display: block;
  padding: 5px;
  border: 1px solid #e8e8e8;
  border-radius: 4px;
}

.search-control {
  display: block;
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #e8e8e8;
  border-radius: 4px;
  padding: 10px;
  margin-bottom: 10px;
  font-size: 16px;
}

.download-snippet {
  margin: 14px 0;
}

#markdown-toc {
  border: 1px solid var(--grey-color-light);
  padding: 10px 26px;
  font-size: 12px;
  margin-left: 0;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 20px;
}

/**
 * Syntax highlighting styles
 */
.highlight {
  background: #fff;
}

.highlight .c {
  color: #998;
  font-style: italic;
}

.highlight .err {
  color: #a61717;
  background-color: #e3d2d2;
}

.highlight .k {
  font-weight: bold;
}

.highlight .o {
  font-weight: bold;
}

.highlight .cm {
  color: #998;
  font-style: italic;
}

.highlight .cp {
  color: #999;
  font-weight: bold;
}

.highlight .c1 {
  color: #998;
  font-style: italic;
}

.highlight .cs {
  color: #999;
  font-weight: bold;
  font-style: italic;
}

.highlight .gd {
  color: #000;
  background-color: #fdd;
}

.highlight .gd .highlight .x {
  color: #000;
  background-color: #faa;
}

.highlight .ge {
  font-style: italic;
}

.highlight .gr {
  color: #a00;
}

.highlight .gh {
  color: #999;
}

.highlight .gi {
  color: #000;
  background-color: #dfd;
}

.highlight .gi .highlight .x {
  color: #000;
  background-color: #afa;
}

.highlight .go {
  color: #888;
}

.highlight .gp {
  color: #555;
}

.highlight .gs {
  font-weight: bold;
}

.highlight .gu {
  color: #aaa;
}

.highlight .gt {
  color: #a00;
}

.highlight .kc {
  font-weight: bold;
}

.highlight .kd {
  font-weight: bold;
}

.highlight .kp {
  font-weight: bold;
}

.highlight .kr {
  font-weight: bold;
}

.highlight .kt {
  color: #458;
  font-weight: bold;
}

.highlight .m {
  color: #099;
}

.highlight .s {
  color: #d14;
}

.highlight .na {
  color: #008080;
}

.highlight .nb {
  color: #0086b3;
}

.highlight .nc {
  color: #458;
  font-weight: bold;
}

.highlight .no {
  color: #008080;
}

.highlight .ni {
  color: #800080;
}

.highlight .ne {
  color: #900;
  font-weight: bold;
}

.highlight .nf {
  color: #900;
  font-weight: bold;
}

.highlight .nn {
  color: #555;
}

.highlight .nt {
  color: #000080;
}

.highlight .nv {
  color: #008080;
}

.highlight .ow {
  font-weight: bold;
}

.highlight .w {
  color: #bbb;
}

.highlight .mf {
  color: #099;
}

.highlight .mh {
  color: #099;
}

.highlight .mi {
  color: #099;
}

.highlight .mo {
  color: #099;
}

.highlight .sb {
  color: #d14;
}

.highlight .sc {
  color: #d14;
}

.highlight .sd {
  color: #d14;
}

.highlight .s2 {
  color: #d14;
}

.highlight .se {
  color: #d14;
}

.highlight .sh {
  color: #d14;
}

.highlight .si {
  color: #d14;
}

.highlight .sx {
  color: #d14;
}

.highlight .sr {
  color: #009926;
}

.highlight .s1 {
  color: #d14;
}

.highlight .ss {
  color: #990073;
}

.highlight .bp {
  color: #999;
}

.highlight .vc {
  color: #008080;
}

.highlight .vg {
  color: #008080;
}

.highlight .vi {
  color: #008080;
}

.highlight .il {
  color: #099;
}

.image-container {
  display: flex;
  flex-direction: column;
}

.image-container .thumbnail {
  align-self: center;
  max-width: 80%;
  padding: 6px 0;
}

.image-container .thumbnail.border {
  padding: 6px;
  border: 1px solid #e8e8e8;
  border-radius: 4px;
  background-color: white;
}

.image-container .thumbnail.background-black {
  background-color: black;
}

.image-container .thumbnail.left {
  align-self: flex-start;
}

.image-container .thumbnail.right {
  align-self: flex-end;
}

.image-container .thumbnail.wide {
  max-width: 100%;
}

/**
 * Pagination
 */
.pagination-wrapper {
  margin-bottom: 30px;
  display: flex;
  justify-content: center;
}

.pagination-wrapper ul {
  padding: 0;
  margin: 0;
  display: flex;
}

.pagination-wrapper li {
  border: 1px solid #e8e8e8;
  font-size: 18px;
  list-style-type: none;
}

.pagination-wrapper li a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
}

.pagination-wrapper li.active a {
  background-color: rgb(232 232 232 / 50%);
}

.pagination-wrapper li:first-child {
  border-bottom-left-radius: 3px;
  border-top-left-radius: 3px;
}

.pagination-wrapper li:last-child {
  border-bottom-right-radius: 3px;
  border-top-right-radius: 3px;
}

.pagination-wrapper li + li {
  margin-left: -1px;
}

.pagination-wrapper li a:hover {
  text-decoration: none;
  background-color: #e8e8e8;
}

.codespan-short {
  white-space: nowrap;
  vertical-align: baseline;
}

.codespan-long {
  border: none;
  vertical-align: baseline;
}

.comments {
  border-top: 1px solid #e8e8e8;
  margin-top: 40px;
  padding-top: 10px;
}

.comments h2 {
  font-size: 28px;
}

math {
  font-size: 110%;
}
