/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0f1117;
  --bg2: #161b27;
  --bg3: #1e2535;
  --accent: #6c63ff;
  --accent2: #a78bfa;
  --text: #e2e8f0;
  --text-muted: #8892a4;
  --border: #2a3346;
  --radius: 12px;
  --font: 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', monospace;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
}

a { color: var(--accent2); text-decoration: none; transition: color 0.2s; }
a:hover { color: #fff; }

/* ── Nav ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2.5rem;
  background: rgba(15,17,23,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  letter-spacing: -0.02em;
}

.nav-logo span { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--text); }

/* ── Hero ── */
#hero {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 2rem 4rem;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(108,99,255,0.18) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 80% 60%, rgba(167,139,250,0.08) 0%, transparent 60%);
  pointer-events: none;
}

.hero-inner {
  max-width: 900px;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4rem;
  align-items: center;
}

.hero-text .tag {
  display: inline-block;
  background: rgba(108,99,255,0.15);
  color: var(--accent2);
  border: 1px solid rgba(108,99,255,0.3);
  border-radius: 999px;
  padding: 0.3rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

.hero-text h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

.hero-text h1 .highlight {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-text .subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 480px;
  margin-bottom: 2rem;
}

.hero-actions { display: flex; gap: 0.6rem; flex-wrap: nowrap; align-items: center; }
@media (max-width: 800px) { .hero-actions { flex-wrap: wrap; } }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.2rem;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: #5a52e0; color: #fff; transform: translateY(-1px); }

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-outline:hover { border-color: var(--accent2); color: var(--accent2); transform: translateY(-1px); }

.hero-avatar {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--border);
  box-shadow: 0 0 0 8px rgba(108,99,255,0.1), 0 20px 60px rgba(0,0,0,0.4);
}

.hero-socials {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.hero-socials a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: 8px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: all 0.2s;
  font-size: 1rem;
}
.hero-socials a:hover { border-color: var(--accent2); color: var(--accent2); background: rgba(108,99,255,0.08); }

/* ── Sections ── */
section { padding: 5rem 2rem; }

.container { max-width: 900px; margin: 0 auto; }

.section-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 3rem;
}

/* ── About ── */
#about { background: var(--bg2); }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.about-text p { color: var(--text-muted); margin-bottom: 1rem; }
.about-text p a { color: var(--accent2); }

.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-tag {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.3rem 0.75rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-family: var(--mono);
}

/* ── Experience ── */
.timeline { display: flex; flex-direction: column; gap: 0; }

