/* ==========================================================================
   DATA SCIENTIST PORTFOLIO - ENTERPRISE ANALYTICS & ML STYLESHEET
   Engineered for AINXQ Marketplace. Inspired by Stripe, Tableau, Databricks,
   Uber Data Science, and Netflix Tech Blog.
   ========================================================================== */

/* --- Custom Properties & Theme Variables --- */
:root {
  /* Color Palette */
  --color-primary: #2563EB;
  --color-primary-dark: #1D4ED8;
  --color-primary-light: #3B82F6;
  --color-secondary: #0F172A;
  --color-accent: #06B6D4;
  --color-accent-subtle: #0891B2;
  --color-success: #10B981;
  --color-warning: #F59E0B;
  --color-danger: #EF4444;
  --color-purple: #8B5CF6;

  /* Neutrals (Light Mode) */
  --bg-body: #FFFFFF;
  --bg-surface: #F8FAFC;
  --bg-surface-elevated: #FFFFFF;
  --bg-surface-card: #FFFFFF;
  --bg-muted: #F1F5F9;
  --bg-highlight: #EFF6FF;
  
  --border-light: #E2E8F0;
  --border-subtle: #F1F5F9;
  --border-focus: #93C5FD;
  
  --text-main: #0F172A;
  --text-muted: #475569;
  --text-subtle: #64748B;
  --text-inverse: #FFFFFF;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.07), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.1), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
  --shadow-glow: 0 0 25px rgba(37, 99, 235, 0.15);

  /* Typography */
  --font-heading: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', Menlo, Monaco, Consolas, monospace;

  /* Layout & Spacing */
  --container-max: 1240px;
  --container-wide: 1360px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
  --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Dark Theme */
[data-theme="dark"] {
  --bg-body: #0B0F19;
  --bg-surface: #0F172A;
  --bg-surface-elevated: #162036;
  --bg-surface-card: #131C31;
  --bg-muted: #1E293B;
  --bg-highlight: #172554;

  --border-light: #1E293B;
  --border-subtle: #172033;
  --border-focus: #3B82F6;

  --text-main: #F8FAFC;
  --text-muted: #94A3B8;
  --text-subtle: #64748B;
  --text-inverse: #0F172A;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -4px rgba(0, 0, 0, 0.4);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 30px rgba(37, 99, 235, 0.3);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--text-main);
  background-color: var(--bg-body);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

/* Tabular figures for numbers, metrics, and KPI readouts */
.tabular-nums, .kpi-num, .metric-value, .stat-value, .badge-num {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

/* Typographic Hierarchy */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-main);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(1.85rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.6rem); }
h4 { font-size: 1.15rem; font-weight: 600; }

p {
  color: var(--text-muted);
  font-size: 1rem;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-primary-dark);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  outline: none;
}

/* Focus styles */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

/* --- Layout Utility Classes --- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.container-wide {
  width: 100%;
  max-width: var(--container-wide);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

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

.section-alt {
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.section-header {
  margin-bottom: 3.5rem;
}

.section-header.text-center {
  text-align: center;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.section-kicker {
  display: inline-block;
  font-size: 0.825rem;
  font-family: var(--font-mono);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-primary);
  margin-bottom: 0.75rem;
}

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

.section-subtitle {
  font-size: 1.125rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Grid Utilities */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.75rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
}

/* Unboxed Metadata Styling (No static pills) */
.meta-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--text-subtle);
  font-family: var(--font-mono);
}

.meta-dot {
  color: var(--border-light);
  font-weight: bold;
}

/* --- Buttons & Functional Controls --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  padding: 0.75rem 1.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--color-primary);
  color: #FFFFFF;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

.btn-primary:hover {
  background-color: var(--color-primary-dark);
  color: #FFFFFF;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-secondary {
  background-color: var(--bg-surface-elevated);
  color: var(--text-main);
  border: 1px solid var(--border-light);
}

.btn-secondary:hover {
  background-color: var(--bg-muted);
  color: var(--text-main);
  border-color: var(--text-subtle);
  transform: translateY(-1px);
}

.btn-ghost {
  background-color: transparent;
  color: var(--text-main);
}

.btn-ghost:hover {
  background-color: var(--bg-muted);
}

.btn-sm {
  padding: 0.45rem 0.9rem;
  font-size: 0.8125rem;
}

.btn-lg {
  padding: 0.9rem 1.85rem;
  font-size: 1.05rem;
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-light);
  color: var(--text-main);
}

.btn-icon:hover {
  background-color: var(--bg-muted);
  border-color: var(--text-subtle);
}

/* --- Visual Scroll Progress Indicator Bar --- */
.scroll-progress-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3.5px;
  background: rgba(15, 23, 42, 0.06);
  z-index: 10000;
  pointer-events: none;
}

