@font-face {
  font-family: "JetBrains Mono";
  src: url("//fonts/JetBrainsMono-Regular.woff2");
}

:root {
  --foreground: #dadada;
  --background: #1a191f;
}

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

html {
  font-family: "JetBrains Mono", monospace;
  height: 100%;
}

body {
  background-color: #1f2026;
  color: var(--foreground);
  display: flex;
  justify-content: center;
  height: 100%;
  padding: 0;
  margin: 0;
}

.terminal {
  background-color: var(--background);
  box-sizing: border-box;
  width: min(100%, 900px);
  border: 1px solid #1f2937;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  padding: 0.5rem;
  margin: 2em;
  height: calc(100% - 4em);

  display: grid;
  grid-template-rows: auto 1fr auto;

  transition-property: height;
  transition-timing-function: ease-out;
  transition-duration: 200ms;
}

.terminal.maximized {
  width: 100%;
  height: 100%;
}
body:has(.terminal.maximized) {
  padding: 0;
}

.terminal.minimized {
  height: 40px;
  overflow: hidden;
}

.terminal.closed {
  display: none;
}

.terminal header button {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: none;
  background: #555;
  cursor: pointer;
}

.terminal button.close {
  background: #ec6765;
}
.terminal button.minimize {
  background: #f2ca44;
}
.terminal button.maximize {
  background: #65c466;
}

.terminal-content {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  min-height: 0;
}

.terminal-content section {
  border-bottom: 1px solid #1f2937;
}

section h1 {
  font-size: 1rem;
  color: #a8c8cf;
}
section h1::before {
  content: "$ ";
}

.prompt {
  border-bottom: 0;
}

.prompt input {
  background: transparent;
  font-family: "JetBrains Mono", monospace;
  font-size: 1rem;

  color: #a8c8cf;
  border: none;
  outline: none;
  color: var(--foreground);
}