.timeline-item {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 2rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.timeline-item:last-child { border-bottom: none; }

.timeline-date {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-family: var(--mono);
  padding-top: 0.2rem;
}

.timeline-content h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.timeline-content .org {
  color: var(--accent2);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.timeline-content p { color: var(--text-muted); font-size: 0.92rem; }

/* ── Publications ── */
#publications { background: var(--bg2); }

.pub-list { display: flex; flex-direction: column; gap: 1.25rem; }

.pub-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color 0.2s, transform 0.2s;
}
.pub-card:hover { border-color: var(--accent); transform: translateY(-2px); }

.pub-card .pub-year {
  font-size: 0.75rem;
  color: var(--accent2);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.pub-card h3 {
  font-size: 0.97rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  line-height: 1.5;
}

.pub-card .pub-venue {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.pub-badges { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  letter-spacing: 0.04em;
}
.badge-conf { background: rgba(34,197,94,0.15); color: #4ade80; border: 1px solid rgba(34,197,94,0.3); }
.badge-thesis { background: rgba(239,68,68,0.15); color: #f87171; border: 1px solid rgba(239,68,68,0.3); }
.badge-workshop { background: rgba(234,179,8,0.15); color: #fbbf24; border: 1px solid rgba(234,179,8,0.3); }
.badge-symposium { background: rgba(59,130,246,0.15); color: #60a5fa; border: 1px solid rgba(59,130,246,0.3); }
.badge-poster { background: rgba(249,115,22,0.15); color: #fb923c; border: 1px solid rgba(249,115,22,0.3); }

.pub-links { display: flex; gap: 1rem; margin-top: 0.75rem; }
.pub-links a { font-size: 0.82rem; color: var(--text-muted); }
.pub-links a:hover { color: var(--accent2); }

/* ── Conferences ── */
.conf-year { margin-bottom: 2rem; }
.conf-year h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent2);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.conf-year ul { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.conf-year li {
  font-size: 0.9rem;
  color: var(--text-muted);
  padding-left: 1rem;
  position: relative;
}
.conf-year li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: var(--border);
}
.conf-year li a { color: var(--text-muted); }
.conf-year li a:hover { color: var(--accent2); }

/* ── Education ── */
#education { background: var(--bg2); }

.edu-grid { display: flex; flex-direction: column; gap: 1.25rem; }

.edu-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 1rem;
}

.edu-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.2rem; }
.edu-card .inst { color: var(--accent2); font-size: 0.9rem; margin-bottom: 0.35rem; }
.edu-card .edu-desc { font-size: 0.82rem; color: var(--text-muted); margin-top: 0.4rem; line-height: 1.5; }
.edu-card .years { font-size: 0.82rem; color: var(--text-muted); font-family: var(--mono); white-space: nowrap; padding-top: 0.2rem; }

/* ── Contact ── */
#contact { background: var(--bg2); }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.contact-intro p { color: var(--text-muted); margin-bottom: 1.5rem; }

.contact-links { display: flex; flex-direction: column; gap: 0.75rem; }
.contact-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: color 0.2s;
}
.contact-link:hover { color: var(--accent2); }
.contact-link .icon { font-size: 1.1rem; width: 1.5rem; }

.contact-form { display: flex; flex-direction: column; gap: 1rem; }

.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-group label { font-size: 0.82rem; font-weight: 600; color: var(--text-muted); }

.form-group input,
.form-group textarea {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.92rem;
  transition: border-color 0.2s;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.form-group textarea { resize: vertical; min-height: 120px; }

/* ── Hamburger ── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.25s;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Stats bar ── */
.stats-bar {
  display: flex;
  justify-content: center;
  gap: 0;
  background: var(--bg2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.stat {
  flex: 1;
  max-width: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem 1rem;
  border-right: 1px solid var(--border);
}
.stat:last-child { border-right: none; }
.stat-num {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  margin-top: 0.2rem;
}

/* ── Nav active state ── */
.nav-links a.active { color: var(--text); }

/* ── Publications year grouping ── */
.pub-year-heading {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent2);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}
.pub-year-group { margin-bottom: 1.75rem; }
.pub-year-group .pub-card { margin-bottom: 0.75rem; }
.pub-year-group .pub-card:last-child { margin-bottom: 0; }

/* ── Back to top ── */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.3s, transform 0.3s;
  z-index: 200;
  box-shadow: 0 4px 16px rgba(108,99,255,0.35);
}
.back-to-top.visible { opacity: 1; transform: translateY(0); }
.back-to-top:hover { background: #5a52e0; }

/* ── Footer ── */
footer {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  border-top: 1px solid var(--border);
}
footer a { color: var(--text-muted); margin: 0 2px; transition: color 0.2s; }
footer a:hover { color: var(--accent2); }

/* ── Responsive ── */
@media (max-width: 600px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-avatar { width: 160px; height: 160px; margin: 0 auto; }
  .hero-actions, .hero-socials { justify-content: center; }
  .hero-text .subtitle { margin: 0 auto 2rem; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 2rem; }
  .timeline-item { grid-template-columns: 1fr; gap: 0.25rem; }
  .edu-card { flex-direction: column; }

  .stats-bar { flex-wrap: wrap; }
  .stat { max-width: none; width: 50%; border-right: none; border-bottom: 1px solid var(--border); }
  .stat:nth-child(1), .stat:nth-child(2) { border-right: 1px solid var(--border); }
  .stat:nth-child(3), .stat:nth-child(4) { border-bottom: none; }
  .back-to-top { bottom: 1.25rem; right: 1.25rem; width: 36px; height: 36px; }

  .nav-hamburger { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: rgba(15,17,23,0.97);
    backdrop-filter: blur(12px);
    flex-direction: column;
    padding: 1rem 2rem 1.5rem;
    gap: 1rem;
    border-bottom: 1px solid var(--border);
  }
  .nav-links.open { display: flex; }
  nav { padding: 1rem 1.5rem; position: relative; }
}
