/* ==========================================
   PORTFOLIO - Custom Styles
   Dark Tech Mechanical Engineer Portfolio
   ========================================== */

/* ---- CSS Variables ---- */
:root {
  --color-bg-primary: #0a0a0c;
  --color-bg-secondary: #111116;
  --color-bg-card: #141419;
  --color-bg-card-hover: #1a1a22;
  --color-border: rgba(255, 255, 255, 0.06);
  --color-border-accent: rgba(82, 140, 196, 0.25);
  --color-text-primary: #e8e8ec;
  --color-text-secondary: #8a8a9a;
  --color-text-muted: #555565;
  --color-accent-blue: #528cc4;
  --color-accent-silver: #a8b4c0;
  --color-accent-gold: #8a7f6a;
  --color-line: rgba(82, 140, 196, 0.15);
  --font-display: 'Space Grotesk', 'Inter', sans-serif;
  --font-body: 'Inter', 'PingFang SC', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --max-width: 1700px;
  --easing-smooth: cubic-bezier(0.16, 1, 0.3, 1);
  --easing-in: cubic-bezier(0.4, 0, 1, 1);
  --easing-out: cubic-bezier(0, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 16px;
}

body {
  background-color: var(--color-bg-primary);
  color: var(--color-text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
}

.page-wrapper {
  overflow-x: hidden;
}

/* Subtle noise grain overlay for matte texture */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 10000;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px 200px;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--color-bg-primary); }
::-webkit-scrollbar-thumb { background: rgba(82, 140, 196, 0.3); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: rgba(82, 140, 196, 0.5); }

/* ---- Loading Screen ---- */
#loading-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--color-bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.loading-logo {
  font-family: Arial, sans-serif;
  font-size: clamp(1.27rem, 2.34vw, 1.66rem);
  font-weight: bold;
  letter-spacing: 0.35em;
  color: #ffffff;
  text-transform: uppercase;
  white-space: nowrap;
}

.loading-inner {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
}

.loading-bar-wrap {
  width: 100%;
  height: 1px;
  margin-top: 2rem;
  background: rgba(255,255,255,0.06);
  position: relative;
  overflow: hidden;
  align-self: stretch;
}

.loading-bar {
  position: absolute;
  inset: 0;
  width: 0%;
  background: linear-gradient(90deg, transparent, var(--color-accent-blue), transparent);
  transition: width 1.8s var(--easing-smooth);
}

/* ---- Navigation ---- */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1.25rem 2.5rem;
  transition: transform 0.5s var(--easing-smooth), background 0.4s ease;
  will-change: transform;
}

#navbar.scrolled {
  background: rgba(10, 10, 12, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--color-border);
}

#navbar.nav-hidden {
  transform: translateY(-100%);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--color-accent-blue);
}

.nav-logo-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  object-fit: contain;
  filter: drop-shadow(0 0 6px rgba(82, 140, 196, 0.35));
  transition: filter 0.4s ease;
}

.nav-logo:hover .nav-logo-icon {
  filter: drop-shadow(0 0 12px rgba(82, 140, 196, 0.55));
}

.nav-logo-text {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--color-text-primary);
  transition: color 0.3s ease;
}

.nav-logo:hover .nav-logo-text {
  color: var(--color-accent-blue);
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  font-family: 'Microsoft YaHei', '微软雅黑', 'PingFang SC', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #ffffff;
  text-decoration: none;
  transition: color 0.3s ease;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--color-accent-blue);
  transition: width 0.35s var(--easing-smooth);
}

.nav-links a:hover { color: var(--color-accent-blue); }
.nav-links a:hover::after { width: 100%; }

.nav-right-text {
  font-family: '等线', 'DengXian', sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  color: #ffffff;
  text-transform: uppercase;
  text-align: right;
  white-space: nowrap;
}

/* Mobile menu button */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 1px;
  background: var(--color-text-secondary);
  transition: all 0.3s ease;
}

/* ---- Section Common ---- */
.section-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 3rem;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.4em;
  color: var(--color-accent-blue);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  opacity: 0;
}

.section-label::before {
  content: '';
  width: 2.5rem;
  height: 1px;
  background: var(--color-accent-blue);
  opacity: 0.6;
}

/* Section background title watermark (big English text behind) */
.section-bg-title {
  font-family: var(--font-display);
  font-size: clamp(5rem, 12vw, 10rem);
  font-weight: 900;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255,255,255,0.03);
  line-height: 1;
  user-select: none;
  position: absolute;
  top: -2rem;
  left: -1rem;
  white-space: nowrap;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

/* ---- Hero Curtain Mask ---- */
.hero-curtain {
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  display: flex;
}

.hero-curtain-half {
  flex: 1;
  background: #0a0a0c;
  will-change: transform;
}

.hero-curtain-left {
  border-right: 1px solid rgba(82, 140, 196, 0.15);
}

