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

:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #111111;
  --bg-tertiary: #1a1a1a;
  --text-primary: #e6edf3;
  --text-secondary: #7d8590;
  --text-muted: #484f58;
  --accent: #f59e0b;
  --accent-dim: #b45309;
  --accent-subtle: rgba(245, 158, 11, 0.1);
  --border: #21262d;
  --success: #3fb950;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', Consolas, monospace;
}

html, body {
  height: 100%;
}

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

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

/* Navigation */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 24px;
}

.terminal-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.terminal-dot.red { background: #ff5f57; }
.terminal-dot.yellow { background: #febc2e; }
.terminal-dot.green { background: #28c840; }

.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 12px;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s ease;
}

.nav-logo:hover {
  color: var(--accent);
}

.nav-icon {
  height: 20px;
  width: auto;
}

.nav-link {
  color: var(--text-secondary);
  font-size: 13px;
  text-decoration: none;
  transition: color 0.15s ease;
}

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

/* Minimal Hero */
.hero {
  padding-bottom: 24px;
}

.headline {
  font-size: 1.25rem;
  font-weight: 500;
  margin-top: 32px;
  margin-bottom: 8px;
}

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

.delayed-reveal {
  display: inline-block;
  margin-top: 12px;
  opacity: 0;
  animation: fadeIn 0.5s ease forwards;
  animation-delay: 1s;
}

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

.tagline {
  color: var(--text-secondary);
  font-size: 0.875rem;
  max-width: 700px;
  line-height: 1.7;
}

/* Page Content (for non-chat pages) */
.page-content {
  padding: 48px 0;
}

.page-title {
  font-size: 1.5rem;
  font-weight: 500;
  margin-bottom: 8px;
}

.page-desc {
  color: var(--text-secondary);
  margin-bottom: 48px;
}

.contact-section {
  margin-bottom: 32px;
}

.contact-section h2 {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.contact-section p {
  margin: 0;
}

.contact-link {
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.15s ease;
}

.contact-link:hover {
  opacity: 0.8;
}

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

/* Contact Form */
.contact-form {
  margin-top: 40px;
  max-width: 500px;
}

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.form-group .required {
  color: var(--accent);
}

.form-group input,
.form-group textarea {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 12px 14px;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-primary);
  transition: border-color 0.15s ease;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

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

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.submit-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--accent);
  color: var(--bg-primary);
  border: 1px solid var(--accent);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.submit-btn:hover {
  background: transparent;
  color: var(--accent);
}

.submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.form-success {
  display: none;
  color: var(--accent);
  line-height: 1.7;
  margin-top: 16px;
}

/* Chat Section */
.chat-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding-bottom: 24px;
  min-height: 0;
  opacity: 0;
  animation: fadeIn 0.5s ease forwards;
  animation-delay: 2.5s;
}

.chat-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  min-height: 400px;
}

.chat-messages {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Messages */
.message {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 100%;
}

.message-role {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

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

.message.assistant .message-role {
  color: var(--accent);
}

.message-content {
  color: var(--text-primary);
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.7;
}

.message.user .message-content {
  color: var(--text-secondary);
}

.message-content .inline-link {
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.15s ease;
}

.message-content .inline-link:hover {
  opacity: 0.8;
}

/* Suggested Prompts */
.suggested-prompts {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin-top: 16px;
}

.prompt-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.prompt-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-subtle);
}

.prompt-chip .chip-icon {
  color: var(--accent);
  font-size: 0.875rem;
}

/* Typing indicator */
.typing-indicator {
  display: flex;
  gap: 4px;
  padding: 4px 0;
}

.typing-indicator span {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: typing 1.4s infinite ease-in-out;
}

.typing-indicator span:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
  animation-delay: 0.4s;
}

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

/* Chat Input */
.chat-input-container {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  background: var(--bg-primary);
}

.input-prompt {
  color: var(--accent);
  font-size: 14px;
  line-height: 24px;
  user-select: none;
}

#chat-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 24px;
  resize: none;
  outline: none;
  max-height: 150px;
}

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

.send-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 6px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.send-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.send-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

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

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

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

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

/* Responsive */
@media (max-width: 640px) {
  body {
    font-size: 13px;
  }

  .container {
    padding: 0 16px;
  }

  .headline {
    font-size: 1.125rem;
  }

  .chat-messages {
    padding: 16px;
  }

  .chat-input-container {
    padding: 12px 16px;
  }

  .prompt-chip {
    font-size: 0.75rem;
    padding: 6px 10px;
  }
}
