/* ===== Variables ===== */
:root {
  --bg: #0a0a0f;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.08);
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --primary: #6366f1;
  --primary-light: #818cf8;
  --accent: #8b5cf6;
  --cyan: #06b6d4;
  --gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #06b6d4 100%);
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --font: 'Inter', 'Noto Sans SC', system-ui, sans-serif;
  --max-w: 1180px;
  --nav-h: 64px;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

/* ===== Background ===== */
.bg-mesh {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(99, 102, 241, 0.15), transparent),
    radial-gradient(ellipse 60% 50% at 80% 20%, rgba(139, 92, 246, 0.12), transparent),
    radial-gradient(ellipse 50% 40% at 50% 80%, rgba(6, 182, 212, 0.08), transparent);
}

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black, transparent);
}

/* ===== Nav ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  z-index: 100;
  backdrop-filter: blur(20px);
  background: rgba(10, 10, 15, 0.7);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s;
}

.nav.scrolled { background: rgba(10, 10, 15, 0.92); }

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 32px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-weight: 700;
  font-size: 1.1rem;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.nav-links a {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color 0.2s, background 0.2s;
}

.nav-links a:hover { color: var(--text); background: rgba(255,255,255,0.05); }

.nav-cta {
  background: var(--gradient) !important;
  color: white !important;
  -webkit-text-fill-color: white !important;
  font-weight: 600;
}

.nav-cta:hover { opacity: 0.9; }

/* ===== Layout ===== */
main { padding-top: var(--nav-h); }

.section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 72px 32px;
}

.section-header { margin-bottom: 48px; }

.section-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary-light);
  margin-bottom: 12px;
}

.section-header h2 {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.section-desc {
  margin-top: 12px;
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 720px;
}

/* ===== Strengths ===== */
.strengths-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.strength-card {
  padding: 28px;
  border-top: 3px solid var(--card-accent, var(--primary));
}

.strength-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }

.strength-icon { font-size: 2rem; margin-bottom: 12px; }

.strength-card h3 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.strength-summary {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.65;
}

.strength-points li {
  position: relative;
  padding-left: 16px;
  margin-bottom: 8px;
  font-size: 0.8125rem;
  color: var(--text-dim);
}

.strength-points li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--card-accent, var(--primary));
}

/* ===== Glass Card ===== */
.glass {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
  transition: background 0.3s, border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}

.glass:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.12);
}

/* ===== Hero ===== */
.hero {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 56px 32px 72px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
  min-height: auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.25);
  font-size: 0.8125rem;
  color: var(--primary-light);
  margin-bottom: 24px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  animation: pulse 2s infinite;
}

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

.hero-title {
  font-size: 3.25rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

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

.hero-subtitle {
  font-size: 1.375rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.hero-desc {
  font-size: 1rem;
  color: var(--text-dim);
  margin-bottom: 20px;
}

.hero-highlights {
  margin-bottom: 28px;
}

.hero-highlights li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 8px;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.hero-highlights li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gradient);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  font-weight: 600;
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
  cursor: pointer;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--gradient);
  color: white;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.35);
}

.btn-primary:hover { box-shadow: 0 6px 28px rgba(99, 102, 241, 0.5); }

.btn-outline {
  border: 1px solid var(--border);
  color: var(--text);
  background: transparent;
}

.btn-outline:hover { border-color: rgba(255,255,255,0.2); background: rgba(255,255,255,0.04); }

.btn-sm {
  padding: 8px 18px;
  font-size: 0.8125rem;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 24px;
}

.stat { text-align: center; }

.stat-num {
  display: block;
  font-size: 1.75rem;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 0.8125rem;
  color: var(--text-dim);
}

.stat-divider {
  width: 1px;
  height: 36px;
  background: var(--border);
}

/* Hero Visual */
.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 440px;
}

.hero-portrait-wrap {
  position: relative;
  width: 260px;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(99, 102, 241, 0.15);
  animation: float 6s ease-in-out infinite;
  background: #12121a;
}

.hero-portrait {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center 58%;
  display: block;
}

.hero-portrait-accent {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to top, rgba(10, 10, 15, 0.35), transparent 40%);
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.orbit {
  position: absolute;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  backdrop-filter: blur(8px);
  white-space: nowrap;
}

