/* 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: 'CSBMD';
    font-style: normal;
    font-weight: normal;
    src: local('CSBMD'), url('../fonts/csbmd/CSBergamotDrawn-Regular.otf') format('woff');
}

@font-face {
    font-family: 'Google Sans Code';
    font-style: italic;
    font-display: swap;
    src: local('Google Sans Code'), url('../fonts/google-sans-code/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/google-sans-code/GoogleSansCode-VariableFont_wght.ttf') format('truetype');
}

:root {
	--bg: #fff;
	--fg: #222;
	--ac: #888;
    --iv: #cbcbce;
	--bl: #eee;
	--co: #9f0202;
    --h1: 'CSBMD', serif;
    --h2: 'CSBMD', serif;
    --h3: 'Google Sans Code', mono;
    --h4: 'Google Sans Code', mono;
    --sb: 'Google Sans Code', mono;
}
@media(prefers-color-scheme: dark) {
	:root {
		--bg: #1e1e1e;
		--fg: #9d9d9d;
		--ac: #a6a6a6;
        --iv: #3e3e3e;
		--bl: #282828;
		--co: #df7e7e;
	}
}
body {
    font-family: 'Google Sans Code', sans-serif;
	background: var(--bg);
	color: var(--fg);
    margin: 0 auto;
    max-width: 36rem;
	padding: 0 1rem;
    font-size: 100%;
    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: 800;
    text-wrap: balance;
}

.subtitle {
    font-family: var(--sb);
    font-style: italic;
    font-size: 1.1rem;
    font-weight: 200;
    letter-spacing: 0.5rem;
}

b, strong {
	font-weight: 600;
}
h1 {
    font-family: var(--h1);
    font-size: 2.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: 0 0 -1.1rem;
    font-weight: lighter;
}
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%
}
th {
    text-align: left
}
th, td {
    border-bottom: 1px solid;
    padding: 0.25rem 0
}
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 {
    line-height: 0;
    padding-right: 0.3rem;
}
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 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--ac)
}
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;
}
.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 */


/* Postamble. Would like to change to a pre + post amble */
div#postamble {
    text-align: left;
    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
}

@media screen and (max-width: 500px) {
    * {
        font-size: 12px;
    }
    div#preamble {
        line-height: 0.8em;
    }
}