.hero-curtain-right {
  border-left: 1px solid rgba(82, 140, 196, 0.15);
}

/* ---- Hero Section ---- */
#hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  text-align: center;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

/* Gradient Background (no image needed) */
.hero-bg-gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(82, 140, 196, 0.08) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 80% 60%, rgba(40, 60, 90, 0.12) 0%, transparent 70%),
    linear-gradient(180deg, #0a0a0c 0%, #0d0d14 100%);
}

/* Engineering Grid Lines */
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(82, 140, 196, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(82, 140, 196, 0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 40%, transparent 100%);
}

.hero-scan-line {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(82, 140, 196, 0.4), transparent);
  animation: scanLine 6s linear infinite;
  opacity: 0.5;
}

@keyframes scanLine {
  0% { top: 0%; opacity: 0; }
  5% { opacity: 0.5; }
  95% { opacity: 0.5; }
  100% { top: 100%; opacity: 0; }
}

/* Corner decorations */
.hero-corner {
  position: absolute;
  width: 60px;
  height: 60px;
  opacity: 0.3;
}
.hero-corner-tl { top: 2rem; left: 2rem; border-top: 1px solid var(--color-accent-blue); border-left: 1px solid var(--color-accent-blue); }
.hero-corner-tr { top: 2rem; right: 2rem; border-top: 1px solid var(--color-accent-blue); border-right: 1px solid var(--color-accent-blue); }
.hero-corner-bl { bottom: 4rem; left: 2rem; border-bottom: 1px solid var(--color-accent-blue); border-left: 1px solid var(--color-accent-blue); }
.hero-corner-br { bottom: 4rem; right: 2rem; border-bottom: 1px solid var(--color-accent-blue); border-right: 1px solid var(--color-accent-blue); }

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
}
/* Flex order: 精密驱动(1) → 英文PRECISION(2) → Mechanical(4) → 15年(5) → tags(6) */
.hero-title { order: 1; }
.hero-title-en { order: 2; margin-top: 0; }
.hero-subtitle-pre { order: 4; }
.hero-subtitle { order: 5; }
.hero-tags { order: 6; }

.hero-subtitle-pre {
  font-family: var(--font-display);
  font-size: clamp(0.91rem, 1.56vw, 1.17rem);
  font-weight: 600;
  letter-spacing: 0.25em;
  color: var(--color-text-primary);
  text-transform: uppercase;
  margin-top: 2em;
  margin-bottom: 0.5em;
  opacity: 0;
}

.hero-title-en {
  font-family: var(--font-display);
  font-size: clamp(0.91rem, 1.56vw, 1.17rem);
  letter-spacing: 0.2em;
  color: #ffffff;
  margin-bottom: 0;
  opacity: 0;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 7vw, 6rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--color-text-primary);
  margin-bottom: 0.3em;
  overflow: hidden;
  will-change: transform;
}

.hero-title-line {
  display: block;
  opacity: 0;
  transform: translateY(100%) scaleY(0.85);
  will-change: transform, opacity;
}

.hero-title span {
  color: transparent;
  background: linear-gradient(135deg, var(--color-accent-blue) 0%, var(--color-accent-silver) 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(0.85rem, 1.5vw, 1rem);
  color: var(--color-text-secondary);
  letter-spacing: 0.05em;
  margin-top: 0;
  margin-bottom: 2.5rem;
  max-width: 500px;
  line-height: 1.7;
  opacity: 0;
}

.hero-tags {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 3rem;
  opacity: 0;
}

.hero-tag {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  padding: 0.55rem 1.3rem;
  border: 1px solid rgba(82, 140, 196, 0.5);
  color: var(--color-accent-silver);
  text-transform: uppercase;
  background: rgba(82, 140, 196, 0.04);
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  transition: color 0.35s ease, border-color 0.35s ease, background 0.35s ease;
  --mx: 50%;
  --my: 50%;
}

.hero-tag .tag-label {
  position: relative;
  z-index: 2;
}

/* 光标跟随的发光边框 - 通过 radial gradient 模拟 */
.hero-tag::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  padding: 1.5px;
  background: radial-gradient(
    110px circle at var(--mx) var(--my),
    rgba(120, 220, 255, 1) 0%,
    rgba(82, 180, 255, 0.9) 15%,
    rgba(82, 140, 196, 0.65) 30%,
    rgba(82, 140, 196, 0.2) 50%,
    rgba(82, 140, 196, 0) 75%
  );
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0.6;
  transition: opacity 0.25s ease;
  pointer-events: none;
  z-index: 1;
}

/* 内部光晕 - 提供柔和的背景染色 */
.hero-tag::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    120px circle at var(--mx) var(--my),
    rgba(82, 160, 240, 0.28) 0%,
    rgba(82, 140, 196, 0.1) 40%,
    rgba(82, 140, 196, 0) 70%
  );
  opacity: 0.7;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 0;
}

