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

:root {
  --bg: #fbfbfd;
  --bg-soft: #f5f5f7;
  --bg-dark: #0b0b0d;
  --text: #1d1d1f;
  --text-soft: #6e6e73;
  --text-mute: #86868b;
  --line: #d2d2d7;
  --accent: #0071e3;
  --gradient: linear-gradient(120deg, #0a84ff 0%, #5e5ce6 50%, #bf5af2 100%);
  --radius: 18px;
  --radius-lg: 28px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 8px 30px rgba(0,0,0,.06);
  --shadow-lg: 0 24px 60px rgba(0,0,0,.08);
  --ease: cubic-bezier(.22,.61,.36,1);
}

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "PingFang SC", "Helvetica Neue", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  font-size: 17px;
  letter-spacing: -0.003em;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ============ Nav ============ */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  background: rgba(251, 251, 253, 0.72);
  border-bottom: 1px solid rgba(0,0,0,.06);
  transition: background .3s var(--ease);
}
.nav-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.5px;
}
.nav-links {
  display: flex;
  gap: 32px;
}
.nav-links a {
  font-size: 14px;
  color: var(--text-soft);
  transition: color .2s var(--ease);
}
.nav-links a:hover { color: var(--text); }

@media (max-width: 640px) {
  .nav-links { gap: 18px; }
  .nav-links a { font-size: 13px; }
}

/* ============ Hero ============ */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 120px 24px 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: -20%; left: 50%;
  transform: translateX(-50%);
  width: 1200px; height: 1200px;
  background: radial-gradient(circle, rgba(94, 92, 230, 0.10) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}
.hero-inner { position: relative; z-index: 1; max-width: 900px; }

.eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}
.eyebrow.center { text-align: center; }
.eyebrow.light { color: #6dd5ff; }

.hero-title {
  font-size: clamp(44px, 7vw, 88px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin-bottom: 28px;
}

.gradient {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.hero-sub {
  font-size: clamp(18px, 2vw, 22px);
  color: var(--text-soft);
  font-weight: 400;
  margin-bottom: 42px;
  line-height: 1.6;
}

.hero-cta {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  padding: 13px 28px;
  border-radius: 980px;
  font-size: 15px;
  font-weight: 500;
  transition: all .3s var(--ease);
  border: 1px solid transparent;
}
.btn-primary { background: var(--text); color: white; }
.btn-primary:hover { background: #2d2d30; transform: translateY(-1px); }
.btn-ghost { color: var(--accent); border-color: rgba(0,113,227,.3); }
.btn-ghost:hover { background: rgba(0,113,227,.06); }

.hero-scroll {
  position: absolute;
  bottom: 40px; left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  color: var(--text-mute);
  letter-spacing: 0.1em;
  animation: bounce 2.4s var(--ease) infinite;
}
@keyframes bounce {
  0%, 100% { transform: translate(-50%, 0); opacity: .6; }
  50% { transform: translate(-50%, 8px); opacity: 1; }
}

/* ============ Featured Project ============ */
.featured {
  position: relative;
  padding: 140px 24px 130px;
  background: #07070a;
  color: white;
  overflow: hidden;
  isolation: isolate;
}
.featured-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 60% 50% at 20% 10%, rgba(191, 90, 242, 0.28), transparent 60%),
    radial-gradient(ellipse 50% 50% at 80% 30%, rgba(10, 132, 255, 0.30), transparent 55%),
    radial-gradient(ellipse 60% 40% at 50% 100%, rgba(94, 92, 230, 0.22), transparent 60%);
  filter: blur(10px);
}
.featured::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black, transparent 80%);
  pointer-events: none;
  z-index: -1;
}
.featured-inner { position: relative; z-index: 1; }

