/* ==========================================================================
   Design Tokens & CSS Variables (Dark & Light Mode)
   ========================================================================== */
:root {
  --bg-primary: #060913;
  --bg-secondary: #0d1428;
  --bg-card: rgba(15, 23, 42, 0.82);
  --bg-card-hover: rgba(24, 34, 60, 0.92);
  --bg-glass: rgba(10, 16, 32, 0.82);
  --bg-pill: rgba(34, 211, 238, 0.12);
  
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1; /* WCAG AA >= 9.8:1 */
  --text-muted: #94a3b8;     /* WCAG AA >= 5.5:1 */
  
  --accent-cyan: #22d3ee;
  --accent-blue: #3b82f6;
  --accent-indigo: #6366f1;
  --accent-purple: #a855f7;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-gold: #fbbf24;
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(34, 211, 238, 0.28);
  --border-hover: rgba(34, 211, 238, 0.55);
  
  --gradient-main: linear-gradient(135deg, #06b6d4 0%, #3b82f6 50%, #8b5cf6 100%);
  --gradient-subtle: linear-gradient(135deg, rgba(6, 182, 212, 0.16), rgba(139, 92, 246, 0.16));
  --gradient-gold: linear-gradient(135deg, rgba(251, 191, 36, 0.18) 0%, rgba(245, 158, 11, 0.08) 100%);
  
  --shadow-neon: 0 10px 32px -8px rgba(6, 182, 212, 0.4);
  --shadow-card: 0 20px 48px -12px rgba(0, 0, 0, 0.6);
  
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Outfit', sans-serif;
  --font-mono: 'Fira Code', monospace;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-full: 9999px;
  
  --transition-smooth: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #eef2ff;
  --bg-card: rgba(255, 255, 255, 0.94);
  --bg-card-hover: rgba(241, 245, 249, 0.98);
  --bg-glass: rgba(255, 255, 255, 0.88);
  --bg-pill: rgba(2, 132, 199, 0.1);
  
  --text-primary: #0f172a;
  --text-secondary: #1e293b;
  --text-muted: #475569;
  
  --accent-cyan: #0284c7;
  --accent-blue: #2563eb;
  --accent-indigo: #4f46e5;
  --accent-purple: #7c3aed;
  --accent-emerald: #059669;
  --accent-amber: #d97706;
  --accent-gold: #b45309;
  
  --border-subtle: rgba(0, 0, 0, 0.08);
  --border-glow: rgba(37, 99, 235, 0.24);
  --border-hover: rgba(37, 99, 235, 0.45);
  
  --gradient-main: linear-gradient(135deg, #0284c7 0%, #2563eb 50%, #7c3aed 100%);
  --gradient-subtle: linear-gradient(135deg, rgba(2, 132, 199, 0.1), rgba(124, 58, 237, 0.1));
  --gradient-gold: linear-gradient(135deg, rgba(217, 119, 6, 0.12) 0%, rgba(245, 158, 11, 0.05) 100%);
  
  --shadow-neon: 0 10px 28px -8px rgba(37, 99, 235, 0.22);
  --shadow-card: 0 16px 36px -10px rgba(0, 0, 0, 0.1);
}

/* ==========================================================================
   Reset & Base Styles with Smooth Scrolling Offset
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px; /* Prevents fixed navbar from overlapping anchor content */
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.65;
  overflow-x: hidden;
}

body {
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  background-color: var(--bg-primary);
  transition: background-color 0.35s ease, color 0.35s ease;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-smooth);
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Scroll Offset for all Sections */
section, .hero-section {
  scroll-margin-top: 88px;
}

/* Scroll Progress Bar */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--gradient-main);
  z-index: 9999;
  box-shadow: 0 0 12px var(--accent-cyan);
  transition: width 0.1s linear;
}

/* Background and Layout Clean Engine */
.cursor-glow,
#bg-canvas,
.glow-orb {
  display: none !important;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.navbar {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: min(1180px, 94vw);
  z-index: 1000;
  background: var(--bg-glass);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-full);
  padding: 10px 22px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  transition: var(--transition-smooth);
}

.nav-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.brand-badge {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  overflow: hidden;
  background: #0a0d14;
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: grid;
  place-items: center;
  transition: transform 0.2s ease, border-color 0.2s ease;
  flex-shrink: 0;
}

.brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.nav-brand:hover .brand-badge {
  transform: scale(1.04);
  border-color: rgba(255, 255, 255, 0.28);
}

.nav-name {
  font-size: 1.05rem;
}

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

.nav-item {
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: var(--radius-full);
  transition: var(--transition-smooth);
}

.nav-item:hover, .nav-item.active {
  color: var(--text-primary);
  background: var(--bg-pill);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Theme Toggle Button (Matches Image 3) */
.theme-toggle-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border-glow);
  background: var(--bg-card);
  color: var(--text-primary);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 1.05rem;
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.2);
  transition: var(--transition-smooth);
}

.theme-toggle-btn:hover {
  border-color: var(--accent-cyan);
  transform: rotate(18deg) scale(1.08);
  box-shadow: var(--shadow-neon);
}

.nav-connect-btn {
  display: inline-flex;
}

.mobile-menu-btn {
  display: none;
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: 10px;
  width: 38px;
  height: 38px;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  padding: 6px;
}

.hamburger-bar {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition-smooth);
}

/* Mobile Navigation Drawer */
.mobile-drawer {
  display: none;
  position: fixed;
  top: 76px;
  left: 3vw;
  right: 3vw;
  background: var(--bg-card);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  padding: 20px;
  z-index: 999;
  box-shadow: var(--shadow-card);
}

.mobile-drawer.open {
  display: grid;
  gap: 8px;
}

.drawer-link {
  color: var(--text-primary);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: var(--bg-pill);
}

/* ==========================================================================
   Hero Section (Matches Image 2)
   ========================================================================== */
.hero-section {
  padding: 140px 0 72px;
  min-height: 85vh;
  display: flex;
  align-items: center;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.28fr 0.92fr;
  gap: 44px;
  align-items: center;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.38);
  color: var(--accent-emerald);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 10px var(--accent-emerald);
  animation: pulse-dot 1.8s infinite;
}

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

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2.35rem, 4.6vw, 3.85rem);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 14px;
}

.gradient-text {
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.typewriter-row {
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  font-weight: 700;
  color: var(--accent-cyan);
  min-height: 2.1rem;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 18px;
}

.cursor-caret {
  display: inline-block;
  width: 3px;
  height: 1.25em;
  background: var(--accent-cyan);
  animation: caret-blink 0.85s infinite;
}

@keyframes caret-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.hero-bio {
  font-size: 1.02rem;
  color: var(--text-secondary);
  line-height: 1.65;
  max-width: 630px;
  margin-bottom: 24px;
}

.credentials-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 26px;
}

.credential-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  color: var(--text-secondary);
  font-size: 0.84rem;
  font-weight: 600;
  transition: var(--transition-smooth);
}

.credential-pill:hover {
  transform: translateY(-2px);
  color: var(--text-primary);
  border-color: var(--accent-cyan);
  box-shadow: var(--shadow-neon);
}

.pill-icon {
  width: 16px;
  height: 16px;
}

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

/* 3D Profile Card with Profile Picture */
.hero-photo-block {
  perspective: 1200px;
}

.profile-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-glow);
  border-radius: 26px;
  padding: 28px 26px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
  transition: transform 0.2s ease-out, border-color 0.3s ease;
}

.profile-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  background: var(--gradient-subtle);
  border-radius: var(--radius-lg);
  z-index: -1;
  opacity: 0.5;
}

.avatar-ring {
  width: 136px;
  height: 136px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.4), rgba(99, 102, 241, 0.4));
  margin: 0 auto 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

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

.profile-name {
  font-family: var(--font-heading);
  text-align: center;
  font-size: 1.45rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.profile-subtitle {
  text-align: center;
  color: var(--accent-cyan);
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 18px;
}

.profile-meta-list {
  display: grid;
  gap: 10px;
}

.meta-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--bg-pill);
  border: 1px solid var(--border-glow);
  font-size: 0.84rem;
  color: var(--text-secondary);
}

.meta-icon {
  font-size: 1.15rem;
  flex-shrink: 0;
  padding-top: 2px;
}

.meta-item strong {
  color: var(--text-primary);
}

