:root {
    --bgColour: light-dark(#f9fafb, #404040);
    --bgContrastColour: light-dark(#f2f2f2,#757575);
    
    --textMainColour: light-dark(#404040, #f9fafb);
    --textLightColour: light-dark(#757575, #f2f2f2);

    --baseAccentColour: #004d87;
    --highLightColour1: #5badf0;
    --highLightColour2: #ff8263;
    --highLightColour3: #00bea2;

    --listColumnWidth: 580px;

    color-scheme: light dark;
}

body {
    font-family: Georgia, serif;
    color: var(--mainTextColour);
    line-height: 1.75;
    letter-spacing: 0.008em;
    background-color: var(--bgColour);
}

a {
    text-underline-offset: 0.7ex;
    text-decoration-thickness: 3px;
    text-decoration-color: var(--highLightColour1);
    color: var(--textMainColour);
}
a:not(p a, ol a, ul a) {
    /* Remove all link decorations when not in
     a paragraph, e.g. headings, nav etc.*/
    text-decoration: none;
}
a:hover {
    color: var(--textMainColour);
    text-decoration-color: var(--highLightColour2);
}

a:active {
    color: var(--textMainColour);
    background-color: var(--highLightColour2);
}

a:visited {
    text-decoration-color: var(--highLightColour3);
}

/* markdown content styles */
blockquote {
    margin-top: 5px;
    margin-bottom: 5px;
    padding-left: 1em;
    margin-left: 0px;
    border-left: 3px solid var(--highLightColour1);
    color: var(--textLightColour);
}

hr {
    display: block;
    border: none;
    height: 2px;
    margin: 40px auto;
    background: #eee;
}

table {
    width: 100%;
    margin: 40px 0;
    border-collapse: collapse;
    line-height: 1.5em;
}

th, td {
    text-align: left;
    padding-right: 20px;
    vertical-align: top;
}

table td, td {
    border-spacing: none;
    border-style: solid;
    padding: 10px 15px;
    border-width: 1px 0 0 0;
}

/* contrasting background colours
   lighten background
 */
thead th, th {
    text-align: left;
    padding: 10px 15px;
    height: 20px;
    font-size: 1.1em;
    font-weight: bold;
    color: var(--mainTextColour);
    background: var(--bgContrastColour);
    cursor: default;
    white-space: nowrap;
    border: 1px solid var(--textLightColour);
}

tr>td {
    border: 1px solid var(--textLightColour);
}


h1, h2, h3 {
    font-weight: 400;
}

h1 a, h2 a, h3 a, h4 a, h5 a, h6 a {
    color: var(--mainTextColour);
}

p {
    margin-block-start: 1.5em;
    margin-block-end: 1.5em;
}


/* Prevents the <p> tags added in
   org mode list items adding
   more separation */
li > p {
    display: inline;
}

/* Try and make the org mode footnotes
   a little more compact, and the reference
   number large enough to actually click */

.footnote-definitions sup {
    font-size: 1em;
}

div.footnote-body > p {
    display: inline;
}

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

mark {
    background-color: var(--highLightColour2);
}

/* Code Highlighting */
.highlight {
    max-width: 100%;

}

.highlight pre {
    padding: 7px;
    /* Something here to fix stuck background?*/
    overflow-x: hidden;
}

.highlight pre::-webkit-scrollbar {
    display: none;
}

.highlight pre:hover {
    /* But only when it's wider than the normal width*/
    width: max-content;
    /* This isn't quite perfect, at some resolutions
    it still causes a little jitter to another size
    on hover when the content isn't wider than than
    the container*/
    min-width: 98%;
}

p code {
    font-family: SFMono-Regular, Consolas, Liberation Mono, Courier, monospace;
    background-color: rgba(0, 0, 0, 0.06);
    padding: 0 2px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 2px 2px;
    line-height: inherit;
    word-wrap: break-word;
    text-indent: 0;
}
pre code {
    font-family: SFMono-Regular, Consolas, Liberation Mono, Courier, monospace;
}

.pagination {
    margin: 48px 0;
    width: 100%;
    height: 32px;
    margin-top: 48px;
}

.pagination .prev {
    float: left;
}

.pagination .next {
    float: right;
}

.pagination_row {
    margin-top: 48px;
    width: 100%;
    display: flex;
    flex-direction: row;
}

.col_left {
    flex: 1 1 0px;
    text-align: left;
    padding: 5px
}

.col_right {
    flex: 1 1 0px;
    text-align: right;
    padding: 5px
}

.pagination_row .arrow {
    max-width: 2em; //fit-content;
}

@media screen and (max-width: 680px){
    .pagination_row .mobile_hide > a {
	display: none;
    }

    .pagination_row .arrow {
	font-size: 2em;
	font-weight: bold;
    }
}

/* navigation */
nav {
    padding: 20px 20px 10px;
    margin: 0 auto;
    text-align: right;
    z-index: 100;
}

nav a {
    top: 8px;
    right: 6px;
    padding: 8px 12px;
    color: var(--mainTextColour);
    line-height: 1.35;
    border-radius: 3px;
    /*     font-weight: bold; */
}
nav a:hover {
    color: var(--highLightColour1);
}

nav a.button {
    background: var(--baseAccentColour);
    color: var(--bgColour);
    margin-left: 12px;
}

@media screen and (max-width: 680px) {
    nav {
	overflow: auto;
	white-space: nowrap;
	overflow-y: hidden;
	border-bottom: 1px solid #999;
    }
}

/* footer */
footer {
    margin-top: 100px;
    margin-bottom: 100px;
    text-align: center;
    color: var(--textLightColour);
}
footer .copyright {
    margin: 20px auto;
}
.powerby {
    margin: 20px auto;
    font-size: 0.9em;
}
footer .split {
    cursor: pointer;
}
footer .split:hover path {
    fill: #ff3356;
    transition: 0.7s ease-out;
    cursor: pointer;
}

a.social {
    margin: 0 4px;
    color: var(--textLightColour);
}

/* main content */
main {
    width: 100%;
    margin: 0 auto;
}

/* profile  */

.profile {
    margin: 60px auto 0 auto;
    text-align: center;
}

.profile .avatar {
    display: inline-block;
    width: 150px;
    height: 150px;
} 

.profile h1 {
    font-weight: 400;
    letter-spacing: 0px;
    font-size: 2em;
    color: var(--mainTextColour);
    margin-bottom: 0;
    margin-top: 0;
}

.profile h2 {
    font-size: 1.2em;
    color: var(--textLightColour);
    margin-top: 0;
}

/* index post list */
#list-page {
    max-width: var(--listColumnWidth);
    margin: 0 auto;
    padding: 0 24px;
}

#list-page .item {
    margin: 48px 0 0 0;
}

#list-page .title {
    display: inline-block;
    color: var(--mainTextColour);
    font-weight: 400;
    margin: 0;
    width: 80%;
}

#list-page .title a {
    color: var(--mainTextColour);
    display: block;
}

