/* ===== 基础重置 ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", ui-sans-serif, system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  color: #1e293b;
  background-color: #f8fafc;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ===== 设计令牌 ===== */
:root {
  /* 颜色 */
  --primary: #1e3a5f;
  --primary-light: #2d4a6f;
  --primary-dark: #152a45;
  --primary-foreground: #ffffff;
  --background: #f8fafc;
  --foreground: #1e293b;
  --card: #ffffff;
  --card-foreground: #1e293b;
  --muted: #f1f5f9;
  --muted-foreground: #64748b;
  --border: #e2e8f0;
  --accent: #f1f5f9;
  
  /* 阴影 */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-card-hover: 0 25px 50px -12px rgb(30 58 95 / 0.25);
  
  /* 圆角 */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  
  /* 间距 */
  --container-max: 72rem;
  --section-py: 5rem;
  
  /* 过渡 */
  --transition-fast: 150ms;
  --transition-normal: 300ms;
  --transition-slow: 500ms;
}

/* ===== 容器 ===== */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 640px) {
  .container {
    padding: 0 1.5rem;
  }
}

@media (min-width: 1024px) {
  .container {
    padding: 0 2rem;
  }
}

/* ===== 按钮 ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius-lg);
  transition: all var(--transition-normal) ease-out;
}

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

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background-color: var(--primary);
  color: var(--primary-foreground);
  box-shadow: 0 4px 14px 0 rgb(30 58 95 / 0.25);
}

.btn-primary:hover {
  background-color: var(--primary-light);
}

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

.btn-outline:hover {
  border-color: var(--primary);
  background-color: rgb(30 58 95 / 0.05);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
}

.btn-full {
  width: 100%;
}

.btn-icon {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
}

/* ===== 标签 ===== */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  background-color: var(--muted);
  color: var(--muted-foreground);
  border-radius: var(--radius-md);
}

/* ===== 导航栏 ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  transition: all var(--transition-normal);
}

.header.scrolled {
  background-color: rgb(255 255 255 / 0.9);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-md);
  padding: 0.75rem 0;
}

.header:not(.scrolled) {
  padding: 1.25rem 0;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  transition: opacity var(--transition-fast);
}

.logo:hover {
  opacity: 0.8;
}

.nav-desktop {
  display: none;
  align-items: center;
  gap: 0.25rem;
}

@media (min-width: 768px) {
  .nav-desktop {
    display: flex;
  }
}

.nav-link {
  position: relative;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--foreground);
  opacity: 0.8;
  border-radius: var(--radius-md);
  transition: all var(--transition-normal);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background-color: var(--primary);
  transition: all var(--transition-normal);
  transform: translateX(-50%);
}

.nav-link:hover {
  color: var(--primary);
  opacity: 1;
}

.nav-link:hover::after {
  width: 60%;
}

/* 移动端菜单 */
.menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-md);
  background-color: var(--muted);
}

@media (min-width: 768px) {
  .menu-toggle {
    display: none;
  }
}

.menu-icon {
  position: relative;
  width: 1.25rem;
  height: 2px;
  background-color: var(--foreground);
  transition: all var(--transition-normal);
}

.menu-icon::before,
.menu-icon::after {
  content: '';
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--foreground);
  transition: all var(--transition-normal);
}

.menu-icon::before {
  top: -6px;
}

.menu-icon::after {
  top: 6px;
}

.menu-toggle.active .menu-icon {
  background-color: transparent;
}

.menu-toggle.active .menu-icon::before {
  top: 0;
  transform: rotate(45deg);
}

.menu-toggle.active .menu-icon::after {
  top: 0;
  transform: rotate(-45deg);
}

.nav-mobile {
  display: none;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem 0;
  margin-top: 0.75rem;
  border-top: 1px solid var(--border);
  animation: fadeIn 0.3s ease-out;
}

.nav-mobile.active {
  display: flex;
}

.nav-link-mobile {
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--foreground);
  opacity: 0.8;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.nav-link-mobile:hover {
  background-color: var(--muted);
  color: var(--primary);
  opacity: 1;
}