/* ==========================================================================
   Quantified Impact Stats
   ========================================================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 28px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-md);
  padding: 20px 16px;
  text-align: center;
  transition: var(--transition-smooth);
}

.stat-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-cyan);
  box-shadow: var(--shadow-neon);
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 1.95rem;
  font-weight: 900;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.15;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-weight: 600;
}

/* ==========================================================================
   Infinite Marquee
   ========================================================================== */
.marquee-wrapper {
  overflow: hidden;
  padding: 16px 0;
  margin: 32px 0 10px;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
  mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}

.marquee-track {
  display: flex;
  gap: 20px;
  width: max-content;
  animation: marquee-scroll 32s linear infinite;
}

.marquee-track:hover {
  animation-play-state: paused;
}

@keyframes marquee-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.tech-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  font-weight: 700;
  font-size: 0.84rem;
  color: var(--text-primary);
  white-space: nowrap;
}

.tech-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-cyan);
}

/* ==========================================================================
   Section Headers & Common Buttons
   ========================================================================== */
.section {
  padding: 72px 0;
}

.section-header {
  margin-bottom: 40px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 16px;
}

.section-eyebrow {
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-cyan);
  margin-bottom: 6px;
  display: block;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 3.2vw, 2.45rem);
  font-weight: 900;
  letter-spacing: -0.02em;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition-smooth);
}

.btn-primary {
  background: var(--gradient-main);
  color: #fff;
  box-shadow: var(--shadow-neon);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px -8px rgba(6, 182, 212, 0.55);
}

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

.btn-secondary:hover {
  border-color: var(--accent-cyan);
  background: var(--bg-pill);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border-glow);
}

.btn-outline:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  background: var(--bg-pill);
  transform: translateY(-2px);
}

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

/* ==========================================================================
   Flagship Banner & Projects
   ========================================================================== */
.flagship-banner {
  background: var(--gradient-subtle);
  border: 1.5px solid var(--accent-cyan);
  border-radius: var(--radius-lg);
  padding: 34px;
  margin-bottom: 32px;
  box-shadow: var(--shadow-neon);
  transition: var(--transition-smooth);
}

.featured-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.badge {
  font-size: 0.76rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--radius-full);
}

.badge-accent {
  background: rgba(34, 211, 238, 0.16);
  color: var(--accent-cyan);
  border: 1px solid rgba(34, 211, 238, 0.4);
}

.badge-live {
  background: rgba(16, 185, 129, 0.16);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.badge-tech {
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

.flagship-title {
  font-family: var(--font-heading);
  font-size: 1.55rem;
  font-weight: 900;
  margin-bottom: 10px;
}

.flagship-desc {
  color: var(--text-secondary);
  font-size: 0.96rem;
  line-height: 1.65;
  margin-bottom: 22px;
}

.featured-highlights {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 24px;
  background: var(--bg-card);
  padding: 16px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-glow);
}

.highlight-item {
  text-align: center;
}

.highlight-num {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--accent-cyan);
}

.highlight-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
}

.flagship-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Projects Filter & Grid */
.filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 8px 15px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-glow);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.84rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.filter-btn.active, .filter-btn:hover {
  background: var(--gradient-main);
  color: #fff;
  border-color: transparent;
  box-shadow: var(--shadow-neon);
}

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

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition-smooth);
}

.project-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-hover);
  box-shadow: 0 12px 28px -6px rgba(0, 0, 0, 0.4);
}

.project-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.project-tech-meta {
  font-size: 0.76rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  letter-spacing: 0.02em;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
}

.project-badge {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--bg-pill);
  color: var(--accent-cyan);
  border: 1px solid var(--border-glow);
}

.project-title {
  font-family: var(--font-heading);
  font-size: 1.18rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.project-title a:hover {
  color: var(--accent-cyan);
}

.project-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.55;
  margin-bottom: 16px;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.tag {
  font-size: 0.74rem;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 7px;
  background: var(--bg-pill);
  color: var(--accent-cyan);
}

.project-links {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.84rem;
}

.project-links a {
  color: var(--accent-cyan);
  font-weight: 700;
}

/* ==========================================================================
   Certifications & Qualifications Section
   ========================================================================== */
.primary-creds-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 22px;
  margin-bottom: 24px;
}

.cred-featured {
  background: var(--bg-card);
  border: 1.5px solid var(--accent-cyan);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow-neon);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition-smooth);
}

.cred-featured:hover {
  transform: translateY(-4px);
  border-color: var(--accent-cyan);
}

