:root {
  --bg: #0a0a0f;
  --bg-card: #12121a;
  --bg-card-hover: #1a1a26;
  --border: #1e1e2e;
  --text: #e4e4e7;
  --text-muted: #8b8b9e;
  --accent: #6366f1;
  --accent-light: #818cf8;
  --accent-glow: rgba(99, 102, 241, 0.15);
  --accent2: #06b6d4;
  --accent3: #8b5cf6;
  --gradient: linear-gradient(135deg, #6366f1, #06b6d4);
  --gradient2: linear-gradient(135deg, #8b5cf6, #ec4899);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
}

.bg-glow {
  position: fixed;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.07;
  pointer-events: none;
  z-index: 0;
}
.bg-glow-1 { top: -200px; right: -100px; background: var(--accent); }
.bg-glow-2 { bottom: -200px; left: -100px; background: var(--accent2); }

/* Navigation */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav-logo {
  font-weight: 700;
  font-size: 1.1rem;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
}
.nav-links { display: flex; gap: 8px; }
.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 8px;
  transition: all 0.2s;
}
.nav-links a:hover {
  color: var(--text);
  background: var(--accent-glow);
}
.nav-links a.active {
  color: var(--accent-light);
  background: var(--accent-glow);
}
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

section { padding: 80px 0; }
section:not(.hero):first-of-type { padding-top: 120px; }

.section-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--accent-light);
  margin-bottom: 12px;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 40px;
  color: var(--text);
}

/* Hero */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 64px;
}
.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.hero-text h1 {
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 16px;
}
.hero-text h1 span {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-text .tagline {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  font-weight: 300;
}
.hero-text .bio {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 32px;
  line-height: 1.8;
}
.hero-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s;
  border: none;
  cursor: pointer;
}
.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}
.btn-secondary {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.hero-image { display: flex; justify-content: center; }
.hero-image .photo-wrapper {
  position: relative;
  width: 320px;
  height: 320px;
}
.hero-image .photo-wrapper::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 24px;
  background: var(--gradient);
  z-index: -1;
}
.hero-image .photo-wrapper::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 24px;
  background: var(--gradient);
  z-index: -2;
  filter: blur(20px);
  opacity: 0.5;
}
.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 22px;
  display: block;
}
.hero-image .photo-wrapper img {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  animation: heroPhotoFade 15s infinite;
}
.hero-image .photo-wrapper img:nth-child(1) { animation-delay: 0s; }
.hero-image .photo-wrapper img:nth-child(2) { animation-delay: 5s; }
.hero-image .photo-wrapper img:nth-child(3) { animation-delay: 10s; }
@keyframes heroPhotoFade {
  0%     { opacity: 0; }
  6.67%  { opacity: 1; }
  33.33% { opacity: 1; }
  40%    { opacity: 0; }
  100%   { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-image .photo-wrapper img { animation: none; }
  .hero-image .photo-wrapper img:nth-child(1) { opacity: 1; }
}

.hero-stats {
  display: flex;
  gap: 32px;
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.stat-item .stat-number {
  font-size: 1.8rem;
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-item .stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  transition: all 0.3s;
}
.card:hover {
  border-color: rgba(99, 102, 241, 0.3);
  background: var(--bg-card-hover);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

/* Research */
.research-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.research-card .icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 16px;
}
.research-card:nth-child(1) .icon { background: rgba(99, 102, 241, 0.15); }
.research-card:nth-child(2) .icon { background: rgba(6, 182, 212, 0.15); }
.research-card:nth-child(3) .icon { background: rgba(139, 92, 246, 0.15); }
.research-card:nth-child(4) .icon { background: rgba(236, 72, 153, 0.15); }
.research-card:nth-child(5) .icon { background: rgba(245, 158, 11, 0.15); }
.research-card:nth-child(6) .icon { background: rgba(16, 185, 129, 0.15); }
.research-card h3 { font-size: 1rem; font-weight: 600; margin-bottom: 8px; }
.research-card p { font-size: 0.85rem; color: var(--text-muted); line-height: 1.6; }

/* Experience */
.exp-list { display: flex; flex-direction: column; gap: 20px; }
.exp-item {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 32px;
}
.exp-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--accent-light);
  padding-top: 4px;
}
.exp-content h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 2px; }
.exp-content .exp-role {
  font-size: 0.9rem;
  color: var(--accent2);
  margin-bottom: 10px;
}
.exp-content ul {
  list-style: none;
  margin-bottom: 12px;
}
.exp-content li {
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 3px 0;
  padding-left: 16px;
  position: relative;
}
.exp-content li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.5;
}
.exp-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.exp-skills span {
  font-size: 0.7rem;
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(99,102,241,0.1);
  color: var(--accent-light);
  border: 1px solid rgba(99,102,241,0.15);
}

