:root {
  --bg: #0f1419;
  --surface: #1a1f2e;
  --surface-hover: #232a3e;
  --border: #2a3244;
  --text: #e8ecf4;
  --text-dim: #9ca7bc;
  --accent: #64d2ff;
  --accent-glow: rgba(100, 210, 255, 0.15);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, "SF Pro Display", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

.bg-gradient {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 20% 10%, rgba(100, 210, 255, 0.08), transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(255, 140, 107, 0.06), transparent 40%);
  pointer-events: none;
}

main {
  max-width: 880px;
  margin: 0 auto;
  padding: 60px 24px 40px;
}

/* Hero */
.hero {
  text-align: center;
  padding: 40px 0 60px;
}

.avatar {
  width: 120px;
  height: 120px;
  margin: 0 auto 24px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--accent);
  box-shadow: 0 8px 32px var(--accent-glow);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

h1 {
  font-size: 2.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.subtitle {
  font-size: 1.15rem;
  color: var(--text-dim);
  margin-bottom: 4px;
}

.affiliation {
  font-size: 0.95rem;
  color: var(--text-dim);
  margin-bottom: 28px;
}

.links {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.2s ease;
}
.link-btn:hover {
  background: var(--surface-hover);
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--accent-glow);
}

/* Sections */
.section {
  margin-bottom: 56px;
}

.section h2 {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  letter-spacing: -0.01em;
}

.section p {
  color: var(--text-dim);
  font-size: 1rem;
}
.section p strong {
  color: var(--accent);
  font-weight: 600;
}

/* Project cards */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  transition: all 0.25s ease;
}
.project-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.project-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 14px;
}

.project-card h3 {
  font-size: 1.15rem;
  margin-bottom: 4px;
  font-weight: 600;
}

.project-meta {
  font-size: 0.82rem !important;
  color: var(--accent) !important;
  margin-bottom: 12px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}

.project-desc {
  font-size: 0.92rem !important;
  margin-bottom: 16px;
  line-height: 1.55 !important;
}

.project-links {
  display: flex;
  gap: 14px;
  font-size: 0.9rem;
}
.project-links a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}
.project-links a:hover { text-decoration: underline; }

/* Timeline (Education) */
.timeline {
  position: relative;
  padding-left: 28px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: linear-gradient(180deg, var(--accent), var(--border));
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  padding-bottom: 24px;
}
.timeline-item:last-child { padding-bottom: 0; }

.timeline-dot {
  position: absolute;
  left: -28px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--border);
}
.timeline-item.current .timeline-dot {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-glow);
}

.degree {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}
.school {
  font-size: 0.9rem;
  color: var(--text-dim);
  margin-bottom: 4px;
}
.research {
  font-size: 0.88rem;
  color: var(--accent);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}
.research em {
  font-style: italic;
  color: var(--accent);
}
.degree-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  background: var(--accent-glow);
  color: var(--accent);
  border-radius: 5px;
  vertical-align: middle;
}

/* Publications */
.pub-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 24px;
  transition: all 0.25s ease;
  border-left: 3px solid var(--accent);
}
.pub-card:hover {
  border-color: var(--accent);
  border-left-color: var(--accent);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

.pub-header {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.pub-venue {
  display: inline-block;
  padding: 3px 10px;
  background: var(--accent);
  color: var(--bg);
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.pub-category {
  font-size: 0.78rem;
  color: var(--text-dim);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}

.pub-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.4;
}
.pub-title a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.15s ease;
}
.pub-title a:hover {
  color: var(--accent);
}

.pub-authors {
  font-size: 0.88rem !important;
  color: var(--text-dim) !important;
  margin-bottom: 10px !important;
  line-height: 1.55 !important;
}
.pub-authors strong {
  color: var(--accent) !important;
  font-weight: 600;
}

.pub-abstract {
  font-size: 0.88rem !important;
  color: var(--text-dim) !important;
  margin-bottom: 14px !important;
  line-height: 1.55 !important;
  font-style: italic;
}

.pub-links {
  display: flex;
  gap: 14px;
  font-size: 0.88rem;
}
.pub-links a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  padding: 3px 0;
}
.pub-links a:hover { text-decoration: underline; }

/* Tech stack */
.stack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.stack-group h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-bottom: 10px;
  font-weight: 600;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-block;
  padding: 6px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.85rem;
  color: var(--text);
  transition: all 0.15s ease;
}
.chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Footer */
.footer {
  text-align: center;
  padding-top: 40px;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.88rem;
}
.footer .small {
  font-size: 0.8rem;
  margin-top: 4px;
  opacity: 0.7;
}

/* Responsive */
@media (max-width: 600px) {
  h1 { font-size: 2rem; }
  main { padding: 40px 20px 30px; }
  .avatar { width: 100px; height: 100px; }
}
