/* ─── Design System ─────────────────────────────────────────────── */
:root {
  --bg-0: #04080f;
  --bg-1: #080f1e;
  --bg-2: #0d1829;
  --bg-card: #101e33;
  --bg-card-hover: #142540;

  --accent: #00c8ff;
  --accent-dim: rgba(0, 200, 255, 0.12);
  --accent-glow: rgba(0, 200, 255, 0.25);
  --purple: #7c3aed;
  --purple-dim: rgba(124, 58, 237, 0.15);
  --green: #10b981;

  --text-0: #f1f5f9;
  --text-1: #cbd5e1;
  --text-2: #94a3b8;
  --text-3: #475569;

  --border: rgba(255, 255, 255, 0.07);
  --border-accent: rgba(0, 200, 255, 0.3);

  --radius: 12px;
  --radius-sm: 6px;
  --radius-lg: 20px;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;

  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-accent: 0 0 40px rgba(0, 200, 255, 0.12);

  --nav-h: 64px;
  --section-py: 100px;
}

/* ─── Reset ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }
body {
  font-family: var(--font);
  background: var(--bg-0);
  color: var(--text-1);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ─── Typography ─────────────────────────────────────────────────── */
h1, h2, h3, h4 { color: var(--text-0); font-weight: 700; line-height: 1.2; }
h1 { font-size: clamp(2.4rem, 6vw, 4.5rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); letter-spacing: -0.02em; }
h3 { font-size: 1.25rem; }
p { color: var(--text-2); }
code { font-family: var(--mono); font-size: 0.875em; color: var(--accent); background: var(--accent-dim); padding: 2px 6px; border-radius: 4px; }

/* ─── Layout ─────────────────────────────────────────────────────── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
section { padding: var(--section-py) 0; }
.section-label {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.section-title { margin-bottom: 16px; }
.section-sub { color: var(--text-2); font-size: 1.05rem; max-width: 600px; margin-bottom: 56px; }

/* ─── Nav ────────────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 100;
  transition: background 0.3s, border-color 0.3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(4, 8, 15, 0.85);
  backdrop-filter: blur(16px);
  border-color: var(--border);
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-0);
  letter-spacing: -0.03em;
}
.nav-logo .accent { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 8px; }
.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-2);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  transition: color 0.2s, background 0.2s;
}
.nav-links a:hover { color: var(--text-0); background: var(--border); }
.nav-links .nav-cta {
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid var(--border-accent);
}
.nav-links .nav-cta:hover { background: var(--accent); color: var(--bg-0); }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text-1); border-radius: 2px; transition: all 0.3s; }

/* ─── Hero ───────────────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: var(--nav-h);
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 60% 40%, rgba(0, 200, 255, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 20% 80%, rgba(124, 58, 237, 0.07) 0%, transparent 55%),
    var(--bg-0);
}
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 90% 90% at 50% 50%, black 30%, transparent 100%);
}
.hero-content {
  position: relative;
  z-index: 1;
  padding: 80px 0;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid var(--border-accent);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 28px;
}
.hero-eyebrow::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}
.hero-name {
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
  color: var(--text-0);
  margin-bottom: 8px;
}
.hero-name .phd {
  font-size: 0.45em;
  font-weight: 400;
  color: var(--text-2);
  vertical-align: super;
  letter-spacing: 0;
}
.hero-title {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  font-weight: 400;
  color: var(--text-2);
  margin-bottom: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.hero-title .sep { color: var(--text-3); }
.hero-description {
  font-size: 1.05rem;
  color: var(--text-2);
  max-width: 600px;
  margin-bottom: 40px;
  line-height: 1.75;
}
.hero-description strong { color: var(--text-1); font-weight: 500; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 64px; }
.hero-stats {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}
.stat-item { }
.stat-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-0);
  letter-spacing: -0.03em;
}
.stat-label {
  font-size: 0.8rem;
  color: var(--text-3);
  margin-top: 2px;
  font-family: var(--mono);
  letter-spacing: 0.04em;
}

/* ─── Buttons ────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  text-decoration: none;
}
.btn-primary {
  background: var(--accent);
  color: var(--bg-0);
}
.btn-primary:hover { background: #33d4ff; transform: translateY(-1px); box-shadow: 0 8px 24px rgba(0,200,255,0.3); }
.btn-outline {
  background: transparent;
  color: var(--text-1);
  border: 1px solid var(--border);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }

/* ─── About ──────────────────────────────────────────────────────── */
.about { background: var(--bg-1); }
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}
.about-text p {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-2);
  margin-bottom: 16px;
}
.about-text p:last-of-type { margin-bottom: 0; }
.about-text strong { color: var(--text-1); font-weight: 500; }
.about-highlights {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 32px;
}
.highlight-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s;
}
.highlight-item:hover { border-color: var(--border-accent); }
.highlight-icon { font-size: 1.2rem; flex-shrink: 0; margin-top: 1px; }
.highlight-item h4 { font-size: 0.875rem; margin-bottom: 2px; }
.highlight-item p { font-size: 0.8rem; color: var(--text-3); margin: 0; }
.about-meta {
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: sticky;
  top: calc(var(--nav-h) + 24px);
}
.meta-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.meta-card:hover { border-color: var(--border-accent); box-shadow: var(--shadow-accent); }
.meta-card h4 {
  font-size: 0.7rem;
  font-family: var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 16px;
}
.meta-links { display: flex; flex-direction: column; gap: 10px; }
.meta-link {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  color: var(--text-2);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  transition: background 0.2s, color 0.2s;
}
.meta-link:hover { background: var(--border); color: var(--text-0); }
.meta-link span:first-child { font-size: 1rem; }
.skills-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.skill-chip {
  font-size: 0.78rem;
  font-family: var(--mono);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-2);
  color: var(--text-2);
  border: 1px solid var(--border);
  transition: all 0.2s;
}
.skill-chip:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }
.skill-chip.accent { background: var(--accent-dim); color: var(--accent); border-color: var(--border-accent); }

