/* ==== Base ==== */
*, *::before, *::after { box-sizing: border-box; }
:root {
  --bg: #0b1020;
  --bg-2: #0f1530;
  --panel: rgba(255,255,255,0.04);
  --panel-2: rgba(255,255,255,0.07);
  --border: rgba(255,255,255,0.08);
  --text: #e8ecf6;
  --muted: #9aa3bd;
  --primary: #7c5cff;
  --primary-2: #22d3ee;
  --accent: #f472b6;
  --green: #34d399;
  --grad: linear-gradient(135deg, #7c5cff 0%, #22d3ee 100%);
  --grad-2: linear-gradient(135deg, #f472b6 0%, #fbbf24 100%);
  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 0 10px 30px rgba(0,0,0,0.35);
}
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: radial-gradient(ellipse at top, #131a3a 0%, var(--bg) 60%) no-repeat;
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

.container { width: min(1180px, 92%); margin: 0 auto; }

/* ==== Navbar ==== */
.navbar {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 14px 0;
  backdrop-filter: blur(14px);
  background: rgba(11,16,32,0.55);
  border-bottom: 1px solid transparent;
  transition: all 0.3s ease;
}
.navbar.scrolled {
  background: rgba(11,16,32,0.85);
  border-bottom-color: var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; }
.logo-mark {
  width: 36px; height: 36px; display: grid; place-items: center;
  background: var(--grad); border-radius: 10px;
  font-size: 18px;
}
.logo-text { display: flex; align-items: baseline; gap: 6px; }
.logo-text small { font-size: 12px; color: var(--muted); font-weight: 400; }
.nav-links { display: flex; gap: 28px; }
.nav-links a {
  font-size: 14px; color: var(--muted);
  position: relative; transition: color 0.25s;
}
.nav-links a:hover, .nav-links a.active { color: #fff; }
.nav-links a.active::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -8px;
  height: 2px; background: var(--grad); border-radius: 2px;
}
.nav-toggle {
  display: none; background: none; border: 0; cursor: pointer;
  width: 36px; height: 36px; flex-direction: column; gap: 5px;
  align-items: center; justify-content: center;
}
.nav-toggle span {
  width: 22px; height: 2px; background: #fff; border-radius: 2px;
  transition: all 0.3s;
}

/* ==== Hero ==== */
.hero {
  position: relative;
  min-height: 100vh;
  padding: 140px 0 80px;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(124,92,255,0.25), transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(34,211,238,0.2), transparent 50%),
    radial-gradient(circle at 60% 80%, rgba(244,114,182,0.15), transparent 50%);
}
.hero-inner {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 60px; align-items: center;
}
.hero-tag {
  display: inline-block; padding: 6px 14px;
  background: var(--panel-2); border: 1px solid var(--border);
  border-radius: 999px; font-size: 13px;
  color: var(--primary-2); letter-spacing: 1px;
  margin-bottom: 22px;
}
.hero-title {
  font-size: clamp(36px, 5vw, 60px);
  line-height: 1.15; font-weight: 800; margin: 0 0 22px;
  letter-spacing: -0.02em;
}
.grad {
  background: var(--grad); -webkit-background-clip: text;
  background-clip: text; color: transparent;
}
.hero-sub {
  display: inline-block;
  font-size: clamp(20px, 2.4vw, 30px);
  font-weight: 600; color: #fff; opacity: 0.92;
  margin-top: 8px;
}
.hero-desc { font-size: 16px; color: var(--muted); max-width: 540px; }
.hero-desc b { color: #fff; font-weight: 600; }
.hero-cta { margin-top: 30px; display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 12px 22px; border-radius: 999px; font-size: 14px;
  font-weight: 600; transition: all 0.25s; cursor: pointer;
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--grad); color: #fff;
  box-shadow: 0 8px 24px rgba(124,92,255,0.4);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(124,92,255,0.55); }
.btn-ghost {
  background: var(--panel); color: #fff; border-color: var(--border);
}
.btn-ghost:hover { background: var(--panel-2); border-color: var(--primary); }

.hero-stats {
  margin-top: 48px; display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.stat {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 14px;
  transition: transform 0.25s, border-color 0.25s;
}
.stat:hover { transform: translateY(-4px); border-color: var(--primary); }
.stat-num {
  font-size: 28px; font-weight: 800;
  background: var(--grad); -webkit-background-clip: text;
  background-clip: text; color: transparent;
}
.stat-label { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* Hero visual */
.hero-visual {
  position: relative; height: 460px;
  display: flex; align-items: center; justify-content: center;
}
.orb {
  width: 320px; height: 320px; border-radius: 50%;
  background: var(--grad);
  filter: blur(60px); opacity: 0.5;
  position: absolute; animation: float 6s ease-in-out infinite;
}
.ring {
  position: absolute; border-radius: 50%;
  border: 1px solid var(--border);
}
.ring.r1 {
  width: 360px; height: 360px;
  border-top-color: var(--primary);
  animation: spin 18s linear infinite;
}
.ring.r2 {
  width: 460px; height: 460px;
  border-bottom-color: var(--primary-2);
  animation: spin 26s linear infinite reverse;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-18px); }
}
.floating-card {
  position: absolute;
  background: rgba(15,21,48,0.85);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 16px;
  display: flex; align-items: center; gap: 10px;
  backdrop-filter: blur(8px);
  animation: float 6s ease-in-out infinite;
  font-size: 13px;
}
.card-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--primary-2); box-shadow: 0 0 8px var(--primary-2);
}
.card-dot.g { background: var(--green); box-shadow: 0 0 8px var(--green); }
.card-dot.p { background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.card-title { font-weight: 700; }
.card-sub { color: var(--muted); font-size: 11px; }
.c1 { top: 8%; left: -4%; animation-delay: 0s; }
.c2 { bottom: 18%; left: 4%; animation-delay: 1.5s; }
.c3 { top: 48%; right: -6%; animation-delay: 3s; }

.scroll-hint {
  position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%);
  width: 24px; height: 38px;
  border: 2px solid var(--muted); border-radius: 12px;
  opacity: 0.6;
}
.scroll-hint span {
  display: block; width: 4px; height: 8px;
  background: var(--muted); border-radius: 2px;
  margin: 6px auto;
  animation: scroll 1.6s ease-in-out infinite;
}
@keyframes scroll {
  0% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(12px); opacity: 0; }
}

