/* =========================================================================
   Ayush Bhavsar — Chemical Engineering & Process Optimization Portfolio
   Design System: Obsidian Slate + Deep Radiant Teal Ink,
   Fraunces serif display, Inter interface font, JetBrains Mono labels.
   ========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400..700;1,9..144,400..700&family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ---- Design Tokens (Dark theme default) ---- */
:root,
[data-theme='dark'] {
  color-scheme: dark;

  --bg: #070f14;
  --bg-elevated: #0c181f;
  --surface: #0f1e27;
  --surface-2: #142833;
  --surface-3: #1a3240;
  --divider: rgba(255, 255, 255, 0.08);
  --border: #1e3544;
  --border-strong: #2a4c61;

  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --text-faint: #64748b;
  --text-inverse: #070f14;

  --primary: #2dd4bf;
  --primary-strong: #5eead4;
  --primary-hover: #14b8a6;
  --primary-soft: rgba(45, 212, 191, 0.12);
  --primary-tint: rgba(45, 212, 191, 0.07);
  --cyan: #22d3ee;
  --cyan-soft: rgba(34, 211, 238, 0.12);
  --accent: #f59e0b;
  --accent-soft: rgba(245, 158, 11, 0.12);

  --grad-brand: linear-gradient(135deg, #14b8a6 0%, #2dd4bf 55%, #22d3ee 100%);
  --grad-brand-soft: linear-gradient(135deg, rgba(20, 184, 166, 0.15) 0%, rgba(34, 211, 238, 0.08) 100%);
  --grad-surface: linear-gradient(180deg, rgba(15, 30, 39, 0.8) 0%, rgba(12, 24, 31, 0.95) 100%);

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px -4px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 20px 40px -10px rgba(0, 0, 0, 0.7);
  --shadow-glow: 0 0 35px rgba(45, 212, 191, 0.22);
  --ring: 0 0 0 3px rgba(45, 212, 191, 0.25);

  --grid-line: rgba(45, 212, 191, 0.035);
}

/* Light Theme Tokens */
[data-theme='light'] {
  color-scheme: light;

  --bg: #f8fafc;
  --bg-elevated: #ffffff;
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --surface-3: #e2e8f0;
  --divider: rgba(15, 23, 42, 0.08);
  --border: #e2e8f0;
  --border-strong: #cbd5e1;

  --text: #0f172a;
  --text-muted: #475569;
  --text-faint: #64748b;
  --text-inverse: #ffffff;

  --primary: #0f766e;
  --primary-strong: #0b5d57;
  --primary-hover: #115e59;
  --primary-soft: rgba(15, 118, 110, 0.1);
  --primary-tint: rgba(15, 118, 110, 0.06);
  --cyan: #0891b2;
  --cyan-soft: rgba(8, 145, 178, 0.1);
  --accent: #b45309;
  --accent-soft: rgba(180, 83, 9, 0.1);

  --grad-brand: linear-gradient(135deg, #0f766e 0%, #14b8a6 55%, #0891b2 100%);
  --grad-brand-soft: linear-gradient(135deg, rgba(15, 118, 110, 0.1) 0%, rgba(8, 145, 178, 0.06) 100%);
  --grad-surface: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);

  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 8px 24px -4px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 40px -10px rgba(15, 23, 42, 0.12);
  --shadow-glow: 0 0 30px rgba(15, 118, 110, 0.15);
  --ring: 0 0 0 3px rgba(15, 118, 110, 0.2);

  --grid-line: rgba(15, 118, 110, 0.04);
}

/* Base Dimensions & Fonts */
:root {
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --r-sm: 0.375rem;
  --r-md: 0.625rem;
  --r-lg: 0.875rem;
  --r-xl: 1.25rem;
  --r-2xl: 1.75rem;
  --r-full: 9999px;

  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.25rem;
  --sp-6: 1.5rem;
  --sp-8: 2rem;
  --sp-10: 2.5rem;
  --sp-12: 3rem;
  --sp-16: 4rem;
  --sp-20: 5rem;
  --sp-24: 6rem;

  --max-w: 1240px;
  --t-fast: 0.18s ease;
  --t-med: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg);
  background-image: 
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 40px 40px;
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--t-med), color var(--t-med);
  overflow-x: hidden;
}

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

button, input, textarea, select {
  font: inherit;
  color: inherit;
  border: none;
  background: none;
}

button {
  cursor: pointer;
}

img, svg {
  display: block;
  max-width: 100%;
}

