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

html, body {
  height: 100%;
  font-family: 'Source Sans 3', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #f2f1ef;
  color: #2c1810;
}

.container {
  display: flex;
  height: 100vh;
}

/* LEFT SECTION */
.intro-section {
  flex: 0 0 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
  background: linear-gradient(180deg, rgba(139, 90, 43, 0.03) 0%, rgba(139, 90, 43, 0.08) 100%);
}

.intro-content {
  max-width: 520px;
}

.greeting {
  font-size: 13px;
  color: #8b5a2b;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 6px;
  font-weight: 500;
}

.name {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 64px;
  font-weight: 500;
  color: #2c1810;
  margin: 0 0 12px 0;
  line-height: 1;
  letter-spacing: -1px;
}

.role {
  font-size: 17px;
  color: #5c4033;
  margin-bottom: 28px;
  font-weight: 400;
}

.bio {
  font-size: 16px;
  line-height: 1.7;
  color: #4a3728;
  margin-bottom: 28px;
}

.divider {
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, #d2cbbe, transparent);
  margin-bottom: 28px;
}

.chat-prompt {
  font-size: 14px;
  color: #7a6555;
  line-height: 1.6;
  margin-bottom: 16px;
}

.bodylink {
  color: #C492B1;
  text-decoration: underline;
  transition: color 0.2s;
}

.links {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 24px;
  margin-bottom: 24px;
}

.link {
  color: #000000;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}

.link:hover {
  color: #A61C3C;
}

.link-divider {
  color: #A99F96;
}

/* CTA BUTTON - Mobile only */
.chat-cta {
  display: none;
  padding: 16px 16px;
  background: #000000;
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-size: 13px;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
  text-decoration: none;
}

.chat-cta:hover {
  background: #A61C3C;
  color: #ffffff;
}

/* RIGHT SECTION - CHAT */
.chat-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-left: 1px solid rgba(139, 90, 43, 0.1);
}

.chat-header {
  padding: 20px 32px;
  border-bottom: 1px solid rgba(139, 90, 43, 0.08);
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fdfcfa;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6b8e5e;
  box-shadow: 0 0 8px rgba(107, 142, 94, 0.5);
}

.header-text {
  font-size: 14px;
  font-weight: 500;
  color: #4a3728;
  letter-spacing: 0.5px;
}

/* Back button - for chat.html */
.back-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  margin-right: 8px;
  background: transparent;
  border: 1px solid rgba(139, 90, 43, 0.15);
  border-radius: 8px;
  color: #5c4033;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.back-btn:hover {
  background: rgba(139, 90, 43, 0.06);
  border-color: rgba(139, 90, 43, 0.25);
  color: #4a3728;
}

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

.messages-area {
  flex: 1;
  overflow-y: auto;
  padding: 32px;
}

.empty-state {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.empty-state.hidden {
  display: none;
}

.empty-content {
  max-width: 400px;
}

.empty-text {
  font-size: 16px;
  color: #5c4033;
  line-height: 1.6;
  margin-bottom: 24px;
  text-align: center;
}

.suggestions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.suggestion-btn {
  padding: 14px 20px;
  background: rgba(139, 90, 43, 0.06);
  border: 1px solid rgba(139, 90, 43, 0.1);
  border-radius: 12px;
  font-size: 14px;
  font-family: inherit;
  color: #5c4033;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s;
}

.suggestion-btn:hover {
  background: rgba(139, 90, 43, 0.12);
  border-color: rgba(139, 90, 43, 0.2);
}

/* MESSAGES */
.messages-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.message {
  padding: 14px 20px;
  border-radius: 18px;
  font-size: 15px;
  line-height: 1.6;
  max-width: 50%;
  animation: fadeIn 0.3s ease;
}

.message.user {
  background: #C492B1;
  color: #ffffff;
  align-self: flex-end;
  margin-left: auto;
  border-bottom-right-radius: 4px;
}

.message.assistant {
  background: #f8f5f0;
  color: #4a3728;
  align-self: flex-start;
  margin-right: auto;
  border-bottom-left-radius: 4px;
}

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

.typing-indicator .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #8b5a2b;
  animation: pulse 1s infinite;
}

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

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

/* INPUT */
.input-area {
  padding: 20px 32px;
  border-top: 1px solid rgba(139, 90, 43, 0.08);
  display: flex;
  gap: 12px;
  background: #fdfcfa;
}

.message-input {
  flex: 1;
  padding: 16px 20px;
  border: 1px solid rgba(139, 90, 43, 0.15);
  border-radius: 14px;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  background: #ffffff;
  color: #2c1810;
  transition: border-color 0.2s;
}

.message-input:focus {
  border-color: rgba(139, 90, 43, 0.3);
}

.message-input::placeholder {
  color: #a89080;
}

.message-input:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.send-btn {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  border: none;
  background: #000000;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.send-btn:hover:not(:disabled) {
  background: #A61C3C;
}

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

/* ANIMATIONS */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

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

/* MOBILE - Below 768px */
@media (max-width: 767px) {
  .container {
    display: block;
    height: auto;
    min-height: 100vh;
  }
  
  .intro-section {
    flex: none;
    width: 100%;
    min-height: 100vh;
    padding: 48px 24px;
    align-items: flex-start;
    padding-top: 80px;
  }
  
  .intro-content {
    max-width: 100%;
  }
  
  .name {
    font-size: 48px;
  }
  
  .chat-section {
    display: none; /* Hide chat on mobile */
  }
  
  .chat-cta {
    display: inline-block; /* Show CTA button on mobile */
  }
  
  .links {
    margin-bottom: 28px;
  }
}

/* Small phones */
@media (max-width: 480px) {
  .intro-section {
    padding: 48px 20px;
    padding-top: 60px;
  }
  
  .name {
    font-size: 40px;
  }
  
  .bio {
    font-size: 15px;
  }
  
  .chat-cta {
    width: 100%;
    text-align: center;
  }
}

/* ============================
   CHAT PAGE STYLES (chat.html)
   ============================ */

/* Full-screen chat layout for mobile */
.chat-page {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  background: #ffffff;
}

.chat-page .chat-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  border-left: none;
}

.chat-page .chat-header {
  padding: 16px 20px;
}

.chat-page .messages-area {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.chat-page .input-area {
  padding: 16px 20px;
  padding-bottom: max(16px, env(safe-area-inset-bottom));
}

.chat-page .message-input {
  font-size: 16px; /* Prevents iOS zoom */
}
