:root {
  color-scheme: dark;
  --bg: #020403;
  --bg-2: #06110c;
  --panel: rgba(1, 17, 10, 0.82);
  --green: #20ff8a;
  --green-soft: #78ffb2;
  --green-dim: #0a9b59;
  --amber: #ffd54a;
  --red: #ff314d;
  --blue: #39a0ff;
  --cyan: #35ffe7;
  --shadow: rgba(32, 255, 138, 0.34);
  --border: rgba(83, 255, 159, 0.58);
  --font: ui-monospace, "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 18% 15%, rgba(0, 128, 73, 0.16), transparent 30rem),
    radial-gradient(circle at 88% 80%, rgba(57, 160, 255, 0.08), transparent 28rem),
    linear-gradient(145deg, var(--bg), var(--bg-2) 58%, #010201);
  color: var(--green);
  font-family: var(--font);
}

body::before,
body::after {
  position: fixed;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  content: "";
}

body::before {
  opacity: 0.22;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.09) 0,
    rgba(255, 255, 255, 0.09) 1px,
    transparent 1px,
    transparent 5px
  );
  mix-blend-mode: screen;
}

body::after {
  background:
    linear-gradient(90deg, rgba(255, 49, 77, 0.05), transparent 18%, transparent 82%, rgba(53, 255, 231, 0.04)),
    radial-gradient(ellipse at center, transparent 42%, rgba(0, 0, 0, 0.58));
}

.screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
}

.terminal {
  position: relative;
  width: min(1180px, 100%);
  min-height: min(720px, calc(100vh - 64px));
  padding: 18px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background:
    linear-gradient(rgba(32, 255, 138, 0.045) 50%, rgba(0, 0, 0, 0.1) 50%),
    var(--panel);
  background-size: 100% 4px, auto;
  box-shadow:
    0 0 0 1px rgba(32, 255, 138, 0.12) inset,
    0 0 34px rgba(32, 255, 138, 0.16),
    0 24px 80px rgba(0, 0, 0, 0.72);
  animation: terminalBreath 8s ease-in-out infinite;
}

.terminal::before {
  position: absolute;
  inset: 10px;
  pointer-events: none;
  content: "";
  border: 1px dashed rgba(32, 255, 138, 0.38);
  border-radius: 6px;
}

.terminal::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  opacity: 0.48;
  background-image:
    linear-gradient(90deg, transparent 0 9px, rgba(32, 255, 138, 0.08) 10px, transparent 11px),
    linear-gradient(transparent 0 9px, rgba(32, 255, 138, 0.06) 10px, transparent 11px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at center, transparent 0, black 74%);
}

.terminal__bar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 36px;
  padding: 0 14px 14px;
  border-bottom: 1px solid rgba(32, 255, 138, 0.42);
  color: var(--green-soft);
  font-size: 13px;
  line-height: 1.4;
  text-transform: uppercase;
  text-shadow: 0 0 10px var(--shadow);
}

.terminal__content {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 48px;
  justify-items: center;
  align-content: center;
  min-height: 620px;
  padding: 26px 12px 8px;
}

pre {
  margin: 0;
  white-space: pre;
  letter-spacing: 0;
  font-family: var(--font);
}

.logo {
  width: max-content;
  max-width: 100%;
  color: var(--green);
  background: linear-gradient(
    180deg,
    var(--red) 0 24%,
    #f3f7e7 24% 36%,
    var(--amber) 36% 48%,
    var(--green) 48% 70%,
    var(--blue) 70% 100%
  );
  background-clip: text;
  -webkit-background-clip: text;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.02;
  text-shadow:
    0 0 9px rgba(32, 255, 138, 0.72),
    2px 0 0 rgba(255, 49, 77, 0.22),
    -2px 0 0 rgba(57, 160, 255, 0.22);
  filter: drop-shadow(0 0 20px rgba(32, 255, 138, 0.24));
  animation: logoGlitch 7s steps(1, end) infinite;
}

@supports ((background-clip: text) or (-webkit-background-clip: text)) {
  .logo {
    color: transparent;
  }
}

.socials {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  width: min(760px, 100%);
}

.social {
  display: block;
  color: var(--green-soft);
  text-decoration: none;
  text-shadow:
    0 0 8px var(--shadow),
    1px 0 0 rgba(255, 49, 77, 0.12),
    -1px 0 0 rgba(53, 255, 231, 0.14);
  transition:
    color 160ms ease,
    filter 160ms ease,
    transform 160ms ease;
}

.social pre {
  padding: 4px;
  font-size: 14px;
  line-height: 1.12;
}

.social:hover,
.social:focus-visible {
  color: #ffffff;
  filter: drop-shadow(0 0 12px rgba(32, 255, 138, 0.72));
  outline: none;
  transform: translateY(-2px);
}

.social::selection,
.logo::selection {
  color: #001f11;
  background: var(--green);
}

@keyframes terminalBreath {
  0%,
  100% {
    filter: brightness(0.96) saturate(1.05);
  }

  50% {
    filter: brightness(1.06) saturate(1.18);
  }
}

@keyframes logoGlitch {
  0%,
  89%,
  100% {
    transform: translate(0, 0);
  }

  90% {
    transform: translate(2px, 0);
  }

  91% {
    transform: translate(-3px, 1px);
  }

  92% {
    transform: translate(0, 0);
  }
}

@media (max-width: 980px) {
  .screen {
    padding: 18px;
  }

  .terminal {
    min-height: calc(100vh - 36px);
  }

  .terminal__content {
    grid-template-columns: 1fr;
    gap: 36px;
    min-height: 0;
  }

  .logo {
    font-size: 13px;
  }

  .social pre {
    font-size: 12px;
  }
}

@media (max-width: 640px) {
  body {
    overflow-x: auto;
  }

  .screen {
    min-width: 360px;
    padding: 10px;
  }

  .terminal {
    min-height: calc(100vh - 20px);
    padding: 12px;
    border-radius: 6px;
  }

  .terminal::before {
    inset: 7px;
  }

  .terminal__bar {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
    padding: 0 8px 10px;
    font-size: 11px;
  }

  .terminal__content {
    gap: 28px;
    padding: 18px 0 4px;
  }

  .logo {
    font-size: 8px;
  }

  .social pre {
    font-size: 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
