/* === 设计变量 === */
:root {
  --primary: #005ea2;
  --gray: #4a4a4a;
  --light: #f5f7fa;
  --border: #e1e4e8;
  --font: "Inter", sans-serif;
  --section-bg: #ffffff;
}

/* === 全局重置 === */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: var(--font);
  color: var(--gray);
  line-height: 1.65;
  background: #fff;
}

.container { max-width: 900px; margin: 0 auto; padding: 0 28px; }

/* === 语言切换按钮 === */
.lang-switch {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 1000;
  display: flex;
  gap: 6px;
}
.lang-switch button {
  padding: 6px 14px;
  border: 1px solid var(--primary);
  background: #fff;
  color: var(--primary);
  font-size: 14px;
  cursor: pointer;
  border-radius: 4px;
  transition: all .2s;
}
.lang-switch button.active,
.lang-switch button:hover {
  background: var(--primary);
  color: #fff;
}

/* === 头部 === */
header {
  background: var(--light);
  padding: 36px 0;
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
h1 { font-size: 34px; font-weight: 600; }
.tagline { font-size: 18px; color: var(--primary); margin: 4px 0 8px; }
.contact span { margin-right: 22px; font-size: 14px; }

/* 头像优化：矩形+边框+柔和阴影 */
.avatar {
  width: 110px;
  height: 110px;
  object-fit: cover;
  border-radius: 4px;                /* 直角矩形 */
  border: 2px solid #f0f0f0;        /* 浅色边框 */
  box-shadow: 0 3px 10px rgba(0,0,0,0.08); /* 柔和阴影 */
}

/* === 主体 === */
main { padding: 36px 0 48px; }

/* 区块化设计：圆角+阴影+边框 */
section {
  padding: 24px;
  border-radius: 8px;
  background: var(--section-bg);
  box-shadow: 0 2px 12px rgba(0,0,0,0.03);
  margin-bottom: 32px;
  border: 1px solid #f0f0f0;
  transition: all 0.3s ease;
}

h2 {
  font-size: 22px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 12px;
  border-bottom: 2px solid var(--border);
  padding-bottom: 4px;
}

/* 技能列表优化：箭头符号+间距 */
.skills {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
  list-style: none;
}
.skills li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 10px;
  line-height: 1.5;
}
.skills li::before {
  content: "▹";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-size: 18px;
}

/* 工作卡片日期优化 */
.job { margin-bottom: 28px; }
.job h3 { font-size: 18px; margin-bottom: 4px; }
.date {
  display: block;
  font-weight: 500;
  color: #5a5a5a;
  margin: 6px 0 12px;
  font-size: 15px;
}
ul { padding-left: 20px; }
li { margin-bottom: 4px; }

/* 两栏布局区块背景 */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.two-col > div {
  padding: 18px;
  background: #fafafa;
  border-radius: 6px;
  border: 1px solid #f0f0f0;
}

/* 通用段落后间距 */
p, ul { margin-bottom: 1.2em; }

/* === 语言显示控制 === */
body.zh-CN .content-en,
body.en   .content-zh { display: none; }

/* === 响应式优化 === */
@media (max-width: 768px) {
  .header-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .avatar {
    margin: 25px auto 0;
    order: -1;
  }
  .contact span {
    display: block;
    margin: 10px 0;
  }
  .two-col {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* === 打印优化 === */
@media print {
  .lang-switch { display: none; }
  body { font-size: 11pt; line-height: 1.4; }
  h1 { font-size: 26px; }
  h2 { font-size: 16px; }

  section {
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    background: transparent !important;
  }
  .two-col > div {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
  }
  .container { padding: 0 5mm; }
  .avatar {
    border: 1px solid #ddd !important;
    box-shadow: none !important;
  }
}