/*! HTML5 Boilerplate v7.0.1 | MIT License | https://html5boilerplate.com/ */

/* main.css 1.0.0 | MIT License | https://github.com/h5bp/main.css#readme */
/*
 * What follows is the result of much research on cross-browser styling.
 * Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
 * Kroc Camen, and the H5BP dev community and team.
 */


/* ==========================================================================
   Base styles: opinionated defaults
   ========================================================================== */

html {
  color: #222;
  font-size: 1em;
  line-height: 1.4;
}

/*
 * Remove text-shadow in selection highlight:
 * https://twitter.com/miketaylr/status/12228805301
 *
 * Vendor-prefixed and regular ::selection selectors cannot be combined:
 * https://stackoverflow.com/a/16982510/7133471
 *
 * Customize the background color to match your design.
 */

::selection {
  background: #b3d4fc;
  text-shadow: none;
}

/*
 * A better looking default horizontal rule
 */

hr {
  display: block;
  height: 1px;
  border: 0;
  border-top: 1px solid #aaa;
  margin: 1em 0;
  padding: 0;
}

/*
 * Remove the gap between audio, canvas, iframes,
 * images, videos and the bottom of their containers:
 * https://github.com/h5bp/html5-boilerplate/issues/440
 */

audio,
canvas,
iframe,
img,
svg,
video {
  vertical-align: middle;
}

/*
 * Remove default fieldset styles.
 */

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

/*
 * Allow only vertical resizing of textareas.
 */

textarea {
  resize: vertical;
}


 /* ==========================================================================
   Helper classes
   ========================================================================== */

/*
 * Hide visually and from screen readers
 */

 .hidden {
  display: none !important;
}

/*
* Hide only visually, but have it available for screen readers:
* https://snook.ca/archives/html_and_css/hiding-content-for-accessibility
*
* 1. For long content, line feeds are not interpreted as spaces and small width
*    causes content to wrap 1 word per line:
*    https://medium.com/@jessebeach/beware-smushed-off-screen-accessible-text-5952a4c2cbfe
*/

