:root {
    --measure: 46rem;
    --navbar-width: 50rem;
}

:root {
    --fg: #000000;
    --bg: #fbf7f0;
    --fg-dim: #4f4941;
    --bg-dim: #efe9dd;
    --highlight: #721045;
    --tags: #046558;
    --grey: #595959;
    --lily: #264a03;
}

@media (prefers-color-scheme: dark) {
    :root {
	--fg: #e4d3e1;
	--bg: #1e1e2e;
	--fg-dim: #9d9d9d;
	--bg-dim: #2f2124;
	--highlight: #ffaff3;
	--tags: #9de7e4;
	--grey: #595959;
	--lily: #9cbd6f;
    }
}

html {
    font-size: 100%;
    line-height: 1.5;
    background-color: var(--bg);

    font-family: "Atkinson Hyperlegible", sans-serif;

    /* idk dude chrome is weird */
    text-size-adjust: none;
    color: var(--fg);
    hyphens: auto;
}

.title,
.subtitle {
	text-align: center;
}

.title {
	margin-top: 2rem;
}

.subtitle {
	margin-bottom: 2rem;
}

h1 {
	font-size: 1.4rem;
}

h2 {
	font-size: 1.2rem;
}

hr {
    color: var(--fg);
}

header {
    display: flex;
    flex-flow: row wrap;
    justify-content: space-between;
    margin-bottom: 1em;
}

nav.div {
    display: block;
    float: right;
}

nav a + a {
    margin-left: 0.33em;
}

time.post-time {
	font-family: "Maple Mono", monospace;
	margin-right: 0.5em;
	font-size: 87.5%;
}

ul.blog-posts {
    list-style-type: none;
    padding: unset;
}

ul.blog-posts li {
    display: flex;
}

ul.blog-posts li span {
    flex-grow: 0;
    flex-shrink: 0;
    padding-right: 0.5rem;
}

a.post-list-title {
    color: var(--fg);
    font-size: 125%;
    font-weight: bold;
    text-decoration: none;
}

a.post-list-title:hover {
    text-decoration: underline;
}

a.tag-link {
    color: var(--tags);
}

.post-nav {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5em;
}

.post-nav-section {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.post-nav-section a.next {
    text-align: right;
}

body {
    font-family: "Atkinson Hyperlegible", sans-serif;
    font-size: 100%;

    /* idk dude chrome is weird */
    text-size-adjust: none;
    color: var(--fg);
    hyphens: auto;
}

header {
    margin: auto;
    padding-top: 1rem;
    padding-bottom: 0;
    width: min(95%, var(--navbar-width));
}

#main {
    margin: auto;
    width: min(95%, var(--measure));
}

code {
	font-family: "Maple Mono", monospace;
	font-size: 87.5%;
}

details,
blockquote {
	border-left: 0.2rem solid var(--grey);
	margin: 0;
	padding-left: 1rem;
}

summary:hover {
    text-decoration: underline;
    cursor: pointer;
}

pre {
    border-width: 0.2rem 0 0.2rem 0;
    border-color: var(--grey);
    border-style: solid;
    padding: 1rem;
    overflow: auto;
}

img {
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-top: 1em;
    margin-bottom: 1em;
    object-fit: contain;
    max-width: 100%;
    height: auto;
}

img.thumbnail {
    margin-top: 2em;
    margin-bottom: 2em;
    max-width: 25%;
    border-radius: 50%;
}

.dialog {
    display: flex;
    flex-direction: row;
    align-items: center;
    margin: 1rem 0;
    padding-left: 0;
    border: none;
}

.dialog .dialog-speaker {
    align-self: flex-start;
    flex: none;
    width: 3rem;
    height: 3rem;
    margin: 0 0.5rem;
}

.dialog .dialog-text {
    padding-left: 0.5rem;
    color: var(--lily);
    margin: 0;
}

a {
    /* color: var(--fg); */
    color: var(--highlight);
    text-decoration: underline;
}

a:hover {
	text-decoration: none;
}

.webring-line {
    text-align: center;
}

#badge-zone {
	display: flex;
	justify-content: center;
}

#badge-zone img {
	border-style: none;
	margin: 0.5em;
}

form {
    width: 100%;
    display: flex;
    justify-content: space-between;
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: 100%;
}

input[type="email"] {
    border: none;
    border-bottom: 0.1rem solid var(--grey);
    padding: 0.5rem 0;
    width: 100%;
    margin: 0;
    background: none;
}

input[type="submit"] {
    border: none;
    background: var(--fg);
    color: var(--bg);
    padding: 0.6rem;
    margin: 0;
    margin-left: 1rem;
}

input[type="submit"]:hover {
    background: var(--highlight);
    cursor: pointer;
}

/* From https://accessibility.oit.ncsu.edu/it-accessibility-at-nc-state/developers/accessibility-handbook/mouse-and-keyboard-events/skip-to-main-content/ */
a.skip-main {
    position: absolute;
    left: -9999px;
    background-color: #000;
    color: #fff;
    padding: 0.25em 1em;
    border-radius: 16px;
    border: 4px solid yellow;
    text-align: center;
    font-size: 1.25em;
}

a.skip-main:focus,
a.skip-main:active { left: auto; }

::selection {
  background: var(--fg);
  color: var(--bg);
}
