/* ========================================
  关于页面 - 打开的信封样式（全新升级版）
  ======================================== */

/* 隐藏 auto-generated 页面标题 */
#page:has(.about-envelope-wrapper) .page-title {
  display: none;
}

/* ---------- 信封外层容器 ---------- */
.about-envelope-wrapper {
  position: relative;
  max-width: 850px;
  margin: 20px auto 40px;
  padding-top: 60px;
  animation: envelopeReveal 1s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes envelopeReveal {
  from {
    opacity: 0;
    transform: translateY(50px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ---------- 信封封口翻盖（弧线） ---------- */
.about-envelope-flap {
  position: absolute;
  top: 0;
  left: 5%;
  right: 5%;
  height: 70px;
  background: linear-gradient(170deg, #f5edd8 0%, #efe5cc 40%, #e5d9b5 100%);
  clip-path: ellipse(75% 100% at 50% 0%);
  z-index: 2;
  filter: drop-shadow(0 -4px 8px rgba(0, 0, 0, 0.08));
  animation: flapDrop 1s 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes flapDrop {
  from {
    transform: translateY(-20px) rotateX(-10deg);
    opacity: 0;
  }
  to {
    transform: translateY(0) rotateX(0);
    opacity: 1;
  }
}

/* 翻盖折痕线 */
.about-envelope-flap::after {
  content: '';
  position: absolute;
  bottom: 1px;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg,
      transparent,
      rgba(160, 140, 110, 0.4) 15%,
      rgba(160, 140, 110, 0.4) 85%,
      transparent);
}

/* 翻盖内侧阴影 */
.about-envelope-flap::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 90%, rgba(0,0,0,0.06) 0%, transparent 70%);
  pointer-events: none;
}

/* ---------- 信封主体 ---------- */
.about-envelope-body {
  position: relative;
  background: linear-gradient(175deg, #fffdf5 0%, #fef9ed 50%, #fcf5e3 100%);
  border-radius: 24px;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.12),
    0 8px 20px rgba(0, 0, 0, 0.06),
    inset 0 2px 0 rgba(255, 255, 255, 0.95),
    inset 0 -2px 0 rgba(0, 0, 0, 0.03);
  border: 2px solid #e8dfc8;
  overflow: hidden;
  z-index: 1;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.about-envelope-body:hover {
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.15),
    0 12px 28px rgba(0, 0, 0, 0.08),
    inset 0 2px 0 rgba(255, 255, 255, 0.95),
    inset 0 -2px 0 rgba(0, 0, 0, 0.03);
  transform: translateY(-4px);
}

/* ---------- 信封内层背景图 ---------- */
.about-envelope-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('/images/selection1.jpg') center/cover;
  opacity: 0.04;
  border-radius: 22px;
  z-index: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}

.about-envelope-body:hover .about-envelope-bg {
  opacity: 0.06;
}

/* 信封内层纹理 */
.about-envelope-body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    repeating-linear-gradient(0deg,
      transparent,
      transparent 3px,
      rgba(180, 160, 130, 0.03) 3px,
      rgba(180, 160, 130, 0.03) 4px);
  border-radius: 22px;
  z-index: 0;
  pointer-events: none;
}

/* ---------- 头像区域（新布局） ---------- */
.about-envelope-avatar {
  position: relative;
  z-index: 3;
  width: 110px;
  height: 110px;
  margin: 28px 0 0 40px;
  flex-shrink: 0;
  animation: avatarFloat 5s ease-in-out infinite;
}

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

/* 内层光圈 */
.about-envelope-avatar::before {
  content: '';
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 2px solid rgba(234, 179, 8, 0.3);
  background: radial-gradient(circle, rgba(234, 179, 8, 0.1) 0%, transparent 70%);
  pointer-events: none;
  transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* 外层装饰虚线环 */
.about-envelope-avatar::after {
  content: '';
  position: absolute;
  inset: -18px;
  border-radius: 50%;
  border: 2px dashed rgba(234, 179, 8, 0.18);
  background: transparent;
  pointer-events: none;
  transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  animation: ringRotate 25s linear infinite;
}

@keyframes ringRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.about-envelope-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #eab308;
  padding: 5px;
  background: #fff;
  box-shadow:
    0 0 0 5px rgba(234, 179, 8, 0.6),
    0 0 0 12px rgba(234, 179, 8, 0.15),
    0 8px 28px rgba(234, 179, 8, 0.3);
  transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.about-envelope-avatar img:hover {
  transform: scale(1.12) rotate(-5deg);
  box-shadow:
    0 0 0 5px rgba(234, 179, 8, 0.8),
    0 0 0 16px rgba(234, 179, 8, 0.2),
    0 12px 40px rgba(234, 179, 8, 0.45);
}

.about-envelope-avatar:hover {
  animation: none;
}

.about-envelope-avatar:hover::before {
  border-color: rgba(234, 179, 8, 0.6);
  inset: -14px;
  background: radial-gradient(circle, rgba(234, 179, 8, 0.15) 0%, transparent 70%);
}

.about-envelope-avatar:hover::after {
  border-color: rgba(234, 179, 8, 0.35);
  inset: -22px;
  animation: ringRotate 2s linear infinite;
}

/* ---------- 英雄区域（头像 + 简介） ---------- */
.about-hero-section {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 28px 40px 20px;
  animation: heroFadeIn 0.8s 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

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

.about-hero-text {
  flex: 1;
}

.about-greeting {
  font-size: 2rem;
  font-weight: 700;
  color: #3d3226;
  margin: 0 0 12px;
  letter-spacing: 1px;
  background: linear-gradient(135deg, #3d3226 0%, #5a4a38 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.about-tagline {
  font-size: 1.05rem;
  color: #8b7355;
  margin: 0 0 16px;
  line-height: 1.6;
  font-style: italic;
}

/* 个性签名 */
.about-signature {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding: 12px 20px;
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.08) 0%, rgba(245, 158, 11, 0.06) 100%);
  border: 1px solid rgba(234, 179, 8, 0.2);
  border-radius: 24px;
  font-size: 0.95rem;
  color: #3d3226;
  font-weight: 500;
  transition: all 0.3s ease;
}

.about-signature:hover {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.12) 0%, rgba(245, 158, 11, 0.1) 100%);
  border-color: rgba(234, 179, 8, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(234, 179, 8, 0.15);
}

.signature-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.signature-item i {
  font-size: 1rem;
  color: #eab308;
}

.signature-divider {
  color: #eab308;
  font-weight: 700;
  opacity: 0.6;
}

/* 标签样式 */
.about-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-item {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(234, 179, 8, 0.1);
  border: 1px solid rgba(234, 179, 8, 0.25);
  border-radius: 20px;
  font-size: 0.9rem;
  color: #b8860b;
  font-weight: 600;
  transition: all 0.3s ease;
  cursor: default;
}

.tag-item:hover {
  background: rgba(234, 179, 8, 0.18);
  border-color: rgba(234, 179, 8, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(234, 179, 8, 0.2);
}

/* ---------- 卡片通用样式 ---------- */
.about-card {
  margin: 20px 32px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  border: 1px solid rgba(232, 223, 200, 0.6);
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.04),
    0 1px 4px rgba(0, 0, 0, 0.02);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  animation: cardSlideIn 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.about-card:nth-child(2) { animation-delay: 0.4s; }
.about-card:nth-child(3) { animation-delay: 0.5s; }
.about-card:nth-child(4) { animation-delay: 0.6s; }
.about-card:nth-child(5) { animation-delay: 0.7s; }
.about-card:nth-child(6) { animation-delay: 0.8s; }

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

.about-card:hover {
  background: rgba(255, 255, 255, 0.85);
  box-shadow:
    0 8px 28px rgba(0, 0, 0, 0.08),
    0 4px 12px rgba(0, 0, 0, 0.04);
  transform: translateY(-2px);
}

/* ---------- 卡片头部 ---------- */
.about-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 2px solid rgba(234, 179, 8, 0.2);
}

.about-card-icon {
  font-size: 1.8rem;
  line-height: 1;
}

.about-card-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #3d3226;
  margin: 0;
  letter-spacing: 0.5px;
}

