/* LAST UPDATED: 17 04 2025 */

/* ======= FONTS, SLOPPY IMPLEMENTATION ======= */


/* libre-baskerville-regular - latin-ext_latin */
@font-face {
  font-family: 'Libre Baskerville';
  font-style: normal;
  font-weight: 400;
  src: local(''),
       url('/_webfonts/libre-baskerville/libre-baskerville-v14-latin-ext_latin-regular.woff2') format(as'woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
       url('/_webfonts/libre-baskerville/libre-baskerville-v14-latin-ext_latin-regular.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}

/* libre-baskerville-italic - latin-ext_latin */
@font-face {
  font-family: 'Libre Baskerville';
  font-style: italic;
  font-weight: 400;
  src: local(''),
       url('/_webfonts/libre-baskerville/libre-baskerville-v14-latin-ext_latin-italic.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
       url('/_webfonts/libre-baskerville/libre-baskerville-v14-latin-ext_latin-italic.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}

/* libre-baskerville-700 - latin-ext_latin */
@font-face {
  font-family: 'Libre Baskerville';
  font-style: normal;
  font-weight: 700;
  src: local(''),
       url('/_webfonts/libre-baskerville/libre-baskerville-v14-latin-ext_latin-700.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
       url('/_webfonts/libre-baskerville/libre-baskerville-v14-latin-ext_latin-700.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}

/* biz-udmincho-regular - latin-ext_latin */
@font-face {
  font-family: 'BIZ UDMincho';
  font-style: normal;
  font-weight: 400;
  src: local(''),
       url('/_webfonts/biz-udmincho/biz-udmincho-v5-latin-ext_latin-regular.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
       url('/_webfonts/biz-udmincho/biz-udmincho-v5-latin-ext_latin-regular.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}

/* ======= RESET ======= */

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,a
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
}

* { box-sizing: border-box; }


/* ======= VARIABLES ======= */

:root {
  --desktop-font-size: 14pt/1.5; /* font size / line height */
  --mobile-font-size: 13pt/1.4; /* font size / line height */
  --body-font: "Trebuchet MS", "Helvetica Neue", "Helvetica", sans-serif;

  --fancy-font: "Libre Baskerville", "Baskerville", "Abyssinica SIL", "Georgia", serif;
  --mono-font: "DejaVu Sans Mono", monospace;

  --bg: #c4bfb5; /* #f3e7cf; */
  --text: #191817;
  --accent: #800000;

  --transparent: rgba(0, 0, 0, 0);
}


/* not a variable but it has to go here or it gets messed up */

::-moz-selection, ::selection {
  background: var(--accent);
  color: var(--bg);
}

/* ======= DARK THEME ======= */

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #191817;
    --text: #A29A92;
    --accent: #FF313C;
  }

  ::-moz-selection, ::selection { background: var(--text); }
}

/* ======= HIGH CONTRAST, LITERALLY NO BROWSER HAS IMPLEMENTED THIS YET ======= */

@media (prefers-contrast: more) {
  :root {
    --bg: white;
    --text: black;
  }
}

@media (prefers-contrast: more) and (prefers-color-scheme: dark) {
  :root {
    --bg: black;
    --text: white;
  }
}

/* ======= MAIN STYLING ======= */

body {
  color: var(--text);
  background: var(--bg);
  max-width: 800px;
  margin: 2% auto;
  font: var(--desktop-font-size) var(--body-font, sans-serif);
}

img {
  max-width: 800px;
  max-height: 800px;
  max-height: 100vh;
  margin-bottom: 0;
  padding-bottom: 0;
}


p,blockquote,dl,img,figure {
  margin: 1em 0;
}

/* headers */

h1,h2,h3,h4,h5,h6 {
  font-family: "BIZ UDMincho", "MS Mincho", "Hiragino Mincho Pro", var(--fancy-font), serif;
  text-transform: uppercase;
  margin-top: 2em;
  margin-bottom: 0;
  padding-bottom: 0;
  color: var(--accent);
  letter-spacing: 0.05em;
}

h1 {
  font-size: 150%;
  border-bottom: 2px solid var(--accent);
  color: var(--accent);
  margin-top: 0;
}

h2 {
  font-size: 125%;
}

h3, h4, h5, h6 {
  font-size: 110%;
}

/* text spice */

a, a:visited {
  color: var(--accent);
  /* font-family: var(--mono-font), monospace;
  font-size: 85%; */
  text-decoration: none;
}

a:hover {
  text-decoration: initial;
  font-style: italic;
  text-shadow: 0px 0px 1px;
}

a[href^="gemini://"]::after {
  content: " ♊︎";
  color: var(--text);
  opacity: 50%;
}

a[href^="gemini://"]:hover::after {
  content: " gemini link";
  font-size: 80%;
}


strong, b {
  font-weight: bold;
}

time {
  font-family: var(--mono-font);
  font-size: 80%;
}

em, dfn {
  font-style: italic;
  font-family: var(--fancy-font), serif;
}

i {
  font-style: italic;
  font-family: inherit;
}

mark {
  background: var(--accent);
  color: var(--bg);
  font-size: 80%;
  font-family: var(--mono-font), monospace;
  font-variant-caps: all-petite-caps;
  padding-left: 0.25em;
  padding-right: 0.25em;
}

span {
  background: none;
  color: var(--accent);
}

hr {
  height: 1px;
  border: none;
  background: linear-gradient(to right, var(--accent), var(--transparent));
}

/* ======= MISC STYLING ======= */

ul {
  list-style: circle;
  margin: inherit;
}

ul ul, ol ol, ol ul, ul ol {
  margin-left: 2.5em;
}

sub {
  font-size: 60%;
  vertical-align: bottom;
}

small {
  font-size: 80%;
}

blockquote {
  border-left: 10px solid var(--accent);
  display: block;
  padding: 1em;
}

quote, q {
  border-bottom: 2px solid var(--accent);
  font-style: italic;
}

cite {
  font-style: italic;
  font-weight: bold;
}

aside {
  padding: 1em;
	margin: 1em 3em;
	border: 1px solid var(--accent);
	font-size: 80%;
}

kbd, code, samp, pre, var {
  font-family: var(--mono-font), monospace;
  font-weight: bold;
}

code, pre {
    background: var(--text);
    color: var(--bg);
    padding: 0.125em;
    font-size: 80%;
    line-height: 1;
}

code pre, pre code {
  padding: 0;
}

details {
  width: 100%;
  border: 1px var(--text) solid;
  margin: 0.5em 0;
}

summary {
  padding: 1em;
}

details p, details img {
  padding: 0 0.5em;
  max-width: calc(100% - 1em);
}

iframe {
  max-width: 100%;
}

/* ====== CLASSES (blergh) ====== */

.caption {
  font-size: 80%;
  font-style: italic;
  margin-top: 0;
  padding-top: 0;
}

.spoiler {
  background: var(--text);
  color: var(--text);
  text-shadow: none;
}

.spoiler:hover {
  color: var(--bg);
}

.info {
  font-size: 80%;
  opacity: 80%;
}

.house {
  color: #4646ff;
  text-shadow: none;
}



/* ======= MOBILE STYLING ======= */

@media screen and (max-width: 50em) {
    body {
      font: var(--mobile-font-size) var(--body-font, sans-serif);
      padding: 1em;
    }
    img { max-width: 100%; }
    aside { margin: inherit; }
    a em, em a { font-size: 13pt; }
}

/* ======= PRINT ======= */

@media print {
  :root {
    --bg: white;
    --text: black;
    --desktop-font-size: 12pt/1.5; /* font size / line height */
  }

  a::after {
    content: " [" attr(href) "]";
  }

  img {
    display: block;
    break-inside: avoid;
    page-break-inside: avoid;
  }
}