.orbit-1 { top: 10%; left: 5%; animation: orbit1 8s ease-in-out infinite; }
.orbit-2 { top: 15%; right: 0; animation: orbit2 7s ease-in-out infinite; }
.orbit-3 { bottom: 20%; left: 0; animation: orbit3 9s ease-in-out infinite; }
.orbit-4 { bottom: 10%; right: 5%; animation: orbit4 6s ease-in-out infinite; }

@keyframes orbit1 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(10px, -15px); }
}
@keyframes orbit2 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-12px, 10px); }
}
@keyframes orbit3 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(15px, 8px); }
}
@keyframes orbit4 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-8px, -12px); }
}

/* ===== About ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
}

.about-card { padding: 36px; }

.about-text {
  font-size: 1.0625rem;
  color: var(--text-muted);
  line-height: 1.85;
}

.about-side { display: flex; flex-direction: column; gap: 24px; }

.info-card { padding: 28px; }

.info-card h3 {
  font-size: 0.875rem;
  color: var(--text-dim);
  margin-bottom: 12px;
}

.info-title {
  font-size: 1.0625rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.info-sub { color: var(--text-muted); font-size: 0.9375rem; }

.info-meta {
  font-size: 0.8125rem;
  color: var(--text-dim);
  margin-top: 8px;
}

.info-courses {
  margin-top: 12px;
  font-size: 0.8125rem;
  color: var(--text-dim);
  line-height: 1.6;
}

.info-courses span {
  color: var(--text-muted);
  font-weight: 600;
}

/* ===== Skills ===== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.skill-card {
  padding: 28px;
  text-align: left;
}

.skill-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }

.skill-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.skill-icon { font-size: 1.75rem; flex-shrink: 0; }

.skill-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.skill-desc {
  font-size: 0.8125rem;
  color: var(--text-dim);
}

.skill-bar {
  height: 4px;
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
  margin-bottom: 16px;
  overflow: hidden;
}

.skill-bar-fill {
  height: 100%;
  background: var(--gradient);
  border-radius: 2px;
  transition: width 1s ease;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-start;
}

.tag {
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary-light);
  border: 1px solid rgba(99, 102, 241, 0.15);
  transition: background 0.2s;
}

.tag:hover { background: rgba(99, 102, 241, 0.2); }

.tag-sm { font-size: 0.6875rem; padding: 3px 10px; }

/* ===== Timeline ===== */
.timeline { position: relative; padding-left: 32px; }

.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(to bottom, var(--primary), var(--accent), transparent);
}

.timeline-item { position: relative; margin-bottom: 32px; }

.timeline-dot {
  position: absolute;
  left: -32px;
  top: 24px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--gradient);
  border: 3px solid var(--bg);
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.5);
}

.timeline-card { padding: 32px; }

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
  gap: 16px;
}

.timeline-header h3 { font-size: 1.125rem; font-weight: 700; }

.timeline-role { color: var(--primary-light); font-size: 0.9375rem; margin-top: 4px; }

.timeline-scope {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.timeline-scope strong { color: var(--text); }

.timeline-impact {
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.2);
  margin-bottom: 24px;
}

.impact-label {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--primary-light);
  margin-bottom: 6px;
}

.timeline-impact p {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.exp-modules {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.exp-module {
  padding: 16px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
}

.exp-module h4 {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--primary-light);
  margin-bottom: 10px;
}

.exp-module .timeline-list { margin-bottom: 0; }

.exp-module .timeline-list li { font-size: 0.8125rem; }

.timeline-period {
  font-size: 0.8125rem;
  color: var(--text-dim);
  white-space: nowrap;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
}

.timeline-list { margin-bottom: 16px; }

.timeline-list li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 8px;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.timeline-list li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 9px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--primary-light);
}

