/* ============================================================
   DESIGN TOKENS & RESET
   ============================================================ */
:root {
  --brand-primary: #1a56e8;
  --brand-secondary: #0ec9a5;
  --brand-accent: #ff6b35;
  --bg-base: #f5f4f0;
  --bg-surface: #ffffff;
  --bg-elevated: #ffffff;
  --bg-muted: #eeede8;
  --text-heading: #0d0f1a;
  --text-body: #2e3040;
  --text-muted: #717489;
  --text-inverse: #ffffff;
  --border-color: #e2e1db;
  --border-focus: #1a56e8;
  --shadow-sm: 0 1px 3px rgba(13,15,26,0.06), 0 1px 2px rgba(13,15,26,0.04);
  --shadow-md: 0 4px 16px rgba(13,15,26,0.08), 0 2px 6px rgba(13,15,26,0.05);
  --shadow-lg: 0 12px 40px rgba(13,15,26,0.12), 0 4px 12px rgba(13,15,26,0.06);
  --shadow-glow: 0 0 0 3px rgba(26,86,232,0.15);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;
  --nav-height: 68px;
  --font-heading: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --transition-fast: 150ms cubic-bezier(0.4,0,0.2,1);
  --transition-base: 250ms cubic-bezier(0.4,0,0.2,1);
  --transition-slow: 400ms cubic-bezier(0.4,0,0.2,1);
}

[data-theme="dark"] {
  --bg-base: #0a0c14;
  --bg-surface: #111320;
  --bg-elevated: #181b2c;
  --bg-muted: #1e2135;
  --text-heading: #f0f1f8;
  --text-body: #b8bcce;
  --text-muted: #5c6180;
  --border-color: #252840;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.35);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.45);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg-base);
  color: var(--text-body);
  min-height: 100vh;
  line-height: 1.6;
  font-size: 15px;
  transition: background var(--transition-slow), color var(--transition-slow);
  overflow-x: hidden;
}

/* ============================================================
   LOADING SCREEN
   ============================================================ */
#loading-screen {
  position: fixed; inset: 0;
  background: var(--bg-base);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
#loading-screen.hidden { opacity: 0; visibility: hidden; pointer-events: none; }

.loader-logo {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 800;
  color: var(--brand-primary);
  margin-bottom: 24px;
  letter-spacing: -0.5px;
}

.loader-bar {
  width: 200px; height: 3px;
  background: var(--border-color);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.loader-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--brand-primary), var(--brand-secondary));
  border-radius: var(--radius-full);
  animation: load-progress 1.2s cubic-bezier(0.4,0,0.2,1) forwards;
}
@keyframes load-progress {
  0% { width: 0%; }
  60% { width: 70%; }
  100% { width: 100%; }
}

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */
#toast-container {
  position: fixed; bottom: 24px; right: 24px;
  z-index: 8000;
  display: flex; flex-direction: column; gap: 10px;
  pointer-events: none;
}

.toast {
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  color: var(--text-body);
  padding: 14px 18px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 14px;
  font-weight: 500;
  display: flex; align-items: center; gap: 10px;
  pointer-events: all;
  animation: toast-in 0.35s cubic-bezier(0.34,1.56,0.64,1) forwards;
  max-width: 320px;
  min-width: 240px;
}
.toast.removing { animation: toast-out 0.25s ease forwards; }
.toast-icon { font-size: 17px; flex-shrink: 0; }
.toast.success { border-left: 3px solid var(--brand-secondary); }
.toast.error { border-left: 3px solid #ef4444; }
.toast.info { border-left: 3px solid var(--brand-primary); }

@keyframes toast-in {
  from { opacity: 0; transform: translateX(100%) scale(0.9); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes toast-out {
  to { opacity: 0; transform: translateX(100%) scale(0.9); }
}

/* ============================================================
   NAVIGATION
   ============================================================ */
#navbar {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-height);
  background: rgba(245,244,240,0.88);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  transition: background var(--transition-slow), border-color var(--transition-slow);
}
[data-theme="dark"] #navbar {
  background: rgba(10,12,20,0.88);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  height: 100%;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.nav-logo {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 800;
  color: var(--brand-primary);
  letter-spacing: -0.5px;
  cursor: pointer;
  display: flex; align-items: center; gap: 8px;
  text-decoration: none;
}
.nav-logo-icon {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  color: white;
  font-style: normal;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
}

.nav-link {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 14px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
  white-space: nowrap;
}
.nav-link:hover { color: var(--text-heading); background: var(--bg-muted); }
.nav-link.active {
  color: var(--brand-primary);
  background: rgba(26,86,232,0.08);
  font-weight: 600;
}

.nav-actions {
  display: flex; align-items: center; gap: 10px;
  flex-shrink: 0; /* never let actions shrink and hide the hamburger */
}

.dark-toggle {
  width: 38px; height: 38px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  transition: all var(--transition-fast);
  color: var(--text-muted);
}
.dark-toggle:hover { background: var(--bg-muted); color: var(--text-heading); }

.hamburger {
  display: none; /* hidden on desktop — shown via media query */
  width: 38px; height: 38px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: transparent;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: all var(--transition-fast);
  flex-shrink: 0;
  order: -1; /* always leftmost on mobile */
}
.hamburger span {
  width: 18px; height: 2px;
  background: var(--text-heading);
  border-radius: 2px;
  transition: all var(--transition-base);
}
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

.mobile-nav {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0; right: 0;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  padding: 12px 24px 20px;
  z-index: 999;
  flex-direction: column;
  gap: 4px;
  box-shadow: var(--shadow-md);
}
.mobile-nav.open { display: flex; }
.mobile-nav-link {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 15px;
  color: var(--text-body);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.mobile-nav-link:hover, .mobile-nav-link.active {
  background: rgba(26,86,232,0.08);
  color: var(--brand-primary);
}

/* ============================================================
   PAGE WRAPPER & SECTIONS
   ============================================================ */
.page-wrapper {
  padding-top: var(--nav-height);
  min-height: 100vh;
}

.section {
  display: none;
  animation: section-in 0.4s cubic-bezier(0.4,0,0.2,1) forwards;
}
.section.active { display: block; }

@keyframes section-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  outline: none;
  transition: all var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}
.btn::after {
  content: '';
  position: absolute; inset: 0;
  background: rgba(255,255,255,0);
  transition: background var(--transition-fast);
}
.btn:hover::after { background: rgba(255,255,255,0.1); }
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--brand-primary);
  color: white;
  box-shadow: 0 2px 8px rgba(26,86,232,0.35);
}
.btn-primary:hover { box-shadow: 0 4px 16px rgba(26,86,232,0.45); transform: translateY(-1px); }

.btn-secondary {
  background: var(--bg-muted);
  color: var(--text-heading);
  border: 1px solid var(--border-color);
}
.btn-secondary:hover { background: var(--border-color); }

.btn-ghost {
  background: transparent;
  color: var(--brand-primary);
  border: 1.5px solid var(--brand-primary);
}
.btn-ghost:hover { background: rgba(26,86,232,0.06); }

