/* ================= 设计规范变量 ================= */
:root {
  --bg: #8A8D8F;          /* 纸质灰底 */
  --bg-deep: #6E7173;     /* 深灰分隔 */
  --card: #F5F4F0;        /* 米白卡片 */
  --primary: #4A7A9B;     /* 手绘蓝 */
  --accent: #E8A13D;      /* 暖橙 */
  --ink: #2B2B2B;         /* 正文深灰 */
  --radius: 16px;
  --shadow: 0 4px 16px rgba(0, 0, 0, .15);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, .22);
  --font-cn: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-en: "Baloo 2", var(--font-cn);
  --font-hand: "Caveat", cursive;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-cn);
  color: var(--ink);
  background-color: var(--bg);
  /* 纸张纤维质感 */
  background-image:
    repeating-linear-gradient(0deg, rgba(255,255,255,.025) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(0,0,0,.02) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse at 20% 10%, rgba(255,255,255,.10), transparent 55%),
    radial-gradient(ellipse at 85% 80%, rgba(0,0,0,.10), transparent 55%);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* ================= 导航 ================= */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px;
  transition: box-shadow .3s, background .3s;
}
.navbar.scrolled {
  background: rgba(245, 244, 240, .92);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
}
.logo {
  font-family: var(--font-en); font-weight: 800; font-size: 22px;
  color: var(--card); letter-spacing: 1px;
  background: var(--ink); padding: 4px 14px; border-radius: 999px;
  transform: rotate(-2deg); transition: transform .25s;
}
.logo:hover { transform: rotate(0deg) scale(1.05); }
.logo-dot { color: var(--accent); }
.nav-links { display: flex; gap: 10px; list-style: none; }
.nav-link {
  display: block; padding: 8px 18px; border-radius: 999px;
  font-weight: 700; font-size: 15px; color: var(--card);
  border: 2.5px solid rgba(245,244,240,.8);
  transition: all .25s;
}
.nav-link em { font-family: var(--font-hand); font-style: normal; font-size: 13px; opacity: .75; margin-left: 4px; }
.nav-link:hover { background: var(--card); color: var(--ink); border-color: var(--ink); transform: rotate(-2deg); }
.navbar.scrolled .nav-link { color: var(--ink); border-color: var(--ink); }
.navbar.scrolled .nav-link:hover { background: var(--ink); color: var(--card); }
.menu-btn { display: none; background: none; border: none; cursor: pointer; padding: 6px; position: relative; z-index: 102; }
.menu-btn span { display: block; width: 26px; height: 3px; background: var(--card); margin: 5px 0; border-radius: 2px; transition: .3s; }
.navbar.scrolled .menu-btn span { background: var(--ink); }

/* ================= Hero ================= */
.hero {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  position: relative; padding: 110px 24px 60px;
}
.hero-avatar-wrap { position: relative; width: 168px; margin: 0 auto 26px; }
.hero-avatar {
  width: 168px; height: 168px; object-fit: cover; border-radius: 50%;
  border: 4px solid var(--card); box-shadow: var(--shadow-lg);
  background: var(--card);
}
.doodle { position: absolute; }
.doodle-star { width: 44px; top: -16px; left: -40px; transform: rotate(-15deg); animation: twinkle 3s ease-in-out infinite; }
.doodle-arrow { width: 64px; bottom: -6px; right: -62px; }
@keyframes twinkle { 0%,100% { transform: rotate(-15deg) scale(1); } 50% { transform: rotate(-8deg) scale(1.12); } }
.hero-hello { font-family: var(--font-hand); font-size: 26px; color: var(--card); }
.hero-name { font-size: clamp(40px, 7vw, 64px); font-weight: 900; color: var(--card); line-height: 1.2; text-shadow: 0 3px 0 rgba(0,0,0,.18); }
.hero-en { display: block; font-family: var(--font-en); font-size: .42em; font-weight: 600; letter-spacing: 4px; color: var(--accent); text-transform: uppercase; }
.hero-role { margin-top: 14px; font-size: 21px; font-weight: 700; color: var(--card); background: var(--ink); display: inline-block; padding: 6px 22px; border-radius: 999px; transform: rotate(-1.5deg); }
.hero-role em { font-style: normal; font-family: var(--font-en); color: var(--accent); }
.hero-sub { margin: 16px 0 30px; color: rgba(245,244,240,.9); font-size: 16px; }
.btn-primary {
  display: inline-block; background: var(--accent); color: var(--ink);
  font-weight: 900; font-size: 17px; padding: 13px 36px; border-radius: 999px;
  border: 3px solid var(--ink); box-shadow: 0 5px 0 var(--ink);
  transition: transform .15s, box-shadow .15s;
}
.btn-primary:hover { transform: translateY(3px); box-shadow: 0 2px 0 var(--ink); }
.scroll-hint { position: absolute; bottom: 26px; animation: bounce 1.8s infinite; color: var(--card); }
@keyframes bounce { 0%,100% { transform: translateY(0); } 50% { transform: translateY(10px); } }

