@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&display=swap');

:root {
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', Consolas, 'Courier New', monospace;
  --font-size: 14px;
  --line-height: 1.6;
  --prompt-user: 'visitor';
  --prompt-host: 'resume.sallyroth.dev';
}

html, body {
  height: 100%;
  height: 100dvh;
  overflow: hidden;
}

body {
  font-family: var(--font-mono);
  font-size: var(--font-size);
  line-height: var(--line-height);
  background: var(--bg);
  color: var(--text);
}

/* Terminal container */
#terminal {
  display: flex;
  flex-direction: column;
  height: 100%;
  height: 100dvh;
  position: relative;
}

#terminal-output {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  padding-bottom: 0;
  scroll-behavior: smooth;
}

#terminal-output::-webkit-scrollbar {
  width: 8px;
}

#terminal-output::-webkit-scrollbar-track {
  background: var(--bg);
}

#terminal-output::-webkit-scrollbar-thumb {
  background: var(--dim);
  border-radius: 4px;
}

/* Output animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-8px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes thinkingDots {
  0% { content: ''; }
  25% { content: '.'; }
  50% { content: '..'; }
  75% { content: '...'; }
}

/* Thinking indicator */
.thinking-dots::after {
  content: '';
  animation: thinkingDots 1.2s steps(1) infinite;
  color: var(--dim);
}

/* Output lines */
.output-line {
  white-space: pre-wrap;
  word-wrap: break-word;
  min-height: 1.6em;
  animation: fadeIn 0.15s ease-out both;
}

.output-line.command-echo {
  color: var(--text);
}

.output-line.command-output {
  color: var(--text);
}

.output-line.error {
  color: var(--error, var(--accent));
}

.output-line.system {
  color: var(--dim);
}

/* Prompt line — Claude Code style separators */
#input-line {
  display: flex;
  align-items: center;
  padding: 8px 16px;
  flex-shrink: 0;
  border-top: 1px solid var(--dim);
  border-bottom: 1px solid var(--dim);
}

.prompt {
  color: var(--prompt);
  white-space: nowrap;
  user-select: none;
  flex-shrink: 0;
  margin-right: 0.5ch;
}

.prompt .user {
  color: var(--accent);
}

.prompt .host {
  color: var(--prompt);
}

.prompt .path {
  color: var(--highlight, var(--accent));
}

.prompt .separator {
  color: var(--text);
}

.prompt .prompt-symbol {
  font-size: 0.85em;
}

/* Hidden input */
#command-input {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

/* Visible input display */
#input-display {
  flex: 1;
  position: relative;
  min-height: 1.6em;
  white-space: pre;
  overflow: hidden;
}

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

/* Blinking cursor */
#cursor {
  display: inline-block;
  width: 0.6em;
  height: 1.2em;
  background: var(--cursor, var(--accent));
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Boot sequence */
#boot-screen {
  position: fixed;
  inset: 0;
  background: var(--bg);
  color: var(--dim);
  padding: 16px;
  z-index: 1000;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: var(--font-size);
  line-height: var(--line-height);
  cursor: pointer;
}

#boot-screen .boot-line {
  white-space: pre-wrap;
  min-height: 1.6em;
}

#boot-screen .boot-ok {
  color: var(--accent);
}

#boot-screen .boot-skip {
  position: absolute;
  bottom: 16px;
  right: 16px;
  color: var(--dim);
  font-size: 12px;
}

/* Section headers in output */
.section-header {
  color: var(--accent);
  font-weight: 700;
  border-bottom: 1px solid var(--dim);
  margin-bottom: 0.5em;
  padding-bottom: 0.25em;
  animation: slideInLeft 0.2s ease-out both;
}

.highlight {
  color: var(--accent);
}

.dim {
  color: var(--dim);
}

.info {
  color: var(--info);
}

.warm {
  color: var(--warm);
}

.tag {
  color: var(--highlight, var(--accent));
  background: var(--tag-bg);
  border-radius: 2px;
  padding: 0 0.3em;
}

/* Links in output */
.output-line a {
  color: var(--accent);
  text-decoration: none;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-position: 0% 100%;
  background-repeat: no-repeat;
  background-size: 0% 1px;
  transition: background-size 0.25s ease, color 0.25s ease;
}

.output-line a:hover,
.output-line a:focus-visible {
  color: var(--highlight);
  background-size: 100% 1px;
}

/* Welcome box */
.welcome-box {
  border: 1px solid var(--dim);
  border-left: 3px solid var(--accent);
  border-image: linear-gradient(to bottom, var(--accent), var(--info)) 1;
  border-image-slice: 1;
  padding: 10px 14px;
  margin: 4px 0 8px;
  max-width: 52ch;
  animation: fadeIn 0.3s ease-out both;
}

.welcome-name {
  color: var(--accent);
  font-weight: 700;
}

.welcome-title {
  color: var(--dim);
  margin-bottom: 6px;
}

.welcome-body {
  color: var(--text);
  margin-bottom: 6px;
}

.welcome-email {
  color: var(--dim);
}

.welcome-built {
  color: var(--dim);
  font-size: 0.9em;
}

/* Inline command links */
.cmd-link {
  background: none;
  border: none;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: inherit;
  cursor: pointer;
  padding: 0;
  text-decoration: none;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-position: 0% 100%;
  background-repeat: no-repeat;
  background-size: 0% 1px;
  transition: background-size 0.25s ease, color 0.25s ease;
}

.cmd-link:hover,
.cmd-link:focus-visible {
  color: var(--highlight);
  background-size: 100% 1px;
}

/* Autocomplete suggestion */
#autocomplete-hint {
  color: var(--dim);
  opacity: 0.5;
}
