/* Reset */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Variables */
:root {
  --red: #dc322f;
  --blue: #268bd2;
  --gray: #f5f5f5;
  --text: #222222;
  --headings: #333333;
  --links: #268bd2;
  --border-light: rgba(0, 0, 0, 0.10);
  --border-dark: rgba(0, 0, 0, 0.25);
  --p-font: 'museo-sans-1', 'museo-sans-2', Helvetica, Arial, sans-serif;
  --h-font: 'museo-slab-1', 'museo-slab-2', Helvetica, Arial, sans-serif;
  --c-font: 'Bit Stream Vera Mono', 'Consolas', 'Courier New', monospace;
}

/* Basics */
html {
  overflow-y: scroll;
}

body {
  background: var(--gray);
  font-family: var(--p-font);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-smoothing: antialiased;
}

/* Typography */
h1, h2, h3, h4, h5, h6,
p, blockquote {
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--h-font);
  font-weight: bold;
  color: var(--headings);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.375rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p { color: var(--text); }

blockquote {
  font-size: 0.875rem;
  color: var(--text);
  padding: 10px 20px;
  border-left: 2px solid var(--red);
}

blockquote p {
  margin-bottom: 0;
}

blockquote cite {
  margin-top: 0.625rem;
  display: block;
  font-weight: bold;
}

blockquote cite::before {
  content: "\2014 \0020";
}

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

a:hover {
  text-decoration: underline;
}

em { font-style: italic; }
strong { font-weight: bold; }

sup, sub {
  vertical-align: baseline;
  position: relative;
  top: -0.4em;
  font-size: smaller;
  font-weight: bold;
  padding-left: 2px;
}

/* Layout */
.container {
  width: 700px;
  margin: 0.75em auto;
}

header {
  display: flex;
  align-items: flex-end;
  padding-bottom: 0.75rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-dark);
}

header .logo {
  background-color: var(--red);
  border-radius: 8px;
  text-align: center;
  flex: 0 0 auto;
  padding: 0 20px;
}

header .logo h1 {
  font-family: var(--h-font);
  font-size: 3rem;
  color: var(--gray);
  margin-bottom: 0;
}

header .logo a {
  text-decoration: none;
}

header nav {
  text-align: right;
  margin-left: auto;
}

header nav ul {
  list-style: none;
}

header nav li {
  font-size: 0.875rem;
  font-weight: bold;
  line-height: 1.1875rem;
}

header nav a {
  color: var(--text);
  text-decoration: none;
  font-family: var(--h-font);
}

header nav a:hover {
  color: var(--links);
  text-decoration: none;
}

/* Sections */
section {
  margin-bottom: 1.5rem;
}

section h1 a {
  color: var(--headings);
  text-decoration: none;
}

section h1 a:hover {
  color: var(--links);
  text-decoration: none;
}

section p a,
section ol a,
section li a,
section blockquote a {
  color: var(--links);
  text-decoration: none;
}

section p a:hover,
section ol a:hover,
section li a:hover,
section blockquote a:hover {
  text-decoration: underline;
}

section h6.meta {
  margin-top: -22px;
  color: #8a8a8a;
  font-weight: normal;
}

/* First section (latest post on index) */
.first {
  border-bottom: 1px solid var(--border-dark);
}

.first ul,
.first ol,
.first dl {
  margin-bottom: 1.5rem;
  margin-left: 1.25rem;
  padding-right: 40px;
}

.first ul { list-style: square inside; }
.first ol { list-style: decimal inside; }

.first li {
  margin-bottom: 0.375rem;
}

/* About */
.about img {
  border: 1px solid rgba(0, 0, 0, 0.50);
  margin-bottom: 1.5rem;
  box-shadow: rgba(0, 0, 0, 0.25) 0px 0px 5px;
}

/* Post lists */
.short_list ul,
.archives ul {
  list-style: none;
  margin-left: 0;
  padding: 0;
}

.short_list li,
.archives li {
  border-bottom: 1px solid var(--border-light);
  padding: 10px 0;
}

.short_list li a,
.archives li a {
  color: var(--text);
  text-decoration: none;
}

.short_list li a:hover,
.archives li a:hover {
  color: var(--links);
}

.short_list li.the_end,
.archives li.the_end {
  border-bottom: none;
}

.short_list .date,
.archives .date {
  float: right;
  color: #8a8a8a;
}

/* Code */
code.inline {
  background-color: #fdf6e3;
  font-family: var(--c-font);
  font-size: 0.875rem;
  border: 1px solid var(--border-dark);
  padding: 4px 2px 0 2px;
  border-radius: 2px;
}

.highlight {
  margin: 0 0.125rem 1.5rem 0.125rem;
  font-family: var(--c-font);
  font-size: 0.875rem;
  line-height: 1.25;
  border-radius: 2px;
  box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.5);
  padding: 5px;
}

/* Astro code blocks */
pre {
  margin: 0 0.125rem 1.5rem 0.125rem;
  font-family: var(--c-font);
  font-size: 0.875rem;
  line-height: 1.25;
  border-radius: 2px;
  box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.5);
  padding: 5px;
}

/* Notes */
.notes {
  margin-bottom: 1.5rem;
}

.notes h6 {
  margin-bottom: 0.75rem;
}

.notes p {
  font-size: 0.75rem;
  margin-bottom: 0.5rem;
}

/* Footer */
footer {
  height: 4px;
  background-color: var(--red);
}
