:root {
  color-scheme: light;
  --paper: #f2efe7;
  --ink: #11110f;
  --muted: #68665f;
  --terminal: #151614;
  --terminal-ink: #f5f3ec;
  --line: #d7d2c5;
  --accent: #45d483;
  --page-width: 72rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", monospace;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 20rem;
  background: var(--paper);
}

body {
  min-height: 100svh;
  margin: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  color: var(--ink);
  background:
    linear-gradient(
      90deg,
      transparent 0,
      transparent calc(100% - 1px),
      rgba(17, 17, 15, 0.045) calc(100% - 1px)
    ),
    var(--paper);
  background-size: 2rem 100%;
}

a {
  color: inherit;
}

.site-header,
.site-footer,
main {
  width: min(100%, var(--page-width));
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 3rem);
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding-block: 1.5rem;
  border-bottom: 1px solid var(--line);
  animation: reveal 500ms ease-out both;
}

.wordmark {
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: -0.03em;
}

.wordmark span {
  color: #168b4b;
}

.header-note {
  color: var(--muted);
  font-size: 0.72rem;
  text-align: right;
}

main {
  display: flex;
  align-items: center;
  padding-block: clamp(3.5rem, 8vh, 7rem);
}

.hero {
  width: 100%;
}

.hero > * {
  animation: reveal 650ms cubic-bezier(0.2, 0.75, 0.25, 1) both;
}

.hero > :nth-child(2) {
  animation-delay: 50ms;
}

.hero > :nth-child(3) {
  animation-delay: 100ms;
}

.hero > :nth-child(4) {
  animation-delay: 150ms;
}

.hero > :nth-child(5) {
  animation-delay: 200ms;
}

.hero > :nth-child(6) {
  animation-delay: 250ms;
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: #167c46;
  font-size: clamp(0.68rem, 1.4vw, 0.8rem);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(5rem, 17vw, 11.5rem);
  font-weight: 700;
  line-height: 0.78;
  letter-spacing: -0.105em;
}

.tagline {
  margin: clamp(2rem, 5vw, 3.5rem) 0 0;
  font-size: clamp(1.75rem, 4.5vw, 3.6rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.065em;
}

.summary {
  max-width: 43rem;
  margin: 1.25rem 0 0;
  color: var(--muted);
  font-size: clamp(0.95rem, 1.8vw, 1.15rem);
  line-height: 1.65;
}

.terminal {
  width: min(100%, 54rem);
  margin-top: clamp(2rem, 5vw, 3.25rem);
  overflow: hidden;
  color: var(--terminal-ink);
  background: var(--terminal);
  border: 1px solid #000;
  border-radius: 0.65rem;
  box-shadow: 0.55rem 0.55rem 0 var(--ink);
}

.terminal-bar {
  min-height: 2.5rem;
  display: flex;
  align-items: center;
  gap: 0.42rem;
  padding: 0 0.85rem;
  color: #8f918b;
  background: #22231f;
  border-bottom: 1px solid #343630;
}

.terminal-bar span {
  width: 0.58rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #4b4d47;
}

.terminal-bar span:first-child {
  background: var(--accent);
}

.terminal-bar b {
  margin-left: auto;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.terminal-body {
  padding: clamp(1.15rem, 3vw, 1.7rem);
  overflow-x: auto;
  font-size: clamp(0.7rem, 1.5vw, 0.9rem);
  line-height: 1.85;
  scrollbar-color: #4b4d47 transparent;
}

.terminal-body p {
  width: max-content;
  min-width: 100%;
  margin: 0;
  white-space: pre;
}

.prompt,
.run-command {
  color: var(--accent);
}

.prompt {
  display: inline-block;
  margin-right: 0.8ch;
  font-weight: 700;
}

.cursor {
  margin-left: 0.2ch;
  animation: blink 1.05s steps(1, end) infinite;
}

.github-link {
  width: fit-content;
  min-height: 3rem;
  margin-top: 2.35rem;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.1rem;
  color: var(--paper);
  background: var(--ink);
  border: 2px solid var(--ink);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  transition:
    color 160ms ease,
    background-color 160ms ease,
    transform 160ms ease;
}

.github-link:hover {
  color: var(--ink);
  background: var(--accent);
  transform: translate(-0.18rem, -0.18rem);
}

.github-link:focus-visible,
.wordmark:focus-visible {
  outline: 3px solid #147841;
  outline-offset: 4px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 1.25rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 0.68rem;
  animation: reveal 500ms 300ms ease-out both;
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(0.75rem);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

@media (max-width: 40rem) {
  body {
    background-size: 1.5rem 100%;
  }

  .header-note {
    display: none;
  }

  main {
    align-items: flex-start;
    padding-block: 3.5rem 4.5rem;
  }

  h1 {
    font-size: clamp(4.7rem, 27vw, 7rem);
  }

  .tagline {
    max-width: 10ch;
  }

  .terminal {
    border-radius: 0.45rem;
    box-shadow: 0.35rem 0.35rem 0 var(--ink);
  }

  .site-footer {
    flex-direction: column;
    gap: 0.35rem;
  }
}

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