/* ================================================
   SkillsBarter — "Warm Craft" Design System
   Bricolage Grotesque + Instrument Serif + DM Sans
   ================================================ */

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

:root {
  /* Colors */
  --color-bg: #FAF8F4;
  --color-surface: #FFFFFF;
  --color-text: #1C1814;
  --color-text-secondary: #7A746C;
  --color-primary: #C2410C;
  --color-primary-hover: #9A3412;
  --color-primary-light: #FFF5EE;
  --color-primary-glow: rgba(194, 65, 12, 0.12);
  --color-accent: #1B6B4A;
  --color-accent-light: #ECFDF5;
  --color-border: #E6DFD5;
  --color-border-light: #F0EBE4;
  --color-danger: #DC2626;
  --color-success: #059669;

  /* Typography */
  --font-display: 'Bricolage Grotesque', Georgia, serif;
  --font-accent: 'Instrument Serif', Georgia, serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Sizing */
  --radius: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(28, 24, 20, 0.04);
  --shadow-sm: 0 2px 8px rgba(28, 24, 20, 0.06);
  --shadow: 0 4px 16px rgba(28, 24, 20, 0.08);
  --shadow-lg: 0 12px 32px rgba(28, 24, 20, 0.12);
  --shadow-primary: 0 4px 14px rgba(194, 65, 12, 0.18);
}

/* Base */
body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.65;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Subtle grain texture overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 10000;
  pointer-events: none;
  opacity: 0.022;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  background-size: 256px 256px;
}

#app {
  min-height: 100vh;
}

/* Screen-reader only utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ========================
   Animations
   ======================== */

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes slideHover {
  from { padding-left: 1.5rem; }
  to { padding-left: 1.85rem; }
}

/* ========================
   Navbar
   ======================== */

.navbar {
  background: rgba(250, 248, 244, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--color-border-light);
  padding: 0 2rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar-brand {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-text);
  text-decoration: none;
  letter-spacing: -0.025em;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  transition: opacity 0.2s;
}

.navbar-brand:hover {
  opacity: 0.8;
}

.navbar-brand::before {
  content: '';
  display: inline-block;
  width: 9px;
  height: 9px;
  background: var(--color-primary);
  border-radius: 2px;
  transform: rotate(45deg);
  flex-shrink: 0;
}

.navbar-links {
  display: flex;
  gap: 0.25rem;
  align-items: center;
}

.navbar-links nav {
  display: flex;
  gap: 0.25rem;
  align-items: center;
}

.navbar-links a {
  color: var(--color-text-secondary);
  text-decoration: none;
  padding: 0.5rem 0.875rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s ease;
  font-family: var(--font-body);
}

.navbar-links a:hover {
  color: var(--color-text);
  background: rgba(28, 24, 20, 0.04);
}

.navbar-links a.active {
  color: var(--color-primary);
  background: var(--color-primary-light);
  font-weight: 600;
}

.navbar-links button {
  margin-left: 0.5rem;
}

/* ========================
   Main Content
   ======================== */

.main-content {
  max-width: 920px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  animation: fadeIn 0.35s ease;
}

/* ========================
   Buttons
   ======================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-body);
  text-decoration: none;
  letter-spacing: 0.01em;
}

.btn-primary {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
  box-shadow: var(--shadow-primary);
}

.btn-primary:hover {
  background: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
  box-shadow: 0 6px 20px rgba(194, 65, 12, 0.28);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--color-surface);
  color: var(--color-text);
  border-color: var(--color-border);
}

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

.btn-danger {
  background: var(--color-danger);
  color: white;
  border-color: var(--color-danger);
}

.btn-danger:hover {
  opacity: 0.9;
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.8125rem;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* ========================
   Cards
   ======================== */

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  animation: fadeInUp 0.5s ease both;
}

.card + .card {
  margin-top: 1rem;
}

/* ========================
   Forms
   ======================== */

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--color-text);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-family: var(--font-body);
}

.form-input {
  width: 100%;
  padding: 0.65rem 0.875rem;
  font-size: 0.9rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  transition: all 0.2s ease;
  background: var(--color-surface);
  color: var(--color-text);
}

