/* ============================== NAVBAR ============================== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 15px 0;
  background: rgba(5, 5, 5, 0.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  transition: border-color 0.3s;
}

.navbar.scrolled {
  border-color: rgba(255, 204, 0, 0.15);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navbar-brand {
  font-family: 'Poppins', sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  background: linear-gradient(135deg, #ffcc00, #ff9500);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-links a {
  color: var(--text-secondary);
  padding: 7px 13px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.3s, background 0.3s;
  position: relative;
}

.nav-links a:hover {
  color: var(--accent);
  background: var(--accent-dim);
}

.nav-links a.active {
  color: var(--accent);
  background: var(--accent-dim);
}

/* ============================== BUTTONS ============================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 24px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid var(--accent);
  background: transparent;
  color: var(--accent);
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
  transition: left 0.5s ease;
}

.btn:hover::after {
  left: 100%;
}

.btn:hover {
  background: var(--accent);
  color: #000;
  box-shadow: 0 0 24px rgba(255, 204, 0, 0.28);
  transform: translateY(-2px);
}

.btn-filled {
  background: var(--accent);
  color: #000;
}

.btn-filled:hover {
  box-shadow: 0 0 30px rgba(255, 204, 0, 0.4);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 7px 16px;
  font-size: 0.82rem;
}

.btn-full {
  width: 100%;
  justify-content: center;
}

/* ============================== CARDS (GLASSMORPHISM) ============================== */
.card {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  background: rgba(20, 20, 20, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 28px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.card:hover {
  transform: translateY(-6px);
  border-color: var(--border-accent);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--accent-dim);
}

.card.expanded {
  transform: scale(1.02);
  border-color: var(--border-accent);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.card.dimmed {
  opacity: 0.3;
  transform: scale(0.97);
  pointer-events: none;
}

.card .extra {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.5s ease, opacity 0.3s ease;
}

.card.expanded .extra {
  max-height: 300px;
  opacity: 1;
  margin-top: 16px;
}

.card h3 {
  color: var(--text-primary);
  margin-bottom: 8px;
  font-size: 1.05rem;
}

/* ============================== SKILL CARDS (BROWSE) ============================== */
.skill-card {
  background: rgba(18, 18, 18, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
  animation: fade-slide-up 0.5s ease both;
}

.skill-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-accent);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
}

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

.skill-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  font-family: 'Poppins', sans-serif;
}

.skill-by {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.skill-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
  flex: 1;
}

.skill-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.meta-tag {
  font-size: 0.75rem;
  padding: 3px 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 99px;
  color: var(--text-secondary);
}

/* ============================== CATEGORY BADGES ============================== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.badge-technical {
  background: var(--badge-tech);
  color: var(--badge-tech-text);
}

.badge-creative {
  background: var(--badge-creative);
  color: var(--badge-creative-text);
}

.badge-academic {
  background: var(--badge-academic);
  color: var(--badge-academic-text);
}

/* ============================== SEARCH BAR ============================== */
.search-wrapper {
  position: relative;
  max-width: 540px;
  margin: 0 auto 32px;
}

.search-wrapper svg {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  pointer-events: none;
}

#search-input {
  width: 100%;
  padding: 14px 18px 14px 46px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}

#search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

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

/* ============================== MAIN TABS (Offered / Requested) ============================== */
.main-tabs {
  display: flex;
  gap: 6px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 5px;
  width: fit-content;
  margin: 0 auto 28px;
}

.main-tab {
  padding: 9px 24px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  transition: all 0.25s ease;
  font-family: 'Inter', sans-serif;
}

.main-tab.active {
  background: var(--accent);
  color: #000;
  box-shadow: 0 4px 16px rgba(255, 204, 0, 0.25);
}

/* ============================== CATEGORY FILTER TABS ============================== */
.filter-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 36px;
}

.filter-tab {
  padding: 7px 18px;
  border-radius: 99px;
  font-size: 0.83rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  transition: all 0.25s ease;
  font-family: 'Inter', sans-serif;
}

.filter-tab:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.filter-tab.active {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
}

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

