@import url("./fonts/style.css");
@import url("./elements.css");

:root {
  --color-bg-scrim: #111;
  --color-bg-overlay: #111e;
  --color-bg: #222;
  --color-bg-bg: #222e;
  --color-bg-bg-bg: #2228;
  --color-code: #000;
  --color-code-text: #888;
  --color-text: #ccc;
  --color-accent: #f8c;
  --gradient-main: linear-gradient(in hwb 90deg, #c8a, #ca8, #ac8, #8ca, #8ac, #a8c, #c8a);
  --gradient-accented: linear-gradient(in hwb 90deg, #f8c, #fad, #f8c, #f8c);

  font-size: 12px;
  font-smooth: never;
  -webkit-font-smoothing: antialiased;
}

html {
  height: 100%;
  width: 100%;
  background: var(--color-bg-scrim);
  background-image: linear-gradient(var(--color-bg-overlay), var(--color-bg-overlay)), url("https://cdn.abtmtr.link/site_content/bg_stack/hq.png"), url("https://cdn.abtmtr.link/site_content/bg_stack/lq_2.jpg"), url("https://cdn.abtmtr.link/site_content/bg_stack/lq_3.jpg"), url("https://cdn.abtmtr.link/site_content/bg_stack/lq_4.jpg"), url("https://cdn.abtmtr.link/site_content/bg_stack/lq_5.jpg"), url("https://cdn.abtmtr.link/site_content/bg_stack/lq_6.jpg");
  background-position: 50% calc(50% + (var(--scroll-y) * 0.5));
  /*background-image: linear-gradient(in hwb 90deg, #c8a2, #ca82, #ac82, #8ca2, #8ac2, #a8c2, #c8a2);
  background-attachment: fixed;
  background-size: 200% 100%;
  animation: rainbow-gradient 30s linear infinite;*/
}

body {
  margin: 0 auto;
  padding: 0.1px 2ch;
  min-height: 100%;
  box-sizing: border-box;
  width: 100%;
  max-width: 640px;
  background: var(--color-bg-bg);
  color: var(--color-text);
  font-family: var(--font-main);
  /* box-shadow: 0 0 16em #fff1; */
}

.extratext {
  margin-inline-start: 6ch;
  opacity: 0.75;
}

.extratext::before {
  content: "↳ “";
}

.extratext::after {
  content: "”";
}

.matkap_ascii {
  display: inline-block;
  position: fixed;
  right: 0;
  bottom: 0;
  width: 80ch;
  white-space: pre;
  user-select: none;
  pointer-events: none;
  /* z-index: -1; */
  opacity: 0.1;
  line-height: 1;
}

.entity_box {
  margin: 3rem 1ch;
  padding-inline: 1ch;
  padding-block: 0.1px;
  /* border: 1ch 1rem solid var(--color-accent); */
  border-image: url("/assets/accents/9s_chr.png");
  border-image-slice: 12 6;
  border-image-width: 1rem 1ch;
  border-image-repeat: stretch;
  border-image-outset: 1.25rem 1ch;
}

@keyframes rainbow-gradient {
  0% {
    background-position: 0% 0%;
  }

  100% {
    background-position: -200% 0%;
  }
}

.welcome-header {
  text-align: center;
  padding: 2em 4ch;
  font-size: 24px;
  line-height: 1.25em;
  box-shadow: inset -1px -1px 0 0 #fff8,
    inset 1px 1px 0 0 #0008,
    inset 0 0 1em #fff4;
  text-shadow: 0 0 0.5em #fff4;
  background-image: var(--gradient-accented);
  background-attachment: fixed;
  background-size: 640px 100%;
  animation: rainbow-gradient 30s linear infinite;
}

.main-header {
  text-align: center;
  padding: 1em 2ch;
  font-size: 24px;
  line-height: 1.25em;
  box-shadow: inset -1px -1px 0 0 #fff8,
    inset 1px 1px 0 0 #0008,
    inset 0 0 1em #fff4;
  text-shadow: 0 0 0.5em #fff4;
  background-image: var(--gradient-accented);
  background-attachment: fixed;
  background-size: 640px 100%;
  animation: rainbow-gradient 30s linear infinite;
}

aside#main-sidebar {
  box-sizing: border-box;
  display: inline-block;
  position: fixed;
  left: calc(50% - (320px + 30ch));
  top: 0;
  padding: 0.1px 2ch;
  width: 30ch;
  height: 100%;
  overflow: hidden;
  overflow-y: auto;
  word-wrap: break-word;
  text-overflow: ellipsis;
  background: var(--color-bg-bg-bg);
}

@media (max-width: 1071px) and (scripting: enabled) {
  body {
    margin-right: 0;
    margin-left: calc((50% + 15ch) - 320px);
  }

  aside#main-sidebar {
    left: calc(50% - (320px + 15ch));
    /* display: none; */
  }
}

