/* ============================================================
   ROOT & RESET
   ============================================================ */
:root {
  --bg-primary: #080b14;
  --bg-secondary: #0d1220;
  --bg-card: #111827;
  --bg-card-hover: #1a2338;
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(99, 179, 237, 0.3);

  --text-primary: #f0f4ff;
  --text-secondary: #8899bb;
  --text-muted: #4a5878;

  --accent-blue: #00c6ff;
  --accent-purple: #7c3aed;
  --accent-cyan: #06b6d4;
  --accent-green: #10b981;

  --gradient-primary: linear-gradient(135deg, #00c6ff, #7c3aed);
  --gradient-secondary: linear-gradient(135deg, #7c3aed, #ec4899);

  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 40px rgba(0, 198, 255, 0.15);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --nav-height: 70px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
               'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 50px;
  font-size: 15px;
  font-weight: 600;
  transition: var(--transition);
  cursor: pointer;
  border: none;
}
.btn svg { width: 18px; height: 18px; transition: transform 0.3s; }
.btn:hover svg { transform: translateX(4px); }

.btn-primary {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: 0 4px 20px rgba(0, 198, 255, 0.3);
}
.btn-primary:hover {
  box-shadow: 0 8px 30px rgba(0, 198, 255, 0.45);
  transform: translateY(-2px);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1.5px solid var(--border);
}
.btn-secondary:hover {
  border-color: var(--accent-blue);
  color: var(--accent-blue);
  box-shadow: 0 4px 20px rgba(0, 198, 255, 0.15);
}

.btn-full { width: 100%; justify-content: center; border-radius: var(--radius-md); }

/* ============================================================
   TYPOGRAPHY UTILITIES
   ============================================================ */
.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-tag {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 50px;
  background: rgba(0, 198, 255, 0.1);
  border: 1px solid rgba(0, 198, 255, 0.25);
  color: var(--accent-blue);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.section-header {
  text-align: center;
  margin-bottom: 56px;
}
.section-header h2 {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  margin-bottom: 12px;
}
.section-header p {
  color: var(--text-secondary);
  font-size: 17px;
  max-width: 500px;
  margin: 0 auto;
}

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  z-index: 1000;
  transition: var(--transition);
}
.navbar.scrolled {
  background: rgba(8, 11, 20, 0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
}
.logo-icon {
  font-size: 22px;
  filter: drop-shadow(0 0 8px rgba(0, 198, 255, 0.6));
}
.logo-text { background: var(--gradient-primary); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-links a {
  font-size: 15px;
  color: var(--text-secondary);
  transition: var(--transition);
  font-weight: 500;
}
.nav-links a:hover { color: var(--text-primary); }

.nav-cta {
  padding: 8px 22px !important;
  border-radius: 50px !important;
  background: var(--gradient-primary) !important;
  color: #fff !important;
  font-weight: 600 !important;
}
.nav-cta:hover { box-shadow: 0 4px 20px rgba(0, 198, 255, 0.35); transform: translateY(-1px); }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
}

/* Mobile Menu */
.mobile-menu {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0; right: 0;
  background: rgba(8, 11, 20, 0.97);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  z-index: 999;
  padding: 16px 24px;
  transform: translateY(-100%);
  opacity: 0;
  transition: var(--transition);
}
.mobile-menu.open {
  transform: translateY(0);
  opacity: 1;
}
.mobile-menu ul { display: flex; flex-direction: column; gap: 4px; }
.mobile-menu a {
  display: block;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-weight: 500;
  transition: var(--transition);
}
.mobile-menu a:hover { background: var(--bg-card); color: var(--text-primary); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--nav-height) + 60px) 24px 80px;
  overflow: hidden;
  text-align: center;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.45;
  animation: orbFloat 8s ease-in-out infinite;
}
.orb-1 { width: 500px; height: 500px; background: rgba(0, 198, 255, 0.2); top: -150px; left: -100px; animation-delay: 0s; }
.orb-2 { width: 400px; height: 400px; background: rgba(124, 58, 237, 0.2); bottom: -80px; right: -80px; animation-delay: -3s; }
.orb-3 { width: 300px; height: 300px; background: rgba(16, 185, 129, 0.12); top: 50%; left: 50%; transform: translate(-50%, -50%); animation-delay: -5s; }

@keyframes orbFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-30px) scale(1.05); }
}
.orb-3 {
  animation: orbFloat3 8s ease-in-out infinite;
  animation-delay: -5s;
}
@keyframes orbFloat3 {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, calc(-50% - 20px)) scale(1.05); }
}

