/* -------------------------------------------------------------------------- */
/*                                    fonts                                   */
/* -------------------------------------------------------------------------- */
@font-face {
  font-family: "Lekton";
  /* point to where you put the font in your build/output*/
  src: url("/static/fonts/Lekton-Regular.ttf") format("ttf");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Lekton";
  /* point to where you put the font in your build/output*/
  src: url("/static/fonts/Lekton-Bold.ttf") format("ttf");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* -------------------------------------------------------------------------- */
/*                                    main                                    */
/* -------------------------------------------------------------------------- */
html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  color-scheme: dark;
}

body {
  font-family: "Lekton", monospace;
  font-weight: 700;
  background-color: #000000;
  color: #ffffff;

  margin: 0;
  line-height: 1.3;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

button {
  padding: 0px;
  background-color: transparent;
  color: #ffffff;
  border: none;

  font-family: "Lekton", monospace;

  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;

  color: rgba(255, 255, 255, 0.6);
}

input {
  background-color: transparent;
  border: none;

  font-family: "Lekton", monospace;
  color: white;
}

input:focus {
  outline: none;
}

input::placeholder {
  font-family: "Lekton", monospace;
}

select {
  background-color: transparent;
  color: white;
  border: none;

  font-family: "Lekton", monospace;
  color-scheme: dark;
}

select option {
  background-color: #000;
  color: #fff;
}

select:focus {
  outline: none;
}

textarea {
  background-color: transparent;
  border: none;

  font-family: "Lekton", monospace;
  color: white;
}

textarea:focus {
  outline: none;
}

textarea::placeholder {
  font-family: "Lekton", monospace;
}

/* -------------------------------------------------------------------------- */
/*                                   toggle                                   */
/* -------------------------------------------------------------------------- */
summary {
  position: relative;
  cursor: pointer;
  outline: none;
  /* remove default focus styling if you like */

  padding-left: 1.5em;
  /* room on left */
  list-style: none;
}

/* hide default marker */
summary::-webkit-details-marker {
  display: none;
}

/* Firefox */
summary::marker {
  content: none;
}

/* show custom marker */
summary::before {
  content: "\25B6";
  font-size: 0.8em;
  /* same arrow */
  position: absolute;
  left: 0em;
  /* inset from left edge */
  top: 50%;
  transform: translateY(-50%) rotate(0deg);
  transition: transform 0.2s;
}

details[open] summary::before {
  transform: translateY(-50%) rotate(90deg);
}

/* -------------------------------------------------------------------------- */
/*                                   header                                   */
/* -------------------------------------------------------------------------- */
#header {
  z-index: 1;
  position: fixed;
  left: 0px;
  top: 0px;
  height: 40px;
  width: calc(100% - 20px);

  margin-left: 10px;
  margin-right: 10px;

  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;

  color: #3bd1af;
  background-color: #000;
}

#header-left {
  flex-grow: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;

  width: 100%;
}

#header-logo {
  color: inherit;
  text-decoration: none;

  display: flex;
  align-items: center;
  gap: 6px;
}

#header-links {
  display: flex;
  gap: 2px;
}

.header-link {
  padding: 4px 8px;

  color: rgb(255, 255, 255);
  text-decoration: none;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: -0.03px;
  line-height: 1;
  font-size: 12px;

  background-color: #292929;
  border-radius: 2px;
}

.header-link:hover {
  background-color: #888888;
}

#header-logo-icon {
  width: 16px;
  height: 16px;
}

#header-right {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 20px;
}

#toggle-animation {
  position: relative;
  width: 30px;
  height: 20px;
}

@keyframes scroll-wave {
  to {
    background-position: -200px bottom;
  }
}

#sine-wave {
  position: absolute;
  top: 4px;
  left: 4px;
  width: calc(100% - 8px);
  height: calc(100% - 8px);
  background-image: url("/static/images/wave.svg");
  background-size: 100% 100%;
  animation: scroll-wave 8s linear infinite;
}

#flat-wave {
  position: absolute;
  top: 4px;
  left: 4px;
  width: calc(100% - 8px);
  height: calc(100% - 8px);
  background-image: url("/static/images/line.svg");
  background-size: 100% 100%;
}

@media (min-width: 768px) {
  #header {
    width: calc(100% - 40px);
    height: 40px;

    margin-left: 20px;
    margin-right: 20px;

    flex-direction: row;
    justify-content: space-between;
    gap: 20px;
  }
}

#header-left {
  justify-content: flex-start;
}

/* -------------------------------------------------------------------------- */
/*                                   banner                                   */
/* -------------------------------------------------------------------------- */
@keyframes scroll-banner {
  0% {
    transform: translateX(100%);
  }

  100% {
    transform: translateX(-100%);
  }
}

#banner-container {
  z-index: 1;
  position: fixed;
  top: 40px;
  left: 0px;
  width: 100%;

  padding-top: 20px;
  padding-bottom: 20px;

  background: linear-gradient(to bottom, #000000ff 60%, #00000000);
  pointer-events: none;
  user-select: none;

  overflow: hidden;
}

#banner {
  width: 100%;

  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;
  gap: 20px;

  font-size: 20px;
  font-variant-caps: small-caps;
  text-transform: lowercase;
  letter-spacing: 2px;
  white-space: nowrap;

}

.banner-animation {
  justify-content: flex-start !important;
  animation: scroll-banner 100s steps(400) infinite;
}

/* -------------------------------- container ------------------------------- */
.container {
  height: max-content;
  padding-left: 20px;
  padding-right: 20px;
  padding-bottom: 120px;
  padding-top: 140px;

  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  align-items: center;
  gap: 40px;

  overflow: hidden;
}

