/* 李雅东个人网站 · 样式
   颜色、字号都放在下面的变量里，改一处全站生效。不加载任何外部字体和脚本，国内打开快。 */

:root {
  --bg: #f0f0f0;          /* 页面底色、卡片底色 */
  --surface: #ffffff;     /* 白色面板 */
  --accent: #ff6f21;      /* 橙色强调 */
  --ink: #0a0a0a;         /* 标题文字 */
  --deep: #333333;        /* 按钮、深色文字 */
  --grey: #424f54;        /* 次要文字 */
  --body: #646d71;        /* 正文 */
  --light: #859399;       /* 标签文字 */
  --line: rgba(133, 147, 153, 0.18);

  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC",
    system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "SF Mono", ui-monospace, Menlo, Consolas, "Liberation Mono", monospace;

  --h1: 48px;
  --h2: 30px;
  --h3: 18px;
  --text: 16px;
  --small: 12px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 20px 20px 120px;
  background: var(--bg);
  color: var(--body);
  font-family: var(--font-sans);
  font-size: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
a:focus-visible,
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  padding: 8px 12px;
  background: var(--deep);
  color: #fff;
  border-radius: 6px;
  z-index: 20;
}
.skip-link:focus { top: 12px; }

/* ---------- 整体两栏 ---------- */
.page {
  max-width: 1600px;
  margin: 0 auto;
  padding: 10px;
  background: var(--surface);
  border-radius: 10px;
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(0, 1.8fr);
  gap: 10px;
  align-items: start;
}

.sidebar,
.main {
  border: 1.5px solid var(--bg);
  border-radius: 5px;
  background: var(--surface);
}

/* ---------- 左栏 ---------- */
.sidebar {
  position: sticky;
  top: 30px;
  height: calc(100vh - 60px);
  min-height: 620px;
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
}

.profile-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 12px;
  padding: 10px;
  background: var(--bg);
  border-radius: 15px;
}

.avatar img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 9px;
}

.profile-info { display: flex; flex-direction: column; gap: 8px; min-width: 0; }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  padding: 3px 10px 3px 6px;
  background: var(--surface);
  border-radius: 40px;
  font-size: 14px;
  color: var(--deep);
}

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 111, 33, 0.18);
}

.profile-name { margin: 0; font-size: var(--h2); line-height: 1.15; color: var(--ink); font-weight: 400; }
.profile-title { margin: 0; color: var(--grey); line-height: 1.5; }

.headline {
  margin: 0 0 14px;
  font-size: var(--h1);
  line-height: 1.04;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.accent { color: var(--accent); }
.intro-text { margin: 0; }

.stats {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat dd { order: -1; margin: 0; font-size: var(--h2); line-height: 1.1; color: var(--ink); white-space: nowrap; }
.stat dt { font-family: var(--font-mono); font-size: var(--small); line-height: 1.35; color: var(--accent); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  padding: 12px 18px;
  border-radius: 6px;
  font-size: var(--text);
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn-dark { background: var(--deep); color: #fff; box-shadow: 0 6px 14px rgba(0, 0, 0, 0.22); }
.btn-dark:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(0, 0, 0, 0.26); }
.btn-arrow { font-size: 18px; font-weight: 400; }
.btn-small { padding: 8px 10px; font-size: 13px; box-shadow: none; }

/* ---------- 右栏 ---------- */
.main {
  min-width: 0;
  padding: 36px 30px 60px;
  display: flex;
  flex-direction: column;
  gap: 64px;
}

.section { scroll-margin-top: 24px; }
.section-head { display: flex; flex-direction: column; gap: 8px; margin-bottom: 22px; }
.kicker,
.date,
.num {
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--small);
  line-height: 1.3;
  text-transform: uppercase;
  color: var(--accent);
}
h2 { margin: 0; font-size: var(--h2); line-height: 1.15; font-weight: 400; color: var(--ink); }
h3 { margin: 0; font-size: var(--h3); line-height: 1.35; font-weight: 500; color: var(--ink); }

/* 工作经历 */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.timeline li:first-child { padding-top: 0; }
.timeline li:last-child { border-bottom: 0; padding-bottom: 0; }
.timeline li > p:not(.date) { margin: 0; }

/* 代表作品 */
.works {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px 12px;
}
.work { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.work > p { margin: 0; }

.work-media {
  position: relative;
  display: block;
  aspect-ratio: 1.53;
  overflow: hidden;
  border-radius: 8px;
  background: var(--bg);
}
.work-media picture,
.work-media img { width: 100%; height: 100%; }
.work-media img { object-fit: cover; transition: transform 0.5s ease; }
.work-media:hover img { transform: scale(1.03); }

.work-tags {
  position: absolute;
  left: 12px;
  bottom: 12px;
  max-width: calc(100% - 64px);
  display: flex;
  gap: 10px;
  padding: 5px 9px;
  background: rgba(255, 255, 255, 0.94);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: var(--small);
  line-height: 1.4;
  color: var(--light);
  white-space: nowrap;
  overflow: hidden;
}
.work-tags b { color: var(--accent); font-weight: 400; }

.work-go {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  background: var(--surface);
  border-radius: 6px;
  font-size: 14px;
  color: var(--deep);
}

/* 个人优势 */
.strengths {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.strengths li {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 18px 22px;
  background: var(--bg);
  border-radius: 10px;
}
.strengths li > p:not(.num) { margin: 0; }

/* 核心技能 */
.skills { margin: 0; }
.skills > div { padding: 14px 0; border-bottom: 1px solid var(--line); }
.skills > div:first-child { padding-top: 0; }
.skills > div:last-child { border-bottom: 0; }
.skills dt { font-size: var(--h3); line-height: 1.35; font-weight: 500; color: var(--ink); }
.skills dd { margin: 4px 0 0; }

/* 联系 */
.cta {
  scroll-margin-top: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding-top: 10px;
  text-align: center;
}

/* ---------- 页脚 ---------- */
.footer { max-width: 1600px; margin: 10px auto 0; display: flex; flex-direction: column; gap: 10px; }

.footer-panels {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 10px;
  padding: 10px;
  background: var(--surface);
  border-radius: 10px;
}
.footer-panel {
  position: relative;
  overflow: hidden;
  min-height: 300px;
  padding: 36px 40px;
  border: 1.5px solid var(--bg);
  border-radius: 5px;
}

.mini-card {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 560px;
  padding: 10px;
  background: var(--bg);
  border-radius: 12px;
}
.mini-avatar img { width: 54px; height: 54px; object-fit: cover; border-radius: 8px; }
.mini-info { flex: 1; min-width: 0; }
.mini-name { margin: 0; font-size: var(--h3); line-height: 1.3; color: var(--ink); }
.mini-title { margin: 2px 0 0; font-family: var(--font-mono); font-size: var(--small); color: var(--accent); }

.footer-text { margin: 24px 0 18px; }
.footer-line { margin: 6px 0; color: var(--deep); }
.footer-line a { text-decoration: none; }
.footer-line a:hover { text-decoration: underline; }

.footer-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 24px;
}
.footer-links h2 { margin: 0 0 14px; font-size: var(--h3); font-weight: 500; }
.footer-links ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-links a { color: var(--grey); text-decoration: none; }
.footer-links a:hover { color: var(--accent); }
.glow {
  position: absolute;
  right: -130px;
  bottom: -150px;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 111, 33, 0.9) 0%, rgba(255, 111, 33, 0) 70%);
  pointer-events: none;
}

.footer-bar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 26px 40px;
  background: var(--surface);
  border-radius: 10px;
  box-shadow: inset 0 0 0 10px var(--surface), inset 0 0 0 11.5px var(--bg);
  font-size: 14px;
  color: var(--grey);
}
.footer-bar .icp { color: var(--light); text-decoration: none; }
.footer-bar .icp:hover { color: var(--grey); text-decoration: underline; }

