html {
	-webkit-text-size-adjust:100%;
	text-size-adjust:100%;
	overflow-x: hidden;
}
/**:focus {outline:none}*/
::selection { background: black; color: white;}
body { font-family: serif;  word-wrap: break-word; font-size: 1rem; overflow-x:hidden; }
article {overflow: hidden; margin: auto; padding:1rem; margin-bottom: 3rem;}
article .article-main { overflow:visible; margin:auto; }
nav {float:left;}
nav details {margin-bottom: 3rem;}
nav details {padding-left:3%;}
nav details summary { margin-top: 10px; position:relative;}
nav a, header a { text-decoration: none ; color: inherit; }
header h1 span { margin-left: 1em; font-size: 1.2rem; font-style: italic; }
body > nav {padding-right: 1vw; width:20%;}
nav ul { list-style-type: none; list-style-position: outside; padding-left: 0;  }
nav li ul { padding-left: 0.6em }
footer { width:100%; position: fixed; bottom:0; left: 0;}
img {
	object-fit:contain;
	max-width: 100%;
	max-height: 100%;
}
input[type="submit"] {
	padding: 5px; 15px;
	background-color: #eee;
	border: 0px none;
	border-left:5px solid #ddd;
	cursor:pointer;
}
input[type="submit"]:hover {
	background-color:rgb(0, 102, 204);
	border-left:5px solid rgb(0, 142, 234);
	color: white;
}
@media (max-width:600px) {
    nav {clear:left !important; width:100% !important;}
    article { clear:left; padding-top:0; }
    nav > details { margin-bottom:unset; }
    header h1 span { display:block; margin-left: 1em; font-size: 0.9rem; font-style: italic; }
}
/* cut here to leave vanity behind */
/*body { margin:0; padding: 0; font-family: Helvetica, Verdana, Arial, 'Liberation Sans', FreeSans, sans-serif; }*/
body { margin:0; padding:0;}
a > a { text-decoration-style: dotted; color: black; }
a:hover { text-decoration: none; color:white; background-color:black; }
.thisPage { color: black; text-decoration: dotted; font-weight:bold; }

/* header and top bar */
header nav { background-color: var(--sidebar-bg-color); color: var(--sidebar-fg-color); padding: 0.3em; border-bottom: 2px solid black;}
header h1, .top_bar { background-color: var(--header-bg-color); color: var(--header-fg-color); margin: 0; border-bottom: 2px solid black; font-weight: normal; padding: 0.25ex; }
h1 {margin-top:12px; margin-bottom:12px;}
h2,h3 {margin-top: 8px; margin-bottom:8px;}
header a, .top_bar a{ text-decoration: none; color: white; background-color:unset; }
header a:hover, .top_bar a:hover { text-decoration: none; color: white; background-color:unset; }
.top_bar { border-bottom: 1px solid white;}

/* sidebar */
body > nav > details > div a { text-transform: capitalize;} 