.hero-content { position: relative; z-index: 1; max-width: 800px; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 50px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 24px;
  backdrop-filter: blur(8px);
}
.badge-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 8px var(--accent-green);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 8px var(--accent-green); }
  50% { box-shadow: 0 0 16px var(--accent-green), 0 0 24px var(--accent-green); }
}

.hero-title {
  font-size: clamp(40px, 7vw, 72px);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}
.cursor-blink {
  color: var(--accent-blue);
  animation: blink 0.8s step-end infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

.hero-subtitle {
  font-size: clamp(16px, 2vw, 19px);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 36px;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.hero-tech-tags {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}
.hero-tech-tags span {
  padding: 5px 14px;
  border-radius: 50px;
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
  transition: var(--transition);
}
.hero-tech-tags span:hover {
  border-color: var(--accent-blue);
  color: var(--accent-blue);
}

.scroll-indicator {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.scroll-dot {
  width: 24px; height: 38px;
  border: 2px solid var(--border);
  border-radius: 12px;
  position: relative;
}
.scroll-dot::after {
  content: '';
  position: absolute;
  top: 5px; left: 50%;
  transform: translateX(-50%);
  width: 4px; height: 8px;
  border-radius: 2px;
  background: var(--accent-blue);
  animation: scrollDown 1.8s ease-in-out infinite;
}
@keyframes scrollDown {
  0% { top: 5px; opacity: 1; }
  100% { top: 22px; opacity: 0; }
}

/* ============================================================
   STATS
   ============================================================ */
.stats {
  padding: 80px 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.stat-card {
  text-align: center;
  padding: 36px 24px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 50%; transform: translateX(-50%);
  width: 60%; height: 2px;
  background: var(--gradient-primary);
  border-radius: 0 0 4px 4px;
  opacity: 0;
  transition: var(--transition);
}
.stat-card:hover { transform: translateY(-6px); border-color: var(--border-hover); box-shadow: var(--shadow-glow); }
.stat-card:hover::before { opacity: 1; }
.stat-icon { font-size: 32px; margin-bottom: 12px; }
.stat-number {
  font-size: 48px;
  font-weight: 800;
  display: inline;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-suffix {
  font-size: 28px;
  font-weight: 700;
  display: inline;
  color: var(--accent-blue);
}
.stat-label {
  margin-top: 8px;
  font-size: 15px;
  color: var(--text-secondary);
}

/* ============================================================
   ABOUT
   ============================================================ */
.about {
  padding: 100px 0;
}
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: center;
}
.about-visual {
  position: relative;
  height: 480px;
}
.about-card-main {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 280px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px 28px;
  text-align: center;
  box-shadow: var(--shadow-card);
}
.about-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  margin: 0 auto 16px;
  box-shadow: 0 0 24px rgba(0, 198, 255, 0.35);
}
.about-card-main h3 { font-size: 20px; font-weight: 700; }
.about-card-main p { color: var(--text-secondary); font-size: 14px; margin-bottom: 20px; }

.skill-bar { margin-bottom: 12px; text-align: left; }
.skill-bar span { font-size: 12px; color: var(--text-secondary); display: block; margin-bottom: 5px; }
.bar {
  height: 5px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  width: 0;
  border-radius: 3px;
  background: var(--gradient-primary);
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.bar-fill.animated { width: var(--w); }

.about-card-badge {
  position: absolute;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-card);
  white-space: nowrap;
}
.badge-top { top: 20px; right: 0; }
.badge-bottom { bottom: 20px; left: 0; }

.about-content {}
.about-content h2 { font-size: clamp(28px, 3.5vw, 42px); font-weight: 800; margin-bottom: 20px; line-height: 1.2; }
.about-desc { color: var(--text-secondary); font-size: 16px; margin-bottom: 32px; }
.about-features { display: flex; flex-direction: column; gap: 20px; margin-bottom: 36px; }
.feature-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.feature-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-sm);
  background: rgba(0, 198, 255, 0.1);
  border: 1px solid rgba(0, 198, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.feature-item h4 { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.feature-item p { font-size: 14px; color: var(--text-secondary); }

/* ============================================================
   PROJECTS
   ============================================================ */
.projects {
  padding: 100px 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
}

.filter-tabs-wrap {
  position: relative;
  margin-bottom: 48px;
}
/* 右侧淡出提示还有更多内容可滑动（仅手机显示） */
.filter-tabs-wrap::after {
  content: '';
  display: none;
  position: absolute;
  top: 0; right: 0;
  width: 48px; height: 100%;
  background: linear-gradient(to right, transparent, var(--bg-secondary));
  pointer-events: none;
}
@media (max-width: 768px) {
  .filter-tabs-wrap::after { display: block; }
  .filter-tabs-wrap { margin-bottom: 36px; }
}

.filter-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
.filter-btn {
  padding: 9px 22px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  border: 1.5px solid var(--border);
  color: var(--text-secondary);
  background: transparent;
  transition: var(--transition);
}
.filter-btn:hover { border-color: var(--accent-blue); color: var(--text-primary); }
.filter-btn.active {
  background: var(--gradient-primary);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 16px rgba(0, 198, 255, 0.3);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: var(--transition);
  position: relative;
}
.project-card:hover {
  transform: translateY(-8px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-card), var(--shadow-glow);
}
.project-card.hide {
  opacity: 0;
  transform: scale(0.92);
  pointer-events: none;
  display: none;
}

.featured-badge {
  position: absolute;
  top: 16px; right: 16px;
  z-index: 10;
  padding: 4px 12px;
  border-radius: 50px;
  background: var(--gradient-secondary);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.card-preview {
  position: relative;
  height: 200px;
  overflow: hidden;
}
.preview-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--color1), var(--color2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 56px;
  opacity: 0.85;
  transition: var(--transition);
}
.project-card:hover .preview-placeholder { transform: scale(1.05); opacity: 1; }

.card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(8, 11, 20, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
}
.project-card:hover .card-overlay { opacity: 1; }
.overlay-btn {
  padding: 10px 24px;
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  transition: var(--transition);
}
.overlay-btn:hover { background: var(--gradient-primary); border-color: transparent; }

.card-body { padding: 24px; }
.card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.tag {
  padding: 3px 10px;
  border-radius: 50px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}
.tag-web { background: rgba(0, 198, 255, 0.1); border-color: rgba(0, 198, 255, 0.25); color: var(--accent-blue); }
.tag-mobile { background: rgba(245, 158, 11, 0.1); border-color: rgba(245, 158, 11, 0.25); color: #f59e0b; }
.tag-data { background: rgba(16, 185, 129, 0.1); border-color: rgba(16, 185, 129, 0.25); color: var(--accent-green); }
.tag-saas    { background: rgba(139, 92, 246, 0.1); border-color: rgba(139, 92, 246, 0.25); color: #8b5cf6; }
.tag-finance { background: rgba(16, 185, 129, 0.1); border-color: rgba(245, 158, 11, 0.3);  color: #f59e0b; }

.card-body h3 { font-size: 17px; font-weight: 700; margin-bottom: 10px; }
.card-body p { font-size: 14px; color: var(--text-secondary); line-height: 1.7; margin-bottom: 16px; }

.card-footer { display: flex; justify-content: space-between; align-items: center; }
.card-meta { display: flex; gap: 12px; font-size: 12px; color: var(--text-muted); }
.card-status {
  padding: 3px 10px;
  border-radius: 50px;
  font-size: 11px;
  font-weight: 600;
}
.status-live {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--accent-green);
}

.projects-cta {
  text-align: center;
  margin-top: 56px;
  padding-top: 48px;
  border-top: 1px solid var(--border);
}
.projects-cta p { color: var(--text-secondary); margin-bottom: 20px; font-size: 16px; }

/* ============================================================
   CONTACT
   ============================================================ */
.contact {
  padding: 100px 0;
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
.contact-info {}
.contact-info h2 { font-size: clamp(28px, 3.5vw, 42px); font-weight: 800; margin-bottom: 16px; line-height: 1.2; }
.contact-info > p { color: var(--text-secondary); font-size: 16px; margin-bottom: 36px; line-height: 1.8; }

.contact-items { display: flex; flex-direction: column; gap: 16px; }
.contact-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: var(--transition);
}
a.contact-item:hover { border-color: var(--border-hover); transform: translateX(4px); }
.contact-item-icon {
  font-size: 22px;
  width: 44px; height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 198, 255, 0.08);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.contact-item-label { font-size: 12px; color: var(--text-muted); margin-bottom: 2px; }
.contact-item-value { font-size: 14px; font-weight: 600; }

.contact-form-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px;
}
.contact-form { display: flex; flex-direction: column; gap: 20px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 8px; }
label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.03em;
}
input, textarea, select {
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 14px;
  transition: var(--transition);
  outline: none;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(0, 198, 255, 0.1);
  background: rgba(0, 198, 255, 0.04);
}
input::placeholder, textarea::placeholder { color: var(--text-muted); }
select { appearance: none; cursor: pointer; }
select option { background: var(--bg-card); }
textarea { resize: vertical; min-height: 100px; }

.form-success {
  display: none;
  padding: 14px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-md);
  color: var(--accent-green);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}
.form-success.show { display: block; animation: fadeIn 0.4s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  border-top: 1px solid var(--border);
  background: var(--bg-secondary);
  padding: 60px 0 32px;
}
.footer-top {
  display: flex;
  gap: 64px;
  margin-bottom: 48px;
}
.footer-brand { flex: 1; }
.footer-brand .nav-logo { margin-bottom: 16px; }
.footer-brand p { color: var(--text-secondary); font-size: 14px; }
.footer-links { display: flex; gap: 64px; }
.footer-col h4 { font-size: 14px; font-weight: 700; margin-bottom: 16px; color: var(--text-primary); }
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col a {
  font-size: 14px;
  color: var(--text-secondary);
  transition: var(--transition);
}
.footer-col a:hover { color: var(--accent-blue); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 8px;
}

/* ============================================================
   AOS (Scroll Animations)
   ============================================================ */
[data-aos] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
[data-aos].aos-animate {
  opacity: 1;
  transform: translateY(0);
}
[data-aos]:nth-child(2) { transition-delay: 0.1s; }
[data-aos]:nth-child(3) { transition-delay: 0.2s; }
[data-aos]:nth-child(4) { transition-delay: 0.3s; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
/* ── 平板 ── */
@media (max-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; gap: 48px; }
  .about-visual { height: 360px; }
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; gap: 48px; }
  .stats   { padding: 64px 0; }
  .about   { padding: 80px 0; }
  .projects{ padding: 80px 0; }
  .contact { padding: 80px 0; }
}

/* ── 手机横屏 / 小平板 ── */
@media (max-width: 768px) {
  /* 导航 */
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .mobile-menu { display: block; }

  /* 区块间距 */
  .stats   { padding: 56px 0; }
  .about   { padding: 64px 0; }
  .projects{ padding: 64px 0; }
  .contact { padding: 64px 0; }
  .footer  { padding: 48px 0 24px; }

  /* 统计 */
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }

  /* 关于 — 隐藏复杂的绝对定位卡片，改用简洁布局 */
  .about-visual { display: none; }
  .about-grid   { grid-template-columns: 1fr; }

  /* 项目 */
  .projects-grid { grid-template-columns: 1fr; }

  /* 筛选栏 — 横向滚动，不换行 */
  .filter-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .filter-tabs::-webkit-scrollbar { display: none; }
  .filter-btn { flex-shrink: 0; }

  /* 表单 */
  .form-row { grid-template-columns: 1fr; }
  .contact-form-wrap { padding: 20px; }

  /* 页脚 */
  .footer-top { flex-direction: column; gap: 32px; }
  .footer-links { gap: 32px; }
  .footer-bottom { flex-direction: column; text-align: center; }

  /* Hero 技术标签 */
  .hero-tech-tags { gap: 8px; }
  .hero-tech-tags span { font-size: 12px; padding: 4px 12px; }

  /* 标题大小 */
  .section-header { margin-bottom: 36px; }
}

/* ── 手机竖屏 ── */
@media (max-width: 480px) {
  /* Hero */
  .hero { padding-left: 16px; padding-right: 16px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { justify-content: center; }

  /* 统计 */
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-card { padding: 20px 12px; }
  .stat-number { font-size: 34px; }
  .stat-icon { font-size: 26px; }

  /* 区块 */
  .container { padding: 0 16px; }
  .section-header h2 { font-size: 26px; }

  /* 项目卡片 */
  .card-preview { height: 160px; }
  .preview-placeholder { font-size: 44px; }

  /* 联系 */
  .contact-item { padding: 12px 14px; gap: 12px; }
  .contact-item-icon { width: 38px; height: 38px; font-size: 18px; }

  /* 按钮触摸区 */
  .btn { padding: 13px 24px; min-height: 48px; }
  .filter-btn { padding: 9px 18px; min-height: 40px; }

  /* 页脚 */
  .footer-links { flex-direction: column; gap: 24px; }

  /* 弹框 */
  .modal-header { padding: 20px 16px 16px; }
  .modal-body   { padding: 16px; }
  .modal-footer { padding: 14px 16px 20px; }
  .modal-title  { font-size: 18px; }
}

/* ============================================================
   LOADING STATE
   ============================================================ */
.projects-loading {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 80px 0;
  color: var(--text-secondary);
}
.loading-spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--accent-blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   MODAL OVERLAY
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 6, 14, 0.85);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 760px;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6), var(--shadow-glow);
  transform: translateY(24px) scale(0.97);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
  opacity: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.modal.open {
  transform: translateY(0) scale(1);
  opacity: 1;
}
.modal::-webkit-scrollbar { width: 5px; }
.modal::-webkit-scrollbar-track { background: transparent; }
.modal::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

