/* ============================================
   RICK LOW — PROFESSIONAL PROFILE
   Design Philosophy: Structured Clarity
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --navy-900: #0a1628;
  --navy-800: #122036;
  --navy-700: #1a2d4d;
  --navy-600: #243b5e;
  --slate-500: #475569;
  --slate-400: #64748b;
  --slate-300: #94a3b8;
  --slate-200: #cbd5e1;
  --slate-100: #e2e8f0;
  --slate-50: #f1f5f9;
  --ivory: #faf9f6;
  --white: #ffffff;
  --gold-600: #b4862a;
  --gold-500: #d4a017;
  --gold-400: #e6b84d;
  --gold-100: #fdf6e3;
  --teal-500: #0d7377;
  --teal-400: #14a4a8;
  --red-600: #c0392b;
  --shadow-sm: 0 1px 2px rgba(10, 22, 40, 0.06);
  --shadow-md: 0 4px 12px rgba(10, 22, 40, 0.08);
  --shadow-lg: 0 12px 40px rgba(10, 22, 40, 0.12);
  --shadow-xl: 0 24px 60px rgba(10, 22, 40, 0.18);
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --font-display: 'Sora', sans-serif;
  --font-body: 'Inter', sans-serif;
  --max-width: 1200px;
}

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

body {
  font-family: var(--font-body);
  background: var(--ivory);
  color: var(--navy-900);
  line-height: 1.7;
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.25;
  color: var(--navy-900);
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); font-weight: 700; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }
h4 { font-size: 1.125rem; }

p { font-size: 1rem; line-height: 1.75; color: var(--slate-500); }

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

ul { list-style: none; }

/* --- Layout Utilities --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  padding: 6rem 0;
  position: relative;
}

.section-light { background: var(--white); }
.section-ivory { background: var(--ivory); }
.section-navy { background: var(--navy-900); color: var(--slate-200); }
.section-navy h2, .section-navy h3 { color: var(--white); }
.section-navy p { color: var(--slate-300); }

.section-label {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-500);
  margin-bottom: 1rem;
}

.section-title {
  margin-bottom: 3rem;
}

.section-title h2 {
  margin-bottom: 0.75rem;
}

.section-title p {
  max-width: 600px;
}

/* --- Header / Navigation --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(10, 22, 40, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: all var(--transition);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.header-brand {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header-brand .accent { color: var(--gold-500); }

.header-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.header-nav a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--slate-300);
  transition: color var(--transition);
  position: relative;
}

.header-nav a:hover {
  color: var(--white);
}

.header-nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gold-500);
  transition: width var(--transition);
}

.header-nav a:hover::after {
  width: 100%;
}

.header-cta {
  padding: 0.5rem 1.25rem;
  background: var(--gold-500);
  color: var(--navy-900) !important;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.header-cta:hover {
  background: var(--gold-400);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(212, 160, 23, 0.3);
}

.header-cta::after { display: none; }

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  margin: 4px 0;
  transition: all var(--transition);
}

/* --- Hero Section --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-800) 50%, var(--navy-700) 100%);
  position: relative;
  overflow: hidden;
  padding: 8rem 0 4rem;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(212, 160, 23, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(13, 115, 119, 0.08) 0%, transparent 50%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-500), transparent);
  opacity: 0.3;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 4rem;
  align-items: center;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

.hero-content { max-width: 640px; }

.hero-label {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold-400);
  margin-bottom: 1.5rem;
  padding: 0.375rem 0.875rem;
  background: rgba(212, 160, 23, 0.1);
  border: 1px solid rgba(212, 160, 23, 0.2);
  border-radius: var(--radius-sm);
}

.hero h1 {
  color: var(--white);
  margin-bottom: 1rem;
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  line-height: 1.1;
}

.hero h1 .name {
  display: block;
  background: linear-gradient(135deg, var(--white) 0%, var(--slate-200) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero h1 .role {
  display: block;
  font-size: 0.45em;
  font-weight: 400;
  color: var(--gold-400);
  margin-top: 0.5rem;
  letter-spacing: 0.01em;
}

.hero-tagline {
  font-size: 1.125rem;
  color: var(--slate-300);
  line-height: 1.7;
  margin-bottom: 2rem;
  max-width: 540px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.hero-meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--slate-300);
}

.hero-meta-item svg {
  width: 16px;
  height: 16px;
  color: var(--gold-500);
  flex-shrink: 0;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  cursor: pointer;
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: var(--gold-500);
  color: var(--navy-900);
}

.btn-primary:hover {
  background: var(--gold-400);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(212, 160, 23, 0.3);
  color: var(--navy-900);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.4);
  color: var(--white);
}

/* Hero stats */
.hero-stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.hero-stat-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  transition: all var(--transition);
}

