/*
 * Global resets
 *
 * Update the foundational and global aspects of the page.
 */

/* Prevent scroll on narrow devices */
html,
body {
  overflow-x: hidden;
}

/*
 * Body resets
 *
 * Update the foundational and global aspects of the page.
 */

* {
  -webkit-box-sizing: border-box;
     -moz-box-sizing: border-box;
          box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  /* font-family: "PT Serif", Georgia, "Times New Roman", serif; */
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  /* font-size: 10px; */
  font-size: min(1.125rem, max(32vw, 1.25rem));  /* 18px */
  line-height: 1.5;
}
@media (min-width: 38em) {
  html {
    font-size: min(1.125rem, max(32vw, 1.25rem));  /* 18px */
  }
}

body {
  color: var(--text-fg);
  background-color: var(--text-bg);
  -webkit-text-size-adjust: 100%;
      -ms-text-size-adjust: 100%;
  counter-reset: sidenote-counter;
}

/* Links */
/* No `:visited` state is required by default (browsers will use `a`) */
a {
  color: var(--sol-blue);
  text-decoration: none;
}
a strong {
  color: inherit;
}
/* `:focus` is linked to `:hover` for basic accessibility */
a:hover,
a:focus {
  text-decoration: underline;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 400;  /* normal */
  line-height: 1.0;
  letter-spacing: -.025rem;
  margin-bottom: .5rem;
  color: var(--heading-fg);
  text-rendering: optimizeLegibility;
}
h1 {
  font-size: 2rem;
}
h2 {
  margin-top: 2rem;
  font-size: 1.5rem;
}
h3 {
  margin-top: 1.5rem;
  font-size: 1.25rem;
}
h4, h5, h6 {
  margin-top: 1rem;
  font-size: 1rem;
}
h4, h6 {
  font-style: italic;
}



/* Body text */
p {
  margin-top: 0;
  margin-bottom: 1rem;
  text-align: justify;
}

strong {
  color: var(--strong-fg);
}


/* Lists */
ul, ol, dl {
  margin-top: 0;
  margin-bottom: 1rem;
}

/* remove margin for nested lists */
li > ul {
  margin-bottom: 0;
}

dt {
  font-weight: bold;
}
dd {
  margin-bottom: .5rem;
}

/* Misc */
hr {
  position: relative;
  margin: 1.5rem 0;
  border: 0;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #fff;
}

abbr {
  font-size: 85%;
  font-weight: bold;
  color: #555;
  text-transform: uppercase;
}
abbr[title] {
  cursor: help;
  border-bottom: 1px dotted #e5e5e5;
}

/* Code */
code,
pre {
  font-family: Monaco, Menlo, "Courier New", monospace;
}
code {  /* in-line code */
  padding: .25em .5em;
  font-size: 80%;
  color: var(--sol-body);
  background-color: var(--sol-bg);
  border-radius: 3px;
}
pre {
  display: block;
  margin-top: 0;
  margin-bottom: 1rem;
  padding: 1rem;
  min-width: 85ch;
  /* width: 85ch; */  /* ignore width to get full width of container */
  font-size: 0.7rem;
  line-height: 1.4;
  white-space: pre;
  overflow-x: scroll;
  /* hide scrollbar */
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;     /* Firefox */
  ::-webkit-scrollbar { display: none; }  /* Chrome, Safari FIXME */
  ::-webkit-scrollbar-track { background: transparent; }
  background-color: var(--sol-bg);
}
pre code {  /* block code */
  padding: 0;
  font-size: 100%;
  color: inherit;
  background-color: transparent;
  white-space: pre-wrap;  /* potentially avoid scrollbar display */
}

/* Pygments via Jekyll */
.highlight {
  margin-bottom: 1rem;
  border-radius: 4px;
  white-space: pre;
  overflow-x: scroll;
}
.highlight pre {
  margin-bottom: 0;
}

/* Put the language in the top right corner */
div[data-lang] {
  position: relative;
}
div[data-lang]::before{
  content: attr(data-lang);  /* get the language from the data-lang attribute */
  position: absolute;
  top: 0;
  right: 5px;  /* adjust as needed */
  padding: 3px 5px;
  font-size: 0.8rem;
  font-style: italic;
  color: var(--sol-comment);
}

/* Gist via GitHub Pages */
.gist .gist-file {
  font-family: Menlo, Monaco, "Courier New", monospace !important;
}
.gist .markdown-body {
  padding: 15px;
}
.gist pre {
  padding: 0;
  background-color: transparent;
}
.gist .gist-file .gist-data {
  font-size: .8rem !important;
  line-height: 1.4;
}
.gist code {
  padding: 0;
  color: inherit;
  background-color: transparent;
  border-radius: 0;
}

/* Quotes */
blockquote {
  padding: .5rem 1rem;
  margin: .8rem 0;
  color: #7a7a7a;
  border-left: .25rem solid #e5e5e5;
}
blockquote p:last-child {
  margin-bottom: 0;
}
@media (min-width: 30em) {
  blockquote {
    padding-right: 5rem;
    padding-left: 1.25rem;
  }
}

img {
  display: block;
  max-width: 100%;
  margin: 0 0 1rem;
  border-radius: 5px;
}

/* Tables */
table {
  margin: auto;
  margin-bottom: 1rem;
  max-width: 100%;
  border: 1px solid var(--table-border);
  border-collapse: collapse;
}
td,
th {
  padding: .25rem .5rem;
  border: 1px solid var(--table-border);
}
tbody tr:nth-child(odd) td,
tbody tr:nth-child(odd) th {
  background-color: var(--table-row-hl);
}


/*
 * Custom type
 *
 * Extend paragraphs with `.lead` for larger introductory text.
 */

.lead {
  font-size: 1.25rem;
  font-weight: 300;
}


/*
 * Messages
 *
 * Show alert messages to users. You may add it to single elements like a `<p>`,
 * or to a parent if there are multiple elements to show.
 */

.message {
  margin-bottom: 1rem;
  padding: 1rem;
  color: var(--message-fg);
  background-color: var(--message-bg);
}


/*
 * Container
 *
 * Center the page content.
 */

.container {
  max-width: 730px;
  margin-left:  auto;
  margin-right: auto;
}

/* Large Screens */
@media (min-width: 56em) {
  .container {
    max-width: 730px;  /* rem * 16 = px */
  }
}