/* ===== Hero 区域 ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 6rem 0;
}

.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
}

.hero-blob-1 {
  top: -10rem;
  right: -10rem;
  width: 20rem;
  height: 20rem;
  background-color: rgb(30 58 95 / 0.05);
}

.hero-blob-2 {
  bottom: -10rem;
  left: -10rem;
  width: 24rem;
  height: 24rem;
  background-color: rgb(30 58 95 / 0.1);
}

.hero-blob-3 {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 30rem;
  height: 30rem;
  background: linear-gradient(135deg, rgb(30 58 95 / 0.05), transparent);
}

.hero-grid {
  position: absolute;
  inset: 0;
  opacity: 0.03;
  background-image: 
    linear-gradient(var(--primary) 1px, transparent 1px),
    linear-gradient(90deg, var(--primary) 1px, transparent 1px);
  background-size: 60px 60px;
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  max-width: 48rem;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background-color: rgb(30 58 95 / 0.1);
  color: var(--primary);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 9999px;
  margin-bottom: 2rem;
  animation: fadeInUp 0.6s ease-out;
}

.hero-badge-dot {
  width: 0.5rem;
  height: 0.5rem;
  background-color: var(--primary);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 1rem;
  animation: fadeInUp 0.6s ease-out 0.1s both;
}

@media (min-width: 640px) {
  .hero-title {
    font-size: 3.5rem;
  }
}

@media (min-width: 768px) {
  .hero-title {
    font-size: 4rem;
  }
}

@media (min-width: 1024px) {
  .hero-title {
    font-size: 4.5rem;
  }
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary) 0%, #3b5998 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--muted-foreground);
  font-weight: 300;
  margin-bottom: 1.5rem;
  animation: fadeInUp 0.6s ease-out 0.2s both;
}

@media (min-width: 640px) {
  .hero-subtitle {
    font-size: 1.5rem;
  }
}

@media (min-width: 768px) {
  .hero-subtitle {
    font-size: 1.875rem;
  }
}

.hero-description {
  font-size: 1rem;
  color: var(--muted-foreground);
  max-width: 36rem;
  margin: 0 auto 2.5rem;
  line-height: 1.75;
  animation: fadeInUp 0.6s ease-out 0.3s both;
}

@media (min-width: 640px) {
  .hero-description {
    font-size: 1.125rem;
  }
}

.hero-buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
  animation: fadeInUp 0.6s ease-out 0.4s both;
}

@media (min-width: 640px) {
  .hero-buttons {
    flex-direction: row;
  }
}

.hero-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  animation: fadeInUp 0.6s ease-out 0.5s both;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  color: var(--muted-foreground);
  transition: all var(--transition-normal);
}

.social-link:hover {
  border-color: rgb(30 58 95 / 0.5);
  background-color: rgb(30 58 95 / 0.05);
  color: var(--primary);
}

.social-link svg {
  width: 1.25rem;
  height: 1.25rem;
}

/* 滚动提示 */
.scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  animation: bounce 2s infinite;
}

.scroll-mouse {
  width: 1.5rem;
  height: 2.5rem;
  border: 2px solid var(--muted-foreground);
  border-radius: 9999px;
  display: flex;
  justify-content: center;
  padding-top: 0.5rem;
  opacity: 0.3;
}

.scroll-wheel {
  width: 0.375rem;
  height: 0.75rem;
  background-color: var(--muted-foreground);
  border-radius: 9999px;
}

/* ===== 通用区块 ===== */
.section {
  padding: var(--section-py) 0;
}

.section-alt {
  background-color: var(--muted);
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--foreground);
  margin-bottom: 1rem;
}

@media (min-width: 640px) {
  .section-title {
    font-size: 2.25rem;
  }
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--muted-foreground);
  max-width: 36rem;
  margin: 0 auto;
}

/* ===== 关于我 ===== */
.about-grid {
  display: grid;
  gap: 3rem;
}

@media (min-width: 1024px) {
  .about-grid {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

.about-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

@media (min-width: 640px) {
  .about-header {
    flex-direction: row;
    align-items: flex-start;
  }
}

.about-avatar {
  width: 8rem;
  height: 8rem;
  border-radius: var(--radius-2xl);
  background-color: var(--card);
  box-shadow: var(--shadow-lg);
  object-fit: cover;
  object-position: center;
}

.about-role {
  color: var(--muted-foreground);
}

.about-bio {
  font-size: 1.125rem;
  color: var(--muted-foreground);
  line-height: 1.75;
  margin-bottom: 2rem;
}

.skill-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.skill-card {
  padding: 1rem;
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  transition: all var(--transition-normal);
}

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

.skill-icon {
  width: 1.5rem;
  height: 1.5rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.skill-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 0.25rem;
}

.skill-desc {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

/* 时间线 */
.timeline-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 1.5rem;
}

.timeline-icon {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--primary);
}

.timeline {
  position: relative;
}

.timeline-item {
  position: relative;
  padding-left: 2rem;
  padding-bottom: 1.5rem;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5rem;
  bottom: 0;
  width: 1px;
  background-color: var(--border);
}

.timeline-item:last-child::before {
  display: none;
}

.timeline-dot {
  position: absolute;
  left: -0.25rem;
  top: 0.5rem;
  width: 0.5rem;
  height: 0.5rem;
  background-color: var(--primary);
  border-radius: 50%;
}

.timeline-year {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--primary);
}

