/* ============ RESET ============ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

/* ============ VARIABLES ============ */
:root {
  --bg: #0a0a0f;
  --bg-elevated: #111118;
  --bg-card: #16161e;
  --border: #1e1e2a;
  --border-light: #2a2a3a;
  --text: #e4e4ed;
  --text-light: #a0a0b8;
  --text-lighter: #6c6c82;
  --accent: #6c8cff;
  --accent-dim: #4a6adf;
  --green: #4ade80;
  --orange: #f59e0b;
  --purple: #a78bfa;
  --cyan: #22d3ee;
  --pink: #f472b6;
  --grid-color: rgba(255,255,255,0.02);
  --nav-bg: rgba(10,10,15,0.85);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius: 8px;
  --radius-lg: 12px;
  --max-width: 880px;
}

[data-theme="light"] {
  --bg: #f5f5f7;
  --bg-elevated: #ffffff;
  --bg-card: #ffffff;
  --border: #e0e0e8;
  --border-light: #d0d0da;
  --text: #1a1a2e;
  --text-light: #555570;
  --text-lighter: #88889a;
  --accent: #4a6adf;
  --accent-dim: #3a5acf;
  --green: #16a34a;
  --orange: #d97706;
  --purple: #7c3aed;
  --cyan: #0891b2;
  --pink: #db2777;
  --grid-color: rgba(0,0,0,0.04);
  --nav-bg: rgba(245,245,247,0.9);
}

