/* ============================================================
   JohnMombay.com — Dark & Executive Design
   Palette: #0A0E1A bg | #C9A84C gold | #3B82F6 blue | #F0F4FF text
   ============================================================ */

:root {
  --bg-primary: #0A0E1A;
  --bg-secondary: #0F1525;
  --bg-card: #141B2D;
  --bg-card-hover: #1A2238;
  --border: #1E2D4A;
  --border-light: #253555;
  --gold: #C9A84C;
  --gold-light: #E8C97A;
  --blue: #3B82F6;
  --blue-light: #60A5FA;
  --text-primary: #F0F4FF;
  --text-secondary: #A8B4CC;
  --text-muted: #6B7A99;
  --success: #10B981;
  --danger: #EF4444;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 48px rgba(0,0,0,0.6);
  --transition: all 0.2s ease;
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'Inter', system-ui, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--blue-light); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--gold-light); }

/* ============ NAV ============ */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10,14,26,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-brand {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.05em;
}
.nav-brand:hover { color: var(--gold-light); }

.nav-links {
  list-style: none;
  display: flex;
  gap: 0.25rem;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.375rem 0.875rem;
  border-radius: var(--radius);
  transition: var(--transition);
}
.nav-links a:hover, .nav-links a.active {
  color: var(--text-primary);
  background: var(--bg-card);
}
.nav-links a.active { color: var(--gold); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
}

/* ============ LAYOUT ============ */
.main-content { min-height: calc(100vh - 64px - 80px); }

.section-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section-block { padding: 5rem 0; }
.section-alt { background: var(--bg-secondary); }

.section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2rem;
  position: relative;
}
.section-title::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: var(--gold);
  margin-top: 0.5rem;
  border-radius: 2px;
}

/* ============ HERO ============ */
.hero-section {
  padding: 6rem 0 5rem;
  background: linear-gradient(135deg, var(--bg-primary) 0%, #0D1A3A 100%);
  border-bottom: 1px solid var(--border);
}

.hero-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
}

.hero-eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.75rem;
}

.hero-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.hero-headline {
  font-size: 1.125rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  max-width: 600px;
}

.hero-meta {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  margin-bottom: 2rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}
.hero-meta a { color: var(--blue-light); }

.hero-actions { display: flex; gap: 1rem; }

.hero-photo {
  flex-shrink: 0;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--gold);
  box-shadow: 0 0 40px rgba(201,168,76,0.2);
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }

/* ============ BUTTONS ============ */
.btn-primary {
  display: inline-block;
  background: var(--gold);
  color: #0A0E1A;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.625rem 1.5rem;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: var(--transition);
}
.btn-primary:hover { background: var(--gold-light); color: #0A0E1A; }

.btn-outline {
  display: inline-block;
  background: transparent;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.625rem 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  cursor: pointer;
  transition: var(--transition);
}
.btn-outline:hover { border-color: var(--gold); color: var(--gold); }

.btn-outline-sm {
  display: inline-block;
  background: transparent;
  color: var(--blue-light);
  font-size: 0.8rem;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  transition: var(--transition);
}

.btn-full { width: 100%; text-align: center; }

/* ============ COMPETENCIES ============ */
.competencies-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.competency-chip {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
  border-radius: 100px;
  transition: var(--transition);
}
.competency-chip:hover { border-color: var(--gold); color: var(--gold); }

/* ============ NAV CARDS ============ */
.nav-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.nav-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  text-decoration: none;
  transition: var(--transition);
}
.nav-card:hover {
  border-color: var(--gold);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.nav-card-icon { font-size: 1.75rem; margin-bottom: 0.75rem; }
.nav-card-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}
.nav-card-desc { font-size: 0.875rem; color: var(--text-muted); line-height: 1.5; }

/* ============ PAGE HERO ============ */
.page-hero {
  padding: 4rem 0 3rem;
  background: linear-gradient(135deg, var(--bg-primary) 0%, #0D1A3A 100%);
  border-bottom: 1px solid var(--border);
}

.page-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.page-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 600px;
}

/* ============ TIMELINE (Career) ============ */
.timeline { position: relative; }
.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--gold), transparent);
}

.timeline-item {
  display: flex;
  gap: 2rem;
  margin-bottom: 3rem;
  padding-left: 2.5rem;
  position: relative;
}

