/* VARS */

:root {
  /* Background Colors: */
  --background-color: #eeeeee;
  --content-background-color: #2424246b;
  --sidebar-background-color: #2424246b;

  /* Text Colors: */
  --text-color: #aca9bc;
  --sidebar-text-color: #aca9bc;
  --link-color: #00ac7d;
  --link-color-hover: #005a35;

  /* Text: */
  --font: "myFont", monospace;
  --heading-font: "myFont", monospace;
  --font-size: 14px;

  /* Other Settings: */
  --margin: 15px; /*between grid*/
  --padding: 15px; /*inner border*/
  --border: 3px solid #6ec591;
  --borderglow: 0 0 6px #6ec591, 0 0 12px #6ec591;
  --round-borders: 8px;
  --sidebar-width: 180px;
}

/* ------------------BASICS */

* {
  box-sizing: border-box;
}

body {
  display: block;
  align-items: center;
  justify-content: center;
  
  position: relative;

  min-height: 100%;

  font-size: var(--font-size);
  margin: 0;
  padding: var(--padding);
  color: var(--text-color);
  font-family: var(--font);

  /* BACKGROUND */
  
  background-color: #020105;
  
  background-image: 
    /* vignette (dark edges) */
    radial-gradient(circle, transparent 70%, rgba(0, 0, 0, 0.7) 100%),

    /* dot-matrix pattern */
  
    radial-gradient(circle, rgba(255,255,255,0.1)4px, transparent 1px)
    
     
      repeating-linear-gradient(
        to right,
        rgba(255, 0, 0, 0.05) 0px,
        rgba(255, 0, 0, 0.05) 2px,
        rgba(0, 255, 0, 0.05) 2px,
        rgba(0, 255, 0, 0.05) 4px,
        rgba(0, 0, 255, 0.05) 4px,
        rgba(0, 0, 255, 0.05) 6px
      ),

          /* horizontal scanlines */

      repeating-linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.3) 0px,
        rgba(255, 255, 255, 0.3) 2px,
        transparent 2px,
        transparent 10px
      );
  
    background-blend-mode:
      normal,
      normal,
      screen,
      overlay
    ;
    
    background-size:
      cover,
      10px 10px,
      100% 10px,
      10px 100%
    ;
}


/* -----------------TEXT IMG EFFECTS */

/*---- round img */

.rounded-img {
  border-radius: 80%;
  width: 100%;
  height: auto;
  padding: 2px;
  margin: 0;
  overflow: hidden;
}

/*---------- HEADER TITLE img */

.title-img {
  position: relative;
  display: flex;
  width: 100%;
  height: auto;
  justify-content: center;
  align-items: center;
  z-index: 1;
}

.title-img img {
  width: 100%;
  height: auto;
}

.title-img::after {
  content: "";
  position: absolute;
  inset: 5% 0% 0% 0%;
  background-image: repeating-linear-gradient(
    to bottom,
    /*direction of lines*/ rgba(255, 0, 0, 0.5) 2px,
    rgba(0, 255, 0, 0.5) 3px,
    rgba(0, 0, 255, 0.5) 4px,
    transparent 2px,
    transparent 6px
  );
  mix-blend-mode: color-dodge;
  background-size: 100% auto;

  animation: scan 0.9s linear infinite;

  mask-image: url("namelgo.png");
  mask-position: center;
  mask-size: cover;
}

@keyframes scan {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 0 4px;
  }
}

/* ------------rgb glitch system online*/

.glitch-rgb {
  position: relative;
  text-align: center;
  font-weight: bold;
  color: #2e4b3a;
  font-size: 2em;
  filter: drop-shadow(0 0 2px #40ff8a);
}

.glitch-rgb::before,
.glitch-rgb::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0.7;
  animation: jitter 0.5s infinite;
}

.glitch-rgb::before {
  left: 2px;
  text-shadow: -2px 0 #8e7cc3;
  clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
  animation-delay: 0.7s;
}

