:root {
    --dark-gray-color: #656466; 
    --light-gray-color: #e7e9e7;
    --light-blue-color: #f9d7f5;
    --visited-link-color: #646093;
    --hover-link-color: var(--inline-code-background);
    --font-sans-serif: -apple-system, BlinkMacSystemFont, "segoe ui", roboto, "helvetica neue", "helvetica", arial, sans-serif; /* "Lato", sans-serif; */
    --font-serif: "Apple Garamond", "Iowan Old Style", Baskerville, "Times New Roman", "Droid Serif", Times, "Source Serif Pro", serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    --font-monospace: Menlo, Consolas, Monaco, Liberation Mono, Lucida Console, monospace;
    --body-font-size: 1.2rem;
    --small-font-size: 0.8rem;
    --line-height: 1.4;
    --vertical-align: middle;
}

[data-theme="light"] {
    --background-color: #FEF9F5; /*#fff8e5; /*#f9f8ef; /*#f7f5e9; /*#fffff8; /*#f9f5d7; #f4f5f0; #efefef;*/
    --font-color: black;
    --blockquote-color: #f2f2eb; /* #fdf5e6; /* #f2f2eb; */
    --site-name-color: var(--dark-gray-color);
    --tag-color: var(--dark-gray-color);
    --metadata-color: var(--dark-gray-color);
    --inline-code-background: var(--light-gray-color);
    --inline-code-border: var(--dark-gray-color);
    --link-color: blue;
}

[data-theme="dark"] {
    --background-color: #313030; /*#0f141a;*/
    --font-color: #f9f7ec; /*#c5c5c5;*/
    --blockquote-color: #283544;
    --site-name-color: var(--font-color);
    --tag-color: var(--light-gray-color);
    --metadata-color: var(--light-gray-color);
    --inline-code-background: #383836; /*#3b302f;*/
    --inline-code-border: var(--dark-gray-color);
    --link-color: #04da75; /*#87ceeb;*/
}

body {
    background-color: var(--background-color);
    color: var(--font-color);
    font-family: var(--font-sans-serif);
    font-size: var(--body-font-size);
    line-height: var(--line-height);
    vertical-align: var(--vertical-align);
}

h1, h2, h3 {
    font-family: var(--font-sans-serif);
}

@media (min-width: 300px) {
    :root {
        --right-margin: auto;
    }
    
    body {
        margin: var(--right-margin);
        padding: 20px;
    }
}

@media (min-width: 768px) {
    :root {
        --right-margin: 45%;
    }
    body {
        margin-right: var(--right-margin);
        margin-top: 1%;
        margin-left: 10%;
        margin-bottom: 5%;
    }
}

@media (min-width: 2000px) {
    :root {
        --right-margin: 45%;
    }
    body {
        margin-right: var(--right-margin);
        margin-top: 1%;
        margin-left: 10%;
        margin-bottom: 5%;
    }
}

.site-name {
    font-family: var(--font-monospace);
    color: var(--site-name-color);
    font-weight: bold;
    font-size: 1.5rem;
}

[data-theme-toggle] {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 24px;
    height: 24px;
    border: none;
    background: none;
    cursor: pointer;
    visibility: hidden;
}

[data-theme].ready [data-theme-toggle] {
    visibility: visible;
}

.toggle {
    width: 24px;
    height: 24px;
    stroke: var(--font-color);
    fill: var(--font-color);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: opacity 0.3s ease, transform 0.3s ease;;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.toggle.hidden {
    opacity: 0;
    pointer-events: none;
}

hr {
    border: solid 1px;
    width: 100%;
    margin-left: 0px;
}

footer {
    font-family: var(--font-monospace);
    font-size: var(--small-font-size);
    color: var(--dark-gray-color);
    border-top: 2px solid;
    padding-top: 1%;
}

a {
    color: var(--link-color);
}

a:hover {
    background-color: var(--hover-link-color);
}

.nav-header {
    display: flex;
    flex-direction: row;
    gap: 70%;
    align-items: center;
    justify-content: space-between;
}

nav {
    width: 100%;
}

nav a {
    font-family: var(--font-monospace);
    font-size: 1rem;
}

nav a:visited {
    color: var(--link-color);
}


nav ul {
    list-style-type: none;
    margin-left: 0;
    margin-bottom: 2%;
    padding: 0;
    overflow: hidden;
    width: 100%;
}

nav ul li {
    float: left;
    padding-right: 3%;
}


code {
    font-family: var(--font-monospace);
    font-size: 0.9rem;
    background-color: var(--inline-code-background);
    border: solid 1px var(--inline-code-border);
    padding: 2px;
}

pre code.hljs::first-line {
    line-height: 0;
}

pre code.hljs {
    white-space: preserve;
    margin: 0;
    padding: 0;
}

ul.posts {
    list-style-type: none;
    padding: 0;
    display: block;
}

ul.posts li {
    display: flex;
    padding-bottom: 1%;
}

ul.posts li span {
    flex: 0 0 120px;
}

span.tags {
    flex: 0 0 120px;
    margin-left: 0%;
    color: var(--tag-color);
    font-size: var(--small-font-size);
    line-height: 2.1;
}

span.tags a {
    color: var(--tag-color);
    padding: 0;
}

ul.posts li span.post-list {
    flex: 0 0 70%;
    white-space: normal;
}

.metadata {
    font-family: var(--font-monospace);
    font-size: 0.9rem;
    color: var(--metadata-color);
    line-height: 1.5;
}

.metadata ul {
    list-style-type: none;
    padding: 0;
    display: block;
}

.datetime {
    font-family: var(--font-monospace);
    font-size: 1rem;
    line-height: 1.9;
}

.filter {
    font-family: var(--font-monospace);
    font-size: 0.8rem;
}

blockquote {
    background: var(--blockquote-color);
    border-left: 5px solid;
    padding: 1%;
}

img {
    max-width: 100%;
    height: auto;
}

.dag {
    width: 600px;
    height: auto;
    stroke: var(--font-color);
    fill: var(--font-color);
}

figcaption {
    color: var(--dark-gray-color);
    font-family: var(--font-monospace);
    font-style: italic;
    font-size: var(--small-font-size);
    padding-left: 10%;
    padding-right: 10%;
}

input[type=text], select, textarea {
    width: 100%;
    padding: 8px;
    font-size: 1.10rem;
}

textarea {
    width: 100%;
    height: 100px;
    resize: vertical;
}

input[type=submit] {
    font-size: 1.05rem;
}

.contact {
    color: var(--dark-gray-color);
    font-family: var(--font-monospace);
    font-size: var(--small-font-size);
}

table {
    width: 100%;
    border-collapse: collapse;
    border: 0;
    border-style: hidden;
    font-family: var(--font-monospace);
    font-size: 1rem;
}

th, td, tr {
    border: 1px dashed var(--font-color);
    text-align: center;
    font-weight: normal;
}

caption {
    display: table-caption;
    caption-side: bottom;
    text-align: left;
    color: var(--dark-gray-color);
    font-style: italic;
    padding: 1%;
}

mjx-container {
  overflow-x: auto;
}