[data-theme="dark"] .scroll-progress-container {
  background: rgba(255, 255, 255, 0.06);
}

.scroll-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #2563EB 0%, #06B6D4 60%, #10B981 100%);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.8), 0 0 4px rgba(37, 99, 235, 0.6);
  transition: width 0.06s linear;
}

/* Modal Reading Progress Bar */
.modal-progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2.5px;
  width: 0%;
  background: linear-gradient(90deg, #2563EB, #06B6D4);
  box-shadow: 0 0 8px rgba(6, 182, 212, 0.6);
  transition: width 0.06s linear;
}

/* --- Navigation Bar --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

[data-theme="dark"] .site-header {
  background-color: rgba(11, 15, 25, 0.85);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  position: relative;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-main);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.brand-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
}

.brand-meta {
  display: block;
  font-size: 0.7rem;
  font-family: var(--font-mono);
  color: var(--text-subtle);
  font-weight: 400;
}

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

.nav-link {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  position: relative;
  padding: 0.25rem 0;
  transition: color var(--transition-fast);
}

.nav-link:hover, .nav-link.active {
  color: var(--color-primary);
}

/* --- Executive Mega Menu System --- */
.nav-item-mega {
  position: static;
}

.mega-trigger-btn {
  background: none;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 0.4rem 0.65rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.mega-trigger-btn:hover,
.nav-item-mega:hover .mega-trigger-btn,
.nav-item-mega.mega-active .mega-trigger-btn {
  color: var(--color-primary);
  background-color: var(--bg-muted);
}

.mega-chevron {
  transition: transform var(--transition-fast);
  color: var(--text-subtle);
}

.nav-item-mega:hover .mega-chevron,
.nav-item-mega.mega-active .mega-chevron {
  transform: rotate(180deg);
  color: var(--color-primary);
}

.mega-dropdown-panel {
  position: absolute;
  top: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  width: min(1080px, calc(100% - 2rem));
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 40px -15px rgba(15, 23, 42, 0.2), 0 0 1px 1px rgba(0, 0, 0, 0.04);
  padding: 2rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1050;
}

[data-theme="dark"] .mega-dropdown-panel {
  background-color: rgba(15, 23, 42, 0.98);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 24px 50px -12px rgba(0, 0, 0, 0.7), 0 0 1px 1px rgba(255, 255, 255, 0.08);
}

/* Invisible bridge so mouse hover doesn't break */
.mega-dropdown-panel::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 0;
  width: 100%;
  height: 12px;
  background: transparent;
}

.nav-item-mega:hover .mega-dropdown-panel,
.nav-item-mega:focus-within .mega-dropdown-panel,
.nav-item-mega.mega-active .mega-dropdown-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.mega-dropdown-grid {
  display: grid;
  grid-template-columns: 1.1fr 1.1fr 300px;
  gap: 2rem;
}

.mega-col {
  display: flex;
  flex-direction: column;
}

.mega-col-header {
  margin-bottom: 0.85rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-light);
}

.mega-col-kicker {
  font-family: var(--font-mono);
  font-size: 0.675rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--color-primary);
  display: block;
}

.mega-col-title {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.mega-link-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.mega-link-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  color: inherit;
  text-decoration: none;
}

.mega-link-item:hover {
  background-color: var(--bg-muted);
}

.mega-item-icon {
  font-size: 1.15rem;
  line-height: 1.2;
  flex-shrink: 0;
}

.mega-item-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.3;
  margin-bottom: 0.15rem;
  transition: color var(--transition-fast);
}

.mega-link-item:hover .mega-item-title {
  color: var(--color-primary);
}