.timeline-marker {
  position: absolute;
  left: -5px;
  top: 8px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gold);
  border: 2px solid var(--bg-primary);
  box-shadow: 0 0 12px rgba(201,168,76,0.5);
  flex-shrink: 0;
}

.timeline-content {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: var(--transition);
}
.timeline-content:hover { border-color: var(--border-light); }

.job-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.job-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.job-company { color: var(--gold); font-size: 0.9rem; font-weight: 500; }

.job-meta { text-align: right; font-size: 0.8rem; color: var(--text-muted); }
.job-location { display: block; }
.job-period { display: block; color: var(--blue-light); margin-top: 0.25rem; }

.job-summary { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 1rem; }

.achievements-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.achievements-list li {
  color: var(--text-secondary);
  font-size: 0.875rem;
  padding-left: 1rem;
  position: relative;
  line-height: 1.6;
}
.achievements-list li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--gold);
  font-size: 0.75rem;
  top: 0.1em;
}

/* ============ EDUCATION ============ */
.edu-grid { display: flex; flex-direction: column; gap: 1.5rem; }

.edu-card {
  display: flex;
  gap: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  align-items: flex-start;
}

.edu-icon { font-size: 2rem; flex-shrink: 0; }
.edu-degree {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}
.edu-institution { color: var(--gold); font-size: 0.9rem; margin-bottom: 0.25rem; }
.edu-meta { font-size: 0.8rem; color: var(--text-muted); }

/* ============ CERTIFICATIONS ============ */
.certs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.cert-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  position: relative;
  transition: var(--transition);
}
.cert-card:hover { border-color: var(--border-light); }
.cert-inprogress { border-color: rgba(59,130,246,0.3); }

.cert-status-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
  margin-bottom: 0.75rem;
}
.badge-completed { background: rgba(16,185,129,0.15); color: var(--success); }
.badge-inprogress { background: rgba(59,130,246,0.15); color: var(--blue-light); }

.cert-name { font-size: 0.9rem; font-weight: 600; color: var(--text-primary); margin-bottom: 0.5rem; line-height: 1.4; }
.cert-issuer { font-size: 0.8rem; color: var(--gold); margin-bottom: 0.5rem; }
.cert-meta { font-size: 0.75rem; color: var(--text-muted); display: flex; gap: 0.75rem; }
.cert-id { font-family: monospace; }

/* ============ PROJECTS ============ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.75rem;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  position: relative;
  display: flex;
  flex-direction: column;
}
.project-card:hover { border-color: var(--border-light); transform: translateY(-2px); box-shadow: var(--shadow); }
.project-featured { border-color: rgba(201,168,76,0.4); }

.project-featured-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: var(--gold);
  color: #0A0E1A;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  z-index: 1;
}

.project-image { width: 100%; height: 180px; object-fit: cover; }

.project-body { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; }
.project-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}
.project-desc { font-size: 0.875rem; color: var(--text-secondary); margin-bottom: 1rem; flex: 1; }

.project-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1rem; }
.tech-tag {
  background: rgba(59,130,246,0.1);
  border: 1px solid rgba(59,130,246,0.2);
  color: var(--blue-light);
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
}

.tech-tag-sm {
  display: inline-block;
  background: rgba(59,130,246,0.1);
  border: 1px solid rgba(59,130,246,0.2);
  color: var(--blue-light);
  font-size: 0.7rem;
  padding: 0.1rem 0.45rem;
  border-radius: 100px;
  margin: 0.1rem 0.1rem 0 0;
}

.project-links { display: flex; gap: 0.75rem; }
.project-link {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--blue-light);
  border: 1px solid rgba(59,130,246,0.3);
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius);
  transition: var(--transition);
}
.project-link:hover { border-color: var(--blue); background: rgba(59,130,246,0.1); }
.project-link-live { color: var(--gold); border-color: rgba(201,168,76,0.3); }

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

.skill-category-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
}

.skill-category-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.skills-list { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.skill-chip {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.8rem;
  padding: 0.3rem 0.75rem;
  border-radius: 100px;
  transition: var(--transition);
}
.skill-chip:hover { border-color: var(--blue); color: var(--blue-light); }

/* ============ ARTICLES ============ */
.article-filters {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.filter-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.5rem 1.25rem;
  border-radius: 100px;
  cursor: pointer;
  transition: var(--transition);
}
.filter-btn:hover, .filter-btn.active {
  background: var(--bg-card-hover);
  border-color: var(--gold);
  color: var(--gold);
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.75rem;
}

