@font-face {
  font-family: "Hack";
  src: url("/assets/fonts/Hack-NF.ttf");
  display: swap;
}

:root {
  color-scheme: dark;
  --background: #000000;
  --foreground: #f4f4f4;
  --strong: #ffffff;
  --muted: #a8a8a8;
  --dim: #707070;
  --line: #2e2e2e;
  --panel: #050505;
}

* {
  box-sizing: border-box;
  font-family: "Hack", monospace;
}

html,
body,
body > div:first-child,
div#__next,
div#__next > div {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  overflow-x: hidden;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  content: "";
  background:
    repeating-linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.035) 0,
      rgba(255, 255, 255, 0.035) 1px,
      transparent 1px,
      transparent 4px
    );
  opacity: 0.14;
}

a {
  color: var(--strong);
  text-decoration: underline;
  text-decoration-color: var(--dim);
  text-underline-offset: 0.18em;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--background);
}

::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}

.app-shell {
  width: 100%;
  min-height: 100svh;
  color: var(--foreground);
  font-size: clamp(0.78rem, 1.55vw, 1rem);
  line-height: 1.42;
}

.page-shell {
  width: 100%;
  min-height: 100svh;
  padding: clamp(0.65rem, 2vw, 1.5rem);
  background: var(--background);
}

.terminal-shell {
  min-height: calc(100svh - clamp(1.3rem, 4vw, 3rem));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: clamp(0.85rem, 2.5vw, 2rem);
  background: var(--panel);
}

.terminal-scroll {
  min-height: inherit;
  overflow-y: auto;
}

.history-entry {
  display: block;
}

.history-command {
  display: flex;
  flex-direction: row;
  column-gap: 0.5rem;
}

.history-command .ps1 {
  flex-shrink: 0;
}

.history-command__text {
  flex-grow: 1;
  color: var(--strong);
  overflow-wrap: anywhere;
}

.history-output {
  white-space: pre-wrap;
  margin: 0 0 0.7rem;
  line-height: normal;
}

.stream-line {
  min-height: 1.15em;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.stream-line--muted {
  color: var(--muted);
}

.stream-line--dim {
  color: var(--dim);
}

.stream-line--ascii {
  color: var(--strong);
  font-size: clamp(0.43rem, 1.05vw, 1rem);
  font-weight: 700;
  line-height: 1.04;
  white-space: pre;
  overflow: hidden;
}

.globe-frame {
  margin: 0.45rem 0 0.85rem;
  color: var(--strong);
  font: inherit;
  font-size: clamp(0.72rem, 1.35vw, 1rem);
  line-height: 1;
  white-space: pre;
  overflow: hidden;
}

.input-row {
  display: flex;
  flex-direction: row;
  column-gap: 0.5rem;
  margin-top: 0.7rem;
}

.input-row.is-hidden {
  visibility: hidden;
}

.ps1 {
  flex-shrink: 0;
  color: var(--muted);
}

.ps1__user,
.ps1__host,
.ps1__sep {
  color: inherit;
}

#prompt {
  flex-grow: 1;
  min-width: 2rem;
  border: 0;
  outline: 0;
  padding: 0;
  background: transparent;
  color: var(--strong);
  caret-color: var(--strong);
  font: inherit;
}

#prompt.is-error {
  color: var(--muted);
}

::selection {
  background: var(--strong);
  color: var(--background);
}

@media (max-width: 640px) {
  .page-shell {
    padding: 0;
  }

  .terminal-shell {
    min-height: 100svh;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .stream-line--ascii {
    font-size: clamp(0.38rem, 1.55vw, 0.52rem);
  }

  .globe-frame {
    font-size: clamp(0.55rem, 2.25vw, 0.72rem);
  }

  .input-row,
  .history-command {
    column-gap: 0.35rem;
  }
}