/* ─── Expertise ──────────────────────────────────────────────────── */
.expertise { background: var(--bg-0); }
.expertise-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.expertise-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
  position: relative;
  overflow: hidden;
}
.expertise-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--purple));
  opacity: 0;
  transition: opacity 0.3s;
}
.expertise-card:hover {
  border-color: rgba(0,200,255,0.2);
  box-shadow: 0 8px 40px rgba(0,0,0,0.3), var(--shadow-accent);
  transform: translateY(-3px);
}
.expertise-card:hover::before { opacity: 1; }
.expertise-icon {
  width: 48px; height: 48px;
  background: var(--accent-dim);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 20px;
}
.expertise-card h3 { font-size: 1.1rem; margin-bottom: 10px; }
.expertise-card p { font-size: 0.875rem; color: var(--text-2); line-height: 1.7; margin-bottom: 20px; }
.expertise-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.expertise-tag {
  font-size: 0.72rem;
  font-family: var(--mono);
  padding: 3px 8px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-3);
}

/* ─── Featured Work ──────────────────────────────────────────────── */
.work { background: var(--bg-1); }
.work-list { display: flex; flex-direction: column; gap: 24px; }
.work-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 40px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: start;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.work-card:hover { border-color: rgba(0,200,255,0.2); box-shadow: var(--shadow-accent); }
.work-number {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-3);
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}
.work-title { font-size: 1.2rem; margin-bottom: 6px; }
.work-org {
  font-size: 0.8rem;
  color: var(--accent);
  font-family: var(--mono);
  margin-bottom: 14px;
  letter-spacing: 0.04em;
}
.work-card p { font-size: 0.9rem; color: var(--text-2); line-height: 1.7; }
.work-outcomes {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.work-outcome {
  font-size: 0.83rem;
  color: var(--text-2);
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.work-outcome::before {
  content: '→';
  color: var(--accent);
  font-size: 0.8rem;
  flex-shrink: 0;
}
.work-badge {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-family: var(--mono);
  font-weight: 500;
  letter-spacing: 0.06em;
  white-space: nowrap;
  flex-shrink: 0;
}
.badge-green { background: rgba(16,185,129,0.12); color: var(--green); border: 1px solid rgba(16,185,129,0.25); }
.badge-blue { background: var(--accent-dim); color: var(--accent); border: 1px solid var(--border-accent); }
.badge-purple { background: var(--purple-dim); color: #a78bfa; border: 1px solid rgba(124,58,237,0.3); }

/* ─── Publications ───────────────────────────────────────────────── */
.publications { background: var(--bg-0); }
.pubs-list { display: flex; flex-direction: column; gap: 16px; margin-bottom: 40px; }
.pub-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: center;
  transition: border-color 0.3s;
}
.pub-card:hover { border-color: rgba(0,200,255,0.2); }
.pub-card a { transition: color 0.2s; }
.pub-card a:hover { color: var(--accent); }
.pub-title { font-size: 0.95rem; font-weight: 600; color: var(--text-0); line-height: 1.4; margin-bottom: 8px; }
.pub-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.pub-journal { font-size: 0.78rem; font-style: italic; color: var(--text-2); }
.pub-year { font-size: 0.75rem; font-family: var(--mono); color: var(--text-3); }
.pub-citations {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}
.citations-count { font-size: 1.5rem; font-weight: 700; color: var(--text-0); letter-spacing: -0.03em; }
.citations-label { font-size: 0.65rem; font-family: var(--mono); color: var(--text-3); letter-spacing: 0.08em; text-transform: uppercase; }
.pubs-cta { text-align: center; }

/* ─── Blog ───────────────────────────────────────────────────────── */
.blog-section { background: var(--bg-1); }
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 48px; }
.blog-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.3s, transform 0.3s;
}
.blog-card:hover { border-color: rgba(0,200,255,0.2); transform: translateY(-3px); }
.blog-card-inner { padding: 24px; }
.blog-date { font-size: 0.72rem; font-family: var(--mono); color: var(--text-3); margin-bottom: 10px; }
.blog-card-title { font-size: 1rem; font-weight: 600; color: var(--text-0); margin-bottom: 10px; line-height: 1.4; }
.blog-card-title a:hover { color: var(--accent); }
.blog-card-excerpt { font-size: 0.83rem; color: var(--text-2); line-height: 1.6; margin-bottom: 16px; }
.blog-card-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-size: 0.7rem;
  padding: 3px 8px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-3);
  font-family: var(--mono);
}
.blog-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 24px;
  color: var(--text-3);
  font-size: 0.9rem;
}
.blog-cta { text-align: center; }

