:root {
  --bg: #050705;
  --panel: #09100b;
  --panel-2: #0d1710;
  --text: #e7f1e8;
  --muted: #7f9184;
  --line: #21452b;
  --green: #3df06d;
  --green-dim: rgba(61, 240, 109, 0.16);
  --amber: #c7a84e;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  color: var(--text);
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  background:
    linear-gradient(rgba(61, 240, 109, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(61, 240, 109, 0.025) 1px, transparent 1px),
    radial-gradient(circle at 67% 43%, rgba(61, 240, 109, 0.14), transparent 30%),
    var(--bg);
  background-size: 32px 32px, 32px 32px, auto, auto;
  overflow: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  opacity: 0.2;
  background: repeating-linear-gradient(to bottom, transparent 0 3px, rgba(0, 0, 0, 0.38) 4px 5px);
}

a {
  color: inherit;
  text-decoration: none;
}

.page {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}

.topbar {
  width: calc(100% - 56px);
  position: fixed;
  top: 24px;
  left: 28px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(61, 240, 109, 0.24);
}

.mark {
  color: var(--green);
  font-size: 0.92rem;
  font-weight: 900;
  letter-spacing: 0;
}

.mark::before {
  content: "./";
  color: var(--amber);
}

.topbar nav {
  display: flex;
  align-items: center;
  gap: 9px;
}

.topbar nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid rgba(61, 240, 109, 0.42);
  background: rgba(5, 9, 6, 0.72);
  color: #d6e7d9;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  transition: background 140ms ease, color 140ms ease, border-color 140ms ease;
}

.topbar nav a:hover {
  border-color: var(--green);
  background: var(--green-dim);
  color: var(--green);
}

.topbar nav .bag {
  background: var(--green);
  color: #031006;
  border-color: var(--green);
}

.hero {
  width: min(1160px, calc(100% - 44px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(420px, 1.28fr);
  align-items: center;
  gap: 54px;
  padding: 92px 0 118px;
  position: relative;
}

.copy {
  position: relative;
  z-index: 4;
  align-self: center;
}

.tag {
  width: fit-content;
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.tag::before {
  content: "[online] ";
  color: var(--green);
}

h1 {
  margin: 0;
  display: grid;
  gap: 6px;
  font-size: clamp(3.1rem, 7.6vw, 7.2rem);
  line-height: 0.86;
  letter-spacing: 0;
}

h1 span {
  display: block;
  width: fit-content;
  color: #eef8ef;
  text-shadow: 0 0 16px rgba(61, 240, 109, 0.25);
  animation: terminalNudge 4s steps(2) infinite;
}

h1 span:nth-child(2) {
  color: var(--green);
  animation-delay: 0.18s;
}

.bio {
  max-width: 500px;
  margin: 24px 0 0;
  color: #b9c9bd;
  font-size: clamp(0.9rem, 1.25vw, 1.02rem);
  line-height: 1.68;
  font-weight: 650;
}

.bio::before {
  content: "boot.log ";
  color: var(--amber);
  font-weight: 900;
}

.portrait {
  min-height: 590px;
  display: grid;
  place-items: center;
  position: relative;
  z-index: 2;
}

.portrait::before {
  content: "";
  position: absolute;
  width: min(78vw, 610px);
  aspect-ratio: 1;
  border: 1px solid rgba(61, 240, 109, 0.22);
  background:
    linear-gradient(90deg, rgba(61, 240, 109, 0.08), transparent 25%, transparent 75%, rgba(61, 240, 109, 0.08)),
    linear-gradient(180deg, rgba(61, 240, 109, 0.06), rgba(61, 240, 109, 0.015));
}

.portrait::after {
  content: "asset: apefrog_001.png";
  position: absolute;
  z-index: 4;
  left: 48px;
  bottom: 52px;
  padding: 7px 9px;
  border: 1px solid rgba(61, 240, 109, 0.42);
  background: rgba(5, 7, 5, 0.9);
  color: var(--green);
  font-size: 0.62rem;
  font-weight: 900;
}

.portrait img {
  width: min(76vw, 555px);
  max-height: 590px;
  object-fit: contain;
  position: relative;
  z-index: 3;
  padding: 12px;
  border: 1px solid rgba(61, 240, 109, 0.52);
  outline: 1px solid rgba(61, 240, 109, 0.18);
  outline-offset: 7px;
  background: #020402;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.75),
    0 0 34px rgba(61, 240, 109, 0.14),
    0 24px 50px rgba(0, 0, 0, 0.48);
  animation: framePulse 5.8s ease-in-out infinite;
}

.diagonal-gallery {
  width: 690px;
  height: 116px;
  position: fixed;
  left: -116px;
  bottom: 42px;
  z-index: 4;
  transform: rotate(-8deg);
  overflow: hidden;
  border: 1px solid rgba(61, 240, 109, 0.35);
  background: rgba(4, 7, 4, 0.94);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.4);
}

.diagonal-gallery::before {
  content: "media_stream / replay";
  position: absolute;
  left: 11px;
  top: 8px;
  z-index: 2;
  color: var(--green);
  font-size: 0.58rem;
  font-weight: 900;
  text-transform: uppercase;
}

.rail {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 27px 11px 10px;
  width: max-content;
  animation: gallery 22s linear infinite;
}

.rail img {
  width: 78px;
  height: 78px;
  flex: 0 0 auto;
  object-fit: cover;
  border: 1px solid rgba(61, 240, 109, 0.44);
  background: #020402;
  filter: saturate(0.82) contrast(1.08);
}

@keyframes terminalNudge {
  0%,
  100% {
    transform: translateX(0);
    opacity: 1;
  }
  50% {
    transform: translateX(4px);
    opacity: 0.9;
  }
}

@keyframes framePulse {
  0%,
  100% {
    transform: translateY(0);
    box-shadow:
      0 0 0 1px rgba(0, 0, 0, 0.75),
      0 0 34px rgba(61, 240, 109, 0.14),
      0 24px 50px rgba(0, 0, 0, 0.48);
  }
  50% {
    transform: translateY(-5px);
    box-shadow:
      0 0 0 1px rgba(0, 0, 0, 0.75),
      0 0 44px rgba(61, 240, 109, 0.2),
      0 28px 58px rgba(0, 0, 0, 0.54);
  }
}

@keyframes gallery {
  to {
    transform: translateX(50%);
  }
}

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

  .topbar {
    width: calc(100% - 28px);
    top: 14px;
    left: 14px;
  }

  .topbar nav a {
    min-height: 34px;
    padding: 0 10px;
    font-size: 0.68rem;
  }

  .hero {
    grid-template-columns: 1fr;
    padding-top: 92px;
    padding-bottom: 178px;
    gap: 20px;
  }

  .portrait {
    min-height: 410px;
    order: -1;
  }

  .portrait::after {
    left: 16px;
    bottom: 30px;
  }

  .diagonal-gallery {
    width: 535px;
    height: 108px;
    left: -130px;
    bottom: 34px;
  }

  .rail img {
    width: 70px;
    height: 70px;
  }
}
