/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #0d1117;
  color: #c9d1d9;
  line-height: 1.6;
  font-size: 16px;
}
a { color: #58a6ff; text-decoration: none; transition: color 0.2s; }
a:hover { color: #79c0ff; }
ul { list-style: none; }

/* ============================================================
   LAYOUT
   ============================================================ */
.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }

/* ============================================================
   NAVBAR
   ============================================================ */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(13, 17, 23, 0.8);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}
#navbar.scrolled {
  border-color: #30363d;
  background: rgba(13, 17, 23, 0.97);
}
.nav-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-size: 1.2rem;
  font-weight: 800;
  color: #58a6ff;
  letter-spacing: 0.1em;
  font-family: 'JetBrains Mono', monospace;
}
.nav-links { display: flex; gap: 1.75rem; }
.nav-links a {
  color: #8b949e;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.nav-links a:hover { color: #e6edf3; }
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #c9d1d9;
  border-radius: 2px;
  transition: all 0.3s;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 80px 1.5rem 60px;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 15% 50%, rgba(88, 166, 255, 0.09) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 20%, rgba(163, 113, 247, 0.07) 0%, transparent 55%),
    radial-gradient(ellipse at 50% 85%, rgba(63, 185, 80, 0.04) 0%, transparent 55%);
  pointer-events: none;
}
/* Subtle grid overlay */
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(88,166,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(88,166,255,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, rgba(0,0,0,0.5) 30%, transparent 70%);
}
.hero-content { text-align: center; max-width: 720px; position: relative; z-index: 1; }
.hero-greeting {
  color: #58a6ff;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.hero-name {
  font-size: clamp(2rem, 5.5vw, 3.6rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #e6edf3 0%, #58a6ff 60%, #a371f7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-title-wrapper {
  font-size: clamp(0.95rem, 2.5vw, 1.2rem);
  color: #8b949e;
  margin-bottom: 1.25rem;
  min-height: 2em;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;
}
.hero-title-dynamic { color: #58a6ff; font-weight: 600; }
.cursor {
  color: #58a6ff;
  animation: blink 1s step-end infinite;
  font-weight: 300;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
.hero-subtitle {
  color: #8b949e;
  font-size: 0.875rem;
  margin-bottom: 2rem;
  line-height: 1.7;
}
.hero-cta { display: flex; gap: 0.65rem; justify-content: center; flex-wrap: wrap; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.55rem 1.3rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  white-space: nowrap;
}
.btn-primary { background: #238636; color: #fff; border-color: #2ea043; }
.btn-primary:hover { background: #2ea043; color: #fff; }
.btn-secondary { background: transparent; color: #c9d1d9; border-color: #30363d; }
.btn-secondary:hover { background: #21262d; color: #e6edf3; border-color: #58a6ff; }
.btn-icon {
  padding: 0.55rem 0.85rem;
  background: transparent;
  color: #8b949e;
  border-color: #30363d;
  font-size: 1rem;
}
.btn-icon:hover { color: #e6edf3; border-color: #8b949e; background: #21262d; }

/* ============================================================
   SCROLL INDICATOR
   ============================================================ */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  color: #6e7681;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: scrollBounce 2.2s ease-in-out infinite;
  z-index: 1;
}
@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.6; }
  50% { transform: translateX(-50%) translateY(7px); opacity: 1; }
}

/* ============================================================
   SECTIONS
   ============================================================ */
.section { padding: 5rem 0; }
.section-alt { background: #161b22; }
.section-title {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 700;
  color: #e6edf3;
  text-align: center;
  margin-bottom: 0;
}
.section-title::after {
  content: '';
  display: block;
  width: 40px;
  height: 3px;
  background: linear-gradient(90deg, #58a6ff, #a371f7);
  margin: 0.6rem auto 2.5rem;
  border-radius: 2px;
}
.section-subtitle {
  text-align: center;
  color: #8b949e;
  margin-top: -1.8rem;
  margin-bottom: 2rem;
  font-size: 0.875rem;
}

/* ============================================================
   ABOUT
   ============================================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 3rem;
  align-items: start;
}
.about-text p { margin-bottom: 1rem; color: #c9d1d9; font-size: 0.9375rem; }
.about-text strong { color: #e6edf3; }
.about-location {
  color: #8b949e;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-top: 0.25rem;
}
.badge {
  background: rgba(88, 166, 255, 0.1);
  color: #58a6ff;
  border: 1px solid rgba(88, 166, 255, 0.25);
  padding: 0.2rem 0.65rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
}
.about-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; }
.stat-card {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 10px;
  padding: 1.25rem 1rem;
  text-align: center;
  transition: border-color 0.2s, transform 0.2s;
}
.stat-card:hover { border-color: #58a6ff; transform: translateY(-2px); }
.stat-number { display: block; font-size: 1.8rem; font-weight: 700; color: #58a6ff; line-height: 1; }
.stat-label {
  font-size: 0.7rem;
  color: #8b949e;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 0.35rem;
  display: block;
}

/* ============================================================
   RESEARCH GRID
   ============================================================ */
.research-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
.research-card {
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 10px;
  padding: 1.4rem;
  transition: border-color 0.2s, transform 0.2s;
}
.research-card:hover { border-color: #58a6ff; transform: translateY(-3px); }
.research-icon {
  width: 42px; height: 42px;
  background: rgba(88, 166, 255, 0.1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  color: #58a6ff;
  font-size: 1.1rem;
}
.research-card h3 { font-size: 0.9rem; color: #e6edf3; margin-bottom: 0.5rem; font-weight: 600; }
.research-card p { font-size: 0.815rem; color: #8b949e; line-height: 1.55; }

/* ============================================================
   TIMELINE
   ============================================================ */
.timeline { position: relative; padding-left: 2rem; }
.timeline::before {
  content: '';
  position: absolute;
  left: 6px; top: 8px; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, #58a6ff 0%, #a371f7 50%, #3fb950 100%);
  border-radius: 2px;
}
.timeline-item { position: relative; margin-bottom: 2.25rem; }
.timeline-dot {
  position: absolute;
  left: -1.75rem;
  top: 1rem;
  width: 14px; height: 14px;
  background: #0d1117;
  border: 2px solid #58a6ff;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.2);
  transition: background 0.2s;
}
.timeline-item:hover .timeline-dot { background: #58a6ff; }
.timeline-content {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 10px;
  padding: 1.4rem 1.5rem;
  transition: border-color 0.2s;
}
.timeline-content:hover { border-color: #58a6ff; }
.timeline-header { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.3rem; flex-wrap: wrap; }
.timeline-header h3 { font-size: 0.975rem; color: #e6edf3; font-weight: 600; }
.timeline-badge {
  background: rgba(63, 185, 80, 0.1);
  color: #3fb950;
  border: 1px solid rgba(63, 185, 80, 0.3);
  padding: 0.1rem 0.5rem;
  border-radius: 12px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.timeline-org { color: #58a6ff; font-size: 0.85rem; margin-bottom: 0.2rem; }
.timeline-org i { margin-right: 0.3em; opacity: 0.7; }
.timeline-date { color: #6e7681; font-size: 0.78rem; margin-bottom: 0.85rem; }
.timeline-content ul { padding-left: 1.1rem; }
.timeline-content li {
  font-size: 0.855rem;
  color: #c9d1d9;
  margin-bottom: 0.4rem;
  line-height: 1.55;
  list-style: disc;
}
.timeline-content li strong { color: #e6edf3; }

/* ============================================================
   EDUCATION
   ============================================================ */
.edu-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
.edu-card {
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 10px;
  padding: 1.4rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  transition: border-color 0.2s, transform 0.2s;
}
.edu-card:hover { border-color: #a371f7; transform: translateY(-2px); }
.edu-icon { color: #a371f7; font-size: 1.4rem; flex-shrink: 0; padding-top: 0.15rem; }
.edu-info h3 { font-size: 0.925rem; color: #e6edf3; margin-bottom: 0.25rem; font-weight: 600; }
.edu-school { color: #58a6ff; font-size: 0.8rem; margin-bottom: 0.15rem; }
.edu-year { color: #8b949e; font-size: 0.75rem; margin-bottom: 0.4rem; }
.edu-thesis { font-size: 0.775rem; color: #6e7681; font-style: italic; line-height: 1.5; }

/* ============================================================
   SKILLS
   ============================================================ */
.skills-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.1rem; }
.skills-group-wide { grid-column: 1 / -1; }
.skills-group {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 10px;
  padding: 1.4rem;
  transition: border-color 0.2s;
}
.skills-group:hover { border-color: #30363d; }
.skills-group h3 {
  font-size: 0.85rem;
  color: #e6edf3;
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
}
.skills-group h3 i { color: #58a6ff; font-size: 0.9rem; }
.skill-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tag {
  background: #1c2128;
  border: 1px solid #30363d;
  color: #8b949e;
  padding: 0.25rem 0.7rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-family: 'JetBrains Mono', monospace;
  transition: all 0.2s;
}
.tag:hover { border-color: #58a6ff; color: #58a6ff; }
.tag.hl { border-color: rgba(88,166,255,0.4); color: #58a6ff; background: rgba(88,166,255,0.07); }

/* ============================================================
   PROJECTS
   ============================================================ */
.projects-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; margin-bottom: 2rem; }
.project-card {
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 10px;
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  transition: all 0.2s;
}
.project-card:hover {
  border-color: #58a6ff;
  transform: translateY(-4px);
  box-shadow: 0 10px 35px rgba(88, 166, 255, 0.09);
}
.project-header { display: flex; justify-content: space-between; align-items: center; }
.project-header > i { color: #58a6ff; font-size: 1.3rem; }
.project-link { color: #8b949e; font-size: 1.1rem; }
.project-link:hover { color: #e6edf3; }
.project-card h3 { font-size: 0.925rem; color: #e6edf3; font-weight: 600; }
.project-card p { font-size: 0.82rem; color: #8b949e; line-height: 1.6; flex: 1; }
.project-tags { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: auto; }
.project-tags span {
  background: rgba(88,166,255,0.07);
  color: #58a6ff;
  border: 1px solid rgba(88,166,255,0.18);
  padding: 0.15rem 0.55rem;
  border-radius: 12px;
  font-size: 0.7rem;
  font-family: 'JetBrains Mono', monospace;
}
.projects-more { text-align: center; }

/* ============================================================
   PUBLICATIONS
   ============================================================ */
.pub-tabs { display: flex; gap: 0.5rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.pub-tab {
  padding: 0.35rem 1rem;
  border-radius: 20px;
  border: 1px solid #30363d;
  background: transparent;
  color: #8b949e;
  font-size: 0.8rem;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all 0.2s;
}
.pub-tab:hover { border-color: #58a6ff; color: #58a6ff; }
.pub-tab.active {
  background: rgba(88,166,255,0.1);
  border-color: #58a6ff;
  color: #58a6ff;
}
.pub-list { display: flex; flex-direction: column; gap: 0.7rem; }
.pub-item {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 1.1rem 1.25rem;
  transition: border-color 0.2s;
}
.pub-item:hover { border-color: #58a6ff; }
.pub-item.hidden { display: none; }
.pub-badge {
  display: inline-block;
  padding: 0.12rem 0.65rem;
  border-radius: 12px;
  font-size: 0.67rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
}
.pub-badge.journal   { background: rgba(63,185,80,0.1);   color: #3fb950; border: 1px solid rgba(63,185,80,0.3); }
.pub-badge.conference{ background: rgba(88,166,255,0.1);  color: #58a6ff; border: 1px solid rgba(88,166,255,0.3); }
.pub-badge.workshop  { background: rgba(163,113,247,0.1); color: #a371f7; border: 1px solid rgba(163,113,247,0.3); }
.pub-badge.poster    { background: rgba(210,153,34,0.1);  color: #d29922; border: 1px solid rgba(210,153,34,0.3); }
.pub-badge.review    { background: rgba(210,153,34,0.1);  color: #d29922; border: 1px solid rgba(210,153,34,0.3); }
.pub-badge.preprint  { background: rgba(210,153,34,0.07); color: #d29922; border: 1px solid rgba(210,153,34,0.2); }
.pub-title  { font-size: 0.88rem; color: #e6edf3; margin-bottom: 0.25rem; font-weight: 500; line-height: 1.5; }
.pub-venue  { font-size: 0.8rem;  color: #8b949e; margin-bottom: 0.2rem; }
.pub-authors{ font-size: 0.76rem; color: #6e7681; }
.pub-citations { color: #3fb950; font-weight: 500; }
.thesis-note {
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  background: rgba(163,113,247,0.05);
  border: 1px solid rgba(163,113,247,0.2);
  border-radius: 8px;
  font-size: 0.855rem;
  color: #8b949e;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  line-height: 1.5;
}
.thesis-note i { color: #a371f7; margin-top: 0.1rem; flex-shrink: 0; }

/* ============================================================
   CONTACT
   ============================================================ */
.contact-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.contact-card, .contact-card.no-link {
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 10px;
  padding: 1.75rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-align: center;
  color: #8b949e;
  transition: all 0.2s;
  cursor: default;
}
a.contact-card { cursor: pointer; }
a.contact-card:hover { border-color: #58a6ff; color: #58a6ff; transform: translateY(-3px); box-shadow: 0 8px 25px rgba(88,166,255,0.08); }
.contact-card i { font-size: 1.5rem; }
.contact-card span { font-size: 0.82rem; word-break: break-word; }

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  background: #010409;
  border-top: 1px solid #21262d;
  padding: 1.5rem 0;
  text-align: center;
  color: #6e7681;
  font-size: 0.8rem;
}

/* ============================================================
   FADE-IN ANIMATION
   ============================================================ */
.fade-up {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   NEWS
   ============================================================ */
.news-list { display: flex; flex-direction: column; gap: 1rem; }
.news-card {
  background: #0d1117;
  border: 1px solid #30363d;
  border-left: 3px solid #58a6ff;
  border-radius: 8px;
  padding: 1.25rem 1.4rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.news-card:hover {
  border-color: #58a6ff;
  box-shadow: 0 4px 20px rgba(88, 166, 255, 0.07);
}
.news-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}
.news-date {
  font-size: 0.78rem;
  color: #6e7681;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.news-tag {
  padding: 0.15rem 0.65rem;
  border-radius: 12px;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.tag-publication { background: rgba(63,185,80,0.1);   color: #3fb950; border: 1px solid rgba(63,185,80,0.3); }
.tag-research    { background: rgba(88,166,255,0.1);  color: #58a6ff; border: 1px solid rgba(88,166,255,0.3); }
.tag-update      { background: rgba(163,113,247,0.1); color: #a371f7; border: 1px solid rgba(163,113,247,0.3); }
.news-text {
  font-size: 0.9rem;
  color: #c9d1d9;
  line-height: 1.65;
  margin-bottom: 0.85rem;
}
.news-link {
  font-size: 0.8rem;
  color: #58a6ff;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: color 0.2s, gap 0.2s;
}
.news-link:hover { color: #79c0ff; gap: 0.55rem; }

/* ============================================================
   RESPONSIVE — TABLET
   ============================================================ */
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-stats { max-width: 320px; }
  .research-grid { grid-template-columns: repeat(2, 1fr); }
  .edu-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   RESPONSIVE — MOBILE
   ============================================================ */
@media (max-width: 600px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 60px; left: 0; right: 0;
    background: rgba(13,17,23,0.98);
    border-bottom: 1px solid #30363d;
    padding: 1rem 1.5rem;
    flex-direction: column;
    gap: 1rem;
    backdrop-filter: blur(14px);
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: flex; }
  .research-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: 1fr; }
  .skills-group-wide { grid-column: auto; }
  .contact-grid { grid-template-columns: 1fr 1fr; }
  .hero-cta .btn-secondary { display: none; }
  .timeline { padding-left: 1.5rem; }
}