.cred-ribbon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 11px;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.16);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.35);
  margin-bottom: 12px;
  align-self: flex-start;
}

.cred-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.cred-issuer {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent-cyan);
  margin-bottom: 12px;
}

.cred-details {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 14px;
}

.cred-id {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-muted);
  background: var(--bg-secondary);
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--border-glow);
  word-break: break-all;
}

/* ==========================================================================
   Experience & Education Timeline
   ========================================================================== */
.timeline-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.timeline-col h3 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 20px;
  color: var(--accent-cyan);
}

.timeline {
  position: relative;
  padding-left: 24px;
  border-left: 2px solid var(--border-glow);
  display: grid;
  gap: 22px;
}

.timeline-item {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  padding: 22px;
  transition: var(--transition-smooth);
}

.timeline-item:hover {
  border-color: var(--accent-cyan);
  box-shadow: var(--shadow-neon);
  transform: translateX(4px);
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -31px;
  top: 26px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent-cyan);
  border: 3px solid var(--bg-primary);
}

.timeline-date {
  display: inline-block;
  padding: 4px 11px;
  border-radius: var(--radius-full);
  background: var(--bg-pill);
  color: var(--accent-cyan);
  font-size: 0.76rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.timeline-role {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.timeline-org {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.timeline-list {
  padding-left: 18px;
  color: var(--text-secondary);
  font-size: 0.88rem;
  display: grid;
  gap: 6px;
}

/* ==========================================================================
   Evidence-Based Competency Matrix
   ========================================================================== */
.skills-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 22px;
}

.skill-group {
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.skill-group h3 {
  font-family: var(--font-heading);
  font-size: 1.12rem;
  font-weight: 800;
  margin-bottom: 16px;
  color: var(--accent-cyan);
}

.competency-list {
  display: grid;
  gap: 12px;
}

.competency-item {
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-glow);
}

.competency-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.competency-tier {
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--bg-pill);
  color: var(--accent-cyan);
  font-weight: 700;
}

.competency-proof {
  font-size: 0.81rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

/* ==========================================================================
   Academic & Research Section
   ========================================================================== */
.academic-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  padding: 32px;
}

.academic-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border-subtle);
}

.academic-inst {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
}

.academic-parent {
  font-size: 0.92rem;
  color: var(--accent-cyan);
  font-weight: 600;
}

.academic-degree {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.academic-details {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.academic-point {
  color: var(--text-secondary);
  font-size: 0.94rem;
  line-height: 1.6;
}

.research-id-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.research-id-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: var(--bg-pill);
  border: 1px solid var(--border-glow);
  color: var(--accent-cyan);
  font-size: 0.82rem;
  font-weight: 600;
}

.neutral-pill {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border-color: var(--border-subtle);
}

/* ==========================================================================
   Contact Section
   ========================================================================== */
.contact-box {
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  padding: 42px;
  text-align: center;
  box-shadow: var(--shadow-card);
}

.contact-heading {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 10px;
}

.contact-subtext {
  color: var(--text-secondary);
  font-size: 1rem;
  max-width: 580px;
  margin: 0 auto 28px;
}

.contact-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 26px;
}

.contact-direct {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-secondary);
  padding: 8px 18px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-glow);
}

.contact-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.copy-email-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 600;
}

.copy-hint {
  font-size: 0.72rem;
  background: var(--bg-pill);
  color: var(--accent-cyan);
  padding: 2px 8px;
  border-radius: 4px;
  transition: var(--transition-smooth);
}

/* ==========================================================================
   Scroll Reveal & Footer
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1), transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.footer {
  border-top: 1px solid var(--border-glow);
  padding: 34px 0;
  color: var(--text-secondary);
  font-size: 0.86rem;
  text-align: center;
  position: relative;
  z-index: 2;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-links {
  display: flex;
  gap: 18px;
}

.footer-links a:hover {
  color: var(--accent-cyan);
}

/* ==========================================================================
   Responsive Breakpoints & Multi-Screen Optimization
   ========================================================================== */
