/*
 * Firn's default style sheet uses a modified version of:
 * MVP.css v1.6.2 - https://github.com/andybrewer/mvp
 * Change the default variables below to find a styling you like.
 */
@import url("https://fonts.googleapis.com/css2?family=Inconsolata:wght@400;700&display=swap");

/* Reset / Overrides */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* CSS Variables (light mode) */

:root {
  --bc-tb: #fafafa;
  --bc-block: #84888b;
  --clr: #383a42;
  --clr-tb-hd: initial;
  --clr-code: initial;
  --bg: #f0f0f0;
  --bg-code: #e7e7e7;
  --bg-tb-hd: #e7e7e7;
  --bg-block: #e7e7e7;
  --clr-link: #b751b6;
  --clr-title: #383a42;
  --clr-todo: #50a14f;
  --bg-todo: initial;
  --clr-done: #9ca0a4;
  --bg-done: initial;
  --ts-clr: #e45649;
  --mg: 20px;
  --w-toc: 300px;
  --bg-keyword: initial;
  --clr-keyword: #e45649;
  --bg-constant: initial;
  --clr-constant: #b751b6;
  --bg-comment: initial;
  --clr-comment: #9ca0a4;
  --bg-comment-delimiter: initial;
  --clr-comment-delimiter: initial;
  --bg-function: initial;
  --clr-function: #a626a4;
  --bg-variable: initial;
  --clr-variable: #6a1868;
  --bg-preprocessor: initial;
  --clr-preprocessor: #4078f2;
  --bg-doc: initial;
  --clr-doc: #84888b;
  --bg-builtin: initial;
  --clr-builtin: #a626a4;
  --bg-string: initial;
  --clr-string: #50a14f;

  --border-radius: 4px;
  --box-shadow: 2px 2px 10px;
  --font-family: "Inconsolata", "Arial", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  --hover-brightness: 1.2;
  --justify-important: center;
  --justify-normal: left;
  --line-height: 1.2;
  --width-card-wide: 800px;
  --width-content: 48rem;

  /* Currently, Firn only supports 'todo | done' keywords. */
  --keyword-active: #2ecc71; /* For "active" Todo keywords. */
  --keyword-done: #bdc3c7; /* For "done type keywords" */
  --keyword-size: xx-small;

  /* Headline priorities ([#A] [#B] etc) */
  --priority-a-bg: #c0392b;
  --priority-b-bg: #3498db;
  --priority-c-bg: #2ecc71;
  --priority-size: xx-small;

  /* Headline Tags (:my-tag: :unfinished: etc)*/
  --tag-size: x-small;
  --tag-bg: #ecf0f1;
}

/* CSS Variables (dark mode) */
@media (prefers-color-scheme: dark) {
  :root {
    --bc-tb: #282c34;
    --bc-block: #83898d;
    --clr: #bbc2cf;
    --clr-code: #bbc2cf;
    --clr-tb-hd: #bbc2cf;
    --bg: #21242b;
    --bg-tb-hd: #1c1e24;
    --bg-code: #1c1e24;
    --bg-block: #23272e;
    --clr-link: #a9a1e1;
    --clr-title: #bbc2cf;
    --clr-todo: #98be65;
    --bg-todo: initial;
    --clr-done: #5B6268;
    --bg-done: initial;
    --ts-clr: #51afef;
    --mg: 20px;
    --w-toc: 300px;
    --bg-keyword: initial;
    --clr-keyword: #51afef;
    --bg-constant: initial;
    --clr-constant: #a9a1e1;
    --bg-comment: initial;
    --clr-comment: #5B6268;
    --bg-comment-delimiter: initial;
    --clr-comment-delimiter: initial;
    --bg-function: initial;
    --clr-function: #c678dd;
    --bg-variable: initial;
    --clr-variable: #dcaeea;
    --bg-preprocessor: initial;
    --clr-preprocessor: #51afef;
    --bg-doc: initial;
    --clr-doc: #83898d;
    --bg-builtin: initial;
    --clr-builtin: #c678dd;
    --bg-string: initial;
    --clr-string: #98be65;
  }
}

/* Layout */

body {
  background: var(--bg);
  color: var(--clr);
  font-family: var(--font-family);
  line-height: var(--line-height);
  margin: 0;
  overflow-x: hidden;
}

footer,
main {
  margin: 0 auto;
}
.backlinks {
filter: opacity(0.5);
}

.content {
  max-width: var(--width-content);
  margin: 0 auto;
  padding: 32px;
}