/* ─── Contact ────────────────────────────────────────────────────── */
.contact { background: var(--bg-0); }
.contact-inner {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 64px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.contact-inner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 60% at 50% 50%, rgba(0,200,255,0.05), transparent 65%);
  pointer-events: none;
}
.contact-inner h2 { margin-bottom: 16px; }
.contact-inner p { color: var(--text-2); max-width: 500px; margin: 0 auto 40px; font-size: 1rem; }
.contact-links {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}
.contact-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--text-2);
  transition: all 0.2s;
}
.contact-link:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }

/* ─── Footer ─────────────────────────────────────────────────────── */
.footer {
  background: var(--bg-1);
  border-top: 1px solid var(--border);
  padding: 40px 0;
}
.footer-inner { text-align: center; }
.footer-name { font-size: 1rem; font-weight: 600; color: var(--text-0); margin-bottom: 4px; }
.footer-tagline { font-size: 0.8rem; color: var(--text-3); margin-bottom: 20px; font-family: var(--mono); }
.footer-links { display: flex; justify-content: center; gap: 24px; margin-bottom: 20px; flex-wrap: wrap; }
.footer-links a { font-size: 0.83rem; color: var(--text-3); transition: color 0.2s; }
.footer-links a:hover { color: var(--accent); }
.footer-copy { font-size: 0.75rem; color: var(--text-3); }