.hero-tag:hover {
  color: #e6f1ff;
  border-color: rgba(120, 220, 255, 0.7);
  background: rgba(82, 140, 196, 0.1);
}

.hero-tag:hover::before,
.hero-tag:hover::after {
  opacity: 1;
}

.hero-scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  opacity: 0;
}

.hero-scroll-text {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  color: var(--color-text-muted);
  text-transform: uppercase;
}

.hero-scroll-arrow {
  width: 18px;
  height: 28px;
  border: 1px solid rgba(82, 140, 196, 0.3);
  border-radius: 10px;
  display: flex;
  justify-content: center;
  padding-top: 5px;
}

.hero-scroll-dot {
  width: 3px;
  height: 6px;
  background: var(--color-accent-blue);
  border-radius: 2px;
  animation: scrollDot 2s ease-in-out infinite;
}

@keyframes scrollDot {
  0%, 100% { opacity: 1; transform: translateY(0); }
  50% { opacity: 0; transform: translateY(8px); }
}

/* ---- About Section ---- */
#about {
  padding: 10rem 0;
  position: relative;
  overflow: hidden;
}

/* ---- Section Header ---- */
.about-section-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 3.5rem;
  opacity: 0;
  transform: translateY(30px);
}

.about-section-counter {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--color-text-muted);
  letter-spacing: 0.15em;
}

.about-section-header-line {
  flex: 1;
  max-width: 160px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-accent-blue), transparent);
  opacity: 0.4;
}

.about-section-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  color: var(--color-accent-blue);
  text-transform: uppercase;
}

/* ---- Main Grid: 12-col, 5:7 split ---- */
.about-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 4rem;
  align-items: start;
}

.about-col-left {
  grid-column: span 5;
  opacity: 0;
  transform: translateX(-40px);
}

.about-col-right {
  grid-column: span 7;
}

/* ---- Left: Photo ---- */
.about-photo-frame {
  position: relative;
  margin-bottom: 1.5rem;
}

.about-photo-wrap {
  position: relative;
  aspect-ratio: 3/4;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  overflow: hidden;
}

.about-photo-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  z-index: 1;
}

/* Photo corner L-decorations */
.about-corner-tl {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 40px;
  height: 40px;
  border-top: 1px solid var(--color-accent-blue);
  border-left: 1px solid var(--color-accent-blue);
  opacity: 0.8;
  z-index: 3;
  pointer-events: none;
}

.about-corner-br {
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 40px;
  height: 40px;
  border-bottom: 1px solid var(--color-accent-blue);
  border-right: 1px solid var(--color-accent-blue);
  opacity: 0.8;
  z-index: 3;
  pointer-events: none;
}

/* Photo reveal overlay */
.about-photo-reveal {
  position: absolute;
  inset: 0;
  background: var(--color-bg-card);
  z-index: 2;
  transform-origin: right center;
  will-change: transform;
}

/* ---- Left: Info under photo ---- */
.about-photo-info {
  text-align: center;
  margin-bottom: 1.5rem;
}

.about-photo-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 0.3rem;
}

.about-photo-title {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.25em;
  color: var(--color-accent-blue);
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}

.about-photo-detail {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--color-text-muted);
}

/* ---- Left: Contact links ---- */
.about-photo-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.about-contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  transition: border-color 0.3s ease, color 0.3s ease, background 0.3s ease;
}

.about-contact-link:hover {
  border-color: var(--color-border-accent);
  color: var(--color-text-primary);
  background: rgba(82, 140, 196, 0.06);
}

.about-contact-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  stroke: currentColor;
}

/* ---- Right: Stats Row (3 columns) ---- */
.about-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--color-border);
  margin-bottom: 2rem;
  opacity: 0;
  transform: translateY(30px);
}

.about-stat-item {
  padding: 1.5rem 1.25rem;
  text-align: center;
  border-right: 1px solid var(--color-border);
  background: var(--color-bg-card);
}

.about-stat-item:last-child {
  border-right: none;
}

/* 数字 + 单位（上标+/款字）同一行 */
.about-stat-figure {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  line-height: 1;
  margin-bottom: 0.35rem;
}

.about-stat-num {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1;
}

/* 单位统一蓝色；+ 为上标，款字基线跟随 */
.about-stat-unit {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--color-accent-blue);
  line-height: 1;
}
sup.about-stat-unit {
  font-size: 1.1rem;
  margin-left: 0.1em;
  margin-top: 0.15em;
}
.about-stat-unit--inline {
  font-size: 0.95rem;
  margin-left: 0.12em;
  align-self: baseline;
}

.about-stat-label {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  color: var(--color-text-muted);
  text-transform: uppercase;
}

/* ---- Right: Bio text ---- */
.about-bio-text {
  font-size: 0.9rem;
  line-height: 1.9;
  color: var(--color-text-secondary);
  margin-bottom: 2.5rem;
  opacity: 0;
  transform: translateY(20px);
}