@media (max-width: 920px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .status-pill, .typewriter-row, .credentials-bar, .hero-cta {
    justify-content: center;
  }
  
  .timeline-grid {
    grid-template-columns: 1fr;
  }
  
  .nav-links, .nav-connect-btn {
    display: none;
  }
  
  .mobile-menu-btn {
    display: flex;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
}

@media (max-width: 768px) {
  /* 1. Mobile Header: Solid native app header pinned to top, eliminating peek-through slits */
  .navbar {
    top: 0;
    left: 0;
    transform: none;
    width: 100%;
    border-radius: 0;
    border-top: none;
    border-left: none;
    border-right: none;
    border-bottom: 1px solid var(--border-glow);
    padding: 12px 18px;
    background: rgba(6, 9, 19, 0.94);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
  }

  [data-theme="light"] .navbar {
    background: rgba(248, 250, 252, 0.96);
  }

  .container {
    padding: 0 16px;
  }

  .section {
    padding: 54px 0;
  }

  .hero-section {
    padding: 95px 0 46px;
    min-height: auto;
  }

  /* 2. Flagship Banner & High-Density Highlights */
  .flagship-banner {
    padding: 22px 16px;
    border-radius: var(--radius-md);
  }

  .featured-highlights {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 14px;
  }

  /* 3. Section Title mobile sizing */
  .section-title {
    font-size: clamp(1.6rem, 5.5vw, 2.1rem);
    line-height: 1.2;
  }

  /* 4. Marquee Mobile Mask */
  .marquee-wrapper {
    margin: 20px 0 32px;
    mask-image: linear-gradient(to right, transparent 0%, black 12%, black 88%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 12%, black 88%, transparent 100%);
  }
}

@media (max-width: 540px) {
  .pill-text-desktop {
    display: none;
  }
  .pill-text-mobile {
    display: inline;
  }
  .credentials-bar {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
    width: 100% !important;
    max-width: 380px !important;
    margin: 0 auto 24px !important;
  }
  .credential-pill {
    justify-content: center !important;
    padding: 9px 10px !important;
    font-size: 0.8rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .hero-cta {
    flex-direction: column !important;
    width: 100% !important;
    max-width: 380px !important;
    margin: 0 auto !important;
    gap: 10px !important;
  }
  .hero-cta .btn {
    width: 100% !important;
    justify-content: center !important;
  }
  .flagship-actions {
    flex-direction: column !important;
    width: 100% !important;
    gap: 10px !important;
  }
  .flagship-actions .btn {
    width: 100% !important;
    justify-content: center !important;
  }
  /* 5. 2x2 Compact Stats Grid on Phones (Replaces the awkward 1-column stack) */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 18px;
  }

  .stat-card {
    padding: 14px 10px;
  }

  .stat-number {
    font-size: 1.4rem;
  }

  .stat-label {
    font-size: 0.74rem;
    line-height: 1.35;
  }

  /* 6. Contact Box & Direct Email Button on Mobile (Zero horizontal overflow) */
  .contact-box {
    padding: 26px 14px;
    border-radius: var(--radius-md);
  }

  .contact-heading {
    font-size: 1.55rem;
  }

  .contact-subtext {
    font-size: 0.92rem;
    margin-bottom: 20px;
  }

  .contact-links {
    flex-direction: column;
    width: 100%;
    gap: 10px;
  }

  .contact-links .btn {
    width: 100%;
    padding: 12px 18px;
    font-size: 0.9rem;
    justify-content: center;
  }

  .contact-direct {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    border-radius: var(--radius-md);
    padding: 12px 10px;
    gap: 8px;
    background: var(--bg-card);
  }

  .contact-label {
    font-size: 0.8rem;
    color: var(--text-muted);
  }

  .copy-email-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
    font-size: 0.82rem;
  }

  #emailText {
    word-break: break-all;
  }

  .copy-hint {
    font-size: 0.72rem;
    padding: 3px 8px;
  }

  /* 7. Footer Mobile Alignment */
  .footer-content {
    flex-direction: column;
    gap: 14px;
    text-align: center;
  }

  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
  }
}

@media (max-width: 380px) {
  /* Extra compact screens (iPhone SE, small Androids) */
  .brand-name {
    font-size: 0.92rem;
  }
  
  .hero-title {
    font-size: 2rem;
  }

  .stat-number {
    font-size: 1.25rem;
  }
}


/* Responsive Credentials Bar */
.pill-text-desktop {
  display: inline;
}
.pill-text-mobile {
  display: none;
}
.credential-pill {
  white-space: nowrap;
}