.mega-item-desc {
  font-size: 0.775rem;
  color: var(--text-subtle);
  line-height: 1.35;
}

.mega-featured-col {
  display: flex;
}

.mega-featured-card {
  background: linear-gradient(145deg, var(--bg-muted) 0%, var(--bg-surface-elevated) 100%);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  width: 100%;
  position: relative;
  overflow: hidden;
}

[data-theme="dark"] .mega-featured-card {
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.6) 0%, rgba(15, 23, 42, 0.8) 100%);
}

.mega-card-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.675rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-primary);
  margin-bottom: 0.75rem;
}

.mega-card-icon {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.mega-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.4rem;
  line-height: 1.3;
}

.mega-card-desc {
  font-size: 0.775rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 1rem;
  flex-grow: 1;
}

.mega-card-metric {
  display: flex;
  flex-direction: column;
  padding: 0.6rem 0.75rem;
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
}

.mega-metric-num {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1.1;
}

.mega-metric-lbl {
  font-family: var(--font-mono);
  font-size: 0.675rem;
  color: var(--text-subtle);
  text-transform: uppercase;
}

.mega-card-link {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-primary);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: gap var(--transition-fast);
}

.mega-card-link:hover {
  gap: 0.5rem;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.mobile-menu-toggle {
  display: none;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  transition: all var(--transition-fast);
}

.mobile-menu-toggle:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* --- Hero Section & Data Stream Canvas --- */
.hero-section {
  position: relative;
  padding: 6rem 0 5rem 0;
  overflow: hidden;
}

.hero-canvas-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.35;
  pointer-events: none;
}

[data-theme="dark"] .hero-canvas-bg {
  opacity: 0.25;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3.5rem;
  align-items: center;
}

.hero-kicker-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.pulse-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--color-success);
  font-weight: 600;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--color-success);
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.hero-title {
  margin-bottom: 1.25rem;
  color: var(--text-main);
  line-height: 1.1;
}

.hero-title .highlight {
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  line-height: 1.6;
}

.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

/* Hero Quick Stats Row */
.hero-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-light);
}

.hero-stat-card {
  display: flex;
  flex-direction: column;
}

.hero-stat-number {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

.hero-stat-label {
  font-size: 0.8125rem;
  color: var(--text-subtle);
  line-height: 1.4;
}

/* Hero Portrait & Interactive Preview Card */
.hero-visual-col {
  position: relative;
}

.hero-card-container {
  position: relative;
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-xl);
}

.hero-scientist-profile {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-light);
}

.scientist-avatar {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-md);
  object-fit: cover;
  border: 2px solid var(--color-primary);
  flex-shrink: 0;
}

.scientist-meta-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
}

.scientist-meta-role {
  font-size: 0.8125rem;
  color: var(--color-primary);
  font-weight: 600;
}

.scientist-meta-org {
  font-size: 0.775rem;
  color: var(--text-subtle);
}

/* Hero Live Stream Chart Widget */
.hero-live-chart-box {
  background-color: var(--bg-muted);
  border-radius: var(--radius-sm);
  padding: 1rem;
  border: 1px solid var(--border-light);
}

.live-chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.live-chart-title {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-subtle);
}

.live-badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--color-success);
  font-weight: 600;
}

.hero-sparkline-canvas {
  width: 100%;
  height: 120px;
  display: block;
}

.hero-metrics-pill-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-top: 1rem;
}

.hero-metric-mini {
  background-color: var(--bg-surface-elevated);
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
}

.mini-metric-label {
  font-size: 0.7rem;
  color: var(--text-subtle);
  font-family: var(--font-mono);
}

.mini-metric-value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
}

/* Floating Tech Chips */
.floating-chip {
  position: absolute;
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.85rem;
  box-shadow: var(--shadow-lg);
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.floating-chip-1 {
  top: -15px;
  right: -15px;
  animation: float 4s ease-in-out infinite;
}

.floating-chip-2 {
  bottom: -15px;
  left: -15px;
  animation: float 4s ease-in-out infinite 2s;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* --- Section 01: About Me & Philosophy --- */
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3.5rem;
  align-items: start;
}

.about-text p {
  margin-bottom: 1.25rem;
  font-size: 1.05rem;
}

.philosophy-card {
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-light);
  border-left: 4px solid var(--color-primary);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin: 1.75rem 0;
}