/* ---------- 卡片内容 ---------- */
.about-card-body {
  color: #5a4a38;
  line-height: 1.8;
}

/* ---------- 信息网格（教育背景） ---------- */
.about-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.about-info-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px;
  background: rgba(234, 179, 8, 0.06);
  border-radius: 12px;
  border: 1px solid rgba(234, 179, 8, 0.15);
  transition: all 0.3s ease;
}

.about-info-item:hover {
  background: rgba(234, 179, 8, 0.1);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(234, 179, 8, 0.15);
}

.about-label {
  font-size: 0.85rem;
  color: #8b7355;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.about-value {
  font-size: 1.05rem;
  color: #3d3226;
  font-weight: 600;
}

.about-value.highlight {
  color: #d4a017;
  font-size: 1.1rem;
}

/* 身份标签列表 */
.about-identity-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.identity-tag {
  display: inline-block;
  padding: 4px 12px;
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.12) 0%, rgba(245, 158, 11, 0.08) 100%);
  border: 1px solid rgba(234, 179, 8, 0.25);
  border-radius: 16px;
  font-size: 0.9rem;
  color: #3d3226;
  font-weight: 500;
  transition: all 0.3s ease;
}

.identity-tag:hover {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.2) 0%, rgba(245, 158, 11, 0.15) 100%);
  border-color: rgba(234, 179, 8, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(234, 179, 8, 0.2);
}