/* ============================== EMPTY STATE ============================== */
.empty-state {
  grid-column: 1/-1;
  text-align: center;
  padding: 80px 20px;
}

.empty-state .empty-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.empty-state h3 {
  color: var(--text-primary);
  margin-bottom: 8px;
}

.empty-state p {
  color: var(--text-secondary);
}

/* ============================== LOADING SPINNER ============================== */
.spinner-wrapper {
  display: flex;
  justify-content: center;
  padding: 60px 0;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ============================== FORMS ============================== */
.form-wrapper {
  max-width: 680px;
  margin: 0 auto;
  background: rgba(15, 15, 15, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 44px 48px;
}

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

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  color: #aaa;
  letter-spacing: 0.2px;
}

.form-input {
  width: 100%;
  padding: 13px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
  -webkit-appearance: none;
}

.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

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

select.form-input {
  cursor: pointer;
}

select.form-input option {
  background: #1a1a1a;
}

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

/* Checkbox & radio groups */
.check-group,
.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.check-item,
.radio-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: border-color 0.25s, background 0.25s, color 0.25s;
  user-select: none;
  -webkit-user-select: none;
}

.check-item:hover,
.radio-item:hover {
  border-color: var(--border-accent);
  color: var(--text-primary);
}

/* CSS :has() — works in Chrome 105+, Firefox 121+, Safari 15.4+ */
.check-item:has(input:checked),
.radio-item:has(input:checked) {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

/* JS-driven fallback class for full browser coverage */
.check-item.selected,
.radio-item.selected {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

/* Hide visually but keep interactive — NOT display:none */
.check-item input,
.radio-item input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

/* Inline error */
.field-error {
  font-size: 0.78rem;
  color: var(--error);
  margin-top: 5px;
  display: none;
}

.field-error.show {
  display: block;
}

/* Success banner */
.success-banner {
  display: none;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  margin-top: 24px;
  animation: fade-slide-up 0.5s ease both;
}

.success-banner.show {
  display: block;
}

.success-banner .success-icon {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.success-banner h3 {
  color: #4ade80;
  margin-bottom: 6px;
}

.success-banner p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* ============================== FAQ ============================== */
.faq {
  max-width: 780px;
  margin: auto;
}

.faq-item {
  margin-bottom: 12px;
}

.faq-question {
  width: 100%;
  padding: 16px 20px;
  background: rgba(20, 20, 20, 0.7);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
  font-size: 0.95rem;
  font-family: 'Inter', sans-serif;
  transition: border-color 0.3s, background 0.3s;
}

.faq-question:hover {
  border-color: var(--border-accent);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  background: rgba(15, 15, 15, 0.7);
  transition: max-height 0.35s ease;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  border: 1px solid var(--border);
  border-top: none;
}

.faq-answer p {
  padding: 16px 20px;
  color: #b0b0b0;
}

/* ============================== TESTIMONIALS ============================== */
.testimonials-container {
  max-width: 860px;
  margin: 40px auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.testimonial-card {
  background: rgba(18, 18, 18, 0.8);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  transition: transform 0.25s, border-color 0.25s;
}

.testimonial-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-accent);
}

.testimonial-text {
  font-style: italic;
  color: #c8c8c8;
  line-height: 1.7;
  margin-bottom: 14px;
  font-size: 0.95rem;
}

.testimonial-user h3 {
  margin: 0;
  font-size: 1rem;
  color: var(--text-primary);
}

.testimonial-user span {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ============================== NAV RIGHT + THEME TOGGLE ============================== */
.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ── Nav avatar (replaces plain username text + logout button) ── */
.nav-avatar-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.nav-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #ff9500);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 800;
  color: #000;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 0 0 2px var(--accent-dim);
  transition: box-shadow 0.2s, transform 0.2s;
  flex-shrink: 0;
  user-select: none;
  -webkit-user-select: none;
}

.nav-avatar:hover,
.nav-avatar-wrap.open .nav-avatar {
  box-shadow: 0 0 0 3px var(--accent);
  transform: scale(1.08);
}

.nav-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

/* ── Dropdown panel ── */
.nav-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  min-width: 210px;
  background: rgba(18, 18, 18, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.97);
  transform-origin: top right;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 3000;
  overflow: hidden;
}

/* Arrow pointer */
.nav-dropdown::before {
  content: '';
  position: absolute;
  top: -6px;
  right: 12px;
  width: 12px;
  height: 12px;
  background: rgba(18, 18, 18, 0.96);
  border-left: 1px solid var(--border);
  border-top: 1px solid var(--border);
  transform: rotate(45deg);
}

/* Show on CSS hover */
.nav-avatar-wrap:hover .nav-dropdown,
/* Show on JS .open toggle */
.nav-avatar-wrap.open .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

/* ── Dropdown header (name + email) ── */
.nav-dropdown-header {
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--border);
}