hr {
	height: 0;
	color: inherit;
}

/* Headers */
article header,
div header,
main header {
  padding-top: 0;
}

/* Typography */
code,
samp {
  color: var(--clr-code);
  background: var(--bg-code);
  border-radius: var(--border-radius);
  font-family: "Inconsolata";
  display: inline-block;
  margin: 0 0.1rem;
  padding: 0.1rem 0.4rem;
}

details {
  margin: 1.3rem 0;
}

details summary {
  font-weight: bold;
  cursor: pointer;
  padding: 0px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 1em 0;
  font-weight: bolder;
  color: var(--clr-string);

}

h1 {
  font-size: 2rem;
  text-align: center;
}

h2 {
  font-size: 1.5rem;
}
h3 {
  font-size: 1.17rem;
}

h4 {
  font-size: 1rem;
}
mark {
  padding: 0.1rem;
}

ol,
ul {
  margin: 0.125rem 0;
  padding-left: 1.25rem;
}

ol li,
ul li {
  padding: 0.125rem 0;
}

p {
  margin: 1rem 0;
  padding: 0;
}

pre {
  margin: 1rem 0;
  padding: 1rem 0;
}

pre code,
pre samp {
  color: var(--clr-code);
  background: var(--bg-code);
  display: block;
  padding: 0.5rem 1rem;
  overflow-x: auto;
}

small {
  color: var(--clr-comment);
}

sup {
  border-radius: var(--border-radius);
  color: var(--color-bg);
  font-size: xx-small;
  margin: 0.2rem;
  padding: 0.2rem 0.3rem;
  position: relative;
  top: -2px;
}

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

a:hover {
  filter: brightness(var(--hover-brightness));
  text-decoration: underline;
}

/* -- Images */

figure {
  margin: 0;
  padding: 0;
}

img {
  width: 600px;
  max-width: 90%;
}

figure figcaption {
  color: var(--clr-comment);
}

/* -- Tables */
table {
  border: 2px solid var(--bc-tb);
  border-radius: var(--border-radius);
  border-spacing: 0;
  display: inline-block;
  max-width: 100%;
  overflow-x: auto;
  padding: 0;
  white-space: nowrap;
}

table td,
table th,
table tr {
  padding: 0.4rem 0.8rem;
  font-size: 0.9em;
}

/* Firn currently can't discern if a table has a <th>,*/
/* so we style the first element.*/
table tr:first-child {
  color: var(--clr-tb-hd);
  background: var(--bg-tb-hd);
  border-collapse: collapse;
  border-radius: var(--border-radius);
  border: thin solid var(--bc-tb);
  margin: 0;
  padding: 0;
}

table thead th:first-child {
  border-top-left-radius: var(--border-radius);
}

table thead th:last-child {
  border-top-right-radius: var(--border-radius);
}

table thead th:first-child,
table tr td:first-child {
  text-align: var(--justify-normal);
}

table tr:nth-child(even) {
  background-color: var(--bg-code);
}

blockquote {
  display: block;
  font-style: italic;
  line-height: var(--line-height);
  padding: 1.0rem;
  background: var(--bg-doc);
  margin: 0;
  border-left: 2px solid var(--clr-function);
}

/* -- Firn Org Tweaks ---- */

/* Because firn spits out nested content (for example, the parser spits out p
   tags within li tags), sometimes you may need to style the children of html
   elements to get the spacing you like.*/

li > p {
  margin: 0;
  padding: 0;
}

/* -- Firn "Components" ---- */

/* Images */
.firn-img-with-caption {
  display: flex;
  flex-direction: column;
}

.firn-img-with-caption img {
  align-self: flex-start;
}

.firn-img-caption {
  font-style: italic;
}

/* Headline Keywords and Priority */

/* This applies to ALL h1-h6 */
.firn-headline {
  display: flex;
  align-items: center; /* center align useful for aligning tags + keywords */
}

.firn-headline-section {
}

.firn-headline-priority {
  background-color: var(--color-secondary);
  border-radius: var(--border-radius);
  color: white;
  font-size: xx-small;
  font-weight: bold;
  margin-right: 0.5rem;
  padding: 0.2rem 0.3rem;
  font-size: var(--priority-size);
}

.firn-headline-priority__A {
  background-color: var(--priority-a-bg);
}

.firn-headline-priority__B {
  background-color: var(--priority-b-bg);
  font-size: var(--priority-size);
}

.firn-headline-priority__C {
  background-color: var(--priority-c-bg);
  font-size: var(--priority-size);
}

