/* ===== CSS Variables ===== */
:root {
  --primary: #1a365d;
  --primary-light: #2c5282;
  --accent: #3182ce;
  --accent-light: #63b3ed;
  --bg: #ffffff;
  --bg-alt: #f7fafc;
  --bg-dark: #0f172a;
  --text: #2d3748;
  --text-light: #718096;
  --text-white: #f7fafc;
  --border: #e2e8f0;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
  --radius: 8px;
  --radius-lg: 12px;
  --transition: 0.3s ease;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  line-height: 1.7;
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

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

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

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

/* ===== Navigation ===== */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--transition);
}

#navbar.scrolled {
  box-shadow: var(--shadow-md);
}

.nav-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--primary);
  letter-spacing: -0.5px;
}

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

.nav-links {
  display: flex;
  list-style: none;
  gap: 8px;
  align-items: center;
}

.nav-links a {
  color: var(--text-light);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 6px;
  transition: all var(--transition);
}

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

.nav-cv {
  background: var(--primary) !important;
  color: white !important;
  padding: 6px 16px !important;
}

.nav-cv:hover {
  background: var(--primary-light) !important;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

/* ===== Hero Section ===== */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 100px 24px 60px;
  background: linear-gradient(135deg, var(--bg) 0%, var(--bg-alt) 100%);
}

.hero-content {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 60px;
  width: 100%;
}

.hero-text {
  flex: 1;
}

.hero-greeting {
  font-size: 1rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 8px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.hero-text h1 {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 700;
  color: var(--primary);
  line-height: 1.1;
  margin-bottom: 12px;
  letter-spacing: -1px;
}

.hero-tagline {
  font-size: 1.25rem;
  color: var(--text);
  font-weight: 500;
  margin-bottom: 4px;
}

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

.hero-stats {
  display: flex;
  gap: 32px;
  margin-bottom: 32px;
}

.stat {
  display: flex;
  flex-direction: column;
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
}

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

.hero-links a {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg);
  color: var(--text-light);
  border: 1px solid var(--border);
  font-size: 1.1rem;
  transition: all var(--transition);
}

.hero-links a:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  transform: translateY(-2px);
}

.hero-image {
  flex-shrink: 0;
}

.hero-image img {
  width: 280px;
  height: 280px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid white;
  box-shadow: var(--shadow-lg);
}

/* ===== Section Styles ===== */
section {
  padding: 80px 0;
}

section:nth-child(even) {
  background: var(--bg-alt);
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 40px;
  position: relative;
  padding-bottom: 12px;
}

.section-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 48px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

.section-subtitle {
  color: var(--text-light);
  margin-top: -28px;
  margin-bottom: 36px;
  font-size: 1rem;
}

/* ===== About Section ===== */
.about-content p {
  font-size: 1.05rem;
  margin-bottom: 16px;
  color: var(--text);
}

.about-interests {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.about-interests h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 16px;
}

.interest-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.interest-tags span {
  background: var(--primary);
  color: white;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
}

/* ===== Research Section ===== */
.research-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.research-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: all var(--transition);
}

.research-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-color: var(--accent-light);
}

.research-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.25rem;
  margin-bottom: 20px;
}

.research-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 12px;
}

.research-card p {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 16px;
}

.research-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.research-tags span {
  background: var(--bg-alt);
  color: var(--accent);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ===== Publications Section ===== */
.pub-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.pub-item {
  display: flex;
  gap: 24px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: all var(--transition);
}

.pub-item:hover {
  box-shadow: var(--shadow-md);
  border-left: 3px solid var(--accent);
}

.pub-year {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
  min-width: 50px;
  padding-top: 4px;
}

.pub-venue {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent);
  margin-bottom: 8px;
}

.pub-venue i {
  margin-right: 4px;
}

.pub-badge {
  background: #38a169;
  color: white;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  margin-left: 8px;
  text-transform: uppercase;
}

.pub-content h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.4;
  font-family: 'Crimson Pro', Georgia, serif;
  font-size: 1.15rem;
}

.pub-authors {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 4px;
}

.pub-detail {
  font-size: 0.85rem;
  color: var(--text-light);
  font-style: italic;
  margin-bottom: 12px;
}

.pub-links {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.pub-links a {
  font-size: 0.85rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border: 1px solid var(--accent);
  border-radius: 4px;
  transition: all var(--transition);
}

.pub-links a:hover {
  background: var(--accent);
  color: white;
}

.pub-doi {
  font-size: 0.8rem;
  color: var(--text-light);
  font-family: monospace;
}

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

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

.timeline-item {
  position: relative;
  margin-bottom: 36px;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-marker {
  position: absolute;
  left: -32px;
  top: 8px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 2px var(--accent);
  z-index: 1;
}

.timeline-date {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 4px;
}

.timeline-content h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 4px;
}

.timeline-content h4 {
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--text-light);
  margin-bottom: 12px;
}

.timeline-content p {
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.inline-link {
  font-size: 0.85rem;
}

/* ===== Projects Grid ===== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.project-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: all var(--transition);
}

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

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.project-header > i {
  font-size: 1.5rem;
  color: var(--accent);
}

.project-header a {
  color: var(--text-light);
  font-size: 1.25rem;
}

.project-header a:hover {
  color: var(--primary);
}

.project-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 12px;
}

.project-card p {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 16px;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.project-tags span {
  background: var(--bg-alt);
  color: var(--text-light);
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
}

/* ===== Experience Section ===== */
.experience-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
}

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

.exp-header h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 4px;
}

.exp-header h4 {
  font-size: 1rem;
  font-weight: 400;
  color: var(--accent);
}

.exp-date {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
}

.exp-highlights {
  list-style: none;
  margin-bottom: 24px;
}

.exp-highlights li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 10px;
  font-size: 0.95rem;
  color: var(--text);
}

.exp-highlights li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.exp-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.exp-skills span {
  background: var(--bg-alt);
  color: var(--text-light);
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 500;
}

/* ===== Achievements Section ===== */
.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
}

.achievement-category h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.achievement-category h3 i {
  color: var(--accent);
}

.achievement-item {
  padding: 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  font-size: 0.95rem;
  transition: all var(--transition);
}

.achievement-item:hover {
  border-left: 3px solid var(--accent);
}

.achievement-item small {
  color: var(--text-light);
  font-size: 0.85rem;
}

/* ===== Footer ===== */
footer {
  background: var(--bg-dark);
  color: var(--text-white);
  padding: 60px 0 24px;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.footer-text h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.footer-text p {
  color: #a0aec0;
  max-width: 500px;
  font-size: 0.95rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a {
  color: #a0aec0;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color var(--transition);
}

.footer-links a:hover {
  color: white;
}

.footer-copy {
  text-align: center;
  color: #4a5568;
  font-size: 0.8rem;
  padding-top: 24px;
  border-top: 1px solid #2d3748;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: white;
    border-bottom: 1px solid var(--border);
    padding: 16px 24px;
    box-shadow: var(--shadow-md);
  }

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

  .hero-content {
    flex-direction: column-reverse;
    text-align: center;
    gap: 40px;
  }

  .hero-image img {
    width: 200px;
    height: 200px;
  }

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

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

  .section-title {
    font-size: 1.75rem;
  }

  .pub-item {
    flex-direction: column;
    gap: 8px;
  }

  .pub-year {
    min-width: auto;
  }

  .exp-header {
    flex-direction: column;
  }

  .footer-content {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  section {
    padding: 60px 0;
  }

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

  .hero-stats {
    gap: 20px;
  }

  .stat-number {
    font-size: 1.5rem;
  }
}

/* ===== Scroll 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);
}