#nav-username {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
  font-family: 'Poppins', sans-serif;
}

.nav-dropdown-email {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 3px;
  word-break: break-all;
}

/* ── Dropdown items ── */
.nav-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-decoration: none;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font-family: 'Inter', 'Poppins', sans-serif;
  transition: background 0.15s, color 0.15s;
}

.nav-dropdown-item:hover {
  background: var(--accent-dim);
  color: var(--text-primary);
}

.nav-dropdown-logout {
  color: #f87171;
  border-top: 1px solid var(--border);
}

.nav-dropdown-logout:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

/* ── Light mode overrides ── */
html[data-theme="light"] .nav-dropdown {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.14);
}

html[data-theme="light"] .nav-dropdown::before {
  background: rgba(255, 255, 255, 0.98);
}

.theme-toggle {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  cursor: pointer;
  font-size: 1rem;
  color: var(--text-secondary);
  transition: all 0.3s;
  flex-shrink: 0;
  line-height: 1;
}

.theme-toggle:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
}

/* ============================== LIGHT THEME COMPONENT OVERRIDES ============================== */
html[data-theme="light"] .navbar {
  background: rgba(240, 242, 245, 0.92);
}

html[data-theme="light"] .navbar.scrolled {
  border-color: rgba(0, 0, 0, 0.12);
}

html[data-theme="light"] .card,
html[data-theme="light"] .skill-card {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

html[data-theme="light"] .card:hover,
html[data-theme="light"] .skill-card:hover {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
  border-color: rgba(212, 168, 0, 0.4);
}

html[data-theme="light"] .form-wrapper {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.07);
}

html[data-theme="light"] .form-input {
  background: rgba(0, 0, 0, 0.04);
  color: #111827;
  border-color: rgba(0, 0, 0, 0.1);
}

html[data-theme="light"] .form-input::placeholder {
  color: #9ca3af;
}

html[data-theme="light"] select.form-input option {
  background: #fff;
  color: #111;
}

html[data-theme="light"] .check-item,
html[data-theme="light"] .radio-item {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.1);
  color: #4b5563;
}

html[data-theme="light"] .faq-question {
  background: rgba(255, 255, 255, 0.92);
  color: #111827;
  border-color: rgba(0, 0, 0, 0.08);
}

html[data-theme="light"] .faq-answer {
  background: rgba(248, 250, 252, 0.95);
  border-color: rgba(0, 0, 0, 0.06);
}

html[data-theme="light"] .faq-answer p {
  color: #4b5563;
}

html[data-theme="light"] .testimonial-card {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(0, 0, 0, 0.07);
}

html[data-theme="light"] .testimonial-text {
  color: #374151;
}

html[data-theme="light"] .testimonial-user span {
  color: #6b7280;
}

html[data-theme="light"] #search-input {
  background: rgba(255, 255, 255, 0.9);
  color: #111827;
  border-color: rgba(0, 0, 0, 0.1);
}

html[data-theme="light"] #search-input::placeholder {
  color: #9ca3af;
}

html[data-theme="light"] .main-tabs {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(0, 0, 0, 0.08);
}

html[data-theme="light"] .main-tab {
  color: #4b5563;
}

html[data-theme="light"] .filter-tab {
  color: #4b5563;
  border-color: rgba(0, 0, 0, 0.1);
}

html[data-theme="light"] .meta-tag {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.08);
  color: #4b5563;
}

html[data-theme="light"] .theme-toggle {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.1);
}

/* ============================================================
   DASHBOARD — User Profile
   ============================================================ */