.btn-success {
  background: var(--brand-secondary);
  color: white;
  box-shadow: 0 2px 8px rgba(14,201,165,0.3);
}
.btn-success:hover { box-shadow: 0 4px 16px rgba(14,201,165,0.4); transform: translateY(-1px); }

.btn-danger { background: #ef4444; color: white; }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-lg { padding: 15px 32px; font-size: 16px; border-radius: var(--radius-md); }
.btn-full { width: 100%; }

.btn-icon-only {
  width: 36px; height: 36px; padding: 0;
  border-radius: var(--radius-sm);
  background: var(--bg-muted);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 15px;
  transition: all var(--transition-fast);
}
.btn-icon-only:hover { background: var(--border-color); color: var(--text-heading); }

/* ============================================================
   FORMS
   ============================================================ */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.form-input, .form-textarea, .form-select {
  width: 100%;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-heading);
  font-family: var(--font-body);
  font-size: 15px;
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--brand-primary);
  box-shadow: var(--shadow-glow);
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-muted); }
.form-textarea { resize: vertical; min-height: 90px; }
.form-select { cursor: pointer; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-error { font-size: 12px; color: #ef4444; font-weight: 500; display: none; }
.form-error.show { display: block; }
.form-input.invalid, .form-textarea.invalid { border-color: #ef4444; }

/* Skill Tag Input */
.tag-input-wrapper {
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  padding: 8px;
  display: flex; flex-wrap: wrap; gap: 6px;
  cursor: text;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  min-height: 50px;
}
.tag-input-wrapper:focus-within {
  border-color: var(--brand-primary);
  box-shadow: var(--shadow-glow);
}
.tag-input-field {
  border: none; outline: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-heading);
  flex: 1; min-width: 120px;
  padding: 2px 4px;
}
.tag-input-field::placeholder { color: var(--text-muted); }

/* ============================================================
   TAG BADGES
   ============================================================ */
.tag {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: all var(--transition-fast);
}
.tag-blue { background: rgba(26,86,232,0.1); color: var(--brand-primary); }
.tag-teal { background: rgba(14,201,165,0.12); color: #089e82; }
.tag-orange { background: rgba(255,107,53,0.12); color: #d95c28; }
.tag-purple { background: rgba(139,92,246,0.12); color: #7c3aed; }
.tag-pink { background: rgba(236,72,153,0.12); color: #be185d; }
.tag-yellow { background: rgba(245,158,11,0.12); color: #b45309; }
.tag-green { background: rgba(34,197,94,0.12); color: #15803d; }
.tag-removable { padding-right: 6px; }
.tag-remove {
  cursor: pointer;
  opacity: 0.6;
  font-size: 14px;
  line-height: 1;
  transition: opacity var(--transition-fast);
}
.tag-remove:hover { opacity: 1; }

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-base), transform var(--transition-base), border-color var(--transition-base);
}
.card:hover { box-shadow: var(--shadow-md); }
.card-hoverable:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(26,86,232,0.2);
}

/* ============================================================
   CONTAINERS & LAYOUT
   ============================================================ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-header {
  text-align: center;
  margin-bottom: 40px;
}

.section-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-primary);
  background: rgba(26,86,232,0.08);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  margin-bottom: 14px;
}

h1, h2, h3, h4, h5 { font-family: var(--font-heading); color: var(--text-heading); }
h1 { font-size: clamp(36px, 6vw, 68px); font-weight: 800; line-height: 1.05; letter-spacing: -1.5px; }
h2 { font-size: clamp(26px, 4vw, 40px); font-weight: 700; line-height: 1.15; letter-spacing: -0.8px; }
h3 { font-size: clamp(18px, 2.5vw, 22px); font-weight: 700; line-height: 1.3; letter-spacing: -0.3px; }

/* ============================================================
   LANDING PAGE / HOME
   ============================================================ */
#section-home { background: var(--bg-base); }

.hero {
  padding: 80px 24px 60px;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}

.hero-bg-blob {
  position: absolute;
  width: 600px; height: 600px;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
}
.hero-blob-1 {
  background: rgba(26,86,232,0.12);
  top: -200px; right: -100px;
  animation: blob-drift 8s ease-in-out infinite alternate;
}
.hero-blob-2 {
  background: rgba(14,201,165,0.1);
  bottom: -200px; left: -100px;
  animation: blob-drift 10s ease-in-out infinite alternate-reverse;
}
@keyframes blob-drift {
  from { transform: translate(0,0) scale(1); }
  to { transform: translate(30px, 20px) scale(1.05); }
}

.hero-content {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1fr 1fr;
  align-items: center; gap: 60px;
}

.hero-text {}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 7px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}
.hero-badge-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--brand-secondary);
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.8); }
}

.hero-title {
  margin-bottom: 20px;
}
.hero-title-accent {
  background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-tagline {
  font-size: 18px;
  color: var(--text-muted);
  margin-bottom: 36px;
  line-height: 1.7;
  max-width: 440px;
}

.hero-cta {
  display: flex; flex-wrap: wrap; gap: 12px;
  margin-bottom: 48px;
}

.hero-stats {
  display: flex; gap: 32px;
}
.hero-stat-value {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 800;
  color: var(--text-heading);
  letter-spacing: -0.5px;
}
.hero-stat-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Hero Visual */
.hero-visual {
  position: relative;
  display: flex; align-items: center; justify-content: center;
}

.hero-card-stack {
  position: relative;
  width: 340px; height: 420px;
}

.floating-card {
  position: absolute;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 18px 20px;
  animation: float-card 6s ease-in-out infinite;
}

.fc-main {
  width: 300px;
  top: 40px; left: 20px;
  z-index: 3;
  animation-delay: 0s;
}

.fc-notification {
  width: 220px;
  bottom: 30px; right: -20px;
  z-index: 4;
  animation-delay: 1s;
  animation-duration: 5s;
}

.fc-skill-bar {
  width: 180px;
  top: 20px; right: -30px;
  z-index: 2;
  animation-delay: 2s;
  animation-duration: 7s;
}

@keyframes float-card {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  25% { transform: translateY(-8px) rotate(0.5deg); }
  75% { transform: translateY(4px) rotate(-0.5deg); }
}

.fc-avatar {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.fc-main-header {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 14px;
}

.fc-name {
  font-family: var(--font-heading);
  font-size: 15px; font-weight: 700;
  color: var(--text-heading);
}
.fc-meta {
  font-size: 12px;
  color: var(--text-muted);
}
.fc-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 12px; }
.fc-match {
  font-size: 12px; font-weight: 600;
  color: var(--brand-secondary);
  background: rgba(14,201,165,0.1);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  display: inline-block;
}

.fc-notif-icon { font-size: 18px; margin-bottom: 6px; }
.fc-notif-text { font-size: 13px; font-weight: 600; color: var(--text-heading); }
.fc-notif-sub { font-size: 11px; color: var(--text-muted); }

.fc-skill-label { font-size: 12px; font-weight: 600; color: var(--text-muted); margin-bottom: 8px; }
.fc-skill-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.fc-skill-name { font-size: 11px; color: var(--text-body); width: 55px; flex-shrink: 0; }
.fc-skill-track {
  flex: 1; height: 5px;
  background: var(--bg-muted);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.fc-skill-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--brand-primary), var(--brand-secondary));
}

