/* ============================================================
   个人作品集 — 样式表
   零外部依赖：不加载任何 CDN 字体或脚本，国内打开无需翻墙
   改颜色只需动下面 :root 里的变量
   ============================================================ */

:root {
  --bg:        #0e0e10;
  --bg-soft:   #16161a;
  --line:      #26262c;
  --ink:       #f4f4f1;
  --muted:     #8f8f96;
  --accent:    #d4ff3f;

  --maxw: 1200px;
  --gutter: clamp(20px, 5vw, 64px);
  --radius: 4px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --font: "Inter", "SF Pro Display", -apple-system, BlinkMacSystemFont,
          "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
          "Source Han Sans SC", sans-serif;
}

/* ---------- 基础重置 ---------- */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

::selection { background: var(--accent); color: #0e0e10; }

/* 键盘可达性 */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #0e0e10;
  padding: 12px 20px;
  z-index: 999;
  font-weight: 600;
}
.skip:focus { left: 12px; top: 12px; }

/* ---------- 导航 ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: background .35s var(--ease), border-color .35s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-stuck {
  background: rgba(14, 14, 16, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}

.nav__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 18px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav__logo {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}
.nav__logo span { color: var(--accent); }

.nav__links {
  display: flex;
  gap: 32px;
  font-size: 0.9rem;
}
.nav__links a {
  color: var(--muted);
  position: relative;
  transition: color .25s var(--ease);
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -6px;
  width: 100%; height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .35s var(--ease);
}
.nav__links a:hover { color: var(--ink); }
.nav__links a:hover::after { transform: scaleX(1); transform-origin: left; }

.nav__toggle {
  display: none;
  width: 40px; height: 40px;
  position: relative;
}
.nav__toggle span {
  position: absolute;
  left: 10px;
  width: 20px; height: 1.5px;
  background: var(--ink);
  transition: transform .3s var(--ease), opacity .3s var(--ease);
}
.nav__toggle span:first-child { top: 16px; }
.nav__toggle span:last-child  { top: 23px; }
.nav__toggle[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:last-child  { transform: translateY(-3.5px) rotate(-45deg); }

/* ---------- 首屏 ---------- */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  padding: 140px var(--gutter) 80px;
  overflow: hidden;
}

.hero__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  width: 100%;
  position: relative;
  z-index: 2;
}

.eyebrow {
  margin: 0 0 24px;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero__title {
  margin: 0;
  font-size: clamp(3.2rem, 13vw, 9.5rem);
  line-height: 0.92;
  letter-spacing: -0.045em;
  font-weight: 700;
}

.hero__lead {
  margin: 32px 0 0;
  max-width: 34ch;
  font-size: clamp(1rem, 1.6vw, 1.18rem);
  color: var(--muted);
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin-top: 40px;
  font-size: 0.85rem;
  color: var(--muted);
}
.hero__meta span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.hero__meta span::before {
  content: "";
  width: 5px; height: 5px;
  background: var(--accent);
  border-radius: 50%;
}

.hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 48px;
  padding: 14px 26px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.92rem;
  transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
.hero__cta svg {
  width: 16px; height: 16px;
  stroke: currentColor;
  stroke-width: 1.6;
  fill: none;
  transition: transform .35s var(--ease);
}
.hero__cta:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #0e0e10;
}
.hero__cta:hover svg { transform: translateY(3px); }

.hero__mark {
  position: absolute;
  right: -4vw;
  top: 50%;
  transform: translateY(-50%);
  font-size: clamp(16rem, 38vw, 34rem);
  line-height: 1;
  color: var(--accent);
  opacity: 0.055;
  pointer-events: none;
  z-index: 1;
  animation: spin 44s linear infinite;
}
@keyframes spin { to { transform: translateY(-50%) rotate(360deg); } }

/* ---------- 通用区块 ---------- */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(72px, 12vw, 150px) var(--gutter);
  border-top: 1px solid var(--line);
}

.section__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 24px 64px;
  align-items: end;
  margin-bottom: clamp(40px, 6vw, 72px);
}

.section__title {
  margin: 0;
  font-size: clamp(1.9rem, 4.2vw, 3.1rem);
  line-height: 1.1;
  letter-spacing: -0.035em;
  font-weight: 700;
}

.section__desc {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 46ch;
}

/* ---------- 作品网格 ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(28px, 4.5vw, 56px) clamp(20px, 3vw, 40px);
}

.card { display: block; }

.card__cover {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bg-soft);
  aspect-ratio: 4 / 3;
}
.card__cover img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .8s var(--ease), filter .5s var(--ease);
}
.card:hover .card__cover img {
  transform: scale(1.045);
}

.card__meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-top: 16px;
  border-top: 1px solid transparent;
  transition: border-color .4s var(--ease);
}
.card__meta h3 {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.card__meta p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
  white-space: nowrap;
}
.card:hover .card__meta { border-top-color: var(--line); }

/* ---------- 关于 ---------- */
.about {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}
.about__text p {
  margin: 0 0 20px;
  color: var(--muted);
  max-width: 52ch;
  font-size: 1rem;
}
.about__text .section__title { margin-bottom: 28px; color: var(--ink); }

.about__facts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.about__facts li {
  background: var(--bg);
  padding: 22px 26px;
  display: flex;
  align-items: baseline;
  gap: 16px;
}
.about__facts strong {
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--accent);
  line-height: 1;
}
.about__facts span {
  font-size: 0.85rem;
  color: var(--muted);
}

/* ---------- 联系 ---------- */
.section--contact { border-bottom: 1px solid var(--line); }

.contact { text-align: center; padding: clamp(20px, 4vw, 48px) 0; }

.contact__mail {
  display: inline-block;
  margin: 8px 0 40px;
  font-size: clamp(1.5rem, 5.5vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.15;
  position: relative;
  word-break: break-word;
}
.contact__mail::after {
  content: "";
  position: absolute;
  left: 0; bottom: 4px;
  width: 100%; height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .45s var(--ease);
}
.contact__mail:hover::after { transform: scaleX(1); transform-origin: left; }

.contact__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 28px;
}
.contact__links a {
  font-size: 0.88rem;
  color: var(--muted);
  padding-bottom: 2px;
  border-bottom: 1px solid var(--line);
  transition: color .25s var(--ease), border-color .25s var(--ease);
}
.contact__links a:hover {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

/* ---------- 页脚 ---------- */
.footer {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 32px var(--gutter) 48px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--muted);
}

/* ---------- 滚动渐入 ---------- */
/* 只有 JS 可用时才隐藏，避免脚本失效导致整页空白 */
.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
  .section__head { grid-template-columns: 1fr; align-items: start; }
  .about { grid-template-columns: 1fr; }
  .grid { grid-template-columns: 1fr; }
  .hero { min-height: 86vh; padding-top: 120px; }
  .hero__mark { font-size: 60vw; right: -18vw; opacity: 0.04; }

  .nav__toggle { display: block; }
  .nav__links {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 20px;
    display: none;
  }
  .nav__links.is-open { display: flex; }
  .nav__links a {
    padding: 14px 0;
    font-size: 1rem;
    border-bottom: 1px solid var(--line);
  }
  .nav__links a::after { display: none; }
  .nav.is-stuck { background: var(--bg); }
}

/* ---------- 尊重系统"减少动态效果" ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}

/* ---------- 打印 ---------- */
@media print {
  body { background: #fff; color: #000; }
  .nav, .hero__cta, .footer { display: none; }
  .js .reveal { opacity: 1; transform: none; }
}