/* ---- Right: Timeline ---- */
.about-timeline-wrap {
  position: relative;
  padding-left: 1.25rem;
  opacity: 0;
}

.about-timeline-line {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(82, 140, 196, 0.45) 8%, rgba(82, 140, 196, 0.45) 92%, transparent);
}

.about-timeline-items {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.about-timeline-item {
  position: relative;
  display: flex;
  gap: 1rem;
}

.about-timeline-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--color-accent-blue);
  border-radius: 50%;
  vertical-align: middle;
  margin-right: 0.5rem;
  flex-shrink: 0;
  box-shadow: 0 0 8px rgba(82, 140, 196, 0.5);
}

.about-timeline-content {
  flex: 1;
  min-width: 0;
}

.about-timeline-period {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.4rem;
}

.about-timeline-period span:first-child {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--color-accent-blue);
  letter-spacing: 0.15em;
  white-space: nowrap;
}

.about-timeline-period-line {
  flex: 1;
  max-width: 50px;
  height: 1px;
  background: linear-gradient(90deg, var(--color-accent-blue), transparent);
  opacity: 0.35;
}

.about-timeline-role {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 0.3rem;
  line-height: 1.4;
}

.about-timeline-desc {
  font-size: 0.78rem;
  line-height: 1.75;
  color: var(--color-text-secondary);
}

/* ---- Projects Section ---- */
#projects {
  padding: 10rem 0;
  position: relative;
  background: var(--color-bg-secondary);
  overflow: hidden;
}

.projects-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 4rem;
  position: relative;
  z-index: 1;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  font-weight: 800;
  line-height: 1.1;
  opacity: 0;
  will-change: transform, opacity;
}

/* 默认 5 卡片布局 */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.5rem;
  position: relative;
  z-index: 1;
}

/* 4 卡片项目经历布局：2x2 网格，每张 6 列 */
.projects-grid-4 {
  grid-template-columns: repeat(12, 1fr);
}

.projects-grid-4 .project-card { grid-column: span 6; }

/* Project card sizes — all equal */
.project-card {
  background: var(--color-bg-card);
  border: 1px solid rgba(82, 140, 196, 0.2);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  opacity: 0;
  transform: translateY(20px);
  --mx: 50%;
  --my: 50%;
  transition: border-color 0.4s ease;
}

.project-card:nth-child(1) { grid-column: span 6; }
.project-card:nth-child(2) { grid-column: span 6; }
.project-card:nth-child(3) { grid-column: span 6; }
.project-card:nth-child(4) { grid-column: span 6; }
.project-card:nth-child(5) { grid-column: span 6; }

.project-card-inner {
  padding: 2.5rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 320px;
  position: relative;
}

/* Card edge light — cursor following glow */
.project-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  z-index: 0;
  border-radius: inherit;
  background: radial-gradient(
    500px circle at var(--mx) var(--my),
    rgba(120, 220, 255, 0.22) 0%,
    rgba(82, 180, 255, 0.12) 25%,
    rgba(82, 140, 196, 0.05) 50%,
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

/* Internal ambient glow */
.project-card::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background: radial-gradient(
    600px circle at var(--mx) var(--my),
    rgba(82, 160, 240, 0.1) 0%,
    rgba(82, 140, 196, 0.03) 40%,
    transparent 65%
  );
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.project-card:hover::before,
.project-card:hover::after {
  opacity: 1;
}

.project-card:hover {
  border-color: rgba(120, 220, 255, 0.5);
  box-shadow: 0 0 40px rgba(82, 140, 196, 0.06), inset 0 0 60px rgba(82, 140, 196, 0.02);
}

/* Card visual area */
.project-visual {
  flex: 1;
  position: relative;
  margin: -2.5rem -2.5rem 2rem -2.5rem;
  overflow: hidden;
  background: linear-gradient(135deg, #0f0f14 0%, #141420 100%);
  min-height: 320px;
}

.project-visual-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.7;
}

/* Visual SVG icons for each project type */
.project-icon-svg {
  width: 80px;
  height: 80px;
  opacity: 0.4;
}

/* 项目图片占位：100%填充 visual 区，自动 object-fit 缩放 */
.project-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 1;
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  display: block;
}

/* 各项目图片精细调整：聚焦视觉中心 */
.project-image[data-project="machine-design"] { object-position: center 45%; }
.project-image[data-project="automation"]      { object-position: center center; }
.project-image[data-project="patent"]         { object-position: center 40%; }
.project-image[data-project="animation"]      { object-position: center center; }

.project-card:hover .project-image {
  transform: scale(1.06);
}

/* 图片加载失败时显示的 SVG 兜底 */
.project-image-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #141419 0%, #1a1a25 100%);
}

.project-image-fallback svg {
  width: 60%;
  height: 60%;
  opacity: 0.7;
}

