/* I know that this code is really shitty. */

@font-face {
  font-family: 'FreePixel';
  src: url('./FreePixel.ttf') format('truetype');
}

* {
  box-sizing: border-box;
  margin: 0; padding: 0;
}

:root {
  /* appearance */
  --line-height: 0.92em;
  --fg: #FFFFFF; --bg: #000000;
  --accent-col: #0000ff;
  --t-hover-m-col: #0000a3;
  --t-hover-a-col: #0000db;
  --t-hover-s-col: #0000db;

  /* text */
  --root-font: 'FreePixel', Consolas, monospace;
}

/*** webpage ***/

html {
  animation: 24s linear infinite rgb;
}

@keyframes rgb {
  from {
    filter: hue-rotate(0deg);
  }
  to {
    filter: hue-rotate(720deg);
  }
}

::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: #000;
}

::-webkit-scrollbar-thumb {
  background: black;
  border: 1px solid #fff;
  background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
  border: 1px solid #fff;
}

html_:before, .noise {
  content: " ";
  position: absolute;
  width: 100vw; height: 100%;
  top: 0; left: 0;
  z-index: 999;
}
html_:before, .noisy {
  background: 
    repeating-radial-gradient(#000 0 0.0001%,#fff 0 0.0002%) 50% 0/2500px 2500px,
    repeating-conic-gradient(#000 0 0.0001%,#fff 0 0.0002%) 60% 60%/2500px 2500px;
  background-blend-mode: difference;
  mix-blend-mode: multiply;
  animation: b .16s infinite alternate;
  opacity: 0.03; 
  filter: contrast(0.7) saturation(0);
  pointer-events: none;
}

@keyframes b{
  100% {background-position: 50% 0, 60% 50%}
}

html::after {
  content: " ";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-image:
    linear-gradient(90deg, #000000 25%, #0000 25%), 
    /* linear-gradient(90deg, #000000 50%, #0000 50%), */
    linear-gradient(0deg, #000000 50%, #0000 50%);
  opacity: 0.5;
  background-blend-mode: overlay;
  mix-blend-mode: overlay;
  background-size: 4px 2px;
  pointer-events: none;
  z-index: 99;
}

body {
  margin: 0;
  overflow: auto;
  color: var(--fg);
  background-color: var(--bg);
  
  width: 100vw;
  height: 100vh;
  
  font-family: var(--root-font);
  line-height: var(--line-height);

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.container {
  max-width: 55rem;
  margin: 40px 12px auto;
  
  border: 1px solid var(--border);
  outline-offset: 4px;
  border-radius: 1px solid var(--border);
  background-color: var(--bg);
  
  display: flex;
  flex-wrap: wrap;
  padding: 5px;
  gap: 1px;
  position: relative;
}

.small { 
  flex: 1 1 9%; 
}
.large { 
  flex: 1 1 82%; 
}
.full { 
  flex: 1 1 100%; 
}
.half { 
  flex: 1 1 49%;
}

header {
  position: relative;
	background-image: url('/assets/images/1.png');
	background-size: cover;
	background-position: center;
	width: 100%;
	height: 120px;
	border: 1px solid var(--border);
	border-radius: 0px;
}

header span {
	font-size: 2.5rem;
	position: absolute;
	bottom: 0;
	right: 10px;
	margin: 10px;
	font-weight: bold;

	text-shadow: 1px 1px var(--bg),     
		-1px 1px var(--bg),            
		1px -1px var(--accent-col),    
		-1px -1px var(--accent-col);   
	color: var(--fg);                  
}

nav {
  border: 1px solid var(--accent-col);
  background: var(--bg);
  height: 300px; 
  overflow-y: auto;
  overflow-x: hidden;
}

/* nav styling */

nav div {
	text-align: left;
	font-size: 1.25rem;
	margin: 5px 5px 10px 5px;
}

nav details {
  display: block;
  margin: 5px;
}

nav summary {
  display: list-item;
  text-align: left;
  background: var(--bg);
  border: 1px solid var(--accent-col);
  padding: 2px 7px;
  color: var(--fg);
  cursor: pointer;
}

nav summary::-webkit-details-marker {
  display: inline-block;
}

nav summary:hover, nav summary:focus {
  background: var(--t-hover-m-col);
}

nav details a {
  margin: 5px 5px 5px 15px;
}

nav a {
	display: block;
	margin: 5px;
	background: var(--bg);
	border: 1px solid var(--accent-col);
	padding: 2px 7px;
	text-decoration: none;
}

nav a:link, nav a:visited { 
  text-align: left;
	color: var(--fg);
}

nav a:hover, nav a:focus {
  text-align: left;
	background: var(--t-hover-m-col);
	text-decoration: underline;
}

updates {
  display: block;
  height: 300px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 5px;
  background: var(--bg);
  border: 1px solid var(--accent-col);
}

/* updates styling */

updates div {
  text-align: left;
  font-size: 1.25rem;
}

updates details {
  display: block;
  margin: 5px;
}

updates summary {
  display: list-item;
  text-align: left;
  background: var(--bg);
  
  padding: 2px 7px;
  color: var(--fg);
  cursor: pointer;
}

updates summary::-webkit-details-marker {
  display: inline-block; 
}

updates summary:hover, updates summary:focus {
  background: var(--t-hover-m-col);
}

updates details a {
  margin: 5px 5px 5px 15px;
}

updates a {
	display: block;
	margin: 5px;
	background: var(--bg);
	text-decoration: none;
}

updates a:link, updates a:visited { 
  text-align: left;
	color: var(--fg);
}

updates a:hover, updates a:focus {
  text-align: left;
  background: var(--t-hover-m-col);
  text-decoration: underline;
}

/* section */

div.small > img {
	display: block;
	margin: 5px auto;
	border: 1px solid var(--accent-col);
}

section {
	border: 1px solid var(--accent-col);
	background: var(--bg);
	padding: 5px;
}

.small details[open] { 
  & > summary { 
    color: #fff; 
  } 
  & > summary::marker { 
    content: "▼ "; 
  } 
} 
.small details[open] > summary:active { 
  color: #fff; 
  &::marker { 
    content: "► "; 
  } 
} 
.small details > summary::marker { 
  content: "► "; 
} 
.small details:not([open]) > summary:hover { 
  color: #fff; 
  &::marker { 
    content: "-► "; 
  } 
} 
.small details:not([open]) > summary:active { 
  color: #fff; 
  &::marker { 
    content: "--► "; 
  } 
}

footer {
	text-align: center;
	margin-bottom: 5vw;
	font-size: 0.8rem;
}

footer a { 
	text-decoration: none;
	color: var(--accent-col);
}

footer a:hover {
	color: var(--t-hover-a-col);
}

/* other shit */

a {
  text-decoration: none;
  color: #fff;
}

a:link, a:visited {
	color: #fff;
}

a:hover, a:focus {
  text-align: left;
  background: var(--t-hover-m-col);
  text-decoration: underline;
}

marquee {
  width: 100%;
  height: 100%;
  margin: 0; 
}

h1, h2, h3, h4, h5, h6 { 
  margin-top: 0.2em; 
  margin-bottom: 0.4em; 
  display: block;
  text-align: left; 
  color: var(--accent-col); 
  font-weight: 600;
}

p {
  font-size: 16px;
}

img { 
  max-width: 100%; 
  image-rendering: pixelated;
  filter: grayscale(100%);
}

img:hover {
  filter: none;
}

pre { 
  overflow-x: auto; 
}

/* transition */

.fade-in {
	opacity: 1;
	animation-name: fadeInOpacity;
	animation-iteration-count: 1;
	animation-timing-function: ease-in;
	animation-duration: 1s;
}

@keyframes fadeInOpacity {
	0% {
		opacity: 0;
	}
	100% {
		opacity: 1;
	}
}