/* 现代化个人主页样式 */

/* 加载动画 */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loading.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #000000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* CSS变量定义 */
:root {
  /* 颜色系统 */
  --primary-color: #000000;
  --secondary-color: #666666;
  --accent-color: #0066ff;
  --background-color: #ffffff;
  --surface-color: #f8f9fa;
  --border-color: #e9ecef;
  --text-primary: #1a1a1a;
  --text-secondary: #6c757d;
  --text-light: #adb5bd;
  
  /* 间距系统 */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  --spacing-xxl: 4rem;
  
  /* 字体系统 */
  --font-primary: 'HarmonyOS Sans', 'HarmonyOS Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-mono: 'HarmonyOS Sans SC', 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
  
  /* 字体大小 */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  
  /* 阴影系统 */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  /* 圆角系统 */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  
  /* 过渡效果 */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
  
  /* 布局 */
  --container-max-width: 1200px;
  --container-padding: 1.5rem;
}

/* ==================== 本地字体加载 ==================== */
@font-face {
  font-family: 'HarmonyOS Sans';
  src: url('../fonts/HarmonyOS_Sans_Light.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'HarmonyOS Sans';
  src: url('../fonts/HarmonyOS_Sans_Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'HarmonyOS Sans';
  src: url('../fonts/HarmonyOS_Sans_Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'HarmonyOS Sans';
  src: url('../fonts/HarmonyOS_Sans_Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* 重置和基础样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-primary);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--background-color);
  overflow-x: hidden;
}

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

/* 导航栏 */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  transition: var(--transition-normal);
}

.nav-container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}

.nav-logo .logo-text {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: var(--spacing-lg);
}

.nav-link {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition-fast);
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-color);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -0.5rem;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: var(--transition-fast);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 0.25rem;
}

.nav-toggle .bar {
  width: 1.5rem;
  height: 2px;
  background: var(--primary-color);
  transition: var(--transition-fast);
}

/* 移动端导航栏样式 & 全局字体大小自适应 & 响应式设计 */
@media (max-width: 768px) {
  /* 导航栏 */
  .nav-menu {
    position: fixed;
    top: 4rem;
    left: -100%;
    width: 100%;
    height: calc(100vh - 4rem);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding-top: 2rem;
    padding-bottom: var(--spacing-lg);
    transition: left 0.3s ease;
    gap: 2rem;
    text-align: center;
    box-shadow: var(--shadow-lg);
  }

  .nav-menu.active {
    left: 0;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-toggle.active .bar:nth-child(1) {
    transform: rotate(45deg) translate(0.375rem, 0.375rem);
  }

  .nav-toggle.active .bar:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.active .bar:nth-child(3) {
    transform: rotate(-45deg) translate(0.375rem, -0.375rem);
  }

  /* 字体大小 */
  html {
    font-size: 14px;
  }

  :root {
    --text-xs: 0.7rem;
    --text-sm: 0.8rem;
    --text-base: 0.9rem;
    --text-lg: 1rem;
    --text-xl: 1.125rem;
    --text-2xl: 1.25rem;
    --text-3xl: 1.5rem;
    --text-4xl: 1.875rem;
    --text-5xl: 2.25rem;
  }

  /* 布局调整 */
  .hero {
    padding: calc(4rem + var(--spacing-xl)) 0 var(--spacing-xl) 0;
  }

  .hero-container {
    text-align: center;
  }

  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: var(--spacing-xl);
  }

  .hero-text {
    max-width: none;
  }

  .hero-title {
    font-size: var(--text-3xl);
  }

  .hero-subtitle {
    font-size: var(--text-base);
  }

  .hero-description {
    font-size: var(--text-base);
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .btn {
    width: 100%;
    max-width: 200px;
  }

  .hero-social {
    gap: var(--spacing-md);
    justify-content: center;
    flex-wrap: wrap;
    margin-top: var(--spacing-lg);
  }

  .social-link {
    width: 3rem;
    height: 3rem;
    margin: 0.125rem;
  }

  .hero-image {
    justify-content: center;
  }

  .hero-image-card {
    width: min(100%, 21rem);
    margin: 0 auto;
    padding: 0.75rem;
  }

  .image-wrapper {
    border-radius: var(--radius-xl);
  }

  .profile-image {
    border-radius: var(--radius-xl);
  }

  .image-bg {
    inset: 0.65rem -0.65rem -0.65rem 0.65rem;
    border-radius: var(--radius-xl);
  }

  .skills-grid,
  .skills-content,
  .projects-grid {
    grid-template-columns: 1fr;
  }

  .tech-tags {
    margin: 20px 0 30px 0;
    gap: 10px;
    justify-content: center;
  }

  .tech-tag {
    font-size: 0.75rem;
    padding: 5px 12px;
  }

  .typing-container {
    font-size: var(--text-base);
    padding: 12px 16px;
    margin: 24px 0 32px 0;
  }

  .contact-content {
    grid-template-columns: 1fr;
  }

  .footer-content {
    flex-direction: column;
    gap: var(--spacing-lg);
    text-align: center;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 13px;
  }

  .tech-tags {
    margin: 16px 0 28px 0;
    gap: 8px;
    justify-content: center;
  }

  .tech-tag {
    font-size: 0.7rem;
    padding: 4px 10px;
  }

  .tech-tag-img {
    width: 15px;
    height: 15px;
  }

  .typing-container {
    font-size: var(--text-sm);
    padding: 10px 14px;
    margin: 20px 0 28px 0;
  }
}
/* 主页部分 */
.hero {
  padding: calc(4rem + var(--spacing-xxl)) 0 var(--spacing-xxl) 0;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

.hero-container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.hero-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 28rem);
  gap: clamp(2.5rem, 5vw, 5rem);
  align-items: center;
}

