/* ============================================================
   作品集 · 样式表
   简约 / 优雅 / 清新浅色 / 动画
   ============================================================ */

:root {
  --bg: #f6f8fc;
  --bg-soft: #eef2f8;
  --surface: rgba(255, 255, 255, 0.66);
  --surface-2: rgba(255, 255, 255, 0.92);
  --border: rgba(30, 41, 59, 0.08);
  --border-strong: rgba(30, 41, 59, 0.16);
  --text: #25303f;
  --text-dim: #5d6878;
  --text-faint: #97a1b0;
  --accent: #4fb3a4;   /* 清新薄荷绿 */
  --accent-2: #7c93e8; /* 优雅雾蓝紫 */
  --radius: 20px;
  --radius-sm: 12px;
  --maxw: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow: 0 24px 60px -24px rgba(79, 110, 160, 0.28);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", -apple-system,
    BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

::selection { background: rgba(79, 179, 164, 0.28); color: var(--text); }

/* ----------------------- 背景光晕 ----------------------- */
/* 性能要点：柔和感完全交给 radial-gradient 的渐变边缘实现，
   不对动画元素使用 filter:blur 或 mix-blend-mode，
   这样平移/缩放是纯 GPU 合成，不触发逐帧重栅格化。 */
.aurora {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  opacity: 0.7;
}
.aurora__blob {
  position: absolute;
  width: 60vw;
  height: 60vw;
  border-radius: 50%;
  will-change: transform;
  transform: translateZ(0);
  backface-visibility: hidden;
}
.aurora__blob--1 {
  background: radial-gradient(circle, rgba(143, 214, 197, 0.55), transparent 70%);
  top: -18%; left: -12%;
  animation: drift1 24s ease-in-out infinite alternate;
}
.aurora__blob--2 {
  background: radial-gradient(circle, rgba(168, 198, 244, 0.55), transparent 70%);
  top: 12%; right: -18%;
  animation: drift2 28s ease-in-out infinite alternate;
}
.aurora__blob--3 {
  background: radial-gradient(circle, rgba(221, 205, 240, 0.5), transparent 70%);
  bottom: -22%; left: 22%;
  animation: drift3 32s ease-in-out infinite alternate;
}
@keyframes drift1 { to { transform: translate3d(12vw, 10vh, 0) scale(1.18); } }
@keyframes drift2 { to { transform: translate3d(-10vw, 14vh, 0) scale(1.1); } }
@keyframes drift3 { to { transform: translate3d(6vw, -12vh, 0) scale(1.22); } }

/* 颗粒质感叠加 */
.grain {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ----------------------- 导航 ----------------------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(20px, 5vw, 56px);
  transition: padding .4s var(--ease), background .4s var(--ease),
    border-color .4s var(--ease), backdrop-filter .4s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  padding: 12px clamp(20px, 5vw, 56px);
  background: rgba(246, 248, 252, 0.72);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom-color: var(--border);
}
.nav__brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .5px; }
.nav__logo {
  display: block;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  box-shadow: 0 6px 16px -6px rgba(79, 179, 164, 0.55);
  transition: transform .4s var(--ease);
}
.nav__brand:hover .nav__logo { transform: rotate(-6deg) scale(1.08); }
.nav__links { display: flex; align-items: center; gap: clamp(14px, 3vw, 32px); }
.nav__links a { color: var(--text-dim); font-size: 15px; transition: color .25s; position: relative; }
.nav__links a:not(.nav__cta)::after {
  content: ""; position: absolute; left: 0; bottom: -6px;
  width: 0; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width .3s var(--ease);
}
.nav__links a:not(.nav__cta):hover { color: var(--text); }
.nav__links a:not(.nav__cta):hover::after { width: 100%; }
.nav__cta {
  padding: 9px 18px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--text) !important;
  transition: all .3s var(--ease);
}
.nav__cta:hover {
  background: var(--text);
  color: var(--bg) !important;
  transform: translateY(-2px);
}