.firn-headline-keyword__DONE {
  color: var(--clr-done);
  background: var(--bg-done);
  border-radius: var(--border-radius);
  font-size: var(--keyword-size);
  font-weight: bold;
  margin-right: 0.5rem;
  padding: 0.2rem 0.3rem;
  position: relative;
}

.firn-headline-keyword__TODO {
  border-radius: var(--border-radius);
  color: var(--clr-todo);
  background: var(--bg-todo);
  font-size: xx-small;
  font-weight: bold;
  margin-right: 0.5rem;
  padding: 0.2rem 0.3rem;
  position: relative;
}

.firn-headline-text {
  display: flex;
  flex: 1;
  align-items: center;
}

.firn-cookie {
}

/* Org Footnotes */

.firn-footnote-ref {
}

.firn-footnote-def {
}

/* Org Property Drawers */

.firn-properties {
  background-color: var(--color-bg-secondary);
}

.firn-property-key {
}

.firn-property-value {
}

/* Styling for internal and external links */

.firn-external {
color: var(--clr-preprocessor);
}


.firn-internal {
	color: var(--clr-link);
}

/* If you choose to render :PROPERTIES: drawers, you may style them: */
.firn-properties {
  background: var(--bg-code);
  padding: 8px;
}
.firn-property-key {
}
.firn-property-value {
}

/* -- Folding ---------------------------------------------------------------- */

/* Folding leverages html <details> and <summary> tags to emulate the folding
   feature of org-mode. This is a bit hacky; we hide the regular heading (so
   that it still exists so it is anchorable, still has tags, priority etc).
*/

/* Headline text is hidden when using folding; it is instead rendered in a
   <summary> tag. */
.firn-headline-text-hidden {
  visibility: collapse;
  overflow: auto;
  flex: 1;
}

/* This moves tags, priority, other non-content text in headings up to
   approximately where the <summary> tag is. */
.firn-headline-hidden {
  margin-top: -2.6em;
  justify-content: right;
  display: flex;
}

/* Sitemap, breadcrumbs, siblings files, related files. ---------------------- */

.firn-sitemap {
}

.firn-sitemap-item--parent {
  list-style-type: none;
}

.firn-breadcrumbs {
}

.firn-file-navigation {
  display: flex;
  justify-content: space-between;
}

/* Tags (Firn / Org tags) ---------------------------------------------------- */

/* There are two types of tags when using Firn: "org-tags" and "firn-tags"
/* org-tags are your standard org-mode heading tags:  ":mytag:"*/
/* firn-tags are file-based tags that allows tagging entire files.*/

/* Firn tags (tags that are per file basis.) */

.firn-file-tags {
}
.firn-file-tags-container {
}
.firn-file-tag-name {
  font-size: 1.2em;
  margin: 1em 0;
  text-transform: capitalize;
}
.firn-file-tag-list {
}
.firn-file-tag-item {
}
.firn-file-tag-link {
}

/* Org tags (tags that are per heading basis.) */

/* How an org tag (ex - `:mytag:`) looks when rendered alongside an org heading. */
.firn-org-tag {
  background-color: var(--tag-bg);
  border-radius: var(--border-radius);
  color: var(--color-text);
  font-size: var(--tag-size);
  font-weight: 400;
  margin: 0 4px;
  padding: 0.2rem 0.4rem;
}

.firn-org-tag:hover {
  filter: none;
}

/* Optional: Adds a "#" before an org-tag */
.firn-org-tag::before {
  content: "#";
}

/* The following css classes style the result of rendering your org-tags list via*/
/* `(render :org-tags)` */
.firn-org-tags {
}
.firn-org-tags-container {
}
.firn-org-tag-name {
  font-size: 1.2em;
  margin: 1em 0;
  text-transform: capitalize;
}
.firn-org-tag-list {
}
.firn-org-tag-item {
}
.firn-org-tag-link {
}

.firn-backlinks {
  filter: opacity(0.5);
}

p.frontmatter {
  margin: 0;
  font-size: 0.8rem;
  color: var(--clr-comment);
}
.firn-link-disabled {
  color: red; /*broken link, or maybe link to something private*/
}


.nav {
  align-items: center;
  background: var(--bg-code);
  display: flex;
  justify-content: flex-start;
  padding: 8px 0px;
  height: var(--nav-height);
  top: 0;
  width: 100%;
  z-index: 2;
  border-bottom: 1px solid var(--clr-function);
}

.nav-links-item {
  padding: 0 8px;
  color: var(--clr-function);
}
