/* light mode */
:root {
    --red:    #b30077;
    --orange: #ffa500;
    --yellow: #fceba3;
    --green:  #008888;
    --cyan:   #00ffff;
    --blue:   #0054ad;
    --purple: #9370db;
    --pink:   #faaed0;
    --grey:   #505868;
    --black:  #444;
    --white:  #eee;
}

html {
    font-family: "Times New Roman", Times, serif;
    flex-direction: row;
    margin: 0 auto;
    margin-bottom: 50px;
    padding: 0;
    min-height: calc(100vh - 200px);
    max-width: 720px;
}

body {
    display: flex;
    flex-direction: column;
    padding: 0;
    margin: 0;
    min-height: 100vh;
}

/* HL Code */
#coderef-sc {
    background: var(--yellow);
    display: inline-block;
    width: 100%;
}

.filetags {
    color: var(--red);
    float: right;
    margin-left: 20px;
}

.tag {
    float: right;
    font-family: monospace;
    text-transform: capitalize;
}

.timestamp {
    color: var(--green);
    font-family: monospace;
}

/* Navigation */
#header nav {
    padding: 0 40px 20px;
    text-align: right;
    font-size: 1.4em;
}

#header nav ul {
    padding: 0;
    margin: 20px 0 20px 0;
}

#header nav ul li {
    display: inline-block;
    padding: 10px 0 10px 20px;
}
#header nav ul li a {
    color: black;
}

#header .contact-icon {
    float: left;
    padding-left: 0;
}

#domain-name {
    float: left;
    font-variant: small-caps;
    padding-left: 0px !important;

    /* shine animation */
    mask-image: linear-gradient(45deg,#000 25%,rgba(0,0,0,.2) 50%,#000 75%);
    mask-size: 800%;
    mask-position: 100%;
}

#domain-name:hover {
    transition: mask-position 2s ease,-webkit-mask-position 2s ease;
    mask-position: 0;
}

#domain-name a {
    text-decoration: none;
}

#avatar img {
    max-width: 100px;
    transform: scaleX(-1);
}

img {
    opacity: 0.9;
}

#main {
    padding: 20px 40px;
    padding-top: 0;
    word-wrap: anywhere;
}

#footer {
    margin-top: auto;
    padding-bottom: 20px
}

.footer-info {
    padding: 10px;
    text-align: center;
    color: var(--grey);
    font-size: 0.8em;
}

.blog-header {
    padding: 0 40px;
}

.blog-header .title {
    margin-bottom: 10px;
}

.blog-header .metadata {
    display: flex;
    flex-direction: row-reverse;
    gap: 10px;
    font-size: 0.9em;
}

.metadata .filetags {
    display: flex;
    gap: 8px;
    font-family: monospace;
}

#status-bar {
    margin: 29px auto 50px;
    padding: 0 40px;
    max-width: 720px;
    text-align: center;
}

.jump-button {
    display: flex;
    flex-direction: row-reverse;
    font-size: 24px;
}

.jump-button a:hover {
    text-decoration: none;
}

#comment-button a {
    padding: 6px;
    background: whitesmoke;
    border: 2px dashed black;
    border-radius: 5px;
    transition-duration: 0.4s;
    font-size: 0.9em;
}

#comment-button a:hover {
    background: var(--blue);
    color: white;
    border: 2px dashed white;
    border-radius: 5px;
    text-decoration: none;
}

.build-info {
    margin-top: 10px;
}

/* Links */
a {
    color: var(--blue);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Lists */
main li {
    margin-bottom: 7px;
    font-family: monospace;
}

/* CODE */
.example {
    background: whitesmoke;
    margin: 20px 0;
    padding: 20px;
    white-space: break-spaces;
}

.org-src-container {
    position: relative;
}

.src {
    margin-top: 40px;
    padding: 20px;
    border: 1px solid black;
    white-space: break-spaces;
}

/* Code heading */
pre.src::before {
    /* Position above source code */
    position: absolute;
    top: -15px;
    /* Set to full width */
    left: 0;
    right: 0;
    /* Move title content to the right */
    display: flex;
    flex-direction: row-reverse;
    /* Spacing */
    padding: 2px 10px;
    /* Border */
    border: 1px solid black;
    border-radius: 5px 5px 0 0;
    /* Content */
    content: attr(class);
    /* Color */
    background: steelblue;
    color: white;
    font-weight: bold;
}

/* Custom source code titles */
pre.src-shell::before,
pre.src-sh::before{ content: "Shell"; }

pre.src-cpp::before { content: "C++"; }

pre.src-elisp::before,
pre.src-emacs-lisp::before { content: "Emacs Lisp"; }

pre.src-plantuml::before { content: "PlantUML"; }
pre.src-html::before { content: "HTML"; }
pre.src-css::before { content: "CSS"; }

/* MARKDOWN */
/* Org _text_ */
.underline {
    text-decoration: underline;
}

/* Org +text+ */
del {
    text-decoration-color: red;
}

/* Org ~text~ */
code:not(.src,.verbatim) {
    background: whitesmoke;
    border: 1px solid black;
    padding: 0 5px;
    white-space: nowrap;
}

/* Org =text= */
.verbatim {
    color: var(--red);
    background: whitesmoke;
    border: none;
}

/* inline src code */
code.src {
    padding: 0;
}

mark {
    font-family: monospace;
}

summary {
    padding: 40px;
    padding-bottom: 20px;
}

.subtitle {
    text-align: center;
}

#table-of-contents {
    margin: 0 auto;
    margin-bottom: 40px;
    display: table;
}