.glitch-rgb::after {
  left: -2px;
  text-shadow: -2px 0 #351c75;
  clip-path: polygon(0 55%, 100% 55%, 100% 100%, 0 100%);
  animation-delay: 0.9s;
}

@keyframes jitter {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(2px, -1px);
  }
}

/* ----------------glitch junk nav*/

.glitch-nav {
  display: flex;
  gap: 1.5rem;
  position: flex;
  margin: 2px;
}

.glitch-nav a {
  position: relative;
  color: #8463d9bf;
  font-size: 1.1rem;
  padding: 0.2rem 0.8rem;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid currentColor;
  transform: rotate(calc(-2deg + 4deg * var(--link-tilt)));
  animation: flicker 3s infinite;
}

.glitch-nav a:hover {
  box-shadow:
    0 0 5px currentColor,
    0 0 10px currentColor;
  animation: flicker-fast 0.3s infinite;
}

@keyframes flicker {
  0%,
  100% {
    opacity: 1;
  }
  48% {
    opacity: 0.9;
  }
  50% {
    opacity: 0.7;
  }
  52% {
    opacity: 0.9;
  }
  80% {
    opacity: 1;
  }
}

@keyframes flicker-fast {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.8;
  }
}

/* ----------------------LAYOUT */

.container {
  max-width: 1100px;
  width: 100%;
  display: grid;
  grid-gap: var(--margin);
  margin: 0 auto;

  grid-template:
    "header header" auto
    "leftSidebar main" auto
    "footer footer" auto
    / var(--sidebar-width) auto;
  /* Confused by the grid? Check out my tutorial: https://petrapixel.neocities.org/coding/positioning-tutorial#grid */
}

/* -------------MAIN */

main {
  grid-area: main;
  overflow-y: auto;
  padding: var(--padding);
  background: var(--content-background-color);
  border: var(--border);
  box-shadow: var(--borderglow);
  border-radius: var(--round-borders);
}

/*-------------------- HEADER */

header {
  grid-area: header;
  display: flex;
  justify-content: center;
  align-items: center;
  border: var(--border);
  box-shadow: var(--borderglow);
  border-radius: var(--round-borders);
  background: var(--content-background-color);
}

/* --------------------------NAVBAR */

nav {
  grid-area: header;
}

nav ul {
  list-style: none;
  display: inherit;
  gap: 5px;
}

/* ------------SIDEBARS */

aside {
  grid-area: sidebar;
  border: var(--border);
  box-shadow: var(--borderglow);
  border-radius: var(--round-borders);
  overflow: hidden;
  background: var(--sidebar-background-color);
  padding: var(--padding);
  color: var(--sidebar-text-color);
}

.left-sidebar {
  grid-area: leftSidebar;
}

.sidebar-section:not(:last-child) {
  margin-bottom: 1em;
}

.sidebar-section ul,
.sidebar-section ol {
  padding-left: 0.5em;
}

.sidebar-section > *:not(p):not(ul):not(ol):not(blockquote) {
  margin-top: 2px;
}

/* Sidebar Blockquote: */

.sidebar-section blockquote {
  background: rgba(8, 0, 13, 0.59);
  padding: 5px;
  margin: 0.5em 0;
  border-radius: 5px;
  overflow: hidden;
}

.sidebar-section blockquote > *:first-child {
  margin-top: 0;
}

.sidebar-section blockquote > *:last-child {
  margin-bottom: 0;
}

/* Site Button: */

