/* ===== 主题变量：黄白 ===== */
:root {
  --yellow: #ffc400;
  --yellow-deep: #f5a800;
  --yellow-soft: #fff3c4;
  --yellow-pale: #fffaf0;
  --cream: #fffdf6;
  --ink: #2b2410;
  --ink-soft: #6b6244;
  --white: #ffffff;
  --line: #f0e6c8;
  --shadow: 0 14px 40px rgba(245, 168, 0, 0.16);
  --shadow-soft: 0 8px 24px rgba(245, 168, 0, 0.10);
  --radius: 18px;
  --maxw: 1120px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ===== 导航 ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 253, 246, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav__logo {
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--yellow-deep);
  letter-spacing: 0.5px;
}
.nav__logo span { color: var(--ink); }
.nav__links { display: flex; gap: 26px; }
.nav__links a {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink-soft);
  position: relative;
  padding: 4px 0;
  transition: color 0.2s;
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 2px;
  background: var(--yellow);
  transition: width 0.25s;
}
.nav__links a:hover { color: var(--ink); }
.nav__links a:hover::after { width: 100%; }
.nav__toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--ink);
}

/* ===== Hero ===== */
.hero {
  position: relative;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 90px 24px 70px;
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 40px;
  align-items: center;
  overflow: hidden;
}
.hero__bg {
  position: absolute;
  inset: -20% -10% auto auto;
  width: 620px; height: 620px;
  background: radial-gradient(circle at 30% 30%, var(--yellow) 0%, var(--yellow-soft) 45%, transparent 70%);
  filter: blur(10px);
  opacity: 0.55;
  border-radius: 50%;
  z-index: -1;
}
.hero__eyebrow {
  color: var(--yellow-deep);
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-size: 0.85rem;
}
.hero__title {
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  line-height: 1.08;
  margin: 10px 0 14px;
  font-weight: 800;
}
.hero__title .accent {
  display: block;
  color: var(--yellow-deep);
}
.hero__subtitle {
  font-size: 1.15rem;
  color: var(--ink-soft);
  font-weight: 600;
}
.hero__desc {
  margin: 18px 0 28px;
  max-width: 520px;
  color: var(--ink-soft);
}
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero__stats {
  display: flex;
  gap: 36px;
  margin-top: 42px;
}
.stat { display: flex; flex-direction: column; }
.stat__num {
  font-size: 2rem;
  font-weight: 800;
  color: var(--yellow-deep);
}
.stat__label { font-size: 0.9rem; color: var(--ink-soft); }

.hero__avatar { display: flex; justify-content: center; }
.avatar-ring {
  width: 260px; height: 260px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--yellow), #fff, var(--yellow-soft), var(--yellow));
  padding: 10px;
  box-shadow: var(--shadow);
  animation: spin 14s linear infinite;
}
.avatar-face {
  width: 100%; height: 100%;
  border-radius: 50%;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.4rem;
  font-weight: 800;
  color: var(--yellow-deep);
}
@keyframes spin { to { transform: rotate(360deg); } }

.hero__scroll {
  position: absolute;
  bottom: 18px; left: 50%;
  transform: translateX(-50%);
  font-size: 1.8rem;
  color: var(--yellow-deep);
  animation: bob 1.8s ease-in-out infinite;
}
@keyframes bob { 0%,100%{ transform: translate(-50%,0);} 50%{ transform: translate(-50%,10px);} }

/* ===== 通用 section ===== */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 80px 24px;
}
.section--alt {
  max-width: none;
  background: var(--yellow-pale);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.section--alt > * { max-width: var(--maxw); margin-left: auto; margin-right: auto; }
.section__head { text-align: center; margin-bottom: 48px; }
.section__kicker {
  color: var(--yellow-deep);
  font-weight: 800;
  letter-spacing: 3px;
  font-size: 0.8rem;
}
.section__title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin-top: 6px;
  font-weight: 800;
}

/* ===== 关于 ===== */
.about {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 44px;
  align-items: center;
}
.about__text p { color: var(--ink-soft); margin-bottom: 16px; }
.about__list { list-style: none; margin-top: 18px; display: grid; gap: 10px; }
.about__list li { font-weight: 600; }
.about__cards { display: grid; gap: 16px; }
.card--soft {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow-soft);
  display: flex;
  gap: 16px;
  align-items: center;
  transition: transform 0.25s, box-shadow 0.25s;
}
.card--soft:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card__icon { font-size: 1.8rem; }
.card--soft h3 { font-size: 1.05rem; }
.card--soft p { color: var(--ink-soft); font-size: 0.92rem; }

/* ===== 技能 ===== */
.skills { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 48px; }
.skill__top {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  margin-bottom: 8px;
}
.bar {
  height: 12px;
  background: var(--yellow-soft);
  border-radius: 99px;
  overflow: hidden;
}
.bar__fill {
  height: 100%;
  width: 0;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--yellow-deep), var(--yellow));
  transition: width 1.2s cubic-bezier(.2,.8,.2,1);
}