.hero-stat-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(212, 160, 23, 0.2);
  transform: translateY(-2px);
}

.hero-stat-value {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--gold-400);
  line-height: 1;
  margin-bottom: 0.25rem;
}

.hero-stat-label {
  font-size: 0.75rem;
  color: var(--slate-300);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero-stat-detail {
  font-size: 0.8rem;
  color: var(--slate-400);
  margin-top: 0.5rem;
}

/* --- About Section --- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.about-text p {
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
  color: var(--slate-500);
}

.about-text p:last-child { margin-bottom: 0; }

.about-highlights {
  display: grid;
  gap: 1.5rem;
}

.about-highlight {
  display: flex;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--slate-50);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--gold-500);
  transition: all var(--transition);
}

.about-highlight:hover {
  box-shadow: var(--shadow-md);
  transform: translateX(4px);
}

.about-highlight-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  background: var(--navy-900);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-400);
}

.about-highlight-icon svg { width: 20px; height: 20px; }

.about-highlight h4 {
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
  color: var(--navy-900);
}

.about-highlight p {
  font-size: 0.85rem;
  color: var(--slate-400);
  margin: 0;
  line-height: 1.5;
}

/* --- Competencies Section --- */
.competency-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
}

.competency-card {
  background: var(--white);
  border: 1px solid var(--slate-100);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.competency-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--gold-500), var(--teal-500));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}

.competency-card:hover {
  border-color: var(--slate-200);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.competency-card:hover::before {
  transform: scaleX(1);
}

.competency-card h3 {
  font-size: 1.125rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.competency-card h3 .icon {
  width: 28px;
  height: 28px;
  background: var(--gold-100);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.competency-card ul {
  display: grid;
  gap: 0.5rem;
}

.competency-card li {
  font-size: 0.875rem;
  color: var(--slate-500);
  padding-left: 1rem;
  position: relative;
  line-height: 1.5;
}

.competency-card li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 4px;
  height: 4px;
  background: var(--gold-500);
  border-radius: 50%;
}

/* --- Achievements Section --- */
.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.achievement-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  transition: all var(--transition);
}

.achievement-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(212, 160, 23, 0.2);
  transform: translateY(-2px);
}

.achievement-card .metric {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold-400);
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.achievement-card .org {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--teal-400);
  margin-bottom: 0.75rem;
}

.achievement-card p {
  font-size: 0.875rem;
  color: var(--slate-300);
  line-height: 1.6;
  margin: 0;
}

/* --- Experience Timeline --- */
.timeline {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--gold-500) 0%, var(--slate-200) 100%);
}

.timeline-item {
  position: relative;
  padding-left: 2.5rem;
  padding-bottom: 3rem;
}

.timeline-item:last-child { padding-bottom: 0; }

.timeline-item::before {
  content: '';
  position: absolute;
  left: -5px;
  top: 0.5rem;
  width: 12px;
  height: 12px;
  background: var(--gold-500);
  border: 3px solid var(--white);
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--gold-500);
  z-index: 1;
}

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