ul, ol {
  list-style: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

/* Container */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

/* =========================================================================
   Header & Navigation
   ========================================================================= */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 4.5rem;
  background: rgba(7, 15, 20, 0.78);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--divider);
  z-index: 1000;
  transition: background var(--t-fast), border-color var(--t-fast);
}

[data-theme='light'] .header {
  background: rgba(248, 250, 252, 0.85);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand__logo {
  width: 40px;
  height: 40px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  box-shadow: var(--shadow-sm);
  transition: transform var(--t-fast), border-color var(--t-fast);
}

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

.brand__text {
  display: flex;
  flex-direction: column;
}

.brand__name {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  color: var(--text);
  line-height: 1.2;
}

.brand__title {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav__link {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
  padding: 0.4rem 0;
  transition: color var(--t-fast);
}

.nav__link:hover,
.nav__link.is-active {
  color: var(--primary);
}

.nav__link.is-active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary);
  border-radius: var(--r-full);
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

/* Theme Toggle Button */
.theme-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--r-full);
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  box-shadow: var(--shadow-sm);
  transition: all var(--t-fast);
}

.theme-btn:hover {
  color: var(--text);
  border-color: var(--primary);
  transform: translateY(-1px);
}

.theme-btn svg {
  width: 19px;
  height: 19px;
}

.theme-btn .moon-icon {
  display: block;
}

.theme-btn .sun-icon {
  display: none;
}

[data-theme='light'] .theme-btn .moon-icon {
  display: none;
}

[data-theme='light'] .theme-btn .sun-icon {
  display: block;
}

/* Mobile Hamburger Toggle */
.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--border);
  align-items: center;
  justify-content: center;
  color: var(--text);
}

.menu-toggle svg {
  width: 22px;
  height: 22px;
}

/* Mobile Drawer Overlay */
.mobile-nav {
  position: fixed;
  top: 4.5rem;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(7, 15, 20, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  transform: translateY(-120%);
  opacity: 0;
  pointer-events: none;
  transition: transform var(--t-med), opacity var(--t-med);
  z-index: 999;
  border-bottom: 1px solid var(--border);
}

[data-theme='light'] .mobile-nav {
  background: rgba(248, 250, 252, 0.97);
}

.mobile-nav.is-open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.mobile-nav__link {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--divider);
}

.mobile-nav__link:hover {
  color: var(--primary);
}

/* =========================================================================
   Buttons & Badges
   ========================================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--r-full);
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  transition: transform var(--t-fast), box-shadow var(--t-fast), background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
}

.btn svg {
  width: 17px;
  height: 17px;
  transition: transform var(--t-fast);
}

.btn--primary {
  background: var(--grad-brand);
  color: #070f14;
  box-shadow: 0 4px 18px -4px rgba(45, 212, 191, 0.45);
}

[data-theme='light'] .btn--primary {
  color: #ffffff;
  box-shadow: 0 4px 18px -4px rgba(15, 118, 110, 0.4);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px -6px rgba(45, 212, 191, 0.6);
}

.btn--ghost {
  border: 1px solid var(--border);
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.btn--ghost:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn--sm {
  padding: 0.5rem 1.05rem;
  font-size: 0.82rem;
  gap: 0.45rem;
}

.btn--sm svg {
  width: 14px;
  height: 14px;
}

/* =========================================================================
   Hero Section
   ========================================================================= */
.hero {
  position: relative;
  padding-top: calc(4.5rem + 3.5rem);
  padding-bottom: 5rem;
  overflow: hidden;
}

.hero__glow {
  position: absolute;
  top: 15%;
  right: 15%;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(45, 212, 191, 0.12) 0%, rgba(34, 211, 238, 0) 70%);
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
}

[data-theme='light'] .hero__glow {
  background: radial-gradient(circle, rgba(15, 118, 110, 0.08) 0%, rgba(8, 145, 178, 0) 70%);
}

.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.25fr 0.85fr;
  gap: clamp(2.5rem, 5vw, 4.5rem);
  align-items: center;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.45rem 1.1rem 0.45rem 0.8rem;
  border-radius: var(--r-full);
  background: var(--surface);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
}

.hero__badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  position: relative;
}

.hero__badge-dot::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1.5px solid #10b981;
  animation: pulse-ring 2.2s ease-out infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.7); opacity: 1; }
  100% { transform: scale(2.2); opacity: 0; }
}

