$base-font-size: 16px;
$base-line-height: 1.5;
$__1px: (1px/$base-font-size) * 1rem;
$base-font-family: 'Roboto, Helvetica, sans-serif';
$code-font-family: 'Roboto Mono, Menlo, Consolas, monospace';
$code-font-size:  0.875em;
$_body-margin: 0;
$heading-line-height: 1.2;
$fore-color-var: '--fore-color';
$fore-color: #212121;
$back-color-var: '--back-color';
$back-color: #fff;
$card-page-back-color-var: '--card-page-back-color';
$card-page-back-color: #eee;
$border-color-var: '--border-color';
$border-color: #eee;
$a-link-color-var: '--a-link-color';
$a-link-color: #0277bd;
$a-visited-color-var: '--a-visited-color';
$a-visited-color: #01579b;
$code-fore-color-var: '--code-fore-color';
$code-fore-color: #8e24aa;
$code-back-color-var: '--code-back-color';
$code-back-color: #f0f0f0;
$code-selected-color-var: '--code-selected-color';
$code-selected-color: #37474f;
$pre-fore-color-var: '--pre-fore-color';
$pre-fore-color: #e57373;
$pre-back-color-var: '--pre-back-color';
$pre-back-color: #263238;
$token-color-a-var: '--token-color-a';  // Comments
$token-color-a: #7f99a5;
$token-color-b-var: '--token-color-b';  // Punctuation
$token-color-b: #bdbdbd;
$token-color-c-var: '--token-color-c';  // Functions
$token-color-c: #64b5f6;
$token-color-d-var: '--token-color-d';  // Numbers
$token-color-d: #ff8f00;
$token-color-e-var: '--token-color-e';  // Strings
$token-color-e: #c5e1a5;
$token-color-f-var: '--token-color-f';  // Keywords
$token-color-f: #ce93d8;
$token-color-g-var: '--token-color-g';  // Regular expressions
$token-color-g: #26c6da;
$token-color-h-var: '--token-color-h';  // Variables
$token-color-h: #e57373;
$collapse-color-var: '--collapse-color';
$collapse-color: #607d8b;
$copy-button-color-var: '--copy-button-color';
$copy-button-color: #1e88e5;
$copy-button-hover-color-var: '--copy-button-hover-color';
$copy-button-hover-color: #2196f3;
$scrolltop-button-color-var: '--scrolltop-button-color';
$scrolltop-button-color: #26a69a;
$scrolltop-button-hover-color-var: '--scrolltop-button-hover-color';
$scrolltop-button-hover-color: #4db6ac;
$beginner-color-var: '--beginner-color';
$beginner-color: #7cb342;
$intermediate-color-var: '--intermediate-color';
$intermediate-color: #ffb300;
$advanced-color-var: '--advanced-color';
$advanced-color: #e53935;
$header-fore-color-var: '--header-fore-color';
$header-fore-color: #fff;
$header-back-color-var: '--header-back-color';
$header-back-color: #202124;
$nav-fore-color-var: '--nav-fore-color';
$nav-fore-color: #f0f0f0;
$nav-back-color-var: '--nav-back-color';
$nav-back-color: #202124;
$nav-link-border-color-var: '--nav-link-border-color';
$nav-link-border-color: #455a64;
$nav-link-fore-color-var: '--nav-link-fore-color';
$nav-link-fore-color: #e0e0e0;
$nav-link-hover-color-var: '--nav-link-hover-color';
$nav-link-hover-color: #2b2c30;
$search-fore-color-var: '--search-fore-color';
$search-fore-color: #fafafa;
$search-back-color-var: '--search-back-color';
$search-back-color: #111;
$search-border-color-var: '--search-border-color';
$search-border-color: #9e9e9e;
$search-hover-border-color-var: '--search-hover-border-color';
$search-hover-border-color: #26a69a;
$footer-fore-color-var: '--footer-fore-color';
$footer-fore-color: #616161;
$footer-back-color-var: '--footer-back-color';
$footer-back-color: #e0e0e0;
$universal-margin-var: '--universal-margin';
$universal-margin: 0.5rem;
$universal-padding-var: '--universal-padding';
$universal-padding: 0.5rem;
$universal-border-radius-var: '--universal-border-radius';
$universal-border-radius: 0.125rem;