.form-input::placeholder {
  color: var(--color-text-secondary);
  opacity: 0.55;
}

.form-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-glow);
}

textarea.form-input {
  min-height: 110px;
  resize: vertical;
  line-height: 1.6;
}

/* ========================
   Skill Badges
   ======================== */

.skill-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.75rem;
  background: var(--color-primary-light);
  color: var(--color-primary);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  border: 1px solid rgba(194, 65, 12, 0.1);
  transition: all 0.2s ease;
  animation: scaleIn 0.3s ease both;
}

.skill-badge:hover {
  background: rgba(194, 65, 12, 0.1);
  border-color: rgba(194, 65, 12, 0.18);
}

.skill-badge .remove-skill {
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1;
  opacity: 0.5;
  background: none;
  border: none;
  color: inherit;
  padding: 0;
  margin-left: 0.125rem;
  transition: opacity 0.15s;
}

.skill-badge .remove-skill:hover {
  opacity: 1;
}

.skill-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Stagger animation for badge lists */
.skill-badges .skill-badge:nth-child(1) { animation-delay: 0s; }
.skill-badges .skill-badge:nth-child(2) { animation-delay: 0.04s; }
.skill-badges .skill-badge:nth-child(3) { animation-delay: 0.08s; }
.skill-badges .skill-badge:nth-child(4) { animation-delay: 0.12s; }
.skill-badges .skill-badge:nth-child(5) { animation-delay: 0.16s; }
.skill-badges .skill-badge:nth-child(6) { animation-delay: 0.2s; }
.skill-badges .skill-badge:nth-child(7) { animation-delay: 0.24s; }
.skill-badges .skill-badge:nth-child(8) { animation-delay: 0.28s; }

/* ========================
   User Card (search results)
   ======================== */

.user-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  border-left: 3px solid var(--color-primary);
}

.user-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.user-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.user-card-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.01em;
}

.user-card-bio {
  color: var(--color-text-secondary);
  font-size: 0.875rem;
  line-height: 1.55;
}

/* ========================
   Skill Picker Dropdown
   ======================== */

.skill-picker {
  position: relative;
}

.skill-picker-input {
  width: 100%;
  padding: 0.65rem 0.875rem;
  font-size: 0.875rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  background: var(--color-surface);
  color: var(--color-text);
  transition: all 0.2s ease;
}

.skill-picker-input::placeholder {
  color: var(--color-text-secondary);
  opacity: 0.55;
}

.skill-picker-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-glow);
}

.skill-picker-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 260px;
  overflow-y: auto;
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 50;
  display: none;
}

.skill-picker-dropdown.open {
  display: block;
  animation: scaleIn 0.15s ease;
}

.skill-picker-dropdown::-webkit-scrollbar {
  width: 6px;
}
.skill-picker-dropdown::-webkit-scrollbar-track {
  background: transparent;
}
.skill-picker-dropdown::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 3px;
}

.skill-picker-category {
  padding: 0.5rem 0.875rem 0.375rem;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--color-bg);
  font-family: var(--font-body);
  border-bottom: 1px solid var(--color-border-light);
  position: sticky;
  top: 0;
}

.skill-picker-item {
  padding: 0.55rem 0.875rem;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.15s ease;
  border-bottom: 1px solid var(--color-border-light);
}

.skill-picker-item:last-child {
  border-bottom: none;
}

.skill-picker-item:hover {
  background: var(--color-primary-light);
  color: var(--color-primary);
  padding-left: 1.15rem;
}

.skill-picker-item.selected {
  opacity: 0.35;
  pointer-events: none;
  text-decoration: line-through;
}

/* ========================
   Search Page
   ======================== */