.dashboard-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 28px;
  align-items: start;
}

@media (max-width: 860px) {
  .dashboard-grid { grid-template-columns: 1fr; }
}

/* Profile Card */
.profile-card {
  background: rgba(18, 18, 18, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  position: sticky;
  top: 90px;
  animation: fade-slide-up 0.5s ease both;
}

/* Avatar wrapper — handles positioning the camera overlay */
.profile-avatar-wrap {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
}

.profile-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #ff9500);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 800;
  color: #000;
  font-family: 'Poppins', sans-serif;
  flex-shrink: 0;
  box-shadow: 0 0 0 4px var(--accent-dim);
  overflow: hidden;
  cursor: pointer;
  position: relative;
  transition: box-shadow 0.25s;
}

.profile-avatar:hover {
  box-shadow: 0 0 0 4px var(--accent);
}

/* Photo inside avatar */
#avatar-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* Camera edit button — visible on hover of the wrap */
.avatar-edit-btn {
  position: absolute;
  bottom: -8px;
  right: -8px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent);
  color: #000;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 2px solid var(--bg-deep);
  transition: transform 0.2s, background 0.2s;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.avatar-edit-btn:hover {
  transform: scale(1.15);
  background: #ffdd44;
}

/* Username row */
.profile-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
}

/* Pencil / icon button */
.icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.85rem;
  padding: 4px;
  border-radius: 6px;
  opacity: 0.5;
  transition: opacity 0.2s, background 0.2s;
  line-height: 1;
  display: inline-flex;
  align-items: center;
}

.icon-btn:hover {
  opacity: 1;
  background: var(--accent-dim);
}

/* Inline username edit form */
.username-edit-wrap {
  width: 100%;
  animation: fade-slide-up 0.2s ease both;
}

.username-edit-wrap .form-input {
  font-size: 0.9rem;
  padding: 8px 12px;
  text-align: center;
  width: 100%;
}

.username-edit-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  justify-content: center;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.8rem;
}

.profile-name {
  font-size: 1.2rem;
  color: var(--text-primary);
  margin: 0;
  word-break: break-all;
}

.profile-email {
  font-size: 0.78rem;
  color: var(--text-secondary);
  word-break: break-all;
}

.profile-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}

.profile-stats {
  display: flex;
  gap: 0;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-top: 8px;
}

.stat-box {
  flex: 1;
  padding: 14px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  border-right: 1px solid var(--border);
}

.stat-box:last-child { border-right: none; }

.stat-num {
  font-size: 1.6rem;
  font-weight: 800;
  font-family: 'Poppins', sans-serif;
  color: var(--accent);
  line-height: 1;
}

.stat-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.3;
}

/* Activity Panel */
.activity-panel {
  display: flex;
  flex-direction: column;
  animation: fade-slide-up 0.55s 0.1s ease both;
}

.dashboard-section-title {
  font-family: 'Poppins', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}

/* Quick actions */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

@media (max-width: 600px) {
  .quick-actions { grid-template-columns: repeat(2, 1fr); }
}

.quick-action-card {
  background: rgba(18, 18, 18, 0.75);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
  cursor: pointer;
  text-align: center;
}

.quick-action-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-accent);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.qa-icon { font-size: 1.8rem; }
.qa-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
}

/* Activity list */
.activity-list {
  background: rgba(14, 14, 14, 0.7);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  min-height: 60px;
}

.activity-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 24px;
  color: var(--text-muted);
  font-size: 0.875rem;
  text-align: center;
}

.activity-empty a { color: var(--accent); }

.activity-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.activity-row:last-child { border-bottom: none; }

.activity-row-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* Activity Feed */
.activity-feed {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.activity-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 5px;
}