.philosophy-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.philosophy-quote {
  font-style: italic;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.competencies-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
}

.competency-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}

.competency-icon {
  color: var(--color-primary);
  flex-shrink: 0;
  margin-top: 0.2rem;
}

.competency-item span {
  font-size: 0.9rem;
  color: var(--text-main);
  font-weight: 500;
}

.about-metrics-panel {
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
}

.spec-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.spec-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-light);
}

.spec-label {
  font-size: 0.85rem;
  color: var(--text-subtle);
  font-family: var(--font-mono);
}

.spec-val {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
}

/* --- Section 02: Education & Research Timeline --- */
.timeline {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 20px;
  width: 2px;
  background-color: var(--border-light);
}

.timeline-item {
  position: relative;
  padding-left: 55px;
  margin-bottom: 2.5rem;
}

.timeline-dot {
  position: absolute;
  left: 12px;
  top: 5px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background-color: var(--bg-surface-elevated);
  border: 3px solid var(--color-primary);
  box-shadow: 0 0 0 4px var(--bg-surface);
}

.timeline-card {
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.timeline-card:hover {
  transform: translateY(-2px);
  border-color: var(--color-primary);
}

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

.timeline-degree {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
}

.timeline-institution {
  color: var(--color-primary);
  font-size: 0.9rem;
  font-weight: 600;
}

.timeline-period {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-subtle);
}

.timeline-body p {
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.timeline-highlights {
  list-style: none;
  margin-top: 0.5rem;
}

.timeline-highlights li {
  font-size: 0.85rem;
  color: var(--text-muted);
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 0.25rem;
}

.timeline-highlights li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--color-primary);
}

/* --- Section 03 & 04: Core Expertise & Technical Skills --- */
.expertise-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.expertise-card {
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
  display: flex;
  flex-direction: column;
}

.expertise-card:hover {
  transform: translateY(-3px);
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
}

.expertise-icon-box {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-highlight);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  font-size: 1.25rem;
}

.expertise-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.expertise-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 1rem;
  flex-grow: 1;
}

.expertise-techs {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-subtle);
  border-top: 1px solid var(--border-light);
  padding-top: 0.75rem;
}

/* Tech Skills Matrix */
.skills-matrix {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.5rem;
}

.skill-category-card {
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

.skill-cat-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--color-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.skill-item-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

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

.skill-name {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-main);
}

.skill-level-bar {
  width: 70px;
  height: 5px;
  background-color: var(--border-light);
  border-radius: 3px;
  overflow: hidden;
}

.skill-fill {
  height: 100%;
  background-color: var(--color-primary);
  border-radius: 3px;
}

/* --- Section 05: Featured Projects (Case Studies) --- */
.project-filter-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
  background-color: var(--bg-surface);
  padding: 0.4rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  max-width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

.filter-btn {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.filter-btn:hover {
  color: var(--text-main);
}

.filter-btn.active {
  background-color: var(--bg-surface-elevated);
  color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
}

.project-card {
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-smooth);
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: var(--color-primary);
  box-shadow: var(--shadow-xl);
}

.project-preview {
  position: relative;
  height: 220px;
  background-color: var(--bg-muted);
  overflow: hidden;
  border-bottom: 1px solid var(--border-light);
}

.project-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-card:hover .project-img {
  transform: scale(1.05);
}

.project-overlay-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(4px);
  color: #FFFFFF;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.725rem;
}

.project-body {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.project-meta-kicker {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--color-primary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.project-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text-main);
  line-height: 1.3;
}

.project-excerpt {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  line-height: 1.5;
}

/* Impact Metrics Grid Inside Project Card */
.project-impact-box {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.impact-metric-col {
  display: flex;
  flex-direction: column;
}

.impact-val {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-success);
}

.impact-label {
  font-size: 0.75rem;
  color: var(--text-subtle);
}

.project-tech-stack {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-subtle);
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* --- Case Study Modal --- */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  overflow-y: auto;
}

.modal-backdrop.open {
  display: flex;
}

.modal-container {
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  position: relative;
  animation: modalIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.96) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  padding: 1.75rem 2rem;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  position: sticky;
  top: 0;
  background-color: var(--bg-surface-elevated);
  z-index: 2;
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-subtle);
  cursor: pointer;
  line-height: 1;
}

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

