/* * Variables */

:root {
  /* COLORS */
  --bg-light: #20232c;
  --bg:       #14151e;
  --bg-dark:  #0f111a;
  --fg-light: #b8c6d5;
  --fg:       #DFECEB;
  --fg-dark:  #dfd7b9;

  --h1:       #c0d1cc;
  --h2:       #a0b9ba;
  --h3:       #88A2B0;
  --h4:       #768a9e;
  --link:     #91a1d3;
  --tag:      #9dbbae;

  --red:      #ff6a7a;
  --green:    #a0e0a0;
  --yellow:   #c0a38a;
  --orange:   #df9080;
  --blue:     #6a9fff;
  --magenta:  #e580e0;
  --cyan:     #4fbaef;
  --purple:   #af85ea;

  /* FONTS */
  --font-mono:  "DejaVu Sans Mono", "Noto Sans Mono", monospace;
  --font-sans:  "DejaVu Sans", "Noto Sans", sans;
  --font-serif: "DejaVu Serif", "Noto Serif", serif;
}


/* * Main */

html {
  font-family: var(--font-sans);
}

body {
  background-color: var(--bg);
  color: var(--fg);
  margin: 0 auto;
  max-width: 45em;
  overflow-wrap: break-word;
}

a {
  color: var(--link);
  font-weight: normal;
  text-decoration: underline;
}

a:visited {
  color: var(--purple);
}

a:hover {
  color: var(--fg-light);
  text-decoration: underline;
}

a:empty:before {
  content: "#";
}

a:empty {
  visibility: hidden;
  padding-left: 0.25em;
}

:hover > a:empty {
  visibility: visible;
}

.anchor {
    visibility: hidden;
}

:hover > .anchor {
    visibility: visible;
}

h1, h2, h3, h4, h5, h6 {
  padding: 0.75em 0 0 0;
}

h1 {
  color: var(--h1);
  font-size: 2.2em;
}

h2 {
  color: var(--h2);
  font-size: 1.7em;
}

h3 {
  color: var(--h3);
  font-size: 1.4em;
}

h4, h5, h6 {
  color: var(--h4);
  font-size: 1.3em;
}

ul {
  padding: 0.25em 2em;
}

li, dd, dt {
  padding: 0.15em 0;
}

dt a {
  font-weight: bold;
}

blockquote, code, pre {
  background-color: var(--bg-dark);
  border-radius: 0.25em;
  color: var(--fg-light);
  font-size: 1em;
  font-style: normal;
  margin: 1.5em 0em;
  padding: 1em;
}

blockquote {
  background-color: var(--bg-light);
}

blockquote p {
  margin: 0;
  padding: 0 0 0.5em;
}

code {
  color: var(--green);
  font-family: var(--font-mono);
  padding: 0.1em 0.25em 0.2em;
  margin: 0;
}

pre {
  font-family: var(--font-mono);
  line-height: 1.25em;
  white-space: pre-wrap;
}

pre.src { overflow: auto; position: relative; }
pre.src code {
  color: var(--fg-light);
  font-size: 0.9em;
  padding: 0;
}

pre.src:before {
  color: var(--tag);
  display: none;
  font-size: 0.7em;
  padding: 0;
  position: absolute;
  right: 1em;
  top: 0.2em;
}

pre.src:hover:before { display: inline; }


/* * Sections */

#preamble, #postamble {
  font-family: var(--font-mono);
  margin: 0em 0.5em 2em;
  text-align: left;
}

#preamble {
  display: flex;
  justify-content: space-between;
  padding: 1em 0em;
  border-bottom: 0em solid var(--bg-light);
}

#preamble p {
  color: var(--fg-light);
  font-size: 1em;
  padding: 0;
  margin: 0;
}

#preamble ul {
  margin: 0;
  padding: 0;
}

#preamble nav li {
  display: inline;
}

#preamble nav li + li:before{
  content: "· ";
  padding: 0 0.25em;
}

#preamble a, #postamble a {
  text-decoration: none;
}

#preamble a, #postamble a {
  color: var(--link);
}