.search-controls {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.search-controls .skill-picker {
  flex: 1;
}

.search-results {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Stagger search results */
.search-results .card:nth-child(1) { animation-delay: 0s; }
.search-results .card:nth-child(2) { animation-delay: 0.07s; }
.search-results .card:nth-child(3) { animation-delay: 0.14s; }
.search-results .card:nth-child(4) { animation-delay: 0.21s; }
.search-results .card:nth-child(5) { animation-delay: 0.28s; }
.search-results .card:nth-child(6) { animation-delay: 0.35s; }

/* ========================
   Messages / Inbox
   ======================== */

.conversation-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.1rem 1.5rem;
  border-bottom: 1px solid var(--color-border-light);
  cursor: pointer;
  transition: all 0.2s ease;
}

.conversation-item:hover {
  background: var(--color-primary-light);
  padding-left: 1.75rem;
}

.conversation-item:last-child {
  border-bottom: none;
}

.conversation-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: -0.01em;
}

.conversation-preview {
  color: var(--color-text-secondary);
  font-size: 0.8125rem;
  margin-top: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 400px;
}

.conversation-time {
  color: var(--color-text-secondary);
  font-size: 0.75rem;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* ========================
   Chat Thread
   ======================== */

.chat-messages {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  max-height: 500px;
  overflow-y: auto;
  padding: 1rem 0;
}

.chat-messages::-webkit-scrollbar {
  width: 4px;
}
.chat-messages::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 2px;
}

.chat-bubble {
  max-width: 70%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-lg);
  font-size: 0.875rem;
  line-height: 1.55;
  animation: fadeInUp 0.3s ease both;
}

.chat-bubble.sent {
  align-self: flex-end;
  background: var(--color-primary);
  color: white;
  border-bottom-right-radius: 4px;
}

.chat-bubble.received {
  align-self: flex-start;
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-bottom-left-radius: 4px;
}

.chat-bubble-time {
  font-size: 0.6875rem;
  opacity: 0.6;
  margin-top: 0.3rem;
  font-variant-numeric: tabular-nums;
}

.chat-input-area {
  display: flex;
  gap: 0.5rem;
}

.chat-input-area .form-input {
  flex: 1;
}

/* ========================
   Page Headers
   ======================== */

.page-header {
  margin-bottom: 2rem;
  animation: fadeInUp 0.4s ease both;
}

.page-header h1 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.page-header p {
  color: var(--color-text-secondary);
  margin-top: 0.35rem;
  font-size: 1rem;
}

/* ========================
   Hero Section (Home)
   ======================== */

.hero {
  text-align: center;
  padding: 5rem 1rem 3rem;
  animation: fadeInUp 0.6s ease both;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-primary);
  margin-bottom: 1.5rem;
  font-family: var(--font-body);
}

.hero-eyebrow::before,
.hero-eyebrow::after {
  content: '';
  width: 24px;
  height: 1.5px;
  background: var(--color-primary);
  opacity: 0.4;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--color-text);
  margin-bottom: 1.25rem;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero h1 span {
  font-family: var(--font-accent);
  font-style: italic;
  color: var(--color-primary);
  font-weight: 400;
  display: block;
  margin-top: 0.1em;
}

.hero > p {
  font-size: 1.15rem;
  color: var(--color-text-secondary);
  max-width: 460px;
  margin: 0 auto 2.5rem;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  animation: fadeInUp 0.6s ease 0.2s both;
}

.hero-actions .btn {
  padding: 0.75rem 1.75rem;
  font-size: 0.9375rem;
}

/* Features Grid */

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 4.5rem;
  padding-top: 3.5rem;
  border-top: 1px solid var(--color-border);
}

.feature-card {
  text-align: left;
  padding: 1.75rem;
  position: relative;
  overflow: hidden;
}

.feature-card:nth-child(1) { animation-delay: 0.1s; }
.feature-card:nth-child(2) { animation-delay: 0.2s; }
.feature-card:nth-child(3) { animation-delay: 0.3s; }

.feature-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}

.feature-icon {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary-light);
  border-radius: var(--radius);
  border: 1px solid rgba(194, 65, 12, 0.08);
}