.modal-body {
  padding: 2rem;
}

.modal-section {
  margin-bottom: 2rem;
}

.modal-section-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-metric-banner {
  background: linear-gradient(135deg, var(--bg-highlight), var(--bg-surface));
  border: 1px solid var(--border-focus);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  text-align: center;
  margin-bottom: 1.5rem;
}

/* --- Section 06: Interactive Dashboard Showcase --- */
.dashboard-showcase-box {
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.dashboard-nav-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-light);
  flex-wrap: wrap;
  gap: 1rem;
}

.dashboard-tab-group {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.dash-tab-btn {
  padding: 0.45rem 0.85rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: all var(--transition-fast);
}

.dash-tab-btn:hover {
  color: var(--text-main);
  background-color: var(--bg-muted);
}

.dash-tab-btn.active {
  color: var(--color-primary);
  background-color: var(--bg-surface-elevated);
  border-color: var(--border-light);
  box-shadow: var(--shadow-sm);
}

.dash-controls-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.time-range-group {
  display: flex;
  background-color: var(--bg-muted);
  border-radius: var(--radius-sm);
  padding: 2px;
}

.time-btn {
  padding: 0.25rem 0.6rem;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  background: transparent;
  border-radius: 4px;
}

.time-btn.active {
  background-color: var(--bg-surface-elevated);
  color: var(--color-primary);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

/* Dashboard Content Grid */
.dashboard-viewport {
  padding: 1.75rem;
}

.dash-kpis-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.dash-kpi-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.dash-kpi-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.dash-kpi-title {
  font-size: 0.775rem;
  color: var(--text-subtle);
  font-family: var(--font-mono);
  text-transform: uppercase;
}

.dash-kpi-delta {
  font-size: 0.75rem;
  font-weight: 600;
}

.delta-up { color: var(--color-success); }
.delta-down { color: var(--color-danger); }

.dash-kpi-value {
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

.dash-charts-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
}

.dash-chart-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.dash-chart-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chart-canvas-wrap {
  width: 100%;
  height: 280px;
  position: relative;
}

/* --- Section 07: Data Storytelling Stepper --- */
.story-stepper-wrap {
  position: relative;
}

.story-nav-steps {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.5rem;
  margin-bottom: 2.5rem;
}

.step-nav-btn {
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.5rem;
  text-align: center;
  transition: all var(--transition-fast);
}

.step-nav-btn:hover {
  border-color: var(--color-primary);
}

.step-nav-btn.active {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: #FFFFFF;
}

.step-number {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  opacity: 0.75;
}

.step-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.story-stage-card {
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3rem;
  align-items: center;
  box-shadow: var(--shadow-md);
}

.story-stage-visual {
  background-color: var(--bg-muted);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

/* --- Section 08: Machine Learning Showcase --- */
.ml-showcase-container {
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
}

.ml-model-selector-bar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 2rem;
}

.ml-tab-btn {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.ml-tab-btn.active {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: #FFFFFF;
}

.ml-interactive-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
}

/* Confusion Matrix UI */
.confusion-matrix-box {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

.cm-grid {
  display: grid;
  grid-template-columns: 80px 1fr 1fr;
  grid-template-rows: 40px 1fr 1fr;
  gap: 0.5rem;
  margin: 1.25rem 0;
  text-align: center;
}

.cm-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cm-cell {
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.cm-cell-tp {
  background-color: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.3);
}

.cm-cell-tn {
  background-color: rgba(37, 99, 235, 0.12);
  border-color: rgba(37, 99, 235, 0.3);
}

.cm-cell-fp, .cm-cell-fn {
  background-color: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.2);
}

.cm-val {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-main);
}

.cm-sub {
  font-size: 0.7rem;
  color: var(--text-subtle);
}

/* Threshold slider */
.threshold-slider-group {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-light);
}

.slider-label-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  font-family: var(--font-mono);
  margin-bottom: 0.5rem;
}

.ml-slider {
  width: 100%;
  height: 6px;
  background: var(--border-light);
  border-radius: 3px;
  outline: none;
  -webkit-appearance: none;
}