.timeline-role {
  font-weight: 600;
  color: var(--foreground);
  margin-top: 0.25rem;
}

.timeline-company {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

/* ===== 技术栈 ===== */
.tech-categories {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.tech-category-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.tech-category-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background-color: rgb(30 58 95 / 0.1);
  border-radius: var(--radius-lg);
  color: var(--primary);
}

.tech-category-icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

.tech-category-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--foreground);
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

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

@media (min-width: 768px) {
  .tech-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 1024px) {
  .tech-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

.tech-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1.5rem 1rem;
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  transition: all var(--transition-normal);
  cursor: default;
}

.tech-item:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: var(--shadow-card-hover);
}

.tech-icon {
  font-size: 2rem;
  transition: transform var(--transition-normal);
}

.tech-item:hover .tech-icon {
  transform: scale(1.1);
}

.tech-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--foreground);
}

/* ===== 项目作品 ===== */
.projects-grid {
  display: grid;
  gap: 1.5rem;
}

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

.project-card {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  transition: all var(--transition-normal);
}

.project-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--shadow-card-hover);
}

.project-image {
  position: relative;
  height: 12rem;
  overflow: hidden;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

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

.project-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgb(0 0 0 / 0.6), transparent);
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.project-card:hover .project-overlay {
  opacity: 1;
}

.project-content {
  padding: 1.5rem;
}

.project-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 0.5rem;
  transition: color var(--transition-fast);
}

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

.project-desc {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin-bottom: 1rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.project-links {
  display: flex;
  gap: 0.75rem;
}

/* ===== 技术文章 ===== */
.articles-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.article-card {
  padding: 1.5rem;
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  transition: all var(--transition-normal);
}

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

.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.article-date,
.article-readtime {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.article-date svg,
.article-readtime svg {
  width: 1rem;
  height: 1rem;
}

.article-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 0.75rem;
  transition: color var(--transition-fast);
}

.article-card:hover .article-title {
  color: var(--primary);
}

.article-excerpt {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin-bottom: 1rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.article-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  color: var(--primary);
  transition: gap var(--transition-fast);
}

.article-link:hover {
  gap: 0.75rem;
}

.article-link svg {
  width: 1rem;
  height: 1rem;
}

/* ===== 联系我 ===== */
.contact-grid {
  display: grid;
  gap: 3rem;
}

@media (min-width: 1024px) {
  .contact-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* 居中联系方式区域（无表单版） */
.contact-info-centered {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.contact-links-centered {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  margin-top: 2rem;
}

.contact-links-centered .contact-link {
  width: 100%;
  max-width: 480px;
  text-align: left;
}

.contact-link-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.contact-form-wrapper {
  padding: 2rem;
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-form.hidden {
  display: none;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--foreground);
}

.form-input,
.form-textarea {
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: var(--foreground);
  background-color: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all var(--transition-fast);
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgb(30 58 95 / 0.1);
}

.form-input.error,
.form-textarea.error {
  border-color: #ef4444;
}

.form-textarea {
  resize: vertical;
  min-height: 8rem;
}

.form-error {
  font-size: 0.75rem;
  color: #ef4444;
}

/* 成功状态 */
.contact-success {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 0;
  text-align: center;
}

.contact-success.active {
  display: flex;
}

.success-icon {
  width: 4rem;
  height: 4rem;
  color: #22c55e;
  margin-bottom: 1rem;
}

.success-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 0.5rem;
}

.success-message {
  color: var(--muted-foreground);
  margin-bottom: 1.5rem;
}

/* 联系信息 */
.contact-info-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 0.5rem;
}

.contact-info-desc {
  color: var(--muted-foreground);
  margin-bottom: 1.5rem;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  transition: all var(--transition-normal);
}

.contact-link:hover {
  border-color: var(--primary);
  background-color: rgb(30 58 95 / 0.05);
}

.contact-link-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  background-color: rgb(30 58 95 / 0.1);
  border-radius: 50%;
  color: var(--primary);
  transition: background-color var(--transition-fast);
}

.contact-link:hover .contact-link-icon {
  background-color: rgb(30 58 95 / 0.2);
}

.contact-link-icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