/* Features Section */
.features-section {
  padding: 80px 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-card {
  padding: 28px;
  border-radius: var(--radius-xl);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  transition: all var(--transition-base);
  cursor: default;
}
.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(26,86,232,0.2);
}

.feature-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  margin-bottom: 18px;
}
.fi-blue { background: rgba(26,86,232,0.1); }
.fi-teal { background: rgba(14,201,165,0.1); }
.fi-orange { background: rgba(255,107,53,0.1); }

.feature-title {
  font-family: var(--font-heading);
  font-size: 18px; font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 10px;
}
.feature-desc { font-size: 14px; color: var(--text-muted); line-height: 1.7; }

/* How it works */
.hiw-section {
  padding: 80px 24px;
  background: var(--bg-surface);
}
.hiw-inner {
  max-width: 1200px; margin: 0 auto;
}
.hiw-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  position: relative;
  margin-top: 48px;
}
.hiw-steps::before {
  content: '';
  position: absolute;
  top: 28px; left: 12.5%; right: 12.5%;
  height: 1px;
  background: linear-gradient(90deg, var(--brand-primary), var(--brand-secondary));
  z-index: 0;
}
.hiw-step {
  text-align: center;
  position: relative; z-index: 1;
}
.hiw-num {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--bg-base);
  border: 2px solid var(--brand-primary);
  color: var(--brand-primary);
  font-family: var(--font-heading);
  font-size: 20px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
  transition: all var(--transition-base);
}
.hiw-step:hover .hiw-num {
  background: var(--brand-primary);
  color: white;
  transform: scale(1.1);
}
.hiw-step-title {
  font-family: var(--font-heading);
  font-size: 16px; font-weight: 700;
  color: var(--text-heading); margin-bottom: 8px;
}
.hiw-step-desc { font-size: 13px; color: var(--text-muted); line-height: 1.6; }

/* Footer */
.home-footer {
  padding: 40px 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  border-top: 1px solid var(--border-color);
}

/* ============================================================
   PROFILE SECTION
   ============================================================ */
#section-profile {
  padding: 40px 24px 60px;
  max-width: 1200px;
  margin: 0 auto;
}

.profile-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
  align-items: start;
}

/* Profile Card */
.profile-card {
  border-radius: var(--radius-xl);
  /* overflow:visible so the avatar can overlap the banner edge without being clipped */
  overflow: visible;
  position: sticky; top: calc(var(--nav-height) + 20px);
}

.profile-card-banner {
  height: 110px;
  background: linear-gradient(135deg, var(--brand-primary), #2563eb, var(--brand-secondary));
  position: relative;
  /* Restore rounded top corners lost when overflow moved to visible */
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.profile-card-body {
  padding: 0 20px 24px;
  /* Own background + bottom radius so the card visually stays contained */
  background: var(--bg-surface);
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  border: 1px solid var(--border-color);
  border-top: none;
}

.profile-avatar-wrapper {
  /* Pull the avatar up so ~half of it (40px) overlaps the banner */
  margin-top: -40px;
  margin-bottom: 16px;
  padding: 0 2px;
  display: flex;
  align-items: flex-end;
  gap: 12px;
  /* Sit above the banner and body border */
  position: relative;
  z-index: 1;
}

.profile-avatar {
  width: 72px; height: 72px;
  border-radius: 18px;
  /* Thicker white border makes the overlap look intentional */
  border: 4px solid var(--bg-surface);
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-heading);
  font-size: 28px; font-weight: 800;
  color: white;
  flex-shrink: 0;
  box-shadow: var(--shadow-md);
  /* Ensure avatar renders above every sibling */
  position: relative;
  z-index: 2;
}

.profile-status-badge {
  font-size: 11px; font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: rgba(14,201,165,0.12);
  color: #089e82;
  border: 1px solid rgba(14,201,165,0.2);
  margin-bottom: 4px;
}

.profile-card-name {
  font-family: var(--font-heading);
  font-size: 20px; font-weight: 800;
  color: var(--text-heading);
  letter-spacing: -0.3px;
}
.profile-card-meta { font-size: 13px; color: var(--text-muted); margin-bottom: 4px; }
.profile-card-bio { font-size: 14px; color: var(--text-body); line-height: 1.6; margin: 12px 0; }

.profile-divider { height: 1px; background: var(--border-color); margin: 16px 0; }

.profile-card-section-title {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 10px;
}

/* Completion Bar */
.completion-bar-wrapper { margin-bottom: 20px; }
.completion-bar-header {
  display: flex; justify-content: space-between;
  align-items: center; margin-bottom: 8px;
}
.completion-label { font-size: 13px; font-weight: 600; color: var(--text-body); }
.completion-pct {
  font-family: var(--font-heading);
  font-size: 16px; font-weight: 800;
  color: var(--brand-primary);
}
.completion-bar {
  height: 7px;
  background: var(--bg-muted);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.completion-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--brand-primary), var(--brand-secondary));
  border-radius: var(--radius-full);
  transition: width 0.8s cubic-bezier(0.4,0,0.2,1);
}

/* Mini Stats */
.profile-mini-stats {
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  gap: 10px; margin-bottom: 16px;
}
.mini-stat {
  text-align: center;
  padding: 12px 8px;
  background: var(--bg-muted);
  border-radius: var(--radius-sm);
}
.mini-stat-val {
  font-family: var(--font-heading);
  font-size: 20px; font-weight: 800;
  color: var(--text-heading);
}
.mini-stat-key {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

/* Profile Form */
.profile-form-card { padding: 28px; }

.form-section-title {
  font-family: var(--font-heading);
  font-size: 16px; font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-color);
  display: flex; align-items: center; gap: 10px;
}
.fst-icon {
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
}

.form-stack { display: flex; flex-direction: column; gap: 18px; }

/* ── Profile View Mode ── */
.pv-section-title {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--text-muted);
  margin-bottom: 10px;
}
.pv-bio-text {
  font-size: 15px; color: var(--text-body); line-height: 1.7;
}
.pv-project-item {
  padding: 14px 16px;
  background: var(--bg-muted);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  margin-bottom: 8px;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
}
.pv-project-name { font-weight: 600; font-size: 14px; color: var(--text-heading); }
.pv-project-desc { font-size: 12px; color: var(--text-muted); margin-top: 3px; }
.pv-empty { font-size: 13px; color: var(--text-muted); font-style: italic; }