.ml-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--color-primary);
  cursor: pointer;
  box-shadow: 0 0 6px rgba(37, 99, 235, 0.5);
}

/* ML Performance Metric Cards */
.ml-scores-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-top: 1rem;
}

.ml-score-col {
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  text-align: center;
}

.ml-score-val {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
}

.ml-score-name {
  font-size: 0.7rem;
  color: var(--text-subtle);
  font-family: var(--font-mono);
}

/* --- Section 09: Research & Publications --- */
.publications-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.75rem;
}

.publication-card {
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast);
}

.publication-card:hover {
  transform: translateY(-2px);
  border-color: var(--color-primary);
}

.pub-venue {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--color-primary);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.pub-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.pub-authors {
  font-size: 0.85rem;
  color: var(--text-subtle);
  margin-bottom: 0.75rem;
}

.pub-abstract {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

.pub-links {
  display: flex;
  gap: 1rem;
  font-size: 0.825rem;
  font-weight: 600;
}

/* --- Section 10 & 11: Analytics Metrics & Business Impact --- */
.impact-hero-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 3.5rem;
}

.impact-big-card {
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.impact-big-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
}

.impact-metric-headline {
  font-size: 2.75rem;
  font-weight: 800;
  font-family: var(--font-heading);
  color: var(--color-primary);
  line-height: 1.1;
  margin-bottom: 0.5rem;
}

.impact-metric-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.impact-metric-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.counters-strip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1.5rem;
  padding: 2.5rem;
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.counter-item-val {
  font-family: var(--font-heading);
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.2;
}

.counter-item-label {
  font-size: 0.775rem;
  color: var(--text-subtle);
  margin-top: 0.25rem;
  font-family: var(--font-mono);
}

/* --- Section 12: Certifications --- */
.certs-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.cert-card {
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-fast);
}

.cert-card:hover {
  transform: translateY(-2px);
  border-color: var(--color-primary);
}

.cert-issuer {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--color-primary);
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.cert-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.75rem;
  line-height: 1.3;
  flex-grow: 1;
}

.cert-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-subtle);
  border-top: 1px solid var(--border-light);
  padding-top: 0.75rem;
}

/* --- Section 13: Industry Experience --- */
.experience-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  max-width: 960px;
  margin: 0 auto;
}

.exp-item {
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
}

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

.exp-role-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
}

.exp-company {
  font-size: 1rem;
  color: var(--color-primary);
  font-weight: 600;
}

.exp-duration {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-subtle);
}

.exp-achievements {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
}

.exp-achievements li {
  font-size: 0.925rem;
  color: var(--text-muted);
  position: relative;
  padding-left: 1.5rem;
}

.exp-achievements li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--color-primary);
  font-weight: bold;
}

/* --- Section 14: Testimonials --- */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.testimonial-card {
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
}

.test-quote {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
  font-style: italic;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.test-author-box {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.test-author-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-light);
}

.test-author-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}

.test-author-title {
  font-size: 0.8rem;
  color: var(--text-subtle);
}

/* --- Section 15: Analytics Blog --- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.blog-card {
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast);
}

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

.blog-thumb {
  height: 180px;
  width: 100%;
  object-fit: cover;
}

.blog-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.blog-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.blog-summary {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.5;
  flex-grow: 1;
}

/* --- Section: LinkedIn Feed & Professional Insights Carousel --- */
.linkedin-carousel-wrapper {
  position: relative;
  width: 100%;
}

.linkedin-feed-header-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.25rem;
}

.linkedin-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.775rem;
  color: var(--text-muted);
}

.linkedin-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #0A66C2;
  box-shadow: 0 0 6px rgba(10, 102, 194, 0.8);
}

.linkedin-filter-group {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.linkedin-filter-btn {
  padding: 0.4rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 600;
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.linkedin-filter-btn:hover {
  color: var(--text-main);
  border-color: #0A66C2;
}

.linkedin-filter-btn.active {
  background-color: #0A66C2;
  border-color: #0A66C2;
  color: #FFFFFF;
}

.linkedin-carousel-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.carousel-nav-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-light);
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  transition: all var(--transition-fast);
}

.carousel-nav-btn:hover:not(:disabled) {
  border-color: #0A66C2;
  color: #0A66C2;
  background-color: var(--bg-muted);
}

