﻿/* ===== CSS Variables & Themes ===== */
:root {
  --bg: #f8fafb;
  --bg-alt: #edf2f5;
  --bg-card: rgba(255,255,255,0.8);
  --text: #1a2b3c;
  --text-light: #5a6c7d;
  --primary: #2e7d6f;
  --primary-light: #4db6a0;
  --accent: #e8913a;
  --accent-light: #f5a623;
  --border: rgba(0,0,0,0.08);
  --shadow: 0 4px 24px rgba(0,0,0,0.06);
  --glass-bg: rgba(255,255,255,0.7);
  --glass-border: rgba(255,255,255,0.4);
  --nav-bg: rgba(248,250,251,0.85);
  --gradient-1: linear-gradient(135deg, #2e7d6f, #4db6a0);
  --gradient-2: linear-gradient(135deg, #e8913a, #f5a623);
}

[data-theme="dark"] {
  --bg: #0f1923;
  --bg-alt: #152230;
  --bg-card: rgba(21,34,48,0.8);
  --text: #e8edf2;
  --text-light: #8899aa;
  --primary: #4db6a0;
  --primary-light: #6fcfb8;
  --accent: #f5a623;
  --accent-light: #ffc04d;
  --border: rgba(255,255,255,0.08);
  --shadow: 0 4px 24px rgba(0,0,0,0.3);
  --glass-bg: rgba(21,34,48,0.7);
  --glass-border: rgba(255,255,255,0.08);
  --nav-bg: rgba(15,25,35,0.9);
  --gradient-1: linear-gradient(135deg, #4db6a0, #6fcfb8);
  --gradient-2: linear-gradient(135deg, #f5a623, #ffc04d);
}

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

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

body {
  font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  transition: background 0.3s, color 0.3s;
  overflow-x: hidden;
}

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

.section { padding: 100px 0; position: relative; }
.section-alt { background: var(--bg-alt); }

.section-title {
  font-size: 2.4rem;
  font-weight: 900;
  text-align: center;
  margin-bottom: 60px;
  position: relative;
  color: var(--text);
}
.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--gradient-1);
  border-radius: 2px;
  margin: 16px auto 0;
}

/* ===== Glass Card ===== */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

/* ===== Navbar ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: all 0.3s;
}
.navbar.scrolled { box-shadow: var(--shadow); }

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

.nav-logo {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -1px;
}
.nav-logo span { background: var(--gradient-1); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

.nav-menu { display: flex; list-style: none; gap: 8px; }
.nav-menu a {
  color: var(--text-light);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 0.92rem;
  font-weight: 500;
  transition: all 0.3s;
}
.nav-menu a:hover,
.nav-menu a.active {
  color: var(--primary);
  background: rgba(46,125,111,0.08);
}

.nav-controls { display: flex; align-items: center; gap: 4px; }

.theme-toggle {
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 8px;
  border-radius: 10px;
  transition: all 0.3s;
}
.theme-toggle:hover { background: var(--border); color: var(--accent); }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s;
}

/* ===== Hero ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: var(--bg);
}
#particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}
.hero-content {
  text-align: center;
  z-index: 1;
  padding: 40px 24px;
}
.hero-avatar {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255,255,255,0.25);
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  margin-bottom: 28px;
  opacity: 0;
  animation: fadeUp 0.6s 0.2s ease forwards;
}
.hero-greeting {
  font-size: 1.2rem;
  color: var(--text-light);
  margin-bottom: 8px;
  opacity: 0;
  animation: fadeUp 0.6s ease forwards;
}
.hero-name {
  font-size: 4rem;
  font-weight: 900;
  margin-bottom: 8px;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0;
  animation: fadeUp 0.6s 0.15s ease forwards;
}
.hero-typing {
  font-size: 1.3rem;
  color: var(--accent);
  font-weight: 500;
  min-height: 2rem;
  margin-bottom: 8px;
}
.cursor {
  animation: blink 0.7s infinite;
  color: var(--accent);
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.hero-title {
  font-size: 1.1rem;
  color: var(--text-light);
  margin-bottom: 32px;
  opacity: 0;
  animation: fadeUp 0.6s 0.35s ease forwards;
}
.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.6s 0.5s ease forwards;
}
.btn {
  padding: 14px 32px;
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: inherit;
}
.btn-primary {
  background: var(--gradient-1);
  color: #fff;
  box-shadow: 0 4px 16px rgba(46,125,111,0.3);
}
.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(46,125,111,0.4);
}
.btn-outline {
  border: 2px solid var(--primary);
  color: var(--primary);
}
.btn-outline:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-3px);
}
.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-light);
  font-size: 0.85rem;
  animation: bounce 2s infinite;
}
.scroll-indicator i { font-size: 1.1rem; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-10px); }
}

/* ===== About ===== */
.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}
.about-card {
  padding: 36px 28px;
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s;
}
.about-card:hover { transform: translateY(-6px); box-shadow: 0 12px 40px rgba(0,0,0,0.1); }
.about-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  background: var(--gradient-1);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: #fff;
}
.about-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
}
.about-card p { color: var(--text-light); font-size: 0.95rem; line-height: 1.7; }