/* ==== Sections ==== */
.section { padding: 100px 0; position: relative; }
.section.alt { background: linear-gradient(180deg, transparent 0%, rgba(255,255,255,0.02) 100%); }
.section-head { margin-bottom: 60px; max-width: 720px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-eyebrow {
  font-size: 13px; letter-spacing: 2px;
  color: var(--primary-2); margin-bottom: 14px;
  text-transform: uppercase;
}
.section-title {
  font-size: clamp(28px, 3.5vw, 44px); font-weight: 800;
  line-height: 1.25; margin: 0 0 12px;
  letter-spacing: -0.01em;
}
.section-sub { color: var(--muted); font-size: 16px; }

/* About */
.about-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px;
}
.about-card {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px;
  transition: transform 0.3s, border-color 0.3s, background 0.3s;
}
.about-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  background: var(--panel-2);
}
.about-card h3 { margin: 0 0 12px; font-size: 18px; }
.about-card p { margin: 0; color: var(--muted); font-size: 15px; }

/* Skills */
.skills-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px;
}
.skill-group {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px;
  transition: transform 0.3s, border-color 0.3s;
}
.skill-group:hover { transform: translateY(-4px); border-color: var(--primary); }
.skill-icon { font-size: 32px; margin-bottom: 12px; }
.skill-group h3 { margin: 0 0 16px; font-size: 17px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-block; padding: 6px 12px;
  background: rgba(124,92,255,0.12); color: #c4b8ff;
  border-radius: 999px; font-size: 13px;
  border: 1px solid rgba(124,92,255,0.2);
  transition: all 0.2s;
}
.chip:hover { background: rgba(124,92,255,0.25); color: #fff; }

/* Timeline */
.timeline { position: relative; padding-left: 28px; }
.timeline::before {
  content: ''; position: absolute; left: 6px; top: 12px; bottom: 12px;
  width: 2px; background: linear-gradient(180deg, var(--primary), var(--primary-2));
  border-radius: 2px;
}
.t-item { position: relative; padding-bottom: 36px; }
.t-item:last-child { padding-bottom: 0; }
.t-dot {
  position: absolute; left: -28px; top: 6px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--bg); border: 3px solid var(--primary);
  box-shadow: 0 0 0 4px rgba(124,92,255,0.15);
}
.t-time {
  font-size: 13px; color: var(--primary-2);
  font-weight: 600; letter-spacing: 0.5px;
  margin-bottom: 6px;
}
.t-note {
  font-size: 12px; line-height: 1.6;
  color: var(--muted); opacity: 0.72;
  margin: -2px 0 8px;
}
.t-body {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px 26px;
  transition: border-color 0.3s, transform 0.3s;
}
.t-body:hover { border-color: var(--primary); transform: translateX(4px); }
.t-role { font-size: 18px; font-weight: 700; }
.t-company { color: var(--muted); font-size: 14px; margin-top: 2px; margin-bottom: 12px; }
.t-body p { margin: 0 0 10px; color: var(--muted); font-size: 14px; }
.t-body ul { margin: 0; padding-left: 20px; color: var(--muted); font-size: 14px; }
.t-body li { margin-bottom: 6px; }
.t-body b { color: #fff; }

/* Projects */
.proj-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px;
}
.proj-card {
  position: relative;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 30px;
  transition: transform 0.35s, border-color 0.35s, box-shadow 0.35s;
  overflow: hidden;
}
.proj-card::before {
  content: ''; position: absolute; inset: 0;
  background: var(--grad); opacity: 0; transition: opacity 0.35s;
  z-index: 0;
}
.proj-card:hover {
  transform: translateY(-6px);
  border-color: var(--primary);
  box-shadow: 0 20px 50px rgba(124,92,255,0.25);
}
.proj-card > * { position: relative; z-index: 1; }
.proj-card.wide { grid-column: 1 / -1; }
.proj-no {
  font-size: 12px; letter-spacing: 2px;
  color: var(--primary-2); font-weight: 700;
  margin-bottom: 10px;
}
.proj-card h3 { margin: 0 0 8px; font-size: 22px; }
.proj-meta { color: var(--muted); font-size: 13px; margin-bottom: 14px; }
.proj-card p { margin: 0 0 14px; color: var(--muted); font-size: 14px; }
.proj-card ul { margin: 0 0 16px; padding-left: 20px; color: var(--muted); font-size: 14px; }
.proj-card li { margin-bottom: 6px; }
.proj-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.proj-tags span {
  display: inline-block; padding: 4px 10px;
  background: rgba(34,211,238,0.12); color: #67e8f9;
  border-radius: 6px; font-size: 12px;
  border: 1px solid rgba(34,211,238,0.2);
}

