/* ── Variables ── */
:root {
  --bg: #ffffff;
  --bg-alt: #f8f9fb;
  --surface: #ffffff;
  --border: #e5e7eb;
  --text: #111827;
  --text-muted: #6b7280;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-light: #eff6ff;
  --tag-bg: #f1f5f9;
  --tag-text: #475569;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 4px 16px rgba(0,0,0,.06);
  --nav-h: 64px;
  --transition: 0.2s ease;
}

[data-theme="dark"] {
  --bg: #0f172a;
  --bg-alt: #1e293b;
  --surface: #1e293b;
  --border: #334155;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --accent: #60a5fa;
  --accent-hover: #93c5fd;
  --accent-light: #1e3a5f;
  --tag-bg: #0f172a;
  --tag-text: #94a3b8;
  --shadow: 0 1px 3px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.25);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Inter", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background var(--transition), color var(--transition);
}

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

/* ── Container ── */
.container { max-width: 900px; margin: 0 auto; padding: 0 24px; }

/* ── Navbar ── */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  transition: background var(--transition), border-color var(--transition);
}

[data-theme="dark"] #navbar {
  background: rgba(15,23,42,0.85);
}

.nav-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -1px;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 4px;
  margin-left: auto;
}

.nav-links a {
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition), background var(--transition);
}

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

.theme-toggle {
  margin-left: 8px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 36px; height: 36px;
  font-size: 1rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--text);
  transition: background var(--transition), border-color var(--transition);
  flex-shrink: 0;
}

.theme-toggle:hover { background: var(--border); }

/* ── Sections ── */
section { padding: 96px 0; }

section + section { border-top: 1px solid var(--border); }

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 40px;
  letter-spacing: -0.5px;
}

.section-title::after {
  content: '';
  display: block;
  width: 40px; height: 3px;
  background: var(--accent);
  border-radius: 2px;
  margin-top: 8px;
}

/* ── Hero ── */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-h);
  background: var(--bg);
}

.hero-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 56px;
}

.avatar {
  width: 180px; height: 180px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top;
  border: 4px solid var(--accent-light);
  box-shadow: var(--shadow);
  flex-shrink: 0;
}

.hero-text h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  letter-spacing: -2px;
  line-height: 1;
  margin-bottom: 12px;
}

.dot { color: var(--accent); }

.tagline {
  font-size: 1rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.bio {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 520px;
  margin-bottom: 32px;
  line-height: 1.75;
}

.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
  padding: 11px 24px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  display: inline-flex; align-items: center; gap: 6px;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border: 2px solid var(--accent);
}

.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 2px solid var(--border);
}

.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

/* ── Tabs ── */
.tab-bar {
  display: flex;
  gap: 4px;
  margin-bottom: 32px;
  border-bottom: 2px solid var(--border);
}

.tab {
  padding: 10px 20px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all var(--transition);
}

.tab:hover { color: var(--text); }

.tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.tab-content { display: none; }
.tab-content.active { display: block; }

/* ── Publications ── */
.pub-list { display: flex; flex-direction: column; gap: 20px; }

.pub-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}

.pub-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0,0,0,.1);
}

.pub-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.pub-type {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 4px;
}