.featured-title {
  font-size: clamp(40px, 6vw, 76px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.025em;
  text-align: center;
  margin: 18px auto 26px;
  max-width: 900px;
}
.featured-lead {
  text-align: center;
  font-size: clamp(16px, 1.6vw, 19px);
  line-height: 1.7;
  color: #c7c7cc;
  max-width: 760px;
  margin: 0 auto 70px;
}

.featured-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 80px;
}
.metric {
  padding: 36px 24px;
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  text-align: center;
  transition: all .4s var(--ease);
}
.metric:hover {
  background: rgba(255,255,255,.07);
  transform: translateY(-3px);
}
.metric-num {
  font-size: 44px;
  font-weight: 700;
  letter-spacing: -0.03em;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
}
.metric-label {
  margin-top: 12px;
  font-size: 13px;
  color: #a1a1a6;
  line-height: 1.55;
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 60px;
}
.f-card {
  padding: 38px 32px;
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.07);
  transition: all .4s var(--ease);
}
.f-card:hover {
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.14);
  transform: translateY(-3px);
}
.f-step {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: #8d8d92;
  margin-bottom: 16px;
}
.f-card h3 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
  color: white;
}
.f-card p {
  font-size: 15px;
  color: #b0b0b5;
  line-height: 1.65;
}