/* Portfolio Projects */
.project-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.project-item {
  padding: 14px 16px;
  background: var(--bg-muted);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px;
  transition: all var(--transition-fast);
}
.project-item:hover { border-color: rgba(26,86,232,0.25); }
.project-item-content {}
.project-item-name { font-weight: 600; font-size: 14px; color: var(--text-heading); }
.project-item-desc { font-size: 12px; color: var(--text-muted); margin-top: 3px; }

.add-project-form {
  display: none;
  flex-direction: column; gap: 10px;
  padding: 14px;
  background: var(--bg-muted);
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border-color);
  margin-bottom: 12px;
}
.add-project-form.show { display: flex; }

/* ============================================================
   FIND TEAMMATES SECTION
   ============================================================ */
#section-teammates {
  padding: 40px 24px 60px;
  max-width: 1200px;
  margin: 0 auto;
}

.teammates-header {
  display: flex; align-items: flex-start;
  justify-content: space-between; gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.filters-bar {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: flex-end;
}

.filter-group { flex: 1; min-width: 160px; }
.filter-label { font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 6px; }

.search-input-wrapper {
  position: relative;
  flex: 2; min-width: 220px;
}
.search-icon {
  position: absolute; left: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted); font-size: 15px; pointer-events: none;
}
.search-input { padding-left: 38px; }

.teammates-results-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px;
  flex-wrap: wrap; gap: 10px;
}

.results-count {
  font-size: 14px; color: var(--text-muted);
}
.results-count strong { color: var(--text-heading); font-family: var(--font-heading); }

.sort-select {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-body);
  font-family: var(--font-body);
  font-size: 13px;
  cursor: pointer;
  outline: none;
}

.teammates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}

.teammate-card {
  padding: 22px;
  border-radius: var(--radius-xl);
  cursor: default;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}
.teammate-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--brand-primary), var(--brand-secondary));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-base);
}
.teammate-card:hover::before { transform: scaleX(1); }
.teammate-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: rgba(26,86,232,0.15); }

.tc-header {
  display: flex; align-items: flex-start; gap: 14px; margin-bottom: 14px;
}
.tc-avatar {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-heading);
  font-size: 20px; font-weight: 800;
  color: white;
  flex-shrink: 0;
}
.tc-info {}
.tc-name {
  font-family: var(--font-heading);
  font-size: 16px; font-weight: 700;
  color: var(--text-heading); letter-spacing: -0.2px;
}
.tc-meta { font-size: 12px; color: var(--text-muted); }
.tc-available-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--brand-secondary);
  margin-right: 5px;
}

.tc-bio { font-size: 13px; color: var(--text-muted); line-height: 1.6; margin-bottom: 12px; }
.tc-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 14px; }

.tc-footer {
  display: flex; gap: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--border-color);
}

.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
}
.no-results-icon { font-size: 48px; margin-bottom: 16px; }
.no-results-title { font-family: var(--font-heading); font-size: 20px; font-weight: 700; color: var(--text-heading); margin-bottom: 8px; }
.no-results-text { color: var(--text-muted); font-size: 14px; }

/* ============================================================
   MESSAGES SECTION
   ============================================================ */
#section-messages {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px 60px;
}

.messages-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  height: calc(100vh - 180px);
  min-height: 500px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
}

.messages-sidebar {
  background: var(--bg-surface);
  border-right: 1px solid var(--border-color);
  display: flex; flex-direction: column;
}

.messages-sidebar-header {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border-color);
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bg-surface);
}
.messages-sidebar-title {
  font-family: var(--font-heading);
  font-size: 16px; font-weight: 700;
  color: var(--text-heading);
  letter-spacing: -0.2px;
}

.messages-search {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-color);
  position: relative;
  background: var(--bg-surface);
}
.messages-search-icon {
  position: absolute; left: 26px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted); font-size: 13px;
}
.messages-search input {
  width: 100%;
  padding: 9px 12px 9px 34px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--border-color);
  background: var(--bg-muted);
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-body);
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.messages-search input:focus {
  border-color: var(--brand-primary);
  background: var(--bg-surface);
  box-shadow: 0 0 0 3px rgba(26,86,232,0.08);
}

.contacts-list { flex: 1; overflow-y: auto; scroll-behavior: smooth; }
.contacts-list::-webkit-scrollbar { width: 3px; }
.contacts-list::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 4px; }

.contact-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  transition: background var(--transition-fast);
  position: relative;
  border-bottom: 1px solid rgba(0,0,0,0.03);
}
.contact-item:hover { background: var(--bg-muted); }
.contact-item.active { background: rgba(26,86,232,0.07); }
.contact-item.active::before {
  content: '';
  position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px;
  background: var(--brand-primary);
  border-radius: 0 3px 3px 0;
}

.contact-avatar {
  width: 46px; height: 46px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-heading);
  font-size: 17px; font-weight: 800;
  color: white; flex-shrink: 0;
  position: relative;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.contact-online-dot {
  position: absolute; bottom: 1px; right: 1px;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: #22c55e;
  border: 2px solid var(--bg-surface);
  box-shadow: 0 0 0 1px rgba(34,197,94,0.3);
}
.contact-info { flex: 1; min-width: 0; }
.contact-name {
  font-weight: 600; font-size: 14px;
  color: var(--text-heading);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 2px;
}
.contact-last-msg {
  font-size: 12px; color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  line-height: 1.4;
}
.contact-meta { text-align: right; flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.contact-time { font-size: 11px; color: var(--text-muted); }
.contact-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 19px; height: 19px; padding: 0 5px;
  background: var(--brand-primary);
  color: white;
  border-radius: var(--radius-full);
  font-size: 10px; font-weight: 700;
  box-shadow: 0 2px 6px rgba(26,86,232,0.35);
}

/* Chat Window */
.chat-window {
  display: flex; flex-direction: column;
  background: var(--bg-base);
}

/* Chat Header */
.chat-header {
  padding: 12px 20px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  display: flex; align-items: center; gap: 14px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.chat-header-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-heading);
  font-size: 16px; font-weight: 800;
  color: white;
  position: relative;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  flex-shrink: 0;
}
.chat-online-dot {
  position: absolute; bottom: 1px; right: 1px;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: #22c55e;
  border: 2px solid var(--bg-surface);
  box-shadow: 0 0 0 1px rgba(34,197,94,0.3);
}
.chat-header-info { flex: 1; min-width: 0; }
.chat-header-name {
  font-family: var(--font-heading);
  font-size: 15px; font-weight: 700;
  color: var(--text-heading);
  letter-spacing: -0.2px;
  line-height: 1.3;
}
.chat-header-status {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 1px;
}

/* View Profile button */
.chat-header-actions { margin-left: auto; flex-shrink: 0; }

/* Typing indicator */
.typing-indicator {
  padding: 4px 20px;
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  align-items: center; gap: 8px;
}
.typing-dots { display: flex; align-items: center; gap: 3px; }
.typing-dots span {
  display: inline-block; width: 5px; height: 5px;
  border-radius: 50%; background: var(--text-muted);
  animation: typing-bounce 1.2s infinite ease-in-out;
}
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-4px); opacity: 1; }
}