@media (max-width: 855px) and (scripting: enabled) {
  body {
    margin-right: 0;
    margin-left: 30ch;
    width: calc(100% - 30ch);
  }

  aside#main-sidebar {
    left: 0;
    /* display: none; */
  }
}

@media (max-width: 640px) and (scripting: enabled) {
  body {
    margin-right: 0;
    margin-left: 4ch;
    width: calc(100% - 4ch);
  }

  aside#main-sidebar {
    background: var(--color-bg-bg);
    z-index: -1;
    width: calc(100% - 4ch);
  }

  aside#main-sidebar:hover,
  aside#main-sidebar:active,
  aside#main-sidebar:focus,
  aside#main-sidebar:focus-within,
  aside#main-sidebar:has(:focus) {
    z-index: 1;
  }
}

@property --hue {
  syntax: '<number>';
  initial-value: 0;
  inherits: false;
}

@keyframes hue-shift {
  0% {
    --hue: 0;
  }

  50% {
    --hue: 180;
  }

  100% {
    --hue: 360;
  }
}

.web-button img {
  vertical-align: baseline;
}

.web-button {
  position: relative;
  left: 0;
  top: 0;
  transition: box-shadow 0.5s ease-out, left 0.5s ease-out, top 0.5s ease-out;
  opacity: 1 !important;
  display: inline-block;
  width: 88px;
  height: 31px;
  line-height: 31px;
  border: 1px solid black;
  vertical-align: middle;
  margin: 0.5rem;
  text-decoration: none;
  text-align: center;
  background: unset;
  animation: hue-shift 15s linear infinite;
  -webkit-background-clip: unset;
  /* text-overfloextratextw: ellipsis;
   * overflow: hidden;
   * padding: 0 8px;
   * box-sizing: border-box; */
}

.web-button.noimg {
  text-shadow: 1px 1px 0 #000;
  box-shadow:
    inset -1px -1px 0 0 #000,
    inset 1px 1px 0 0 #fff,
    inset -2px -2px 0 0 #0008;
  /* background-image: linear-gradient(135deg, transparent, #8888); */
}

.web-button:hover {
  left: -4px;
  top: -4px;
  z-index: 999;
  transition: all 0.0625s ease-out;
  --shadow: hsl(var(--hue), 50%, 75%);
  box-shadow:
    4px 4px 0 -1px var(--shadow),
    3px 3px 0 -1px var(--shadow),
    2px 2px 0 -1px var(--shadow),
    1px 1px 0 -1px var(--shadow),
    4px 4px 0 0px black,
    3px 3px 0 0px black,
    2px 2px 0 0px black,
    1px 1px 0 0px black;
}

.web-button.noimg:hover {
  box-shadow:
    inset -1px -1px 0 0 #000,
    inset 1px 1px 0 0 #fff,
    inset -2px -2px 0 0 #0008,
    4px 4px 0 -1px var(--shadow),
    3px 3px 0 -1px var(--shadow),
    2px 2px 0 -1px var(--shadow),
    1px 1px 0 -1px var(--shadow),
    4px 4px 0 0px black,
    3px 3px 0 0px black,
    2px 2px 0 0px black,
    1px 1px 0 0px black;
}