/* ============ BASE ============ */
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.grid-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(var(--grid-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
  background-size: 60px 60px;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: #8ca4ff; }
img { max-width: 100%; display: block; }

::selection { background: var(--accent); color: #fff; }

/* ============ NAV ============ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.nav__logo {
  font-weight: 800;
  font-size: 1rem;
  color: var(--text);
  letter-spacing: 0.05em;
  white-space: nowrap;
}
.nav__links { display: flex; gap: 1.5rem; align-items: center; }
.nav__links a {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-lighter);
  transition: color 0.2s;
}
.nav__links a:hover { color: var(--text); }

.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-lighter);
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s;
  flex-shrink: 0;
  margin-left: 0.5rem;
}
.theme-toggle:hover { border-color: var(--text-lighter); color: var(--text); }

/* ============ HERO ============ */
.hero {
  position: relative;
  z-index: 1;
  padding: 8rem 1.5rem 4rem;
  max-width: var(--max-width);
  margin: 0 auto;
}
#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}
.hero-bg-icon {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  font-size: 7rem;
  opacity: 0.04;
  color: var(--accent);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.hero__inner { position: relative; z-index: 1; }
.hero__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.hero__top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
  position: relative;
}
.hero__badges { display: flex; gap: 0.4rem; flex-wrap: wrap; }

.badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  letter-spacing: 0.01em;
}
.badge--oracle { background: rgba(200,80,0,0.15); color: #f97316; }
.badge--iit { background: rgba(100,200,100,0.12); color: #4ade80; }
.badge--ieee { background: rgba(100,140,255,0.12); color: #6c8cff; }
.badge--aclanthology { background: rgba(200,150,80,0.12); color: #fbbf24; }

.hero__name {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 0.3rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  justify-content: center;
}
.hero__follow {
  font-size: 0.7rem;
  font-weight: 600;
  background: rgba(10,102,194,0.12);
  color: #0a66c2;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: background 0.2s;
  letter-spacing: 0;
}
.hero__follow:hover {
  background: rgba(10,102,194,0.22);
  color: #0a66c2;
}
.hero__follow--medium {
  background: rgba(0,0,0,0.1);
  color: var(--text-light);
}
.hero__follow--medium:hover {
  background: rgba(0,0,0,0.18);
  color: var(--text);
}
.hero__photo {
  width: 110px;
  height: 110px;
  border-radius: 999px;
  overflow: hidden;
  border: 2px solid var(--border);
  flex-shrink: 0;
}
.hero__photo img { width: 100%; height: 100%; object-fit: cover; }
.hero__title {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 0.4rem;
  line-height: 1.5;
}
.hero__tags {
  font-size: 0.9rem;
  color: var(--text-lighter);
  margin-bottom: 1.2rem;
}
.hero__desc {
  font-size: 0.95rem;
  color: var(--text-light);
  line-height: 1.7;
  margin: 0 auto 2rem;
  text-align: center;
}
.hero__cta { display: flex; gap: 0.8rem; flex-wrap: wrap; justify-content: center; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.65rem 1.25rem;
  border-radius: 999px;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}
.btn--primary {
  background: var(--accent);
  color: #fff;
}
.btn--primary:hover { background: var(--accent-dim); color: #fff; }
.btn--ghost {
  background: transparent;
  color: var(--text-light);
  border: 1px solid var(--border);
}
.btn--ghost:hover {
  border-color: var(--text-lighter);
  color: var(--text);
}
.btn--console {
  background: rgba(34,211,238,0.12);
  color: var(--cyan);
  border-color: transparent;
}
.btn--console:hover {
  background: rgba(34,211,238,0.22);
  color: var(--cyan);
}
.btn--follow {
  background: rgba(10,102,194,0.15);
  color: #0a66c2;
  border-color: transparent;
}
.btn--follow:hover {
  background: rgba(10,102,194,0.25);
  color: #0a66c2;
}

/* ============ METRICS ============ */
.metrics {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}
.metrics__inner {
  display: flex;
  gap: 1rem;
  padding: 1.5rem 0;
  justify-content: center;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem 1.5rem;
  min-width: 110px;
}
.metric__value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.metric__label { font-size: 0.78rem; color: var(--text-lighter); font-weight: 500; }

/* ============ SECTIONS ============ */
.section {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem 1.5rem;
}
.section__title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 1.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
}
.section__title i { color: var(--accent); font-size: 0.95rem; }

/* ============ RESEARCH CONSOLE ============ */
.console {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-elevated);
}
.console__bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 0.9rem;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}
.console__dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
}
.console__dot:nth-child(1) { background: #ef4444; }
.console__dot:nth-child(2) { background: #eab308; }
.console__dot:nth-child(3) { background: #22c55e; }
.console__title {
  margin-left: auto;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--text-lighter);
}
.console__body {
  padding: 1rem 1.2rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.8;
}
.console__prompt { color: var(--green); font-weight: 500; }
.console__cmd { color: var(--cyan); }
.console__output { margin: 0.3rem 0 0.8rem 1rem; }
.console__focus { margin: 0.3rem 0 0.8rem 1rem; color: var(--text-light); }
.console__cursor { animation: blink 1s step-end infinite; color: var(--text); }
@keyframes blink { 50% { opacity: 0; } }

.topic { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.3rem; }
.topic__tag {
  display: inline-flex;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(100,140,255,0.1);
  color: var(--accent);
  min-width: 3.2rem;
  justify-content: center;
  font-family: var(--font);
}
.topic__tag--reasoning { background: rgba(168,85,247,0.15); color: #a78bfa; }
.topic__tag--retrieval { background: rgba(34,211,238,0.12); color: #22d3ee; }
.topic__tag--nl2sql { background: rgba(100,140,255,0.15); color: #6c8cff; }
.topic__tag--agentic { background: rgba(244,114,182,0.12); color: #f472b6; }
.topic__tag--slm { background: rgba(74,222,128,0.12); color: #4ade80; }
.topic__tag--feedback { background: rgba(251,191,36,0.12); color: #fbbf24; }

/* ============ BIO ============ */
.bio {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.75rem;
  position: relative;
}
.bio::before {
  content: '\201C';
  position: absolute;
  top: 0.25rem;
  left: 0.75rem;
  font-size: 3.5rem;
  line-height: 1;
  color: var(--accent);
  opacity: 0.15;
  font-family: Georgia, serif;
  pointer-events: none;
}
.bio p {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.8;
  margin-bottom: 0.85rem;
  text-align: justify;
}
.bio p:last-child { margin-bottom: 0; }
.bio p:first-of-type { margin-top: 0.5rem; }

/* ============ SYSTEMS GRID ============ */
.systems-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 1rem;
}
.sys-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: border-color 0.2s, transform 0.2s;
}
.sys-card:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
}
.sys-card__icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  background: rgba(100,140,255,0.08);
  display: grid;
  place-items: center;
  margin-bottom: 0.8rem;
  color: var(--accent);
  font-size: 0.9rem;
}
.sys-card__title { font-size: 0.95rem; font-weight: 600; margin-bottom: 0.5rem; }
.sys-card__desc { font-size: 0.82rem; color: var(--text-light); line-height: 1.6; margin-bottom: 0.8rem; }
.sys-card__tags { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.sys-card__tags span {
  font-size: 0.7rem;
  font-weight: 500;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  color: var(--text-lighter);
  border: 1px solid var(--border);
}

/* ============ TIMELINE ============ */
.timeline { display: flex; flex-direction: column; gap: 0; }
.tl-item {
  display: flex;
  gap: 1rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
}
.tl-item:last-child { border-bottom: none; }
.tl-item__dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--border-light);
  margin-top: 0.35rem;
  flex-shrink: 0;
  border: 2px solid var(--bg);
  outline: 1px solid var(--border-light);
}
.tl-item__body { flex: 1; min-width: 0; }
.tl-item__meta {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  margin-bottom: 0.2rem;
  flex-wrap: wrap;
}
.tl-item__date { font-size: 0.75rem; font-weight: 500; color: var(--text-lighter); font-family: var(--font-mono); }
.tl-item__company { font-size: 0.8rem; font-weight: 600; color: var(--accent); }
.tl-item__role { font-size: 0.9rem; font-weight: 600; color: var(--text); margin-bottom: 0.25rem; }
.tl-item__desc { font-size: 0.82rem; color: var(--text-light); line-height: 1.65; }

/* ============ PUBLICATIONS ============ */
.pub-list { display: flex; flex-direction: column; }
.pub-item {
  display: flex;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}
.pub-item:last-child { border-bottom: none; }
.pub-item__year {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-lighter);
  min-width: 2.5rem;
  padding-top: 0.1rem;
  flex-shrink: 0;
}
.pub-item__content { flex: 1; min-width: 0; }
.pub-item__title { font-size: 0.85rem; font-weight: 600; color: var(--text); display: block; margin-bottom: 0.1rem; }
.pub-item__authors { font-size: 0.78rem; color: var(--text-light); display: block; margin-bottom: 0.05rem; }
.pub-item__venue { font-size: 0.75rem; color: var(--text-lighter); font-style: italic; display: block; margin-bottom: 0.3rem; }
.pub-item__links { display: flex; gap: 0.5rem; }
.pub-item__links a {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: rgba(100,140,255,0.08);
  color: var(--accent);
  transition: background 0.2s;
}
.pub-item__links a:hover { background: rgba(100,140,255,0.18); }

.pub-profiles {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.pub-profile {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.35rem 0.8rem;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-light);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: border-color 0.2s, color 0.2s;
}
.pub-profile:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ============ EDUCATION ============ */
.edu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}
.edu-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}
.edu-card__icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
  background: rgba(100,140,255,0.08);
  display: grid;
  place-items: center;
  margin-bottom: 0.6rem;
  color: var(--accent);
  font-size: 0.85rem;
}
.edu-card h3 { font-size: 0.9rem; font-weight: 600; margin-bottom: 0.15rem; }
.edu-card__school { font-size: 0.82rem; color: var(--accent); font-weight: 500; margin-bottom: 0.3rem; }
.edu-card__detail { font-size: 0.78rem; color: var(--text-lighter); line-height: 1.6; }

/* ============ AWARDS ============ */
.awards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}
.award-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  transition: border-color 0.2s;
}
.award-card:hover { border-color: var(--border-light); }
.award-card__year {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent);
  background: rgba(100,140,255,0.08);
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  display: inline-block;
  width: fit-content;
}
.award-card__title { font-size: 0.85rem; font-weight: 600; color: var(--text); line-height: 1.4; }
.award-card__org { font-size: 0.78rem; color: var(--text-lighter); }

/* ============ FOOTER ============ */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 2rem 1.5rem;
}
.footer__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer__links { display: flex; gap: 1rem; }
.footer__links a { color: var(--text-lighter); font-size: 1.1rem; }
.footer__links a:hover { color: var(--text); }
.footer__copy { font-size: 0.78rem; color: var(--text-lighter); }

/* ============ RESPONSIVE ============ */
@media (max-width: 640px) {
  .nav__links { display: none; }
  .hero { padding-top: 6rem; }
  .metrics__inner { gap: 1.2rem; }
  .systems-grid { grid-template-columns: 1fr; }
  .edu-grid { grid-template-columns: 1fr; }
  .footer__inner { flex-direction: column; gap: 0.8rem; }
}