/* main copy */
article { padding-right:5%;}
article pre { font-size: 80%; word-wrap: break-word; object-fit:contain; max-width: 100%; white-space: pre-wrap; background-color: #ddd; color: #111; padding:10px;}
textarea {max-width:100%; width:99%;}
/* footer */
footer{ color: white; background-color: black; padding:0.3em;}
footer a { color: inherit; text-decoration: none;}
/* tables */
table { border: 1px solid rgba(128,128,128,0.5); padding: 0; }
th { color: white; background-color: rgb(100,135,220); }
tr:nth-child(odd) { background-color: rgba(128,128,128,0.1)  }
/* utility */
canvas {object-fit:contain; height: auto;}

.header-link {
	opacity:0.3;
	color:gray;
	text-decoration: none;
}
/* Blog posts */

.new-post {
  max-width: 100%;
}

.new-post fieldset {
  border: 1px solid #ccc;
  padding: 1rem;
}

.new-post input,
.new-post textarea {
  width:100%;
  max-width:100%;
  box-sizing: border-box;
  font-size: 1rem;
}

.new-post textarea.text-area-big{
  min-height: 16rem;
}

.new-post textarea {
  min-height: 4rem;
}

.new-post input[type="submit"] {
  width: auto;
  padding: 0.6rem 1.2rem;
}

/* img gallery */
.gallery {
  display:flex;
  margin: 0 auto;
  transition: transform .2s;
}
.gallery:hover {
  transform: scale(1.25);
}
ul.dir-list > li {list-style:none;}
ul.gallery-dir-list > li {list-style:none; display: inline-block; border: 1px solid black; margin-bottom: 4px;}
ul.gallery-dir-list {columns: 350px; column-gap: 4px; width: 1060px; display: inherit !important; padding-inline-start:0;}

@media (max-width: 1450px) {
    ul.gallery-dir-list {
        width: 708px;
    }
}

@media (max-width:900px) {
    ul.gallery-dir-list {
	width: 354px;

    }
}

.article-main {max-width: min(1060px, 98vw)};

/* img gallery */
.gallery {
  display:unset !important;
  margin: unset !important;
  transition: unset !important;
}
.gallery:hover {
  transform: unset !important;
}
.gallery-subtitle {
border-top: 1px black solid;
color: black;
background-color: white;
margin:0px;
overflow:none;

}
.gallery-subtitle:hover {
color:black;
background-color:white;
}

/* Colour scheme */
:root {
  --sidebar-fg-color: #000000;
  --sidebar-bg-color: #ffffff;
  --header-bg-color: #000000;
  --header-fg-color: #ffffff;
}

.article-main > ul {
  display: inherit;
}

/* Goralog app */
.goralog-article-box {
  padding-top:0.5rem;
  display:flex;
  flex-wrap:wrap;
  justify-content: space-between;
  padding-bottom: 0.5rem;
  border-top: black 1px solid;
  list-style: upper-roman;
}

.goralog-date {
  order: 2;
  flex: 0 0 10%;
}
.goralog-title {
  display: list-item;
  margin-left:3%;
  order: 1;
  flex: 0 0 86%;
}
.goralog-article-description {
  margin-left:5%;
  order: 3;
  flex: 0 0 83%;
}

.bible-book-list {
  display: inline-block	
}
.bible-verse-list {
  list-style: none;
}
.tree {
  margin:0;
  /*width:120%;*/
  padding:0;
  font-family: monospace;
  border-right: 1px solid gray;
  user-select:none;
  font-size:0.8rem;
  text-transform: capitalize;
}
.app_search, .app_navbar_search_results {
  width:calc(100% - 1px);
  border-right: 1px solid gray;
  border-bottom: 1px solid gray;
}
.app_navbar_search_results h1, .app_navbar_search_results ul{
  margin:0;
  padding-left:1rem;
}
.app_search_form{
  padding-top:0.35rem;
  padding-bottom:0.35rem;
  margin-left:0.65rem;
  border: transparent;
}

.tree details {
  margin-bottom:0;
  color:black;
  pointer-events: none;
  /*margin-top:0.1rem;*/
}
.tree details a{
  pointer-events: all;

}
.tree details:has(> ul) {
  pointer-events: all;
}
.tree details summary {
  margin-top:0;
}
.tree details > summary {
  list-style-type:none;
  margin-left:0.75rem;
}
.tree details summary::marker,
.tree details summary::-webkit-details-marker {
  display:none;
}
.tree details:has(> ul) > summary::marker,
.tree details:has(> ul) > summary::-webkit-details-marker {
  display:default;
}

.tree details[open]:has(> ul) > summary {
  list-style-type:disclosure-open;
  margin-left:0;
}
.tree details:not([open]):has(> ul) > summary {
  list-style-type:disclosure-closed;
  margin-left:0;
}


.navbar-opened {
  font-weight:900;
  font-size:0.8rem;
  text-decoration: black underline;
}

.tree ul {
  padding-top:0.3rem;
  padding-left: 0rem;
  padding-bottom:0.2rem;
}
.tree li {
  display: block;
  position: relative;
  border-bottom: 1px dashed gray;
  border-left: 1px solid gray;
}
.tree .navbar-dir {
  padding-top:0.4rem;
  padding-bottom:0.4rem;
  padding-left:0.1rem;
}
.tree .navbar-file {
  padding-top:0.4rem;
  padding-bottom:0.4rem;
  padding-left:1.3rem;
}
.tree li:first-child {
  border-top: 1px solid gray;
}
.tree li:last-child {
  border-bottom: 1px solid gray;
}
.tree summary {
  cursor: pointer;
}

.definitely_important_field {
  display: none;
}
details details {
  filter: brightness(87%);
}
.article-main details {
  background-color: #eeeeee;
  border-color: #000;
  border: 1px solid;
  margin-bottom: 0.2rem;
  padding-left:0.5rem;
  padding-right:0.5rem;
}
.article-main summary {
  background-color: #dddddd;
  cursor: pointer;
}

/* =========================================================
   Base
   ========================================================= */

:root {
    --bg: #111;
    --text: #ddd;
    --muted: #888;
    --border: #333;
    --accent: #d8ff3e;
}

* {
    box-sizing: border-box;
}

body {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1rem;

    background: var(--bg);
    color: var(--text);

    font: 16px/1.6 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

img {
    max-width: 100%;
    border: 1px solid white;
}


/* =========================================================
   Typography
   ========================================================= */

h1,
h2,
h3 {
    line-height: 1.2;
}

h1 {
    margin: 1rem 0 0.5rem;
    font-size: clamp(2.5rem, 7vw, 4rem);
}

h2 {
    margin: 0.5rem 0 0.2rem;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
}

h3 {
    margin: 0.2rem 0 0.1rem;
}


/* =========================================================
   Projects
   ========================================================= */

.project {
    padding: 1rem 0;
    border-top: 1px solid var(--border);
}

.project h1 {
    margin: 0 0 .5rem;
    font-size: clamp(2rem, 5vw, 3rem);
}

.project-date {
    display: block;
    margin-bottom: .5rem;

    color: var(--muted);

    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.project-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1rem;

    margin-bottom: 1.5rem;

    color: var(--muted);
    font-size: .85rem;
}


/* =========================================================
   Tags
   ========================================================= */

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;

    margin: 1.25rem 0;
}

.tag {
    padding: .2rem .5rem;

    border: 1px solid var(--border);
    border-radius: 3px;

    color: var(--muted);
    font-size: .75rem;
}


/* =========================================================
   Project links
   ========================================================= */

.project-links {
    display: flex;
    flex-wrap: wrap;
}

.project-links a {
    display: inline-block;

    padding: .45rem .7rem;

    border: 1px solid #444;

    color: var(--text);
    text-decoration: none;
    font-size: .9rem;
}

.project-links a:hover {
    background: #222;
}



/* =========================================================
   Mobile
   ========================================================= */

@media (max-width: 600px) {
    .project-gallery-track {
        column-count: 1;
    }
    body {
        padding: 0 1rem;
    }

    h1 {
        margin-top: 1rem;
    }

    h2 {
        margin-top: 0.5rem;
    }

    .project {
        padding: 2rem 0;
    }

    .project-links {
        flex-direction: column;
    }

    .project-links a {
        text-align: center;
    }
}

iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
}

.project-gallery {
display: flex;
}

.project-gallery-track {
    column-count: 2;
    grid-row-gap: 0;
    column-gap: 0;
    width: 100%;
    height: fit-content;
}

.project-gallery-track br {
display: none;
}

.project-gallery-track img {
    width: 100%;
    height: auto;
    cursor: zoom-in;
}

.image-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 5vh 5vw;
    background: rgba(0, 0, 0, 0.85);
    cursor: zoom-out;
}
.image-lightbox.open {
    display: flex;
}
.image-lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    width: auto;
    height:auto;
    object-fit: contain;
}

p {
    margin-block-start: 0;
    margin-block-end: 0;
}