.feature-card h2,
.feature-card h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.feature-card p {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

/* ========================
   Auth Forms
   ======================== */

.auth-container {
  max-width: 420px;
  margin: 3rem auto;
  animation: fadeInUp 0.5s ease both;
}

.auth-tabs {
  display: flex;
  margin-bottom: 2rem;
  border-bottom: 2px solid var(--color-border);
  gap: 0;
}

.auth-tab {
  flex: 1;
  padding: 0.85rem;
  text-align: center;
  font-weight: 600;
  color: var(--color-text-secondary);
  cursor: pointer;
  border-bottom: 2.5px solid transparent;
  margin-bottom: -2px;
  background: none;
  border-left: none;
  border-right: none;
  border-top: none;
  font-size: 0.9375rem;
  font-family: var(--font-display);
  letter-spacing: -0.01em;
  transition: all 0.2s ease;
}

.auth-tab:hover {
  color: var(--color-text);
}

.auth-tab.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

/* ========================
   Alerts
   ======================== */

.alert {
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  margin-bottom: 1rem;
  font-weight: 500;
  animation: fadeInUp 0.3s ease;
}

.alert-error {
  background: #FEF2F2;
  color: var(--color-danger);
  border: 1px solid #FECACA;
}

.alert-success {
  background: #F0FDF4;
  color: #166534;
  border: 1px solid #BBF7D0;
}

/* ========================
   Loading Spinner
   ======================== */

.spinner {
  display: inline-block;
  width: 1.5rem;
  height: 1.5rem;
  border: 2.5px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.loading-container {
  display: flex;
  justify-content: center;
  padding: 4rem;
}

/* ========================
   Empty States
   ======================== */

.empty-state {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--color-text-secondary);
  animation: fadeIn 0.4s ease;
}

.empty-state h2,
.empty-state h3 {
  font-family: var(--font-display);
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}

.empty-state a {
  color: var(--color-primary);
  font-weight: 500;
}

/* ========================
   Section Labels
   ======================== */

.section-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
  font-family: var(--font-body);
}

/* ========================
   Profile Page
   ======================== */

.profile-section {
  margin-bottom: 1.75rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--color-border-light);
}

.profile-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.profile-section h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.85rem;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.profile-section h3::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 16px;
  background: var(--color-primary);
  border-radius: 2px;
  flex-shrink: 0;
}

/* ========================
   Terms & Conditions
   ======================== */

.terms-page {
  max-width: 780px;
  margin: 0 auto;
}

.terms-content {
  font-size: 0.9rem;
  line-height: 1.75;
}

.terms-section {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--color-border-light);
}

.terms-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.terms-section h2 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
  color: var(--color-text);
}

.terms-section p {
  margin-bottom: 0.75rem;
  color: var(--color-text);
}

.terms-section p:last-child {
  margin-bottom: 0;
}

.terms-section ul {
  margin: 0.75rem 0;
  padding-left: 1.5rem;
}

.terms-section ul li {
  margin-bottom: 0.4rem;
  color: var(--color-text);
}

/* Terms Checkbox on Signup */

.terms-checkbox {
  margin-bottom: 1.5rem;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  cursor: pointer;
  font-size: 0.85rem;
  text-transform: none;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--color-text-secondary);
  line-height: 1.5;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  accent-color: var(--color-primary);
  cursor: pointer;
  flex-shrink: 0;
}

.terms-link {
  color: var(--color-primary);
  text-decoration: underline;
  font-weight: 500;
  transition: color 0.2s;
}

.terms-link:hover {
  color: var(--color-primary-hover);
}

/* ========================
   Responsive
   ======================== */

@media (max-width: 768px) {
  .features {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .hero h1 {
    font-size: 2.5rem;
  }
}

@media (max-width: 640px) {
  .hero {
    padding: 3rem 0.5rem 2rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .search-controls {
    flex-direction: column;
  }

  .navbar {
    padding: 0 1rem;
  }

  .navbar-links a span.nav-label {
    display: none;
  }

  .chat-bubble {
    max-width: 85%;
  }

  .main-content {
    padding: 1.5rem 1rem;
  }

  .conversation-preview {
    max-width: 200px;
  }

  .feature-card {
    text-align: center;
  }

  .feature-icon {
    margin-left: auto;
    margin-right: auto;
  }
}