/* ---------- 成就展示 ---------- */
.about-section-desc {
  color: #8b7355;
  margin-bottom: 20px;
  font-size: 0.95rem;
}

.about-achievements {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.achievement-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 14px;
  border: 1px solid rgba(232, 223, 200, 0.5);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.achievement-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(234, 179, 8, 0.3), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.achievement-item:hover::before {
  opacity: 1;
}

.achievement-item:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: translateX(6px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.achievement-item.gold:hover {
  border-color: rgba(234, 179, 8, 0.4);
}

.achievement-item.bronze:hover {
  border-color: rgba(205, 127, 50, 0.4);
}

.achievement-medal {
  font-size: 2.5rem;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
  animation: medalShine 3s ease-in-out infinite;
}

@keyframes medalShine {
  0%, 100% {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
  }
  50% {
    filter: drop-shadow(0 2px 8px rgba(234, 179, 8, 0.4));
  }
}

.achievement-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.achievement-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: #3d3226;
}

.achievement-badge {
  display: inline-block;
  padding: 4px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 20px;
  width: fit-content;
}

.gold .achievement-badge {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.2), rgba(245, 158, 11, 0.15));
  color: #b8860b;
  border: 1px solid rgba(234, 179, 8, 0.4);
}

.bronze .achievement-badge {
  background: linear-gradient(135deg, rgba(205, 127, 50, 0.2), rgba(184, 115, 51, 0.15));
  color: #a0522d;
  border: 1px solid rgba(205, 127, 50, 0.4);
}

/* ---------- 引用卡片 ---------- */
.about-quote-card {
  background: linear-gradient(135deg,
    rgba(234, 179, 8, 0.08) 0%,
    rgba(255, 255, 255, 0.7) 100%);
}

.about-main-quote {
  margin: 18px 0;
  padding: 20px 24px;
  background: rgba(255, 255, 255, 0.8);
  border-left: 4px solid #eab308;
  border-radius: 0 14px 14px 0;
  color: #6b5840;
  font-size: 1.1rem;
  font-style: italic;
  line-height: 1.8;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  transition: all 0.3s ease;
  position: relative;
}

.about-main-quote::before {
  content: '"';
  position: absolute;
  top: -8px;
  left: 16px;
  font-size: 3rem;
  color: rgba(234, 179, 8, 0.2);
  font-family: Georgia, serif;
  line-height: 1;
}