@media (min-width: 768px) {
  .container {
    width: calc(100% - 40px);
    height: calc(100vh - 71px);
    min-height: 500px;
    padding-top: 0px;
    padding-bottom: 0px;

    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---------------------------------- ascii --------------------------------- */
#ascii-image {
  display: flex;
  justify-content: center;

  grid-column: 1;
  grid-row: 1;

  opacity: 0.1;
  pointer-events: none;
  user-select: none;
}

@media (min-width: 768px) {
  #ascii-image {
    justify-content: end;

    grid-column: inherit;
    grid-row: inherit;

    opacity: 1;
    pointer-events: auto;
  }
}

#ascii-image>img {
  width: 500px;
  height: 500px;
}

/* -------------------------------------------------------------------------- */
/*                                  scanlines                                 */
/* -------------------------------------------------------------------------- */
@keyframes scanline_translate {
  0% {
    transform: translateY(0);
  }

  to {
    transform: translateY(4px);
  }
}

.scanlines-container {
  z-index: 2;

  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;

  pointer-events: none;
  user-select: none;
}

.scanlines {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.1) 50%, rgba(0, 0, 0, 0.2) 50%);
  background-size: 100% 4px;
  z-index: 2;
  pointer-events: none;

  animation: scanline_translate 0.5s linear 0s infinite normal none running;
}

/* -------------------------------------------------------------------------- */
/*                                 system log                                 */
/* -------------------------------------------------------------------------- */
#system-log-container {
  position: fixed;
  bottom: 0px;
  left: 0px;

  max-height: 200px;
  width: 375px;
}

#system-log {
  max-height: 200px;
  width: 100%;

  padding-top: 10px;
  padding-bottom: 20px;
  padding-left: 20px;
  padding-right: 10px;

  display: flex;
  flex-direction: column;
  gap: 2px;

  color: #3bd1af;
  font-size: 14px;

  overflow: hidden;
  background: linear-gradient(to bottom, #00000000, #000000ff 60%);
  backdrop-filter: blur(1px);
}

#system-log-container.collapsed {
  height: 0;
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-width: 0;
  /* overflow: hidden; */
}

#system-log-container.expanded {
  max-height: 200px;
}

#system-log .error-log {
  color: #ff0000;
}

#toggle-log-btn {
  position: absolute;
  top: -4px;
  left: 4px;
  z-index: 3;

  width: 100%;
  height: 20px;

  padding-left: 4px;
  padding-right: 4px;

  display: flex;
  justify-content: flex-start;
  align-items: center;

  border-radius: 10px;
  border: none;
  cursor: pointer;
  transform: translateY(-100%);
  transition: transform 0.3s ease;
}

#toggle-log-btn[aria-expanded="false"] #chevron-icon {
  transform: rotate(-180deg);
}

.chevron-wrapper {
  position: relative;
  width: 100%;

  display: flex;
  align-items: center;
}

.chevron-wrapper::before,
.chevron-wrapper::after {
  content: "====================================";
  flex-grow: 1;

  display: inline-block;
  max-width: 100%;

  white-space: nowrap;
  overflow: hidden;
  font-size: 12px;
  color: gray;
}

#chevron-icon {
  margin-left: 4px;
  margin-right: 4px;

  flex-shrink: 0;
}

@media (min-width: 768px) {
  #toggle-log-btn {
    display: none;
  }
}

/* --------------------------------- typing --------------------------------- */
@keyframes typing {
  from {
    width: 0;
  }

  to {
    width: 100%;
  }
}

#system-log>div {
  display: inline-block;
}

.system-log-animation>div {
  overflow: hidden;
  white-space: nowrap;
  width: 0;
  animation: typing 1.2s steps(60) forwards;
}

.system-log-animation>div:nth-child(1) {
  animation-delay: 0s;
}

.system-log-animation>div:nth-child(2) {
  animation-delay: 1.2s;
}

.system-log-animation>div:nth-child(3) {
  animation-delay: 2.4s;
}

.system-log-animation>div:nth-child(4) {
  animation-delay: 3.6s;
}

.system-log-animation>div:nth-child(5) {
  animation-delay: 4.8s;
}

.system-log-animation>div:nth-child(6) {
  animation-delay: 6.0s;
}

.system-log-animation>div:nth-child(7) {
  animation-delay: 7.2s;
}

.system-log-animation>div:nth-child(8) {
  animation-delay: 8.4s;
}

.system-log-animation>div:nth-child(9) {
  animation-delay: 9.6s;
}

.system-log-animation>div:nth-child(10) {
  animation-delay: 10.8s;
}

.system-log-animation>div:nth-child(11) {
  animation-delay: 12.0s;
}

.system-log-animation>div:nth-child(12) {
  animation-delay: 13.2s;
}

.system-log-animation>div:nth-child(13) {
  animation-delay: 14.4s;
}

.system-log-animation>div:nth-child(14) {
  animation-delay: 15.6s;
}

.system-log-animation>div:nth-child(15) {
  animation-delay: 16.8s;
}

.system-log-animation>div:nth-child(16) {
  animation-delay: 18.0s;
}

.system-log-animation>div:nth-child(17) {
  animation-delay: 19.2s;
}

.system-log-animation>div:nth-child(18) {
  animation-delay: 20.4s;
}

.system-log-animation>div:nth-child(19) {
  animation-delay: 21.6s;
}

.system-log-animation>div:nth-child(20) {
  animation-delay: 22.8s;
}

/* -------------------------------------------------------------------------- */
/*                                   footer                                   */
/* -------------------------------------------------------------------------- */
#footer-container {
  width: 100%;

  padding-left: 10px;
  padding-right: 10px;
  padding-top: 10px;
  padding-bottom: 40px;

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

#links {
  display: flex;
  align-items: center;
  gap: 40px;
}

#footer-container a {
  color: white;
  text-decoration: none;
}