.hero-text {
  animation: fadeInUp 0.8s ease-out;
  max-width: 40rem;
}

.hero-subtitle {
  font-size: var(--text-lg);
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: var(--spacing-sm);
  letter-spacing: 0.05em;
}

.hero-title {
  font-size: var(--text-5xl);
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: var(--spacing-md);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

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

.hero-description {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  margin-bottom: var(--spacing-xl);
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-xl);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 2rem;
  font-size: var(--text-sm);
  font-weight: 500;
  text-decoration: none;
  border-radius: var(--radius-md);
  transition: var(--transition-normal);
  cursor: pointer;
  border: none;
  outline: none;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

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

.btn-secondary:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
}

.hero-social {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-lg);
  margin-top: var(--spacing-xl);
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  background: var(--surface-color);
  border-radius: var(--radius-lg);
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition-normal);
  box-shadow: var(--shadow-sm);
  margin: 0 0.25rem 0 0;
}

.social-link:hover {
  transform: translateY(-2px);
  background: var(--primary-color);
  color: white;
  box-shadow: var(--shadow-lg);
}

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

.hero-image {
  display: flex;
  justify-content: flex-end;
  animation: fadeInRight 0.8s ease-out;
  position: relative;
  z-index: 1;
}

.hero-image-card {
  width: min(100%, 29rem);
  padding: clamp(0.85rem, 1.8vw, 1.15rem);
  border-radius: 2rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(248, 249, 250, 0.9) 100%);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.14);
}

.image-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 1.75rem;
}

.profile-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 1.75rem;
  box-shadow: var(--shadow-xl);
  position: relative;
  z-index: 2;
}

.image-bg {
  position: absolute;
  inset: 1rem -1rem -1rem 1rem;
  background: linear-gradient(135deg, #0a5ed7 0%, #041530 100%);
  border-radius: 1.75rem;
  z-index: 1;
}

/* 部分标题 */
.section-header {
  text-align: center;
  margin-bottom: calc(var(--spacing-xxl) * 1.25);
  padding-bottom: var(--spacing-lg);
}

.section-title {
  font-size: var(--text-4xl);
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: var(--spacing-sm);
  letter-spacing: -0.02em;
}

.section-subtitle {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* 关于部分 */
.about {
  padding: calc(var(--spacing-xxl) * 1.5) 0;
  background: var(--background-color);
}

.about-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-xxl);
}

.about-title {
  font-size: var(--text-3xl);
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: var(--spacing-lg);
}

.about-description {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: calc(var(--spacing-xl) * 1.5);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--spacing-xl);
  margin-top: var(--spacing-md);
}

.skill-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-lg);
  padding: var(--spacing-xl);
  background: var(--surface-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
  border: 1px solid var(--border-color);
}