.featured-cta {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}
.btn-light { background: white; color: #0b0b0d; }
.btn-light:hover { background: #f0f0f3; transform: translateY(-1px); }
.btn-ghost-light {
  color: white;
  border-color: rgba(255,255,255,.25);
}
.btn-ghost-light:hover { background: rgba(255,255,255,.08); }

@media (max-width: 900px) {
  .featured-metrics { grid-template-columns: repeat(2, 1fr); }
  .featured-grid { grid-template-columns: 1fr; }
}

/* ============ Section ============ */
.section {
  padding: 130px 24px;
  position: relative;
}
.section-soft { background: var(--bg-soft); }
.section-dark { background: var(--bg-dark); color: white; }
.section-dark .section-title.light,
.section-dark .eyebrow.light { color: white; }

.container { max-width: 1080px; margin: 0 auto; }
.container.narrow { max-width: 760px; }

.section-title {
  font-size: clamp(32px, 4.5vw, 56px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin-bottom: 70px;
}
.section-title.center { text-align: center; }
.section-title.light { color: white; }

.center { text-align: center; }

/* ============ About cards ============ */
.about-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.about-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 40px 28px;
  text-align: center;
  box-shadow: var(--shadow-md);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.about-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.about-card .num {
  font-size: 56px;
  font-weight: 700;
  letter-spacing: -0.04em;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.about-card .label {
  font-size: 14px;
  color: var(--text-soft);
  margin-top: 10px;
  line-height: 1.5;
}

@media (max-width: 800px) {
  .about-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============ Advantage ============ */
.advantage-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.adv {
  padding: 36px 32px;
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  transition: all .4s var(--ease);
}
.adv:hover {
  background: rgba(255,255,255,.06);
  transform: translateY(-3px);
}
.adv h3 {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 14px;
  letter-spacing: -0.01em;
}
.adv p {
  color: #a1a1a6;
  font-size: 15px;
  line-height: 1.7;
}

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

/* ============ Skills ============ */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.skill-card {
  padding: 40px;
  border-radius: var(--radius-lg);
  background: white;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
  transition: all .4s var(--ease);
}
.skill-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
  border-color: transparent;
}
.skill-icon {
  font-size: 28px;
  margin-bottom: 20px;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.skill-card h3 {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 14px;
  letter-spacing: -0.01em;
}
.skill-card p {
  color: var(--text-soft);
  font-size: 15px;
  line-height: 1.7;
}

@media (max-width: 700px) {
  .skills-grid { grid-template-columns: 1fr; }
  .skill-card { padding: 30px; }
}

/* ============ Timeline ============ */
.timeline { display: flex; flex-direction: column; gap: 24px; }
.tl-item {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 50px;
  padding: 40px 0;
  border-top: 1px solid var(--line);
}
.tl-item:first-child { border-top: none; padding-top: 0; }
.tl-meta { position: sticky; top: 100px; align-self: start; }
.tl-date {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-mute);
  margin-bottom: 6px;
}
.tl-role {
  font-size: 17px;
  font-weight: 600;
  color: var(--accent);
}
.tl-body h3 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-bottom: 10px;
}
.tl-company {
  font-size: 14px;
  color: var(--text-mute);
  margin-bottom: 20px;
}
.tl-body ul { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.tl-body li {
  position: relative;
  padding-left: 22px;
  color: var(--text-soft);
  font-size: 16px;
  line-height: 1.7;
}
.tl-body li::before {
  content: "";
  position: absolute;
  left: 0; top: 12px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

@media (max-width: 800px) {
  .tl-item { grid-template-columns: 1fr; gap: 16px; }
  .tl-meta { position: static; }
}

/* ============ Projects ============ */
.project-list { display: flex; flex-direction: column; gap: 24px; }
.project {
  background: white;
  border-radius: var(--radius-lg);
  padding: 50px 50px 46px;
  box-shadow: var(--shadow-md);
  transition: all .5s var(--ease);
  border: 1px solid transparent;
}
.project:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.project-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 6px 12px;
  border-radius: 980px;
  background: rgba(0,113,227,.08);
  color: var(--accent);
  margin-bottom: 18px;
}
.project-title {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.project-date {
  font-size: 14px;
  color: var(--text-mute);
  margin-bottom: 18px;
}
.project-lead {
  font-size: 18px;
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 28px;
}
.project-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 8px 0 32px;
}
.stat {
  padding: 22px 18px;
  border-radius: var(--radius);
  background: var(--bg-soft);
  text-align: center;
  transition: background .3s var(--ease);
}
.stat:hover { background: #eeeef0; }
.stat-num {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat-label {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-soft);
  line-height: 1.5;
}

@media (max-width: 700px) {
  .project-stats { grid-template-columns: repeat(2, 1fr); }
  .stat-num { font-size: 24px; }
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.project-grid h4 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}
.project-grid p {
  font-size: 15px;
  color: var(--text-soft);
  line-height: 1.65;
}
.project-grid strong { color: var(--text); font-weight: 600; }
.project-link {
  display: inline-block;
  margin-top: 28px;
  color: var(--accent);
  font-size: 15px;
  font-weight: 500;
  transition: gap .2s var(--ease);
}
.project-link:hover { opacity: .75; }

@media (max-width: 700px) {
  .project { padding: 36px 28px; }
  .project-title { font-size: 26px; }
}

/* ============ Edu ============ */
.edu-meta {
  text-align: center;
  color: var(--text-mute);
  margin-top: -50px;
  margin-bottom: 36px;
}
.edu-list {
  background: white;
  border-radius: var(--radius-lg);
  padding: 36px 42px;
  box-shadow: var(--shadow-md);
}
.edu-list li {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  color: var(--text-soft);
  font-size: 16px;
}
.edu-list li:last-child { border-bottom: none; }

/* ============ Contact CTA ============ */
.section-cta {
  background: var(--bg-dark);
  color: white;
  padding: 140px 24px;
  position: relative;
  overflow: hidden;
}
.section-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(94, 92, 230, 0.20), transparent 50%),
              radial-gradient(circle at 70% 80%, rgba(10, 132, 255, 0.18), transparent 50%);
  pointer-events: none;
}
.section-cta .container { position: relative; z-index: 1; }

.cta-title {
  font-size: clamp(38px, 5vw, 64px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 18px auto 56px;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.contact-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 28px 24px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius);
  transition: all .3s var(--ease);
  text-align: left;
}
.contact-item:hover {
  background: rgba(255,255,255,.08);
  transform: translateY(-2px);
}
.contact-label {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #86868b;
}
.contact-value {
  font-size: 17px;
  font-weight: 500;
  color: white;
}

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

/* ============ Footer ============ */
.footer {
  background: var(--bg-dark);
  color: #6e6e73;
  text-align: center;
  padding: 30px 24px;
  font-size: 12px;
  border-top: 1px solid rgba(255,255,255,.06);
}

/* ============ Reveal Animation ============ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}
