/* ============================================
   Ask My Portfolio — Jarvi
   Design language: romanmartins.com
   (#07110d deep green, emerald #34d399 accent,
    mint→emerald→cyan gradient, Inter + JetBrains Mono)
   ============================================ */

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

/* --- Design Tokens --- */
:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;

  /* Dark theme (default) — romanmartins.com palette */
  --bg-primary: #07110d;
  --bg-secondary: #0b1511;
  --bg-tertiary: #0c1712;
  --bg-elevated: #0d1a14;
  --bg-hover: #11211a;
  --text-primary: #f2fbf7;
  --text-secondary: #8ba39a;
  --text-tertiary: rgba(242, 251, 247, 0.38);
  --border: rgba(255, 255, 255, 0.08);
  --border-subtle: rgba(255, 255, 255, 0.05);
  --accent: #34d399;
  --accent-hover: #6ee7b7;
  --accent-subtle: rgba(52, 211, 153, 0.12);
  --accent-text: #86efac;
  --accent-on: #07110d;            /* text color on solid emerald */
  --citation-bg: rgba(52, 211, 153, 0.07);
  --citation-border: rgba(52, 211, 153, 0.18);
  --user-msg-bg: rgba(52, 211, 153, 0.07);
  --user-msg-border: rgba(52, 211, 153, 0.16);
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.5);
  --input-bg: rgba(12, 23, 18, 0.88);
  --header-bg: rgba(7, 17, 13, 0.86);
  --success: #34d399;
  --grad-a: #a7f3d0;
  --grad-b: #34d399;
  --grad-c: #22d3ee;
  --grid-dot: rgba(255, 255, 255, 0.04);
  --wash-a: rgba(52, 211, 153, 0.06);
  --wash-b: rgba(34, 211, 238, 0.04);
}

[data-theme="light"] {
  --bg-primary: #f6fbf8;
  --bg-secondary: #eef7f2;
  --bg-tertiary: #ffffff;
  --bg-elevated: #ffffff;
  --bg-hover: #e8f3ed;
  --text-primary: #0c1712;
  --text-secondary: #51655c;
  --text-tertiary: #93a8a0;
  --border: rgba(12, 23, 18, 0.12);
  --border-subtle: rgba(12, 23, 18, 0.07);
  --accent: #059669;
  --accent-hover: #047857;
  --accent-subtle: rgba(5, 150, 105, 0.1);
  --accent-text: #047857;
  --accent-on: #ffffff;
  --citation-bg: rgba(5, 150, 105, 0.06);
  --citation-border: rgba(5, 150, 105, 0.18);
  --user-msg-bg: rgba(5, 150, 105, 0.06);
  --user-msg-border: rgba(5, 150, 105, 0.16);
  --shadow-sm: 0 1px 2px rgba(12,23,18,0.05);
  --shadow-md: 0 4px 12px rgba(12,23,18,0.08);
  --shadow-lg: 0 8px 24px rgba(12,23,18,0.12);
  --input-bg: rgba(255, 255, 255, 0.92);
  --header-bg: rgba(246, 251, 248, 0.88);
  --success: #059669;
  --grad-a: #047857;
  --grad-b: #059669;
  --grad-c: #0e7490;
  --grid-dot: rgba(12, 23, 18, 0.06);
  --wash-a: rgba(5, 150, 105, 0.05);
  --wash-b: rgba(8, 145, 178, 0.04);
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  transition: background 0.3s ease, color 0.3s ease;
}

/* Dot grid + emerald wash backdrop (signature romanmartins.com surface) */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(115deg, var(--wash-a), transparent 34%, var(--wash-b) 78%, transparent),
    radial-gradient(var(--grid-dot) 1px, transparent 1px);
  background-size: 100% 100%, 28px 28px;
}

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(52, 211, 153, 0.3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(52, 211, 153, 0.55); }

