:root {
  --bg: #080b12;
  --bg-elev: #0f1523;
  --bg-card: rgba(17, 24, 39, 0.78);
  --border: rgba(148, 163, 184, 0.16);
  --border-hover: rgba(56, 189, 248, 0.45);
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --accent: #38bdf8;
  --accent-2: #f59e0b;
  --green: #22c55e;
  --radius: 14px;
  --max-w: 1060px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", system-ui, -apple-system, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  min-height: 100vh;
}

/* 细腻的科技网格与氛围光 */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.045) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at 50% 20%, rgba(0, 0, 0, 0.9), transparent 80%);
}

.bg-glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(640px circle at 15% 10%, rgba(56, 189, 248, 0.13), transparent 60%),
    radial-gradient(520px circle at 85% 22%, rgba(245, 158, 11, 0.09), transparent 60%);
}

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* 顶部导航 */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(8, 11, 18, 0.78);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  font-family: "Cascadia Code", "Consolas", monospace;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 1px;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--text);
}

/* Hero 区域 */
.hero {
  padding: 86px 0 56px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.28);
  color: #86efac;
  font-size: 12.5px;
  font-weight: 500;
  margin-bottom: 22px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.85); }
}

.hero h1 {
  font-size: clamp(32px, 5vw, 50px);
  line-height: 1.18;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}

.hero h1 .accent {
  background: linear-gradient(90deg, #38bdf8 0%, #7dd3fc 55%, #fbbf24 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-role {
  font-size: clamp(17px, 2.2vw, 22px);
  color: #cbd5e1;
  font-weight: 600;
  margin-bottom: 18px;
}

.hero-desc {
  max-width: 700px;
  color: var(--text-muted);
  font-size: 15.5px;
  margin-bottom: 30px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 48px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #0284c7, #2563eb);
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.28);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(56, 189, 248, 0.35);
}

.btn-ghost {
  background: rgba(15, 23, 42, 0.7);
  border-color: var(--border);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--border-hover);
  background: rgba(30, 41, 59, 0.85);
  transform: translateY(-2px);
}

/* 亮点统计条 */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
}

.stat-value {
  font-family: "Cascadia Code", "Consolas", monospace;
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 4px;
}

.stat-label {
  font-size: 13px;
  color: var(--text-muted);
}

/* 通用区块 */
section {
  padding: 52px 0;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 26px;
  gap: 12px;
  flex-wrap: wrap;
}

.section-title {
  font-size: 24px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title::before {
  content: "";
  width: 4px;
  height: 22px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--accent), #2563eb);
}

.section-sub {
  font-size: 13.5px;
  color: var(--text-dim);
}

/* 项目卡片 */
.projects-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 28px;
  transition: border-color 0.25s, transform 0.25s;
}

.project-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.project-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.project-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.project-title {
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
}

.project-badge {
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.14);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.project-period {
  font-family: "Cascadia Code", "Consolas", monospace;
  font-size: 12.5px;
  color: var(--text-dim);
}

.project-summary {
  color: #cbd5e1;
  font-size: 14.5px;
  margin-bottom: 14px;
}

.project-points {
  list-style: none;
  margin-bottom: 18px;
}

.project-points li {
  position: relative;
  padding-left: 18px;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.project-points li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* 视频内嵌或占位 */
.video-wrap {
  margin: 16px 0 18px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #06090f;
}

.video-iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: none;
  display: block;
}

.video-placeholder {
  padding: 26px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 13.5px;
  background: repeating-linear-gradient(
    -45deg,
    rgba(15, 23, 42, 0.7),
    rgba(15, 23, 42, 0.7) 12px,
    rgba(30, 41, 59, 0.35) 12px,
    rgba(30, 41, 59, 0.35) 24px
  );
}

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

.tag {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.16);
  color: #cbd5e1;
}

.project-links {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* 技术栈网格 */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.skill-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}

.skill-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 14px;
  color: #f8fafc;
  display: flex;
  align-items: center;
  gap: 8px;
}

.skill-card h3 span {
  color: var(--accent);
}

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

/* 关于我 & 联系卡片 */
.about-card {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.6));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

.about-card p {
  color: #cbd5e1;
  font-size: 15px;
  margin-bottom: 12px;
}

.contact-bar {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #0ea5e9;
  color: #082f49;
  font-weight: 700;
  font-size: 13.5px;
  padding: 10px 20px;
  border-radius: 999px;
  box-shadow: 0 10px 30px rgba(14, 165, 233, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s ease;
  z-index: 99;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

footer {
  border-top: 1px solid var(--border);
  padding: 28px 0 40px;
  margin-top: 24px;
  text-align: center;
  color: var(--text-dim);
  font-size: 12.5px;
}

@media (max-width: 820px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .skills-grid { grid-template-columns: 1fr; }
  .nav-links { gap: 16px; }
  .hero { padding: 56px 0 36px; }
  .project-card { padding: 20px; }
}