.about-main-quote:hover {
  background: rgba(255, 255, 255, 0.95);
  transform: translateX(4px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.about-journey-text {
  color: #6b5840;
  line-height: 1.9;
  margin: 16px 0 0;
}

.about-acm-term {
  display: inline-block;
  padding: 2px 8px;
  background: rgba(234, 179, 8, 0.15);
  border-radius: 6px;
  font-weight: 600;
  color: #b8860b;
  font-family: 'Courier New', monospace;
  font-size: 0.95em;
  margin: 0 2px;
}

/* ---------- 技能条 ---------- */
.about-skills {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.skill-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

.skill-name {
  font-size: 1rem;
  font-weight: 600;
  color: #3d3226;
}

.skill-label {
  font-size: 0.85rem;
  color: #8b7355;
  padding: 3px 10px;
  background: rgba(234, 179, 8, 0.12);
  border-radius: 12px;
  font-weight: 500;
}

.skill-bar {
  position: relative;
  height: 12px;
  background: rgba(234, 179, 8, 0.1);
  border-radius: 6px;
  overflow: hidden;
}

.skill-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #eab308 0%, #f59e0b 100%);
  border-radius: 6px;
  transition: width 1.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 0 12px rgba(234, 179, 8, 0.4);
}

.skill-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.4) 50%,
    transparent 100%);
  animation: skillShine 2s ease-in-out infinite;
}

@keyframes skillShine {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* ---------- 博客特性网格 ---------- */
.about-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.feature-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 18px 12px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 14px;
  border: 1px solid rgba(232, 223, 200, 0.5);
  text-align: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: default;
}

.feature-item:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.feature-icon {
  font-size: 2.2rem;
  line-height: 1;
}

.feature-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.feature-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #3d3226;
}

.feature-desc {
  font-size: 0.8rem;
  color: #8b7355;
}

/* ---------- 博客介绍 ---------- */
.about-blog-intro {
  font-size: 1.05rem;
  color: #5a4a38;
  margin-bottom: 4px;
}

/* ---------- 联系方式卡片 ---------- */
.about-contact-card {
  background: linear-gradient(135deg,
    rgba(234, 179, 8, 0.06) 0%,
    rgba(255, 255, 255, 0.7) 100%);
}

/* ---------- 联系按钮 ---------- */
.about-envelope-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.8);
  border: 2px solid rgba(234, 179, 8, 0.3);
  border-radius: 24px;
  font-size: 0.95rem;
  color: #5a4a38;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.contact-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(234, 179, 8, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.contact-btn:hover::before {
  width: 300px;
  height: 300px;
}

.contact-btn:hover {
  background: #eab308;
  color: #fff;
  border-color: #eab308;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(234, 179, 8, 0.35);
}

.contact-icon {
  font-size: 1.2rem;
  line-height: 1;
  position: relative;
  z-index: 1;
}

.contact-text {
  font-weight: 500;
  position: relative;
  z-index: 1;
}

/* ---------- 分隔线 ---------- */
.about-divider {
  border: none;
  height: 2px;
  background: linear-gradient(90deg,
      transparent,
      rgba(180, 160, 130, 0.3) 20%,
      rgba(234, 179, 8, 0.5) 50%,
      rgba(180, 160, 130, 0.3) 80%,
      transparent);
  margin: 32px 40px;
}

/* ---------- 底部状态 ---------- */
.about-footer {
  text-align: center;
  padding: 0 40px 32px;
}

.about-envelope-status {
  display: inline-block;
  margin-top: 8px;
  padding: 10px 28px;
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.15), rgba(245, 158, 11, 0.1));
  border: 1px solid rgba(234, 179, 8, 0.35);
  border-radius: 26px;
  font-size: 0.95rem;
  color: #b8860b;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
}

.about-envelope-status:hover {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.22), rgba(245, 158, 11, 0.15));
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(234, 179, 8, 0.25);
}

/* ---------- 正文内容区 ---------- */
.about-envelope-content {
  position: relative;
  z-index: 1;
  color: #4a4035;
}

.about-envelope-content::after {
  content: '';
  display: table;
  clear: both;
}

/* ---------- 底部弧形装饰线 ---------- */
.about-envelope-content::before {
  content: '';
  display: block;
  width: 60%;
  height: 1px;
  margin: 0 auto 24px;
  background: linear-gradient(90deg,
      transparent,
      rgba(180, 160, 130, 0.25) 30%,
      rgba(180, 160, 130, 0.45) 50%,
      rgba(180, 160, 130, 0.25) 70%,
      transparent);
  border-radius: 1px;
}

