@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&display=swap");

:root {
  color-scheme: dark;
  --background: #070707;
  --text: #db4437;
  --muted: #9f2f27;
  --line: #2a2a2a;
  --active: #f05a4c;
  --focus: #ff8a7f;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: "IBM Plex Mono", "Courier New", Courier, monospace;
  font-size: 16px;
  line-height: 1.5;
}

body::before {
  position: fixed;
  inset: -20%;
  z-index: 9999;
  pointer-events: none;
  content: "";
  opacity: 0.07;
  background-image:
    url("https://framerusercontent.com/images/kelEr6s1qyt801dQcO45jKcaNkk.gif"),
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.32) 0 1px, transparent 1px),
    radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.22) 0 1px, transparent 1px),
    radial-gradient(circle at 45% 55%, rgba(0, 0, 0, 0.46) 0 1px, transparent 1px),
    radial-gradient(circle at 10% 80%, rgba(255, 255, 255, 0.18) 0 1px, transparent 1px);
  background-position: center, 0 0, 1px 2px, 3px 1px, 2px 4px;
  background-repeat: repeat;
  background-size: 120px 120px, 3px 3px, 4px 4px, 5px 5px, 6px 6px;
  animation: active-grain 700ms steps(2, end) infinite;
}

:root[data-visit-overlay="ants"] body::before {
  display: none;
}

@keyframes active-grain {
  0% {
    transform: translate3d(-4%, -3%, 0);
  }

  20% {
    transform: translate3d(3%, -5%, 0);
  }

  40% {
    transform: translate3d(-2%, 4%, 0);
  }

  60% {
    transform: translate3d(5%, 2%, 0);
  }

  80% {
    transform: translate3d(-5%, 5%, 0);
  }

  100% {
    transform: translate3d(4%, -2%, 0);
  }
}

a {
  color: inherit;
}

.shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  height: 100vh;
  overflow: hidden;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
  justify-content: center;
  padding: 28px 20px;
  overflow: hidden;
}

.nav-link {
  display: inline-block;
  width: 100%;
  color: var(--muted);
  text-decoration: none;
  text-transform: lowercase;
}

.nav-link:hover,
.nav-link:focus-visible,
.nav-link.is-active {
  color: var(--active);
}

.nav-link:focus-visible {
  outline: 1px solid var(--focus);
  outline-offset: 4px;
}

.terminal {
  position: relative;
  height: 100vh;
  padding: 28px;
  font-size: 14px;
  overflow-y: auto;
}

.terminal:focus {
  outline: none;
}

.prompt {
  position: absolute;
  top: 28px;
  left: 28px;
  margin: 0 0 32px;
  color: var(--muted);
}

#command {
  color: var(--text);
}

.view {
  display: none;
}

.view.is-visible {
  display: block;
  width: min(760px, 100%);
  padding-top: 72px;
}

#home.view.is-visible {
  display: flex;
  min-height: calc(100vh - 56px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: 0;
  text-align: center;
}

h1 {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
  opacity: 0.86;
  text-transform: lowercase;
}

h2 {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  opacity: 0.82;
  text-transform: lowercase;
}

p {
  max-width: 60ch;
  margin: 0 0 14px;
}

ul {
  max-width: 68ch;
  margin: 0 0 14px;
  padding-left: 20px;
}

li {
  margin: 0 0 6px;
}

.entry {
  margin: 0 0 28px;
}

.work-title {
  font-style: italic;
}

@media (prefers-reduced-motion: reduce) {
  body::before {
    animation: none;
  }
}

@media (max-width: 680px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .nav {
    border-bottom: 1px solid var(--line);
    justify-content: flex-start;
    padding: 20px;
  }

  .terminal {
    height: auto;
    min-height: 0;
    padding: 20px;
  }

  .prompt {
    position: static;
  }

  .view.is-visible,
  #home.view.is-visible {
    min-height: auto;
    padding-top: 20px;
    align-items: flex-start;
    text-align: left;
  }
}
