/* Cobbled together from:
   https://pjg1.site/public/style.css
   https://%E3%83%9E%E3%83%AA%E3%82%A6%E3%82%B9.com
*/
@font-face {
    font-family: 'tennent';
    font-style: normal;
    font-weight: normal;
    font-display: swap;
    src: local('tennent'), url('../fonts/tennent-script.woff2') format('woff2');
}

@font-face {
    font-family: 'Google Sans Code';
    font-style: italic;
    font-display: swap;
    src: local('Google Sans Code'), url('../fonts/GoogleSansCode-Italic-VariableFont_wght.ttf') format('truetype');
}

@font-face {
    font-family: 'Google Sans Code';
    font-style: normal;
    font-display: swap;
    src: local('Google Sans Code'), url('../fonts/GoogleSansCode-VariableFont_wght.ttf') format('truetype');
}

:root {
	    --bg: #fff;
	    --fg: #222;
	    --ac: #888;
    	--iv: #cbcbce;
	    --bl: #eee;
	    --co: #9f0202;
    	--ss: #fb0303;
    	--h1: 'Google Sans Code', mono;
    	--h2: 'Google Sans Code', mono;
    	--h3: 'Google Sans Code', mono;
    	--h4: 'Google Sans Code', mono;
    	--sb: 'Google Sans Code', mono;
	    --cd: #36464e;
	    --cdbg: #f5f5f5;
	    --table_head_colour: #07bee8;
    	--table_zebra_colour: #d5d5d5;
}
@media(prefers-color-scheme: dark) {
	:root {
		--bg: #1e1e1e;
		--fg: #9d9d9d;
		--ac: #a6a6a6;
        --iv: #3e3e3e;
		--bl: #282828;
		--co: #ece9dc;
		--ss: #ffd559;
        --cd: #a6a6a6;
        --cdbg: #3e3e3e;
        --table_head_colour: #2d0939;
        --table_zebra_colour: #2d2c2c;
	}
}
body {
    font-family: 'Google Sans Code', sans-serif;
	background: var(--bg);
	color: var(--fg);
    margin: 0 auto;
    max-width: 40rem;
	padding: 0 1rem;
    font-size: 100%;
    text-align: justify;
    font-feature-settings: "liga", "tnum", "case", "calt", "zero", "ss01", "locl" "alt-g";
               
}
code, kbd {
    font-family: 'Google Sans Code', monospace;
    /* font-size: 87.5%; */
    color: var(--co);
    /* background-color: var(--fg); */
}

header {
    margin: 4rem 0 2rem
}

header p {
    font-size: 1.075rem;
    line-height: 1;
    margin-top: 0.5rem;
    color: var(--ac)
}

h1, h2, h3 {
    line-height: 0.8;
    font-weight: 900;
    text-wrap: balance;
}

.subtitle {
    font-family: var(--sb);
    font-style: italic;
    font-size: 0.98rem;
    font-weight: 400;
    letter-spacing: 0.1rem;
    margin-left: 8em;
    font-variant: initial;
}

.title {
  font-variant: all-petite-caps;
  color: var(--co);
}

b, strong {
	font-weight: 600;
}
h1 {
    font-family: var(--h1);
    font-size: 3.6rem;
    /* margin: 0; */
}
h2 {
    font-family: var(--h2);
    font-size: 1.9rem;
    margin: 2rem 0 -0.5rem;
}
h3 {
    font-family: var(--h3);
    font-size: 1.5rem;
    font-variant: all-small-caps;
    margin: 1.5rem 0 0.9rem;
    font-weight: lighter;
    letter-spacing: 0.5rem;
    padding-top: 1.25rem;
}
h4 {
    font-family: var(--h4);
    font-size: 1.2rem;  
    margin-bottom: 0.2rem;
    /*! margin-top: 1.2rem; */
}
p, li, th, td, summary {
    font-size: 1.125rem;
    line-height: 1.4;
}
p, details, pre, figure {
	margin: 1.5rem 0
}
img {
    max-width: 100%;
    height: auto
}
table {
    border-collapse: collapse;
    width: 100%;
    margin: .5em 0;
    margin-left: auto;
    margin-right: auto;

}
th {
    background-color: var(--table_head_colour);
    text-align: left
}
th, td {
    border-bottom: 1px solid;
    font-family: mono;
    padding: 0.25rem
}

.org-right {
  text-align: right;
}