/* --- Selection --- */
::selection {
  background: rgba(52, 211, 153, 0.3);
  color: #fff;
}
[data-theme="light"] ::selection { color: #0c1712; }

/* --- Gradient text (signature) --- */
.gradient-text {
  background: linear-gradient(135deg, var(--grad-a) 0%, var(--grad-b) 48%, var(--grad-c) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- Header --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  background: var(--header-bg);
  border-bottom: 1px solid var(--border-subtle);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: background 0.3s ease;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-mark {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: linear-gradient(135deg, #34d399, #22d3ee);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  color: #07110d;
  box-shadow: 0 2px 10px rgba(52, 211, 153, 0.25);
  transition: box-shadow 0.2s ease;
}

.brand:hover .brand-mark { box-shadow: 0 2px 16px rgba(52, 211, 153, 0.45); }

.brand-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.brand:hover .brand-name { color: var(--text-primary); }

.header-sep {
  width: 1px;
  height: 14px;
  background: var(--border);
  flex-shrink: 0;
}

.jarvi-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-text);
  white-space: nowrap;
}

.header-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 6px rgba(52, 211, 153, 0.8);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.header-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.header-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  width: 30px;
  height: 30px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  transition: all 0.15s ease;
}

.header-btn:hover {
  background: var(--accent-subtle);
  color: var(--accent-text);
  border-color: rgba(52, 211, 153, 0.35);
}

.newchat-btn {
  display: none;
  align-items: center;
  gap: 6px;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  height: 30px;
  padding: 0 11px;
  border-radius: 8px;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.newchat-btn.visible { display: inline-flex; }

.newchat-btn:hover {
  background: var(--accent-subtle);
  color: var(--accent-text);
  border-color: rgba(52, 211, 153, 0.35);
}

/* --- Main Container --- */
.main {
  flex: 1;
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
  padding: 56px 20px 170px;
  display: flex;
  flex-direction: column;
  /* Let the browser anchor content while the streaming bubble grows — reduces
     perceived jumping when markdown re-parses mid-answer. */
  overflow-anchor: auto;
}

/* --- Hero Section --- */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 72px 0 36px;
  animation: fadeUp 0.6s ease;
  transition: all 0.4s ease;
}

.hero.collapsed {
  padding: 20px 0 10px;
  opacity: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 13px;
  border-radius: 999px;
  border: 1px solid rgba(52, 211, 153, 0.25);
  background: var(--accent-subtle);
  margin-bottom: 26px;
}

.hero-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 6px rgba(52, 211, 153, 0.8);
  animation: pulse-dot 2s ease-in-out infinite;
}

.hero-status-text {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-text);
}

.hero-photo-ring {
  padding: 2px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.75), rgba(34, 211, 238, 0.45) 60%, transparent);
  box-shadow: 0 0 44px rgba(52, 211, 153, 0.18);
  margin-bottom: 18px;
}

.hero-photo {
  display: block;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--bg-primary);
}

.hero-name {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 6px;
}

.hero-tagline {
  font-size: 15px;
  color: var(--text-secondary);
  max-width: 400px;
  line-height: 1.5;
}

.jarvi-intro {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
  padding: 14px 18px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 14px;
  max-width: 440px;
  text-align: left;
}

[data-theme="dark"] .jarvi-intro,
:root:not([data-theme="light"]) .jarvi-intro {
  background: rgba(12, 23, 18, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.jarvi-badge {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #34d399, #22d3ee);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  color: #07110d;
  flex-shrink: 0;
  box-shadow: 0 2px 12px rgba(52, 211, 153, 0.3);
}

.jarvi-text {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.45;
}

.jarvi-text strong {
  color: var(--text-primary);
}

/* --- Suggested Questions --- */
.suggestions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
  max-width: 580px;
  margin: 0 auto;
  animation: fadeUp 0.6s ease 0.15s both;
}

.suggestions.hidden {
  display: none;
}

.suggestions-label {
  grid-column: 1 / -1;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 2px;
}

.suggestion-card {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 13px 15px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.suggestion-card:hover {
  background: var(--bg-hover);
  border-color: rgba(52, 211, 153, 0.45);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(52, 211, 153, 0.07), var(--shadow-sm);
}

.suggestion-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--accent-subtle);
  border: 1px solid var(--citation-border);
  color: var(--accent-text);
  font-family: var(--font-mono);
  font-size: 12px;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.suggestion-card:hover .suggestion-icon {
  background: var(--accent);
  color: var(--accent-on);
  border-color: transparent;
}

.suggestion-text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.45;
  padding-top: 3px;
}