.site-button {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.site-button textarea {
  font-family: monospace;
  font-size: 0.7em;
}

.sidebar-title {
  font-weight: bold;
  font-size: 1.2em;
  font-family: var(--heading-font);
}

/* ------------MAIN */

main {
  line-height: 1.5;
}

main a,
main a:visited {
  color: var(--link-color);
}

main a:hover,
main a:focus {
  color: var(--link-color-hover);
  text-decoration-style: wavy;
}

main p,
main .image,
main .full-width-image,
main .two-columns {
  margin: 0.75em 0;
}

main ol,
main ul {
  margin: 0.5em 0;
  padding-left: 1.5em;
}

main ol li,
main ul li {
  margin-bottom: 0.2em;
  line-height: 1.3;
}

main ol {
  padding-left: 2em;
}

main blockquote {
  background: rgba(8, 0, 13, 0.59);
  padding: 15px;
  margin: 1em 0;
  border-radius: 10px;
}

main pre {
  margin: 1em 0 1.5em;
}

main code {
  text-transform: none;
}

main center {
  margin: 1em 0;
  padding: 0 1em;
}

main hr {
  border: 0;
  border-top: var(--border);
  margin: 1.5em 0;
}

/* HEADINGS: */

main h1,
main h2,
main h3,
main h4,
main h5,
main h6 {
  font-family: var(--heading-font);
  margin-bottom: 0;
  line-height: 1.5;
}

main h1:first-child,
main h2:first-child,
main h3:first-child,
main h4:first-child,
main h5:first-child,
main h6:first-child {
  margin-top: 0;
}

main h1 {
  font-size: 1.5em;
}

main h2 {
  font-size: 1.4em;
}

main h3 {
  font-size: 1.3em;
}

main h4 {
  font-size: 1.2em;
}

main h5 {
  font-size: 1.1em;
}

main h6 {
  font-size: 1em;
}

/* COLUMNS: */

.two-columns {
  display: flex;
}

.two-columns > * {
  flex: 1 1 0;
  margin: 0;
}

.two-columns > *:first-child {
  padding-right: 0.75em;
}

.two-columns > *:last-child {
  padding-left: 0.75em;
}

/* ------------------CONTENT IMAGES */

.image {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
}

.full-width-image {
  display: block;
  width: 100%;
  height: auto;
}

.images {
  display: flex;
  width: calc(100% + 5px + 5px);
  margin-left: -5px;
  margin-right: -5px;
}

.images img {
  width: 100%;
  height: auto;
  padding: 5px;
  margin: 0;
  overflow: hidden;
}

/* ------------FOOTER */

footer {
  grid-area: footer;
  border: var(--border);
  box-shadow: var(--borderglow);
  border-radius: var(--round-borders);
  overflow: hidden;
  font-size: 0.75em;
  padding: var(--padding);
  background: var(--content-background-color);
}

footer a,
footer a:visited {
  color: var(--link-color);
}

footer a:hover,
footer a:focus {
  color: var(--link-color-hover);
}

/* -------------------------------------------------------- */
/* ACCESSIBILITY */
/* -------------------------------------------------------- */

/* please do not remove this. */

#skip-to-content-link {
  position: fixed;
  top: 0;
  left: 0;
  display: inline-block;
  padding: 0.375rem 0.75rem;
  line-height: 1;
  font-size: 1.25rem;
  background-color: var(--content-background-color);
  color: var(--text-color);
  transform: translateY(-3rem);
  transition: transform 0.1s ease-in;
  z-index: 99999999999;
}

#skip-to-content-link:focus,
#skip-to-content-link:focus-within {
  transform: translateY(0);
}

/* -------------------------------------------------------- */
/* MOBILE RESPONSIVE */
/* -------------------------------------------------------- */

/* CSS Code for devices < 800px */
@media (max-width: 800px) {
  body {
    font-size: 14px;
  }

  .container {
    width: 100%;
    grid-template: "header" auto "main" auto "footer" auto / 1fr;
    /* Confused by the grid? Check out my tutorial: https://petrapixel.neocities.org/coding/positioning-tutorial#grid */
  }

  .left-sidebar {
    display: none;
  }

  .header {
  }

  .nav {
    padding: 0;
  }

  .nav > ul {
    padding-top: 0.5em;
  }

  .nav > ul li > a,
  .nav > ul li > details summary,
  .nav > ul li > strong {
    padding: 0.5em;
  }

  .main {
    max-height: none;
    padding: 9px;
  }

  .images {
    flex-wrap: wrap;
  }

  .images img {
    width: 100%;
  }

  #skip-to-content-link {
    font-size: 1rem;
  }
}