.article-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}
.article-card:hover { border-color: var(--border-light); transform: translateY(-2px); box-shadow: var(--shadow); }

.article-category-badge, .article-badge-lg {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.2rem 0.65rem;
  border-radius: 100px;
  margin-bottom: 0.5rem;
}
.article-badge-article { background: rgba(59,130,246,0.15); color: var(--blue-light); }
.article-badge-whitepaper { background: rgba(201,168,76,0.15); color: var(--gold-light); }
.article-badge-blog { background: rgba(16,185,129,0.15); color: #34D399; }

.article-badge-sm {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.15rem 0.5rem;
  border-radius: 100px;
}

.article-image { width: 100%; height: 160px; object-fit: cover; }

.article-body { padding: 1.25rem; flex: 1; display: flex; flex-direction: column; }

.article-title {
  font-size: 0.975rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  line-height: 1.4;
}
.article-title a { color: inherit; }
.article-title a:hover { color: var(--gold-light); }

.article-excerpt { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.75rem; flex: 1; line-height: 1.5; }

.article-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}
.article-date { color: var(--text-muted); }
.article-read-more, .article-external { color: var(--blue-light); font-weight: 500; }

/* Article detail */
.article-detail-title { margin-top: 0.75rem; }
.article-detail-meta {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}
.article-detail-body { max-width: 760px; }
.article-nav { margin-top: 3rem; }

/* ============ PROSE ============ */
.prose {
  color: var(--text-secondary);
  line-height: 1.8;
  font-size: 0.975rem;
}
.prose p { margin-bottom: 1.25em; }
.prose strong { color: var(--text-primary); }
.prose a { color: var(--blue-light); }
.prose ul, .prose ol { padding-left: 1.5rem; margin-bottom: 1.25em; }
.prose li { margin-bottom: 0.4em; }
.prose h2, .prose h3 { color: var(--text-primary); font-family: 'Space Grotesk', sans-serif; margin: 1.75em 0 0.75em; }

.prose-lg { font-size: 1.05rem; }

/* ============ CONTACT ============ */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 4rem;
  align-items: start;
}

.contact-items { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 2rem; }

.contact-item {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
}
.contact-icon { font-size: 1.1rem; }
.contact-item a { color: var(--blue-light); }

.contact-note {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius);
  padding: 1.25rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}
.contact-note strong { color: var(--text-primary); }

.contact-form-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

/* ============ FORMS ============ */
.form-group { margin-bottom: 1.25rem; }

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}

.form-input {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  padding: 0.625rem 0.875rem;
  border-radius: var(--radius);
  transition: var(--transition);
  outline: none;
}
.form-input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(59,130,246,0.1); }

.form-textarea { resize: vertical; min-height: 120px; }
.form-select { cursor: pointer; }

.field-error { font-size: 0.8rem; color: var(--danger); display: block; margin-top: 0.3rem; }

.alert-success {
  background: rgba(16,185,129,0.1);
  border: 1px solid rgba(16,185,129,0.3);
  color: #34D399;
  border-radius: var(--radius);
  padding: 0.875rem 1rem;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

/* ============ FOOTER ============ */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
}

.footer-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 0.5rem;
}

.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { color: var(--text-muted); }
.footer-links a:hover { color: var(--text-secondary); }
.admin-link { opacity: 0.4; font-size: 0.75rem; }

/* ============ CHAT WIDGET ============ */
.chat-widget {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 999;
}

.chat-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--gold);
  color: #0A0E1A;
  border: none;
  border-radius: 100px;
  padding: 0.75rem 1.25rem;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(201,168,76,0.4);
  transition: var(--transition);
}
.chat-toggle:hover { background: var(--gold-light); box-shadow: 0 6px 28px rgba(201,168,76,0.5); }

.chat-panel {
  position: absolute;
  bottom: calc(100% + 0.75rem);
  right: 0;
  width: 360px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
}

.chat-header-info { display: flex; align-items: center; gap: 0.75rem; }

.chat-avatar {
  width: 36px;
  height: 36px;
  background: var(--gold);
  color: #0A0E1A;
  font-weight: 700;
  font-size: 0.7rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.chat-name { font-size: 0.9rem; font-weight: 600; color: var(--text-primary); }
.chat-subtitle { font-size: 0.75rem; color: var(--text-muted); }

.chat-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 4px;
  transition: var(--transition);
}
.chat-close:hover { color: var(--text-primary); }

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 320px;
  min-height: 200px;
}

