@import url("https://fonts.googleapis.com/css2?family=Share+Tech+Mono&display=swap");

/* on narrow device, reduce margins */
@media (min-width: 940px) {
  .franklin-content {
    width: 100%;
  }
}

@media (min-width: 1024px) {
  .franklin-content {
    width: 75%;
    padding-left: 20%;
    padding-right: 5%;
  }
}

pre {
  font-size: 17px;
}

.franklin-content code {
  font-size: 14px;
}

.franklin-content .hljs {
  font-size: 14px;
}

blockquote {
  font-size: 90%;
}

.fndef-content {
  line-height: 1.5em;
}

.franklin-content h1 {
  padding-bottom: 0.5em;
  margin-top: 1.5em;
  margin-bottom: 1em;
}

/* Light mode heading color */
html:not([data-theme="dark"]) h1,
html:not([data-theme="dark"]) h2,
html:not([data-theme="dark"]) h3,
html:not([data-theme="dark"]) h4,
html:not([data-theme="dark"]) h5,
html:not([data-theme="dark"]) h6 {
  color: #315f97;
}

html:not([data-theme="dark"]) h1 a,
html:not([data-theme="dark"]) h2 a,
html:not([data-theme="dark"]) h3 a,
html:not([data-theme="dark"]) h4 a,
html:not([data-theme="dark"]) h5 a,
html:not([data-theme="dark"]) h6 a {
  color: #315f97 !important;
}

html:not([data-theme="dark"]) .page__content a,
html:not([data-theme="dark"]) .franklin-content a {
  color: #315f97;
}

html:not([data-theme="dark"]) .author__urls a {
  color: #315f97;
}

html:not([data-theme="dark"]) .author__urls a .fa-envelope {
  color: #494e52;
}

.franklin-content a {
  text-decoration: none;
}

/* Disable section heading anchor links */
.franklin-content .header-anchor {
  pointer-events: none;
  cursor: default;
  color: inherit;
  text-decoration: none;
}

/* For some reason,
 * `h1, h2, h3 { a { color: ... } a:visited { color: ... } }` didn't work.
 */
h1 a { color: #1c1c1c !important; }
h2 a { color: #1c1c1c !important; }
h3 a { color: #1c1c1c !important; }
h4 a { color: #1c1c1c !important; }
h5 a { color: #1c1c1c !important; }

h1 a:visited { color: #1c1c1c !important; }
h2 a:visited { color: #1c1c1c !important; }
h3 a:visited { color: #1c1c1c !important; }
h4 a:visited { color: #1c1c1c !important; }
h5 a:visited { color: #1c1c1c !important; }

/* Header text color */
.greedy-nav a,
.greedy-nav a.site-title {
  color: #315f97;
}

.greedy-nav a:hover {
  color: #2a4f7d;
}

/* Theme toggle button */
.theme-toggle {
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  margin-left: 0.5rem;
  color: inherit;
}

.theme-toggle i {
  font-size: 1rem;
}

html[data-theme="dark"] .theme-toggle {
  color: #ff2bd6;
}

/* Dark mode */
html[data-theme="dark"] body {
  background-color: #000000;
  color: #39ff14;
  font-family: "Share Tech Mono", "Fira Mono", "Menlo", "Consolas", "Liberation Mono", monospace;
}

html[data-theme="dark"] {
  background-color: #000000;
}

html[data-theme="dark"] .initial-content,
html[data-theme="dark"] #main {
  background-color: #000000;
}

html[data-theme="dark"] .masthead,
html[data-theme="dark"] .greedy-nav {
  background-color: #000000;
  border-bottom-color: #000000;
}

html[data-theme="dark"] .greedy-nav a,
html[data-theme="dark"] .greedy-nav a.site-title {
  color: #ff2bd6;
  font-family: "Share Tech Mono", "Fira Mono", "Menlo", "Consolas", "Liberation Mono", monospace;
}

html[data-theme="dark"] .greedy-nav a:hover {
  color: #ff66e6;
}

html[data-theme="dark"] .page__content a {
  color: #ff2bd6;
}

html[data-theme="dark"] .franklin-content a {
  color: #ff2bd6;
}

html[data-theme="dark"] .page__footer {
  background-color: #000000;
  color: #39ff14;
}

html[data-theme="dark"] .page__footer a {
  color: #ff2bd6;
}

html[data-theme="dark"] .page__footer .fas,
html[data-theme="dark"] .page__footer .fab,
html[data-theme="dark"] .page__footer .far,
html[data-theme="dark"] .page__footer .fal {
  color: #39ff14 !important;
}

html[data-theme="dark"] .page__footer .svg-inline--fa,
html[data-theme="dark"] .page__footer svg {
  color: #39ff14 !important;
  fill: #39ff14 !important;
}

html[data-theme="dark"] .page-foot {
  color: #39ff14;
  border-top-color: #39ff14;
  font-family: "Share Tech Mono", "Fira Mono", "Menlo", "Consolas", "Liberation Mono", monospace;
  background-color: #000000;
  margin-bottom: 0;
}

html[data-theme="dark"] .author__urls a {
  color: #ff2bd6;
}

html[data-theme="dark"] .author__urls .fa-linkedin {
  color: #39ff14;
}

html[data-theme="dark"] .author__urls .fa-orcid,
html[data-theme="dark"] .author__urls .fa-envelope,
html[data-theme="dark"] .author__urls .fa-github {
  color: #39ff14;
}

html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] h4,
html[data-theme="dark"] h5,
html[data-theme="dark"] h6 {
  color: #f6ff00;
  font-family: "Share Tech Mono", "Fira Mono", "Menlo", "Consolas", "Liberation Mono", monospace;
}

html[data-theme="dark"] .franklin-content h1,
html[data-theme="dark"] .franklin-content h2,
html[data-theme="dark"] .franklin-content h3,
html[data-theme="dark"] .franklin-content h4,
html[data-theme="dark"] .franklin-content h5,
html[data-theme="dark"] .franklin-content h6 {
  color: #f6ff00 !important;
}

/* Franklin wraps heading text in a (disabled) anchor, so the heading colour has
 * to be repeated here, otherwise headings pick up the pink link colour.
 */
html[data-theme="dark"] .franklin-content h1 a,
html[data-theme="dark"] .franklin-content h2 a,
html[data-theme="dark"] .franklin-content h3 a,
html[data-theme="dark"] .franklin-content h4 a,
html[data-theme="dark"] .franklin-content h5 a,
html[data-theme="dark"] .franklin-content h6 a,
html[data-theme="dark"] .franklin-content .header-anchor {
  color: #f6ff00 !important;
}

html[data-theme="dark"] .author__avatar img {
  border-radius: 0;
}

html[data-theme="dark"] .site-title,
html[data-theme="dark"] .page__title,
html[data-theme="dark"] .author__name,
html[data-theme="dark"] .author__bio,
html[data-theme="dark"] .author__urls,
html[data-theme="dark"] .author__urls li {
  font-family: "Share Tech Mono", "Fira Mono", "Menlo", "Consolas", "Liberation Mono", monospace;
}

html[data-theme="dark"] pre,
html[data-theme="dark"] code {
  background-color: #0b0b0b;
  color: #39ff14;
  border: 1px solid #1f1f1f;
}