/* Projects */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}
.project-card { position: relative; overflow: hidden; }
.project-card .project-tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
}
.project-card:nth-child(1) .project-tag { background: rgba(99, 102, 241, 0.15); color: var(--accent-light); }
.project-card:nth-child(2) .project-tag { background: rgba(6, 182, 212, 0.15); color: var(--accent2); }
.project-card:nth-child(3) .project-tag { background: rgba(139, 92, 246, 0.15); color: var(--accent3); }
.project-card h3 { font-size: 1.15rem; font-weight: 600; margin-bottom: 10px; }
.project-card h3 a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s;
}
.project-card h3 a:hover { color: var(--accent-light); }
.project-card p { font-size: 0.88rem; color: var(--text-muted); margin-bottom: 16px; line-height: 1.7; }
.project-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Publications */
.pub-list { display: flex; flex-direction: column; gap: 16px; }
.pub-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px 28px;
  transition: all 0.3s;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 20px;
  align-items: start;
}
.pub-item:hover {
  border-color: rgba(99, 102, 241, 0.3);
  background: var(--bg-card-hover);
}
.pub-number {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-light);
  background: var(--accent-glow);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}
.pub-content h4 { font-size: 0.95rem; font-weight: 600; margin-bottom: 6px; line-height: 1.5; }
.pub-content .pub-authors { font-size: 0.83rem; color: var(--text-muted); margin-bottom: 6px; }
.pub-content .pub-authors strong { color: var(--accent-light); font-weight: 600; }
.pub-content .pub-venue { font-size: 0.8rem; color: var(--text-muted); font-style: italic; }
.pub-year {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  white-space: nowrap;
  flex-shrink: 0;
}
.pub-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  color: var(--accent-light);
  text-decoration: none;
  margin-top: 8px;
  margin-right: 6px;
  padding: 3px 10px;
  border-radius: 6px;
  background: var(--accent-glow);
  transition: all 0.2s;
}
.pub-link:hover { background: rgba(99, 102, 241, 0.25); }

.pub-subsection {
  font-size: 1.3rem;
  font-weight: 600;
  margin-top: 40px;
  margin-bottom: 20px;
  color: var(--text-muted);
}

/* Education / Timeline */
.timeline {
  position: relative;
  padding-left: 32px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), var(--accent2), var(--accent3));
  border-radius: 2px;
}
.timeline-item {
  position: relative;
  padding-bottom: 36px;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: '';
  position: absolute;
  left: -28px;
  top: 8px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 2px var(--accent);
}
.timeline-item h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 4px; }
.timeline-item .timeline-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: var(--accent-light);
  margin-bottom: 8px;
}
.timeline-item p { font-size: 0.88rem; color: var(--text-muted); line-height: 1.7; }

/* Awards */
.awards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.award-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s;
}
.award-item:hover { border-color: rgba(99,102,241,0.3); }
.award-item .award-name { font-size: 0.88rem; font-weight: 500; }
.award-item .award-year {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--accent-light);
}

/* Service */
.service-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}
.service-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--accent-light);
}
.service-card ul { list-style: none; }
.service-card li {
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.service-card li:last-child { border-bottom: none; }
.service-card li .year {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--accent-light);
  white-space: nowrap;
}

/* Footer */
footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  text-align: center;
}
.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--accent-light); }
footer p { font-size: 0.8rem; color: var(--text-muted); }

/* Animations */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
  .hero-content { grid-template-columns: 1fr; gap: 40px; text-align: center; }
  .hero-image { order: -1; }
  .hero-image .photo-wrapper { width: 220px; height: 220px; }
  .hero-text h1 { font-size: 2.5rem; }
  .hero-buttons { justify-content: center; }
  .hero-stats { justify-content: center; }
  .research-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .exp-item { grid-template-columns: 1fr; gap: 8px; }
  .pub-item { grid-template-columns: 1fr; gap: 8px; }
  .pub-number { display: none; }
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(20px);
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
  }
  .nav-toggle { display: block; }
  .section-title { font-size: 1.6rem; }
}