.chat-msg {
  max-width: 88%;
  padding: 0.625rem 0.875rem;
  border-radius: 12px;
  font-size: 0.875rem;
  line-height: 1.5;
}
.chat-msg.bot {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border-bottom-left-radius: 4px;
  align-self: flex-start;
}
.chat-msg.user {
  background: var(--gold);
  color: #0A0E1A;
  font-weight: 500;
  border-bottom-right-radius: 4px;
  align-self: flex-end;
}
.chat-msg.loading { opacity: 0.6; font-style: italic; }

.chat-input-area {
  padding: 0.875rem;
  border-top: 1px solid var(--border);
  background: var(--bg-secondary);
}

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

.chat-input {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.875rem;
  padding: 0.5rem 0.875rem;
  border-radius: var(--radius);
  outline: none;
  transition: var(--transition);
}
.chat-input:focus { border-color: var(--blue); }

.chat-send-btn {
  background: var(--blue);
  color: white;
  border: none;
  border-radius: var(--radius);
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: var(--transition);
}
.chat-send-btn:hover { background: var(--blue-light); }
.chat-send-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.chat-disclaimer { font-size: 0.7rem; color: var(--text-muted); margin-top: 0.4rem; text-align: center; }

/* ============ ADMIN ============ */
.admin-body { background: #0C1020; }

.admin-layout {
  display: flex;
  min-height: 100vh;
}

.admin-sidebar {
  width: 240px;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.admin-logo {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
}
.admin-logo a { color: var(--gold); }

.admin-badge {
  background: rgba(201,168,76,0.15);
  color: var(--gold);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  vertical-align: middle;
  margin-left: 0.25rem;
}

.admin-nav {
  flex: 1;
  padding: 1rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.admin-nav-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  transition: var(--transition);
}
.admin-nav-link:hover { background: var(--bg-card); color: var(--text-primary); }

.admin-sidebar-footer {
  padding: 0.75rem;
  border-top: 1px solid var(--border);
}

.admin-logout-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-family: inherit;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
}
.admin-logout-btn:hover { background: rgba(239,68,68,0.1); color: var(--danger); }

.admin-main { flex: 1; display: flex; flex-direction: column; overflow: auto; }

.admin-topbar {
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-secondary);
}
.admin-page-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
}

.admin-alert {
  margin: 1rem 2rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
}
.admin-alert-success {
  background: rgba(16,185,129,0.1);
  border: 1px solid rgba(16,185,129,0.3);
  color: #34D399;
}
.admin-alert-error {
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.3);
  color: #FC8181;
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.25rem;
  padding: 2rem;
}

.admin-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}
.stat-highlight { border-color: rgba(201,168,76,0.4); }

.stat-number {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 0.25rem;
}
.stat-label { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.75rem; }
.stat-action { font-size: 0.8rem; color: var(--blue-light); }

.admin-quick-actions { padding: 0 2rem 2rem; }
.admin-quick-actions h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.admin-action-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.admin-action-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.875rem;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius);
  transition: var(--transition);
}
.admin-action-card:hover { border-color: var(--gold); color: var(--gold); background: var(--bg-card-hover); }

.admin-toolbar { padding: 1rem 2rem; }

.admin-table-wrapper { padding: 0 2rem 2rem; overflow-x: auto; }

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.admin-table th, .admin-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.admin-table th { color: var(--text-muted); font-weight: 500; font-size: 0.8rem; background: var(--bg-secondary); }
.admin-table td { color: var(--text-secondary); }
.admin-table tr:hover td { background: var(--bg-card); }

.row-unread td { color: var(--text-primary); font-weight: 500; }
.message-preview { max-width: 250px; }

.table-actions { display: flex; gap: 0.5rem; align-items: center; }

.btn-sm {
  display: inline-block;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.775rem;
  padding: 0.25rem 0.625rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}
.btn-sm:hover { border-color: var(--border-light); color: var(--text-primary); }
.btn-danger { border-color: rgba(239,68,68,0.3); color: var(--danger); }
.btn-danger:hover { background: rgba(239,68,68,0.1); border-color: var(--danger); }