/* ----------------------- 通用 ----------------------- */
.section-head { text-align: center; max-width: 640px; margin: 0 auto 56px; }
.section-title {
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.section-desc { color: var(--text-dim); margin-top: 14px; font-size: clamp(15px, 2vw, 17px); }

/* ----------------------- 英雄区 ----------------------- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px clamp(20px, 5vw, 56px) 80px;
  position: relative;
}
.hero__inner { max-width: 820px; }
.hero__eyebrow {
  font-size: 13px;
  letter-spacing: 0.35em;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 22px;
}
.hero__title {
  font-size: clamp(40px, 9vw, 88px);
  line-height: 1.02;
  font-weight: 850;
  letter-spacing: -0.03em;
}
.hero__title span { display: block; }
.hero__grad {
  background: linear-gradient(100deg, #3a9b8c 0%, #5e86d6 48%, #9a7fd4 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 6s linear infinite;
}
@keyframes shimmer { to { background-position: 200% center; } }
.hero__sub {
  margin: 28px auto 0;
  color: var(--text-dim);
  font-size: clamp(16px, 2.4vw, 20px);
  max-width: 560px;
}
.hero__actions { margin-top: 40px; display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), background .3s, border-color .3s;
  border: 1px solid transparent;
}
.btn--primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 10px 30px -8px rgba(79, 179, 164, 0.5);
}
.btn--primary:hover { transform: translateY(-3px); box-shadow: 0 16px 40px -8px rgba(124, 147, 232, 0.6); }
.btn--ghost { border-color: var(--border-strong); color: var(--text); }
.btn--ghost:hover { background: var(--surface-2); transform: translateY(-3px); }
.btn__arrow { transition: transform .3s var(--ease); }
.btn--primary:hover .btn__arrow { transform: translateY(3px); }

.hero__stats { margin-top: 56px; display: flex; gap: clamp(28px, 6vw, 64px); justify-content: center; }
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat b { font-size: clamp(28px, 5vw, 40px); font-weight: 800; letter-spacing: -0.02em; }
.stat span { font-size: 13px; color: var(--text-faint); letter-spacing: .04em; }

.hero__scroll { position: absolute; bottom: 34px; left: 50%; transform: translateX(-50%); }
.hero__mouse {
  display: block; width: 26px; height: 42px;
  border: 2px solid var(--border-strong); border-radius: 14px;
  position: relative;
}
.hero__mouse span {
  position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 8px; border-radius: 2px; background: var(--text-dim);
  animation: scroll 1.8s var(--ease) infinite;
}
@keyframes scroll { 0% { opacity: 0; top: 8px; } 30% { opacity: 1; } 100% { opacity: 0; top: 22px; } }

/* ----------------------- 作品区 ----------------------- */
.works { padding: clamp(70px, 12vw, 130px) clamp(20px, 5vw, 56px); max-width: var(--maxw); margin: 0 auto; }
.works__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 26px;
}