/* ===== Projects ===== */
.projects-list {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.project-card {
  padding: 0;
  overflow: hidden;
  border-left: 4px solid var(--accent, var(--primary));
  transition: transform 0.3s, box-shadow 0.3s;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

.project-showcase {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 0;
  align-items: stretch;
}

.project-card:nth-child(even) .project-showcase {
  direction: rtl;
}

.project-card:nth-child(even) .project-showcase > * {
  direction: ltr;
}

.project-frame-col {
  padding: 28px;
  background: rgba(0, 0, 0, 0.25);
  border-right: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-frame-mobile,
.project-frame-poster {
  flex-direction: column;
  align-self: center;
  padding: 16px 24px 20px;
}

.project-frame-mobile {
  background: radial-gradient(ellipse at center, rgba(6, 182, 212, 0.08), rgba(0, 0, 0, 0.25));
}

.project-frame-poster {
  background: radial-gradient(ellipse at center, rgba(139, 92, 246, 0.06), rgba(0, 0, 0, 0.22));
}

.frame-label {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 0.04em;
  margin-bottom: 12px;
}

.poster-preview {
  width: min(100%, 240px);
  margin: 0 auto;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #fff;
  line-height: 0;
}

.poster-preview img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  cursor: zoom-in;
}

.browser-mockup {
  display: block;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  background: #1a1d26;
  position: relative;
}

.browser-mockup-link {
  transition: transform 0.25s, box-shadow 0.25s;
}

.browser-mockup-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 48px rgba(99, 102, 241, 0.2);
}

.browser-mockup-link:hover .browser-hover-hint { opacity: 1; }

.browser-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #252932;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.browser-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.browser-dot-red { background: #ff5f57; }
.browser-dot-yellow { background: #febc2e; }
.browser-dot-green { background: #28c840; }

.browser-url {
  flex: 1;
  margin-left: 8px;
  padding: 5px 12px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.35);
  font-size: 0.75rem;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.browser-screen {
  background: #eef2f7;
  padding: 12px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-height: 280px;
  overflow: auto;
}

.browser-screen img {
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
  object-position: center top;
  border-radius: 4px;
  display: block;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.12);
}

/* Phone mockup for mobile / WeChat mini program screenshots */
.phone-mockup {
  position: relative;
  display: block;
  width: min(100%, 200px);
  margin: 0 auto;
}

.phone-mockup-link {
  transition: transform 0.25s;
}

.phone-mockup-link:hover {
  transform: translateY(-4px);
}

.phone-shell {
  border-radius: 26px;
  padding: 8px 7px 7px;
  background: linear-gradient(145deg, #2a2d36, #1a1d24);
  border: 2px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.phone-notch {
  width: 56px;
  height: 5px;
  margin: 0 auto 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.5);
}

.phone-screen {
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
  line-height: 0;
}

.phone-screen img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

.phone-home {
  width: 32px;
  height: 3px;
  margin: 8px auto 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.25);
}

.browser-hover-hint {
  position: absolute;
  bottom: 16px;
  right: 16px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.9);
  color: white;
  font-size: 0.8125rem;
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.25s;
  pointer-events: none;
}

.project-detail-col {
  padding: 32px 36px;
  display: flex;
  flex-direction: column;
}

.project-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.project-icon-lg { font-size: 2rem; }

.project-detail-col h3 {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.project-tagline {
  font-size: 0.9375rem;
  color: var(--primary-light);
  margin-bottom: 8px;
}

.project-role-line {
  font-size: 0.8125rem;
  color: var(--text-dim);
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.project-detail-col .project-desc {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 20px;
}

.project-detail-col .project-highlights {
  margin-bottom: 20px;
  flex: 1;
}

.project-detail-col .project-highlights li {
  position: relative;
  padding-left: 18px;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.project-detail-col .project-highlights li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent, var(--primary));
}

.project-type {
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 700;
}

.project-type-intern {
  background: rgba(6, 182, 212, 0.15);
  color: #67e8f9;
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.project-type-personal {
  background: rgba(139, 92, 246, 0.15);
  color: #c4b5fd;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding-top: 20px;
}

.project-url {
  font-size: 0.8125rem;
  color: var(--primary-light);
}

.project-url-muted {
  font-size: 0.8125rem;
  color: var(--text-dim);
  font-style: italic;
}

/* legacy project cover - removed */
.project-cover-legacy { display: none; }

/* ===== Contact ===== */
.section-contact { padding-bottom: 60px; }

.contact-wrapper {
  padding: 56px;
  text-align: center;
}

.contact-desc {
  color: var(--text-muted);
  margin-top: 12px;
  font-size: 1rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 40px;
}

.contact-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 28px 20px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-align: center;
  width: 100%;
}

.contact-item-wechat:hover {
  background: rgba(7, 193, 96, 0.1);
  border-color: rgba(7, 193, 96, 0.35);
}

.contact-icon-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: var(--text);
}

.contact-icon-svg,
.contact-icon-img {
  display: block;
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.contact-icon-fallback {
  font-size: 1.5rem;
  line-height: 1;
}

.contact-item-wechat.copied {
  border-color: rgba(7, 193, 96, 0.6);
  background: rgba(7, 193, 96, 0.15);
}

.contact-item:hover {
  background: rgba(99, 102, 241, 0.08);
  border-color: rgba(99, 102, 241, 0.25);
  transform: translateY(-3px);
}

.contact-icon { font-size: 1.5rem; }

.contact-icon:not(.contact-icon-brand) {
  display: block;
}

.contact-label {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.contact-value {
  font-size: 0.875rem;
  color: var(--text-muted);
  word-break: break-all;
}

/* ===== Footer ===== */
.footer {
  text-align: center;
  padding: 32px;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.8125rem;
}

/* ===== Reveal Animation - content always visible ===== */
.reveal {
  opacity: 1;
  transform: none;
}

html.js-ready .reveal {
  transition: opacity 0.6s ease, transform 0.6s ease;
  transition-delay: var(--delay, 0s);
}

html.js-ready .reveal.reveal-pending {
  opacity: 0;
  transform: translateY(20px);
}

html.js-ready .reveal.visible {
  opacity: 1;
  transform: none;
}

/* Image lightbox */
.img-lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
}

.img-lightbox.open {
  opacity: 1;
  visibility: visible;
}

.img-lightbox img {
  max-width: min(1200px, 96vw);
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
}

.img-lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s;
}

.img-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ===== Live Projects ===== */
.section-live {
  padding-top: 32px;
  padding-bottom: 64px;
}

.live-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.live-card {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  border-left: 4px solid var(--card-accent, var(--primary));
  transition: transform 0.25s, box-shadow 0.25s, background 0.25s;
}

.live-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  background: var(--bg-card-hover);
}