// Load external fonts - progressive loading should help alleviate performance issues
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 300;
  src: local('Roboto Light'), local('Roboto-Light'), url(https://fonts.gstatic.com/s/roboto/v18/KFOlCnqEu92Fr1MmSU5fBBc4.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-display: swap;
}
@font-face {
  font-family: 'Roboto';
  font-style: italic;
  font-weight: 300;
  src: local('Roboto Light Italic'), local('Roboto-LightItalic'), url(https://fonts.gstatic.com/s/roboto/v18/KFOjCnqEu92Fr1Mu51TjASc6CsQ.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-display: swap;
}
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 500;
  src: local('Roboto Medium'), local('Roboto-Medium'), url(https://fonts.gstatic.com/s/roboto/v18/KFOlCnqEu92Fr1MmEU9fBBc4.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-display: swap;
}
@font-face {
  font-family: 'Roboto Mono';
  font-style: normal;
  font-weight: 300;
  src: local('Roboto Mono Light'), local('RobotoMono-Light'), url(https://fonts.gstatic.com/s/robotomono/v5/L0xkDF4xlVMF-BfR8bXMIjDgiWqxf78.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-display: swap;
}
@font-face {
  font-family: 'Roboto Mono';
  font-style: italic;
  font-weight: 300;
  src: local('Roboto Mono Light Italic'), local('RobotoMono-LightItalic'), url(https://fonts.gstatic.com/s/robotomono/v5/L0xmDF4xlVMF-BfR8bXMIjhOk9a0T72jBg.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-display: swap;
}
@font-face {
  font-family: 'Roboto Mono';
  font-style: normal;
  font-weight: 500;
  src: local('Roboto Mono Medium'), local('RobotoMono-Medium'), url(https://fonts.gstatic.com/s/robotomono/v5/L0xkDF4xlVMF-BfR8bXMIjC4iGqxf78.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-display: swap;
}
// Set up variables for everything
:root {
  #{$fore-color-var}: $fore-color;
  #{$back-color-var}: $back-color;
  #{$card-page-back-color-var}: $card-page-back-color;
  #{$border-color-var}: $border-color;
  #{$universal-margin-var}: $universal-margin;
  #{$universal-padding-var}: $universal-padding;
  #{$universal-border-radius-var}: $universal-border-radius;
  #{$a-link-color-var} : $a-link-color;
  #{$a-visited-color-var} : $a-visited-color;
  #{$code-fore-color-var}: $code-fore-color;
  #{$code-back-color-var}: $code-back-color;
  #{$code-selected-color-var}: $code-selected-color;
  #{$pre-fore-color-var}: $pre-fore-color;
  #{$pre-back-color-var}: $pre-back-color;
  #{$token-color-a-var}: $token-color-a;
  #{$token-color-b-var}: $token-color-b;
  #{$token-color-c-var}: $token-color-c;
  #{$token-color-d-var}: $token-color-d;
  #{$token-color-e-var}: $token-color-e;
  #{$token-color-f-var}: $token-color-f;
  #{$token-color-g-var}: $token-color-g;
  #{$token-color-h-var}: $token-color-h;
  #{$collapse-color-var}: $collapse-color;
  #{$copy-button-color-var}: $copy-button-color;
  #{$copy-button-hover-color-var}: $copy-button-hover-color;
  #{$scrolltop-button-color-var}: $scrolltop-button-color;
  #{$scrolltop-button-hover-color-var}: $scrolltop-button-hover-color;
  #{$beginner-color-var}: $beginner-color;
  #{$intermediate-color-var}: $intermediate-color;
  #{$advanced-color-var}: $advanced-color;
  #{$header-fore-color-var}: $header-fore-color;
  #{$header-back-color-var}: $header-back-color;
  #{$nav-fore-color-var}: $nav-fore-color;
  #{$nav-back-color-var}: $nav-back-color;
  #{$footer-fore-color-var}: $footer-fore-color;
  #{$footer-back-color-var}: $footer-back-color;
  #{$nav-link-fore-color-var}: $nav-link-fore-color;
  #{$nav-link-border-color-var}: $nav-link-border-color;
  #{$nav-link-hover-color-var}: $nav-link-hover-color;
  #{$search-fore-color-var}: $search-fore-color;
  #{$search-back-color-var}: $search-back-color;
  #{$search-border-color-var}: $search-border-color;
  #{$search-hover-border-color-var}: $search-hover-border-color;
}
// Set up some basic styling for everything
html {
  font-size: $base-font-size;
  scroll-behavior: smooth;
}
html, * {
  font-family: #{$base-font-family};
  line-height: $base-line-height;
  // Prevent adjustments of font size after orientation changes in mobile.
  -webkit-text-size-adjust: 100%;
}
* {
  font-size: 1rem;
  font-weight: 300;
}
// Apply fixes and defaults as necessary for modern browsers only
a, b, del, em, i, ins, q, span, strong, u {
  font-size: 1em; // Fix for elements inside headings not displaying properly.
}
body {
  margin: $_body-margin;
  color: var(#{$fore-color-var});
  background: var(#{$back-color-var});
  overflow-x: hidden;
  &.card-page {
    background: var(#{$card-page-back-color-var});
  }
}
// Correct display for Edge & Firefox.
details {
  display: block;
}
// Correct display in all browsers.
summary {
  display: list-item;
}
// Abbreviations
abbr[title] {
  border-bottom: none;           // Remove bottom border in Firefox 39-.
  text-decoration: underline dotted;  // Opinionated style-fix for all browsers.
}
// Show overflow in Edge.
input {
  overflow: visible;
}
// Correct the cursor style of increment and decrement buttons in Chrome.
[type="number"]::-webkit-inner-spin-button, [type="number"]::-webkit-outer-spin-button {
  height: auto;
}
// Correct style in Chrome and Safari.
[type="search"] {
  -webkit-appearance: textfield;
  outline-offset: -2px;
}
// Correct style in Chrome and Safari.
[type="search"]::-webkit-search-cancel-button, [type="search"]::-webkit-search-decoration {
  -webkit-appearance: none;
}
// Make images responsive by default.
img {
  max-width: 100%;
  height: auto;
}
// Style headings according to material design guidelines
h1, h2, h3, h4, h5, h6 {
  line-height: $heading-line-height;
  margin: calc(1.5 * var(#{$universal-margin-var})) var(#{$universal-margin-var});
}
h1 {
  font-size: 6rem;
}
h2 {
  font-size: 3.75rem;
}
h3 {
  font-size: 3rem;
}
h4 { 
  font-size: 2.125rem;
}
h5 {
  font-size: 1.5rem;
}
h6 {
  font-size: 1.25rem;
}
// Style textual elements
p {
  margin: var(#{$universal-margin-var});
}
ol, ul {
  margin: var(#{$universal-margin-var});
  padding-left: calc(2 * var(#{$universal-margin-var}));
}
b, strong {
  font-weight: 500;
}
hr {
  // Fixes and defaults for styling
  box-sizing: content-box;
  border: 0;
  // Actual styling using variables
  line-height: 1.25em;
  margin: var(#{$universal-margin-var});
  height: $__1px;
  background: linear-gradient(to right, transparent, var(#{$border-color-var}) 20%, var(#{$border-color-var}) 80%, transparent);
}
// Style code
code, kbd, pre {
  font-size: $code-font-size;
}
code, kbd, pre, code *, pre *, kbd *, code[class*="language-"], pre[class*="language-"] {
  font-family: #{$code-font-family}; 
}
sup, sub, code, kbd {
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}

code {
  background: var(#{$code-back-color-var});
  color: var(#{$code-fore-color-var});
  padding: calc(var(#{$universal-padding-var}) / 4) calc(var(#{$universal-padding-var}) / 2);
  border-radius: var(#{$universal-border-radius-var});
}
/*  === Unused so far ===
kbd {
  background: var(#{$fore-color-var});
  color: var(#{$back-color-var});
  border-radius: var(#{$universal-border-radius-var});
  padding: calc(var(#{$universal-padding-var}) / 4) calc(var(#{$universal-padding-var}) / 2);
}
*/
pre {
  overflow: auto; // Responsiveness
  background: var(#{$pre-back-color-var});
  color: var(#{$pre-fore-color-var});
  padding: calc(1.5 * var(#{$universal-padding-var}));
  margin: var(#{$universal-margin-var});
  border: 0;
}

code[class*="language-"], pre[class*="language-"] {
  color: var(#{$pre-fore-color-var});

  text-align: left;
  white-space: pre;
  word-spacing: normal;
  word-break: normal;
  word-wrap: normal;
  line-height: 1.8;

  -moz-tab-size: 2;
  -o-tab-size: 2;
  tab-size: 2;

  -webkit-hypens: none;
  -moz-hyphens: none;
  -ms-hyphens: none;
  hyphens: none;
}

pre[class*="language-"] {
  padding: calc(2 * var(#{$universal-padding-var}));
  overflow: auto;
  margin: var(#{$universal-margin-var}) 0;
  white-space: pre-wrap;
}

pre[class*="language-"]::-moz-selection, pre[class*="language-"] ::-moz-selection,
code[class*="language-"]::-moz-selection, code[class*="language-"] ::-moz-selection {
  background: var(#{$code-selected-color-var});
}

pre[class*="language-"]::selection, pre[class*="language-"] ::selection,
code[class*="language-"]::selection, code[class*="language-"] ::selection {
  background: var(#{$code-selected-color-var});
}

:not(pre) > code[class*="language-"] {
  padding: .1em;
  border-radius: .3em;
  white-space: normal;
}

.namespace {
  opacity: .7;
}

.token {
  &.comment, &.prolog, &.doctype, &.cdata {
    color: var(#{$token-color-a-var});
  }
  &.punctuation {
    color: var(#{$token-color-b-var});
  }
  &.property, &.tag, &.boolean, &.constant, &.symbol, &.deleted, &.function {
    color: var(#{$token-color-c-var});
  }
  &.number, &.class-name {
    color: var(#{$token-color-d-var});
  }
  &.selector, &.attr-name, &.string, &.char, &.builtin, &.inserted {
    color: var(#{$token-color-e-var});
  }
  &.operator, &.entity, &.url, &.atrule, &.attr-value, &.keyword, &.interpolation-punctuation {
    color: var(#{$token-color-f-var});
  }
  &.regex {
    color: var(#{$token-color-g-var});
  }
  &.important, &.variable {
    color: var(#{$token-color-h-var});
  }
  &.italic, &.comment {
    font-style: italic;
  }
  &.important, &.bold {
    font-weight: 500;
  }
  &.entity {
    cursor: help;
  }
}
.language-css .token.string, .style .token.string {
  color: var(#{$token-color-f-var});
}

a {
  text-decoration: none;
  &:link{
    color: var(#{$a-link-color-var});
  }
  &:visited {
    color: var(#{$a-visited-color-var});
  }
  &:hover, &:focus {
    text-decoration: underline;
  }
}

// Github Corner styles - Do not alter
.github-corner:hover .octo-arm{animation:octocat-wave 560ms ease-in-out}@keyframes octocat-wave{0%,100%{transform:rotate(0)}20%,60%{transform:rotate(-25deg)}40%,80%{transform:rotate(10deg)}}@media (max-width:500px){.github-corner:hover .octo-arm{animation:none}.github-corner .octo-arm{animation:octocat-wave 560ms ease-in-out}}

/*
blockquote {}
sup {}
sub {}
figure {}
figcaption {}
*/

// ===================================================
// Layout
// ===================================================
$grid-medium-breakpoint: 768px;
$grid-large-breakpoint: 1280px;
// Grid container
.container {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-column-gap: calc(0.5 * var(#{$universal-margin-var}));
  &.card-container {
    position: absolute;
    padding-top: 3.5rem; 
    height: calc(100vh - 3.5rem);
  }
}
// Generic centered column
.col-centered {
  grid-column: span 12;
  max-width: 100%;
  @media screen and (min-width: #{$grid-medium-breakpoint}) {
    grid-column: 2/12;
  }
  @media screen and (min-width: #{$grid-large-breakpoint}) {
    grid-column: 3/11;
  }
}
// 25% width - For the 'in numbers' section
.col-quarter {
  grid-column: span 3;
}
// 100% width
.col-full-width {
  grid-column: span 12;
}
// For the contributors section
.flex-row {
  display: flex;
  flex: 0 1 auto;
  flex-flow: row wrap;
  .flex-item {
    flex: 0 0 auto;
    max-width: 50%;
    flex-basis: 50%;
    @media screen and (min-width: #{$grid-medium-breakpoint}) {
      max-width: 25%;
      flex-basis: 25%;
    }
    @media screen and (min-width: #{$grid-large-breakpoint}) {
      max-width: 100%;
      flex-grow: 1;
      flex-basis: 0;
    }
  }
}
// ===================================================
// Cards
// ===================================================
h2.category-name {
  text-align: center;
}
.card {
  overflow: hidden;
  position: relative;
  margin: var(#{$universal-margin-var});
  border-radius: calc(4 * var(#{$universal-border-radius-var}));
  box-shadow: 0 2px 2px 0 rgba(0,0,0,0.14),0 3px 1px -2px rgba(0,0,0,0.12),0 1px 5px 0 rgba(0,0,0,0.2);
  h4 {
    text-align: center;
    padding-bottom: calc(0.75 * var(#{$universal-padding-var}));
    margin-bottom: calc(2 * var(#{$universal-margin-var}));
    border-bottom: $__1px solid var(#{$border-color-var});
    padding-top: 5rem;
    margin-top: -4.25rem;
  }
  &.code-card {
    margin-top: calc(5 * var(#{$universal-margin-var}));
    background: var(#{$pre-back-color-var});
    .section.card-content{
      background: var(#{$back-color-var});
      padding: calc(1.5 * var(#{$universal-padding-var}));
    }
    .collapse {
      display: block;
      font-size: 0.75rem;
      font-family: #{$code-font-family}; 
      text-transform: uppercase;
      background: var(#{$pre-back-color-var});
      color: var(#{$collapse-color-var});
      padding: calc(1.5 * var(#{$universal-padding-var})) calc(1.5 * var(#{$universal-padding-var})) calc(2 * var(#{$universal-padding-var})) calc(2.25 * var(#{$universal-padding-var})); 
      margin-left: calc(1.5 * var(#{$universal-margin-var}));
      cursor: pointer;
      background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23607D8B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-plus-square'%3E%3Crect x='3' y='3' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='12' y1='8' x2='12' y2='16'%3E%3C/line%3E%3Cline x1='8' y1='12' x2='16' y2='12'%3E%3C/line%3E%3C/svg%3E");
      background-position: 0.25rem 0.9375rem;
      background-repeat: no-repeat;
      + pre.card-examples {
        margin-left: calc(1.5 * var(#{$universal-margin-var}));
        position: absolute;
        transform: scaleY(0);    
        transform-origin: top;
        transition: transform 0.3s ease;
      }
      &.toggled{
        background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23607D8B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-minus-square'%3E%3Crect x='3' y='3' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='8' y1='12' x2='16' y2='12'%3E%3C/line%3E%3C/svg%3E");
        padding-bottom: calc(0.125 * var(#{$universal-padding-var}));
        + pre.card-examples {
          position: relative;
          transform: scaleY(1);
        }
      }
    }
    pre.section {
      &.card-code {
        position: relative;
        margin-bottom: 0;
        padding-bottom: 0;
        padding-top: calc(3 * var(--universal-padding));
      }
      &.card-examples {
        margin-top: 0;
        margin-bottom: 0;
        border-radius: 0 0 calc(4 * var(#{$universal-border-radius-var})) calc(4 * var(#{$universal-border-radius-var}));
        padding-top: 0;
        &:before {
          content: '';
          display: block;
          position: absolute;
          top: 0;
          left: 0.5625rem;
          border-left: $__1px solid var(#{$collapse-color-var});
          height: calc(100% - 18px);
        }
      }
    }
    .copy-button-container {
      position: relative;
      z-index: 2;
      .copy-button {
        background: var(#{$copy-button-color-var});
        box-sizing: border-box;
        position: absolute;
        top: -1.75rem;
        right: 0;
        margin: calc(2 * var(#{$universal-margin-var}));
        padding: calc(2.5 * var(#{$universal-padding-var}));
        border-radius: 50%;
        border: 0;
        box-shadow: 0 2px 2px 0 rgba(0,0,0,0.14),0 3px 1px -2px rgba(0,0,0,0.12),0 1px 5px 0 rgba(0,0,0,0.2);
        transition: all 0.3s ease;
        cursor: pointer;
        background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23f0f0f0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-clipboard'%3E%3Cpath d='M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2'%3E%3C/path%3E%3Crect x='8' y='2' width='8' height='4' rx='1' ry='1'%3E%3C/rect%3E%3C/svg%3E");
        background-position: center center;
        background-repeat: no-repeat;
        &:hover, &:focus {
          background-color: var(#{$copy-button-hover-color-var});
          box-shadow: 0 3px 3px 0 rgba(0, 0, 0, 0.14), 0 1px 7px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -1px rgba(0, 0, 0, 0.2);
        }
        &:before {
          background: var(#{$back-color-var});
          position: absolute;
          top: -0.25rem;
          right: -0.25rem;
          content: '';
          display: block;
          box-sizing: border-box;
          padding: calc(2.5 * var(#{$universal-padding-var}));
          border-radius: 50%;
          border: 0.25rem solid var(#{$back-color-var});
          z-index: -1;
        }
      }
    }
    .corner {
      box-sizing: border-box;
      position: absolute;
      top: -0.5rem;
      right: -2.125rem;
      width: 4rem;
      height: 2rem;
      padding-top: 2rem;
      transform: rotate(45deg);
      text-align: center;
      font-size: 0.75rem;
      font-weight: 500;
      color: var(#{$back-color-var});
      box-shadow: 0 2px 2px 0 rgba(0,0,0,0.07),0 3px 1px -2px rgba(0,0,0,0.06),0 1px 5px 0 rgba(0,0,0,0.1);
      &.beginner {
        background: var(#{$beginner-color-var});
      }
      &.intermediate {
        background: var(#{$intermediate-color-var});
      }
      &.advanced {
        background: var(#{$advanced-color-var});
      }
    }
  }
}
// ===================================================
// Toast
// ===================================================
.toast {
  position: fixed;
  bottom: calc(var(#{$universal-margin-var}) * 2);
  margin-bottom: 0;
  font-size: 0.8125rem;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1111;
  color: var(#{$back-color-var});
  background: var(#{$fore-color-var});
  border-radius: calc(var(#{$universal-border-radius-var}) * 16);
  padding: var(#{$universal-padding-var}) calc(var(#{$universal-padding-var}) * 2);
  box-shadow: 0 2px 2px 0 rgba(0,0,0,0.14),0 3px 1px -2px rgba(0,0,0,0.12),0 1px 5px 0 rgba(0,0,0,0.2);
  transition: all 0.3s ease;
}
// ===================================================
// Navigation
// ===================================================
header {
  box-sizing: border-box;
  overflow: hidden;
  height: 3.5rem;
  position: fixed;
  width: 110%;
  top: 0;
  left: -5%;
  box-shadow: 0 2px 4px rgba(0,0,0,.5);
  z-index: 5;
  background: var(#{$header-back-color-var});
  transition: top 0.3s ease;
  h1 {
    &.logo {
      position: relative;
      top: 0;
      margin-top: 0;
      font-size: 1.625rem;
      text-align: center;
      // transition: top 0.3s ease;
    }
    a, a:link, a:visited {
      color: var(#{$header-fore-color-var});
      &:hover, &:focus {
        text-decoration: none;
      }
    }
    small {
      display: block;
      font-size: 0.875rem;
      color: var(#{$header-back-color-var});
      margin-top: 0.75rem;
    }
  }
  img {
    height: 3.5rem; 
    padding: 0.375rem; 
    box-sizing: border-box;
  }
  #title {
    position: relative;
    top: -1.125rem;
    @media screen and (max-width: 768px) { display: none; }
  }
}

nav {
  position: fixed;
  top: 6.5rem;
  left: -320px;
  width: 320px;
  transition: left 0.3s ease;
  z-index: 1100;
  height: calc(100vh - 6.5rem);
  box-sizing: border-box;
  display: block;
  background: var(#{$nav-back-color-var});
  border: 0;
  overflow-y: auto;
  @media screen and (max-width: 320px) {
    width: 100%;
  }
  @media screen and (min-width: #{$grid-medium-breakpoint}) {
    width: 33vw;
    left: -33vw;
  }
  @media screen and (min-width: #{$grid-large-breakpoint}) {
    width: 25vw;
    left: -25vw;
  }
  &.col-nav {
    box-shadow: 0 8px 17px 2px rgba(0,0,0,0.14),0 3px 14px 2px rgba(0,0,0,0.12),0 5px 5px -3px rgba(0,0,0,0.2);
    left: 0;
    // Also apply the main content style to the footer
    @media screen and (min-width: #{$grid-medium-breakpoint}) {
      + main.col-centered, + main.col-centered + footer.col-full-width {
        grid-column: 5/13;
      }
    }
    @media screen and (min-width: #{$grid-large-breakpoint}) {
      + main.col-centered  {
        grid-column: 4/12;
        padding-left: 8vw;
      }
      + main.col-centered + footer.col-full-width {
        grid-column: 4/13;
      }
    }
  }
  h4 {
    margin: 0;
    padding: calc(2.5 * var(#{$universal-padding-var})) calc(2 * var(#{$universal-padding-var})) calc(1 * var(#{$universal-padding-var})) calc(1 * var(#{$universal-padding-var}));
    color: var(#{$nav-fore-color-var});
    font-size: 1.5rem;
    &.collapse {
      display: block;
      cursor: pointer;
      background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23f0f0f0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-chevron-down'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
      //background-position: 0rem 1.25rem;
      background-position: right 0.5rem top 1.5rem;
      background-repeat: no-repeat;
      + ul {
        position: absolute;
        transform: scaleY(0);    
        transform-origin: top;
        transition: transform 0.3s ease;
      }
      &.toggled{
        background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23f0f0f0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-chevron-up'%3E%3Cpolyline points='18 15 12 9 6 15'%3E%3C/polyline%3E%3C/svg%3E");
        padding-bottom: calc(0.125 * var(#{$universal-padding-var}));
        + ul {
          position: relative;
          transform: scaleY(1);
        }
      }
    }
    + h4 {
      border-top: $__1px solid var(#{$nav-link-border-color-var});
    }
    > a {
      display: block;
      line-height: 1;
      &:hover, &:focus {
        text-decoration: none;
      }
    }
  }
  ul {
    width: 100%;
    margin-left: -0.75rem;
    background: var(#{$nav-back-color-var});
    + h4 {
      border-top: $__1px solid var(#{$nav-link-border-color-var});
    }
  }
  li {
    margin: calc(0.5 * var(#{$universal-margin-var}));
    margin-left: var(#{$universal-margin-var});
    margin-bottom: 0;
    padding: calc(2 * var(#{$universal-padding-var})) calc(1.5 * var(#{$universal-padding-var}));
    border-left: $__1px solid var(#{$nav-link-border-color-var});
    &:hover {
      text-decoration: none;
      background: var(#{$nav-link-hover-color-var});
    }
    + li {
      margin-top: 0;
    }
  }
  a {
    &:link, &:visited {
      color: var(#{$nav-link-fore-color-var});
    }
  }
  button.social {
    width: 33.333%;
    margin: 0;
    border: 0;
    border-radius: 0;
    box-sizing: border-box;
    height: 4rem;
    background-position: center center;
    background-repeat: no-repeat;
    cursor: pointer;
    &.fb {
      background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='%23f0f0f0' stroke='%23f0f0f0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-facebook'%3E%3Cpath d='M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z'%3E%3C/path%3E%3C/svg%3E");
      background-color: #1565c0;
    }
    &.instagram {
      background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23f0f0f0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-instagram'%3E%3Crect x='2' y='2' width='20' height='20' rx='5' ry='5'%3E%3C/rect%3E%3Cpath d='M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z'%3E%3C/path%3E%3Cline x1='17.5' y1='6.5' x2='17.5' y2='6.5'%3E%3C/line%3E%3C/svg%3E");
      background-color: #ec407a;
    }
    &.twitter {
      background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='%23f0f0f0' stroke='%23f0f0f0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-twitter'%3E%3Cpath d='M23 3a10.9 10.9 0 0 1-3.14 1.53 4.48 4.48 0 0 0-7.86 3v1A10.66 10.66 0 0 1 3 4s-4 9 5 13a11.64 11.64 0 0 1-7 2c9 5 20 0 20-11.5a4.5 4.5 0 0 0-.08-.83A7.72 7.72 0 0 0 23 3z'%3E%3C/path%3E%3C/svg%3E");
      background-color: #03a9f4;
    }
  }
}

[type="search"] {
  z-index: 1000;
  position: fixed;
  top: 3.5rem;
  height: 3rem;
  left: -320px;
  width: 320px;
  color: var(#{$search-fore-color-var});
  background: var(#{$search-back-color-var});
  outline: none;
  box-sizing: border-box;
  border: none;
  border-bottom: $__1px solid var(#{$search-border-color-var});
  margin-bottom: var(#{$universal-margin-var});
  padding: calc(2 * var(#{$universal-padding-var})) calc(1.5 * var(#{$universal-padding-var})) var(#{$universal-padding-var}) calc(1.5 * var(#{$universal-padding-var}));
  transition: all 0.3s ease;
  @media screen and (max-width: 320px) {
    width: 100%;
  }
  @media screen and (min-width: #{$grid-medium-breakpoint}) {
    width: 33vw;
    left: -33vw;
  }
  @media screen and (min-width: #{$grid-large-breakpoint}) {
    width: 25vw;
    left: -25vw;
  }
  &.col-nav {
    box-shadow: 0 8px 17px 2px rgba(0,0,0,0.14),0 3px 14px 2px rgba(0,0,0,0.12),0 5px 5px -3px rgba(0,0,0,0.2);
    left: 0;
    // Also apply the main content style to the footer
    @media screen and (min-width: #{$grid-medium-breakpoint}) {
      + main.col-centered, + main.col-centered + footer.col-full-width {
        grid-column: 5/13;
      }
    }
    @media screen and (min-width: #{$grid-large-breakpoint}) {
      + main.col-centered  {
        grid-column: 4/12;
        padding-left: 8vw;
      }
      + main.col-centered + footer.col-full-width {
        grid-column: 4/13;
      }
    }
  }
  &:hover, &:focus {
    border-bottom: $__1px solid var(#{$search-hover-border-color-var});
  }
  &:focus {
    box-shadow: 0 8px 17px 2px rgba(0,0,0,0.14),0 3px 14px 2px rgba(0,0,0,0.12),0 5px 5px -3px rgba(0,0,0,0.2), inset 0 0-$__1px 0 0 var(#{$search-hover-border-color-var});
  }
}

.menu-button {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  box-sizing: border-box;
  outline: none;
  height: 3.5rem;
  width: 3.5rem;
  border: 0;
  background: transparent;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23fafafa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-more-horizontal'%3E%3Ccircle cx='12' cy='12' r='1'%3E%3C/circle%3E%3Ccircle cx='19' cy='12' r='1'%3E%3C/circle%3E%3Ccircle cx='5' cy='12' r='1'%3E%3C/circle%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 0.875rem 0.875rem;
  cursor: pointer;
  transition: all 0.3s ease;
  &:hover {
    background-color: rgba(255,255,255, 0.08);
  }
  &.toggled {
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23fafafa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-more-vertical'%3E%3Ccircle cx='12' cy='12' r='1'%3E%3C/circle%3E%3Ccircle cx='12' cy='5' r='1'%3E%3C/circle%3E%3Ccircle cx='12' cy='19' r='1'%3E%3C/circle%3E%3C/svg%3E");
  }
}

footer {
  color: var(#{$footer-fore-color-var});
  background: var(#{$footer-back-color-var});
  padding-top: calc(2 * var(#{$universal-padding-var}));
  padding-bottom: calc(3 * var(#{$universal-padding-var}));
  margin-top: calc(6 * var(#{$universal-margin-var}));
  * {
    font-size: 0.875rem;
  }
  a, a:link, a:visited {
    color: var(#{$fore-color-var});
  }
}

.scroll-to-top {
  position: fixed;
  bottom: 1rem;
  right: 1.375rem;
  box-sizing: border-box;
  z-index: 1100;
  height: 2.75rem;
  width: 2.75rem;
  border: 0;
  border-radius: 100%;
  background: var(#{$scrolltop-button-color-var});
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23f0f0f0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-arrow-up'%3E%3Cline x1='12' y1='19' x2='12' y2='5'%3E%3C/line%3E%3Cpolyline points='5 12 12 5 19 12'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center center;
  cursor: pointer;
  box-shadow: 0 2px 2px 0 rgba(0,0,0,0.14),0 3px 1px -2px rgba(0,0,0,0.12),0 1px 5px 0 rgba(0,0,0,0.2);
  transition: all 0.3s ease;
  &:hover, &:focus {
    background-color: var(#{$scrolltop-button-hover-color-var});
    box-shadow: 0 3px 3px 0 rgba(0,0,0,0.14),0 1px 7px 0 rgba(0,0,0,0.12),0 3px 1px -1px rgba(0,0,0,0.2);
  }
}

// About page
.card.contributor > .section.button {
  font-size: 1rem;
  font-weight: 500;
  text-align: center;
  display: block;
  transition: all 0.3s ease;
  &:link, &:visited {
    color: var(#{$fore-color-var});
    &:hover {
      color: var(#{$a-link-color-var});
      text-decoration: none;
    }
  }
}
