/*
 * Colors and type after the Leonids Jekyll theme (MIT, Renyuan Zou):
 * https://github.com/renyuanz/leonids/tree/leonids-jekyll
 * Layout is a single column with a header band instead of Leonids' sidebar.
 */

:root {
  --text: rgba(0, 0, 0, 0.87);
  --text-muted: rgba(0, 0, 0, 0.6);
  --background: #f5f5f5;
  --white: #fff;
  /* "Mustard & ink": mustard on the name and tags, dark olive links, warm gray details. */
  --primary: #5c4b16;
  --primary-light: #7d6a2a;
  --secondary: #6f6a5c;
  --secondary-light: #8f8a7c;
  --name: #b8860b;
  --accent: #b8860b;
  --accent-light: #d09a1f;
  --rule: #ddd;
  --font-sans: "Source Sans 3", "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: "Roboto Mono", "Courier New", monospace;
  --measure: 760px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-family: var(--font-sans);
  font-size: 93.75%; /* 15px at the browser default of 16px, but follows the reader's setting */
  line-height: 1.5;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  background: var(--white);
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover,
a:focus {
  color: var(--primary-light);
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.7;
}

h1 a, h2 a, h3 a, h4 a, h5 a, h6 a {
  color: var(--text);
}

h1 a:hover, h2 a:hover, h3 a:hover, h4 a:hover, h5 a:hover, h6 a:hover {
  color: var(--text-muted);
}

h1 { font-size: 2rem; margin: 1rem 0 0.8rem; }
h2 { font-size: 1.75rem; margin: 0.875rem 0 0.7rem; }
h3 { font-size: 1.5rem; margin: 0.75rem 0 0.6rem; }
h4 { font-size: 1.25rem; margin: 0.625rem 0 0.5rem; }

p {
  margin: 1.2em 0;
  word-spacing: 0.05em;
  line-height: 1.6;
}

img {
  display: block;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

hr {
  margin: 1rem 0;
  border: 0;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

blockquote {
  margin: 1.5em 0;
  padding-left: 20px;
  font-style: italic;
  border-left: 5px solid var(--secondary);
}

code, pre {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

code {
  background: var(--background);
  padding: 0.1em 0.3em;
  border-radius: 3px;
}

pre {
  overflow-x: auto;
  padding: 1em;
  background: var(--background);
  border-radius: 4px;
  line-height: 1.45;
}

pre code {
  padding: 0;
  background: none;
}

table {
  border-collapse: collapse;
  width: 100%;
  margin: 1.2em 0;
}

th, td {
  text-align: left;
  padding: 0.5em 0.6em;
  border-bottom: 1px solid var(--rule);
}

th {
  font-weight: 600;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Page frame */

.container {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 20px;
}

@media (min-width: 600px) {
  .container {
    padding: 0 30px;
  }
}

main {
  padding-top: 40px;
}

/* Header band */

.site-header {
  background: var(--background);
}

.site-header .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  padding-top: 24px;
  padding-bottom: 24px;
}

.identity {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.avatar-link {
  flex: 0 0 auto;
}

.avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0;
}

.author-name {
  display: block;
  color: var(--name);
  font-size: 1.6em;
  line-height: 1.25;
}

.author-name:hover,
.author-name:focus {
  color: var(--accent-light);
}

.author-job {
  display: block;
  color: var(--secondary);
  font-size: 0.8em;
  font-weight: 600;
  text-transform: uppercase;
}

.author-bio {
  display: block;
  font-size: 90%;
  color: var(--secondary);
}

.site-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.nav-list,
.social-links {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  align-items: center;
}

.nav-item::after {
  content: "/";
  color: var(--secondary);
  margin: 0 0.5em;
}

.nav-item:last-child::after {
  content: "";
  margin: 0;
}

.nav-item a {
  text-transform: lowercase;
  font-size: 95%;
  color: var(--secondary);
}

.nav-item a:hover,
.nav-item a:focus {
  color: var(--secondary-light);
}

.social-links {
  gap: 12px;
}

.social-link-item {
  color: var(--secondary);
  display: inline-block;
  line-height: 0;
}

.social-link-item:hover,
.social-link-item:focus {
  color: var(--secondary-light);
}

.social-link-item svg {
  width: 1.15em;
  height: 1.15em;
  fill: currentColor;
}

/* Post list */

section.post {
  margin-bottom: 60px;
}

section.post h2 {
  font-size: 1.25rem;
  margin: 0 0 0.5rem;
}

.post-meta {
  font-size: 0.867rem; /* 13px at the default size */
  font-weight: 600;
}

.post-meta .post-date {
  color: var(--secondary);
  text-transform: uppercase;
}

.post-meta .read-time {
  color: var(--primary);
}

/* Tag links, in the meta line and in the tag cloud */

.post-tag {
  color: var(--accent);
  text-transform: lowercase;
}

.post-tag:hover,
.post-tag:focus {
  color: var(--accent-light);
}

.post-description p {
  margin-top: 0;
}

/* Single post */

.btn {
  display: inline-block;
  padding: 0.5em 1em;
  border: 1px solid var(--primary);
  border-radius: 0.4em;
  font-size: 0.867rem;
  font-weight: 600;
  line-height: 1;
}

.btn:hover,
.btn:focus {
  background: var(--primary);
  color: var(--white);
}

#post {
  padding-bottom: 50px;
}

#post .post-header {
  margin: 0 auto 50px;
}

#post h1 {
  margin: 0.5em 0 0.25em;
}

#post h2 {
  margin: 2em 0 0.8em;
  padding-bottom: 0.7em;
  border-bottom: 1px solid var(--rule);
}

