/* 光王的个人网站 v5 — 极简高级风（Apple / Tesla 设计语言）
   白底大留白、巨型标题、克制配色、边缘到边缘的"产品图"
   手写 CSS，无框架。 */

:root {
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --faint: #aeaeb2;
  --blue: #0071e3;
  --blue-hover: #0077ed;
  --link: #0066cc;
  --line: #d2d2d7;
  --nav-h: 52px;
  --radius: 30px;
  --font: "Noto Sans SC", -apple-system, BlinkMacSystemFont, "SF Pro Display",
          "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Consolas, monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

body {
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
ul, li { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

::selection { background: rgba(0, 113, 227, 0.15); }

.container { max-width: 980px; margin: 0 auto; padding: 0 22px; }
section[id] { scroll-margin-top: 76px; }

/* ---------- 导航（Apple 式半透明） ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(20px) saturate(1.8);
  -webkit-backdrop-filter: blur(20px) saturate(1.8);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.nav__inner {
  max-width: 980px;
  height: 100%;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.nav__logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.nav__logo img {
  width: 26px; height: 26px;
  border-radius: 7px;
  object-fit: cover;
}
.nav__links { display: flex; gap: 32px; }
.nav__links a {
  font-size: 13.5px;
  color: rgba(29, 29, 31, 0.75);
  transition: color 0.25s ease;
}
.nav__links a:hover,
.nav__links a.is-active { color: var(--ink); }

.nav__cta { font-size: 13.5px; color: var(--link); font-weight: 500; }
.nav__cta:hover { text-decoration: underline; text-underline-offset: 3px; }

.nav__burger {
  display: none;
  width: 36px; height: 36px;
  place-items: center;
  align-content: center;
  gap: 5px;
}
.nav__burger span {
  display: block;
  width: 16px; height: 1.5px;
  background: var(--ink);
  transition: transform 0.3s var(--ease);
}
.nav__burger.is-open span:nth-child(1) { transform: translateY(3.25px) rotate(45deg); }
.nav__burger.is-open span:nth-child(2) { transform: translateY(-3.25px) rotate(-45deg); }

/* ---------- 首屏 ---------- */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--nav-h) + 50px) 22px 70px;
}
.hero__avatar {
  width: 132px; height: 132px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 6px #fff, 0 24px 60px -18px rgba(0, 0, 0, 0.35);
  margin-bottom: 36px;
}
.hero__overline {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 14px;
}
.hero__name {
  font-size: clamp(60px, 10vw, 104px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.02;
  color: var(--ink);
}
.hero__roles {
  margin-top: 18px;
  font-family: var(--mono);
  font-size: 18px;
  color: var(--muted);
  min-height: 30px;
}
.caret { color: var(--blue); animation: blink 1.1s step-end infinite; margin-left: 2px; }
@keyframes blink { 50% { opacity: 0; } }

.hero__sub {
  max-width: 540px;
  margin: 20px auto 0;
  font-size: clamp(17px, 2.2vw, 21px);
  color: var(--muted);
  line-height: 1.55;
}
.hero__cta {
  margin-top: 38px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px 26px;
}

/* ---------- 按钮 / 文字链接 ---------- */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 980px;
  background: var(--blue);
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  transition: background 0.3s ease, transform 0.3s var(--ease);
}
.btn:hover { background: var(--blue-hover); transform: scale(1.02); }
.btn--lg { padding: 15px 34px; font-size: 17px; }

.text-link { color: var(--link); font-size: 16px; font-weight: 500; }
.text-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.text-link span { font-size: 18px; }

/* ---------- 分区通用 ---------- */
.section { padding: 120px 0; }
.band-bg { background: var(--bg-alt); }

