:root {
  --bg-color: #f6f7f9;
  --primary-color: #2b3b55; /* 深蓝色 */
  --secondary-color: #ecf3fe; /* 浅蓝色背景 */
  --brand-color: #3b82f6; /* 主题亮色 */
  --text-dark: #333333;
  --text-light: #666666;
  --text-pale: #999999;
  --card-bg: #ffffff;
  --border-radius: 12px;
}

[v-cloak] { display: none !important; }

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue', Arial, 'Microsoft YaHei', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-dark);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* 容器居中限制最大宽度，适配桌面查看 */
.container {
  max-width: 480px;
  margin: 0 auto;
  background-color: var(--bg-color);
  min-height: 100vh;
  padding-bottom: 90px; /* 留出底部悬浮栏空间 */
  box-shadow: 0 0 20px rgba(0,0,0,0.05); /* 桌面端稍微加点阴影边缘 */
  position: relative;
}

/* 顶部页眉 */
.header {
  background: linear-gradient(135deg, #1f2d48 0%, #3e5374 100%);
  color: #ffffff;
  padding: 40px 20px 60px;
  text-align: center;
  border-bottom-left-radius: 24px;
  border-bottom-right-radius: 24px;
  position: relative;
}

.avatar-wrapper {
  margin-bottom: 12px;
}

.avatar {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.4);
  object-fit: cover;
}

.name {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: 1px;
}

.header-tags {
  font-size: 13px;
  opacity: 0.9;
  font-weight: 300;
}

.divider {
  margin: 0 8px;
  opacity: 0.5;
}

/* 主内容区 */
.content {
  padding: 0 16px;
  margin-top: -30px; /* 向上偏移卡到深色背景上 */
  z-index: 10;
  position: relative;
}

/* 卡片通用样式 */
.card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.card-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  color: #111;
}

.icon {
  display: inline-block;
  width: 4px;
  height: 14px;
  background-color: var(--brand-color);
  border-radius: 2px;
  margin-right: 8px;
}

/* 基本信息块 */
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 10px;
}

.info-item {
  font-size: 14px;
  display: flex;
  align-items: flex-start;
}

.info-item.full-width {
  grid-column: 1 / -1;
}

.info-label {
  color: var(--text-light);
  white-space: nowrap;
}

.info-value {
  color: var(--text-dark);
  font-weight: 500;
  word-break: break-all;
}

/* 个人介绍块 */
.intro-text {
  font-size: 14px;
  color: var(--text-dark);
  line-height: 1.6;
  text-align: justify; /* 两端对齐更美观 */
}

/* 技能块 */
.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.skill-tag {
  background-color: var(--secondary-color);
  color: var(--brand-color);
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 20px;
  font-weight: 500;
}

/* 证书滚动块 */
.cert-scroll {
  display: flex;
  overflow-x: auto;
  gap: 12px;
  padding-bottom: 8px;
  scrollbar-width: none; /* Firefox */
}

.cert-scroll::-webkit-scrollbar {
  display: none; /* Chrome/Safari/Edge */
}

.cert-card {
  flex: 0 0 130px;
  display: flex;
  flex-direction: column;
}

.cert-img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 8px;
  background-color: #f0f0f0;
}

.cert-name {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-dark);
}

.cert-level {
  display: inline-block;
  align-self: flex-start;
  font-size: 10px;
  background-color: var(--secondary-color);
  color: var(--brand-color);
  padding: 2px 6px;
  border-radius: 4px;
  margin-bottom: 4px;
}

.cert-date {
  font-size: 11px;
  color: var(--text-pale);
}

/* 互动照片网格 */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.photo-item {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  border-radius: 8px;
  background-color: #f0f0f0;
}

/* 底部固定栏 */
.bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 -2px 15px rgba(0,0,0,0.06);
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom); /* iOS安全区域适配 */
}

.bottom-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 480px;
  margin: 0 auto;
  padding: 12px 20px;
}

.contact-info {
  display: flex;
  flex-direction: column;
}

.contact-name {
  font-size: 12px;
  color: var(--text-light);
  margin-bottom: 2px;
}

.contact-phone {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary-color);
  letter-spacing: 0.5px;
}

.contact-btn {
  background-color: var(--primary-color);
  color: #fff;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  padding: 12px 26px;
  border-radius: 24px;
  box-shadow: 0 4px 10px rgba(43, 59, 85, 0.3);
  transition: all 0.2s;
}

.contact-btn:active {
  transform: scale(0.96);
}

/* 图片放大预览 */
.preview-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.95);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  touch-action: none;
}

.preview-img {
  max-width: 95%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 4px;
}

.preview-close {
  position: absolute;
  top: 20px;
  right: 20px;
  color: #fff;
  font-size: 24px;
  width: 40px;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  cursor: pointer;
}

.fade-enter-active,
.fade-leave-active {
  transition: opacity 0.3s ease;
}

.fade-enter-from,
.fade-leave-to {
  opacity: 0;
}
