:root {
  --bg: #0d0d0d;
  --bg-input: #1a1a1a;
  --text: #d4d4d4;
  --text-white: #ffffff;
  --text-muted: #737373;
  --text-dim: #525252;
  --accent: #e87a5a;
  --accent-dark: #d4694b;
  --purple: #c084fc;
  --blue: #60a5fa;
  --green: #4ade80;
  --pink: #f472b6;
  --indigo: #9898c8;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: clamp(10px, 1.75vh, 18px); /* ~14px at 800px viewport, scales with height */
}

body {
  font-family: 'JetBrains Mono', 'SF Mono', 'Menlo', 'Consolas', monospace;
  background-color: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding: clamp(1rem, 3vh, 3rem) clamp(1.5rem, 4vw, 4rem);
  line-height: 1.4;
}

.terminal {
  width: 100%;
  max-width: 50vw;
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* Terminal Header */
.terminal-header {
  color: var(--text-muted);
  font-size: clamp(0.7rem, 1.2vh, 0.9rem);
  margin-bottom: clamp(0.5rem, 1.5vh, 1.5rem);
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.terminal-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.header-user {
  color: var(--text-muted);
}

.header-dir {
  color: var(--blue);
}

.header-symbol {
  color: var(--text-muted);
}

.header-cmd {
  color: var(--text-white);
}

/* Identity Block */
.identity-block {
  display: flex;
  align-items: flex-start;
  gap: clamp(0.5rem, 1vw, 1rem);
  margin-bottom: clamp(0.5rem, 1.5vh, 1.5rem);
  flex-shrink: 0;
}

.pixel-art-container {
  flex-shrink: 0;
}

.pixel-art {
  display: block;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  width: clamp(36px, 6vh, 56px);
  height: clamp(36px, 6vh, 56px);
}

.identity-info {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.name-version {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.name {
  color: var(--text-white);
  font-weight: 500;
  font-size: clamp(0.85rem, 1.4vh, 1rem);
}

.version {
  color: var(--accent);
  font-size: clamp(0.7rem, 1.2vh, 0.9rem);
}

.subtitle,
.path {
  color: var(--text-muted);
  font-size: clamp(0.7rem, 1.2vh, 0.9rem);
}

/* User Input */
.user-input {
  background-color: var(--bg-input);
  padding: clamp(0.25rem, 0.6vh, 0.5rem) clamp(0.5rem, 1vw, 0.75rem);
  margin: clamp(0.4rem, 1vh, 1rem) 0 clamp(0.2rem, 0.5vh, 0.5rem) 0;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: clamp(0.75rem, 1.3vh, 1rem);
  flex-shrink: 0;
  width: 100%;
}

.input-symbol {
  color: var(--accent);
}

.input-text {
  color: var(--text-white);
}

/* Response */
.response {
  margin-bottom: clamp(0.1rem, 0.3vh, 0.25rem);
  font-size: clamp(0.75rem, 1.3vh, 1rem);
  flex-shrink: 0;
}

.bullet-line {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-top: clamp(0.1rem, 0.3vh, 0.25rem);
}

.bullet {
  color: var(--accent);
  font-size: clamp(0.4rem, 0.7vh, 0.6rem);
  line-height: 2;
}

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

.white {
  color: var(--text-white);
}

/* Tree Lines */
.tree-line {
  display: flex;
  gap: 0.5rem;
  margin-left: 0.9rem;
  margin-top: clamp(0rem, 0.1vh, 0.1rem);
  font-size: clamp(0.7rem, 1.2vh, 0.9rem);
}

.tree {
  color: var(--text-dim);
  user-select: none;
}

.muted {
  color: var(--text-muted);
}

.date {
  color: var(--indigo);
}

/* Links */
a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s;
}

a:hover {
  color: var(--text-white);
  text-decoration: underline;
}

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

/* Links Row */
.links-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}

.links-row .bullet-line {
  margin-top: 0.25rem;
}

/* Sautéed Indicator (like Claude Code timer) */
.sauteed {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: clamp(0.5rem, 1vh, 1.25rem);
  color: var(--text-muted);
  font-size: clamp(0.7rem, 1.1vh, 0.9rem);
  flex-shrink: 0;
}

.sauteed-icon {
  color: var(--text-muted);
}

.sauteed-text {
  color: var(--text-muted);
}

/* Cursor */
.cursor-input {
  margin-top: clamp(0.25rem, 0.75vh, 0.75rem);
  flex-shrink: 0;
}

.cursor {
  display: inline-block;
  width: 0.5rem;
  height: 1.1em;
  background-color: var(--text);
  animation: blink 1s step-end infinite;
}

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

/* Status Bar */
.status-bar {
  margin-top: auto;
  padding-top: clamp(0.4rem, 0.75vh, 0.75rem);
  border-top: 1px solid #1a1a1a;
  flex-shrink: 0;
}

.status-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: clamp(0.7rem, 1.1vh, 0.85rem);
  transition: color 0.15s;
}

.status-link:hover {
  color: var(--accent);
  text-decoration: none;
}

.status-link:hover .status-arrows,
.status-link:hover .status-text {
  color: var(--accent);
}

.status-arrows {
  color: var(--green);
  font-size: 0.75rem;
}

.status-text {
  color: var(--green);
}

.status-hint {
  color: var(--text-muted);
}

/* Selection */
::selection {
  background-color: var(--accent);
  color: var(--bg);
}

/* Responsive - Tablet */
@media (max-width: 1024px) {
  body {
    padding: 2.5rem 3rem;
  }
}

/* Responsive - Small tablets */
@media (max-width: 768px) {
  body {
    padding: 2rem;
  }

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

/* Responsive - Mobile */
@media (max-width: 600px) {
  html {
    font-size: 13px;
  }

  body {
    padding: 1.5rem 1.25rem;
  }

  .terminal-header {
    font-size: 0.8rem;
    margin-bottom: 1.25rem;
  }

  .identity-block {
    gap: 0.75rem;
  }

  .pixel-art {
    width: 48px;
    height: 48px;
  }

  .name {
    font-size: 0.95rem;
  }

  .version {
    font-size: 0.8rem;
  }

  .subtitle,
  .identity-info .path {
    font-size: 0.8rem;
  }

  .user-input {
    padding: 0.4rem 0.6rem;
    margin: 0.75rem 0 0.4rem 0;
  }

  .bullet {
    font-size: 0.5rem;
  }

  .tree-line {
    margin-left: 0.75rem;
  }

  .links-row {
    gap: 0.2rem 1rem;
  }

  .sauteed {
    margin-top: 1rem;
    font-size: 0.8rem;
  }

  .cursor-input {
    margin-top: 0.5rem;
  }

  .status-bar {
    margin-top: 1.25rem;
    padding-top: 0.6rem;
  }

  .status-link {
    font-size: 0.8rem;
  }
}

/* Responsive - Very small mobile */
@media (max-width: 400px) {
  html {
    font-size: 12px;
  }

  body {
    padding: 1.25rem 1rem;
  }

  .links-row {
    flex-direction: column;
    gap: 0.2rem;
  }

  .pixel-art {
    width: 40px;
    height: 40px;
  }
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #0d0d0d;
}

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

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}