.timeline-item h3 {
  font-size: 1.125rem;
  color: var(--navy-900);
}

.timeline-item .company {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--teal-500);
  margin-bottom: 0.25rem;
}

.timeline-item .period {
  font-size: 0.8rem;
  color: var(--slate-400);
  font-weight: 500;
  padding: 0.25rem 0.625rem;
  background: var(--slate-50);
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.timeline-item .location {
  font-size: 0.75rem;
  color: var(--slate-400);
  margin-bottom: 0.75rem;
}

.timeline-item ul {
  display: grid;
  gap: 0.5rem;
}

.timeline-item li {
  font-size: 0.875rem;
  color: var(--slate-500);
  line-height: 1.6;
  padding-left: 1rem;
  position: relative;
}

.timeline-item li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--gold-500);
  font-weight: 600;
}

/* --- Education & Certifications --- */
.credentials-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.credentials-block h3 {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.credentials-block h3 .icon {
  width: 32px;
  height: 32px;
  background: var(--navy-900);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-400);
  font-size: 0.875rem;
}

.edu-item, .cert-item {
  padding: 1rem 1.25rem;
  background: var(--slate-50);
  border-radius: var(--radius-md);
  margin-bottom: 0.75rem;
  transition: all var(--transition);
}

.edu-item:hover, .cert-item:hover {
  background: var(--slate-100);
  transform: translateX(4px);
}

.edu-item .degree {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--navy-900);
}

.edu-item .institution {
  font-size: 0.875rem;
  color: var(--slate-400);
  margin-top: 0.125rem;
}

.cert-item {
  font-size: 0.875rem;
  color: var(--slate-500);
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.cert-item::before {
  content: '✓';
  color: var(--teal-500);
  font-weight: 700;
  flex-shrink: 0;
}

/* --- Tools & Languages --- */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.tool-block {
  padding: 1.5rem;
  background: var(--white);
  border: 1px solid var(--slate-100);
  border-radius: var(--radius-md);
  transition: all var(--transition);
}

.tool-block:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.tool-block h4 {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold-600);
  margin-bottom: 0.75rem;
}

.tool-block p {
  font-size: 0.875rem;
  color: var(--slate-500);
  line-height: 1.6;
  margin: 0;
}

.languages-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.lang-tag {
  padding: 0.5rem 1rem;
  background: var(--navy-900);
  color: var(--white);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lang-tag .level {
  font-size: 0.7rem;
  color: var(--gold-400);
  font-weight: 600;
}

/* --- Contact Section --- */
.contact-content {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.contact-content h2 {
  margin-bottom: 1rem;
}

.contact-content p {
  margin-bottom: 2rem;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.75rem 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  color: var(--slate-200);
  transition: all var(--transition);
}

.contact-link:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--gold-500);
  color: var(--white);
  transform: translateY(-2px);
}

.contact-link svg {
  width: 18px;
  height: 18px;
  color: var(--gold-400);
}

/* --- Footer --- */
.footer {
  padding: 2rem 0;
  background: var(--navy-900);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

.footer p {
  font-size: 0.8rem;
  color: var(--slate-400);
  margin: 0;
}

.footer .footer-brand {
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--white);
}

/* --- Chatbot Widget --- */
.chatbot-toggle {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 56px;
  height: 56px;
  background: var(--navy-900);
  border: 2px solid var(--gold-500);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  box-shadow: var(--shadow-lg);
  transition: all var(--transition);
  color: var(--gold-400);
}

.chatbot-toggle:hover {
  transform: scale(1.05);
  box-shadow: 0 16px 40px rgba(10, 22, 40, 0.25);
}

.chatbot-toggle svg { width: 24px; height: 24px; }

.chatbot-toggle .badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 12px;
  height: 12px;
  background: var(--teal-400);
  border: 2px solid var(--white);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.7; }
}