/* Message status ticks */
.msg-status { font-size: 11px; margin-left: 4px; vertical-align: middle; opacity: 0.85; }
.msg-status.sent      { color: rgba(255,255,255,0.5); }   /* ✓  single grey  */
.msg-status.delivered { color: rgba(255,255,255,0.65); }  /* ✓✓ double grey  */
.msg-status.seen      { color: #93c5fd; }                 /* ✓✓ blue         */

/* Messages Area */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  display: flex; flex-direction: column; gap: 6px;
  scroll-behavior: smooth;
}
.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 4px; }

.chat-empty {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  flex: 1; gap: 12px;
  color: var(--text-muted);
}
.chat-empty-icon { font-size: 48px; }
.chat-empty-text { font-size: 15px; font-weight: 500; }

/* Message Bubbles */
.msg-bubble {
  display: flex;
  gap: 8px;
  max-width: 68%;
  animation: msg-pop 0.22s cubic-bezier(0.34,1.56,0.64,1) forwards;
  margin-bottom: 2px;
}
@keyframes msg-pop {
  from { opacity: 0; transform: scale(0.93) translateY(8px); }
  to   { opacity: 1; transform: scale(1)    translateY(0); }
}
.msg-bubble.sent     { flex-direction: row-reverse; align-self: flex-end; }
.msg-bubble.received { align-self: flex-start; }

.msg-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-heading);
  font-size: 12px; font-weight: 700;
  color: white;
  align-self: flex-end;
}

.msg-content { display: flex; flex-direction: column; }
.msg-text {
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 14px; line-height: 1.55;
  word-break: break-word; overflow-wrap: break-word;
}
.msg-bubble.sent .msg-text {
  background: var(--brand-primary);
  color: white;
  border-radius: 18px 4px 18px 18px;
  box-shadow: 0 2px 8px rgba(26,86,232,0.28);
}
.msg-bubble.received .msg-text {
  background: var(--bg-surface);
  color: var(--text-body);
  border: 1px solid var(--border-color);
  border-radius: 4px 18px 18px 18px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.msg-time {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 3px;
  padding: 0 2px;
  opacity: 0.8;
}
.msg-bubble.sent .msg-time { text-align: right; }

/* Chat Input Area */
.chat-input-area {
  padding: 14px 20px;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  display: flex; gap: 10px; align-items: flex-end;
}
.chat-input {
  flex: 1;
  padding: 12px 18px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--border-color);
  background: var(--bg-muted);
  font-family: var(--font-body);
  font-size: 14px; color: var(--text-body);
  outline: none;
  resize: none;
  max-height: 120px;
  transition: border-color var(--transition-fast), background var(--transition-fast), box-shadow var(--transition-fast);
  line-height: 1.5;
}
.chat-input:focus {
  border-color: var(--brand-primary);
  background: var(--bg-surface);
  box-shadow: 0 0 0 3px rgba(26,86,232,0.08);
}
.chat-input::placeholder { color: var(--text-muted); }

.chat-send-btn {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--brand-primary);
  color: white; border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  transition: all var(--transition-fast);
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(26,86,232,0.35);
}
.chat-send-btn:hover {
  background: #1647c8;
  transform: scale(1.08);
  box-shadow: 0 4px 14px rgba(26,86,232,0.45);
}
.chat-send-btn:active { transform: scale(0.93); box-shadow: none; }

.no-chat-selected {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 16px;
  color: var(--text-muted);
  background: var(--bg-muted);
}
.no-chat-icon { font-size: 56px; }
.no-chat-title {
  font-family: var(--font-heading);
  font-size: 20px; font-weight: 700;
  color: var(--text-heading);
}
.no-chat-sub { font-size: 14px; text-align: center; }

/* Date Separator */
.date-separator {
  text-align: center; position: relative;
  font-size: 11px; color: var(--text-muted);
  font-weight: 600; letter-spacing: 0.05em;
  text-transform: uppercase;
}
.date-separator::before, .date-separator::after {
  content: '';
  position: absolute; top: 50%;
  width: 35%; height: 1px;
  background: var(--border-color);
}
.date-separator::before { left: 0; }
.date-separator::after { right: 0; }

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  z-index: 5000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; visibility: hidden;
  transition: all var(--transition-base);
}
.modal-overlay.open { opacity: 1; visibility: visible; }

.modal {
  background: var(--bg-surface);
  border-radius: var(--radius-xl);
  padding: 32px;
  max-width: 500px; width: 100%;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  transform: scale(0.92) translateY(16px);
  transition: transform var(--transition-base);
  max-height: 90vh;
  overflow-y: auto;
}
.modal-overlay.open .modal { transform: scale(1) translateY(0); }

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px;
}
.modal-title {
  font-family: var(--font-heading);
  font-size: 20px; font-weight: 800;
  color: var(--text-heading); letter-spacing: -0.3px;
}
.modal-close {
  width: 34px; height: 34px; border-radius: var(--radius-sm);
  background: var(--bg-muted); border: 1px solid var(--border-color);
  cursor: pointer; color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; line-height: 1;
  transition: all var(--transition-fast);
}
.modal-close:hover { background: var(--border-color); color: var(--text-heading); }

/* ============================================================
   RESPONSIVE MEDIA QUERIES
   ============================================================ */
@media (max-width: 900px) {
  .hero-content { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { display: none; }
  .features-grid { grid-template-columns: 1fr 1fr; }
  .hiw-steps { grid-template-columns: 1fr 1fr; gap: 24px; }
  .hiw-steps::before { display: none; }
  .profile-layout { grid-template-columns: 1fr; }
  .profile-card { position: static; }
  .messages-layout { grid-template-columns: 1fr; height: auto; }
  .messages-sidebar { height: 240px; }
  .chat-window { min-height: 450px; }
}

@media (max-width: 700px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }

  /* Mobile nav layout: hamburger | logo (centered) | bell+dark-toggle */
  .nav-inner { padding: 0 12px; }
  .nav-logo-text { display: none; } /* icon only on mobile */
  .nav-logo { gap: 0; }

  /* Hide desktop-only auth elements */
  .nav-auth-btns-desktop { display: none !important; }
  .nav-user-desktop { display: none !important; }
  .nav-logout-desktop { display: none !important; }

  /* nav-actions becomes just bell + dark toggle on mobile */
  .nav-actions { gap: 6px; }

  /* Filters: stack vertically, every filter full width */
  .filters-bar {
    flex-direction: column;
    gap: 12px;
    padding: 16px;
  }
  .filter-group {
    flex: none;
    width: 100%;
    min-width: unset;
  }
  .search-input-wrapper {
    flex: none;
    width: 100%;
    min-width: unset;
  }
  .filters-bar .btn { width: 100%; justify-content: center; }
  .sort-select { width: 100%; }
  .teammates-results-header { flex-direction: column; align-items: flex-start; gap: 8px; }
  .features-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .hero { padding: 40px 20px 40px; }
  .hero-stats { gap: 20px; }
  #section-profile, #section-teammates, #section-messages { padding: 20px 16px 40px; }
  .filters-bar { flex-direction: column; }
  .filter-group { min-width: unset; }
  .profile-mini-stats { grid-template-columns: 1fr 1fr 1fr; }
  h1 { font-size: 38px; }
  .messages-layout { grid-template-columns: 1fr; border-radius: var(--radius-lg); }
}