.work-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 34px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
  isolation: isolate;
  box-shadow: 0 14px 36px -22px rgba(79, 110, 160, 0.32);
  transition: transform .45s var(--ease), border-color .45s var(--ease),
    background .45s var(--ease), box-shadow .45s var(--ease);
}
/* 卡片顶部渐变光带（由 --c1/--c2 注入） */
.work-card::before {
  content: "";
  position: absolute; inset: 0;
  z-index: -1;
  background: radial-gradient(120% 80% at 0% 0%, var(--c1, #6366f1), transparent 55%);
  opacity: 0.14;
  transition: opacity .45s var(--ease);
}
.work-card::after {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--c1, #6366f1), var(--c2, #a855f7));
  transform: scaleX(0); transform-origin: left;
  transition: transform .5s var(--ease);
}
.work-card:hover {
  transform: translateY(-8px);
  border-color: var(--border-strong);
  background: var(--surface-2);
  box-shadow: 0 28px 56px -24px rgba(79, 110, 160, 0.4);
}
.work-card:hover::before { opacity: 0.28; }
.work-card:hover::after { transform: scaleX(1); }

.work-card__icon {
  width: 56px; height: 56px;
  border-radius: 16px;
  display: grid; place-items: center;
  margin-bottom: 22px;
  background: linear-gradient(135deg, var(--c1, #6366f1), var(--c2, #a855f7));
  box-shadow: 0 12px 28px -10px var(--c1, #6366f1);
  transition: transform .45s var(--ease);
}
.work-card:hover .work-card__icon { transform: scale(1.08) rotate(-4deg); }
.work-card__icon svg { width: 28px; height: 28px; stroke: #fff; fill: none; stroke-width: 1.8; }

/* 真实 logo 图标：去掉渐变底，让 logo 自身的圆角方块填满 */
.work-card__icon--img {
  background: none;
  padding: 0;
  overflow: hidden;
}
.work-card__icon--img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* 透明背景 logo：垫底色并留出内边距，居中完整显示 */
.work-card__icon--pad { padding: 9px; }
.work-card__icon--pad img { object-fit: contain; }

.work-card__name {
  font-size: 23px; font-weight: 750; letter-spacing: -0.01em;
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
}
.work-card__en { font-size: 13px; color: var(--text-faint); font-weight: 500; letter-spacing: .05em; }
.work-card__desc { color: var(--text-dim); margin-top: 12px; font-size: 15px; flex: 1; }

.work-card__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.tag {
  font-size: 12px; color: var(--text-dim);
  padding: 5px 11px; border-radius: 999px;
  background: rgba(79, 110, 160, 0.07); border: 1px solid var(--border);
}

.work-card__foot { display: flex; align-items: center; justify-content: space-between; margin-top: 24px; }
.work-card__link {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 600; font-size: 15px; color: var(--text);
}
.work-card__link svg { width: 16px; height: 16px; transition: transform .3s var(--ease); }
.work-card:hover .work-card__link svg { transform: translate(3px, -3px); }
.work-card__host { font-size: 12px; color: var(--text-faint); }

/* 让整张卡片可点击 */
.work-card__overlay { position: absolute; inset: 0; z-index: 1; }
.work-card__icon, .work-card__name, .work-card__en, .work-card__desc,
.work-card__tags, .work-card__foot { position: relative; z-index: 2; }
.work-card__foot { pointer-events: none; }

/* ----------------------- 关于区 ----------------------- */
.about { padding: 0 clamp(20px, 5vw, 56px) clamp(80px, 12vw, 130px); max-width: 860px; margin: 0 auto; }
.about__card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(34px, 6vw, 60px);
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.about__card::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(100% 120% at 50% 0%, rgba(79,179,164,.14), transparent 60%);
}
.about__card p { color: var(--text-dim); margin-top: 18px; font-size: clamp(15px, 2vw, 18px); }
.about__card strong { color: var(--text); }
.about__card em { color: var(--accent-2); font-style: normal; }
.about__hint { font-size: 14px !important; color: var(--text-faint) !important; }

/* ----------------------- 页脚 ----------------------- */
.footer {
  border-top: 1px solid var(--border);
  padding: 40px clamp(20px, 5vw, 56px);
  text-align: center;
  color: var(--text-faint);
  font-size: 14px;
}
.footer__contact { margin-top: 12px; }
.footer__contact a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-dim);
  font-size: 14px;
  transition: color .3s var(--ease), border-color .3s var(--ease),
    background .3s var(--ease), transform .3s var(--ease);
}
.footer__contact a svg { width: 16px; height: 16px; }
.footer__contact a:hover {
  color: var(--text);
  border-color: var(--border-strong);
  background: var(--surface-2);
  transform: translateY(-2px);
}
.footer__sub { margin-top: 12px; font-size: 13px; }

/* ----------------------- 滚动揭示动画 ----------------------- */
.reveal, .work-card {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
  transition-delay: var(--d, 0s);
}
.reveal.is-visible, .work-card.is-visible {
  opacity: 1;
  transform: none;
}

/* ----------------------- 响应式 ----------------------- */
@media (max-width: 760px) {
  .works__grid { grid-template-columns: 1fr; }
  .nav__name { display: none; }
  .hero__stats { flex-wrap: wrap; gap: 24px 36px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal, .work-card { opacity: 1; transform: none; }
}