/* ---------- 信封底部封口（弧形火漆） ---------- */
.about-envelope-body::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 62px;
  background: linear-gradient(160deg, #e8dcc4 0%, #ddcfaa 50%, #d0c496 100%);
  clip-path: ellipse(50% 55% at 50% 0%);
  z-index: 2;
  opacity: 0.7;
  pointer-events: none;
  transition: all 0.5s ease;
}

.about-envelope-body:hover::after {
  opacity: 0.85;
  transform: translateX(-50%) scale(1.05);
}

/* ========================================
   暗色模式
   ======================================== */

[data-theme='dark'] .about-envelope-flap {
  background: linear-gradient(170deg, #3d3528 0%, #342d22 40%, #2a241b 100%);
  filter: drop-shadow(0 -4px 8px rgba(0, 0, 0, 0.3));
}

[data-theme='dark'] .about-envelope-flap::before {
  background: radial-gradient(ellipse at 50% 90%, rgba(0,0,0,0.2) 0%, transparent 70%);
}

[data-theme='dark'] .about-envelope-body {
  background: linear-gradient(175deg, #2a2520 0%, #252018 50%, #221d16 100%);
  border-color: #3d3528;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.4),
    0 8px 20px rgba(0, 0, 0, 0.25),
    inset 0 2px 0 rgba(255, 255, 255, 0.03),
    inset 0 -2px 0 rgba(0, 0, 0, 0.2);
}

[data-theme='dark'] .about-envelope-body:hover {
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.5),
    0 12px 28px rgba(0, 0, 0, 0.3),
    inset 0 2px 0 rgba(255, 255, 255, 0.03),
    inset 0 -2px 0 rgba(0, 0, 0, 0.2);
}

[data-theme='dark'] .about-envelope-body::after {
  background: linear-gradient(160deg, #3d3528 0%, #342d22 50%, #2a241b 100%);
}

[data-theme='dark'] .about-envelope-bg {
  opacity: 0.08;
}

[data-theme='dark'] .about-envelope-body:hover .about-envelope-bg {
  opacity: 0.11;
}

[data-theme='dark'] .about-envelope-body::before {
  background-image:
    repeating-linear-gradient(0deg,
      transparent,
      transparent 3px,
      rgba(255, 255, 255, 0.015) 3px,
      rgba(255, 255, 255, 0.015) 4px);
}

[data-theme='dark'] .about-envelope-avatar::before {
  border-color: rgba(234, 179, 8, 0.25);
  background: radial-gradient(circle, rgba(234, 179, 8, 0.08) 0%, transparent 70%);
}

[data-theme='dark'] .about-envelope-avatar::after {
  border-color: rgba(234, 179, 8, 0.12);
}

[data-theme='dark'] .about-envelope-avatar img {
  background: #2a2520;
  border-color: #eab308;
  box-shadow:
    0 0 0 5px rgba(234, 179, 8, 0.55),
    0 0 0 12px rgba(234, 179, 8, 0.12),
    0 8px 28px rgba(234, 179, 8, 0.2);
}

[data-theme='dark'] .about-envelope-avatar img:hover {
  box-shadow:
    0 0 0 5px rgba(234, 179, 8, 0.7),
    0 0 0 18px rgba(234, 179, 8, 0.18),
    0 12px 40px rgba(234, 179, 8, 0.35);
}

[data-theme='dark'] .about-envelope-avatar:hover::before {
  border-color: rgba(234, 179, 8, 0.5);
  background: radial-gradient(circle, rgba(234, 179, 8, 0.12) 0%, transparent 70%);
}

[data-theme='dark'] .about-envelope-avatar:hover::after {
  border-color: rgba(234, 179, 8, 0.28);
}

/* 暗色模式英雄区域 */
[data-theme='dark'] .about-hero-section {
  animation: heroFadeInDark 0.8s 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

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

[data-theme='dark'] .about-greeting {
  background: linear-gradient(135deg, #e0d5c5 0%, #d0c0a8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

[data-theme='dark'] .about-tagline {
  color: #b5a890;
}

/* 暗色模式个性签名 */
[data-theme='dark'] .about-signature {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.1) 0%, rgba(245, 158, 11, 0.08) 100%);
  border-color: rgba(234, 179, 8, 0.3);
  color: #d4c9b1;
}

[data-theme='dark'] .about-signature:hover {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.15) 0%, rgba(245, 158, 11, 0.12) 100%);
  border-color: rgba(234, 179, 8, 0.4);
}

[data-theme='dark'] .signature-item i {
  color: #fbbf24;
}

[data-theme='dark'] .signature-divider {
  color: #fbbf24;
  opacity: 0.5;
}

/* 暗色模式标签 */
[data-theme='dark'] .tag-item {
  background: rgba(234, 179, 8, 0.12);
  border-color: rgba(234, 179, 8, 0.3);
  color: #fbbf24;
}

[data-theme='dark'] .tag-item:hover {
  background: rgba(234, 179, 8, 0.2);
  border-color: rgba(234, 179, 8, 0.45);
}

/* 暗色模式卡片 */
[data-theme='dark'] .about-card {
  background: rgba(40, 35, 28, 0.7);
  border-color: rgba(61, 53, 40, 0.6);
}

[data-theme='dark'] .about-card:hover {
  background: rgba(45, 40, 32, 0.85);
}

[data-theme='dark'] .about-card-header h2 {
  color: #e0d5c5;
}

[data-theme='dark'] .about-card-body {
  color: #c5b8a8;
}

[data-theme='dark'] .about-info-item {
  background: rgba(234, 179, 8, 0.08);
  border-color: rgba(234, 179, 8, 0.2);
}

[data-theme='dark'] .about-info-item:hover {
  background: rgba(234, 179, 8, 0.12);
}

[data-theme='dark'] .about-label {
  color: #b5a890;
}

[data-theme='dark'] .about-value {
  color: #e0d5c5;
}

[data-theme='dark'] .about-value.highlight {
  color: #eab308;
}

/* 身份标签暗色模式 */
[data-theme='dark'] .identity-tag {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.15) 0%, rgba(245, 158, 11, 0.1) 100%);
  border-color: rgba(234, 179, 8, 0.3);
  color: #e0d5c5;
}