/* Contact */
.contact-inner { text-align: center; }
.contact-grid {
  margin-top: 40px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
}
.contact-card {
  display: block;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px 18px;
  text-align: center; transition: all 0.3s; cursor: pointer;
}
.contact-card:hover {
  transform: translateY(-6px);
  border-color: var(--primary);
  background: var(--panel-2);
  box-shadow: 0 12px 30px rgba(124,92,255,0.2);
}
.c-icon { font-size: 32px; margin-bottom: 10px; }
.c-label { font-size: 12px; color: var(--muted); letter-spacing: 1px; }
.c-value { font-size: 15px; font-weight: 600; margin-top: 4px; }

.footer-note {
  margin-top: 70px; padding-top: 30px;
  border-top: 1px solid var(--border);
  color: var(--muted); font-size: 13px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
}
.footer-note .built { color: var(--primary-2); }

/* Reveal animation */
.reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ==== Responsive ==== */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { height: 360px; margin-top: 20px; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .about-grid, .skills-grid, .proj-grid, .contact-grid { grid-template-columns: 1fr 1fr; }
  .proj-card.wide { grid-column: auto; }
}
@media (max-width: 640px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    background: rgba(11,16,32,0.97);
    border-bottom: 1px solid var(--border);
    flex-direction: column; gap: 0; padding: 12px 0;
    transform: translateY(-10px);
    opacity: 0; pointer-events: none;
    transition: all 0.3s;
  }
  .nav-links.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-links a { padding: 12px 24px; }
  .nav-links a.active::after { display: none; }
  .nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle.open span:nth-child(2) { opacity: 0; }
  .nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .section { padding: 70px 0; }
  .hero { padding: 110px 0 60px; }
  .about-grid, .skills-grid, .proj-grid, .contact-grid { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .floating-card { font-size: 11px; padding: 8px 12px; }
  .c1 { left: 0; } .c3 { right: 0; }
}

