:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fb;
  --bg-tertiary: #f1f3f7;
  --bg-hover: #edf0f5;
  --accent-primary: #2563eb;
  --accent-secondary: #3b82f6;
  --accent-light: #dbeafe;
  --accent-lighter: #eff6ff;
  --accent-gradient: linear-gradient(135deg, #2563eb 0%, #3b82f6 50%, #60a5fa 100%);
  --accent-glow: rgba(37, 99, 235, 0.12);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --text-link: #2563eb;
  --text-link-hover: #1d4ed8;
  --border-light: #e2e8f0;
  --border-lighter: #f1f5f9;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.06);
}

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

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
}

a { color: var(--text-link); text-decoration: none; transition: color 200ms var(--ease-out); }
a:hover { color: var(--text-link-hover); }

/* ===========================
   Background decorations
   =========================== */
#particles-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.ambient-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.25;
  pointer-events: none;
  z-index: 0;
}
.orb-1 { width: 500px; height: 500px; background: var(--accent-light); top: -200px; right: -150px; animation: of1 20s ease-in-out infinite; }
.orb-2 { width: 400px; height: 400px; background: #e0e7ff; bottom: -150px; left: -100px; animation: of2 24s ease-in-out infinite; }
.orb-3 { width: 300px; height: 300px; background: #ddd6fe; top: 40%; left: 60%; animation: of3 16s ease-in-out infinite; }
@keyframes of1 { 0%, 100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-30px,50px) scale(1.08); } }
@keyframes of2 { 0%, 100% { transform: translate(0,0) scale(1); } 50% { transform: translate(40px,-30px) scale(1.05); } }
@keyframes of3 { 0%, 100% { transform: translate(0,0) scale(1); opacity: .25; } 50% { transform: translate(-20px,20px) scale(1.15); opacity: .35; } }

/* ===========================
   Layout — everything on top of background
   =========================== */