#list-page .title a:hover {
    color: var(--highLightColour1);
}

#list-page .date {
    width: 20%;
    float: right;
    text-align: right;
    position: relative;
    top: 1px;
    color: var(--textLightColour);
}

#list-page .summary {
    margin-top: 12px;
}

#list-page .cover {
    width: 100px;
    height: 100px;
    background: #fff;
}

#list-page .cover img {
    width: 100%;
    text-align: center;
}


/* single page */
#single {
    max-width: 80ch;
    margin: 60px auto 0 auto;
    padding: 0 64px;
}

#single .title {
    text-align: center;
    font-size: 2em;
    font-weight: 400;
}

@media screen and (max-width: 700px) {
    #single {
	padding: 0 18px;
	margin: 20px auto 0 auto;
    }
    #single .title {
	font-size: 1.6em;
    }
}

#single .tip {
    text-align: center;
    color: var(--textLightColour);
    margin-top: 18px;
}
#single .tip .split {
    margin: 0 4px;
}

#single .content {
    margin-top: 36px;
}

#single .tags {
    margin-top: 24px;
}
#single .tags a {
    background: var(--bgContrastColour);
    padding: 4px 7px;
    color: var(--textMainColour);
    font-size: 0.9em;
    margin-right: 3px;
}
#single .tags a:hover {
    color: var(--highLightColour1);
}


#archive {
    max-width: var(--listColumnWidth);
    margin: 0 auto;
    padding: 0 24px;
}

#archive .group {
    margin: 24px auto; 
}
#archive .group .key {
    font-size: 1.2em;
    margin-bottom: 12px;
}
#archive .group .value {
    display: block;
    margin-bottom: 12px;
}
#archive .group .value .date {
    display: inline-block;
    color: var(--textLightColour);
    width: 60px;
}
#archive .group .value .title {
    display: inline;
}
#archive .group .value .title a {
    color:var(--mainTextColour);
}
#archive .group .value .title a:hover {
    color: var(--highLightColour1);
}
#archive .group .value .tags {
    display: inline;
    margin-left: 7px;
}
#archive .group .value .tags a {
    background: var(--bgContrastColour);
    padding: 4px 7px;
    color: var(--mainTextColour);
    margin-right: 3px;
}
#archive .group .value .tags a:hover {
    color: var(--highLightColour1);
}

/* taxonomy */
#tags {
    max-width: 700px;
    margin: 48px auto 0 auto;
    padding: 0 12px;
    text-align: center;
}
#tags .tag {
    display: inline-block;
    margin: 7px 7px;
}
@media screen and (max-width:680px) {
    #tags {
	margin: 0 auto 0 auto;
    }
    #tags .tag {
	display: inline-block;
	margin: 4px 5px;
    }
}

#tags .tag a {
    background: var(--bgContrastColour);
    padding: 4px 7px;
    color: var(--mainTextColour);
    margin-right: 3px;
}
#tags .tag a:hover {
    color: var(--highLightColour1);
}

/* section page */
#section {
    max-width: var(--listColumnWidth);
    margin: 48px auto 0 auto;
    padding: 0 12px;
}

.summary_img {
    padding-top: 10px;
}

/* 404 page */
#page-404 {
    max-width: var(--listColumnWidth);
    margin: 0 auto;
    padding: 0 24px;
}
#page-404 .item {
    margin: 12px 0 0 0;
}

#page-404 .title {
    display: inline-block;
    color: var(--mainTextColour);
    font-weight: 400;
    margin: 0;
    width: 80%;
}

#page-404 .text {
    text-align: center;
    margin-top: 60px;
}

#page-404 .read-more {
    font-weight: 300;
    font-size: 2em;
    margin-top: 48px;
    margin-bottom: 12px;
}

#page-404 .date {
    width: 20%;
    float: right;
    text-align: right;
    position: relative;
    top: 1px;
    color: var(--textLightColour);
}