.skill-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.skill-icon {
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.skill-icon-img-large {
  width: 2rem;
  height: 2rem;
}

.skill-content h4 {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: var(--spacing-xs);
  line-height: 1.4;
}

.skill-content p {
  font-size: var(--text-base);
  color: var(--text-secondary);
  line-height: 1.6;
}

/* 技能部分 Bento Grid */
.skills {
    padding: var(--spacing-xl) 0;
    background: var(--surface-color);
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: minmax(150px, auto);
    gap: var(--spacing-md);
    max-width: 1000px;
    margin: 0 auto;
}

/* 卡片基础样式 */
.tech-card {
    background: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--spacing-md);
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* 卡片尺寸变体 */
.tech-card.large {
    grid-column: span 2;
    grid-row: span 2;
}

.tech-card.medium {
    grid-column: span 2;
    grid-row: span 1;
}

.tech-card.small {
    grid-column: span 1;
    grid-row: span 1;
}

.tech-card.wide {
    grid-column: span 3;
    grid-row: span 1;
}

/* 调整最后一行 */
.tech-card.small:nth-last-child(2) {
   grid-column: span 1;
}
.tech-card.wide:last-child {
   grid-column: span 3;
}

/* Hover 效果 */
.tech-card:hover {
    transform: translateY(-5px) scale(1.02);
    border-color: var(--accent-color);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.1);
}

/* 内容样式 */
.tech-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
    position: relative;
    z-index: 1;
}

.tech-icon {
    width: 2.5rem;
    height: 2.5rem;
    transition: transform 0.3s ease;
}

.tech-card:hover .tech-icon {
    transform: rotate(10deg) scale(1.1);
}

.tech-name {
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--primary-color);
}

.tech-desc {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: var(--spacing-sm);
    position: relative;
    z-index: 1;
}

/* 背景大图标 */
.card-bg-icon {
    position: absolute;
    bottom: -20px;
    right: -20px;
    opacity: 0.05;
    transform: rotate(-15deg);
    transition: transform 0.5s ease;
    z-index: 0;
}

.card-bg-icon i {
    width: 150px;
    height: 150px;
    color: var(--primary-color);
}

.tech-card:hover .card-bg-icon {
    transform: rotate(0deg) scale(1.1);
    opacity: 0.08;
}

/* 迷你标签 */
.tech-tags-mini {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    position: relative;
    z-index: 1;
}

.tech-tags-mini span {
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 100px;
    color: var(--text-secondary);
}

/* 图标组 */
.icon-group {
    display: flex;
    align-items: center;
}
.icon-group .tech-icon {
    position: relative;
    z-index: 1;
}
.icon-group .tech-icon:not(:first-child) {
    margin-left: -10px;
    border: 2px solid var(--background-color);
    border-radius: 50%;
    z-index: 0;
}

/* ==================== Hero 技术标签云 ==================== */
.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 22px 0 32px 0;
    justify-content: flex-start;
}

.tech-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 11px;
    background: linear-gradient(135deg, var(--tag-color, #667eea) 0%, var(--tag-color-light, #764ba2) 100%);
    color: white;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: default;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
}

.tech-tag:hover {
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.13);
}

.tech-tag-img {
    width: 15px;
    height: 15px;
    display: inline-block;
    flex-shrink: 0;
}