#preamble a:hover, #postamble a:hover {
  color: var(--green);
  text-decoration: underline;
}

#postamble {
  border-top: 0.1em solid var(--bg-light);
  padding-top: 1em;
  text-align: left;
}

#postamble #creator {
  color: var(--fg-light);
  font-size: 0.8em;
}


/* ** Content */

#content {
  line-height: 1.6em;
  margin-bottom: 2em;
  padding: 0.5em;
  padding-top: 0;
}

#content header {
  font-family: var(--font-mono);
}

/* ** Entry */

.title {
  font-size: 2em;
  line-height: 1.25em;
  padding: 0.5em 0;
  margin: 0;
}

.subtitle {
  font-size: 1.25em;
  padding: 0.5em 0;
  margin: 0;
}

#entry-metadata {
  font-family: var(--font-mono);
  font-size: 0.9em;
  color: var(--fg-light);
  padding: 1em 0;
}

#entry-metadata .author {
  font-weight: bold;
}

#footnotes {
  padding-top: 1em;
}

.footnotes {
  font-size: 1.3em;
}

.entry-tags {
  background-color: var(--bg-dark);
  border-radius: 0.3em;
  color: var(--tag);
  font-family: var(--font-mono);
  font-size: 0.9em;
  padding: 0.5em;
  margin-right: 0.25em;
  text-decoration: none;
}

a.entry-tags {
  color: var(--tag);
}

a.entry-tags:hover {
  color: var(--fg-dark);
  background-color: var(--bg-light);
  text-decoration: none;
}

#entry-tags-list {
  padding: 2em 0em 1em;
}


/* ** Sitemap */

.sitemap-title {
  font-family: var(--font-mono);
  font-size: 1.25em;
  font-weight: bold;
}

.sitemap-title a {
  font-weight: bold;
  text-decoration: none;
}

.sitemap-title a:visited {
  color: var(--link);
}

.sitemap-title a:hover {
  color: var(--fg-light);
  text-decoration: underline;
}

.sitemap a {
  font-size: 1.25em;
  font-weight: bold;
  text-decoration: none;
}

.sitemap a:hover {
  text-decoration: underline;
}

ul.sitemap {
  list-style: none;
  padding: 0em 1em;
}

.sitemap ul {
  list-style-type: none;
  padding: 0.5em 0.5em 1em;
}

.sitemap li {
  padding: 0.25em;
}

.sitemap .entry-date {
  color: var(--fg-light);
  font-family: var(--font-mono);
  padding-right: 0.5em;
}

.sitemap .entry-tags a {
  font-size: 0.9em;
  font-weight: normal;
  text-decoration: none;
}

/* ** Journal/Now */

article.journal {
  background-color: var(--bg-dark);
  border-radius: 0.5em;
  color: var(--fg-dark);
  font-family: var(--font-mono);
  padding: 0.5em 2em;
  margin: 2em 0em;
}

article.journal h2 {
  color: var(--tag);
  font-size: 1em;
  font-weight: normal;
  padding: 0.5em 0 0;
  margin: 0;
}

/* ** Video */

.video-container {
  width: 100%;
  aspect-ratio: 16 / 9;
}

.video {
  width: 100%;
  height: 100%;
}

/* ** Org elements */

.todo {
  color: var(--red);
  font-family: var(--font-mono);
}

.done {
  color: var(--green);
  font-family: var(--font-mono);
}

.priority {
  color: var(--orange);
  font-family: var(--font-mono);
}

.tag {
  background-color: var(--bg-light);
  border-radius: 0.25em;
  color: var(--blue);
  font-family: var(--font-mono);
  font-weight: bold;
  padding: 0.25em;
  vertical-align: top;
}

.timestamp {
  color: var(--fg-light);
}

.footref, .footnum {
  font-weight: bold;
}


/* ** Org defaults */

/* Copied from ox-html.el variable org-html-style-default */