.overline {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 12px;
}
.sec-head { text-align: center; margin-bottom: 60px; }
.sec-title {
  font-size: clamp(34px, 5vw, 52px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
}
.sec-sub {
  margin-top: 14px;
  color: var(--muted);
  font-size: clamp(16px, 2vw, 19px);
}

/* ---------- 三关键词带 ---------- */
.band { background: var(--bg-alt); padding: 110px 0; }
.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
  text-align: center;
}
.band-big {
  font-size: clamp(40px, 4.6vw, 56px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  background: linear-gradient(120deg, var(--ink) 55%, #4b5563);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.band-cap {
  margin-top: 10px;
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.6;
}

/* ---------- 作品 ---------- */
.works-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 26px;
}
.work { display: block; }

.work__media {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius);
  overflow: hidden;
  display: grid;
  place-items: center;
  transition: transform 0.5s var(--ease), box-shadow 0.5s ease;
}
.work:hover .work__media {
  transform: scale(1.015);
  box-shadow: 0 30px 70px -24px rgba(0, 0, 0, 0.35);
}
.work__media--graphite { background: linear-gradient(135deg, #3d3d41 0%, #1d1d1f 70%); }
.work__media--graphite::before {
  content: "";
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 34px 34px;
}
.work__media--paper { background: linear-gradient(135deg, #ececf1 0%, #c9c9d1 75%); }
.work__media--beam {
  background:
    repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.08) 0 2px, transparent 2px 42px),
    linear-gradient(135deg, #0a3d62 0%, #0a84ff 85%);
}
.work__media--wind {
  background:
    repeating-linear-gradient(105deg, rgba(255, 255, 255, 0.06) 0 3px, transparent 3px 34px),
    linear-gradient(135deg, #134e4a 0%, #2dd4bf 90%);
}
.work__ghost {
  font-size: clamp(56px, 8vw, 96px);
  font-weight: 900;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.12);
  user-select: none;
}
.work__ghost--light { color: rgba(29, 29, 31, 0.08); }

.work__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-top: 22px;
}
.work__title { font-size: 21px; font-weight: 700; letter-spacing: -0.01em; }
.work__arrow { color: var(--link); transition: transform 0.3s var(--ease); display: inline-block; }
.work--link:hover .work__arrow { transform: translateX(4px); }
.work__year { font-family: var(--mono); font-size: 12px; color: var(--faint); }
.work__desc { color: var(--muted); font-size: 15.5px; margin-top: 8px; }
.work__tech {
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--faint);
}

/* ---------- 足迹 ---------- */
.timeline { max-width: 640px; margin: 0 auto; }
.timeline li {
  position: relative;
  padding: 0 0 40px 30px;
  border-left: 1px solid var(--line);
}
.timeline li:last-child { padding-bottom: 4px; border-left-color: transparent; }
.timeline li::before {
  content: "";
  position: absolute;
  left: -5.5px; top: 9px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--ink);
}
.timeline time { font-family: var(--mono); font-size: 12.5px; color: var(--faint); letter-spacing: 0.05em; }
.timeline strong { display: block; margin-top: 4px; font-size: 18px; }
.timeline p { margin-top: 6px; font-size: 15px; color: var(--muted); }

/* ---------- 联系 ---------- */
.contact { text-align: center; padding-bottom: 20px; }
.contact .overline { margin-bottom: 12px; }
.contact__title {
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.contact__sub {
  max-width: 480px;
  margin: 18px auto 0;
  color: var(--muted);
  font-size: 17px;
}
.contact__actions {
  margin-top: 36px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 18px 28px;
}

/* ---------- 页脚 ---------- */
.footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
  padding: 26px 0 50px;
  font-size: 12.5px;
  color: var(--muted);
}
.footer__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
}
.footer__links { display: flex; flex-wrap: wrap; gap: 6px 24px; }
.footer__links a { color: #424245; }
.footer__links a:hover { text-decoration: underline; }
.footer__note { margin-top: 14px; color: var(--faint); }

/* ---------- 动效 ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s ease, transform 0.9s var(--ease);
  transition-delay: var(--d, 0s);
}
.js [data-reveal].is-visible { opacity: 1; transform: none; }

.js [data-anim] {
  opacity: 0;
  transform: translateY(22px);
  animation: rise 0.9s var(--ease) forwards;
  animation-delay: var(--d, 0s);
}
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
  .works-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 700px) {
  .nav__inner { padding: 0 16px; }
  .nav__links {
    position: fixed;
    top: calc(var(--nav-h) + 8px);
    left: 14px; right: 14px;
    z-index: 99;
    flex-direction: column;
    gap: 2px;
    padding: 12px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--line);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.14);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s var(--ease), visibility 0.3s;
  }
  .nav__links.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav__links a { padding: 13px 14px; font-size: 15.5px; border-radius: 12px; }
  .nav__links a:hover { background: var(--bg-alt); }
  .nav__burger { display: grid; }
  .nav__cta { display: none; }

  .section { padding: 84px 0; }
  .band { padding: 84px 0; }
  .hero { padding-bottom: 56px; }
  .hero__cta .btn { width: min(320px, 86vw); }
  .hero__cta .text-link { width: 100%; text-align: center; }
}

/* ---------- 降低动效偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .js [data-reveal], .js [data-anim] { opacity: 1 !important; transform: none !important; }
}