.chatbot-window {
  position: fixed;
  bottom: 5.5rem;
  right: 1.5rem;
  width: 380px;
  max-width: calc(100vw - 3rem);
  height: 540px;
  max-height: calc(100vh - 7rem);
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 9999;
  border: 1px solid var(--slate-100);
}

.chatbot-window.active {
  display: flex;
  animation: chatbotOpen 0.3s ease-out;
}

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

.chatbot-header {
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, var(--navy-900), var(--navy-700));
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.chatbot-header-avatar {
  width: 36px;
  height: 36px;
  background: var(--gold-500);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--navy-900);
  flex-shrink: 0;
}

.chatbot-header-info { flex: 1; }

.chatbot-header-info h4 {
  font-size: 0.875rem;
  color: var(--white);
  margin: 0;
}

.chatbot-header-info p {
  font-size: 0.7rem;
  color: var(--slate-300);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.chatbot-header-info .status-dot {
  width: 6px;
  height: 6px;
  background: var(--teal-400);
  border-radius: 50%;
  display: inline-block;
}

.chatbot-close {
  background: none;
  border: none;
  color: var(--slate-300);
  cursor: pointer;
  padding: 0.25rem;
  transition: color var(--transition);
}

.chatbot-close:hover { color: var(--white); }

.chatbot-close svg { width: 18px; height: 18px; }

.chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: var(--slate-50);
  scrollbar-width: thin;
  scrollbar-color: var(--slate-300) transparent;
}

.chatbot-messages::-webkit-scrollbar { width: 4px; }
.chatbot-messages::-webkit-scrollbar-track { background: transparent; }
.chatbot-messages::-webkit-scrollbar-thumb {
  background: var(--slate-300);
  border-radius: 2px;
}

.chat-msg {
  display: flex;
  gap: 0.5rem;
  max-width: 88%;
  animation: msgIn 0.3s ease-out;
}

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

.chat-msg.bot { align-self: flex-start; }
.chat-msg.user { align-self: flex-end; flex-direction: row-reverse; }

.chat-msg-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  flex-shrink: 0;
}

.chat-msg.bot .chat-msg-avatar {
  background: var(--navy-900);
  color: var(--gold-400);
}

.chat-msg.user .chat-msg-avatar {
  background: var(--teal-500);
  color: var(--white);
}

.chat-msg-bubble {
  padding: 0.625rem 0.875rem;
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  line-height: 1.55;
  word-break: break-word;
}

.chat-msg.bot .chat-msg-bubble {
  background: var(--white);
  color: var(--navy-900);
  border: 1px solid var(--slate-100);
  border-bottom-left-radius: 2px;
}

.chat-msg.user .chat-msg-bubble {
  background: var(--navy-900);
  color: var(--white);
  border-bottom-right-radius: 2px;
}

.chat-msg-bubble ul {
  margin-top: 0.5rem;
  padding-left: 1rem;
}

.chat-msg-bubble li {
  margin-bottom: 0.25rem;
  list-style: disc;
}

.chat-typing {
  display: flex;
  gap: 4px;
  padding: 0.625rem 0.875rem;
}

.chat-typing span {
  width: 6px;
  height: 6px;
  background: var(--slate-400);
  border-radius: 50%;
  animation: typing 1.4s infinite;
}

.chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-6px); opacity: 1; }
}

.chatbot-suggestions {
  padding: 0.75rem 1.25rem 0;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  background: var(--slate-50);
  border-top: 1px solid var(--slate-100);
}