.suggestion-card:hover .suggestion-text {
  color: var(--text-primary);
}

/* --- Chat Messages --- */
.messages {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 8px 0;
}

.message {
  animation: fadeUp 0.3s ease;
}

.message-user {
  display: flex;
  justify-content: flex-end;
}

.message-user-bubble {
  background: var(--user-msg-bg);
  border: 1px solid var(--user-msg-border);
  border-radius: 14px 14px 4px 14px;
  padding: 12px 16px;
  max-width: 85%;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-primary);
}

.message-assistant {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-left: 38px;
  position: relative;
}

.message-assistant .jarvi-msg-avatar {
  position: absolute;
  left: 0;
  top: 2px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #34d399, #22d3ee);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: #07110d;
  box-shadow: 0 2px 8px rgba(52, 211, 153, 0.25);
}

.message-assistant-content {
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--text-primary);
  /* Isolate layout/paint so streamed markdown re-parses don't ripple out
     into the surrounding document and cause the whole page to re-lay. */
  contain: layout style;
  /* Stabilise wrapping so mid-stream paragraph breaks don't shift earlier lines. */
  overflow-wrap: anywhere;
  word-break: break-word;
}

.message-assistant-content p { margin-bottom: 12px; }
.message-assistant-content p:last-child { margin-bottom: 0; }
.message-assistant-content p:first-child { margin-top: 0; }
.message-assistant-content strong { font-weight: 600; }
.message-assistant-content ul, .message-assistant-content ol { margin: 8px 0; padding-left: 20px; }
.message-assistant-content li { margin-bottom: 4px; }
.message-assistant-content h2, .message-assistant-content h3 {
  font-size: 15px;
  font-weight: 600;
  margin: 16px 0 8px;
  letter-spacing: -0.01em;
}
.message-assistant-content code {
  font-family: var(--font-mono);
  font-size: 12.5px;
  background: var(--accent-subtle);
  color: var(--accent-text);
  padding: 2px 6px;
  border-radius: 4px;
}
.message-assistant-content a {
  color: var(--accent-text);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s;
}
.message-assistant-content a:hover {
  border-bottom-color: var(--accent-text);
}

/* --- Citation Badges --- */
.citation-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-subtle);
  color: var(--accent-text);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.15s ease;
  vertical-align: super;
  margin: 0 1px;
  text-decoration: none;
}

.citation-badge:hover {
  background: var(--accent);
  color: var(--accent-on);
}

/* --- Source Cards --- */
.sources-container {
  margin-top: 4px;
}

.sources-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 8px;
}

.sources-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.source-card {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--citation-bg);
  border: 1px solid var(--citation-border);
  border-radius: 8px;
  padding: 8px 12px;
  text-decoration: none;
  transition: all 0.15s ease;
  max-width: 100%;
}

.source-card:hover {
  background: var(--accent-subtle);
  border-color: rgba(52, 211, 153, 0.5);
}

.source-card-number {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  color: var(--accent-text);
  flex-shrink: 0;
}

.source-card-title {
  font-size: 12.5px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.source-card:hover .source-card-title {
  color: var(--text-primary);
}

.source-card-arrow {
  font-size: 12px;
  color: var(--text-tertiary);
  flex-shrink: 0;
  margin-left: auto;
}

.source-card-askable {
  font-family: var(--font-sans);
  cursor: pointer;
}

.source-card-askable:hover .source-card-dive {
  color: var(--accent-text);
}

.source-card-dive {
  transition: color 0.15s;
}

/* --- Typing Indicator --- */
.typing {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 0 6px 38px;
  position: relative;
  animation: fadeUp 0.2s ease;
}

.typing .jarvi-msg-avatar {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #34d399, #22d3ee);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: #07110d;
}

.typing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.7;
  animation: typingBounce 1.2s ease-in-out infinite;
}