.admin-form { padding: 2rem; }
.admin-form-section { margin-bottom: 2rem; }
.admin-form-section > h2 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-actions { display: flex; gap: 1rem; padding-top: 1rem; border-top: 1px solid var(--border); margin-top: 2rem; }
.form-hint { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.admin-check { display: flex; align-items: center; flex-direction: row !important; gap: 0.5rem; }
.admin-check input[type=checkbox] { width: auto; margin: 0; }
.admin-empty { color: var(--text-muted); font-size: 0.9rem; text-align: center; padding: 3rem; }

/* Admin login page */
.login-page {
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.login-container { width: 100%; max-width: 400px; padding: 1.5rem; }

.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
}

.login-logo {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--gold);
  text-align: center;
  margin-bottom: 0.5rem;
}

.login-title {
  font-size: 1.25rem;
  font-weight: 600;
  text-align: center;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.login-subtitle { font-size: 0.875rem; color: var(--text-muted); text-align: center; margin-bottom: 1.75rem; }
.login-form .form-group { margin-bottom: 1rem; }

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
  .nav-links { display: none; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: var(--bg-secondary); border-bottom: 1px solid var(--border); padding: 1rem; gap: 0.25rem; }
  .nav-links.open { display: flex; }
  .nav-toggle { display: flex; }
  .site-nav { position: relative; }

  .hero-container { flex-direction: column-reverse; }
  .hero-photo { width: 140px; height: 140px; }
  .hero-name { font-size: 2.25rem; }

  .contact-layout { grid-template-columns: 1fr; gap: 2rem; }
  .form-row-2 { grid-template-columns: 1fr; }
  .admin-layout { flex-direction: column; }
  .admin-sidebar { width: 100%; }

  .chat-panel { width: calc(100vw - 2rem); right: -0.5rem; }
}

/* ============ SUMMERNOTE DARK OVERRIDES ============ */
.note-editor.note-frame {
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  background: var(--bg-secondary) !important;
}
.note-toolbar {
  background: var(--bg-card) !important;
  border-bottom: 1px solid var(--border) !important;
  padding: 4px !important;
}
.note-toolbar .note-btn {
  background: transparent !important;
  border: 1px solid transparent !important;
  color: var(--text-secondary) !important;
  border-radius: 4px !important;
}
.note-toolbar .note-btn:hover {
  background: var(--bg-secondary) !important;
  border-color: var(--border) !important;
  color: var(--text-primary) !important;
}
.note-toolbar .note-btn-group .note-btn.active,
.note-toolbar .note-btn.active {
  background: var(--bg-secondary) !important;
  color: var(--gold) !important;
}
.note-editable {
  background: var(--bg-secondary) !important;
  color: var(--text-primary) !important;
  font-family: 'Inter', sans-serif !important;
  font-size: 0.9rem !important;
  line-height: 1.7 !important;
  padding: 0.75rem 1rem !important;
}
.note-statusbar {
  background: var(--bg-card) !important;
  border-top: 1px solid var(--border) !important;
}
.note-statusbar .note-resizebar { border-top-color: var(--border) !important; }
.note-popover .popover-content,
.note-dropdown-menu {
  background: var(--bg-card) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
}
.note-dropdown-item { color: var(--text-secondary) !important; }
.note-dropdown-item:hover { background: var(--bg-secondary) !important; color: var(--text-primary) !important; }

/* Admin tabs */
.admin-tabs { display: flex; gap: 0.25rem; padding: 0 2rem 0; margin-bottom: 0; border-bottom: 1px solid var(--border); }
.admin-tab {
  background: none; border: none; border-bottom: 2px solid transparent;
  color: var(--text-muted); font-size: 0.9rem; font-weight: 500;
  padding: 0.75rem 1.25rem; cursor: pointer; margin-bottom: -1px;
  transition: color 0.2s, border-color 0.2s;
}
.admin-tab:hover { color: var(--text-primary); }
.admin-tab.active { color: var(--gold); border-bottom-color: var(--gold); }
.admin-tab-panel { }

/* Cert status badges */
.cert-status { font-size: 0.75rem; padding: 0.2rem 0.55rem; border-radius: 100px; font-weight: 500; }
.cert-status-completed { background: rgba(16,185,129,0.12); color: #10b981; }
.cert-status-in-progress { background: rgba(201,168,76,0.12); color: var(--gold); }

