:root {
  --bg: #0d0d0d;
  --screen: #131313;
  --text: #d8d8d8;
  --dim: #7a7a7a;
  --accent: #5fd97f;
  --border: #2a2a2a;
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-monospace, "SF Mono", "Cascadia Code", "Roboto Mono", Consolas, monospace;
  font-size: 16px;
  line-height: 1.5;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-height: 100vh;
  padding: 24px 16px;
}

.terminal {
  width: 100%;
  max-width: 700px;
}

.screen {
  padding: 24px 20px 20px;
}

.banner {
  margin: 0 0 20px;
  color: var(--accent);
  font-size: clamp(9px, 2.7vw, 16px);
  line-height: 1.25;
  overflow-x: auto;
  white-space: pre;
}

.photo-output {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: clamp(7px, 1.8vw, 10px);
  line-height: 1.15;
  overflow-x: auto;
  white-space: pre;
}

.line {
  margin: 18px 0 4px;
}

.prompt {
  color: var(--accent);
  margin-right: 6px;
}

.output {
  margin: 0 0 4px;
  color: var(--text);
}

#about {
  margin-top: 18px;
  white-space: pre-line;
}

/* Hide the boot-animated pieces only when JS will actually run the
   animation — no-JS visitors always see the fully rendered page. */
.js .type-reveal {
  visibility: hidden;
}

.js .contact-section {
  display: none;
}

.typing::after {
  content: "";
  display: inline-block;
  width: 0.55em;
  height: 1em;
  margin-left: 2px;
  background: var(--accent);
  vertical-align: text-bottom;
  animation: blink 1s steps(1) infinite;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 8px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.contact-form label {
  color: var(--dim);
  font-size: 13px;
}

.contact-form input,
.contact-form textarea {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  padding: 8px 10px;
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.contact-form button {
  align-self: flex-start;
  margin-top: 14px;
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: inherit;
  font-size: 15px;
  padding: 8px 18px;
  border-radius: 4px;
  cursor: pointer;
}

.contact-form button:hover {
  background: var(--accent);
  color: #0d0d0d;
}

.contact-form button:disabled {
  opacity: 0.5;
  cursor: default;
}

#form-status {
  min-height: 1.5em;
}

.terminal-flow {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.term-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  margin: 0;
}

.term-line.done {
  color: var(--dim);
}

.term-line.done .typed {
  color: var(--text);
}

.term-line .field-label {
  color: var(--dim);
}

.term-line .typed {
  white-space: pre-wrap;
  word-break: break-word;
}

.cursor {
  display: inline-block;
  align-self: center;
  width: 2px;
  height: 1em;
  background: var(--text);
  animation: blink 1s steps(1) infinite;
}

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

.hint {
  color: var(--dim);
  font-size: 13px;
}

.field-error {
  color: #ff6b6b;
  font-size: 13px;
}

.ready-line {
  cursor: pointer;
}

.ready-line:focus {
  outline: none;
}

.ready-line:focus .field-label {
  color: var(--accent);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