.project-visual-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, var(--color-bg-card) 0%, transparent 50%);
  z-index: 1;
}

/* Reveal overlay — animated unveil from left */
.project-reveal-overlay {
  position: absolute;
  inset: 0;
  background: var(--color-bg-card);
  z-index: 2;
  transform-origin: left center;
  will-change: transform;
}

.project-category {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.25em;
  color: var(--color-accent-blue);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  position: relative;
  z-index: 1;
}

.project-title {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.75rem;
  position: relative;
  z-index: 1;
  transition: color 0.3s ease;
}

.project-card:hover .project-title { color: var(--color-accent-blue); }

.project-desc {
  font-size: 0.82rem;
  line-height: 1.7;
  color: var(--color-text-secondary);
  position: relative;
  z-index: 1;
  flex: 1;
}

.project-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
  position: relative;
  z-index: 1;
}

.project-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.project-tag {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  padding: 0.2rem 0.6rem;
  background: rgba(82, 140, 196, 0.08);
  border: 1px solid rgba(82, 140, 196, 0.15);
  color: var(--color-text-muted);
  text-transform: uppercase;
}

.project-arrow {
  width: 28px;
  height: 28px;
  border: 1px solid var(--color-border-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent-blue);
  flex-shrink: 0;
  transition: all 0.3s ease;
  font-size: 0.7rem;
}

.project-card:hover .project-arrow {
  background: var(--color-accent-blue);
  color: var(--color-bg-primary);
  border-color: var(--color-accent-blue);
}

/* ---- Skills Section ---- */
#skills {
  padding: 10rem 0;
  position: relative;
  overflow: hidden;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 4rem;
  position: relative;
  z-index: 1;
}

/* 4 卡片布局：2x2 网格 */
.skills-grid-4 {
  grid-template-columns: repeat(2, 1fr);
}

.skill-card {
  background: var(--color-bg-card);
  padding: 2.5rem;
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateY(15px);
  transition: background 0.4s ease;
  cursor: default;
}

.skill-card::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-accent-blue), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.skill-card:hover { background: var(--color-bg-card-hover); }
.skill-card:hover::before { opacity: 0.6; }

.skill-num {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--color-text-muted);
  letter-spacing: 0.15em;
  margin-bottom: 1.5rem;
  opacity: 0.6;
}

.skill-icon {
  width: 42px;
  height: 42px;
  margin-bottom: 1.25rem;
  color: var(--color-accent-blue);
}

.skill-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--color-text-primary);
}

.skill-desc {
  font-size: 0.83rem;
  line-height: 1.75;
  color: var(--color-text-secondary);
}

.skill-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.skill-tag {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  padding: 0.2rem 0.6rem;
  background: rgba(82, 140, 196, 0.06);
  border: 1px solid rgba(82, 140, 196, 0.12);
  color: var(--color-text-muted);
  text-transform: uppercase;
}

/* ---- Contact Section ---- */
/* ---- Contact Section ---- */
.contact-section {
  background: #0f0f12;
}

/* ---- Noise overlay (texture) ---- */
.noise-overlay {
  position: absolute; inset: 0; pointer-events: none; z-index: 1;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

/* ---- Section counter (mono label) ---- */
.section-counter {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--color-text-muted);
  letter-spacing: 0.15em;
}

/* ---- Accent horizontal line ---- */
.accent-line-h {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(82, 140, 196, 0.6), transparent);
}

/* ---- Text gradients ---- */
.text-gradient {
  background: linear-gradient(135deg, #e8ecf0 0%, #b0bfcf 50%, #8a9bb8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.text-gradient-blue {
  background: linear-gradient(135deg, #6ba3e8 0%, #528cc4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---- Tag badge ---- */
.tag-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  border: 1px solid rgba(82, 140, 196, 0.3);
  color: #6ba3e8;
  text-transform: uppercase;
}

/* ---- Contact bottom icon bar ---- */
.contact-icon-bar {
  display: flex;
  gap: 1rem;
  margin-top: 2.5rem;
}

.contact-icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(82, 140, 196, 0.25);
  color: var(--color-text-muted);
  text-decoration: none;
  cursor: pointer;
  position: relative;
  overflow: visible;
  transition: border-color 0.35s ease, color 0.35s ease, box-shadow 0.35s ease;
  --mx: 50%;
  --my: 50%;
}

.contact-icon-link svg {
  width: 18px;
  height: 18px;
  position: relative;
  z-index: 1;
  transition: transform 0.35s ease;
}

/* Glow ring — cursor following */
.contact-icon-link::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: radial-gradient(
    120px circle at var(--mx) var(--my),
    rgba(120, 220, 255, 0.55) 0%,
    rgba(82, 180, 255, 0.3) 25%,
    rgba(82, 140, 196, 0.1) 50%,
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 0;
}

/* Inner ambient */
.contact-icon-link::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    100px circle at var(--mx) var(--my),
    rgba(82, 160, 240, 0.18) 0%,
    rgba(82, 140, 196, 0.05) 40%,
    transparent 65%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 0;
}

