html { font-family: Main, serif; }
h1, h2, h3, h4, h5, h6 { font-family: Title, Main, serif; color: #770000; }

/*
 * ---------------------------------------------------------------------------
 */

html { font-size: 1.4em; line-height: 1.5em; height: 100%; }
body { margin: auto; padding: 1%; max-width: 1664px; max-width:900px; }
h1 { margin-top: 0; font-size: 2em; }
p { margin-top: 0.5em; text-align: justify; }

html {
    background-color: #222;
    color: #ddd;
}
h1,h2,h3,h4,h5,h6 { color: #FF9540; }
a { color: #33CDC7; }
a:visited { color: #22ABC7; }
aside { color: #99EEEE; background-color: #003230; border: #33CDC7 1px solid; }

body {
    /*
    border: rgba(32, 32, 32, 0.5)  1px solid;
    box-shadow: 2px 2px 5px rgba(32, 32, 32, 0.5);
   */
    margin-top: 0.5em;
    margin-bottom: 0.5em;
}

body.background {
    margin: 0 0;
    padding: 0;
    max-width: none;
    height: 100%;
    /* background-image: url("paper.png"); */
    /* background-position: center; */
    /* background-size: contain; */
}

/* Additional decoration */
header {
    background-image: url("/graphics/header-background.png");
    background-repeat: repeat;
    margin-bottom: 0.5em;
    padding-top: 0.25em;
}

header h1 {
    border-bottom: #aaa 1px solid;
    padding-bottom: 0.1em;
}

header a {
    background-color: transparent;
}

h1 {
    border-bottom: #aaa 1px solid;
    padding-bottom: 0.1em;
}

h2 {
    border-bottom: #aaa 1px solid;
    font-size: 1.2em;
}

h3 {
    border-bottom: #aaa 1px solid;
}

h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    margin-bottom: 0;
    border-top: 0;
}

/* div.page-nav { */
/*     width: 100%; */
/*     display: block; */
/*     text-align: right; */
/*     /\* margin-bottom: 1.0em; *\/ */
/*     font-size: 0.8em; */
/* } */

/* a.page-nav { */
/*     text-align: center; */
/*     width: 128px; */
/*     color: #222; */
/*     border: #ccc 1px solid; */
/*     border-radius: 2px; */
/*     text-decoration: none; */
/*     padding: 0.1em 0.5em; */
/*     margin: 0.0em; */
/* } */

a.page-nav:hover {
    background-color: #eee;
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.25);
}

a:hover {
    background-color: #ccf;
}

header a:hover {
    background-color: transparent;
}

.right-sidebar a {
    text-decoration: none;
}

ul {
    list-style: disc;
    margin-left: -1.0em;
}

ul li li {
    list-style: none;
    margin-left: -1.0em;
}

pre {
    margin-left: 0em;
    font-family: Quote, Main, cursive;
    font-size: 1.2em;
    font-style: italic;
    color: #200;
    line-height: 1.6em;
    /*
    border: #ccc 1px solid;
    border-radius: 4px;
    background-color: #eee;
   */
}

pre.code {
    font-family: Code, monospace;
    font-size: 1.0em;
    font-weight: bold;
    line-height: 1.2em;
    color: #ccc;
    padding-left: 0.5em;
    background-color: #222;
}

code {
    margin-left: 2em;
    color: #ccc;
    font-weight: normal;
    font-style: normal;
    background-color: #222;
}

table {
    margin-bottom: 1em;
}

th {
    text-align: left;
}

th, td {
    border: rgba(32, 32, 32, 0.5)  1px solid;
    /* padding: 0.0em 0.0em 0.0em 1.0em; */
    padding-left: 0.2em;
    padding-right: 1.0em;
    /* Override the font-size if your default font-size is not 1.0em */
}

tr:nth-child(even) {
    background-color: rgba(220, 220, 220, 0.5);
}

img {
    float: none;
    max-width: 100%;
    margin: auto;
    /* margin: 5px 10px 5px 10px; */
}

img.left {
    float: left;
    max-width: 50%;
    margin: 5px 20px 5px 0;
}

img.right {
    float: right;
    max-width: 50%;
    margin: 5px 0px 5px 20px;
}

aside {
    float: right;
    max-width: 30%;
    margin: 5px 0px 5px 20px;
    border: #222 1px solid;
    padding: 5px;
    padding-bottom: 10px;
    font-size: 0.6em;
    line-height: 1.4em;
    background-color: rgba(220, 220, 220, 0.5);
}

blockquote {
    margin-left: 0em;
    color: #200;
    background-color: #eee;
    padding: 10px;
    border: #ccc 1px solid;
    border-radius: 4px;
    font-size: 1.0em !important;
    font-family: Quote, Main, serif;
}

/* grid container */
.layout-grid {
    display:grid;
    /* grid-template-columns: 240px 1fr; */
    /* grid-template-columns: 12% 62% 26%; */
    grid-template-columns: 1fr 180px;
  
    /* min-height: 80vh; */
    gap: 0.5rem;
    grid-template-areas:
        'main-content'
        'right-sidebar';
}

/* general column padding */
.layout-grid > * {
    padding:0.5rem;
}

#main-content {
    grid-column: 1;
}

#right-sidebar {
    grid-column: 2;
}

footer {
    clear: both;
    border-top: #aaa 1px solid;
    padding: 0.25em;
    margin: 0.5em;
    text-align: center;
}

footer p {
    font-size: 0.6em;
    text-align: center;
}

div.page-nav {
    width: 100%;
    display: flex;
    flex-direction: row;
    text-align: center;
    margin-bottom: 1.0em;
    font-size: 0.8em;
    line-height: 1.5em;
}

a.page-nav {
    text-align: center; 
    width: 128px;
    color: #222;
    border: #ccc 1px solid;
    border-radius: 2px; 
    text-decoration: none;
    /* padding: 0.1em 0.5em;   */
    margin: 0.0em;
    margin-left:0.5em;
    padding: 0.0em;
} 

a.page-nav:hover {
    background-color: #eee;
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.25);
}

/* tablet breakpoint */
@media (max-width:768px) {
  .layout-grid {
    grid-template-columns: 1fr 200px; /* left column's track is gone */
  }

  .left-sidebar {
    display: none;
  }
}

@media (prefers-color-scheme: light) {
    html {
        background-color: #ddd;
        color: #222;
    }
}

@media (prefers-color-scheme: dark) {
    html {
        background-color: #222;
        color: #ddd;
    }
    h1,h2,h3,h4,h5,h6 { color: #FF9540; }
    a { color: #33CDC7; }
    a:visited { color: #22ABC7; }
    aside { color: #99EEEE; background-color: #003230; border: #33CDC7 1px solid; }

}