.pub-type.journal { background: #dcfce7; color: #166534; }
.pub-type.conference { background: #dbeafe; color: #1d4ed8; }

[data-theme="dark"] .pub-type.journal { background: #14532d; color: #86efac; }
[data-theme="dark"] .pub-type.conference { background: #1e3a5f; color: #93c5fd; }

.pub-year { font-size: 0.85rem; color: var(--text-muted); font-weight: 500; }

.pub-title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 6px;
}

.pub-authors {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.pub-venue {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 12px;
}

.pub-abstract {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 14px;
}

.tag-list { display: flex; flex-wrap: wrap; gap: 6px; }

.tag {
  font-size: 0.78rem;
  padding: 3px 10px;
  border-radius: 20px;
  background: var(--tag-bg);
  color: var(--tag-text);
  font-weight: 500;
}

.pub-doi {
  margin-top: 12px;
  font-size: 0.82rem;
  color: var(--accent);
}

/* ── Supervision ── */
.sup-list { display: flex; flex-direction: column; gap: 16px; }

.sup-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: var(--shadow);
}

.sup-badge {
  width: 52px; height: 52px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  font-weight: 800;
  flex-shrink: 0;
}

.sup-badge.phd { background: #ede9fe; color: #6d28d9; }
.sup-badge.masters { background: #fef3c7; color: #92400e; }
.sup-badge.undergraduate { background: #dcfce7; color: #166534; }

[data-theme="dark"] .sup-badge.phd { background: #3b0764; color: #c4b5fd; }
[data-theme="dark"] .sup-badge.masters { background: #451a03; color: #fde68a; }
[data-theme="dark"] .sup-badge.undergraduate { background: #14532d; color: #86efac; }

.sup-info { flex: 1; }

.sup-name { font-weight: 700; font-size: 1rem; }

.sup-topic { font-size: 0.9rem; color: var(--text-muted); margin-top: 2px; }

.sup-right { text-align: right; flex-shrink: 0; }

.sup-role { font-size: 0.82rem; font-weight: 600; color: var(--accent); }

.sup-status {
  display: inline-block;
  margin-top: 4px;
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 600;
}

.sup-status.ongoing { background: #dcfce7; color: #166534; }
.sup-status.completed { background: var(--tag-bg); color: var(--text-muted); }

[data-theme="dark"] .sup-status.ongoing { background: #14532d; color: #86efac; }

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

.timeline-item {
  display: flex;
  gap: 24px;
  position: relative;
}

.timeline-item:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 19px;
  top: 40px;
  bottom: -24px;
  width: 2px;
  background: var(--border);
}

.timeline-dot {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--accent-light);
  border: 2px solid var(--accent);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 1rem;
  margin-top: 4px;
  z-index: 1;
}

.timeline-body {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
  transition: transform var(--transition);
}

.timeline-body:hover { transform: translateY(-2px); }

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.timeline-role { font-size: 1.05rem; font-weight: 700; }

.timeline-dates {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
  padding: 3px 10px;
  background: var(--accent-light);
  border-radius: 20px;
}

.timeline-company {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.timeline-location {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.timeline-desc {
  list-style: none;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.timeline-desc li {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  padding-left: 16px;
  position: relative;
}

.timeline-desc li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 0.75rem;
  top: 3px;
}

/* ── Education ── */
.edu-list { display: flex; flex-direction: column; gap: 20px; }

.edu-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  gap: 20px;
  box-shadow: var(--shadow);
  transition: transform var(--transition);
}

.edu-card:hover { transform: translateY(-2px); }

.edu-icon {
  width: 52px; height: 52px;
  border-radius: 12px;
  background: var(--accent-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.edu-body { flex: 1; }

.edu-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.edu-degree { font-size: 1.05rem; font-weight: 700; }

.edu-years {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.edu-institution {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 2px;
}

.edu-location {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.edu-grade {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  background: #dcfce7;
  color: #166534;
  margin-bottom: 10px;
}

[data-theme="dark"] .edu-grade { background: #14532d; color: #86efac; }

.edu-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 12px;
}

/* ── Achievements ── */
#achievements { background: var(--bg-alt); }

.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.achievement-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  gap: 16px;
  box-shadow: var(--shadow);
  transition: transform var(--transition);
}

.achievement-card:hover { transform: translateY(-3px); }

.ach-icon { font-size: 1.8rem; flex-shrink: 0; line-height: 1; }

.ach-body h3 { font-size: 0.95rem; font-weight: 700; margin-bottom: 6px; }

.ach-body p { font-size: 0.87rem; color: var(--text-muted); line-height: 1.55; margin-bottom: 8px; }

.ach-year {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── Blog ── */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.blog-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform var(--transition);
  cursor: pointer;
}

.blog-card:hover { transform: translateY(-3px); }

.blog-cat {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--accent);
  margin-bottom: 10px;
}

.blog-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.45;
  margin-bottom: 10px;
}

.blog-excerpt {
  font-size: 0.87rem;
  color: var(--text-muted);
  line-height: 1.6;
  flex: 1;
  margin-bottom: 16px;
}

.blog-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border);
  padding-top: 12px;
  margin-top: auto;
}

.blog-date { font-size: 0.8rem; color: var(--text-muted); }

.blog-read { font-size: 0.8rem; color: var(--text-muted); }

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

.contact-inner { text-align: center; }

.contact-desc {
  color: var(--text-muted);
  max-width: 500px;
  margin: 0 auto 36px;
  font-size: 1rem;
  line-height: 1.7;
}

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

.contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  background: var(--surface);
  transition: all var(--transition);
  box-shadow: var(--shadow);
}

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

/* ── Footer ── */
footer {
  text-align: center;
  padding: 24px;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

/* ── Skeleton ── */
.skeleton-card {
  background: linear-gradient(90deg, var(--border) 25%, var(--bg-alt) 50%, var(--border) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius);
  height: 140px;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Hamburger ── */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px; height: 36px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  padding: 8px;
  flex-shrink: 0;
  margin-left: 8px;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
  transform-origin: center;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobile Nav ── */
.mobile-nav {
  display: none;
  position: absolute;
  top: var(--nav-h);
  left: 0; right: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 8px 24px rgba(0,0,0,.1);
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease;
}

.mobile-nav.open { max-height: 400px; }

.mobile-nav ul {
  list-style: none;
  padding: 12px 0;
}

.mobile-nav ul li a {
  display: block;
  padding: 12px 24px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition), background var(--transition);
}

.mobile-nav ul li a:hover {
  color: var(--accent);
  background: var(--bg-alt);
}

/* ── Responsive ── */
@media (max-width: 680px) {
  .hero-inner { flex-direction: column; text-align: center; gap: 28px; }
  .hero-cta { justify-content: center; }
  .bio { margin: 0 auto 32px; }
  .nav-links { display: none; }
  .menu-toggle { display: flex; }
  .mobile-nav { display: block; }
  .sup-card { flex-direction: column; align-items: flex-start; }
  .sup-right { text-align: left; }
}