[data-theme='dark'] .identity-tag:hover {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.25) 0%, rgba(245, 158, 11, 0.2) 100%);
  border-color: rgba(234, 179, 8, 0.5);
}

[data-theme='dark'] .about-section-desc {
  color: #b5a890;
}

[data-theme='dark'] .achievement-item {
  background: rgba(40, 35, 28, 0.6);
  border-color: rgba(61, 53, 40, 0.6);
}

[data-theme='dark'] .achievement-item:hover {
  background: rgba(50, 45, 38, 0.85);
}

[data-theme='dark'] .achievement-title {
  color: #e0d5c5;
}

[data-theme='dark'] .gold .achievement-badge {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.25), rgba(245, 158, 11, 0.2));
  color: #eab308;
  border-color: rgba(234, 179, 8, 0.5);
}

[data-theme='dark'] .bronze .achievement-badge {
  background: linear-gradient(135deg, rgba(205, 127, 50, 0.25), rgba(184, 115, 51, 0.2));
  color: #cd7f32;
  border-color: rgba(205, 127, 50, 0.5);
}

[data-theme='dark'] .about-quote-card {
  background: linear-gradient(135deg,
    rgba(234, 179, 8, 0.1) 0%,
    rgba(40, 35, 28, 0.7) 100%);
}

[data-theme='dark'] .about-main-quote {
  background: rgba(50, 45, 38, 0.8);
  color: #c5b8a8;
}

[data-theme='dark'] .about-main-quote::before {
  color: rgba(234, 179, 8, 0.15);
}

[data-theme='dark'] .about-main-quote:hover {
  background: rgba(55, 50, 42, 0.95);
}

[data-theme='dark'] .about-journey-text {
  color: #c5b8a8;
}

[data-theme='dark'] .about-acm-term {
  background: rgba(234, 179, 8, 0.18);
  color: #eab308;
}

[data-theme='dark'] .skill-name {
  color: #e0d5c5;
}

[data-theme='dark'] .skill-label {
  color: #b5a890;
  background: rgba(234, 179, 8, 0.15);
}

[data-theme='dark'] .skill-bar {
  background: rgba(234, 179, 8, 0.15);
}

[data-theme='dark'] .about-blog-intro {
  color: #c5b8a8;
}