/* ============================================================
   SCROLLBAR GLOBAL
   ============================================================ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ============================================================
   UTILITY
   ============================================================ */
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }

/* Animated gradient text */
.gradient-text {
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================================
   AUTH — NAVBAR ELEMENTS
   ============================================================ */
#nav-auth-btns {
  display: flex;
  align-items: center;
  gap: 8px;
}

#nav-user-area {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 5px 12px 5px 6px;
  border-radius: var(--radius-full);
  background: var(--bg-muted);
  border: 1px solid var(--border-color);
  cursor: default;
}

.nav-user-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
  color: white;
  font-family: var(--font-heading);
  font-size: 12px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.nav-user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-heading);
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ============================================================
   AUTH — MODALS
   ============================================================ */
.auth-modal-logo {
  text-align: center;
  margin-bottom: 24px;
}
.auth-modal-logo-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  margin: 0 auto 12px;
  box-shadow: 0 4px 16px rgba(26,86,232,0.3);
}
.auth-modal-title {
  font-family: var(--font-heading);
  font-size: 22px; font-weight: 800;
  color: var(--text-heading);
  letter-spacing: -0.4px;
  margin-bottom: 4px;
}
.auth-modal-sub {
  font-size: 14px;
  color: var(--text-muted);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-color);
}

.social-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 18px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-body);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  margin-bottom: 10px;
}
.social-btn:hover {
  background: var(--bg-muted);
  border-color: var(--text-muted);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.social-btn:active { transform: scale(0.98); }

.social-btn-icon {
  width: 20px; height: 20px;
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.auth-switch {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  color: var(--text-muted);
}
.auth-switch a {
  color: var(--brand-primary);
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
.auth-switch a:hover { text-decoration: underline; }

.auth-error {
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.25);
  color: #dc2626;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 14px;
  display: none;
}
.auth-error.show { display: block; }

.password-wrapper {
  position: relative;
}
.password-toggle {
  position: absolute;
  right: 12px; top: 50%;
  transform: translateY(-50%);
  background: none; border: none;
  cursor: pointer;
  font-size: 16px;
  color: var(--text-muted);
  padding: 4px;
  transition: color var(--transition-fast);
}
.password-toggle:hover { color: var(--text-body); }

.auth-form-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-terms {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 14px;
  line-height: 1.6;
}
.auth-terms a { color: var(--brand-primary); cursor: pointer; }

/* ============================================================
   AUTH — LOCKED SECTION
   ============================================================ */
#section-auth-locked {
  display: none;
  min-height: calc(100vh - var(--nav-height));
  height: calc(100vh - var(--nav-height));
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
}
#section-auth-locked.active {
  display: flex;
  animation: section-in 0.4s cubic-bezier(0.4,0,0.2,1) forwards;
}

.auth-locked-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 52px 44px;
  text-align: center;
  max-width: 440px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  /* Gradient top accent border */
  border-top: 3px solid transparent;
  background-clip: padding-box;
  position: relative;
  overflow: hidden;
}
/* Gradient top stripe drawn via ::before so it sits above border-top */
.auth-locked-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand-primary), var(--brand-secondary), var(--brand-accent));
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.auth-locked-icon {
  width: 72px; height: 72px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(26,86,232,0.1), rgba(14,201,165,0.1));
  border: 1px solid var(--border-color);
  display: flex; align-items: center; justify-content: center;
  font-size: 32px;
  margin: 0 auto 14px;
  animation: lock-icon-pulse 2.8s ease-in-out infinite;
}
@keyframes lock-icon-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(26,86,232,0.12); }
  50%       { box-shadow: 0 0 0 10px rgba(26,86,232,0); }
}

/* Protected pill badge shown beneath the icon */
.auth-locked-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 12px;
  border-radius: var(--radius-full);
  background: rgba(26,86,232,0.08);
  border: 1px solid rgba(26,86,232,0.18);
  font-size: 11px;
  font-weight: 700;
  color: var(--brand-primary);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.auth-locked-title {
  font-family: var(--font-heading);
  font-size: 22px; font-weight: 800;
  color: var(--text-heading);
  letter-spacing: -0.3px;
  margin-bottom: 10px;
}

.auth-locked-desc {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 28px;
}

.auth-locked-feature {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-muted);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  text-align: left;
  font-size: 13px;
  color: var(--text-body);
  font-weight: 500;
}
.auth-locked-feature-icon { font-size: 16px; flex-shrink: 0; }

.auth-locked-btns {
  display: flex;
  gap: 10px;
  margin-top: 24px;
}

@media (max-width: 500px) {
  .auth-locked-card { padding: 36px 24px; }
  .auth-locked-btns { flex-direction: column; }
  #nav-auth-btns .btn:first-child { display: none; }
  .nav-user-name { display: none; }
}

/* ============================================================
   PART 1 — CHAT LAYOUT: SCROLLABLE MESSAGES, FIXED INPUT
   ============================================================ */

/* Prevent horizontal scrolling */
html, body { overflow-x: hidden; max-width: 100%; }

/* Chat window area fills its grid cell and clips overflow */
#chat-window-area { display: flex; flex-direction: column; overflow: hidden; min-width: 0; }
.chat-window { flex: 1; overflow: hidden; }

/* Input bar stays pinned at the bottom of the flex column */
.chat-input-area { flex-shrink: 0; position: sticky; bottom: 0; z-index: 2; }

/* PART 2 — MESSAGE BUBBLE WORD WRAP */
.msg-text { word-break: break-word; overflow-wrap: break-word; word-wrap: break-word; }
.msg-bubble { max-width: 72%; }

/* ============================================================
   PART 4 — UNREAD BADGE
   ============================================================ */
.nav-msg-badge {
  display: inline-flex;
  align-items: center; justify-content: center;
  min-width: 17px; height: 17px; padding: 0 4px;
  background: #ef4444; color: white;
  border-radius: var(--radius-full);
  font-size: 10px; font-weight: 700;
  margin-left: 5px; vertical-align: middle; line-height: 1;
  animation: badge-pop 0.3s cubic-bezier(0.34,1.56,0.64,1) forwards;
}
@keyframes badge-pop {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

/* ============================================================
   MOBILE BACK BUTTON (hidden on desktop)
   ============================================================ */
.chat-back-btn {
  display: none;
  align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-muted);
  cursor: pointer; font-size: 20px; color: var(--text-body);
  flex-shrink: 0; line-height: 1;
  transition: background var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
}
.chat-back-btn:hover { background: var(--border-color); }

