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

:root {
  --bg: #0d1117;
  --surface: #161b22;
  --surface2: #1e2530;
  --border: #30363d;
  --accent: #58a6ff;
  --accent2: #3fb950;
  --text: #e6edf3;
  --muted: #8b949e;
  --tag-bg: #1f3a5f;
  --tag-text: #79c0ff;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13,17,23,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

nav .logo { font-weight: 700; color: var(--accent); font-size: 1.05rem; letter-spacing: 0.03em; }
nav ul { list-style: none; display: flex; gap: 1.5rem; }
nav ul a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s;
}
nav ul a:hover { color: var(--text); }

.hero {
  max-width: 900px;
  margin: 0 auto;
  padding: 6rem 2rem 4rem;
  text-align: center;
}

.avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 1.5rem;
  box-shadow: 0 0 0 4px var(--surface), 0 0 0 6px var(--border);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.hero h1 span { color: var(--accent); }

.tagline {
  margin-top: 1rem;
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.tagline strong { color: var(--text); }

.hero-links {
  margin-top: 2rem;
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1.2rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.15s;
}

.btn:hover { opacity: 0.85; transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #0d1117; }
.btn-secondary { background: var(--surface2); color: var(--text); border: 1px solid var(--border); }
.btn svg { width: 16px; height: 16px; }

section {
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

.section-title {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
}

hr.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0 2rem;
}

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

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.4rem 1.6rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.25rem 1rem;
  transition: border-color 0.2s, transform 0.15s;
}

.card:hover { border-color: var(--accent); transform: translateY(-2px); }
.card-left { grid-column: 1; }
.card-right { grid-column: 2; text-align: right; }

.card-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
}

.card-org {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 500;
  margin-top: 0.15rem;
}

.card-location {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

.card-date {
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
}

.card-supervisor {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

.card-supervisor a {
  color: var(--muted);
  text-decoration: none;
}

.card-supervisor a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.card-desc {
  grid-column: 1 / -1;
  margin-top: 0.75rem;
}

.card-desc ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.card-desc ul li {
  font-size: 0.875rem;
  color: var(--muted);
  padding-left: 1rem;
  position: relative;
}

.card-desc ul li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

.badge {
  display: inline-block;
  background: var(--tag-bg);
  color: var(--tag-text);
  font-size: 0.72rem;
  font-weight: 500;
  padding: 0.2rem 0.55rem;
  border-radius: 20px;
  margin-top: 0.5rem;
}

.badge-green {
  background: #1a3a28;
  color: #56d364;
}

.badge-yellow {
  background: #3a2f00;
  color: #e3b341;
  margin-top: 0;
}

/* Publications */
.pub-list { display: flex; flex-direction: column; gap: 1rem; }

.pub-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem 1.6rem;
  transition: border-color 0.2s, transform 0.15s;
}

.pub-card:hover { border-color: var(--accent); transform: translateY(-2px); }

.pub-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.pub-year {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 600;
}

.pub-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  font-style: italic;
  margin-bottom: 0.4rem;
}

.pub-authors {
  font-size: 0.82rem;
  color: var(--muted);
}

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

.edu-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem 1.6rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  transition: border-color 0.2s, transform 0.15s;
}

.edu-card:hover { border-color: var(--accent2); transform: translateY(-2px); }
.edu-degree { font-weight: 600; font-size: 0.95rem; color: var(--text); }
.edu-school { color: var(--accent2); font-size: 0.875rem; font-weight: 500; margin-top: 0.2rem; }
.edu-detail { color: var(--muted); font-size: 0.8rem; margin-top: 0.3rem; }
.edu-year { color: var(--muted); font-size: 0.8rem; white-space: nowrap; text-align: right; }

/* Skills */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.skill-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.2rem;
}

.skill-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.6rem;
}

.skill-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }

.skill-tag {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.78rem;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
}

/* Awards */
.awards-list { display: flex; flex-direction: column; gap: 0.75rem; }

.award-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.9rem 1.4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  transition: border-color 0.2s, transform 0.15s;
}

.award-item:hover { border-color: var(--accent2); transform: translateY(-2px); }

.award-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.award-meta {
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
}

/* Languages */
.lang-grid { display: flex; flex-direction: column; }

.lang-item {
  display: flex;
  align-items: baseline;
  gap: 1.25rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--border);
}

.lang-item:last-child { border-bottom: none; }

.lang-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  min-width: 80px;
}

.lang-level {
  font-size: 0.85rem;
  color: var(--muted);
}

footer {
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 2rem;
  color: var(--muted);
  font-size: 0.82rem;
}

footer a { color: var(--accent); text-decoration: none; }

@media (max-width: 640px) {
  nav { padding: 0 1rem; }
  nav ul { gap: 1rem; }
  nav ul a { font-size: 0.75rem; }

  .hero { padding: 3rem 1.25rem 2.5rem; }
  .tagline { font-size: 0.95rem; }

  section { padding: 2rem 1.25rem; }
  hr.divider { margin: 0 1.25rem; }

  .card {
    grid-template-columns: 1fr;
    padding: 1.1rem 1.2rem;
  }
  .card-right { text-align: left; }

  .edu-card { flex-direction: column; }
  .edu-year { text-align: left; }

  .award-item { flex-direction: column; align-items: flex-start; }
  .award-meta { white-space: normal; }

  .skills-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 400px) {
  nav ul { display: none; }
  .skills-grid { grid-template-columns: 1fr; }
  .hero-links { flex-direction: column; align-items: center; }
  .btn { width: 100%; justify-content: center; }
}