.dot-green  { background: #22c55e; box-shadow: 0 0 8px rgba(34, 197, 94, 0.5); }
.dot-yellow { background: var(--accent); box-shadow: 0 0 8px var(--accent-glow); }
.dot-blue   { background: #60a5fa; box-shadow: 0 0 8px rgba(96, 165, 250, 0.4); }

.activity-text {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0;
}

.activity-time {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
  display: block;
}

/* ============================================================
   MESSAGES — Chat UI
   ============================================================ */

.messages-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 600px;
  background: rgba(10, 10, 10, 0.8);
}

@media (max-width: 760px) {
  .messages-layout { grid-template-columns: 1fr; }
}

/* Conversations sidebar */
.conversations-panel {
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  background: rgba(14, 14, 14, 0.9);
}

.conversations-header {
  padding: 18px 16px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
}

.conversations-header h3 {
  font-size: 0.95rem;
  color: var(--text-primary);
  margin: 0;
}

.conv-search-wrap {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

.conv-search-wrap .form-input {
  padding: 9px 12px;
  font-size: 0.82rem;
}

.conv-list {
  list-style: none;
  overflow-y: auto;
  flex: 1;
}

.conv-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
}

.conv-item:hover,
.conv-item.active {
  background: var(--accent-dim);
}

.conv-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #ff9500);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: #000;
  flex-shrink: 0;
}

.conv-info {
  flex: 1;
  overflow: hidden;
}

.conv-name {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.conv-last {
  display: block;
  font-size: 0.76rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.conv-meta { flex-shrink: 0; }

.conv-time {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.conv-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.875rem;
  padding: 32px;
  text-align: center;
}

/* Chat panel */
.chat-panel {
  display: flex;
  flex-direction: column;
}

.chat-placeholder {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text-muted);
  text-align: center;
  padding: 48px;
}

.chat-placeholder-icon { font-size: 3rem; margin-bottom: 8px; }

.chat-placeholder h3 { color: var(--text-primary); margin: 0; }
.chat-placeholder p { font-size: 0.875rem; max-width: 280px; }

.chat-active {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.chat-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(14, 14, 14, 0.9);
}

.chat-peer-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #ff9500);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: #000;
  flex-shrink: 0;
}

.chat-header h4 { margin: 0; font-size: 0.95rem; color: var(--text-primary); }

.peer-status { font-size: 0.72rem; }
.peer-status.online { color: #22c55e; }

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 300px;
  max-height: 420px;
}

.chat-day-divider {
  text-align: center;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin: 12px 0 8px;
  position: relative;
}

.chat-info-msg {
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.chat-bubble-wrap {
  display: flex;
  margin-bottom: 4px;
}

.chat-bubble-wrap.me  { justify-content: flex-end; }
.chat-bubble-wrap.them { justify-content: flex-start; }

.chat-bubble {
  max-width: 68%;
  padding: 10px 14px;
  border-radius: 16px;
  position: relative;
}

.bubble-me {
  background: linear-gradient(135deg, var(--accent), #ff9500);
  color: #000;
  border-bottom-right-radius: 4px;
}

.bubble-them {
  background: rgba(30, 30, 30, 0.95);
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-bottom-left-radius: 4px;
}

.chat-bubble p { margin: 0; font-size: 0.875rem; line-height: 1.5; color: inherit; }

.bubble-time {
  font-size: 0.65rem;
  color: rgba(0, 0, 0, 0.5);
  display: block;
  text-align: right;
  margin-top: 4px;
}

.bubble-them .bubble-time { color: var(--text-muted); }

.chat-compose {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  align-items: flex-end;
  background: rgba(10, 10, 10, 0.9);
}

.chat-compose .form-input {
  flex: 1;
  resize: none;
  min-height: 44px;
  max-height: 120px;
  padding: 11px 14px;
  font-size: 0.875rem;
}

/* ============================================================
   MODALS
   ============================================================ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}

.modal-box {
  background: #111;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 32px;
  max-width: 480px;
  width: 100%;
  position: relative;
  animation: fade-slide-up 0.3s ease both;
}

.modal-box h3 {
  font-size: 1.2rem;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1.1rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s;
}

.modal-close:hover { color: var(--text-primary); }

/* ============================================================
   CONTACT — Support Page
   ============================================================ */

.support-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 0;
}

@media (max-width: 680px) {
  .support-cards { grid-template-columns: 1fr; }
}

.support-card {
  background: rgba(18, 18, 18, 0.8);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.support-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-accent);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
}

.support-card-icon { font-size: 2rem; }