#table-of-contents h2 {
    text-align: center;
}

/* Headings */
.title {
    text-align: center;
    border-bottom: 0.5px solid black;
    margin-top: 0;
    margin-bottom: 30px;
    padding-bottom: 20px;
    font-weight: normal;
    font-variant: small-caps;
    font-size: 2em;
}

h1,h2,h3,h4,h5.h6 {
    margin-top: 30px;
    font-weight: normal;
}

/* Elements */
.email {
    font-family: monospace;
}

hr {
    border: 0.5px solid rgba(0,0,0,0.1);
    margin: 40px 0;
}

p {
    margin-top: 0;
    line-height: 1.5;
}

h2 a,
h3 a {
    color: black;
}

/* Table */
table {
    font-family: monospace;
    border-collapse: collapse;
    margin: 40px auto;
}

thead {
    background-color: var(--black);
    color: white;
    text-transform: capitalize;
}

th, td {
  text-align: center;
  padding: 4px 8px;
  border: 1px solid black;
}

tr:nth-child(even){
    background-color: #fafafa;
}

blockquote {
    padding: 10px 20px;
    margin: 20px auto;
    font-size: 0.9em;
    box-shadow: 0 4px 4px 0px rgba(0,0,0,0.1);
    border-left: 8px outset whitesmoke;
}

/* note block */
.note {
    padding: 10px 20px;
    margin: 20px auto;
    background:  var(--yellow);
    font-size: 0.9em;
    box-shadow: 0px 4px 4px 0px rgba(0,0,0,0.1);
    border-left: 8px outset var(--yellow);
}

.note::before {
    content: "Note: ";
    font-weight: bold;
}

.note p {
    margin: 5px 0;
}

/* column block */
.column {
    display: flex;
    flex: auto;
    gap: 40px;
}


/* BLOCK: stack */
.stack {
  display: flex;
  flex: 1;
  align-items: center;
  flex-direction: column;
}

/* scale image for [[img:...]] */
.column p .img {
    max-width: 200px;
}

.column figure {
    min-width: 100px;
    max-width: 200px;
}
.column dl {
    display: grid;
}

/* BLOCK: center */
.org-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

figcaption {
    text-align: center;
}

/* kbd */
kbd {
    background-color: #eee;
    border-radius: 3px;
    border: 1px solid #b4b4b4;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2), 0 2px 0 0 rgba(255, 255, 255, 0.7) inset;
    color: #333;
    display: inline-block;
    font-size: 0.85em;
    font-weight: 700;
    line-height: 1;
    padding: 2px 4px;
    white-space: nowrap;
}

/* CODE */
.src pre {
  color: #000;
  background-color: #ffffff;
}
.org-builtin {
  color: #8f0075;
}
.org-comment {
  color: #505050;
}
.org-comment-delimiter {
  color: #505050;
}
.org-constant {
  color: #0000bb;
}
.org-c-annotation {
  color: #0000bb;
}
.org-doc {
  color: #093060;
}
.org-error {
  color: #a60000;
  font-weight: bold;
}
.org-function-name {
  color: #721045;
}
.org-keyword {
  color: #5317ac;
}
.org-preprocessor {
  color: #a0132f;
}
.org-string {
  color: #223fbf;
}
.org-type {
  color: #8f0075;
}
.org-variable-name {
  color: #00538b;
}
.org-warning {
  color: #813e00;
  font-weight: bold;
}
.org-warning-1 {
  color: #703700;
}

.org-css-property {
  color: #5317ac;
}
.org-css-selector {
  color: #721045;
}
.org-sgml-namespace {
  color: #8f0075;
}
.org-sh-escaped-newline {
  color: #223fbf;
}
.org-sh-heredoc {
  color: #223fbf;
}
.org-sh-quoted-exec {
  color: #8f0075;
}

/* MEDIA QUERIES */
@media only screen and (max-width: 620px) {
    main .timestamp {
        display: none;
    }
}

@media only screen and (max-width: 520px) {

    #main,
    #status-bar,
    #header nav,
   .blog-header {
        padding: 0 20px;
    }

    main .filetags,
    main .timestamp {
        display: none;
    }
}
