:root {
  --bg-primary: white;
  --bg-secondary: #f9f8fb;
  --bg-tertiary: #f0f0f0;
  --text-primary: #1a1a1a;
  --text-secondary: #666;
  --text-tertiary: #333;
  --border-color: #e8e8e8;
  --border-light: #ece9f2;
  --border-input: #e0e0e0;
  --primary-color: #474559;
  --primary-dark: #3d3b4c;
  --card-bg: white;
  --input-bg: white;
  --accent-bg: #f0f0f0;
}

body.dark-mode {
  --bg-primary: #1a1a1a;
  --bg-secondary: #2d2d2d;
  --bg-tertiary: #3a3a3a;
  --text-primary: #e0e0e0;
  --text-secondary: #b0b0b0;
  --text-tertiary: #d0d0d0;
  --border-color: #3a3a3a;
  --border-light: #404040;
  --border-input: #404040;
  --primary-color: #6b7280;
  --primary-dark: #5a6370;
  --card-bg: #2d2d2d;
  --input-bg: #252525;
  --accent-bg: #3a3a3a;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-bottom: 120px;
  scroll-behavior: smooth;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
  padding: 0 20px;
}

.header-section {
  text-align: center;
  padding: 60px 20px 40px;
}

.avatar {
  width: 80px;
  height: 80px;
  background: #474559;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 40px;
  margin: 0 auto 20px;
}

.header-section h1 {
  font-size: 32px;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.header-section p {
  font-size: 16px;
  color: var(--text-secondary);
}

.chat-area {
  flex: 1;
  padding: 50px 20px 120px;
  overflow-y: auto;
  background: var(--bg-primary);
  display: flex;
  flex-direction: column;
}

.input-area {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-primary);
  border-top: 1px solid var(--border-color);
  padding: 20px;
  display: flex;
  gap: 10px;
  justify-content: center;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

.input-area input {
  flex: 1;
  padding: 12px 18px;
  border: 1.5px solid var(--border-input);
  border-radius: 25px;
  font-size: 14px;
  font-family: inherit;
  background: var(--input-bg);
  color: var(--text-primary);
}

.input-area input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(71, 69, 89, 0.1);
}

.send-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary-color);
  border: none;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.send-btn:hover {
  background: var(--primary-dark);
}

.message {
  margin-bottom: 20px;
  animation: slideIn 0.4s ease;
  display: flex;
  flex-wrap: wrap;
}

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

.message.bot {
  justify-content: flex-start;
  width: 100%;
}

.message.user {
  justify-content: flex-end;
  width: 100%;
}

.message-bubble {
  max-width: 70%;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 15px;
  line-height: 1.6;
}

.message.bot .message-bubble {
  background: var(--accent-bg);
  color: var(--text-tertiary);
}

.message.user .message-bubble {
  background: var(--primary-color);
  color: white;
}

.content-block {
  max-width: 70%;
  background: var(--card-bg);
  padding: 16px 18px;
  border-radius: 16px;
  color: var(--text-tertiary);
  line-height: 1.8;
  border: 1.5px solid var(--border-color);
}

.message.bot .content-block {
  margin-top: 8px;
}

.buttons-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 15px;
  width: 100%;
}

.message.bot .buttons-group {
  justify-content: flex-start;
}

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

.quick-btn {
  padding: 10px 16px;
  background: var(--input-bg);
  border: 1.5px solid var(--border-input);
  border-radius: 20px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.3s ease;
}

.quick-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  background: var(--bg-secondary);
}

.info-card,
.contact-card {
  max-width: 70%;
  background: var(--card-bg);
  border: 1.5px solid var(--border-color);
  border-radius: 18px;
  padding: 20px;
  margin-top: 8px;
}