/* ==== 顶部滚动进度条 ==== */
.scroll-progress {
  position: absolute; left: 0; bottom: -1px; height: 2px;
  width: 0%;
  background: var(--grad);
  border-radius: 2px;
  transition: width 0.1s linear;
}

/* ==== 教育背景条 ==== */
.edu-strip {
  margin-top: 22px;
  display: grid; grid-template-columns: minmax(260px, 340px) 1fr; gap: 24px;
  align-items: start;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 26px 28px;
}
.edu-main { display: flex; align-items: center; gap: 14px; }
.edu-icon { font-size: 34px; }
.edu-school { font-size: 17px; font-weight: 700; }
.edu-meta { font-size: 13px; color: var(--primary-2); margin-top: 2px; }

.edu-extra { display: grid; gap: 10px; }
.edu-extra details {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255,255,255,0.02);
  overflow: hidden;
}
.edu-extra summary {
  cursor: pointer; padding: 10px 16px;
  font-size: 14px; font-weight: 600;
  list-style: none;
  display: flex; align-items: center; gap: 8px;
  transition: background 0.2s;
}
.edu-extra summary::-webkit-details-marker { display: none; }
.edu-extra summary::before {
  content: '+'; color: var(--primary-2); font-weight: 700;
}
.edu-extra details[open] summary::before { content: '−'; }
.edu-extra summary:hover { background: var(--panel-2); }
.edu-extra details p {
  margin: 0; padding: 0 16px 14px;
  font-size: 13px; color: var(--muted); line-height: 1.7;
}

/* ==== 经历：职责块 / 折叠项目案例 ==== */
.t-block { margin-top: 10px; }
.t-block-label {
  font-size: 12px; letter-spacing: 1px;
  color: var(--primary-2); font-weight: 700;
  margin-bottom: 8px;
}
.t-details {
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255,255,255,0.02);
  overflow: hidden;
}
.t-details summary {
  cursor: pointer; padding: 10px 16px;
  font-size: 13px; font-weight: 600;
  list-style: none;
  display: flex; align-items: center; gap: 8px;
  transition: background 0.2s;
}
.t-details summary::-webkit-details-marker { display: none; }
.t-details summary::before {
  content: '+'; color: var(--primary-2); font-weight: 700;
}
.t-details[open] summary::before { content: '−'; }
.t-details summary:hover { background: var(--panel-2); }
.t-details ul {
  margin: 0; padding: 0 16px 14px 34px;
  color: var(--muted); font-size: 14px;
}
.t-details li { margin-bottom: 6px; }
.t-details b { color: #fff; }
.t-client {
  margin: 0; padding: 0 16px 14px;
  font-size: 13px; color: var(--muted); line-height: 1.8;
}

/* ==== POC 个人项目 ==== */
.poc-block {
  margin-top: 34px;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 30px;
}
.poc-title { margin: 0 0 18px; font-size: 19px; }
.poc-title span { font-size: 13px; color: var(--muted); font-weight: 400; }
.poc-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
}
.poc-item {
  display: flex; align-items: center; gap: 10px;
  background: rgba(124,92,255,0.08);
  border: 1px solid rgba(124,92,255,0.18);
  border-radius: 12px; padding: 14px 18px;
  font-size: 14px;
  transition: transform 0.25s, border-color 0.25s, background 0.25s;
}
.poc-item:hover {
  transform: translateX(4px);
  border-color: var(--primary);
  background: rgba(124,92,255,0.16);
}
.poc-dot {
  width: 7px; height: 7px; border-radius: 50%; flex: none;
  background: var(--primary-2);
  box-shadow: 0 0 8px var(--primary-2);
}
.poc-more {
  margin-top: 18px; padding-top: 16px;
  border-top: 1px dashed var(--border);
  font-size: 14px; color: var(--muted);
}
.poc-label {
  display: inline-block; margin-right: 10px;
  color: var(--primary-2); font-weight: 700; font-size: 13px;
}

@media (max-width: 960px) {
  .edu-strip { grid-template-columns: 1fr; }
  .poc-grid { grid-template-columns: 1fr; }
}