.carousel-nav-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Horizontally Scrollable Carousel Track */
.linkedin-carousel-track-container {
  display: flex;
  gap: 1.75rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 0.5rem 0.25rem 1.5rem 0.25rem;
  cursor: grab;
  user-select: none;
  scrollbar-width: thin;
  scrollbar-color: var(--border-light) transparent;
}

.linkedin-carousel-track-container:active {
  cursor: grabbing;
}

.linkedin-carousel-track-container::-webkit-scrollbar {
  height: 6px;
}

.linkedin-carousel-track-container::-webkit-scrollbar-track {
  background: transparent;
}

.linkedin-carousel-track-container::-webkit-scrollbar-thumb {
  background-color: var(--border-light);
  border-radius: 3px;
}

.linkedin-card {
  flex: 0 0 calc(50% - 0.875rem);
  min-width: 340px;
  max-width: 540px;
  scroll-snap-align: start;
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: all var(--transition-fast);
  position: relative;
}

@media (max-width: 860px) {
  .linkedin-card {
    flex: 0 0 calc(100% - 1rem);
    min-width: 280px;
  }
}

.linkedin-card:hover {
  border-color: #0A66C2;
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.linkedin-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-light);
}

.linkedin-author-info {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.linkedin-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid #0A66C2;
}

.linkedin-author-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

.linkedin-author-headline {
  font-size: 0.775rem;
  color: var(--text-subtle);
  line-height: 1.3;
}

.linkedin-post-time {
  font-size: 0.725rem;
  font-family: var(--font-mono);
  color: var(--text-subtle);
}

.linkedin-icon-badge {
  color: #0A66C2;
  flex-shrink: 0;
}

.linkedin-post-content {
  font-size: 0.925rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.linkedin-post-content strong {
  color: var(--text-main);
}

.linkedin-post-tags {
  font-family: var(--font-mono);
  font-size: 0.775rem;
  color: #0A66C2;
  margin-bottom: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.linkedin-engagement-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid var(--border-light);
  font-size: 0.8rem;
  color: var(--text-subtle);
  flex-wrap: wrap;
  gap: 0.75rem;
}

.linkedin-engagement-stats {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-family: var(--font-mono);
}

.btn-read-linkedin {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background-color: #0A66C2;
  color: #FFFFFF !important;
  font-weight: 600;
  font-size: 0.825rem;
  padding: 0.5rem 0.95rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  text-decoration: none;
}

.btn-read-linkedin:hover {
  background-color: #084d91;
  box-shadow: 0 4px 12px rgba(10, 102, 194, 0.35);
  transform: translateY(-1px);
}

.carousel-dots-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.carousel-dot-btn {
  width: 8px;
  height: 8px;
  border-radius: 4px;
  background-color: var(--border-light);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: all var(--transition-fast);
}

.carousel-dot-btn.active {
  width: 24px;
  background-color: #0A66C2;
}

.carousel-swipe-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-subtle);
  margin-top: 0.75rem;
}

.btn-sync-feed {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-light);
  color: var(--text-main);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-sync-feed:hover {
  border-color: #0A66C2;
  color: #0A66C2;
}

.btn-sync-feed.syncing .sync-icon {
  animation: spin 1s linear infinite;
}

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

/* --- Section 16: Contact --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3.5rem;
}

.contact-info-col {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.contact-channel-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.contact-icon-box {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-detail-label {
  font-size: 0.75rem;
  color: var(--text-subtle);
  font-family: var(--font-mono);
  text-transform: uppercase;
}

.contact-detail-val {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-main);
}

.social-links-row {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.contact-form-card {
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  box-shadow: var(--shadow-md);
}

.form-group {
  margin-bottom: 1.25rem;
}

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

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 0.9375rem;
  font-family: inherit;
  color: var(--text-main);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition-fast);
}

.form-control:focus {
  border-color: var(--color-primary);
  outline: none;
  background-color: var(--bg-surface-elevated);
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

/* --- Section 17: Footer --- */
.site-footer {
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-light);
  padding: 4rem 0 2.5rem 0;
  font-size: 0.9rem;
}

