/* ============================================================
 * 简历网站样式（深色/浅色主题由 data-theme 控制）
 * ========================================================== */
:root {
  --bg: #0f1117;
  --surface: #1a1d27;
  --surface-2: #232735;
  --text: #e6e8ef;
  --text-dim: #9aa0b0;
  --accent: #5b8cff;
  --border: #2a2f3d;
  --shadow: 0 8px 30px rgba(0, 0, 0, .35);
}
[data-theme="light"] {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-2: #eef0f6;
  --text: #1a1d27;
  --text-dim: #5a6172;
  --accent: #3b6fe0;
  --border: #e2e5ee;
  --shadow: 0 8px 30px rgba(20, 30, 60, .08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  transition: background .3s, color .3s;
}

.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav__inner {
  max-width: 1000px; margin: 0 auto; padding: 14px 20px;
  display: flex; align-items: center; gap: 16px;
}
.nav__logo { font-weight: 800; font-size: 20px; color: var(--text); text-decoration: none; }
.nav__menu { display: flex; gap: 18px; margin-left: auto; }
.nav__menu a { color: var(--text-dim); text-decoration: none; font-size: 15px; transition: color .2s; }
.nav__menu a:hover { color: var(--accent); }
.nav__theme {
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
  width: 38px; height: 38px; border-radius: 10px; cursor: pointer; font-size: 16px;
}
.nav__back { color: var(--text-dim); text-decoration: none; font-size: 14px; }

main { max-width: 1000px; margin: 0 auto; padding: 0 20px; }
.section { padding: 80px 0; border-bottom: 1px solid var(--border); }
.hero {
  min-height: 78vh;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  padding: 60px 0;
}
.hero__left { flex: 1; display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.hero__right { flex-shrink: 0; }
.hero__eyebrow { color: var(--accent); font-weight: 600; letter-spacing: .5px; }
.hero__photo {
  width: min(280px, 40vw);
  border-radius: 16px;
  border: 3px solid var(--border);
  box-shadow: var(--shadow);
  display: block;
}
.hero__title { font-size: clamp(34px, 6vw, 60px); font-weight: 800; line-height: 1.1; }
.hero__sub { color: var(--text-dim); font-size: 18px; }
@media (max-width: 700px) {
  .hero { flex-direction: column; text-align: center; gap: 28px; }
  .hero__left { align-items: center; }
}
.hero__cta {
  margin-top: 18px; align-self: flex-start; padding: 12px 22px;
  background: var(--accent); color: #fff; border-radius: 12px; text-decoration: none; font-weight: 600;
}

.section__title { font-size: 28px; font-weight: 800; margin-bottom: 24px; }
.section__subtitle { font-size: 18px; font-weight: 700; margin: 28px 0 12px; }
.about__intro { color: var(--text); font-size: 16px; max-width: 760px; }
.about__edu { color: var(--text-dim); margin-top: 6px; }

.tags { display: flex; flex-wrap: wrap; gap: 10px; }
.tag {
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
  padding: 6px 14px; border-radius: 999px; font-size: 14px;
}
.tag--sm { padding: 4px 10px; font-size: 12px; }

.projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.card {
  display: block; background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  padding: 22px; text-decoration: none; color: var(--text);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--accent); }
.card__title { font-size: 19px; margin-bottom: 10px; }
.card__summary { color: var(--text-dim); font-size: 14px; margin-bottom: 14px; }
.card__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.card__more { color: var(--accent); font-weight: 600; font-size: 14px; }

.placeholder { color: var(--text-dim); }
.contact { display: flex; flex-wrap: wrap; gap: 14px; }
.contact__item {
  display: inline-flex; align-items: center; padding: 12px 18px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 12px; color: var(--text); text-decoration: none; font-weight: 600;
}
.contact__item:hover { border-color: var(--accent); }
.contact__btn { cursor: pointer; }

/* ============================================================
 * 顶部细广告条（椰树风精简版：约三厘米高，字号/图案都小）
 * 固定配色，不受 data-theme 切换影响
 * ========================================================== */
.yeshu-topbar {
  width: 100vw;
  position: relative;
  left: 50%;
  margin-left: -50vw;
  background: #000;
  color: #fff;
  border-bottom: 3px solid #ffea00;
  font-family: "Microsoft YaHei", "PingFang SC", "SimHei", sans-serif;
  padding: 6px 0 8px;
  overflow: hidden;
}
.yeshu-topbar * { box-sizing: border-box; }

/* 顶部条：横向滚动跑马灯（文案循环，红/黄交替小标签） */
.yeshu-marquee {
  overflow: hidden; white-space: nowrap; position: relative;
}
.yeshu-marquee__track {
  display: inline-block; white-space: nowrap;
  animation: yeshu-scroll 30s linear infinite;
  font-weight: 900; font-size: 14px;
}
.yeshu-marquee:hover .yeshu-marquee__track { animation-play-state: paused; }
.yeshu-tag {
  display: inline-block;
  padding: 3px 12px; margin: 0 5px;
  border: 2px solid #000;
}
.yeshu-tag--red { background: #d30000; color: #fff; }
.yeshu-tag--yellow { background: #ffea00; color: #000; }
@keyframes yeshu-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* 兼容：旧版单条横幅样式保留，防止其他地方引用 */
.slogans { padding: 60px 0; border-bottom: 1px solid var(--border); }
.slogan {
  border: 3px solid var(--accent); border-radius: 14px;
  padding: 22px 26px; margin: 16px 0;
  font-weight: 800; font-size: clamp(20px, 3.2vw, 30px);
  line-height: 1.4; text-align: center;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--text);
}
.slogan--main {
  border-width: 4px; font-weight: 900;
  font-size: clamp(28px, 5vw, 46px);
  padding: 30px 26px; letter-spacing: 1px;
  background: color-mix(in srgb, var(--accent) 20%, transparent);
}
.slogans__note { color: var(--text-dim); font-size: 13px; text-align: center; margin-top: 10px; }

.footer { max-width: 1000px; margin: 0 auto; padding: 30px 20px; color: var(--text-dim); font-size: 14px; text-align: center; }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

@media (max-width: 600px) {
  .nav__menu { gap: 12px; font-size: 13px; }
  .section { padding: 56px 0; }
}