.contact-icon-link:hover {
  border-color: rgba(120, 220, 255, 0.7);
  color: #e6f1ff;
  box-shadow: 0 0 24px rgba(82, 140, 196, 0.15), 0 0 8px rgba(120, 220, 255, 0.08);
}

.contact-icon-link:hover::before,
.contact-icon-link:hover::after {
  opacity: 1;
}

.contact-icon-link:hover svg {
  transform: scale(1.1);
}

.contact-icon-location {
  cursor: default;
}

/* ---- WeChat QR Modal ---- */
.wechat-modal-overlay {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 99999;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.wechat-modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.wechat-modal-card {
  background: #14161a;
  border: 1px solid rgba(82, 140, 196, 0.2);
  border-radius: 4px;
  padding: 2rem 2rem 1.5rem;
  text-align: center;
  max-width: 360px;
  width: 90%;
  position: relative;
  transform: translateY(10px);
  transition: transform 0.3s ease;
}
.wechat-modal-overlay.is-open .wechat-modal-card {
  transform: translateY(0);
}
.wechat-modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 28px;
  height: 28px;
  background: none;
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.5);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s;
  font-family: inherit;
}
.wechat-modal-close:hover {
  color: #fff;
  border-color: rgba(82, 140, 196, 0.5);
}
.wechat-modal-qr {
  width: 200px;
  height: 200px;
  margin: 0.5rem auto 1rem;
  border-radius: 2px;
  display: block;
}
.wechat-modal-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: #fff;
  margin-bottom: 0.3rem;
}
.wechat-modal-desc {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--color-text-muted);
  letter-spacing: 0.1em;
}
.wechat-btn {
  cursor: pointer;
  background: transparent;
  padding: 0;
  font-family: inherit;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  color: var(--color-text-muted);
}

/* ---- Contact link cards ---- */
.contact-link {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  padding: 1rem 1.5rem;
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  text-decoration: none;
  font-family: '等线', 'DengXian', sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  transition: border-color 0.3s ease, color 0.3s ease, background 0.3s ease;
}
.contact-link:hover {
  border-color: var(--color-border-accent);
  color: var(--color-text-primary);
  background: rgba(82, 140, 196, 0.06);
}
.contact-link:hover .contact-link-arrow { opacity: 1; }

/* ---- Contact layout utilities (replacing Tailwind) ---- */
.contact-section {
  position: relative;
  overflow: hidden;
  padding: 6rem 0;
}

@media (min-width: 768px) {
  .contact-section { padding: 10rem 0; }
}

.contact-accent-line {
  position: absolute;
  top: 0;
  width: 1px;
  background: linear-gradient(180deg, rgba(82, 140, 196, 0.8), transparent);
}

.contact-accent-line-left {
  left: 25%;
  height: 8rem;
  opacity: 0.2;
}

.contact-accent-line-right {
  right: 25%;
  height: 12rem;
  opacity: 0.1;
}

.contact-container {
  position: relative;
  z-index: 10;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

@media (min-width: 768px) {
  .contact-container { padding: 0 2.5rem; }
}

.contact-header { margin-bottom: 2.5rem; }

.contact-content { max-width: 48rem; }

.contact-title-wrap {
  overflow: hidden;
  margin-bottom: 1rem;
}

.contact-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 6vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
}

@media (min-width: 768px) {
  .contact-title { font-size: clamp(4.5rem, 7vw, 5.5rem); }
}

.contact-desc {
  color: #b0bfcf;
  font-size: 0.875rem;
  line-height: 1.75;
  margin-bottom: 3rem;
}

@media (min-width: 768px) {
  .contact-desc { font-size: 1rem; }
}

.contact-break { display: none; }

@media (min-width: 768px) {
  .contact-break { display: block; }
}

.contact-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 3rem;
}

@media (min-width: 640px) {
  .contact-cards { grid-template-columns: repeat(2, 1fr); }
}

.contact-link-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.contact-link-icon {
  width: 16px;
  height: 16px;
  max-width: 16px;
  max-height: 16px;
  flex: 0 0 16px;
  box-sizing: content-box;
}

.contact-link-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: #4a5568;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 0.125rem;
}

.contact-link-value {
  color: #e8ecf0;
}

.contact-link-arrow {
  width: 12px;
  height: 12px;
  max-width: 12px;
  max-height: 12px;
  flex: 0 0 12px;
  opacity: 0;
  transition: opacity 0.3s ease;
  box-sizing: content-box;
}

.contact-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ---- Footer ---- */
#footer {
  padding: 3rem 0 1.5rem 0;
  border-top: 1px solid var(--color-border);
  text-align: center;
  position: relative;
}