.hero__title {
  font-size: clamp(2.75rem, 5.5vw, 4.25rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 1rem;
}

.hero__title em {
  font-family: var(--font-display);
  font-weight: 400;
  font-style: italic;
  color: var(--primary);
  background: var(--grad-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero__sub {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

.hero__sub svg {
  width: 20px;
  height: 20px;
  color: var(--primary);
  flex-shrink: 0;
}

.hero__lead {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 580px;
}

.hero__lead strong {
  color: var(--text);
  font-weight: 600;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2.25rem;
}

.hero__meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.85rem;
  border-radius: var(--r-md);
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.hero__meta-chip strong {
  color: var(--primary);
}

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

/* Hero Portrait Card */
.hero__visual {
  position: relative;
  display: flex;
  justify-content: center;
}

.hero__portrait-card {
  position: relative;
  width: 100%;
  max-width: 380px;
  border-radius: var(--r-2xl);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  overflow: hidden;
  transition: transform var(--t-med), box-shadow var(--t-med);
}

.hero__portrait-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg), 0 0 45px rgba(45, 212, 191, 0.3);
}

.hero__img-wrap {
  width: 100%;
  aspect-ratio: 4 / 4.7;
  overflow: hidden;
  position: relative;
  background: var(--surface-2);
}

.hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero__card-footer {
  padding: 1.25rem 1.5rem;
  background: var(--grad-surface);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hero__card-name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
}

.hero__card-role {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}

.hero__card-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.65rem;
  border-radius: var(--r-full);
  background: var(--primary-soft);
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
}

/* =========================================================================
   Stats Ribbon
   ========================================================================= */
.stats-band {
  margin-top: 1rem;
  margin-bottom: 5rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.stat-card {
  padding: 1.75rem 1.5rem;
  border-radius: var(--r-xl);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition: transform var(--t-fast), border-color var(--t-fast);
}

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

.stat-card__num {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  font-weight: 700;
  line-height: 1;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.stat-card__label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

.stat-card__sub {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-faint);
  margin-top: 0.25rem;
}

/* =========================================================================
   Section Common
   ========================================================================= */
.section {
  padding-block: clamp(4rem, 8vw, 6.5rem);
  position: relative;
}

.section--alt {
  background: rgba(12, 24, 31, 0.5);
  border-top: 1px solid var(--divider);
  border-bottom: 1px solid var(--divider);
}

[data-theme='light'] .section--alt {
  background: rgba(241, 245, 249, 0.6);
}

.section-header {
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.85rem;
}

.section-title {
  font-size: clamp(2rem, 3.8vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--text);
  margin-bottom: 0.85rem;
}

.section-title em {
  font-family: var(--font-display);
  font-weight: 400;
  font-style: italic;
  color: var(--primary);
}

.section-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 680px;
  line-height: 1.65;
}

/* =========================================================================
   About Section
   ========================================================================= */
.about-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(2.5rem, 5vw, 4.5rem);
}

.about-bio {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.about-lead {
  font-size: 1.2rem;
  line-height: 1.6;
  font-weight: 450;
  color: var(--text);
}

.about-text {
  color: var(--text-muted);
  line-height: 1.7;
}

.about-text strong {
  color: var(--text);
}

.about-highlights {
  margin-top: 1rem;
  display: grid;
  gap: 0.85rem;
}

.about-hl-item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1rem 1.25rem;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--border);
}

.about-hl-icon {
  width: 24px;
  height: 24px;
  color: var(--primary);
  flex-shrink: 0;
  margin-top: 2px;
}

.about-hl-text strong {
  display: block;
  font-size: 0.95rem;
  color: var(--text);
}

.about-hl-text span {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Education Cards Stack */
.edu-stack {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.edu-card {
  padding: 1.5rem;
  border-radius: var(--r-xl);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: transform var(--t-fast), border-color var(--t-fast);
}

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

.edu-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.edu-card__degree {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
}

.edu-card__score {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: var(--r-full);
  background: var(--primary-soft);
  color: var(--primary);
  white-space: nowrap;
}

.edu-card__school {
  font-size: 0.92rem;
  color: var(--text-muted);
}

.edu-card__meta {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-faint);
}

.fellowship-card {
  padding: 1.5rem;
  border-radius: var(--r-xl);
  background: var(--grad-brand-soft);
  border: 1px solid var(--primary);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.fellowship-card__title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.fellowship-card__desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* =========================================================================
   Capabilities Section (4-column grid)
   ========================================================================= */
.cap-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.cap-card {
  padding: 2rem 1.75rem;
  border-radius: var(--r-xl);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  transition: transform var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast);
}

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

.cap-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--r-lg);
  background: var(--primary-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cap-icon svg {
  width: 24px;
  height: 24px;
}

.cap-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  line-height: 1.3;
}