.typing-dot:nth-child(3) { animation-delay: 0.15s; }
.typing-dot:nth-child(4) { animation-delay: 0.3s; }

.typing-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-tertiary);
  margin-left: 7px;
  letter-spacing: 0.04em;
}

@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-6px); opacity: 1; }
}

/* --- Input Bar --- */
.input-container {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 18px 20px 44px;
  background: linear-gradient(to top, var(--bg-primary) 78%, transparent);
}

.input-wrapper {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 8px 8px 8px 16px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-wrapper:focus-within {
  border-color: rgba(52, 211, 153, 0.55);
  box-shadow: 0 0 0 3px var(--accent-subtle), 0 0 32px rgba(52, 211, 153, 0.08);
}

.input-textarea {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  resize: none;
  max-height: 120px;
  min-height: 24px;
  padding: 4px 0;
}

.input-textarea::placeholder {
  color: var(--text-tertiary);
}

.send-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: none;
  background: var(--accent);
  color: var(--accent-on);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  flex-shrink: 0;
  box-shadow: 0 2px 12px rgba(52, 211, 153, 0.25);
}

.send-btn:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(52, 211, 153, 0.35); }
.send-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: none; }

.send-btn svg {
  width: 16px;
  height: 16px;
}

/* --- Footer --- */
.footer {
  position: fixed;
  bottom: 14px;
  left: 0;
  right: 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.02em;
  color: var(--text-tertiary);
  pointer-events: none;
  z-index: 101;
  padding: 0 16px;
}

.footer a {
  color: var(--text-tertiary);
  text-decoration: none;
  pointer-events: auto;
  transition: color 0.15s;
}

.footer a:hover { color: var(--accent-text); }

/* --- Info Modal --- */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(4, 10, 8, 0.7);
  z-index: 200;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.modal-overlay.visible { display: flex; }

.modal {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  max-width: 480px;
  width: 90%;
  box-shadow: var(--shadow-lg);
  animation: fadeUp 0.25s ease;
}

.modal h2 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.modal p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 12px;
}

.modal-close {
  background: var(--accent-subtle);
  border: 1px solid var(--citation-border);
  color: var(--accent-text);
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  margin-top: 8px;
  transition: all 0.15s;
}

.modal-close:hover {
  background: var(--accent);
  color: var(--accent-on);
  border-color: transparent;
}

/* --- Knowledge Source List (in modal) --- */
.knowledge-list {
  list-style: none;
  padding: 0;
  margin: 12px 0;
}

.knowledge-list li {
  font-size: 13px;
  color: var(--text-secondary);
  padding: 4px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.knowledge-list li::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

/* --- Follow-up Chips --- */
.followups {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px 0 8px;
  animation: fadeUp 0.3s ease;
}

.followup-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 8px 14px;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.followup-chip:hover {
  background: var(--bg-hover);
  border-color: rgba(52, 211, 153, 0.45);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.followup-icon {
  font-size: 12px;
  color: var(--accent-text);
  opacity: 0.85;
}

/* --- Animations --- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Respect reduced-motion preferences and avoid per-mount animations that
   compete with streaming text updates. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* --- Responsive --- */
@media (max-width: 640px) {
  .main { padding: 52px 16px 160px; }
  .hero { padding: 56px 0 28px; }
  .hero-name { font-size: 24px; }
  .hero-tagline { font-size: 14px; }
  .suggestions { grid-template-columns: 1fr; }
  .header { padding: 9px 14px; }
  .brand-name { display: none; }
  .input-container { padding: 14px 16px 36px; }
  .message-user-bubble { max-width: 92%; }
  .modal { width: 94%; padding: 20px; }
}

@media (max-width: 380px) {
  .suggestion-card { padding: 12px; }
  .suggestion-text { font-size: 12px; }
  .jarvi-chip { display: none; }
  .header-sep { display: none; }
  .footer { font-size: 9.5px; }
}