/* ===== 作品 ===== */
.projects {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.project {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s, box-shadow 0.25s;
}
.project:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.project__thumb {
  height: 160px;
  background: var(--c, var(--yellow-soft));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}
.project__body { padding: 22px 24px 26px; }
.project__tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--yellow-deep);
  background: var(--yellow-soft);
  padding: 4px 10px;
  border-radius: 99px;
  margin-bottom: 10px;
}
.project__body h3 { font-size: 1.2rem; margin-bottom: 8px; }
.project__body p { color: var(--ink-soft); font-size: 0.94rem; margin-bottom: 14px; }
.project__link { color: var(--yellow-deep); font-weight: 700; }
.project__link:hover { text-decoration: underline; }

/* ===== 时间线 ===== */
.timeline { position: relative; padding-left: 28px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 7px; top: 6px; bottom: 6px;
  width: 3px;
  background: linear-gradient(var(--yellow), var(--yellow-soft));
  border-radius: 3px;
}
.tl-item { position: relative; margin-bottom: 30px; }
.tl-dot {
  position: absolute;
  left: -28px; top: 6px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--white);
  border: 4px solid var(--yellow);
  box-shadow: var(--shadow-soft);
}
.tl-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 22px;
  box-shadow: var(--shadow-soft);
}
.tl-year { color: var(--yellow-deep); font-weight: 800; font-size: 0.85rem; }
.tl-card h3 { font-size: 1.1rem; margin: 6px 0; }
.tl-card p { color: var(--ink-soft); font-size: 0.93rem; }

/* ===== 联系 ===== */
.contact {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 40px;
  align-items: start;
}
.contact__form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-soft);
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field--full { grid-column: 1 / -1; }
.field label { font-weight: 700; font-size: 0.9rem; }
.field input, .field textarea {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  background: var(--cream);
  color: var(--ink);
  resize: vertical;
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--yellow);
  box-shadow: 0 0 0 3px var(--yellow-soft);
}
.contact__hint { grid-column: 1 / -1; color: var(--yellow-deep); font-weight: 700; min-height: 1.2em; }
.contact__form .cf-turnstile { grid-column: 1 / -1; margin: 2px 0 4px; }
#submitBtn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  background: var(--yellow-soft);
  color: var(--ink-soft);
  transform: none;
  box-shadow: none;
}

.contact__side { display: grid; gap: 14px; }
.contact__item {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 18px;
  font-weight: 600;
  box-shadow: var(--shadow-soft);
}
.contact__item span { margin-right: 8px; }
.contact__socials { display: flex; gap: 10px; margin-top: 6px; }
.contact__socials a {
  flex: 1;
  text-align: center;
  background: var(--yellow-soft);
  color: var(--yellow-deep);
  font-weight: 700;
  padding: 10px 0;
  border-radius: 12px;
  transition: background 0.2s, transform 0.2s;
}
.contact__socials a:hover { background: var(--yellow); transform: translateY(-3px); }

/* ===== 按钮 ===== */
.btn {
  display: inline-block;
  font-weight: 700;
  border-radius: 99px;
  padding: 12px 26px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.18s, box-shadow 0.18s, background 0.2s;
}
.btn--primary {
  background: var(--yellow);
  color: var(--ink);
  box-shadow: var(--shadow-soft);
}
.btn--primary:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.btn--ghost { background: transparent; border-color: var(--yellow-deep); color: var(--yellow-deep); }
.btn--ghost:hover { background: var(--yellow-soft); }
.btn--block { grid-column: 1 / -1; width: 100%; border: none; }

/* ===== 页脚 ===== */
.footer {
  text-align: center;
  padding: 30px 24px;
  color: var(--ink-soft);
  background: var(--yellow-pale);
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
}

/* ===== 滚动出现动画 ===== */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.6s, transform 0.6s; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ===== 响应式 ===== */
@media (max-width: 860px) {
  .nav__links {
    position: fixed;
    top: 60px; right: 16px;
    flex-direction: column;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 16px 22px;
    box-shadow: var(--shadow);
    gap: 14px;
    transform: translateY(-10px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s;
  }
  .nav__links.is-open { opacity: 1; transform: none; pointer-events: auto; }
  .nav__toggle { display: block; }
  .hero { grid-template-columns: 1fr; text-align: center; padding-top: 60px; }
  .hero__content { order: 2; }
  .hero__avatar { order: 1; }
  .hero__desc { margin-left: auto; margin-right: auto; }
  .hero__actions, .hero__stats { justify-content: center; }
  .about, .skills, .projects, .contact { grid-template-columns: 1fr; }
  .contact__form { grid-template-columns: 1fr; }
}
