@import url('inter-ui-web/inter-ui.css');
:root {
    --background: #f2f2f2;
    --foreground: black;
    --highlight: black;

    --time: 100ms;
}
html {
    background-blend-mode: exclusion;
}

@media (prefers-color-scheme: dark) { 
    :root {
        --background: #111;
        --foreground: #f2f2f2;
        --highlight: #ffe4b5;
    }
    html {
        background-blend-mode: soft-light;
    }
}

/* Reset.css Courtesy of XXIIVV */
*           { margin:0;padding:0;border:0;outline:0;text-decoration:none;font-weight:inherit;font-style:inherit;color:inherit;font-size:100%;font-family:inherit;vertical-align:baseline;border-collapse:collapse;border-spacing:0; -webkit-font-smoothing: antialiased;-moz-osx-font-smoothing: grayscale; scrollbar-width: thin; scrollbar-color: var(--foreground) var(--background); }
*:focus     { outline: none}
::selection { background: var(--highlight); opacity:1.0; color:var(--background); padding:10px; /* Safari */ }

body { color: white; background:#000; overflow-x: hidden; transition: opacity 150ms; opacity: 1 !important}
b { font-weight:bold; }
i { font-style:italic; }
a { cursor: pointer; }
ul { list-style-position: outside; }
hr { clear:both; }
code { white-space: pre; color: var(--foreground); background: var(--background); font-family: monospace; }
svg { stroke-width: 10;stroke: white;stroke-linecap: round; }
strong { font-weight: bold; }
a code {
    background: none;
    color: var(--highlight);
    padding: 0;
}

/* end reset */

/* main */
/* set basics without css variables */
html  {
    background: #000;
    color: #f2f2f2;
}


main {
    border: 1px solid;
    padding: 1rem;
    border-top-right-radius: 6rem;
    background: var(--background);
}

header > h1 {
    display: none;
}

header > p {
    /* font-family: serif; */
    /* /* transform: rotate(-90deg); */ */
    /* position: absolute; */
    /* margin-left: -10rem; */
    /* top:  calc(19ch); */
}

html {
    font-family: "Inter UI", sans-serif;
    font-feature-settings: 'tnum' 1, "ss01" 1, "zero" 1; /* fixed-width numbers on, alternate number set on, dash through zero on */
    background-color: var(--background);
    /* ba */
    background-image: url("/tiling/wavy.svg");
    background-attachment: fixed;
    color: var(--foreground);
    line-height: 1.5rem;
}

body {
    display: grid;
    grid-column-gap: 20px;

    grid-template-columns: 1fr;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 2rem;
    margin-top: 1rem;
    overflow-y: scroll;
    padding: 5rem;
    padding-top: 1.5rem;
    padding-bottom: 2.5rem;
    background: transparent;
    color: var(--foreground);

    font-size: 1.125rem;
    line-height: 1.6;
}

hr {
    width: 4rem;
    margin: 2rem 0;
    border: var(--foreground) solid thin;
    border-bottom-width: 0;
}

.header-img {
	filter: grayscale(100);
}


.header-image {
	max-height: 15rem;
}


body {
    max-width: 850px;
}

article {
    padding: 1rem 3.5rem;
    display: grid;
    hyphens: auto;
    word-break: break-word;
}

article > p:first-of-type, header > p:first-of-type {
	font-family: Times;
	font-style: italic;
	line-height: 1.2;
}
article > p:first-of-type a::after, header > p:first-of-type a::after {
	content: "*";
}

header { margin: 0; }

dl.listicle > dt {
    margin-top: 1rem;
    font-size: 1.5rem;
    font-weight: 400; 
}

dl.listicle {
    line-height: 1.2;
}

h1, h2, h3 {
    font-family: "Times New Roman", serif;
}

h1 {
    padding: 1rem 0;
    font-size: 3rem;
    line-height: 2.75rem;
    letter-spacing: -0.025em;
}

h2, h3 { line-height: 2.5rem; }

h2 {
    margin-top: 2rem;
    font-size: 2rem;
    font-weight: 400; 
    padding-bottom: 0.5rem;
}

h2 + p { padding: 0.25rem 0; }


h3 {
    margin-top: 2rem;
    font-size: 1.5rem;
}

h4, h5, h6 {
    margin: 0;
    padding: 0;
    line-height: inherit;
    margin-top: 1rem;
}

h4 { font-weight: bold; }
h5 { font-style: italic; }
h1 + h2, h1 + h3, h2 + h3 { margin-top: 0; }
h1 + h4 { margin-top: 2rem; }

em { font-style: italic; }
del { text-decoration: line-through; }

a {
    color: var(--foreground);
    -webkit-transition: opacity var(--time) ease-in-out;
    -moz-transition: opacity var(--time) ease-in-out;
    -ms-transition: opacity var(--time) ease-in-out;
    -o-transition: opacity var(--time) ease-in-out;
    transition: opacity var(--time) ease-in-out;

    text-decoration: underline;
    text-decoration-color: var(--highlight);
}

a:hover { opacity: 0.7; }
a:visited { color: var(--foreground); }
a:focus { background-color: var(--foreground) !important; color: var(--background) !important; }
/* differentiate external links */
a[href^="http://"]:after, a[href^="https://"]:after {
    content: "->";
    font-size: 0.75rem;
    white-space: pre; /* try to make the -> glyph never wrap at end of line */
}

sup {
    position: relative;
    top: -0.5rem;
    font-size: 0.5rem;
}

h1 > a::after, h2 > a::after {
    content: "" !important;
}
/* a[href^="http://"], a[href^="https://"]:after { */
/*     content: "*"; */
/* } */

blockquote, pre {
    font-size: 0.95rem;
    padding: 1rem 1.5rem;
    line-height: 1.4;
    margin: 1rem 0;
    /* border-left: var(--highlight) .1rem solid; */
    font-style: italic;
    background: var(--highlight);
    color: var(--background);
    width: calc(100% - 4.5rem);
    overflow: auto;
}

blockquote a {
    color: var(--background) !important;
}

blockquote ::selection {
    background: var(--background);
    color: var(--highlight);
}

pre {
    background: var(--foreground);
    border-left: unset;
}

code {
    font-size: 0.9rem;
    color: var(--background);
    background: var(--foreground);
    padding: 0.25rem; 
    padding-bottom: 0.15rem;
    border-radius: 2px;
    /* make entire contents selectable by one click */
    -webkit-touch-callout: all;
    -webkit-user-select: all;
    -khtml-user-select: all;
    -moz-user-select: all;
    -ms-user-select: all;
    user-select: all;
}

pre code {
    border-style: dotted;
    color: var(--background);
    padding: unset;
    border-radius: unset;
    background: unset;
    -webkit-touch-callout: unset;
    -webkit-user-select: unset;
    -khtml-user-select: unset;
    -moz-user-select: unset;
    -ms-user-select: unset;
    user-select: unset;
}

img {
    padding: 1rem;
    display: block;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
}

h1 + ul, h2 + ul, h3 + ul, 
h1 + ol, h2 + ol, h3 + ol {
    padding-top: 1rem;
}

ul, ol { margin-left: 1rem; }
ul { list-style: circle; }
li > ul, li > ol { margin-left: 2rem; }
li { margin-bottom: 0.25rem; }

p {
    padding: .5rem 0;
}

table {
    margin-top: 1rem;
    margin-bottom: 1rem;
}

td, th {
    padding: 0.5rem;
    border: 1px var(--foreground) solid;
}

#clone {
    display: flex;
    flex-direction: column;
    align-items: start;
    font-size: 0.75rem;
    line-height: 1.1;
    max-width: max-content;
    border-radius: 8px;
    background: var(--foreground);
    color: var(--background);
    padding: 0.5rem;
    row-gap: 0.25rem;
    font-style: italic;
}
#clone > span:nth-of-type(2) {
    user-select: all;
}