.contact-link-content {
  display: flex;
  flex-direction: column;
}

.contact-link-label {
  font-weight: 500;
  color: var(--foreground);
}

.contact-link-value {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

/* ===== 页脚 ===== */
.footer {
  background-color: var(--primary);
  color: var(--primary-foreground);
  padding: 3rem 0 1.5rem;
}

.footer-grid {
  display: grid;
  gap: 2rem;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

.footer-nav-right {
  text-align: left;
}

.footer-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.footer-desc {
  font-size: 0.875rem;
  color: rgb(255 255 255 / 0.8);
  line-height: 1.6;
}

.footer-nav-title {
  font-weight: 600;
  margin-bottom: 1rem;
}

.footer-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-nav-list a {
  font-size: 0.875rem;
  color: rgb(255 255 255 / 0.7);
  transition: color var(--transition-fast);
}

.footer-nav-list a:hover {
  color: var(--primary-foreground);
}

.footer-social-links {
  display: flex;
  gap: 0.75rem;
}

.footer-social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background-color: rgb(255 255 255 / 0.1);
  border-radius: 50%;
  color: var(--primary-foreground);
  transition: all var(--transition-fast);
}

.footer-social-links a:hover {
  background-color: rgb(255 255 255 / 0.2);
}

.footer-social-links svg {
  width: 1.25rem;
  height: 1.25rem;
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgb(255 255 255 / 0.2);
}

@media (min-width: 640px) {
  .footer-bottom {
    flex-direction: row;
  }
}

.footer-copyright {
  font-size: 0.875rem;
  color: rgb(255 255 255 / 0.6);
}

.back-to-top {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background-color: rgb(255 255 255 / 0.1);
  border-radius: 50%;
  color: var(--primary-foreground);
  transition: all var(--transition-fast);
}

.back-to-top:hover {
  background-color: rgb(255 255 255 / 0.2);
  transform: translateY(-4px);
}

.back-to-top svg {
  width: 1.25rem;
  height: 1.25rem;
}

/* ===== 案例研究 (Case Studies) ===== */
.case-studies {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.case-study {
  display: grid;
  gap: 0;
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  transition: all var(--transition-normal);
}

@media (min-width: 768px) {
  .case-study {
    grid-template-columns: 280px 1fr;
  }
}

.case-study:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card-hover);
  border-color: rgb(30 58 95 / 0.3);
}

.case-study-image {
  position: relative;
  height: 14rem;
  overflow: hidden;
}

@media (min-width: 768px) {
  .case-study-image {
    height: 100%;
    min-height: 18rem;
  }
}

.case-study-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.case-study:hover .case-study-image img {
  transform: scale(1.05);
}

.case-study-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgb(30 58 95 / 0.3), transparent 60%);
}

.case-study-number {
  position: absolute;
  top: 1rem;
  left: 1rem;
  font-size: 2.5rem;
  font-weight: 800;
  color: rgb(255 255 255 / 0.9);
  text-shadow: 0 2px 8px rgb(0 0 0 / 0.3);
  line-height: 1;
}

.case-study-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 768px) {
  .case-study-content {
    padding: 2rem;
  }
}

.case-study-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.75rem;
}

.case-study-institute {
  font-weight: 600;
  color: var(--primary);
  background-color: rgb(30 58 95 / 0.08);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-md);
}

.case-study-period {
  color: var(--muted-foreground);
}

.case-study-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--foreground);
  line-height: 1.4;
  transition: color var(--transition-fast);
}

@media (min-width: 640px) {
  .case-study-title {
    font-size: 1.5rem;
  }
}

.case-study:hover .case-study-title {
  color: var(--primary);
}

.case-study-problem {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  line-height: 1.7;
  padding: 0.75rem 1rem;
  background-color: var(--muted);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius-md);
}

.case-study-problem strong {
  color: var(--foreground);
}

.case-study-solution,
.case-study-result {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.solution-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.solution-title::before {
  content: '';
  width: 1rem;
  height: 2px;
  background-color: var(--primary);
  border-radius: 1px;
}

.solution-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  padding-left: 0;
}

.solution-list li {
  position: relative;
  padding-left: 1.25rem;
  font-size: 0.8125rem;
  color: var(--muted-foreground);
  line-height: 1.6;
}

.solution-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5rem;
  width: 0.375rem;
  height: 0.375rem;
  background-color: var(--primary);
  border-radius: 50%;
  opacity: 0.6;
}