.footer-top-grid {
  display: grid;
  grid-template-columns: 2fr 1.1fr 1.1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.footer-col-title {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-main);
  margin-bottom: 1.25rem;
}

.footer-links-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-links-list a {
  color: var(--text-muted);
}

.footer-links-list a:hover {
  color: var(--color-primary);
}

.footer-bottom-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-light);
  font-size: 0.8125rem;
  color: var(--text-subtle);
}

.ainxq-credit {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-muted);
}

.ainxq-credit strong {
  color: var(--color-primary);
}

/* --- Responsive Media Queries --- */
@media (max-width: 1024px) {
  .nav-links {
    display: none;
  }

  .nav-links.mobile-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 72px;
    left: 0;
    width: 100%;
    background-color: var(--bg-surface-elevated);
    border-bottom: 1px solid var(--border-light);
    padding: 1.25rem 2rem 1.75rem 2rem;
    box-shadow: var(--shadow-xl);
    max-height: calc(100vh - 72px);
    overflow-y: auto;
    z-index: 1000;
    gap: 0.25rem;
    animation: menuSlideDown 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .nav-links.mobile-open li {
    width: 100%;
  }

  .nav-links.mobile-open .nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.7rem 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    color: var(--text-main);
    border-bottom: 1px solid var(--border-light);
    transition: background-color var(--transition-fast), color var(--transition-fast), padding-left var(--transition-fast);
  }

  .nav-links.mobile-open li:last-child .nav-link {
    border-bottom: none;
  }

  .nav-links.mobile-open .nav-link:hover,
  .nav-links.mobile-open .nav-link.active {
    background-color: var(--bg-muted);
    color: var(--color-primary);
    padding-left: 1.1rem;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .nav-item-mega {
    width: 100%;
  }

  .nav-item-mega .mega-trigger-btn {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
    border-bottom: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
  }

  .nav-item-mega .mega-trigger-btn:hover {
    background-color: var(--bg-muted);
    color: var(--color-primary);
  }

  .nav-item-mega .mega-dropdown-panel {
    position: static;
    transform: none !important;
    width: 100%;
    box-shadow: none;
    border: none;
    border-left: 2px solid var(--color-primary);
    border-radius: 0;
    background: transparent;
    padding: 0.5rem 0 0.5rem 1rem;
    display: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .nav-item-mega.mobile-mega-open .mega-dropdown-panel {
    display: block;
    animation: menuSlideDown 0.2s ease-out;
  }

  .nav-item-mega.mobile-mega-open .mega-chevron {
    transform: rotate(180deg);
    color: var(--color-primary);
  }

  .nav-item-mega .mega-dropdown-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .nav-item-mega .mega-featured-col {
    display: none;
  }

  .nav-item-mega .mega-link-item {
    padding: 0.5rem;
  }

  .hero-grid { grid-template-columns: 1fr; gap: 3rem; }
  .grid-4, .skills-matrix, .certs-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-3, .testimonials-grid, .blog-grid, .impact-hero-grid, .linkedin-posts-grid { grid-template-columns: repeat(2, 1fr); }
  .counters-strip { grid-template-columns: repeat(3, 1fr); }
  .story-nav-steps { grid-template-columns: repeat(4, 1fr); }
  .story-stage-card { grid-template-columns: 1fr; }
  .dash-charts-grid { grid-template-columns: 1fr; }
  .dash-kpis-row { grid-template-columns: repeat(2, 1fr); }
  .ml-interactive-grid { grid-template-columns: 1fr; }
  .footer-top-grid { grid-template-columns: repeat(2, 1fr); }
}

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

@media (max-width: 768px) {
  .grid-2, .projects-grid, .publications-grid, .contact-grid, .about-grid, .linkedin-posts-grid { grid-template-columns: 1fr; }
  .grid-3, .testimonials-grid, .blog-grid, .impact-hero-grid { grid-template-columns: 1fr; }
  .skills-matrix, .certs-grid { grid-template-columns: 1fr; }
  .counters-strip { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
  .story-nav-steps { grid-template-columns: repeat(2, 1fr); }
  .hero-stats-row { grid-template-columns: 1fr; gap: 1rem; }
  .footer-top-grid { grid-template-columns: 1fr; }
  .dash-kpis-row { grid-template-columns: 1fr; }
}