.cap-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  flex-grow: 1;
}

.cap-item {
  font-size: 0.88rem;
  color: var(--text-muted);
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  line-height: 1.45;
}

.cap-item::before {
  content: '▹';
  color: var(--primary);
  font-size: 0.95rem;
  line-height: 1.2;
}

.cap-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--divider);
}

.cap-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 0.2rem 0.55rem;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  color: var(--text-faint);
  border: 1px solid var(--border);
}

/* =========================================================================
   Experience Timeline
   ========================================================================= */
.timeline {
  position: relative;
  max-width: 960px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 2.25rem;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 1rem;
  bottom: 1rem;
  left: 20px;
  width: 2px;
  background: var(--divider);
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 1.5rem;
}

.timeline-node {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  box-shadow: 0 0 12px rgba(45, 212, 191, 0.2);
  z-index: 2;
  flex-shrink: 0;
}

.timeline-node svg {
  width: 18px;
  height: 18px;
}

.timeline-card {
  padding: 2rem;
  border-radius: var(--r-xl);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform var(--t-fast), border-color var(--t-fast);
}

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

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

.timeline-role {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: var(--r-full);
  background: var(--primary-soft);
  color: var(--primary);
  white-space: nowrap;
}

.timeline-company {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.timeline-company span {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--text-faint);
}

.timeline-bullets {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.timeline-bullet {
  font-size: 0.94rem;
  color: var(--text-muted);
  line-height: 1.6;
  position: relative;
  padding-left: 1.25rem;
}

.timeline-bullet::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-size: 1.2rem;
  line-height: 1;
}

.timeline-bullet strong {
  color: var(--text);
}

/* =========================================================================
   Research, Publications & Innovations Section
   ========================================================================= */
.research-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--divider);
}

.filter-btn {
  padding: 0.55rem 1.15rem;
  border-radius: var(--r-full);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: all var(--t-fast);
}

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

.filter-btn.is-active {
  background: var(--grad-brand);
  color: #070f14;
  border-color: transparent;
  box-shadow: 0 4px 15px -3px rgba(45, 212, 191, 0.4);
}

[data-theme='light'] .filter-btn.is-active {
  color: #ffffff;
}

/* Publication / Research List */
.pub-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--divider);
}

.pub {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  gap: 1.75rem;
  align-items: start;
  padding: 1.75rem 1rem;
  border-bottom: 1px solid var(--divider);
  transition: background var(--t-fast), padding var(--t-med);
  border-radius: var(--r-lg);
}

.pub:hover {
  background: var(--surface);
  padding-inline: 1.5rem;
}

.pub__year {
  padding: 0.35rem 0.75rem;
  border-radius: var(--r-full);
  background: var(--primary-tint);
  border: 1px solid var(--primary);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  text-align: center;
  justify-self: start;
}

.pub__body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.pub__title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.45;
  letter-spacing: -0.01em;
}

.pub__meta {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.pub__meta strong {
  color: var(--primary);
  font-weight: 600;
}

.pub__meta em {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--text);
}

.pub__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.35rem;
}

.pub__action-link {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--r-sm);
  background: var(--primary-soft);
  transition: all var(--t-fast);
}

.pub__action-link:hover {
  background: var(--primary);
  color: #070f14;
}

[data-theme='light'] .pub__action-link:hover {
  color: #ffffff;
}

.pub__cites {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 90px;
  padding: 0.65rem 1rem;
  border-radius: var(--r-lg);
  background: var(--surface-2);
  border: 1px solid var(--border);
  text-align: center;
}

.pub__cites strong {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}

.pub__cites span {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 0.3rem;
}