.support-card h3 {
  font-size: 1rem;
  color: var(--text-primary);
  margin: 0;
}

.support-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

.contact-info-row {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 48px;
  justify-content: center;
}

.contact-info-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(18, 18, 18, 0.7);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px 22px;
  min-width: 220px;
  flex: 1;
}

.contact-info-item span { font-size: 1.6rem; flex-shrink: 0; }
.contact-info-item strong { display: block; font-size: 0.875rem; color: var(--text-primary); margin-bottom: 2px; }
.contact-info-item p { font-size: 0.8rem; color: var(--text-secondary); margin: 0; }

/* ============================================================
   LIGHT THEME OVERRIDES — Dashboard / Messages / Contact
   ============================================================ */

html[data-theme="light"] .profile-card,
html[data-theme="light"] .quick-action-card,
html[data-theme="light"] .activity-list,
html[data-theme="light"] .support-card,
html[data-theme="light"] .contact-info-item {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

html[data-theme="light"] .quick-action-card:hover,
html[data-theme="light"] .support-card:hover {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
  border-color: rgba(212, 168, 0, 0.4);
}

html[data-theme="light"] .stat-box {
  border-right-color: rgba(0, 0, 0, 0.08);
}

html[data-theme="light"] .profile-stats {
  border-color: rgba(0, 0, 0, 0.08);
}

html[data-theme="light"] .activity-row {
  border-bottom-color: rgba(0, 0, 0, 0.06);
}

html[data-theme="light"] .messages-layout {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(0, 0, 0, 0.09);
}

html[data-theme="light"] .conversations-panel {
  background: rgba(248, 250, 252, 0.98);
  border-right-color: rgba(0, 0, 0, 0.08);
}

html[data-theme="light"] .conv-item:hover,
html[data-theme="light"] .conv-item.active {
  background: rgba(212, 168, 0, 0.08);
}

html[data-theme="light"] .chat-header,
html[data-theme="light"] .chat-compose {
  background: rgba(248, 250, 252, 0.98);
  border-color: rgba(0, 0, 0, 0.08);
}

html[data-theme="light"] .bubble-them {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.08);
  color: #111827;
}

html[data-theme="light"] .bubble-them .bubble-time {
  color: #9ca3af;
}