[data-theme='dark'] .feature-item {
  background: rgba(40, 35, 28, 0.6);
  border-color: rgba(61, 53, 40, 0.6);
}

[data-theme='dark'] .feature-item:hover {
  background: rgba(50, 45, 38, 0.85);
}

[data-theme='dark'] .feature-title {
  color: #e0d5c5;
}

[data-theme='dark'] .feature-desc {
  color: #b5a890;
}

[data-theme='dark'] .about-contact-card {
  background: linear-gradient(135deg,
    rgba(234, 179, 8, 0.1) 0%,
    rgba(40, 35, 28, 0.7) 100%);
}

[data-theme='dark'] .contact-btn:hover {
  background: #eab308;
  color: #1a1a1a;
  border-color: #eab308;
}

[data-theme='dark'] .about-divider {
  background: linear-gradient(90deg,
      transparent,
      rgba(255, 255, 255, 0.1) 20%,
      rgba(234, 179, 8, 0.4) 50%,
      rgba(255, 255, 255, 0.1) 80%,
      transparent);
}

.contact-icon {
  font-size: 1.2rem;
  line-height: 1;
  position: relative;
  z-index: 1;
}

.contact-text {
  font-weight: 500;
  position: relative;
  z-index: 1;
}
  background: linear-gradient(90deg,
      transparent,
      rgba(255, 255, 255, 0.1) 20%,
      rgba(234, 179, 8, 0.4) 50%,
      rgba(255, 255, 255, 0.1) 80%,
      transparent);
}

[data-theme='dark'] .about-envelope-status {
  background: rgba(234, 179, 8, 0.12);
  border-color: rgba(234, 179, 8, 0.3);
  color: #eab308;
}

[data-theme='dark'] .about-envelope-status:hover {
  background: rgba(234, 179, 8, 0.18);
}

/* ========================================
   响应式设计
   ======================================== */

@media (max-width: 900px) {
  .about-envelope-wrapper {
    max-width: 100%;
    margin: 10px 0 30px;
    padding-top: 50px;
  }

  .about-envelope-flap {
    height: 50px;
    left: 4%;
    right: 4%;
  }

  .about-envelope-body {
    border-radius: 20px;
  }

  .about-hero-section {
    flex-direction: column;
    text-align: center;
    padding: 24px 28px 20px;
    gap: 20px;
  }

  .about-envelope-avatar {
    margin: 0 auto;
  }

  .about-greeting {
    font-size: 1.6rem;
  }

  .about-card {
    margin: 16px 20px;
    padding: 20px;
  }

  .about-divider {
    margin: 24px 28px;
  }

  .about-footer {
    padding: 0 28px 24px;
  }
}