.chatbot-suggestion {
  padding: 0.375rem 0.75rem;
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  color: var(--slate-500);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.chatbot-suggestion:hover {
  background: var(--navy-900);
  color: var(--white);
  border-color: var(--navy-900);
}

.chatbot-input-area {
  padding: 0.75rem 1.25rem;
  background: var(--white);
  border-top: 1px solid var(--slate-100);
  display: flex;
  gap: 0.5rem;
}

.chatbot-input {
  flex: 1;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  font-family: var(--font-body);
  color: var(--navy-900);
  background: var(--slate-50);
  transition: all var(--transition);
  outline: none;
}

.chatbot-input:focus {
  border-color: var(--gold-500);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(212, 160, 23, 0.1);
}

.chatbot-input::placeholder { color: var(--slate-400); }

.chatbot-send {
  width: 36px;
  height: 36px;
  background: var(--navy-900);
  color: var(--gold-400);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition);
}

.chatbot-send:hover {
  background: var(--navy-700);
  transform: scale(1.05);
}

.chatbot-send svg { width: 16px; height: 16px; }

.chatbot-disclaimer {
  padding: 0.5rem 1.25rem;
  background: var(--slate-50);
  border-top: 1px solid var(--slate-100);
  font-size: 0.65rem;
  color: var(--slate-400);
  text-align: center;
}

/* --- Chatbot: resizable window (js/chat-resize.js) --- */
.chatbot-window { transition: width 0.2s ease, height 0.2s ease; }
.chatbot-window.chatbot-resizing { transition: none; }
.chatbot-resizing-page, .chatbot-resizing-page * { user-select: none; cursor: nwse-resize !important; }

.chatbot-resize-handle {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 18px;
  height: 18px;
  padding: 2px;
  cursor: nwse-resize;
  z-index: 2;
  border-radius: var(--radius-sm);
  color: var(--gold-400);
  opacity: 0.75;
  touch-action: none;
  transition: opacity var(--transition), background var(--transition);
}
.chatbot-resize-handle svg { width: 100%; height: 100%; display: block; }
.chatbot-resize-handle svg line { stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.chatbot-resize-handle:hover,
.chatbot-resize-handle:focus-visible,
.chatbot-resizing .chatbot-resize-handle {
  opacity: 1;
  background: rgba(212, 160, 23, 0.18);
  outline: none;
}

.chatbot-maximize {
  background: none;
  border: none;
  color: var(--slate-300);
  cursor: pointer;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  transition: color var(--transition);
}
.chatbot-maximize:hover,
.chatbot-maximize:focus-visible { color: var(--gold-400); outline: none; }
.chatbot-maximize svg { width: 16px; height: 16px; }
.chatbot-maximized .chatbot-maximize { color: var(--gold-400); }

/* Larger panel: slightly roomier reading */
.chatbot-maximized .chat-msg { max-width: 82%; }
.chatbot-maximized .chat-msg-bubble { font-size: 0.875rem; line-height: 1.6; }

/* Mobile: full-screen chat, no manual resizing */
@media (max-width: 640px) {
  .chatbot-window {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    height: 100dvh !important;
    max-width: none;
    max-height: none;
    border-radius: 0;
    border: none;
    transition: none;
  }
  .chatbot-resize-handle,
  .chatbot-maximize { display: none; }
}

/* --- Scroll Reveal Animations --- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Responsive --- */
@media (max-width: 968px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .hero-stats {
    grid-template-columns: repeat(3, 1fr);
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .credentials-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .section { padding: 4rem 0; }

  .header-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--navy-900);
    flex-direction: column;
    padding: 1rem 2rem;
    gap: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }

  .header-nav.active { display: flex; }

  .nav-toggle { display: block; }

  .hero { padding: 6rem 0 3rem; }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .timeline-item .timeline-header {
    flex-direction: column;
  }

  .timeline-item .period {
    align-self: flex-start;
  }

  .chatbot-window {
    width: calc(100vw - 2rem);
    height: calc(100vh - 6rem);
  }
}

@media (max-width: 480px) {
  .container, .hero-inner, .footer-inner, .header-inner {
    padding: 0 1rem;
  }

  .hero-actions {
    flex-direction: column;
  }

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

  .competency-grid, .achievements-grid {
    grid-template-columns: 1fr;
  }
}