/* =========================================================================
   Interactive Details Modal
   ========================================================================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(7, 15, 20, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-fast);
}

.modal-overlay.is-active {
  opacity: 1;
  pointer-events: auto;
}

.pub-modal {
  position: relative;
  width: 100%;
  max-width: 720px;
  max-height: 88vh;
  overflow-y: auto;
  border-radius: var(--r-2xl);
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lg);
  padding: clamp(1.75rem, 4vw, 2.75rem);
  transform: scale(0.96);
  transition: transform var(--t-med);
}

.modal-overlay.is-active .pub-modal {
  transform: scale(1);
}

.pub-modal__close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all var(--t-fast);
}

.pub-modal__close:hover {
  color: var(--text);
  border-color: var(--primary);
  transform: rotate(90deg);
}

.pub-modal__close svg {
  width: 18px;
  height: 18px;
}

.pub-modal__kicker {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.pub-modal__chip {
  padding: 0.25rem 0.7rem;
  border-radius: var(--r-full);
  background: var(--primary-soft);
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.pub-modal__date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-faint);
}

.pub-modal__title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
  margin-bottom: 0.85rem;
}

.pub-modal__authors {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.pub-modal__authors strong {
  color: var(--primary);
}

.pub-modal__venue {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.92rem;
  color: var(--text-faint);
  margin-bottom: 1.5rem;
}

.pub-modal__sub {
  font-size: 0.85rem;
  font-family: var(--font-mono);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  margin-top: 1.5rem;
  margin-bottom: 0.6rem;
}

.pub-modal__abstract {
  font-size: 0.94rem;
  color: var(--text-muted);
  line-height: 1.7;
  padding: 1.25rem;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--border);
}

.pub-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.pub-modal__box {
  width: 100%;
  padding: 1rem 1.25rem;
  border-radius: var(--r-lg);
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text);
  line-height: 1.6;
  white-space: pre-wrap;
  user-select: all;
  margin-top: 0.6rem;
}

/* =========================================================================
   Achievements Section
   ========================================================================= */
.achieve-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.achieve-card {
  padding: 1.75rem;
  border-radius: var(--r-xl);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: transform var(--t-fast), border-color var(--t-fast);
}

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

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

.achieve-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: var(--r-full);
  background: var(--primary-soft);
  color: var(--primary);
}

.achieve-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.achieve-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* =========================================================================
   Contact Section & Form
   ========================================================================= */
.contact-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(2.5rem, 5vw, 4.5rem);
}

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

.contact-card {
  padding: 1.5rem;
  border-radius: var(--r-xl);
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  transition: border-color var(--t-fast);
}

.contact-card:hover {
  border-color: var(--primary);
}

.contact-card__icon {
  width: 44px;
  height: 44px;
  border-radius: var(--r-lg);
  background: var(--primary-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-card__icon svg {
  width: 22px;
  height: 22px;
}

.contact-card__details strong {
  display: block;
  font-size: 0.82rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  margin-bottom: 0.25rem;
}

.contact-card__value {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  word-break: break-all;
}

.contact-card__value a:hover {
  color: var(--primary);
}

/* Form Container */
.contact-form-card {
  padding: clamp(1.75rem, 4vw, 2.75rem);
  border-radius: var(--r-2xl);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 0.85rem 1.15rem;
  border-radius: var(--r-md);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.95rem;
  transition: all var(--t-fast);
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: var(--ring);
  background: var(--bg-elevated);
}

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

/* Form Status Alerts */
.form-alert {
  padding: 1rem 1.25rem;
  border-radius: var(--r-md);
  font-size: 0.9rem;
  display: none;
  align-items: center;
  gap: 0.75rem;
}

.form-alert--success {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid #10b981;
  color: #10b981;
}

.form-alert--error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid #ef4444;
  color: #ef4444;
}

/* =========================================================================
   Footer
   ========================================================================= */
.footer {
  background: var(--bg-elevated);
  border-top: 1px solid var(--divider);
  padding-top: 4.5rem;
  padding-bottom: 3rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: clamp(2rem, 4vw, 3.5rem);
  margin-bottom: 3.5rem;
}

.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 1.25rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-link {
  font-size: 0.92rem;
  color: var(--text-muted);
  transition: color var(--t-fast);
}

.footer-link:hover {
  color: var(--primary);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 2rem;
  border-top: 1px solid var(--divider);
  font-size: 0.88rem;
  color: var(--text-faint);
}

.back-to-top {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--t-fast);
}

.back-to-top:hover {
  color: var(--primary);
}

/* =========================================================================
   Responsive Breakpoints
   ========================================================================= */
@media (max-width: 1024px) {
  .cap-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .achieve-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .nav__links {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

  .hero__inner {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .hero__visual {
    order: -1;
    max-width: 320px;
    margin-inline: auto;
  }

  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .pub {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .pub__cites {
    justify-self: start;
  }
}

@media (max-width: 640px) {
  .cap-grid,
  .stats-grid,
  .achieve-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .timeline::before {
    left: 16px;
  }

  .timeline-item {
    grid-template-columns: 34px 1fr;
    gap: 1rem;
  }

  .timeline-node {
    width: 34px;
    height: 34px;
  }

  .timeline-card {
    padding: 1.35rem;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