.visible { display: block; }

/* ipad max-width */
@media screen and (max-width: 768px) {
    .content {
        margin: 3rem auto 6rem auto;
        width: 30rem;
    }

    article {
        padding: 0rem 1rem;
    }
}

footer {
    margin-top: 1rem;
    display: grid;
}

.webring a:after {
    content:"";
}

footer > .webring {
    width: 2rem;
    height: 2rem;
    margin: 0;
    padding: 0;
    justify-self: right;
}

footer > .webring img {
    padding: 0;
    margin: 0;
}

.spacer { height: 2rem; }

ul.main-navigation > li:first-of-type {
    flex-grow: 1;
}
.main-navigation {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-end;
    row-gap: 0.1rem;
    column-gap: 0.5rem;
    list-style: none;
    margin-left: 0;
}

.main-navigation > li:nth-of-type(2) {
	translate: 5px;
}
.main-navigation > li:nth-of-type(3) {
	transform: rotate(4deg); 
	translate: 1px 2px;
}
.main-navigation > li:nth-of-type(4) {
	transform: rotate(19deg);
	translate: -3px 9px;
}
.main-navigation > li:nth-of-type(5) {
	transform: rotate(36deg);
	translate: -10px 26px;
}

button, input {
    color: var(--foreground);
    background: var(--background);
    border-radius: 8px;
    padding: 0.1rem 0.25rem;
    margin: 0.1rem;
    cursor: pointer;
    border: var(--foreground) solid 0.1rem;
}
button:hover, input:hover {
    color: var(--background);
    background: var(--foreground);
}

@media screen and (max-width: 880px) {
    article, body { padding: 0 1rem; }
    body { padding: 2rem; }
}


/* IPHONE 5S/SE*/
@media only screen 
and (min-device-width : 320px) 
and (max-device-width : 667px) {
    html {
        font-size: 11pt;
        line-height: 1.5;
    }

    pre {
        padding: 0.25rem; 
        padding-left: 0.5rem;
        width: 100%;
    }
    pre code {
        position: relative;
        font-size: 9pt;
    }
    img {
        padding: unset;
        padding-bottom: 0.5rem;
    }

    article, body { 
        margin: 1rem auto 1rem auto;
        margin-top: 1rem !important;
        padding: 0rem 1rem;
    }
    body {
        padding: 1rem;
    }

    .itch-embed {
        width: 200px;
    }

}