main {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===========================
   Hero Section
   =========================== */
.hero-section {
  width: 100%;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-light);
  padding: 4rem 1.5rem 2.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.hero-section::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(37,99,235,.2) 30%, rgba(59,130,246,.2) 70%, transparent);
}
.hero-inner {
  max-width: 720px;
  margin: 0 auto;
  animation: fadeUp .7s var(--ease-out) both;
}
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* Avatar */
.avatar-ring { width: 96px; height: 96px; margin: 0 auto 1.5rem; border-radius: 50%; padding: 3px; background: var(--accent-gradient); }
.avatar { width: 100%; height: 100%; border-radius: 50%; background: var(--bg-secondary); display: flex; align-items: center; justify-content: center; font-size: 1.85rem; font-weight: 700; }
.avatar-initials { background: var(--accent-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

/* Name & Title */
.name { font-family: 'Playfair Display', serif; font-size: 2.75rem; font-weight: 700; color: var(--text-primary); margin-bottom: 0.25rem; letter-spacing: -1px; line-height: 1.15; }
.title-role { font-size: 1.05rem; color: var(--text-secondary); margin-bottom: 1.5rem; letter-spacing: 0.3px; }

/* Badges */
.badge-row { display: flex; justify-content: center; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 16px;
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.3px; color: var(--accent-primary);
  background: var(--accent-lighter); border: 1px solid var(--accent-light); border-radius: var(--radius-full);
  transition: all 200ms var(--ease-out);
}
.badge:hover { background: var(--accent-light); box-shadow: 0 2px 8px var(--accent-glow); }
.badge svg { flex-shrink: 0; }

/* Social */
.social-row { display: flex; justify-content: center; gap: 1rem; }
.social-btn {
  display: flex; align-items: center; justify-content: center; width: 46px; height: 46px;
  border-radius: var(--radius-md); background: var(--bg-primary); border: 1px solid var(--border-light);
  color: var(--text-secondary); transition: all 350ms var(--ease-out); position: relative; overflow: hidden;
}
.social-btn::before { content: ''; position: absolute; inset: 0; background: var(--accent-gradient); opacity: 0; transition: opacity 350ms var(--ease-out); border-radius: inherit; }
.social-btn:hover { color: #fff; border-color: transparent; transform: translateY(-3px); box-shadow: var(--shadow-md), 0 4px 16px var(--accent-glow); }
.social-btn:hover::before { opacity: 1; }
.social-btn svg { position: relative; z-index: 1; }

/* ===========================
   Sticky Nav
   =========================== */
.nav-bar {
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 10;
  flex-shrink: 0;
}
.nav-tabs { display: flex; max-width: 720px; margin: 0 auto; padding: 0 1.5rem; }
.nav-tab {
  display: flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 24px;
  border: none; background: transparent; color: var(--text-muted); font-family: 'Inter', sans-serif;
  font-size: 0.9rem; font-weight: 500; cursor: pointer; position: relative; transition: color 200ms var(--ease-out);
}
.nav-tab:hover { color: var(--text-secondary); }
.nav-tab.active { color: var(--accent-primary); }
.nav-tab::after {
  content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%) scaleX(0);
  width: 100%; height: 2px; background: var(--accent-gradient); border-radius: 2px 2px 0 0;
  transition: transform 350ms var(--ease-spring);
}
.nav-tab.active::after { transform: translateX(-50%) scaleX(1); }
.nav-tab svg { flex-shrink: 0; opacity: 0.6; transition: opacity 200ms; }
.nav-tab.active svg { opacity: 1; }
.tab-indicator { display: none; }

/* ===========================
   Content Area
   =========================== */
.content-area {
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  flex: 1;
  background: var(--bg-primary);
}
.tab-content { display: none; animation: cIn 0.45s var(--ease-out) both; }
.tab-content.active { display: block; }
@keyframes cIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

/* ===========================
   Bio
   =========================== */
.bio-text { margin-bottom: 2.5rem; }
.bio-text p { font-size: 1.05rem; line-height: 1.85; color: var(--text-secondary); margin-bottom: 1.25rem; }
.bio-text p:last-child { margin-bottom: 0; }
.bio-text a { color: var(--text-link); font-weight: 500; position: relative; }
.bio-text a::after { content: ''; position: absolute; bottom: -1px; left: 0; width: 0; height: 1.5px; background: var(--accent-gradient); transition: width 350ms var(--ease-out); }
.bio-text a:hover::after { width: 100%; }

/* ===========================
   Credentials
   =========================== */
.credentials-title { font-size: 0.75rem; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-muted); margin-bottom: 1.25rem; }
.credentials { display: grid; grid-template-columns: 1fr 1fr; gap: 0.875rem; }
.credential-item {
  display: flex; align-items: center; gap: 1rem; padding: 1.25rem;
  border-radius: var(--radius-md); background: var(--bg-secondary); border: 1px solid var(--border-lighter);
  transition: all 350ms var(--ease-out); cursor: default;
}
.credential-item:hover { background: var(--bg-hover); border-color: var(--border-light); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.credential-icon { display: flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: var(--radius-sm); background: var(--accent-lighter); color: var(--accent-primary); flex-shrink: 0; }
.credential-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.credential-label { font-size: 0.875rem; font-weight: 600; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; }
.credential-place { font-size: 0.8rem; color: var(--text-muted); }

/* ===========================
   Contact
   =========================== */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0.875rem; }
.contact-card {
  display: flex; flex-direction: column; align-items: center; gap: 1rem;
  padding: 2.5rem 1.25rem; border-radius: var(--radius-lg); background: var(--bg-secondary);
  border: 1px solid var(--border-lighter); color: var(--text-primary);
  transition: all 350ms var(--ease-out); text-decoration: none; text-align: center;
}
.contact-card:hover { background: var(--bg-hover); border-color: var(--border-light); transform: translateY(-4px); box-shadow: var(--shadow-md); color: var(--text-primary); }
.contact-card-icon { display: flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: var(--radius-md); flex-shrink: 0; transition: transform 350ms var(--ease-spring); }
.contact-card:hover .contact-card-icon { transform: scale(1.1); }
.contact-card-icon.linkedin { background: rgba(0,119,181,0.08); color: #0077b5; }
.contact-card-icon.researchgate { background: rgba(0,179,164,0.08); color: #00b3a4; }
.contact-card-icon.scholar { background: rgba(66,133,244,0.08); color: #4285f4; }
.contact-card-label { font-size: 0.9rem; font-weight: 600; }
.contact-card-arrow { font-size: 0.85rem; color: var(--text-muted); transition: all 200ms var(--ease-out); }
.contact-card:hover .contact-card-arrow { color: var(--accent-primary); transform: translateX(3px); }

/* ===========================
   Footer
   =========================== */
.site-footer {
  width: 100%;
  padding: 2rem 1.5rem;
  text-align: center;
  border-top: 1px solid var(--border-light);
  background: var(--bg-secondary);
  flex-shrink: 0;
}
.footer-text { font-size: 0.8rem; color: var(--text-muted); }

/* ===========================
   Responsive — Tablet
   =========================== */
@media (max-width: 768px) {
  .hero-section {
    padding: 2.5rem 1.25rem 2rem;
  }
  .name {
    font-size: 2rem;
  }
  .title-role {
    font-size: 0.95rem;
  }
  .avatar-ring {
    width: 80px;
    height: 80px;
  }
  .avatar {
    font-size: 1.5rem;
  }
  .credentials {
    grid-template-columns: 1fr;
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .contact-card {
    flex-direction: row;
    padding: 1.25rem 1.5rem;
    text-align: left;
    gap: 1rem;
  }
  .contact-card-icon {
    width: 48px;
    height: 48px;
  }
  .contact-card-label {
    flex: 1;
  }
  .content-area {
    padding: 2rem 1.25rem;
  }
  .nav-tab {
    padding: 12px 20px;
    font-size: 0.85rem;
  }
  .bio-text p {
    font-size: 0.95rem;
    line-height: 1.75;
  }
  .social-btn {
    width: 42px;
    height: 42px;
  }
}

/* ===========================
   Responsive — Mobile
   =========================== */
@media (max-width: 480px) {
  .hero-section {
    padding: 2rem 1rem 1.5rem;
  }
  .name {
    font-size: 1.6rem;
    letter-spacing: -0.5px;
  }
  .title-role {
    font-size: 0.88rem;
    margin-bottom: 1rem;
  }
  .avatar-ring {
    width: 68px;
    height: 68px;
    margin-bottom: 1rem;
  }
  .avatar {
    font-size: 1.25rem;
  }
  .badge {
    padding: 5px 12px;
    font-size: 0.72rem;
  }
  .badge-row {
    margin-bottom: 1rem;
  }
  .social-row {
    gap: 0.75rem;
  }
  .social-btn {
    width: 40px;
    height: 40px;
  }
  .social-btn svg {
    width: 18px;
    height: 18px;
  }
  .content-area {
    padding: 1.5rem 1rem;
  }
  .nav-tab {
    padding: 12px 16px;
    font-size: 0.82rem;
    gap: 6px;
  }
  .nav-tab svg {
    width: 14px;
    height: 14px;
  }
  .bio-text p {
    font-size: 0.9rem;
    line-height: 1.7;
  }
  .credential-item {
    padding: 1rem;
    gap: 0.75rem;
  }
  .credential-icon {
    width: 36px;
    height: 36px;
  }
  .credential-icon svg {
    width: 16px;
    height: 16px;
  }
  .credential-label {
    font-size: 0.8rem;
  }
  .credential-place {
    font-size: 0.72rem;
  }
  .contact-card {
    padding: 1rem 1.25rem;
  }
  .contact-card-icon {
    width: 40px;
    height: 40px;
  }
  .contact-card-icon svg {
    width: 20px;
    height: 20px;
  }
  .site-footer {
    padding: 1.5rem 1rem;
  }
  .footer-text {
    font-size: 0.72rem;
  }

  /* Hide ambient orbs on small screens for performance */
  .ambient-orb {
    display: none;
  }
}

/* ===========================
   Reduced Motion
   =========================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .ambient-orb { animation: none; }
}