.visuallyhidden {
  border: 0;
  clip: rect(0 0 0 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  white-space: nowrap; /* 1 */
}

/*
* Extends the .visuallyhidden class to allow the element
* to be focusable when navigated to via the keyboard:
* https://www.drupal.org/node/897638
*/

.visuallyhidden.focusable:active,
.visuallyhidden.focusable:focus {
  clip: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  position: static;
  width: auto;
  white-space: inherit;
}

/*
* Hide visually and from screen readers, but maintain layout
*/

.invisible {
  visibility: hidden;
}

/*
* Clearfix: contain floats
*
* For modern browsers
* 1. The space content is one way to avoid an Opera bug when the
*    `contenteditable` attribute is included anywhere else in the document.
*    Otherwise it causes space to appear at the top and bottom of elements
*    that receive the `clearfix` class.
* 2. The use of `table` rather than `block` is only necessary if using
*    `:before` to contain the top-margins of child elements.
*/

.clearfix:before,
.clearfix:after {
  content: " "; /* 1 */
  display: table; /* 2 */
}

.clearfix:after {
  clear: both;
}


 /* ==========================================================================
   Fonts
   ========================================================================== */

@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: local('Lato-Regular') url(/fonts/Lato-Regular.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Roboto Slab';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: local('Lato-Regular') url(/fonts/RobotoSlab-Regular.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

 /* ==========================================================================
   Custom styles
   ========================================================================== */

html, body {
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  font-family: 'Lato', sans-serif;
}

header, footer, h1, h2, h3, h4 {
  font-family: 'Roboto Slab', sans-serif;
}

/* TODO: We should set this on 'html' and counter it elsewhere */
p, li, table {
  font-size: 1.25rem;
}

p {
  margin: 1rem 0;
}

a {
  text-decoration: none;
  color: inherit;
  font-weight: bold;
}

img {
  max-width:100%;
  max-height:100%;
}

code {
  background-color: #ddd;
}

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

blockquote {
  margin: 1rem 0;
  padding-left: 1.75rem;
  color: #444;
  border-left: 10px solid black;
}

pre,
pre code {
  overflow: auto;
}

article a {
  font-weight: normal;
  text-decoration: underline;
}

table, th, td {
  border: 1px solid;
}

table {
  border-collapse: collapse;
  margin: 1rem 0;
  width: 100%;
}

th, td {
  padding: 0.1rem 0.5rem;
  text-align: center;
}

tr:nth-child(even) {
  background-color: #f2f2f2;
}

/* Structure */

.header-wrapper {
  background-color: #aaa;
  background-size: cover;
  background-position: center;
}

.main-wrapper {
  flex: 1;
}

.main-inner,
.footer-wrapper {
  max-width: 1280px;
  margin: auto;
  padding: 0 3rem;
}

.footer-wrapper {
  margin-top: auto;
}

/* Header */

.home-button {
  display: flex;
  position: absolute;
  padding: 1rem;
  border-bottom: 4px solid black;
  background-color: white;
  color: black;
}

.home-button:hover {
  border-color: white;
  background-color: black;
  color: white;
  cursor: pointer;
}

.header {
  padding: 3rem 0 0;
  margin: auto;
}

.title {
  display: inline-block;
  padding: .5rem 2rem;
  margin: 6rem 3rem;
  font-size: 4rem;
  background-color: white;
  color: black;
}

.site-nav {
  display: flex;
  max-width: 1280px;
  padding: 0 3rem;
  margin: auto;
  flex-grow: 1;
  justify-content: space-between;
  color: white;
}

.site-nav-left,
.site-nav-right {
  display: flex;
  flex-flow: row wrap;
  padding: 0;
  margin: 0;
}

.site-nav-right {
  font-size: 1.2rem;
}

.menu {
  display: flex;
  margin: 0;
  padding: 0;
}

.menu-item,
.site-nav .social-links {
  display: flex;
  align-items: stretch;
}

.menu-item > a,
.site-nav .social-link {
  display: flex;
  border-top: 4px solid black;
  background-color: white;
  color: black;
}

.menu-item > a:hover,
.site-nav .social-link:hover {
  border-color: white;
  background-color: black;
  color: white;
}

.menu-item > a {
  padding: .5rem 1rem;
  margin-right: .5rem;
}

.site-nav .social-link {
  padding: 0 .75rem;
  margin-left: .5rem;
}

/* Post */

.byline {
  display: flex;
  font-family: 'Roboto Slab', sans-serif;
}

.byline-avatar {
  margin-right: .5rem;
}

.byline-avatar img {
  border-radius: 0;
}

.byline-meta {
  display: flex;
  flex-direction: column;
  font-size: 0.8em;
}

.byline-meta > div {
  flex: 1;
}

.byline-meta .author > a {
  text-transform: uppercase;
  text-decoration: none;
  font-style: normal;
  font-weight: bold;
}

.byline-meta-content {
  color: #aaa;
}

/* Social */

.social-links {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
}

.social-link {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0;
  padding: 0.3rem;
}

/* Content */

h2 {
  display: inline-block;
  background-color: black;
  color: white;
  padding: .25rem 2rem;
  margin: 0;
}

.content {
  padding: 1rem 0;
}

.content .date {
  font-weight: normal;
  font-size: 0.8rem;
  display: inline-block;
}

.pages-list {
  list-style: none;
  margin: 1rem 0;
  padding: 0;
}

.pages-item {
  margin-bottom: 2rem;
}

.page-date {
  color: #aaa;
  font-weight: bold;
  font-size: 0.8rem;
  text-transform: uppercase;
}

.page-title {
  font-size: 1.5rem;
  color: #444;
}

.page-title:hover {
  color: black;
}

.page-link {
  border-bottom: 3px solid black;
}

.admonition {
  margin: 1rem 0;
  padding-left: 1.75rem;
  color: #444;
  border-left: 10px solid black;
}

.admonition.note::before {
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  content: "\f129";
}

.admonition.important::before {
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  content: "\f071";
}

/* Categories footer */

.categories {
  margin: 1rem 0;
}

.category {
  background-color: black;
  color: white;
  padding: 0.2rem 0.4rem;
}

/* Tag cloud */

.tag-cloud {
  text-align: center;
  margin: 1rem auto;
}

.tag-cloud .tag {
  text-transform: lowercase;
  text-decoration: underline;
  line-height: 3rem;
  color: #444;
}

.tag-cloud .tag:hover {
  color: black;
}

.tag-cloud .tag.not-popular {
  font-size: 1.5rem;
}

.tag-cloud .tag.popular {
  font-size: 2rem;
}

.tag-cloud .tag.very-popular {
  font-size: 3rem;
}

/* ==========================================================================
   Media Queries for Responsive Design.
   ========================================================================== */

@media only screen and (max-width: 450px) {
  h2 {
    padding: .25rem 1rem;
  }

  p, li {
    font-size: 1rem;
  }

  blockquote {
    padding-left: 1rem;
    border-left: 5px solid black;
  }

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

  .page-title {
    font-size: 1.25rem;
  }

  .title {
    margin: 1rem;
  }

  .site-nav {
    padding: 0 1rem;
  }

  .site-nav-right {
    display: none;
  }

  .main-inner,
  .footer-wrapper {
    padding: 0 1rem;
  }

  .admonition {
    padding-left: 1rem;
    color: #444;
    border-left: 5px solid black;
  }
}

@media only screen and (max-width: 768px) {
  .title {
    font-size: 1.5rem;
    padding: .25rem 1rem;
  }

  .column {
    padding-bottom: 2rem;
  }

  .pages-item {
    margin-bottom: 1rem;
  }
}

@media only screen and (min-width: 769px) {
  .columns {
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-column-gap: 2em;
  }

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

  .further-reading {
    margin-top: auto;
  }
}

@media print,
       (-webkit-min-device-pixel-ratio: 1.25),
       (min-resolution: 1.25dppx),
       (min-resolution: 120dpi) {
}


/* ==========================================================================
   Print styles.
   Inlined to avoid the additional HTTP request:
   https://www.phpied.com/delay-loading-your-print-css/
   ========================================================================== */

@media print {
  *,
  *:before,
  *:after {
      background: transparent !important;
      color: #000 !important; /* Black prints faster */
      -webkit-box-shadow: none !important;
      box-shadow: none !important;
      text-shadow: none !important;
  }

  a,
  a:visited {
      text-decoration: underline;
  }

  a[href]:after {
      content: " (" attr(href) ")";
  }

  abbr[title]:after {
      content: " (" attr(title) ")";
  }

  /*
   * Don't show links that are fragment identifiers,
   * or use the `javascript:` pseudo protocol
   */

  a[href^="#"]:after,
  a[href^="javascript:"]:after {
      content: "";
  }

  pre {
      white-space: pre-wrap !important;
  }
  pre,
  blockquote {
      border: 1px solid #999;
      page-break-inside: avoid;
  }

  /*
   * Printing Tables:
   * http://css-discuss.incutio.com/wiki/Printing_Tables
   */

  thead {
      display: table-header-group;
  }

  tr,
  img {
      page-break-inside: avoid;
  }

  p,
  h2,
  h3 {
      orphans: 3;
      widows: 3;
  }

  h2,
  h3 {
      page-break-after: avoid;
  }
}