/* ─── Blog Page ──────────────────────────────────────────────────── */
.blog-page-hero {
  padding: calc(var(--nav-h) + 60px) 0 60px;
  background: var(--bg-1);
  border-bottom: 1px solid var(--border);
}
.blog-page-list {
  padding: 60px 0;
  background: var(--bg-0);
}
.blog-page-grid { display: flex; flex-direction: column; gap: 20px; }
.blog-page-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 32px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: center;
  transition: border-color 0.3s;
}
.blog-page-card:hover { border-color: rgba(0,200,255,0.2); }
.blog-page-card h2 { font-size: 1.1rem; margin-bottom: 8px; }
.blog-page-card h2 a:hover { color: var(--accent); }
.blog-page-card p { font-size: 0.875rem; color: var(--text-2); margin-bottom: 12px; }
.blog-page-meta { font-size: 0.75rem; font-family: var(--mono); color: var(--text-3); white-space: nowrap; }
.blog-empty-state { text-align: center; padding: 80px 24px; color: var(--text-3); }
.blog-empty-state h3 { font-size: 1.2rem; margin-bottom: 12px; color: var(--text-2); }
.blog-empty-state p { font-size: 0.9rem; }

/* ─── Post Page ──────────────────────────────────────────────────── */
.post-page { }
.post-hero {
  padding: calc(var(--nav-h) + 60px) 0 60px;
  background: var(--bg-1);
  border-bottom: 1px solid var(--border);
}
.post-meta-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.back-link { font-size: 0.875rem; color: var(--text-3); transition: color 0.2s; }
.back-link:hover { color: var(--accent); }
.post-date { font-size: 0.8rem; font-family: var(--mono); color: var(--text-3); }
.post-title { font-size: clamp(1.8rem, 4vw, 2.8rem); margin-bottom: 16px; }
.post-description { font-size: 1.1rem; color: var(--text-2); margin-bottom: 20px; }
.post-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.post-body { padding: 64px 0; }
.post-content { max-width: 720px; }
.post-content h2 { margin: 48px 0 16px; }
.post-content h3 { margin: 36px 0 12px; }
.post-content p { margin-bottom: 20px; font-size: 1rem; line-height: 1.8; color: var(--text-1); }
.post-content a { color: var(--accent); text-decoration: underline; text-decoration-color: var(--border-accent); }
.post-content a:hover { text-decoration-color: var(--accent); }
.post-content ul, .post-content ol { padding-left: 24px; margin-bottom: 20px; }
.post-content li { color: var(--text-1); margin-bottom: 8px; font-size: 1rem; line-height: 1.7; }
.post-content ul { list-style: disc; }
.post-content blockquote {
  border-left: 3px solid var(--accent);
  padding: 16px 24px;
  margin: 28px 0;
  background: var(--bg-card);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.post-content blockquote p { margin: 0; color: var(--text-1); }
.post-content pre {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  overflow-x: auto;
  margin-bottom: 24px;
  font-family: var(--mono);
  font-size: 0.875rem;
}
.post-content pre code { background: none; padding: 0; }
.post-footer { margin-top: 64px; padding-top: 32px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.post-share { display: flex; align-items: center; gap: 12px; font-size: 0.875rem; color: var(--text-3); }
.post-share a { color: var(--text-2); transition: color 0.2s; }
.post-share a:hover { color: var(--accent); }

/* ─── 404 ────────────────────────────────────────────────────────── */
.not-found { min-height: 80vh; display: flex; align-items: center; justify-content: center; text-align: center; padding-top: var(--nav-h); }
.not-found .code { font-size: 6rem; font-weight: 800; color: var(--accent); opacity: 0.2; letter-spacing: -0.05em; }

/* ─── Animations ─────────────────────────────────────────────────── */
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-up { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.fade-up.visible { opacity: 1; transform: translateY(0); }
.fade-up-delay-1 { transition-delay: 0.1s; }
.fade-up-delay-2 { transition-delay: 0.2s; }
.fade-up-delay-3 { transition-delay: 0.3s; }

/* ─── Scroll Progress Bar ───────────────────────────────────────── */
#scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--purple), var(--accent));
  background-size: 200% auto;
  z-index: 9999;
  box-shadow: 0 0 10px rgba(0, 200, 255, 0.5);
  transition: width 0.08s linear;
  pointer-events: none;
}

/* ─── Hero Canvas ────────────────────────────────────────────────── */
#heroCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.65;
}

/* ─── Hero Name Gradient ─────────────────────────────────────────── */
.hero-name {
  background: linear-gradient(130deg, var(--text-0) 45%, rgba(0, 200, 255, 0.85) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-name .phd {
  -webkit-text-fill-color: var(--text-2);
}

/* ─── Typewriter Cursor ──────────────────────────────────────────── */
.tw-cursor {
  display: inline-block;
  width: 2px;
  height: 0.72em;
  background: var(--accent);
  margin-left: 2px;
  vertical-align: middle;
  border-radius: 1px;
  animation: twBlink 0.9s step-end infinite;
}
@keyframes twBlink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ─── Floating Expertise Icons ───────────────────────────────────── */
@keyframes floatIcon {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-6px); }
}
.expertise-icon { animation: floatIcon 3.2s ease-in-out infinite; }
.expertise-card:nth-child(2) .expertise-icon { animation-delay: 0.8s; }
.expertise-card:nth-child(3) .expertise-icon { animation-delay: 1.6s; }
.expertise-card:nth-child(4) .expertise-icon { animation-delay: 2.4s; }

/* ─── Expertise Card: Animated Gradient Top Border on Hover ──────── */
@keyframes gradientSlide {
  0%   { background-position: 0% center; }
  100% { background-position: -200% center; }
}
.expertise-card:hover::before {
  opacity: 1;
  background: linear-gradient(90deg, var(--accent), var(--purple), var(--accent));
  background-size: 200% auto;
  animation: gradientSlide 2.5s linear infinite;
}

/* ─── Expertise Card: 3D Tilt transition reset ───────────────────── */
.expertise-card {
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.15s ease-out;
  will-change: transform;
}

/* ─── Stat Counter Glow on Count ─────────────────────────────────── */
@keyframes statGlow {
  0%   { color: var(--text-0); text-shadow: none; }
  40%  { color: var(--accent); text-shadow: 0 0 20px rgba(0, 200, 255, 0.55); }
  100% { color: var(--text-0); text-shadow: none; }
}
.stat-value.counting { animation: statGlow 1.6s ease-out forwards; }

/* ─── Work Card: Sweep Line on Hover ─────────────────────────────── */
.work-card { overflow: hidden; }
.work-card::after {
  content: '';
  position: absolute;
  top: 0; left: -100%; right: auto;
  width: 60%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 200, 255, 0.5), transparent);
  pointer-events: none;
}
.work-card:hover::after {
  animation: sweepLine 0.65s ease forwards;
}
@keyframes sweepLine {
  from { left: -60%; }
  to   { left: 140%; }
}

/* ─── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 900px) {
  :root { --section-py: 72px; }
  .about-grid { grid-template-columns: 1fr; gap: 48px; }
  .about-meta { position: static; }
  .expertise-grid { grid-template-columns: 1fr; }
  .work-card { grid-template-columns: 1fr; }
  .work-badge { align-self: flex-start; }
  .pub-card { grid-template-columns: 1fr; }
  .pub-citations { flex-direction: row; align-items: center; gap: 8px; }
  .blog-grid { grid-template-columns: 1fr; }
  .contact-inner { padding: 40px 24px; }
  .blog-page-card { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: var(--nav-h) 0 0 0;
    background: rgba(4, 8, 15, 0.97);
    backdrop-filter: blur(16px);
    padding: 32px 24px;
    gap: 8px;
    align-items: stretch;
  }
  .nav-links.open a { font-size: 1.1rem; padding: 14px 16px; }
  .nav-toggle { display: flex; }
  .hero-stats { gap: 24px; }
  .hero-actions { flex-direction: column; }
  .btn { justify-content: center; }
}