.footer-divider {
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-border-accent), transparent);
  margin: 0 auto 1.5rem auto;
  opacity: 0.5;
}

.footer-copy {
  font-family: '等线', 'DengXian', sans-serif;
  font-size: 0.825rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
}
.footer-copy .footer-brand {
  color: var(--color-accent-blue);
}
.footer-copy a,
.footer-copy .footer-icp {
  color: var(--color-accent-blue);
  text-decoration: none;
  transition: color 0.3s ease;
}
.footer-copy a:hover {
  color: #6ba0d8;
}

/* ---- Utility Classes ---- */
.reveal-hidden {
  overflow: hidden;
}

/* ---- Responsive ---- */
@media (max-width: 1280px) {
  .section-container { padding: 0 2rem; }
  .about-grid { gap: 2.5rem; }
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .project-card:nth-child(1),
  .project-card:nth-child(2),
  .project-card:nth-child(3),
  .project-card:nth-child(4),
  .project-card:nth-child(5) { grid-column: span 6; }
}

@media (max-width: 1024px) {
  .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .about-col-left { grid-column: span 1; opacity: 1; transform: none; }
  .about-col-right { grid-column: span 1; }
  .about-stats-row { grid-template-columns: repeat(3, 1fr); }
  .project-card:nth-child(1),
  .project-card:nth-child(2),
  .project-card:nth-child(3),
  .project-card:nth-child(4),
  .project-card:nth-child(5) { grid-column: span 12; }
  .nav-links { display: none; }
  .nav-right-text { display: none; }
  .nav-toggle { display: flex; }
}

@media (max-width: 768px) {
  #about, #projects, #skills { padding: 5rem 0; }
  .section-container { padding: 0 1.25rem; }
  .skills-grid { grid-template-columns: 1fr; }
  .about-stats-row { grid-template-columns: repeat(3, 1fr); }
  .project-card:nth-child(1), .project-card:nth-child(2),
  .project-card:nth-child(3), .project-card:nth-child(4),
  .project-card:nth-child(5) { grid-column: span 12; }
  .projects-grid { gap: 1.5rem; }
  .hero-title { font-size: clamp(2.2rem, 9vw, 3.5rem); }
  .nav-links.mobile-open {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 12, 0.97);
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    z-index: 999;
  }
  .nav-links.mobile-open a {
    font-size: 1.2rem;
    letter-spacing: 0.2em;
  }
  .hero-corner { display: none; }
}

@media (max-width: 480px) {
  .hero-tags { gap: 0.5rem; }
  .hero-tag { font-size: 0.58rem; padding: 0.3rem 0.75rem; }
  .about-stats-row { grid-template-columns: repeat(3, 1fr); }
  .about-stat-num { font-size: 1.6rem; }
}

/* ---- Mobile nav toggle active state ---- */
.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(4px, 4px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(4px, -4px); }

/* ---- Performance Optimizations ---- */
.project-card, .skill-card {
  will-change: transform;
}

.hero-content, .about-grid, .projects-grid, .skills-grid {
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* ============================================================
   PROJECT DETAIL MODAL
   ============================================================ */

/* 卡片悬停提示：右下角"+ 查看详情" */
.project-expand-hint {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.8rem;
  background: rgba(10, 10, 12, 0.75);
  border: 1px solid rgba(82, 140, 196, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--color-accent-silver);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.35s ease, transform 0.35s ease, border-color 0.35s ease, color 0.35s ease;
  pointer-events: none;
  z-index: 3;
  clip-path: polygon(
    0 4px, 4px 0,
    calc(100% - 4px) 0, 100% 4px,
    100% 100%, 0 100%
  );
}

.project-expand-plus {
  font-size: 0.85rem;
  line-height: 1;
  color: var(--color-accent-blue);
}

.project-card:hover .project-expand-hint,
.project-card:focus-visible .project-expand-hint {
  opacity: 1;
  transform: translateY(0);
  border-color: rgba(120, 220, 255, 0.85);
  color: #e6f1ff;
}

/* 整张卡片可点击 */
.project-card {
  cursor: pointer;
}

/* 模态层 */
.project-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.project-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.project-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 5, 8, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  cursor: pointer;
}

.project-modal-card {
  position: relative;
  width: 100%;
  max-width: 920px;
  max-height: calc(100vh - 4rem);
  background: linear-gradient(180deg, #0e1014 0%, #0a0a0c 100%);
  border: 1px solid rgba(82, 140, 196, 0.35);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.6),
    0 0 40px rgba(82, 140, 196, 0.18);
  overflow: hidden;
  overflow-y: auto;
  transform: translateY(24px) scale(0.98);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  clip-path: polygon(
    0 14px, 14px 0,
    calc(100% - 14px) 0, 100% 14px,
    100% calc(100% - 14px), calc(100% - 14px) 100%,
    14px 100%, 0 calc(100% - 14px)
  );
}