.live-preview {
  position: relative;
  background: #eef2f7;
  padding: 16px;
  border-bottom: 1px solid var(--border);
  min-height: 200px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow: hidden;
}

.live-preview img {
  width: 100%;
  height: auto;
  max-height: 220px;
  object-fit: contain;
  object-position: center top;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  transition: transform 0.35s ease;
}

.live-card:hover .live-preview img {
  transform: scale(1.02);
}

.live-preview-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(34, 197, 94, 0.85);
  backdrop-filter: blur(8px);
}

.live-body {
  padding: 20px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
}

.live-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.live-icon { font-size: 2rem; flex-shrink: 0; line-height: 1; }

.live-info { flex: 1; min-width: 0; }

.live-info h3 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.live-info p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.live-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.live-url {
  font-size: 0.8125rem;
  color: var(--primary-light);
  word-break: break-all;
}

.live-arrow {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--card-accent, var(--primary-light));
  white-space: nowrap;
  flex-shrink: 0;
}

/* ===== Responsive (desktop-first, minor tablet) ===== */
@media (max-width: 1024px) {
  .hero { grid-template-columns: 1fr; text-align: center; gap: 36px; }
  .hero-visual { min-height: 320px; }
  .hero-actions { justify-content: center; }
  .hero-stats { justify-content: center; flex-wrap: wrap; }
  .hero-highlights { text-align: left; max-width: 480px; margin-left: auto; margin-right: auto; }
  .live-grid { grid-template-columns: 1fr; }
  .strengths-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: 1fr; }
  .project-showcase { grid-template-columns: 1fr; }
  .project-card:nth-child(even) .project-showcase { direction: ltr; }
  .project-frame-col { border-right: none; border-bottom: 1px solid var(--border); }
  .projects-list { gap: 32px; }
  .about-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: repeat(2, 1fr); }
  .exp-modules { grid-template-columns: 1fr; }
  .project-insight { grid-template-columns: 1fr; }
  .hero-portrait-wrap { width: 220px; }
}

@media (max-width: 768px) {
  .hero-title { font-size: 2.25rem; }
  .section { padding: 56px 20px; }
  .section-header h2 { font-size: 1.75rem; }
  .skills-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .nav-links a:not(.nav-cta) { display: none; }
  .hero-visual { display: none; }
}
