/* theme-bios.css for git.darkovski.dev
 *
 * A DarkovskiBIOS skin for Forgejo, layered over the stock dark theme.
 * Forgejo loads theme-<name>.css from the custom assets directory, and
 * this file is bind mounted there from ~/server/forgejo/css.
 *
 * The typeface is "Px437 IBM VGA 8x16" from The Ultimate Oldschool PC
 * Font Pack v2.2 by VileR (int10h.org/oldschool-pc-fonts), CC BY-SA 4.0,
 * loaded cross-origin from the main site which sends CORS headers on
 * its fonts. A forge is a dense UI, so the pixel font is reserved for
 * the brand, headings, and code, and the system font keeps body text
 * readable.
 */

@import url("theme-forgejo-dark.css");

@font-face {
  font-family: "Px437 IBM VGA 8x16";
  src: url("https://darkovski.dev/fonts/Px437_IBM_VGA_8x16.woff2") format("woff2");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  /* The BIOS palette mapped onto Forgejo's theme variables. */
  --color-body: #0000aa;
  --color-box-body: #0000aa;
  --color-box-header: #000088;
  --color-navbar: #000088;
  --color-menu: #000088;
  --color-card: #000088;
  --color-input-background: #000088;
  --color-light: #000088;
  --color-active: #0000d5;
  --color-hover: #0000d5;
  --color-secondary: #bfbfbf;
  --color-secondary-dark-1: #bfbfbf;
  --color-text: #dfdfdf;
  --color-text-dark: #ffffff;
  --color-text-light: #bfbfbf;
  --color-text-light-1: #bfbfbf;
  --color-text-light-2: #bfbfbf;
  --color-primary: #ffff55;
  --color-primary-contrast: #0000aa;
  --color-primary-dark-1: #ffff88;
  --color-primary-dark-2: #ffffaa;
  --color-primary-light-1: #dddd44;
  --color-warning-text: #ffff55;
  --color-red: #ff5555;
  --color-error-text: #ff5555;
  --fonts-monospace: "Px437 IBM VGA 8x16", ui-monospace, monospace;
  /* Forgejo 13 names the navigation and footer surfaces separately. */
  --color-nav-bg: #000088;
  --color-nav-hover-bg: #0000d5;
  --color-nav-text: #dfdfdf;
  --color-secondary-nav-bg: #000088;
  --color-footer: #000088;
  --color-header-wrapper: #000088;
}

/* Pixel font where it reads as chrome rather than prose. */
.navbar .brand,
.page-footer,
.page-content h1,
.page-content h2,
.repo-title {
  font-family: "Px437 IBM VGA 8x16", monospace;
  font-weight: normal;
  -webkit-font-smoothing: none;
}

/* Square everything off. A BIOS has no rounded corners. */
* { border-radius: 0 !important; }

/* CRT scanlines, same recipe as the rest of the fleet. */
@media (prefers-reduced-motion: no-preference) {
  body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 2000;
    pointer-events: none;
    background: repeating-linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.14) 0px,
      rgba(0, 0, 0, 0.14) 1px,
      transparent 1px,
      transparent 3px
    );
  }
}