tr:nth-child(even) {
  background-color: var(--table_zebra_colour);
}
ul, ol {
    padding-left: 1.625rem
}
ul.posts {
	list-style: none;
	padding: 0
}
ul.posts li {
	display: flex;
	justify-content: space-between;
	margin: 1.5rem 0;
	gap: 1rem;
}
ul.posts a {
	flex: 1;
	font-weight: 600;
}
ul.posts time {
	text-align: right;
	color: var(--ac);
	font-size: 1.075rem;
	flex: 0 0 6.35rem;
	margin-top: 0.05rem
}
li {
	margin-top: 0.5rem
}
blockquote {
    margin: 0;
    border-left: solid;
    padding-left: 1rem
}
hr {
    border-style: solid;
    border-bottom: 0
}
sup {
  color: var(--ss);
  position: relative;
  vertical-align: baseline;
  font-size: calc(0.5em + 4px);
  /* Formula: Superscript/Subscript Position × Browser's default sup/sub scaling factor (0.83) × Parent Font Size (2 × (1em - 4px)) */
  top: calc(-0.85em + 3.39px);
}
sup a {
    text-decoration: none;
}
a.button {
	padding: 0.5rem 0.75rem;
	border: 1px solid;
	text-decoration: none
}
a.button:hover {
    color: var(--bg);
    background: var(--fg)
}

/* Fix footnotes */
.footpara {
    display: inline;
    font-size: inherit;
    line-height: 1.5rem
}

.footnotes {
    border-top: 1px solid #ccc;
    padding-top: 1rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--ac)
}

.footnum:target {
    color: var(--bg);
    background-color: var(--fg);
    animation: bainbl 0.5s;
}

@keyframes bainbl {
  0%   {background-color: var(--ss); color: var(--bg);}
  100% {background-color: initial; color: initial;}
}
}

footer {
    margin: 3rem 0 4rem
}
pre {
    font-family: "Google Sans Code", mono;
    display: block;
    background: var(--bl);
    padding: 0.75rem;
    font-size: 0.9rem;
    line-height: 1.4;
    overflow-x: auto;
    color: var(--fg);
}
.example {
  font-size: smaller;
}
a {
    color: inherit;
    text-decoration-thickness: 0.05em;
    text-underline-offset: 0.07rem;
}

/* Fancy ahrefs */
a,
a:hover {
  text-decoration:underline;
  -webkit-text-decoration-skip-ink:all;
  text-decoration-skip-ink:all;
  text-decoration-style:solid;
  /*! text-decoration-thickness:2px; */
  text-underline-offset:2px;
}
a:hover {
  background-color:var(--fg);
  color:var(--bg);
  text-decoration-color:var(--bg)
}

/* Fancy ahrefs ends */

/* Stream of Consciousness */
div .soc p {
    color: var(--iv);
    font-size: small;
}
             

/* Postamble. Would like to change to a pre + post amble */
div#postamble {
    text-align: right;
    color: var(--iv);
    padding: 0;
    margin: 0;
    font-family: "Google Sans Code", monospace;
    font-size: 0.75em;
}

div#postamble a {
    color: var(--iv);
    padding: inherit;
}

div#postamble a:hover {
    color: var(--bg);
}

div#preamble {
    font-family: "Google Sans Code", monospace;
    text-align: right;
    color: var(--iv);
    font-size: 0.75em
}
/* Amble ends*/

.timestamp { color: var(--co); }

header a, ul.posts a {
    text-decoration: none;
}
header a:hover, ul.posts a:hover {
    text-decoration: underline
}

dt {
  font-weight: bold;
}
dd {
  font-size: 0.9rem;
  font-weight: 300;
  padding-bottom: 0.7rem;
}

/* Vertical Poetry */
/* https://code-boxx.com/vertical-text-css/ */
div .vpoetry p {
    color: var(--ss);
    writing-mode: vertical-lr;
    font-family: "tennent", serif;
    font-size: 3.6rem;
    line-height: 5.2rem
}


@media screen and (max-width: 500px) {
    * {
        font-size: 12px;
    }
    h1 {
        font-size: 3.0rem;
    }
    div#preamble {
        line-height: 0.8em;
    }
    div#postamble a {
        font-size: inherit;
    }
    .subtitle {
        font-size: 0.8rem;
    }
    thead th, td {
        font-size: 0.95rem
    }
}

/*@media screen and (max-width: 390px) {
    .subtitle {
        font-size: 0.7rem;
    }
}*/
