/* ===== CSS Variables ===== */
:root {
  --primary: #2c5f8a;
  --primary-light: #3a7cb8;
  --primary-dark: #1e4263;
  --accent: #e8913a;
  --bg: #f7f8fc;
  --bg-card: #ffffff;
  --text: #2d3748;
  --text-light: #64748b;
  --text-lighter: #94a3b8;
  --border: #e2e8f0;
  --shadow: 0 4px 24px rgba(44, 95, 138, 0.08);
  --shadow-hover: 0 8px 32px rgba(44, 95, 138, 0.14);
  --radius: 12px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;
  --max-width: 960px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ===== Navigation ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

.navbar.scrolled {
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  letter-spacing: -0.02em;
}

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

.nav-links a {
  display: block;
  padding: 0.5rem 1rem;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-light);
  text-decoration: none;
  border-radius: 8px;
  transition: var(--transition);
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
  background: rgba(44, 95, 138, 0.06);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2px;
  background: var(--primary);
  border-radius: 1px;
}

/* Mobile menu toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  margin: 5px 0;
  border-radius: 2px;
  transition: var(--transition);
}

/* ===== Hero Section ===== */
.hero {
  padding: 8rem 2rem 4rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.hero-content {
  display: flex;
  align-items: center;
  gap: 3rem;
}

.hero-avatar {
  width: 180px;
  height: 220px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--primary-light), var(--primary-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 3.5rem;
  color: white;
  flex-shrink: 0;
  box-shadow: 0 8px 32px rgba(44, 95, 138, 0.2);
  overflow: hidden;
}

.hero-avatar img {
  width: 100%;
  height: 100%;
  border-radius: var(--radius);
  object-fit: cover;
}

.hero-text h1 {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 0.25rem;
  letter-spacing: -0.02em;
}

.hero-text .subtitle {
  font-size: 1.1rem;
  color: var(--text-light);
  margin-bottom: 1rem;
}

.hero-text .affiliation {
  font-size: 0.95rem;
  color: var(--text-lighter);
}

.hero-text .affiliation a {
  color: var(--primary);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: var(--transition);
}

.hero-text .affiliation a:hover {
  border-bottom-color: var(--primary);
}

.hero-links {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}

.hero-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--primary);
  background: rgba(44, 95, 138, 0.07);
  border-radius: 20px;
  text-decoration: none;
  transition: var(--transition);
}

.hero-links a:hover {
  background: rgba(44, 95, 138, 0.14);
  transform: translateY(-1px);
}

/* ===== Main Content ===== */
.main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem 4rem;
}

/* ===== Section ===== */
.section {
  margin-bottom: 3rem;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border);
  letter-spacing: -0.01em;
}

/* ===== Cards ===== */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid var(--border);
}

.card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.card + .card {
  margin-top: 1rem;
}

/* ===== Education Timeline ===== */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  margin-bottom: 1.75rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -2rem;
  top: 8px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 3px rgba(44, 95, 138, 0.15);
}

.timeline-item h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.2rem;
}

.timeline-item .period {
  font-size: 0.88rem;
  color: var(--text-lighter);
  font-weight: 500;
}

.timeline-item .institution {
  font-size: 0.95rem;
  color: var(--text-light);
}

/* ===== Research Interests Tags ===== */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  display: inline-block;
  padding: 0.4rem 1rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--primary);
  background: rgba(44, 95, 138, 0.07);
  border-radius: 20px;
  transition: var(--transition);
}

.tag:hover {
  background: rgba(44, 95, 138, 0.14);
}

/* ===== Publication List ===== */
.pub-item {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: var(--transition);
  margin-bottom: 1rem;
}

.pub-item:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
  border-left: 3px solid var(--primary);
}

.pub-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.4rem;
  line-height: 1.5;
}

.pub-venue {
  font-size: 0.9rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.pub-authors {
  font-size: 0.88rem;
  color: var(--text-light);
  margin-bottom: 0.65rem;
  line-height: 1.6;
}

.pub-year {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--primary);
  background: rgba(44, 95, 138, 0.08);
  padding: 0.15rem 0.6rem;
  border-radius: 10px;
  margin-bottom: 0.4rem;
}

.pub-doi a {
  font-size: 0.85rem;
  color: var(--primary);
  text-decoration: none;
  border-bottom: 1px dashed var(--primary-light);
  transition: var(--transition);
}

.pub-doi a:hover {
  border-bottom-style: solid;
}

.pub-links {
  margin-left: 0;
}

.pub-links a {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--primary);
  text-decoration: none;
  border-bottom: 1px dashed var(--primary-light);
  transition: var(--transition);
}

.pub-links a:hover {
  border-bottom-style: solid;
}

/* ===== Students Page ===== */
.student-entry {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: var(--transition);
  margin-bottom: 1rem;
}

.student-entry:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
  border-left: 3px solid var(--primary);
}

.student-year {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--primary);
  background: rgba(44, 95, 138, 0.08);
  padding: 0.2rem 0.7rem;
  border-radius: 10px;
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 2px;
}

.student-info {
  flex: 1;
}

.student-names {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.3rem;
  line-height: 1.5;
}

.student-type {
  font-size: 0.9rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.student-topic {
  font-size: 0.92rem;
  color: var(--text);
  margin-bottom: 0.25rem;
  line-height: 1.5;
}

.student-detail {
  font-size: 0.88rem;
  color: var(--text-light);
  line-height: 1.5;
}

.student-detail a {
  color: var(--primary);
  text-decoration: none;
  border-bottom: 1px dashed var(--primary-light);
  transition: var(--transition);
}

.student-detail a:hover {
  border-bottom-style: solid;
}

/* ===== Contact Page ===== */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 1.25rem;
  align-items: stretch;
}

.contact-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: var(--transition);
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

@media (max-width: 1200px) {
  .contact-grid {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }
}

@media (max-width: 620px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

.contact-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.contact-card-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.contact-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(44, 95, 138, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.contact-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

.contact-card p,
.contact-card a {
  font-size: 0.92rem;
  color: var(--text-light);
  text-decoration: none;
  transition: var(--transition);
  word-break: break-word;
}

.contact-card a:hover {
  color: var(--primary);
}

.map-placeholder {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  margin-top: 2rem;
  text-align: center;
  color: var(--text-light);
}

.map-placeholder iframe {
  width: 100%;
  height: 300px;
  border: none;
  border-radius: 8px;
}

/* ===== Page Header ===== */
.page-header {
  padding: 7rem 2rem 2.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.page-header h1 {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--primary-dark);
  letter-spacing: -0.02em;
}

.page-header p {
  color: var(--text-light);
  margin-top: 0.5rem;
  font-size: 1.05rem;
}

/* ===== Footer ===== */
.footer {
  text-align: center;
  padding: 2rem;
  color: var(--text-lighter);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
  max-width: var(--max-width);
  margin: 2rem auto 0;
}

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

/* ===== Animations ===== */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .hero-content {
    flex-direction: column;
    text-align: center;
  }

  .hero-text h1 {
    font-size: 2rem;
  }

  .hero-links {
    justify-content: center;
  }

  .hero-avatar {
    width: 140px;
    height: 170px;
    font-size: 2.5rem;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-toggle {
    display: block;
  }

  .nav-toggle.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .nav-toggle.open span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  .student-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .page-header h1 {
    font-size: 1.8rem;
  }
}