/* ============================================================
   PART 5 — MOBILE RESPONSIVE (≤ 768px)
   ============================================================ */
@media (max-width: 768px) {
  /* Zero out section padding so chat panel goes edge-to-edge */
  #section-messages { padding: 0 !important; }
  #section-messages > h2 { display: none; }

  /* Full-height messages panel */
  .messages-layout {
    grid-template-columns: 1fr !important;
    height: calc(100dvh - var(--nav-height)) !important;
    min-height: unset !important;
    border-radius: 0 !important;
    border-left: none !important; border-right: none !important; border-bottom: none !important;
    position: relative !important;
    overflow: hidden !important;
  }

  /* Sidebar: absolute, slides left when chat opens */
  .messages-sidebar {
    position: absolute !important; inset: 0 !important;
    width: 100% !important; height: 100% !important;
    z-index: 2;
    transition: transform 0.28s cubic-bezier(0.4,0,0.2,1);
  }
  .messages-sidebar.slide-out {
    transform: translateX(-100%);
    pointer-events: none;
  }

  /* Chat window area: absolute, slides in from right */
  #chat-window-area {
    position: absolute !important; inset: 0 !important;
    width: 100% !important; height: 100% !important;
    z-index: 3;
    transform: translateX(100%);
    transition: transform 0.28s cubic-bezier(0.4,0,0.2,1);
    background: var(--bg-base);
  }
  #chat-window-area.slide-in { transform: translateX(0); }

  /* Back button shown */
  .chat-back-btn { display: flex; }

  /* Larger touch targets */
  .contact-item { padding: 13px 16px; min-height: 66px; }
  .chat-send-btn { width: 48px; height: 48px; font-size: 18px; border-radius: 50%; }

  /* Prevent iOS auto-zoom on input focus */
  .chat-input, .messages-search input { font-size: 16px !important; }

  /* Notification dropdown wider on mobile */
  .notif-panel { width: calc(100vw - 32px); right: -8px; }
}

/* ============================================================
   NOTIFICATION BELL & PANEL
   ============================================================ */
.notif-bell-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.notif-bell-btn {
  width: 38px; height: 38px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px;
  color: var(--text-muted);
  transition: all var(--transition-fast);
  position: relative;
}
.notif-bell-btn:hover { background: var(--bg-muted); color: var(--text-heading); }

.notif-badge {
  position: absolute;
  top: -4px; right: -4px;
  min-width: 17px; height: 17px;
  padding: 0 4px;
  background: #ef4444;
  color: white;
  border-radius: var(--radius-full);
  font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--bg-base);
  display: none;
}
.notif-badge.show { display: flex; }

.notif-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 340px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 2000;
  overflow: hidden;
  display: none;
  animation: section-in 0.2s ease forwards;
}
.notif-panel.open { display: block; }

.notif-panel-header {
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--border-color);
  display: flex; align-items: center; justify-content: space-between;
}
.notif-panel-title {
  font-family: var(--font-heading);
  font-size: 14px; font-weight: 700;
  color: var(--text-heading);
}
.notif-panel-count {
  font-size: 12px; color: var(--text-muted);
}

.notif-list { max-height: 340px; overflow-y: auto; }
.notif-item {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border-color);
  display: flex; flex-direction: column; gap: 8px;
  transition: background var(--transition-fast);
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--bg-muted); }

.notif-item-top {
  display: flex; align-items: center; gap: 10px;
}
.notif-avatar {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-heading);
  font-size: 13px; font-weight: 800;
  color: white; flex-shrink: 0;
}
.notif-text {
  font-size: 13px; color: var(--text-body);
  line-height: 1.5; flex: 1;
}
.notif-text strong { color: var(--text-heading); font-weight: 600; }
.notif-time { font-size: 11px; color: var(--text-muted); }

.notif-actions { display: flex; gap: 8px; }
.notif-empty {
  padding: 32px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}
.notif-empty-icon { font-size: 28px; margin-bottom: 8px; }

/* ============================================================
   CONNECTIONS SECTION (integrated from connections.css)
   ============================================================ */

#section-connections { padding: 0; }

.connections-section-inner {
  min-height: calc(100vh - var(--nav-height));
}

.connections-section-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 24px 80px;
  animation: section-in 0.4s cubic-bezier(0.4,0,0.2,1) forwards;
}

/* Page header */
.connections-page-header {
  display: flex; align-items: flex-start;
  justify-content: space-between; gap: 20px;
  flex-wrap: wrap; margin-bottom: 36px;
}
.connections-title-group {}
.connections-eyebrow {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em;
  color: var(--brand-primary); margin-bottom: 6px;
}
.connections-title {
  font-family: var(--font-heading);
  font-size: 32px; font-weight: 800;
  color: var(--text-heading);
  letter-spacing: -.5px; line-height: 1.1;
}
.connections-subtitle {
  font-size: 15px; color: var(--text-muted);
  margin-top: 8px; line-height: 1.6;
}
.connections-count-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 16px;
  background: rgba(26,86,232,.08);
  border: 1px solid rgba(26,86,232,.18);
  border-radius: var(--radius-full);
  font-size: 13px; font-weight: 700;
  color: var(--brand-primary);
  white-space: nowrap; align-self: flex-start; margin-top: 6px;
}

/* Search bar */
.connections-search-bar {
  position: relative; margin-bottom: 32px;
}
.connections-search-icon {
  position: absolute; left: 16px; top: 50%;
  transform: translateY(-50%);
  font-size: 15px; pointer-events: none;
}
.connections-search-input {
  width: 100%;
  padding: 13px 16px 13px 44px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--border-color);
  background: var(--bg-surface);
  font-family: var(--font-body);
  font-size: 15px; color: var(--text-body);
  outline: none;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.connections-search-input:focus {
  border-color: var(--brand-primary);
  box-shadow: var(--shadow-glow);
}

/* Connections grid */
.conn-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

/* Connection card */
.conn-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-base), transform var(--transition-base);
}
.conn-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.conn-card-banner { height: 72px; flex-shrink: 0; }
.conn-card-body { padding: 0 20px 20px; flex: 1; display: flex; flex-direction: column; }
.conn-avatar-row {
  display: flex; align-items: flex-end; gap: 12px;
  margin-top: -26px; margin-bottom: 14px;
  position: relative; z-index: 2;
}
.conn-avatar {
  width: 60px; height: 60px;
  border-radius: 16px;
  border: 3px solid var(--bg-surface);
  background: var(--brand-primary);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-heading);
  font-size: 22px; font-weight: 800;
  color: white; flex-shrink: 0; overflow: hidden;
  box-shadow: var(--shadow-md);
}
.conn-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 13px; }
.conn-online-dot {
  display: inline-block;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--brand-secondary);
  border: 2px solid var(--bg-surface);
  margin-bottom: 6px;
}
.conn-name {
  font-family: var(--font-heading);
  font-size: 16px; font-weight: 700;
  color: var(--text-heading); letter-spacing: -.2px;
}
.conn-meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.conn-bio {
  font-size: 13px; color: var(--text-muted);
  line-height: 1.6; margin-bottom: 14px;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.conn-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 16px; flex: 1; }