/* #content { max-width: 60em; margin: auto; } */
/* .title  { text-align: center; */
/*            margin-bottom: .2em; } */
/* .subtitle { text-align: center; */
/*             font-size: medium; */
/*             font-weight: bold; */
/*             margin-top:0; } */
/* .todo   { font-family: monospace; color: red; } */
/* .done   { font-family: monospace; color: green; } */

/* .tag    { background-color: #eee; font-family: monospace; */
/*           padding: 2px; font-size: 80%; font-weight: normal; } */

/* .timestamp { color: #bebebe; } */
.timestamp-kwd { color: #5f9ea0; }
.org-right  { margin-left: auto; margin-right: 0px;  text-align: right; }
.org-left   { margin-left: 0px;  margin-right: auto; text-align: left; }
.org-center { margin-left: auto; margin-right: auto; text-align: center; }
.underline { text-decoration: underline; }
/* #postamble p, #preamble p { font-size: 90%; margin: .2em; } */
p.verse { margin-left: 3%; }

table { border-collapse:collapse; }
caption.t-above { caption-side: top; }
caption.t-bottom { caption-side: bottom; }
td, th { vertical-align:top;  }
th.org-right  { text-align: center;  }
th.org-left   { text-align: center;   }
th.org-center { text-align: center; }
td.org-right  { text-align: right;  }
td.org-left   { text-align: left;   }
td.org-center { text-align: center; }
dt { font-weight: bold; }
.footpara { display: inline; }
.footdef  { margin-bottom: 1em; }
.figure { padding: 1em; }
.figure p { text-align: center; }
.equation-container {
  display: table;
  text-align: center;
  width: 100%;
}
.equation {
  vertical-align: middle;
}
.equation-label {
  display: table-cell;
  text-align: right;
  vertical-align: middle;
}
.inlinetask {
  padding: 10px;
  border: 2px solid gray;
  margin: 10px;
  background: #ffffcc;
}
#org-div-home-and-up
 { text-align: right; font-size: 70%; white-space: nowrap; }
textarea { overflow-x: auto; }
.linenr { font-size: smaller }
.code-highlighted { background-color: #ffff00; }
.org-info-js_info-navigation { border-style: none; }
#org-info-js_console-label
  { font-size: 10px; font-weight: bold; white-space: nowrap; }
.org-info-js_search-highlight
  { background-color: #ffff00; color: #000000; font-weight: bold; }
.org-svg { }


/* ** Org source code blocks */

.org-builtin {
  color: var(--magenta);
}

.org-comment, .org-comment-delimiter,
.custom, .custom-1, .custom-2, .custom-3, .custom-4  {
  color: var(--yellow);
}

.org-constant {
  color: var(--cyan);
}

.org-doc {
  color: var(--green);
}

.org-function-name {
  color: var(--red);
  font-weight: bold;
}

.org-hl-todo {
  color: var(--red);
  font-weight: bold;
}

.org-keyword {
  color: var(--cyan);
}

.org-string {
  color: var(--blue);
}

.org-variable-name {
  color: var(--purple);
}

/* ** Languages per Org manual */
pre.src-asymptote:before { content: 'Asymptote'; }
pre.src-awk:before { content: 'Awk'; }
pre.src-authinfo::before { content: 'Authinfo'; }
pre.src-C:before { content: 'C'; }
/* pre.src-C++ doesn't work in CSS */
pre.src-clojure:before { content: 'Clojure'; }
pre.src-css:before { content: 'CSS'; }
pre.src-D:before { content: 'D'; }
pre.src-ditaa:before { content: 'ditaa'; }
pre.src-dot:before { content: 'Graphviz'; }
pre.src-calc:before { content: 'Emacs Calc'; }
pre.src-emacs-lisp:before { content: 'Emacs Lisp'; }
pre.src-fortran:before { content: 'Fortran'; }
pre.src-gnuplot:before { content: 'gnuplot'; }
pre.src-haskell:before { content: 'Haskell'; }
pre.src-hledger:before { content: 'hledger'; }
pre.src-java:before { content: 'Java'; }
pre.src-js:before { content: 'Javascript'; }
pre.src-latex:before { content: 'LaTeX'; }
pre.src-ledger:before { content: 'Ledger'; }
pre.src-lisp:before { content: 'Lisp'; }
pre.src-lilypond:before { content: 'Lilypond'; }
pre.src-lua:before { content: 'Lua'; }
pre.src-matlab:before { content: 'MATLAB'; }
pre.src-mscgen:before { content: 'Mscgen'; }
pre.src-ocaml:before { content: 'Objective Caml'; }
pre.src-octave:before { content: 'Octave'; }
pre.src-org:before { content: 'Org mode'; }
pre.src-oz:before { content: 'OZ'; }
pre.src-plantuml:before { content: 'Plantuml'; }
pre.src-processing:before { content: 'Processing.js'; }
pre.src-python:before { content: 'Python'; }
pre.src-R:before { content: 'R'; }
pre.src-ruby:before { content: 'Ruby'; }
pre.src-sass:before { content: 'Sass'; }
pre.src-scheme:before { content: 'Scheme'; }
pre.src-screen:before { content: 'Gnu Screen'; }
pre.src-sed:before { content: 'Sed'; }
pre.src-sh:before { content: 'shell'; }
pre.src-sql:before { content: 'SQL'; }
pre.src-sqlite:before { content: 'SQLite'; }
/* additional languages in org.el's org-babel-load-languages alist */
pre.src-forth:before { content: 'Forth'; }
pre.src-io:before { content: 'IO'; }
pre.src-J:before { content: 'J'; }
pre.src-makefile:before { content: 'Makefile'; }
pre.src-maxima:before { content: 'Maxima'; }
pre.src-perl:before { content: 'Perl'; }
pre.src-picolisp:before { content: 'Pico Lisp'; }
pre.src-scala:before { content: 'Scala'; }
pre.src-shell:before { content: 'Shell Script'; }
pre.src-ebnf2ps:before { content: 'ebfn2ps'; }
/* additional language identifiers per "defun org-babel-execute"
     in ob-*.el */
pre.src-cpp:before  { content: 'C++'; }
pre.src-abc:before  { content: 'ABC'; }
pre.src-coq:before  { content: 'Coq'; }
pre.src-groovy:before  { content: 'Groovy'; }
/* additional language identifiers from org-babel-shell-names in
   ob-shell.el: ob-shell is the only babel language using a lambda to put
   the execution function name together. */
pre.src-bash:before  { content: 'bash'; }
pre.src-csh:before  { content: 'csh'; }
pre.src-ash:before  { content: 'ash'; }
pre.src-dash:before  { content: 'dash'; }
pre.src-ksh:before  { content: 'ksh'; }
pre.src-mksh:before  { content: 'mksh'; }
pre.src-posh:before  { content: 'posh'; }
/* Additional Emacs modes also supported by the LaTeX listings package */
pre.src-ada:before { content: 'Ada'; }
pre.src-asm:before { content: 'Assembler'; }
pre.src-caml:before { content: 'Caml'; }
pre.src-delphi:before { content: 'Delphi'; }
pre.src-html:before { content: 'HTML'; }
pre.src-idl:before { content: 'IDL'; }
pre.src-mercury:before { content: 'Mercury'; }
pre.src-metapost:before { content: 'MetaPost'; }
pre.src-modula-2:before { content: 'Modula-2'; }
pre.src-pascal:before { content: 'Pascal'; }
pre.src-ps:before { content: 'PostScript'; }
pre.src-prolog:before { content: 'Prolog'; }
pre.src-simula:before { content: 'Simula'; }
pre.src-tcl:before { content: 'tcl'; }
pre.src-tex:before { content: 'TeX'; }
pre.src-plain-tex:before { content: 'Plain TeX'; }
pre.src-verilog:before { content: 'Verilog'; }
pre.src-vhdl:before { content: 'VHDL'; }
pre.src-xml:before { content: 'XML'; }
pre.src-nxml:before { content: 'XML'; }
/* add a generic configuration mode; LaTeX export needs an additional
   (add-to-list 'org-latex-listings-langs '(conf " ")) in .emacs */
pre.src-conf:before { content: 'Configuration File'; }