#post h3 {
  margin: 1.75em 0 1.2em;
}

.post-navigation {
  display: flex;
  justify-content: space-between;
  gap: 2em;
  padding-top: 1em;
  border-top: 1px solid var(--rule);
  font-size: 0.9em;
}

.post-navigation a {
  color: var(--secondary);
}

.post-navigation a:hover,
.post-navigation a:focus {
  color: var(--primary);
}

.post-nav-next {
  margin-left: auto;
  text-align: right;
}

.post-nav-arrow {
  color: var(--accent);
}

/* Pages (tags, archive) */

#page {
  padding-bottom: 50px;
  min-height: 50vh;
}

#page .page-header {
  margin: 0 auto 40px;
}

#page .page-header h1 {
  font-size: 1.75rem;
}

/* Tags page */

.tag-cloud {
  padding: 1em 0 3em;
  margin: 0;
  overflow: hidden;
  list-style: none;
}

.tag-cloud li {
  display: inline-block;
  margin-right: 0.5em;
}

.tag-list .tag-group {
  margin-bottom: 2em;
}

.tag-list .tag-group-title {
  color: var(--accent);
  text-transform: lowercase;
  font-size: 1.15rem;
  margin: 0.6rem 0 0.5rem;
}

.tag-list .tag-item {
  padding-left: 1em;
  margin-bottom: 0.5em;
}

.tag-list .tag-item a {
  color: var(--text);
}

.tag-list .tag-item a:hover,
.tag-list .tag-item a:focus {
  color: var(--text-muted);
}

/* Archive page */

.archive .timeline {
  position: relative;
}

.archive .timeline::before {
  content: "";
  position: absolute;
  top: 0;
  left: -2px;
  height: 100%;
  width: 4px;
  background: var(--background);
}

.archive .archive-title {
  position: relative;
  margin: 2em auto 1em;
}

.archive .archive-year {
  font-size: 1.25rem;
  margin: 0.625rem 0 0.5rem 1em;
}

.archive .archive-year::before {
  content: " ";
  position: absolute;
  left: 0;
  top: 50%;
  margin-left: -4px;
  margin-top: -4px;
  width: 8px;
  height: 8px;
  background: #bbb;
  border-radius: 50%;
}

.archive ul {
  list-style: none;
  padding-left: 1.5em;
}

.archive li {
  margin: 1em auto;
}

.archive li time {
  display: inline-block;
  width: 60px;
}

/* Footer */

footer {
  text-align: center;
  padding: 3em 0;
  font-size: 0.9em;
  color: var(--secondary);
}