.conn-tag {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: var(--radius-full);
  font-size: 11px; font-weight: 600; letter-spacing: .02em;
}
.conn-tag:nth-child(7n+1) { background:rgba(26,86,232,.1);  color:var(--brand-primary); }
.conn-tag:nth-child(7n+2) { background:rgba(14,201,165,.12); color:#089e82; }
.conn-tag:nth-child(7n+3) { background:rgba(255,107,53,.12); color:#d95c28; }
.conn-tag:nth-child(7n+4) { background:rgba(139,92,246,.12); color:#7c3aed; }
.conn-tag:nth-child(7n+5) { background:rgba(236,72,153,.12); color:#be185d; }
.conn-tag:nth-child(7n+6) { background:rgba(245,158,11,.12); color:#b45309; }
.conn-tag:nth-child(7n)   { background:rgba(34,197,94,.12);  color:#15803d; }
.conn-since { font-size: 11px; color: var(--text-muted); margin-bottom: 14px; }
.conn-since span { color: var(--brand-secondary); font-weight: 600; }
.conn-footer {
  display: flex; gap: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--border-color);
  margin-top: auto;
}

/* Auth / empty state cards */
.conn-state-wrapper {
  min-height: calc(100vh - var(--nav-height));
  display: flex; align-items: center; justify-content: center;
  padding: 40px 24px;
}
.conn-state-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 64px 44px;
  text-align: center;
  max-width: 460px; width: 100%; margin: 0 auto;
  box-shadow: var(--shadow-lg);
  position: relative; overflow: hidden;
}
.conn-state-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--brand-primary), var(--brand-secondary), var(--brand-accent));
}
.conn-state-icon {
  width: 80px; height: 80px; border-radius: 22px;
  background: linear-gradient(135deg,rgba(26,86,232,.1),rgba(14,201,165,.1));
  border: 1px solid var(--border-color);
  display: flex; align-items: center; justify-content: center;
  font-size: 36px; margin: 0 auto 20px;
  animation: lock-icon-pulse 2.8s ease-in-out infinite;
}
.conn-state-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 12px; border-radius: var(--radius-full);
  background: rgba(26,86,232,.08);
  border: 1px solid rgba(26,86,232,.18);
  font-size: 11px; font-weight: 700; color: var(--brand-primary);
  letter-spacing: .06em; text-transform: uppercase; margin-bottom: 18px;
}
.conn-state-title {
  font-family: var(--font-heading);
  font-size: 22px; font-weight: 800;
  color: var(--text-heading); letter-spacing: -.3px; margin-bottom: 10px;
}
.conn-state-desc { font-size: 15px; color: var(--text-muted); line-height: 1.7; margin-bottom: 28px; }
.conn-state-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* Skeleton loader */
.conn-skeleton-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.conn-skeleton-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  overflow: hidden; height: 260px;
}
.conn-skeleton-banner {
  height: 72px;
  background: linear-gradient(90deg, var(--bg-muted) 25%, var(--border-color) 50%, var(--bg-muted) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}
.conn-skeleton-body { padding: 36px 20px 20px; display: flex; flex-direction: column; gap: 10px; }
.conn-skeleton-line {
  height: 12px; border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--bg-muted) 25%, var(--border-color) 50%, var(--bg-muted) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}
.conn-skeleton-line.short { width: 55%; }
.conn-skeleton-line.med   { width: 75%; }
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Responsive */
@media (max-width: 768px) {
  .connections-section-content { padding: 28px 16px 60px; }
  .connections-title { font-size: 24px; }
  .conn-grid { grid-template-columns: 1fr; }
  .conn-state-card { padding: 44px 24px; }
  .conn-state-btns { flex-direction: column; }
}
@media (max-width: 500px) {
  .conn-footer { flex-direction: column; }
}

/* ============================================================
   GENERAL MOBILE RESPONSIVENESS (≤ 480px small phones)
   ============================================================ */
@media (max-width: 480px) {
  /* Nav */
  .nav-user-name { display: none; }
  #nav-auth-btns .btn:first-child { display: none; }

  /* Hero */
  .hero { padding: 28px 16px 32px; }
  h1 { font-size: 32px; letter-spacing: -1px; }
  .hero-stats { gap: 16px; }
  .hero-stat-value { font-size: 22px; }
  .hero-cta { flex-direction: column; }
  .hero-cta .btn { width: 100%; }

  /* Features */
  .features-grid { grid-template-columns: 1fr; }
  .features-section { padding: 48px 16px; }

  /* How it works */
  .hiw-steps { grid-template-columns: 1fr 1fr; gap: 16px; }
  .hiw-section { padding: 48px 16px; }

  /* Profile */
  #section-profile { padding: 16px 12px 40px; }
  .profile-layout { grid-template-columns: 1fr; gap: 16px; }
  .profile-card { position: static; }
  .profile-form-card { padding: 20px 16px; }
  .form-row { grid-template-columns: 1fr; gap: 12px; }
  .profile-mini-stats { grid-template-columns: 1fr 1fr 1fr; }
  .auth-locked-card { padding: 32px 20px; }
  .auth-locked-btns { flex-direction: column; }

  /* Teammates */
  #section-teammates { padding: 16px 12px 40px; }
  .teammates-header { flex-direction: column; gap: 12px; }
  .teammates-grid { grid-template-columns: 1fr; }

  /* Modals */
  .modal { padding: 24px 16px; margin: 0 8px; }
  .modal-title { font-size: 17px; }

  /* Messages (already handled at 768px — these are extra small phone fixes) */
  .messages-sidebar-header { padding: 12px 14px; }
  .chat-input-area { padding: 10px 12px; }

  /* Connections section */
  .conn-grid { grid-template-columns: 1fr; }
  .connections-section-content { padding: 20px 12px 60px; }
  .connections-title { font-size: 22px; }
  .conn-state-card { padding: 36px 20px; }

  /* Toast */
  #toast-container { bottom: 16px; right: 12px; left: 12px; }
  .toast { min-width: unset; width: 100%; }
}

/* ── Ensure chat section fills properly on all mobile sizes ── */
@media (max-width: 768px) {
  /* Fix dvh fallback for older iOS */
  .messages-layout {
    height: calc(100vh - var(--nav-height)) !important;
    height: calc(100dvh - var(--nav-height)) !important;
  }

  /* Profile in mobile — stack layout */
  .profile-layout { grid-template-columns: 1fr !important; }
  .profile-card { position: static !important; }

  /* Fix teammate card footer on narrow screens */
  .tc-footer { flex-wrap: wrap; }

  /* Notifications panel */
  .notif-panel { width: calc(100vw - 24px); right: -4px; }
}

/* Hide logo text on all mobile/tablet — icon only */
@media (max-width: 900px) {
  .nav-logo-text { display: none; }
}