.project-modal.is-open .project-modal-card {
  transform: translateY(0) scale(1);
}

.project-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 5;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 12, 0.7);
  border: 1px solid rgba(82, 140, 196, 0.5);
  color: var(--color-accent-silver);
  cursor: pointer;
  transition: border-color 0.3s ease, color 0.3s ease, background 0.3s ease, transform 0.3s ease;
}

.project-modal-close svg {
  width: 18px;
  height: 18px;
}

.project-modal-close:hover {
  border-color: rgba(120, 220, 255, 0.95);
  color: #e6f1ff;
  background: rgba(82, 140, 196, 0.2);
  transform: rotate(90deg);
}

/* Hero 图片区 */
.project-modal-hero {
  position: relative;
  width: 100%;
  height: 320px;
  overflow: hidden;
  background: #050608;
}

.project-modal-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: grayscale(0.15) contrast(1.05);
}

.project-modal-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(10, 10, 12, 0.25) 0%,
    rgba(10, 10, 12, 0.7) 60%,
    rgba(10, 10, 12, 0.95) 100%);
}

.project-modal-hero-inner {
  position: absolute;
  left: 2.5rem;
  right: 2.5rem;
  bottom: 1.5rem;
  z-index: 2;
}

.project-modal-eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.4em;
  color: var(--color-accent-blue);
  margin-bottom: 0.6rem;
  text-transform: uppercase;
}

.project-modal-title {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 0.4rem;
  letter-spacing: 0.04em;
}

.project-modal-subtitle {
  font-size: 0.9rem;
  color: var(--color-accent-silver);
  margin: 0;
  letter-spacing: 0.05em;
}

/* 主体内容 */
.project-modal-body {
  padding: 2rem 2.5rem 2.5rem;
}

.project-modal-meta {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: rgba(82, 140, 196, 0.2);
  border: 1px solid rgba(82, 140, 196, 0.2);
  margin: 0 0 2.5rem;
  padding: 0;
}

.project-modal-meta li {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 1rem 1.2rem;
  background: rgba(14, 16, 20, 0.9);
}

.project-modal-meta li span {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.25em;
  color: rgba(180, 200, 230, 0.6);
  text-transform: uppercase;
}

.project-modal-meta li b {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 500;
  color: #e6f1ff;
  letter-spacing: 0.05em;
}

.project-modal-section {
  margin-bottom: 2rem;
}

.project-modal-section:last-child {
  margin-bottom: 0;
}

.project-modal-section-title {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 500;
  color: #e6f1ff;
  margin: 0 0 1.2rem;
  letter-spacing: 0.05em;
}

.project-modal-section-num {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--color-accent-blue);
  letter-spacing: 0.2em;
  padding: 0.2rem 0.5rem;
  border: 1px solid rgba(82, 140, 196, 0.4);
}

.project-modal-highlights {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}

.project-modal-highlights li {
  position: relative;
  padding: 1rem 1.1rem 1rem 1.3rem;
  background: rgba(82, 140, 196, 0.04);
  border: 1px solid rgba(82, 140, 196, 0.2);
  border-left: 2px solid var(--color-accent-blue);
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.project-modal-highlights li:hover {
  background: rgba(82, 140, 196, 0.1);
  border-color: rgba(120, 220, 255, 0.6);
  transform: translateX(4px);
}

.project-modal-highlights li b {
  display: block;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 500;
  color: #e6f1ff;
  margin-bottom: 0.25rem;
  letter-spacing: 0.03em;
}

.project-modal-highlights li span {
  display: block;
  font-size: 0.82rem;
  color: var(--color-accent-silver);
  line-height: 1.5;
}

.project-modal-section h4 {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  color: var(--color-accent-blue);
  text-transform: uppercase;
  margin: 1.4rem 0 0.6rem;
  font-weight: 400;
}

.project-modal-section h4:first-child {
  margin-top: 0;
}

.project-modal-section p {
  font-size: 0.9rem;
  color: rgba(220, 230, 245, 0.85);
  line-height: 1.7;
  margin: 0 0 0.8rem;
  letter-spacing: 0.02em;
}

/* 防止 body 滚动 */
body.modal-open {
  overflow: hidden;
}

/* 移动端适配 */
@media (max-width: 768px) {
  .project-modal { padding: 1rem 0.5rem; }
  .project-modal-card { max-height: calc(100vh - 2rem); }
  .project-modal-hero { height: 220px; }
  .project-modal-hero-inner { left: 1.5rem; right: 1.5rem; }
  .project-modal-title { font-size: 1.6rem; }
  .project-modal-subtitle { font-size: 0.8rem; }
  .project-modal-body { padding: 1.5rem 1.5rem 2rem; }
  .project-modal-meta { grid-template-columns: 1fr; }
  .project-modal-highlights { grid-template-columns: 1fr; }
}