.card-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.card-text {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.stats-row,
.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.stat-pill,
.mini-pill {
  padding: 8px 12px;
  background: var(--bg-secondary);
  border: none;
  border-radius: 8px;
  font-size: 12px;
  color: var(--primary-color);
  font-weight: 600;
  display: inline-block;
}

.section-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.section-item {
  background: var(--bg-secondary);
  border-radius: 12px;
  padding: 12px 14px;
}

.section-item strong {
  display: block;
  color: var(--text-primary);
  font-size: 14px;
  margin-bottom: 4px;
}

.section-item span {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.6;
}

.timeline {
  display: grid;
  gap: 16px;
  padding: 12px 0;
}

.timeline-item {
  background: linear-gradient(135deg, var(--card-bg) 0%, var(--bg-secondary) 100%);
  border: 1.5px solid var(--border-light);
  border-radius: 16px;
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.timeline-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color) 0%, var(--primary-color) 100%);
}

.job-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
  gap: 12px;
  padding-top: 8px;
}

.job-title {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 16px;
  flex: 1;
  line-height: 1.3;
}

.job-date {
  font-size: 11px;
  color: white;
  font-weight: 700;
  white-space: nowrap;
  background: var(--primary-color);
  padding: 6px 12px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.job-company {
  font-size: 13px;
  color: var(--primary-color);
  font-weight: 600;
  margin-bottom: 12px;
}

.job-bullets {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.8;
  list-style: none;
  margin: 0;
  padding: 0;
}

.job-bullets li {
  margin-bottom: 8px;
  padding-left: 18px;
  position: relative;
}

.job-bullets li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--primary-color);
  font-weight: bold;
}

.education-section,
.certifications-section {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 2px solid var(--border-light);
}

.section-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 0.7px;
  margin-bottom: 16px;
  display: block;
}

.education-item,
.cert-item {
  margin-bottom: 14px;
  padding: 14px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: 12px;
}

.education-item:last-child,
.cert-item:last-child {
  margin-bottom: 0;
}

.degree-title {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 14px;
  margin-bottom: 6px;
}

.degree-school {
  font-size: 12px;
  color: var(--primary-color);
  font-weight: 600;
}

.contact-card {
  display: grid;
  gap: 14px;
}

.contact-top {
  display: grid;
  gap: 6px;
}

.contact-top p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: 999px;
  text-decoration: none;
  color: var(--primary-color);
  font-size: 12px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.contact-link:hover {
  background: var(--card-bg);
  border-color: var(--primary-color);
}

textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border-input);
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 12px;
  font-family: inherit;
  background: var(--input-bg);
  color: var(--text-primary);
  resize: vertical;
  min-height: 100px;
}

textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(71, 69, 89, 0.1);
}

.form-row {
  display: grid;
  gap: 12px;
}

.form-row.full {
  grid-column: 1 / -1;
}

.profile-image {
  width: 100%;
  max-width: 200px;
  height: 200px;
  border-radius: 16px;
  object-fit: cover;
  margin-bottom: 16px;
  border: 2px solid var(--border-light);
}

.exp-item {
  background: var(--bg-secondary);
  padding: 14px 16px;
  border-left: 4px solid var(--primary-color);
  margin: 10px 0;
  border-radius: 10px;
  font-size: 13px;
}

.exp-year {
  color: var(--primary-color);
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.exp-title {
  color: var(--text-primary);
  font-weight: 600;
  margin: 5px 0 3px 0;
  font-size: 14px;
}

.exp-company {
  color: var(--text-secondary);
  font-size: 12px;
}

.form-input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border-input);
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 12px;
  font-family: inherit;
  background: var(--input-bg);
  color: var(--text-primary);
}

.form-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(71, 69, 89, 0.1);
}

.form-submit {
  width: 100%;
  padding: 12px 16px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  margin-top: 8px;
}

.form-submit:hover {
  background: var(--primary-dark);
}

@media (max-width: 768px) {
  .message-bubble,
  .content-block,
  .buttons-group,
  .info-card,
  .contact-card {
    max-width: 100%;
  }

  .skill-grid,
  .form-row {
    grid-template-columns: 1fr;
  }

  .header-section {
    padding: 40px 20px 30px;
  }

  .header-section h1 {
    font-size: 24px;
  }

  .chat-area {
    padding: 30px 0;
  }

  .bottom-nav {
    gap: 20px;
    padding: 12px 10px;
  }

  .nav-item {
    font-size: 11px;
  }
}