.self-eval {
  padding: 36px 40px;
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}
.self-eval .quote-icon {
  font-size: 2rem;
  color: var(--primary);
  opacity: 0.3;
  margin-bottom: 12px;
}
.self-eval p {
  font-size: 1.1rem;
  color: var(--text);
  font-style: italic;
  line-height: 1.8;
}

/* ===== Education ===== */
.education-card {
  padding: 40px;
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}
.education-card .school {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.education-card .major {
  font-size: 1.1rem;
  color: var(--primary);
  font-weight: 500;
  margin-bottom: 4px;
}
.education-card .degree {
  font-size: 0.95rem;
  color: var(--text-light);
  margin-bottom: 4px;
}
.education-card .period {
  display: inline-block;
  background: var(--gradient-1);
  color: #fff;
  padding: 4px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 24px;
}
.courses-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 20px;
}
.course-tag {
  background: var(--bg-alt);
  color: var(--text);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.88rem;
  font-weight: 500;
  border: 1px solid var(--border);
  transition: all 0.3s;
}
.course-tag:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ===== Skills ===== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.skill-category {
  margin-bottom: 12px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.skill-item {
  padding: 20px 24px;
}
.skill-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}
.skill-name { font-weight: 600; font-size: 1rem; }
.skill-percent { color: var(--primary); font-weight: 700; }
.skill-bar {
  height: 8px;
  background: var(--bg-alt);
  border-radius: 4px;
  overflow: hidden;
}
.skill-fill {
  height: 100%;
  background: var(--gradient-1);
  border-radius: 4px;
  width: 0;
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Timeline (Experience) ===== */
.timeline { position: relative; max-width: 700px; margin: 0 auto; }
.timeline::before {
  content: '';
  position: absolute;
  left: 24px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--gradient-1);
  border-radius: 2px;
}
.timeline-item {
  position: relative;
  padding-left: 60px;
  margin-bottom: 36px;
}
.timeline-dot {
  position: absolute;
  left: 13px;
  top: 6px;
  width: 24px;
  height: 24px;
  background: #fff;
  border: 3px solid var(--primary);
  border-radius: 50%;
  z-index: 1;
  transition: all 0.3s;
}
.timeline-item:hover .timeline-dot {
  background: var(--primary);
  box-shadow: 0 0 0 8px rgba(46,125,111,0.15);
}
.timeline-card {
  padding: 28px 32px;
  transition: transform 0.3s;
}
.timeline-card:hover { transform: translateX(6px); }
.timeline-card .type-badge {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 12px;
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 8px;
}
.type-badge.internship {
  background: rgba(46,125,111,0.12);
  color: var(--primary);
}
.type-badge.student {
  background: rgba(232,145,58,0.12);
  color: var(--accent);
}
.type-badge.project {
  background: rgba(59,130,246,0.12);
  color: #3b82f6;
}
.timeline-card h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 2px; }
.timeline-card .org { color: var(--primary); font-weight: 500; margin-bottom: 4px; }
.timeline-card .period { color: var(--text-light); font-size: 0.9rem; margin-bottom: 14px; }
.timeline-card ul {
  list-style: none;
  padding: 0;
}
.timeline-card ul li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 8px;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.7;
}
.timeline-card ul li::before {
  content: '>';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
}

