/* --------
   Base junk
-------- */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  /* font-family: monospace; */
  background: #030202;
  color: #FC5DA2;
}


@font-face {
  font-family: 'dystopian_demo';
  src: url(/fonts/dystopian_demo/sddystopiandemo-go7xa-webfont.woff);
}


@font-face {
  font-family: 'leander';
  src: url(/fonts/leander/leander-webfont.woff);
}

/* -----------------
   Easy reusables
------------------ */

.center-children {
  display: flex;
  align-items: center;
  justify-content: center;
}

.fill-page {
  min-height: 100vh;
  min-width: 100vw;
}


/* -----------------
   Page grid layout
------------------ */

.layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  grid-template-rows: auto 1fr;
  grid-template-areas:
    "header header"
    "sidebar content";
  min-height: 100vh;
}

/* --------
   Header
-------- */

.header {
  grid-area: header;
  border-bottom: 3px solid #FC5DA2;
  background-image: url('/images/shared/header.gif');
  background-size: 100% 100%;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 12px 16px;
}

.header-title {
  margin: 0;
  font-size: 4rem;
  font-family: 'dystopian_demo';
  -webkit-text-stroke: 1.5px rgb(17, 16, 16);
  position: relative;
  display: inline-block;
  white-space: nowrap;
  cursor: default;
}

.header-title .ch {
  display: inline-block;
  -webkit-text-stroke: 1.5px rgb(17, 16, 16);
}

.header-title::before,
.header-title::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  white-space: nowrap;
}

.header-title::before {
  text-shadow: -2px 0 #00ff99;
  transform: translate(0, 0);
}

.header-title::after {
  text-shadow: 2px 0 #FC5DA2;
  transform: translate(0, 0);
}

/* Short bursts (toggled by JS via .glitching). */
.header-title.glitching::before {
  opacity: 0.75;
  animation: header-glitch-slice 220ms steps(2, end) infinite;
}

.header-title.glitching::after {
  opacity: 0.75;
  animation: header-glitch-slice 180ms steps(2, end) infinite reverse;
}

/* Hover: stronger but still (barely) legible. */
.header-title:hover::before,
.header-title:hover::after {
  opacity: 0.95;
  animation-duration: 85ms;
}

.header-title .ch.twitch {
  transform: translate(var(--dx), var(--dy)) skewX(var(--skew));
  text-shadow: 1px 0 #00ff99, -1px 0 #FC5DA2;
}

.header-subtitle.shuffling {
  text-shadow: 1px 0 rgba(0, 255, 153, 0.35), -1px 0 rgba(252, 93, 162, 0.35);
}

.header-subtitle.foreboding {
  color: #b00020;
  font-weight: 800;
  -webkit-text-stroke: 1.4px rgb(10, 0, 0);
  text-shadow:
    0 0 6px rgba(176, 0, 32, 0.45),
    0 0 18px rgba(176, 0, 32, 0.25);
}

@keyframes header-glitch-slice {
  0% {
    clip-path: inset(10% 0 85% 0);
    transform: translate(-1px, 0);
  }

  20% {
    clip-path: inset(60% 0 15% 0);
    transform: translate(2px, -1px);
  }

  40% {
    clip-path: inset(25% 0 55% 0);
    transform: translate(-2px, 1px);
  }

  60% {
    clip-path: inset(75% 0 5% 0);
    transform: translate(1px, 1px);
  }

  80% {
    clip-path: inset(40% 0 35% 0);
    transform: translate(2px, 0);
  }

  100% {
    clip-path: inset(10% 0 85% 0);
    transform: translate(0, 0);
  }
}

@media (prefers-reduced-motion: reduce) {

  .header-title::before,
  .header-title::after {
    animation: none !important;
    opacity: 0 !important;
    transform: none !important;
  }

  .header-title .ch.twitch {
    transform: none !important;
    text-shadow: none !important;
  }
}

.header-subtitle {
  margin: 0;
  font-size: 1.5rem;
  font-family: 'leander';
  -webkit-text-stroke: 1px rgb(17, 16, 16);
}

/* --------
   Sidebar
-------- */

.sidebar {
  grid-area: sidebar;
  background: #080808;
  border-right: 3px solid #FC5DA2;
  padding: 12px;
}

.nav {
  display: flex;
  /* flexbox column menu */
  flex-direction: column;
  gap: 10px;
}

.nav a {
  color: #FC5DA2;
  text-decoration: none;
  padding: 6px;
  border: 1px solid #FC5DA2;
}

.nav a:hover {
  background: #FC5DA2;
  color: #000;
}

/* --------
   Content
-------- */

.content {
  grid-area: content;
  padding: 20px;
}