.result-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.metric {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  padding: 0.75rem 1.25rem;
  background: linear-gradient(135deg, rgb(30 58 95 / 0.06), rgb(30 58 95 / 0.02));
  border: 1px solid rgb(30 58 95 / 0.12);
  border-radius: var(--radius-lg);
  min-width: 7rem;
}

.metric-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.2;
}

.metric-label {
  font-size: 0.6875rem;
  color: var(--muted-foreground);
  font-weight: 500;
}

.case-study-content .project-tags {
  margin-top: 0.5rem;
  margin-bottom: 0;
}

/* ===== 视频入口与模态弹窗 ===== */
/* 可点击视频入口 */
.video-trigger {
  cursor: pointer;
}

.video-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  background-color: rgb(255 255 255 / 0.85);
  border-radius: 50%;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 20px rgb(0 0 0 / 0.25);
  opacity: 0.7;
  transition: all var(--transition-normal);
  z-index: 5;
  pointer-events: none;
}

.video-play-btn svg {
  width: 1.75rem;
  height: 1.75rem;
  color: var(--primary);
  margin-left: 0.125rem;
}

.video-trigger:hover .video-play-btn,
.video-trigger:focus-visible .video-play-btn {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.video-trigger:hover .video-play-btn svg {
  animation: playNudge 0.6s ease-out;
}

@keyframes playNudge {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

.video-duration {
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  padding: 0.25rem 0.625rem;
  font-size: 0.6875rem;
  font-weight: 600;
  color: #fff;
  background-color: rgb(0 0 0 / 0.6);
  border-radius: var(--radius-sm);
  z-index: 5;
  opacity: 1;
  transition: opacity var(--transition-normal);
}

.video-trigger:hover .video-duration {
  opacity: 1;
}

/* 模态弹窗 */
.video-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.video-modal.active {
  display: flex;
  animation: modalFadeIn 0.25s ease-out;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.video-modal-backdrop {
  position: absolute;
  inset: 0;
  background-color: rgb(0 0 0 / 0.85);
  backdrop-filter: blur(4px);
}

.video-modal-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 56rem;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  background-color: #0f172a;
  border-radius: var(--radius-2xl);
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.5);
  animation: modalSlideUp 0.3s ease-out;
}

@keyframes modalSlideUp {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.video-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background-color: rgb(255 255 255 / 0.05);
  border-bottom: 1px solid rgb(255 255 255 / 0.1);
}

.video-modal-title {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-md);
  color: rgb(255 255 255 / 0.7);
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.video-modal-close:hover {
  background-color: rgb(255 255 255 / 0.1);
  color: #fff;
}

.video-modal-close svg {
  width: 1.25rem;
  height: 1.25rem;
}

.video-modal-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: #000;
  min-height: 0;
}

/* 视频自适应容器：横屏与竖屏自动适配 */
.video-modal-body video {
  max-width: 100%;
  max-height: 72vh;
  width: auto;
  height: auto;
  display: block;
}

/* 横屏 16:9 视频优先撑满宽度 */
.video-modal-body .video-landscape {
  width: 100%;
  height: auto;
}

/* 竖屏 9:16 视频优先撑满高度，限制最大宽度 */
.video-modal-body .video-portrait {
  height: 72vh;
  width: auto;
  max-width: 100%;
}

.video-modal-hint {
  padding: 0.625rem 1.5rem;
  font-size: 0.6875rem;
  color: rgb(255 255 255 / 0.5);
  text-align: center;
  background-color: rgb(255 255 255 / 0.03);
  border-top: 1px solid rgb(255 255 255 / 0.08);
}

.video-modal-hint kbd {
  display: inline-block;
  padding: 0.0625rem 0.375rem;
  font-size: 0.625rem;
  font-family: monospace;
  background-color: rgb(255 255 255 / 0.1);
  border-radius: 3px;
  color: rgb(255 255 255 / 0.8);
}

/* 移动端适配 */
@media (max-width: 640px) {
  .video-modal {
    padding: 0;
  }

  .video-modal-container {
    max-width: 100%;
    max-height: 100vh;
    border-radius: 0;
    height: 100vh;
  }

  .video-modal-body video,
  .video-modal-body .video-landscape {
    max-height: calc(100vh - 7rem);
  }

  .video-modal-body .video-portrait {
    height: calc(100vh - 7rem);
  }
}

/* ===== 动画 ===== */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

@keyframes bounce {
  0%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(-10px);
  }
}

/* ===== 滚动条 ===== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--muted);
}

::-webkit-scrollbar-thumb {
  background: var(--muted-foreground);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* ===== 选中文字 ===== */
::selection {
  background-color: var(--primary);
  color: var(--primary-foreground);
}
