/* ============ Reset & Base ============ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background: #0f172a; color: #e2e8f0; line-height: 1.6; overflow-x: hidden;
}
a { color: #38bdf8; text-decoration: none; transition: color .2s; }
a:hover { color: #7dd3fc; }
img { max-width: 100%; display: block; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* ============ Navigation ============ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(15, 23, 42, 0.6); backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: all .3s;
}
.nav.scrolled { background: rgba(15, 23, 42, 0.95); }
.nav-inner {
  max-width: 1100px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; height: 60px;
}
.nav-logo { font-size: 1.2rem; font-weight: 700; color: #f1f5f9; letter-spacing: 1px; }
.nav-links { display: flex; gap: 28px; }
.nav-links a {
  color: #94a3b8; font-size: .9rem; transition: color .2s; position: relative;
}
.nav-links a:hover { color: #f1f5f9; }
.nav-links a::after {
  content: ''; position: absolute; bottom: -4px; left: 0; width: 0; height: 2px;
  background: linear-gradient(90deg, #38bdf8, #818cf8); transition: width .3s;
}
.nav-links a:hover::after { width: 100%; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span {
  display: block; width: 22px; height: 2px; background: #e2e8f0;
  margin: 5px 0; transition: all .3s;
}
.mobile-menu {
  display: none; flex-direction: column; gap: 0;
  max-height: 0; overflow: hidden; transition: max-height .3s;
}
.mobile-menu.open { max-height: 300px; }
.mobile-menu a {
  display: block; padding: 12px 24px; color: #94a3b8; border-top: 1px solid rgba(255,255,255,0.05);
}
.mobile-menu a:hover { color: #f1f5f9; background: rgba(255,255,255,0.03); }

/* ============ Hero ============ */
.hero {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  position: relative; overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(56, 189, 248, 0.12) 0%, transparent 60%),
              radial-gradient(ellipse at 80% 50%, rgba(129, 140, 248, 0.08) 0%, transparent 50%);
}
.hero-content { position: relative; z-index: 2; padding: 0 24px; }
.hero-avatar {
  width: 120px; height: 120px; border-radius: 50%; overflow: hidden;
  margin: 0 auto 24px; border: 3px solid rgba(56, 189, 248, 0.4);
  box-shadow: 0 0 40px rgba(56, 189, 248, 0.15);
  animation: float 6s ease-in-out infinite;
}
.hero-avatar img { width: 100%; height: 100%; object-fit: cover; }
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.hero-name {
  font-size: 3rem; font-weight: 800; letter-spacing: 2px;
  background: linear-gradient(135deg, #f1f5f9, #38bdf8);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; margin-bottom: 8px;
}
.hero-title { font-size: 1.3rem; color: #94a3b8; margin-bottom: 4px; }
.hero-subtitle { font-size: .95rem; color: #64748b; margin-bottom: 32px; }
.hero-stats {
  display: flex; gap: 32px; justify-content: center; flex-wrap: wrap; margin-bottom: 36px;
}
.stat { text-align: center; }
.stat-value {
  display: block; font-size: 1.8rem; font-weight: 700; color: #38bdf8;
}
.stat-label { font-size: .8rem; color: #64748b; }
.hero-actions { display: flex; gap: 16px; justify-content: center; }
.btn {
  display: inline-flex; align-items: center; padding: 12px 28px;
  border-radius: 8px; font-size: .95rem; font-weight: 600;
  transition: all .3s; cursor: pointer; border: none;
}
.btn-primary {
  background: linear-gradient(135deg, #38bdf8, #818cf8); color: #0f172a;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(56, 189, 248, 0.3); color: #0f172a; }
.btn-outline {
  background: transparent; color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.3);
}
.btn-outline:hover { border-color: #38bdf8; color: #38bdf8; }
.scroll-hint {
  position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: #475569; font-size: .8rem; cursor: pointer;
}
.scroll-arrow {
  width: 20px; height: 20px; border-right: 2px solid #475569;
  border-bottom: 2px solid #475569; transform: rotate(45deg);
  animation: scrollBounce 2s infinite;
}
@keyframes scrollBounce {
  0%, 100% { transform: rotate(45deg) translateY(0); }
  50% { transform: rotate(45deg) translateY(6px); }
}

/* ============ Sections ============ */
.section { padding: 80px 0; }
.section-dark { background: rgba(255,255,255,0.02); }
.section-title {
  font-size: 2rem; font-weight: 700; text-align: center; margin-bottom: 48px;
  position: relative; color: #f1f5f9;
}
.section-title::after {
  content: ''; display: block; width: 48px; height: 3px; margin: 12px auto 0;
  background: linear-gradient(90deg, #38bdf8, #818cf8); border-radius: 2px;
}

/* ============ About ============ */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.about-bio { font-size: 1.05rem; color: #cbd5e1; line-height: 1.8; margin-bottom: 32px; }
.about-info { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.info-item { display: flex; flex-direction: column; gap: 4px; }
.info-label { font-size: .75rem; color: #64748b; text-transform: uppercase; letter-spacing: 1px; }
.info-item span:last-child { color: #e2e8f0; font-size: .95rem; }
.about-highlights { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.highlight-card {
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px; padding: 20px; text-align: center;
  transition: all .3s; cursor: default;
}
.highlight-card:hover {
  border-color: rgba(56, 189, 248, 0.3);
  transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}
.highlight-icon { font-size: 1.5rem; display: block; margin-bottom: 8px; }
.highlight-value { font-size: 1.6rem; font-weight: 700; color: #38bdf8; display: block; }
.highlight-label { font-size: .85rem; color: #e2e8f0; display: block; margin-top: 2px; }
.highlight-desc { font-size: .75rem; color: #64748b; display: block; }

/* ============ Skills ============ */
.skills-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.skill-group {
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px; padding: 28px;
}
.skill-group-title {
  font-size: 1.1rem; font-weight: 600; margin-bottom: 20px;
  display: flex; align-items: center; gap: 8px; color: #f1f5f9;
}
.skill-items { display: flex; flex-direction: column; gap: 14px; }
.skill-header { display: flex; justify-content: space-between; margin-bottom: 6px; }
.skill-name { font-size: .85rem; color: #cbd5e1; }
.skill-level { font-size: .8rem; color: #64748b; }
.skill-bar {
  height: 6px; background: rgba(255,255,255,0.06); border-radius: 3px; overflow: hidden;
}
.skill-fill {
  height: 100%; border-radius: 3px; transition: width 1.2s cubic-bezier(.4,0,.2,1);
  background: linear-gradient(90deg, #38bdf8, #818cf8);
}

/* ============ Projects ============ */
.project-filters {
  display: flex; justify-content: center; gap: 12px; margin-bottom: 40px;
}
.project-filters button {
  padding: 8px 20px; border-radius: 20px; border: 1px solid rgba(255,255,255,0.1);
  background: transparent; color: #94a3b8; font-size: .85rem; cursor: pointer;
  transition: all .2s;
}
.project-filters button:hover { border-color: #38bdf8; color: #38bdf8; }
.project-filters button.active {
  background: linear-gradient(135deg, #38bdf8, #818cf8); color: #0f172a; border-color: transparent;
}
.projects-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 24px;
}
.project-card {
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px; padding: 28px; transition: all .3s; position: relative; overflow: hidden;
}
.project-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--accent, #38bdf8); opacity: 0; transition: opacity .3s;
}
.project-card:hover {
  border-color: rgba(255,255,255,0.1); transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.3);
}
.project-card:hover::before { opacity: 1; }
.project-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.project-type { font-size: 1.4rem; }
.project-period { font-size: .75rem; color: #64748b; }
.project-name { font-size: 1.15rem; font-weight: 700; color: #f1f5f9; margin-bottom: 4px; }
.project-role { font-size: .85rem; color: #38bdf8; margin-bottom: 12px; }
.project-desc { font-size: .85rem; color: #94a3b8; line-height: 1.6; margin-bottom: 16px; }
.project-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.tag {
  padding: 3px 10px; border-radius: 12px; font-size: .75rem;
  background: rgba(56, 189, 248, 0.1); color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.2);
}
.project-highlights {
  display: flex; flex-direction: column; gap: 4px; font-size: .8rem; color: #64748b;
}

/* ============ Timeline ============ */
.timeline { position: relative; max-width: 800px; margin: 0 auto; }
.timeline::before {
  content: ''; position: absolute; left: 50%; top: 0; bottom: 0;
  width: 2px; background: linear-gradient(180deg, #38bdf8, #818cf8);
  transform: translateX(-50%);
}
.timeline-item {
  position: relative; width: 50%; padding: 0 40px 40px 0; text-align: right;
}
.timeline-right { margin-left: 50%; padding: 0 0 40px 40px; text-align: left; }
.timeline-dot {
  position: absolute; top: 8px; width: 14px; height: 14px;
  background: #38bdf8; border-radius: 50%;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.4); z-index: 2;
}
.timeline-item:not(.timeline-right) .timeline-dot { right: -7px; }
.timeline-right .timeline-dot { left: -7px; }
.timeline-year {
  font-size: .8rem; font-weight: 700; color: #38bdf8;
  letter-spacing: 1px; display: block; margin-bottom: 4px;
}
.timeline-event { font-size: 1rem; font-weight: 600; color: #f1f5f9; margin-bottom: 4px; }
.timeline-detail { font-size: .85rem; color: #64748b; }

/* ============ Contact ============ */
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; max-width: 800px; margin: 0 auto; }
.contact-card {
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px; padding: 32px 24px; text-align: center;
  transition: all .3s;
}
.contact-card:hover { border-color: rgba(56, 189, 248, 0.3); transform: translateY(-2px); }
.contact-icon { font-size: 2rem; margin-bottom: 12px; }
.contact-card h4 { font-size: .9rem; color: #94a3b8; margin-bottom: 8px; }
.contact-card a, .contact-card span { font-size: .95rem; color: #e2e8f0; }

/* ============ Footer ============ */
.footer {
  text-align: center; padding: 32px; border-top: 1px solid rgba(255,255,255,0.05);
  color: #475569; font-size: .8rem;
}

/* ============ Responsive ============ */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .mobile-menu { display: flex; }
  .hero-name { font-size: 2rem; }
  .hero-stats { gap: 20px; }
  .stat-value { font-size: 1.4rem; }
  .about-grid { grid-template-columns: 1fr; }
  .about-highlights { grid-template-columns: 1fr 1fr; }
  .skills-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .timeline::before { left: 20px; }
  .timeline-item { width: 100%; padding: 0 0 32px 48px; text-align: left; }
  .timeline-right { margin-left: 0; padding: 0 0 32px 48px; }
  .timeline-dot { left: 13px !important; right: auto !important; }
  .section { padding: 60px 0; }
  .section-title { font-size: 1.6rem; }
}
@media (max-width: 480px) {
  .hero-name { font-size: 1.6rem; }
  .hero-subtitle { font-size: .85rem; }
  .about-highlights { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; align-items: center; }
}

/* SVG Icons */
.icon { width: 20px; height: 20px; display: inline-block; vertical-align: middle; }
.icon-lg { width: 32px; height: 32px; }
.highlight-icon .icon { width: 28px; height: 28px; color: #38bdf8; }
.skill-group-title .icon { width: 22px; height: 22px; color: #38bdf8; margin-right: 4px; }
.contact-icon .icon-lg { color: #38bdf8; }

/* SVG Icons */
.icon { width: 20px; height: 20px; display: inline-block; vertical-align: middle; }
.icon-lg { width: 32px; height: 32px; }
.highlight-icon .icon { width: 28px; height: 28px; color: #38bdf8; }
.skill-group-title .icon { width: 22px; height: 22px; color: #38bdf8; margin-right: 4px; }
.contact-icon .icon-lg { color: #38bdf8; }