html[data-theme="light"] .modal-box {
  background: #fff;
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

html[data-theme="light"] .conversations-header {
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

html[data-theme="light"] .conv-search-wrap {
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

html[data-theme="light"] .conv-item {
  border-bottom-color: rgba(0, 0, 0, 0.06);
}

html[data-theme="light"] .conv-name { color: #111827; }
html[data-theme="light"] .conv-last { color: #9ca3af; }
html[data-theme="light"] .conv-time { color: #9ca3af; }
html[data-theme="light"] .chat-header h4 { color: #111827; }

/* ============================================================
   LIGHT THEME — Check / Radio items (selected + hover states)
   --accent in light mode is #d4a800 (yellow) which is nearly
   invisible on a white bg. Use a high-contrast dark-gold text
   with a clearly tinted background instead.
   ============================================================ */

html[data-theme="light"] .check-item,
html[data-theme="light"] .radio-item {
  background: #fff;
  border-color: rgba(0, 0, 0, 0.12);
  color: #374151;
}

html[data-theme="light"] .check-item:hover,
html[data-theme="light"] .radio-item:hover {
  border-color: #d4a800;
  background: rgba(212, 168, 0, 0.06);
  color: #111827;
}

/* CSS :has() selected state — light mode */
html[data-theme="light"] .check-item:has(input:checked),
html[data-theme="light"] .radio-item:has(input:checked) {
  background: rgba(212, 168, 0, 0.12);
  border-color: #d4a800;
  color: #92620a;          /* dark amber — readable on white */
}

/* JS .selected class — light mode */
html[data-theme="light"] .check-item.selected,
html[data-theme="light"] .radio-item.selected {
  background: rgba(212, 168, 0, 0.12);
  border-color: #d4a800;
  color: #92620a;
}

/* ============================================================
   LIGHT THEME — Success banner
   ============================================================ */
html[data-theme="light"] .success-banner {
  background: rgba(21, 128, 61, 0.08);
  border-color: rgba(21, 128, 61, 0.25);
}

html[data-theme="light"] .success-banner h3 { color: #15803d; }
html[data-theme="light"] .success-banner p  { color: #374151; }

/* ============================================================
   LIGHT THEME — Empty state & spinner
   ============================================================ */
html[data-theme="light"] .empty-state h3 { color: #111827; }
html[data-theme="light"] .empty-state p  { color: #6b7280; }

html[data-theme="light"] .spinner {
  border-color: rgba(0, 0, 0, 0.1);
  border-top-color: #d4a800;
}

/* ============================================================
   LIGHT THEME — Filter tab active state (clearer accent)
   ============================================================ */
html[data-theme="light"] .filter-tab.active {
  background: rgba(212, 168, 0, 0.12);
  border-color: #d4a800;
  color: #92620a;
}

html[data-theme="light"] .filter-tab:hover {
  border-color: #d4a800;
  color: #92620a;
}

/* ============================================================
   LIGHT THEME — Dashboard activity feed
   ============================================================ */
html[data-theme="light"] .activity-text { color: #374151; }
html[data-theme="light"] .activity-time { color: #9ca3af; }
html[data-theme="light"] .activity-row-title { color: #111827; }
html[data-theme="light"] .activity-empty { color: #9ca3af; }
html[data-theme="light"] .dashboard-section-title { color: #6b7280; }

html[data-theme="light"] .dot-green  { box-shadow: 0 0 6px rgba(21, 128, 61, 0.4); }
html[data-theme="light"] .dot-yellow { box-shadow: 0 0 6px rgba(212, 168, 0, 0.4); }
html[data-theme="light"] .dot-blue   { box-shadow: 0 0 6px rgba(37, 99, 235, 0.3); }

/* ============================================================
   LIGHT THEME — Chat messages area & compose
   ============================================================ */
html[data-theme="light"] .chat-messages {
  background: #f8fafc;
}

html[data-theme="light"] .chat-day-divider { color: #9ca3af; }
html[data-theme="light"] .chat-info-msg    { color: #9ca3af; }

html[data-theme="light"] .chat-placeholder h3 { color: #111827; }
html[data-theme="light"] .chat-placeholder p  { color: #6b7280; }

html[data-theme="light"] .chat-compose .form-input {
  background: #fff;
  color: #111827;
  border-color: rgba(0, 0, 0, 0.1);
}

/* ============================================================
   LIGHT THEME — Modal text & form labels inside modals
   ============================================================ */
html[data-theme="light"] .modal-box h3 { color: #111827; }
html[data-theme="light"] .modal-box p  { color: #4b5563; }
html[data-theme="light"] .modal-box .form-group label { color: #374151; }

/* ============================================================
   LIGHT THEME — Contact / Support cards text
   ============================================================ */
html[data-theme="light"] .support-card h3   { color: #111827; }
html[data-theme="light"] .support-card p    { color: #4b5563; }
html[data-theme="light"] .contact-info-item strong { color: #111827; }
html[data-theme="light"] .contact-info-item p      { color: #4b5563; }

/* ============================================================
   LIGHT THEME — FAQ question button hover glow
   ============================================================ */
html[data-theme="light"] .faq-question:hover {
  border-color: rgba(212, 168, 0, 0.4);
  background: rgba(212, 168, 0, 0.04);
}

/* ============================================================
   LIGHT THEME — Skill card text
   ============================================================ */
html[data-theme="light"] .skill-title  { color: #111827; }
html[data-theme="light"] .skill-by     { color: #6b7280; }
html[data-theme="light"] .skill-desc   { color: #4b5563; }

/* ============================================================
   LIGHT THEME — Form group labels (global)
   ============================================================ */
html[data-theme="light"] .form-group label { color: #374151; }

/* ============================================================
   LIGHT THEME — Nav links
   ============================================================ */
html[data-theme="light"] .nav-links a { color: #4b5563; }
html[data-theme="light"] .nav-links a:hover,
html[data-theme="light"] .nav-links a.active { color: #92620a; background: rgba(212,168,0,0.08); }