/* ================= 通用区块 ================= */
.section { padding: 96px 0; }
.section-dark { background: var(--bg-deep); box-shadow: inset 0 8px 24px rgba(0,0,0,.12), inset 0 -8px 24px rgba(0,0,0,.12); }
.section-title { font-size: clamp(30px, 4.5vw, 42px); font-weight: 900; color: var(--card); margin-bottom: 8px; position: relative; display: inline-block; }
.section-title::after {
  content: ""; position: absolute; left: 0; right: -8px; bottom: 2px; height: 10px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 12' preserveAspectRatio='none'%3E%3Cpath d='M2 8 C 20 3, 40 10, 60 6 C 80 2, 100 9, 118 5' fill='none' stroke='%23E8A13D' stroke-width='4' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
  z-index: -1; opacity: .9;
}
.section-title-en { display: block; font-family: var(--font-hand); font-size: .55em; font-weight: 600; color: rgba(245,244,240,.85); }
.section-sub { color: rgba(245,244,240,.85); margin-bottom: 44px; }

/* ================= 关于我 ================= */
.about-grid { display: grid; grid-template-columns: 320px 1fr; gap: 32px; align-items: start; margin-top: 20px; }
.about-card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 32px 28px; text-align: center; transform: rotate(-1deg);
}
.about-avatar { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; margin: 0 auto 16px; border: 4px solid var(--bg); }
.about-card h3 { font-size: 22px; }
.about-edu { font-weight: 700; margin-top: 6px; color: var(--primary); }
.about-edu-sub { font-size: 14px; color: #777; }
.about-points { list-style: none; margin-top: 18px; text-align: left; font-size: 14.5px; }
.about-points li { padding: 7px 0 7px 24px; position: relative; border-bottom: 1.5px dashed #d8d5cd; }
.about-points li::before { content: "✦"; position: absolute; left: 2px; color: var(--accent); }
.about-main { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 36px 40px; }
.about-intro { font-size: 17px; }
.skill-title { margin: 28px 0 14px; font-size: 18px; }
.skill-title em { font-family: var(--font-hand); font-style: normal; color: var(--primary); margin-left: 6px; }
.skill-tags { display: flex; flex-wrap: wrap; gap: 10px; }
.tag {
  padding: 7px 18px; border-radius: 999px; font-weight: 700; font-size: 14.5px;
  background: var(--ink); color: var(--card); transform: rotate(-1deg);
  transition: transform .2s;
}
.tag:nth-child(even) { transform: rotate(1.2deg); }
.tag:hover { transform: rotate(0) scale(1.08); background: var(--primary); }
.tag-line { background: transparent; color: var(--ink); border: 2.5px solid var(--ink); }
.tag-line:hover { background: var(--accent); border-color: var(--accent); }

/* ---- 关于我 v3：左栏(头像+信息+教育) / 右栏(能力 + 经历) ---- */
.about-layout { display: grid; grid-template-columns: 340px 1fr; gap: 28px; align-items: start; margin-top: 26px; }
.about-left, .about-right { display: flex; flex-direction: column; gap: 24px; }
.about-card { transform: none; background: transparent; box-shadow: none; border-radius: 0; padding: 8px 4px 0; }
.about-left .about-block { background: transparent; box-shadow: none; border-radius: 0; padding: 6px 4px 0; }
.about-card h3 { font-size: 26px; color: #fff; letter-spacing: 1px; text-shadow: 0 2px 6px rgba(0,0,0,.35); }
.about-avatar { width: 168px; height: 168px; border-width: 5px; border-color: rgba(255,255,255,.95); box-shadow: 0 10px 30px rgba(0,0,0,.28); }
.about-edu { font-weight: 700; margin-top: 6px; color: #FFD08A; font-size: 15px; }
.info-list { list-style: none; margin-top: 18px; text-align: left; font-size: 15px; color: #fff; }
.info-list li { padding: 9px 0; border-bottom: 1.5px dashed rgba(255,255,255,.35); display: flex; gap: 12px; align-items: baseline; }
.info-list li:last-child { border-bottom: none; }
.info-list b { flex: 0 0 68px; color: rgba(255,255,255,.62); font-weight: 500; }
.info-list a, .copy-inline { color: #FFFFFF; font-weight: 700; text-decoration: none; word-break: break-all; border-bottom: 1.5px dashed rgba(255,255,255,.6); }
.copy-inline { background: none; border: none; cursor: pointer; font-family: inherit; font-size: 15px; padding: 0; border-bottom: 1.5px dashed rgba(255,255,255,.6); }
.copy-inline:hover, .info-list a:hover { color: #FFD08A; border-color: #FFD08A; }
.about-block { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 30px 34px; }
.block-title { font-size: 19px; margin-bottom: 16px; position: relative; padding-left: 16px; }
.block-title::before { content: ""; position: absolute; left: 0; top: 4px; bottom: 4px; width: 6px; border-radius: 3px; background: var(--accent); }
.block-title em { font-family: var(--font-hand); font-style: normal; font-size: 14px; color: var(--primary); margin-left: 8px; }
.ability-list { list-style: none; font-size: 15px; }
.ability-list li { position: relative; padding: 7px 0 7px 26px; border-bottom: 1.5px dashed #e2dfd7; }
.ability-list li:last-child { border-bottom: none; }
.ability-list li::before { content: "■"; position: absolute; left: 0; top: 9px; color: var(--bg); font-size: 12px; }
.edu-item { padding: 12px 0; border-bottom: 1.5px dashed #e2dfd7; }
.edu-item:last-child { border-bottom: none; }
.about-left .edu-item { border-bottom-color: rgba(255,255,255,.35); }
.edu-item h5 { font-size: 16.5px; color: #fff; }
.edu-time { font-weight: 700; color: #FFD08A; font-size: 15px; }
.edu-major { color: rgba(255,255,255,.75); font-weight: 500; margin-left: 10px; font-size: 13.5px; }
.edu-desc { color: rgba(255,255,255,.85); font-size: 14.5px; margin-top: 2px; }
.exp-item { padding: 12px 0; border-bottom: 1.5px dashed #e2dfd7; }
.exp-item:last-child { border-bottom: none; }
.exp-item h5 { font-size: 16px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.exp-badge { font-size: 14px; font-weight: 700; color: var(--accent); background: none; border: none; border-radius: 0; padding: 0; white-space: nowrap; opacity: .8; }
.exp-item ul { margin: 8px 0 0 2px; list-style: none; font-size: 14px; color: #555; }
.exp-item ul li { position: relative; padding: 3px 0 3px 18px; }
.exp-item ul li::before { content: "·"; position: absolute; left: 4px; font-weight: 900; color: var(--primary); }
.exp-meta { display: flex; flex-wrap: wrap; gap: 16px; margin: 6px 0 2px; }
.exp-badge-line { color: var(--primary); background: none; border: none; font-weight: 600; opacity: .75; }

/* ================= 作品目录 ================= */
.works-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; }
.work-card {
  position: relative; display: block; background: var(--card);
  border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
  transition: transform .3s, box-shadow .3s;
}
.work-card:nth-child(odd) { transform: rotate(-.6deg); }
.work-card:nth-child(even) { transform: rotate(.6deg); }
.work-card:hover { transform: rotate(0) translateY(-8px); box-shadow: var(--shadow-lg); }
.work-num {
  position: absolute; top: 14px; left: 14px; z-index: 2;
  font-family: var(--font-en); font-weight: 800; font-size: 17px;
  background: var(--accent); border: 2.5px solid var(--ink);
  width: 46px; height: 46px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 0 var(--ink);
}
.work-thumb { height: 300px; overflow: hidden; background: #ddd; }
.work-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .5s; }
.work-card:hover .work-thumb img { transform: scale(1.05); }
.work-card h3 { font-size: 20px; padding: 20px 24px 0; }
.work-card h3 em { display: block; font-family: var(--font-en); font-style: normal; font-size: 13px; font-weight: 600; letter-spacing: 1.5px; color: var(--primary); text-transform: uppercase; }
.work-card p { padding: 8px 24px 0; font-size: 14.5px; color: #555; }
.work-more {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 16px 24px 22px; font-weight: 900; color: var(--accent);
}
.work-more svg { transition: transform .25s; }
.work-card:hover .work-more svg { transform: translateX(6px); }

/* ================= 联系我 ================= */
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; margin-top: 10px; }
.contact-card {
  position: relative; display: flex; flex-direction: column; align-items: center; text-align: center;
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 36px 24px; border: none; cursor: pointer; font-family: inherit;
  transition: transform .3s, box-shadow .3s;
}
.contact-card:nth-child(2) { transform: rotate(-.8deg); }
.contact-card:nth-child(3) { transform: rotate(.8deg); }
.contact-card:hover { transform: rotate(0) translateY(-6px); box-shadow: var(--shadow-lg); }
.contact-icon {
  width: 88px; height: 88px; border-radius: 50%; background: var(--bg);
  border: 3px solid var(--ink); display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px; transition: background .3s;
}
.contact-card:hover .contact-icon { background: var(--accent); }
.contact-actions { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; justify-content: center; }
.contact-mailto, .copy-mini {
  font-family: inherit; font-weight: 700; font-size: 14px; cursor: pointer;
  padding: 8px 18px; border-radius: 999px; border: 2.5px solid var(--ink);
  transition: transform .2s, background .2s; display: inline-flex; align-items: center; gap: 6px;
}
.contact-mailto { background: var(--accent); color: var(--ink); text-decoration: none; }
.copy-mini { background: transparent; color: var(--ink); }
.contact-mailto:hover { transform: translateY(-2px); }
.copy-mini:hover { background: var(--bg); }
.copy-inline.copied-flash { color: #FFD08A !important; border-color: #FFD08A !important; }
.contact-card h3 { font-size: 19px; }
.contact-card h3 em { font-family: var(--font-hand); font-style: normal; font-size: 14px; color: var(--primary); margin-left: 6px; }
.contact-value { margin-top: 8px; font-weight: 700; font-size: 16.5px; word-break: break-all; }
.contact-hint { margin-top: 10px; font-size: 13px; color: #888; }
.copy-toast {
  position: absolute; top: -14px; right: -10px;
  background: var(--primary); color: #fff; font-weight: 700; font-size: 13px;
  padding: 5px 14px; border-radius: 999px; border: 2px solid var(--ink);
  opacity: 0; transform: scale(.6) rotate(6deg); pointer-events: none;
  transition: opacity .25s, transform .25s;
}
.copy-toast.show { opacity: 1; transform: scale(1) rotate(6deg); }

/* ================= Footer ================= */
.footer { background: var(--ink); color: rgba(245,244,240,.85); text-align: center; padding: 26px 20px; font-size: 14px; }
.footer-en { display: block; font-family: var(--font-hand); font-size: 15px; opacity: .65; margin-top: 4px; }

/* ================= 详情页 ================= */
.workpage { min-height: 100vh; }
.workpage-hero { padding: 120px 24px 48px; text-align: center; }
.back-btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 700; color: var(--card); border: 2.5px solid var(--card);
  padding: 8px 22px; border-radius: 999px; margin-bottom: 30px; transition: all .25s;
}
.back-btn:hover { background: var(--card); color: var(--ink); transform: translateX(-4px); }
.workpage-title { font-size: clamp(28px, 5vw, 44px); font-weight: 900; color: var(--card); }
.workpage-en { font-family: var(--font-en); font-size: 17px; letter-spacing: 3px; color: var(--accent); text-transform: uppercase; margin-top: 6px; }
.workpage-desc { max-width: 720px; margin: 18px auto 0; color: rgba(245,244,240,.92); background: rgba(0,0,0,.18); padding: 14px 26px; border-radius: var(--radius); display: inline-block; }
.work-figure { max-width: 900px; margin: 0 auto; padding: 0 20px 60px; }
.work-figure img {
  width: 100%; border-radius: var(--radius); box-shadow: var(--shadow-lg);
  background: var(--card);
}
.img-fallback { display: none; background: var(--card); border-radius: var(--radius); padding: 60px 20px; text-align: center; color: #888; font-weight: 700; }
.work-nav { max-width: 900px; margin: 0 auto; padding: 0 20px 80px; display: flex; justify-content: space-between; gap: 16px; }
.work-nav a {
  flex: 1; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px 22px; font-weight: 700; transition: transform .25s;
}
.work-nav a:hover { transform: translateY(-4px); }
.work-nav a small { display: block; font-family: var(--font-hand); color: var(--primary); font-size: 14px; }
.work-nav a.next { text-align: right; }

/* ================= 入场动画 ================= */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ================= 响应式 ================= */
@media (max-width: 1024px) {
  .about-layout { grid-template-columns: 1fr; }
  .about-card { max-width: 460px; margin: 0 auto; }
}
@media (max-width: 768px) {
  .menu-btn { display: block; }
  .nav-links {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0; height: 100%;
    z-index: 101; background: rgba(43, 43, 43, 0.98);
    flex-direction: column; align-items: center; justify-content: center; gap: 26px;
    opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .3s, visibility .3s;
  }
  .nav-links.open { opacity: 1; visibility: visible; pointer-events: auto; }
  .nav-link { font-size: 22px; color: var(--card) !important; border-color: var(--card) !important; }
  body.menu-open { overflow: hidden; }
  body.menu-open .navbar { background: transparent; backdrop-filter: none; }
  .navbar { backdrop-filter: none; }
  body.menu-open .menu-btn span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  body.menu-open .menu-btn span:nth-child(2) { opacity: 0; }
  body.menu-open .menu-btn span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
  .works-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .section { padding: 72px 0; }
  .doodle-arrow { right: -40px; width: 48px; }
  .workpage-hero { padding-top: 100px; }
}