.tech-tag:nth-child(1) { --tag-color: #61dafb; --tag-color-light: #21759b; }
.tech-tag:nth-child(2) { --tag-color: #68a063; --tag-color-light: #3c873a; }
.tech-tag:nth-child(3) { --tag-color: #3776ab; --tag-color-light: #1e415e; }
.tech-tag:nth-child(4) { --tag-color: #f7df1e; --tag-color-light: #d4be0e; color: #333; }
.tech-tag:nth-child(5) { --tag-color: #764abc; --tag-color-light: #4fc08d; }
.tech-tag:nth-child(6) { --tag-color: #00d4ff; --tag-color-light: #0099cc; }
.tech-tag:nth-child(7) { --tag-color: #ff6b6b; --tag-color-light: #ff4757; }
.tech-tag:nth-child(8) { --tag-color: #4ecdc4; --tag-color-light: #26d0ce; }
.tech-tag:nth-child(9) { --tag-color: #10a37f; --tag-color-light: #0d7a60; }
.tech-tag:nth-child(10) { --tag-color: #ff6f00; --tag-color-light: #cc5800; }

/* 打字机效果 — 纯净实色版 */
.typing-container {
    margin: 26px 0 36px 0;
    font-size: var(--text-lg);
    font-weight: 700;
    min-height: 2em;
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.07) 0%, rgba(139, 92, 246, 0.05) 100%);
    padding: 14px 22px;
    border-radius: var(--radius-lg);
    border-left: 4px solid #6366f1;
}

.typing-text {
    display: inline;
    white-space: nowrap;
    color: #5b5def;
    letter-spacing: 0.04em;
}

.typing-cursor {
    display: inline-block;
    width: 3px;
    height: 1.15em;
    background: #8b5cf6;
    margin-left: 6px;
    vertical-align: text-bottom;
    animation: typeBlink 1s step-end infinite;
    border-radius: 2px;
}

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

/* 工具网格 */
.tools-grid {
    display: flex;
    gap: var(--spacing-lg);
    flex-wrap: wrap;
    align-items: center;
}

.tool-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: var(--radius-md);
    transition: background 0.2s;
    cursor: pointer;
}

.tool-item:hover {
    background: var(--surface-color);
}

.tool-item img {
    width: 2rem;
    height: 2rem;
}

.tool-item span {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* ==================== 精选项目 & 作品 - Bento Grid 风格 ==================== */
.projects-section {
    padding: calc(var(--spacing-xxl) * 1.25) 0;
    background: var(--surface-color);
    position: relative;
}

.projects-grid {
    max-width: 1000px;
}

/* 项目卡片：基于 tech-card 扩展 */
.project-card {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.project-card:hover {
    border-color: var(--accent-color, var(--primary-color));
}

.project-card .card-bg-icon {
    opacity: 0.06;
    color: var(--accent-color, var(--primary-color));
}

.project-card:hover .card-bg-icon {
    opacity: 0.1;
}

/* 内联 SVG 图标 */
.tech-icon-svg {
    width: 2.5rem;
    height: 2.5rem;
    flex-shrink: 0;
    color: var(--accent-color, var(--primary-color));
    transition: transform 0.3s ease, color 0.3s ease;
}

.tech-card:hover .tech-icon-svg {
    transform: rotate(10deg) scale(1.1);
}

/* 当前项目标记 */
.featured-project {
    position: relative;
}

.featured-project::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: calc(var(--radius-xl) + 2px);
    background: linear-gradient(135deg, #fbbf24, #f59e0b, #d97706);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.featured-project:hover::before {
    opacity: 1;
}

.current-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.6rem;
    font-size: 0.7rem;
    font-weight: 700;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #78350f;
    border-radius: 100px;
    letter-spacing: 0.03em;
    animation: pulse-badge 2.5s ease-in-out infinite;
    white-space: nowrap;
    margin-left: auto;
}

@keyframes pulse-badge {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.06); }
}

/* GitHub 卡片 */
.github-card {
    --accent-color: #24292e;
    background: linear-gradient(135deg, #24292e 0%, #3d444d 100%);
    border-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.github-card .tech-name {
    color: #ffffff;
    font-size: var(--text-xl);
}

.github-card .tech-desc {
    color: rgba(255, 255, 255, 0.7);
}

.github-card .tech-tags-mini span {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.85);
}

.github-card:hover {
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 15px 40px -10px rgba(36, 41, 46, 0.35);
    transform: translateY(-5px) scale(1.02);
}

.github-card .card-bg-icon {
    opacity: 0.08;
    color: #ffffff;
}

.github-icon-white {
    color: #ffffff !important;
}

/* Showcase 卡片样式 */
.projects-showcase {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg, 1.5rem);
}

.showcase-card {
    display: flex;
    align-items: center;
    gap: var(--spacing-md, 1rem);
    padding: var(--spacing-lg, 1.5rem);
    background: var(--background-color, #fff);
    border: 1px solid var(--border-color, #e9ecef);
    border-radius: var(--radius-lg, 12px);
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.showcase-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
    border-color: var(--accent-color, var(--primary-color));
}

.showcase-card.featured {
    border-color: var(--accent-color, #0066ff);
    background: linear-gradient(135deg, rgba(0, 102, 255, 0.03), rgba(0, 102, 255, 0.08));
}

.showcase-icon {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary, #6c757d);
    transition: color 0.3s ease, transform 0.3s ease;
}

.showcase-card:hover .showcase-icon {
    color: var(--accent-color, var(--primary-color));
    transform: scale(1.1);
}

.showcase-icon.featured-icon {
    color: var(--accent-color, #0066ff);
}

.showcase-icon.music-icon {
    color: var(--accent-color, var(--primary-color));
}

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

.showcase-title {
    font-size: var(--text-lg, 1.125rem);
    font-weight: 600;
    margin: 0 0 0.35rem;
    color: var(--text-primary, #1a1a1a);
}

.showcase-desc {
    font-size: var(--text-sm, 0.875rem);
    color: var(--text-secondary, #6c757d);
    margin: 0 0 0.5rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.showcase-tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.tech-badge {
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    background: var(--surface-color, #f8f9fa);
    border: 1px solid var(--border-color, #e9ecef);
    border-radius: 100px;
    color: var(--text-secondary, #6c757d);
    font-weight: 500;
}

.showcase-card:hover .tech-badge {
    border-color: var(--accent-color, var(--primary-color));
    color: var(--accent-color, var(--primary-color));
}

.showcase-action {
    flex-shrink: 0;
    color: var(--text-light, #adb5bd);
    transition: color 0.3s ease, transform 0.3s ease;
}

.showcase-card:hover .showcase-action {
    color: var(--accent-color, var(--primary-color));
    transform: translate(3px, -3px);
}

/* GitHub CTA 全宽卡片 */
.github-cta {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, #24292e 0%, #3d444d 100%);
    border-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    padding: var(--spacing-xl, 2rem);
}

.github-cta:hover {
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 15px 40px -10px rgba(36, 41, 46, 0.35);
    transform: translateY(-5px) scale(1.02);
}

.github-cta-content {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg, 1.5rem);
    width: 100%;
}

.github-cta-icon {
    flex-shrink: 0;
    color: #ffffff;
    opacity: 0.9;
}

.github-cta-text {
    flex: 1;
}

.github-cta-text .showcase-title {
    color: #ffffff;
}

.github-cta-text .showcase-desc {
    color: rgba(255, 255, 255, 0.7);
}

.github-badge {
    background: rgba(255, 255, 255, 0.12) !important;
    border-color: rgba(255, 255, 255, 0.18) !important;
    color: rgba(255, 255, 255, 0.85) !important;
}

.github-cta:hover .github-badge {
    border-color: rgba(255, 255, 255, 0.35) !important;
}

.github-cta-arrow {
    flex-shrink: 0;
    color: rgba(255, 255, 255, 0.5);
    transition: color 0.3s ease, transform 0.3s ease;
}

.github-cta:hover .github-cta-arrow {
    color: #ffffff;
    transform: translateX(5px);
}

.featured-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    font-size: 0.65rem;
    padding: 0.15rem 0.5rem;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #78350f;
    border-radius: 100px;
    font-weight: 700;
}

/* 浮动表情 */
.floating-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.floating-emoji {
    position: absolute;
    font-size: 2rem;
    animation: float var(--duration) ease-in-out infinite;
    animation-delay: var(--delay);
    left: var(--x);
    top: var(--y);
    opacity: 0.6;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.floating-emoji::before {
    content: var(--emoji);
    display: block;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    25% { transform: translateY(-20px) rotate(5deg); }
    50% { transform: translateY(-10px) rotate(-5deg); }
    75% { transform: translateY(-15px) rotate(3deg); }
}

/* 粒子背景效果 */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    animation: particle-float 15s linear infinite;
    opacity: 0.3;
}

@keyframes particle-float {
    0% {
        transform: translateY(100vh) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 0.3;
    }
    90% {
        opacity: 0.3;
    }
    100% {
        transform: translateY(-100vh) translateX(100px);
        opacity: 0;
    }
}

/* 项目板块响应式 */
@media (max-width: 900px) {
    .projects-section {
        padding: var(--spacing-xxl) 0;
    }

    .projects-grid {
        max-width: 100%;
    }

    .github-card .tech-name {
        font-size: var(--text-lg);
    }

    .current-badge {
        font-size: 0.65rem;
        padding: 0.12rem 0.5rem;
    }
}

@media (max-width: 600px) {
    .projects-section {
        padding: var(--spacing-lg) 0;
    }

    .project-card .tech-desc {
        font-size: var(--text-xs);
        line-height: 1.5;
    }

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

    .current-badge {
        display: none;
    }

    .featured-project .tech-header {
        flex-wrap: wrap;
    }

    .github-card .tech-name {
        font-size: var(--text-base);
    }

    .github-card .tech-desc {
        font-size: var(--text-sm);
    }
}

/* 响应式技能部分样式 */
@media (max-width: 900px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .tech-card.large {
        grid-column: span 2;
    }
    .tech-card.wide {
        grid-column: span 2;
    }
    .tech-card.small:nth-last-child(2) {
        grid-column: span 1;
    }
}

@media (max-width: 600px) {
    .bento-grid {
        display: flex;
        flex-direction: column;
        gap: var(--spacing-md);
    }
    .tech-card {
        min-height: auto;
    }
}

/* 联系部分 */
.contact {
  padding: var(--spacing-xxl) 0;
  background: var(--surface-color);
}

.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-xxl);
  align-items: start;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
}

.contact-icon {
  width: 3rem;
  height: 3rem;
  background: var(--primary-color);
  color: white;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

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

.contact-details h4 {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 0.25rem;
}

.contact-details p {
  font-size: var(--text-base);
  color: var(--text-secondary);
}

/* 表单 */
.form {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.form-group {
  position: relative;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 1rem;
  font-size: var(--text-base);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--background-color);
  color: var(--text-primary);
  transition: var(--transition-fast);
  font-family: var(--font-primary);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-light);
}

/* 页脚 */
.footer {
  background: var(--primary-color);
  color: white;
  padding: var(--spacing-xl) 0;
}

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

.footer-text p {
  font-size: var(--text-sm);
  opacity: 0.8;
}

.footer-beian {
  margin-top: var(--spacing-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.footer-beian a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: var(--transition-fast);
}

.footer-beian a:hover {
  color: white;
  text-decoration: underline;
}

.footer-beian-divider {
  color: rgba(255, 255, 255, 0.4);
  margin: 0 0.25rem;
}

.footer-gongan {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

.gongan-icon {
  width: 1rem;
  height: 1rem;
  vertical-align: middle;
}

.footer-social {
  display: flex;
  gap: var(--spacing-md);
}

.footer-social .social-link {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-social .social-link:hover {
  background: white;
  color: var(--primary-color);
}

.friends {
  padding: calc(var(--spacing-xxl) * 1.5) 0;
  background: var(--background-color);
}

.friends-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--spacing-xl);
  align-items: stretch;
}

.friend-loading {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-secondary);
}

.friend-card {
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  align-items: center;
  gap: var(--spacing-md);
  padding: var(--spacing-lg);
  background: var(--surface-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: var(--transition-normal);
}

.friend-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.friend-logo {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  object-fit: cover;
  background: white;
  border: 2px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.friend-info {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
  justify-content: center;
}

.friend-title {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--primary-color);
  line-height: 1.4;
}

.friend-desc {
  font-size: var(--text-base);
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--spacing-sm);
}

.friend-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 0.5rem 1rem;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: var(--transition-normal);
}

.friend-link:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
}

.friend-apply {
  margin-top: var(--spacing-xxl);
  text-align: center;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--spacing-xl);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.apply-list {
  display: inline-block;
  text-align: left;
}

.apply-list ul {
  list-style: disc;
  padding-left: 1.25rem;
  margin-top: var(--spacing-sm);
}

.apply-list a {
  color: var(--primary-color);
  text-decoration: none;
  border-bottom: 1px solid var(--primary-color);
}

.apply-actions {
  display: flex;
  gap: var(--spacing-md);
  align-items: center;
  margin-top: var(--spacing-md);
}

@media (max-width: 768px) {
  .friend-card {
    grid-template-columns: 2.75rem 1fr;
    padding: var(--spacing-lg);
  }
  .friend-logo {
    width: 2.75rem;
    height: 2.75rem;
  }
}

.footer-stats {
  font-size: var(--text-sm);
  opacity: 0.85;
  margin-top: var(--spacing-xs);
}

/* 动画 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* 可访问性改进 */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* 焦点样式 */
*:focus {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

/* 打印样式 */
@media print {
  .navbar,
  .hero-social,
  .footer-social {
    display: none;
  }
  
  body {
    background: white;
    color: black;
  }
}

/* 缺失的工具类 */
.download-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: transparent;
  color: var(--primary-color, #000);
  border: 2px solid var(--primary-color, #000);
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  transition: all 0.2s;
}

.download-link:hover {
  background: var(--primary-color, #000);
  color: #fff;
}

.about-text {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}
