*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  min-width: 0;
  overflow-x: hidden;
}

header img {
  display: block;
  width: min(512px, 100%);
  height: auto;
  margin-inline: auto;
}

.terminal {
  width: min(100%, 868px);
  overflow-wrap: anywhere;
}

.line,
p,
li,
pre,
a {
  overflow-wrap: anywhere;
}

pre {
  max-width: 100%;
  white-space: pre-wrap;
  word-break: break-word;
}

input,
textarea,
select {
  max-width: 100%;
}

.social-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  margin: 0;
}

@media (max-width: 768px) {
  body {
    padding: 0.75rem;
  }

  .terminal {
    padding: 1.25rem;
    box-shadow: 0 0 12px #f34;
  }

  h1 {
    font-size: clamp(1.25rem, 6vw, 1.75rem);
  }

  footer {
    padding: 1.5rem 0.5rem;
  }

  button,
  input {
    min-height: 44px;
  }
}

@media (max-width: 480px) {
  body {
    padding: 0.5rem;
    font-size: 15px;
  }

  header img {
    width: min(100%, 360px);
  }

  .terminal {
    padding: 1rem;
    border-width: 1px;
  }

  .line {
    line-height: 1.45;
  }

  .social-links {
    margin-top: 1.25rem;
  }

  input {
    width: 100%;
    font-size: 16px;
  }

  button {
    margin-bottom: 0.5rem;
  }
}