/* ---------- 底部浮动导航 ---------- */
.dock {
  position: fixed;
  left: 50%;
  bottom: calc(22px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: max-content;   /* 不写的话，窄屏上导航条只有半屏宽，头像会被挤扁 */
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px 8px 8px;
  background: var(--surface);
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12), 0 1px 3px rgba(0, 0, 0, 0.08);
}
.dock a { padding: 8px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; white-space: nowrap; }
.dock a:hover { background: var(--bg); }
.dock .dock-avatar { flex: none; padding: 0; margin-right: 8px; }
.dock-avatar img { width: 46px; height: 46px; max-width: none; object-fit: cover; border-radius: 9px; }

/* ---------- 进场动画（系统设置了“减少动态效果”时关掉） ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.sidebar,
.main > * { animation: rise 0.6s ease both; }
.main > :nth-child(2) { animation-delay: 0.08s; }
.main > :nth-child(3) { animation-delay: 0.16s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after { animation: none !important; transition: none !important; }
}

/* ---------- 宽度适配 ---------- */
@media (max-width: 1199px) {
  .works,
  .strengths { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 1099px) {
  :root { --h1: 38px; --h2: 26px; }
  .page { grid-template-columns: minmax(300px, 1fr) minmax(0, 1.5fr); }
  .sidebar { height: auto; min-height: 0; padding: 30px; justify-content: flex-start; gap: 26px; }
  .profile-title { font-size: 14px; }
  .stat dd { font-size: 24px; }
}

/* 平板竖着拿（窄于 900）：改成上下一栏，左栏内容横向铺开 */
@media (max-width: 899px) {
  .page { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: static; padding: 30px 30px 34px; }
  .profile-card { grid-template-columns: 180px minmax(0, 1fr); max-width: 520px; }
  .profile-title { font-size: 15px; }
  .intro-text { max-width: 640px; }
  .stats { max-width: 560px; }
  .works,
  .strengths { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* 屏幕不够高时，左栏不再跟着滚动固定，免得下半截看不到 */
@media (max-height: 699px) {
  .sidebar { position: static; height: auto; min-height: 0; }
}

@media (max-width: 759px) {
  :root { --h1: 34px; --h2: 24px; --h3: 17px; --text: 15px; }
  body { padding: 12px 12px 110px; }
  .page { grid-template-columns: minmax(0, 1fr); padding: 8px; }
  .sidebar { position: static; padding: 22px 18px 26px; }
  .main { padding: 26px 18px 40px; gap: 48px; }
  .profile-card { grid-template-columns: 1fr 1.15fr; }
  .stats { gap: 10px; }
  .stat dd { font-size: 22px; }
  .stat dt { font-size: 11px; }
  .works,
  .strengths { grid-template-columns: minmax(0, 1fr); }
  .footer-panels { grid-template-columns: minmax(0, 1fr); padding: 8px; }
  .footer-panel { min-height: 0; padding: 24px 18px; }
  .footer-links { min-height: 220px; }
  .footer-bar { flex-direction: column; padding: 22px 26px; }
  .dock { bottom: calc(14px + env(safe-area-inset-bottom)); }
  .dock-avatar img { width: 40px; height: 40px; }
}
