@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&display=swap');
/* Google's standard subsets leave out box drawing and shapes, so those fell
   back to a narrower font and frames drifted off the grid. This text= subset
   (unicode-range scoped) serves exactly these from JetBrains Mono too:
   ─│┬┤├╱╲╭╮╰╯═║╔╗╚╝●█◄■□  Add any new box/shape glyph here (JetBrains
   Mono has no ▰▱, so meters use ■□). */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&text=%E2%94%80%E2%94%82%E2%94%AC%E2%94%A4%E2%94%9C%E2%95%B1%E2%95%B2%E2%95%AD%E2%95%AE%E2%95%B0%E2%95%AF%E2%95%90%E2%95%91%E2%95%94%E2%95%97%E2%95%9A%E2%95%9D%E2%97%8F%E2%96%88%E2%97%84%E2%96%A0%E2%96%A1&display=swap');

/* Terminal display rules: one monospace grid (one font, one size, one
   line-height), square corners, a small palette, and motion only where
   terminals have it (the cursor, and fireflies at night). */

: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);
}

/* Keyboard focus: a square accent ring on anything focusable */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

#command-input:focus-visible {
  outline: none;
}

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

#terminal-output {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  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(--frame);
}

@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: printed straight onto the grid, no fades or slides */
.output-line {
  white-space: pre-wrap;
  word-wrap: break-word;
  min-height: calc(var(--line-height) * 1em);
}

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

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

.output-line.error,
.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(--frame);
  border-bottom: 1px solid var(--frame);
}

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

/* Echoed commands get a literal space after the prompt; the live input
   line gets the same one cell as a margin, so both start on one column. */
#input-line .prompt {
  margin-right: 1ch;
}

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

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

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

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

/* The seedling takes exactly two cells, like a wide character in a
   terminal. It is drawn at 0.85em, so two parent cells (1.2em) are
   1.2 / 0.85 = 1.4118 of its own em. */
.prompt .prompt-symbol {
  display: inline-block;
  font-size: 0.85em;
  width: 1.4118em;
  text-align: center;
  line-height: 1;
}

/* 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: calc(var(--line-height) * 1em);
  white-space: pre;
  overflow: hidden;
}

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

/* Blinking cursor: one cell wide */
#cursor {
  display: inline-block;
  width: 1ch;
  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: calc(var(--line-height) * 1em);
}

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

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

/* Section headers: the title, then a ─ rule across the whole column */
.section-header {
  display: block;
  color: var(--accent);
  font-weight: 700;
}

.section-header .dim {
  font-weight: 400;
}

.section-header::after {
  content: '────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────';
  display: block;
  overflow: hidden;
  white-space: nowrap;
  color: var(--frame);
  font-weight: 400;
}

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

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

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

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

/* Tags print as [k8s] */
.tag {
  color: var(--highlight, var(--accent));
}

.tag::before {
  content: '[';
  color: var(--dim);
}

.tag::after {
  content: ']';
  color: var(--dim);
}

/* 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;
}

/* Frames: a 1px square border with the title set into the top edge,
   ┤ like this ├, as in btop or lazygit. Set --frame-bg to whatever is
   behind the frame so the title can cut the line. */
.frame {
  --frame-bg: var(--bg);
  position: relative;
  border: 1px solid var(--frame);
  background: var(--frame-bg);
  padding: calc(var(--line-height) * 0.5em) 2ch;
  margin-top: calc(var(--line-height) * 0.5em);
}

.frame-title {
  position: absolute;
  top: 0;
  left: 1ch;
  transform: translateY(-50%);
  background: var(--frame-bg);
  color: var(--accent);
  font-weight: 700;
  line-height: var(--line-height);
  white-space: nowrap;
}

.frame-title::before,
.frame-title::after {
  color: var(--frame);
  font-weight: 400;
}

.frame-title::before {
  content: '┤ ';
}

.frame-title::after {
  content: ' ├';
}

/* Canopy: the vine strip at the top of the output. Lines longer than the
   column are clipped, so it shortens on narrow screens instead of scrolling. */
.canopy-strip {
  white-space: pre;
  overflow: hidden;
  color: var(--vine);
  user-select: none;
}

.canopy-strip .fl {
  color: var(--flower);
}

/* Fireflies: a few · glimmering in the margins, at night only */
.fireflies {
  display: none;
  position: fixed;
  inset: 0;
  pointer-events: none;
  user-select: none;
}

.fireflies i {
  position: absolute;
  font-style: normal;
  font-weight: 700;
  color: var(--glow);
  text-shadow: 0 0 6px var(--glow);
  opacity: 0;
  animation: glimmer 7s ease-in-out infinite;
}

.fireflies i:nth-child(1) { left: 4px; top: 22%; animation-delay: 0s; }
.fireflies i:nth-child(2) { left: 3px; top: 58%; animation-delay: -2.5s; animation-duration: 9s; }
.fireflies i:nth-child(3) { right: 22px; top: 34%; animation-delay: -4s; }
.fireflies i:nth-child(4) { right: 26px; top: 71%; animation-delay: -1s; animation-duration: 8s; }
.fireflies i:nth-child(5) { left: 5px; top: 84%; animation-delay: -5.5s; animation-duration: 10s; }

@keyframes glimmer {
  0%, 100% { opacity: 0; }
  45%, 55% { opacity: 0.9; }
}

@media (prefers-reduced-motion: no-preference) {
  :root[data-theme="jungle-night"] .fireflies {
    display: block;
  }
}

@media (prefers-reduced-motion: no-preference) and (prefers-color-scheme: dark) {
  :root:not([data-theme]) .fireflies {
    display: block;
  }
}

/* Welcome header: a titled frame. The template's whitespace shouldn't
   render as blank lines. */
.welcome-box {
  white-space: normal;
  max-width: 68ch;
  margin-bottom: calc(var(--line-height) * 0.5em);
}

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

.welcome-title {
  color: var(--text);
}

/* Two highlights under the headline, one line each on desktop; wrapped
   lines hang under the text, not the marker */
.welcome-highlights {
  list-style: none;
  margin: 0;
  padding: 0;
}

.welcome-highlights li {
  padding-left: 2ch;
  text-indent: -2ch;
}

.welcome-highlights li::before {
  content: '› ';
  color: var(--accent);
}

/* Inline command links */
.cmd-link {
  background: none;
  border: none;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: inherit;
  line-height: 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;
}

/* "Try asking" examples: left-aligned rows that run when clicked,
   indented two cells with a hanging indent for wrapped lines */
.cmd-link.suggestion {
  display: block;
  text-align: left;
  margin: 0 0 0 2ch;
  padding-left: 2ch;
  text-indent: -2ch;
}

.cmd-link.suggestion::before {
  content: '\203A  ';
  color: var(--dim);
}

/* Keep lines at a readable length on wide screens */
:where(#terminal-output) > * {
  max-width: 110ch;
}

@media (min-width: 1200px) {
  :root {
    --font-size: 15px;
  }
}

/* Fixed header above the output: vines and the site nav survive `clear` */
#terminal-header {
  flex: none;
  padding: 0 16px;
  overflow: hidden;
}

#terminal-header .site-nav {
  padding: 4px 0 6px;
  border-bottom: 1px solid var(--frame, var(--dim));
}