@media (max-width: 768px) {
  .about-envelope-wrapper {
    padding-top: 42px;
  }

  .about-envelope-flap {
    height: 42px;
  }

  .about-envelope-body {
    border-radius: 18px;
  }

  .about-envelope-bg,
  .about-envelope-body::before {
    border-radius: 16px;
  }

  .about-envelope-avatar {
    width: 90px;
    height: 90px;
    margin: 0 auto;
  }

  .about-envelope-avatar::before {
    inset: -8px;
  }

  .about-envelope-avatar::after {
    inset: -14px;
  }

  .about-envelope-avatar img {
    border-width: 3px;
    padding: 4px;
    box-shadow:
      0 0 0 4px rgba(234, 179, 8, 0.55),
      0 0 0 10px rgba(234, 179, 8, 0.12),
      0 6px 20px rgba(234, 179, 8, 0.22);
  }

  .about-hero-section {
    padding: 20px 20px 16px;
  }

  .about-greeting {
    font-size: 1.4rem;
  }

  .about-tagline {
    font-size: 0.95rem;
  }

  .about-signature {
    flex-wrap: wrap;
    justify-content: center;
    font-size: 0.9rem;
    padding: 10px 16px;
    gap: 8px;
  }

  .about-tags {
    justify-content: center;
  }

  .tag-item {
    padding: 5px 14px;
    font-size: 0.85rem;
  }

  .about-card {
    margin: 14px 16px;
    padding: 18px;
  }

  .about-card-header {
    margin-bottom: 16px;
    padding-bottom: 12px;
  }

  .about-card-icon {
    font-size: 1.5rem;
  }

  .about-card-header h2 {
    font-size: 1.25rem;
  }

  .about-info-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .about-features {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .feature-item {
    padding: 14px 10px;
  }

  .feature-icon {
    font-size: 1.8rem;
  }

  .feature-title {
    font-size: 0.9rem;
  }

  .achievement-item {
    padding: 14px 16px;
  }

  .achievement-medal {
    font-size: 2rem;
  }

  .achievement-title {
    font-size: 0.95rem;
  }

  .about-divider {
    margin: 20px 24px;
  }

  .about-footer {
    padding: 0 24px 20px;
  }

  .about-envelope-status {
    padding: 8px 22px;
    font-size: 0.9rem;
  }

  .contact-btn {
    padding: 8px 16px;
    font-size: 0.9rem;
  }

  /* 移动端减少动画 */
  .about-envelope-avatar {
    animation: none;
  }

  .about-envelope-avatar::after {
    animation: none;
  }

  .about-card {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .about-hero-section {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .achievement-medal {
    animation: none;
  }
}

@media (max-width: 480px) {
  .about-envelope-wrapper {
    margin: 6px 0 20px;
    padding-top: 36px;
  }

  .about-envelope-flap {
    height: 32px;
    left: 3%;
    right: 3%;
  }

  .about-envelope-body {
    border-radius: 14px;
  }

  .about-envelope-bg,
  .about-envelope-body::before {
    border-radius: 12px;
  }

  .about-envelope-avatar {
    width: 70px;
    height: 70px;
  }

  .about-envelope-avatar::before {
    inset: -6px;
    border-width: 1.5px;
  }

  .about-envelope-avatar::after {
    inset: -11px;
    border-width: 1px;
  }

  .about-envelope-avatar img {
    border-width: 2px;
    padding: 3px;
    box-shadow:
      0 0 0 3px rgba(234, 179, 8, 0.5),
      0 0 0 7px rgba(234, 179, 8, 0.1),
      0 3px 12px rgba(234, 179, 8, 0.18);
  }

  .about-hero-section {
    padding: 16px 16px 12px;
  }

  .about-greeting {
    font-size: 1.2rem;
  }

  .about-tagline {
    font-size: 0.85rem;
  }

  .about-signature {
    flex-wrap: wrap;
    justify-content: center;
    font-size: 0.85rem;
    padding: 8px 14px;
    gap: 6px;
  }

  .about-tags {
    justify-content: center;
    gap: 8px;
  }

  .tag-item {
    padding: 4px 12px;
    font-size: 0.8rem;
  }

  .about-card {
    margin: 12px 12px;
    padding: 16px;
    border-radius: 14px;
  }

  .about-card-header {
    margin-bottom: 14px;
    padding-bottom: 10px;
  }

  .about-card-icon {
    font-size: 1.3rem;
  }

  .about-card-header h2 {
    font-size: 1.1rem;
  }

  .about-card-body {
    font-size: 0.9rem;
    line-height: 1.7;
  }

  .about-features {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .feature-item {
    padding: 12px 8px;
  }

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

  .feature-title {
    font-size: 0.85rem;
  }

  .feature-desc {
    font-size: 0.75rem;
  }

  .achievement-item {
    padding: 12px 14px;
    gap: 12px;
  }

  .achievement-medal {
    font-size: 1.6rem;
  }

  .achievement-title {
    font-size: 0.9rem;
  }

  .achievement-badge {
    font-size: 0.8rem;
    padding: 3px 10px;
  }

  .about-main-quote {
    padding: 16px 18px;
    font-size: 1rem;
  }

  .about-divider {
    margin: 16px 20px;
  }

  .about-footer {
    padding: 0 20px 16px;
  }

  .about-envelope-status {
    padding: 7px 18px;
    font-size: 0.85rem;
  }

  .contact-btn {
    padding: 7px 14px;
    font-size: 0.85rem;
    gap: 6px;
  }

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

  .contact-hint {
    font-size: 0.75rem;
  }

  .about-envelope-body::after {
    width: 48px;
    height: 38px;
  }
}