/* ===== Research ===== */
.research-card {
  padding: 40px;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}
.research-card h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 16px;
  line-height: 1.6;
}
.research-card p {
  color: var(--text-light);
  line-height: 1.9;
  font-size: 1rem;
}
.graduate-plan {
  margin-top: 36px;
  padding: 32px 36px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}
.graduate-plan h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--accent);
}
.graduate-plan p {
  color: var(--text);
  line-height: 1.9;
}

/* ===== Awards ===== */
.awards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.award-card {
  padding: 28px 32px;
  display: flex;
  align-items: center;
  gap: 20px;
  transition: transform 0.3s, box-shadow 0.3s;
}
.award-card:hover { transform: translateY(-4px); }
.award-icon-circle {
  width: 52px;
  height: 52px;
  min-width: 52px;
  background: var(--gradient-2);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.3rem;
}
.award-info h4 { font-size: 1rem; font-weight: 600; margin-bottom: 4px; line-height: 1.4; }
.award-info .year { color: var(--accent); font-size: 0.9rem; font-weight: 500; }

/* ===== Contact ===== */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}
.contact-card {
  padding: 32px;
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s;
}
.contact-card:hover { transform: translateY(-4px); }
.contact-card .contact-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  background: var(--gradient-1);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.4rem;
}
.contact-card h4 { font-size: 1rem; color: var(--text-light); margin-bottom: 8px; }
.contact-card .contact-value {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
}
.contact-card .contact-value a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.3s;
}
.contact-card .contact-value a:hover { color: var(--accent); }

/* ===== Footer ===== */
.footer {
  background: var(--bg-alt);
  padding: 40px 0;
  text-align: center;
  color: var(--text-light);
  font-size: 0.9rem;
}
.footer i.fa-heart { color: #e74c3c; }

/* ===== Scroll Animation ===== */
[data-aos] {
  opacity: 0;
  transition: opacity 0.6s ease, transform 0.6s ease;
}
[data-aos="fade-up"] { transform: translateY(40px); }
[data-aos="fade-right"] { transform: translateX(-40px); }
[data-aos="fade-left"] { transform: translateX(40px); }
[data-aos].aos-animate {
  opacity: 1;
  transform: translate(0);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .hero-name { font-size: 2.4rem; }
  .hero-avatar { width: 110px; height: 110px; }
  .hero-typing { font-size: 1rem; }
  .section-title { font-size: 1.8rem; }
  .section { padding: 70px 0; }

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

  .hamburger { display: flex; }
  .nav-menu {
    position: fixed;
    left: -100%;
    top: 70px;
    flex-direction: column;
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    width: 100%;
    padding: 20px;
    gap: 4px;
    border-bottom: 1px solid var(--border);
    transition: left 0.3s ease;
  }
  .nav-menu.active { left: 0; }
  .nav-menu a {
    display: block;
    padding: 12px 16px;
    font-size: 1rem;
  }

  .skills-grid { grid-template-columns: 1fr; }
  .awards-grid { grid-template-columns: 1fr; }
  .timeline::before { left: 16px; }
  .timeline-item { padding-left: 48px; }
  .timeline-dot { left: 5px; }
  .contact-grid { grid-template-columns: 1fr; }

  .research-card, .education-card, .self-eval, .graduate-plan {
    padding: 24px 20px;
  }
}

@media (max-width: 480px) {
  .hero-name { font-size: 1.9rem; }
  .hero-avatar { width: 90px; height: 90px; }
  .hero-buttons { flex-direction: column; align-items: center; }
  .btn { width: 100%; justify-content: center; }
}