.modal-close {
  position: sticky;
  top: 16px;
  float: right;
  margin: 16px 16px 0 0;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  z-index: 10;
  cursor: pointer;
  flex-shrink: 0;
}
.modal-close:hover { background: rgba(255,255,255,0.15); color: var(--text-primary); }

.modal-header {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 32px 32px 24px;
  border-bottom: 1px solid var(--border);
  clear: both;
}
.modal-icon {
  width: 64px; height: 64px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  flex-shrink: 0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}
.modal-meta { flex: 1; min-width: 0; }
.modal-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.modal-title { font-size: 22px; font-weight: 800; margin-bottom: 10px; }
.modal-info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--text-secondary);
}

/* ============================================================
   MARKDOWN BODY (rendered content)
   ============================================================ */
.modal-body {
  padding: 32px;
}
.markdown-body h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 28px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.markdown-body h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 20px 0 8px;
  color: var(--accent-blue);
}
.markdown-body p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 14px;
}
.markdown-body ul, .markdown-body ol {
  padding-left: 20px;
  margin-bottom: 14px;
}
.markdown-body li {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 6px;
}
.markdown-body li::marker { color: var(--accent-blue); }
.markdown-body strong { color: var(--text-primary); font-weight: 600; }
.markdown-body em { color: var(--accent-cyan); font-style: italic; }
.markdown-body code {
  background: rgba(0, 198, 255, 0.08);
  border: 1px solid rgba(0, 198, 255, 0.15);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 13px;
  color: var(--accent-blue);
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
}
.markdown-body pre {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  overflow-x: auto;
  margin-bottom: 16px;
}
.markdown-body pre code {
  background: none;
  border: none;
  padding: 0;
  color: var(--text-primary);
}
.markdown-body table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
  font-size: 14px;
}
.markdown-body th {
  background: rgba(0, 198, 255, 0.06);
  border: 1px solid var(--border);
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
  color: var(--text-primary);
}
.markdown-body td {
  border: 1px solid var(--border);
  padding: 9px 14px;
  color: var(--text-secondary);
}
.markdown-body tr:hover td { background: rgba(255,255,255,0.02); }
.markdown-body blockquote {
  border-left: 3px solid var(--accent-blue);
  padding: 12px 16px;
  margin: 0 0 14px;
  background: rgba(0, 198, 255, 0.04);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.markdown-body blockquote p { margin: 0; color: var(--text-secondary); }
.markdown-body hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 24px 0;
}

.modal-footer {
  display: flex;
  gap: 12px;
  padding: 20px 32px 28px;
  border-top: 1px solid var(--border);
  justify-content: flex-end;
}

/* ============================================================
   RESPONSIVE MODAL
   ============================================================ */
@media (max-width: 600px) {
  .modal-overlay { padding: 0; align-items: flex-end; }
  .modal {
    max-height: 90vh;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    max-width: 100%;
  }
  .modal-header { padding: 24px 20px 20px; flex-direction: column; }
  .modal-body { padding: 20px; }
  .modal-footer { padding: 16px 20px 24px; flex-direction: column-reverse; }
  .modal-footer .btn { width: 100%; justify-content: center; }
}
