/* ============================================================
   吕韦瑶 · 交互设计作品集
   深色玻璃拟态 · 零外部依赖
   ------------------------------------------------------------
   想换主色：改 --accent-1 / --accent-2
   ============================================================ */

:root {
  --bg: #08090c;
  --bg-soft: #0d0f14;
  --ink: #f2f3f7;
  --ink-dim: rgba(242, 243, 247, 0.62);
  --ink-faint: rgba(242, 243, 247, 0.38);

  --glass: rgba(255, 255, 255, 0.045);
  --glass-hi: rgba(255, 255, 255, 0.075);
  --line: rgba(255, 255, 255, 0.09);
  --line-hi: rgba(255, 255, 255, 0.18);

  --accent-1: #8b7cff;   /* 紫 */
  --accent-2: #4ed6e0;   /* 青 */
  --accent-3: #ff8ac2;   /* 粉 */

  --radius: 22px;
  --maxw: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

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

* { 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.75;
  letter-spacing: 0.01em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* 背景光斑 */
body::before {
  content: "";
  position: fixed;
  inset: -20%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(38% 32% at 18% 12%, rgba(139, 124, 255, 0.20), transparent 62%),
    radial-gradient(34% 30% at 84% 22%, rgba(78, 214, 224, 0.14), transparent 64%),
    radial-gradient(42% 36% at 62% 92%, rgba(255, 138, 194, 0.11), transparent 66%);
  filter: blur(18px);
  animation: drift 26s ease-in-out infinite alternate;
}

/* 细颗粒噪点 */
body::after {
  content: "";
  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='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

@keyframes drift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(-3%, 2.5%, 0) scale(1.08); }
}

main, .nav, .footer { position: relative; z-index: 2; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
::selection { background: rgba(139, 124, 255, 0.35); color: #fff; }

/* 滚动条 */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 99px;
  border: 3px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.2); }

/* ============ 鼠标光晕 ============ */
.glow {
  position: fixed;
  top: 0; left: 0;
  width: 520px; height: 520px;
  margin: -260px 0 0 -260px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.6s ease;
  background: radial-gradient(circle, rgba(139, 124, 255, 0.16), rgba(78, 214, 224, 0.06) 42%, transparent 68%);
  will-change: transform;
}
.glow.on { opacity: 1; }

/* ============ 进度条 ============ */
.progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px; width: 0;
  z-index: 60;
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2), var(--accent-3));
  box-shadow: 0 0 14px rgba(139, 124, 255, 0.55);
  transition: width 0.12s linear;
}

/* ============ 导航 ============ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px clamp(20px, 5vw, 56px);
  transition: padding 0.4s var(--ease), background 0.4s ease, border-color 0.4s ease, backdrop-filter 0.4s ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  padding-top: 12px;
  padding-bottom: 12px;
  background: rgba(8, 9, 12, 0.66);
  border-bottom-color: var(--line);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
}
.nav__logo {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.16em;
}
.nav__logo span {
  color: var(--ink-faint);
  font-weight: 500;
  margin-left: 2px;
  letter-spacing: 0.2em;
}
.nav__links { display: flex; gap: clamp(16px, 3vw, 34px); }
.nav__links a {
  position: relative;
  font-size: 14px;
  color: var(--ink-dim);
  padding: 4px 0;
  transition: color 0.3s ease;
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s var(--ease);
}
.nav__links a:hover,
.nav__links a.active { color: var(--ink); }
.nav__links a:hover::after,
.nav__links a.active::after { transform: scaleX(1); }

/* ============ HERO ============ */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 0 clamp(20px, 5vw, 56px);
  max-width: var(--maxw);
  margin: 0 auto;
  position: relative;
}

.hero__eyebrow {
  margin: 0 0 clamp(14px, 3vw, 26px);
  font-size: 12px;
  letter-spacing: 0.42em;
  color: var(--ink-faint);
  text-transform: uppercase;
}

.hero__title {
  margin: 0;
  font-size: clamp(3rem, 10.5vw, 7.4rem);
  line-height: 1.04;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.hero__title .line {
  display: inline-block;
  background: linear-gradient(105deg, #ffffff 6%, #d8d2ff 34%, #9ae8f0 66%, #ffffff 98%);
  background-size: 240% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: sheen 9s ease-in-out infinite;
}
@keyframes sheen {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

.hero__sub {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: clamp(20px, 4vw, 32px) 0 0;
  font-size: clamp(14px, 1.6vw, 17px);
  color: var(--ink-dim);
}
.hero__sub-en {
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--ink);
}
.hero__sub .dot { color: var(--accent-1); }

.hero__desc {
  margin: clamp(18px, 3vw, 28px) 0 0;
  max-width: 620px;
  color: var(--ink-dim);
  font-size: clamp(14px, 1.5vw, 16px);
  text-wrap: pretty;
}
.hero__desc span { display: block; }

.hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: clamp(30px, 5vw, 44px);
  padding: 13px 26px;
  border-radius: 99px;
  border: 1px solid var(--line-hi);
  background: var(--glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  font-size: 14px;
  font-weight: 500;
  transition: transform 0.45s var(--ease), background 0.4s ease, border-color 0.4s ease, box-shadow 0.45s ease;
}
.hero__cta svg { transition: transform 0.45s var(--ease); }
.hero__cta:hover {
  transform: translateY(-2px);
  background: var(--glass-hi);
  border-color: rgba(255, 255, 255, 0.32);
  box-shadow: 0 18px 44px -20px rgba(139, 124, 255, 0.7);
}
.hero__cta:hover svg { transform: translateY(3px); }

.hero__scroll {
  position: absolute;
  bottom: 34px;
  left: clamp(20px, 5vw, 56px);
  width: 22px;
  height: 36px;
  border: 1px solid var(--line-hi);
  border-radius: 99px;
  display: flex;
  justify-content: center;
  padding-top: 7px;
}
.hero__scroll span {
  width: 3px; height: 7px;
  border-radius: 99px;
  background: var(--ink-dim);
  animation: scrollDot 2s ease-in-out infinite;
}
@keyframes scrollDot {
  0%, 100% { transform: translateY(0); opacity: 0.35; }
  50%      { transform: translateY(11px); opacity: 1; }
}

/* ============ 滚动文字条 ============ */
.ticker {
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
  background: rgba(255, 255, 255, 0.014);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.ticker__track {
  display: flex;
  align-items: center;
  gap: 28px;
  width: max-content;
  animation: ticker 34s linear infinite;
}
.ticker__track span {
  font-size: clamp(13px, 1.5vw, 15px);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-dim);
  white-space: nowrap;
}
.ticker__track i {
  color: var(--accent-1);
  font-style: normal;
  font-size: 11px;
  opacity: 0.7;
}
@keyframes ticker {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.ticker:hover .ticker__track { animation-play-state: paused; }

/* ============ 通用 section ============ */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(72px, 12vw, 150px) clamp(20px, 5vw, 56px);
}
.section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: clamp(34px, 5vw, 64px);
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.section__title {
  margin: 0;
  font-size: clamp(1.7rem, 4vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.section__title span {
  display: inline-block;
  margin-left: 12px;
  font-size: 0.46em;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-faint);
  vertical-align: middle;
}
.section__count {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--ink-faint);
}

/* ============ 作品网格 ============ */
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 2.4vw, 28px);
}
.card--wide { grid-column: span 2; }

.card {
  display: block;
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--glass);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  overflow: hidden;
  transition: transform 0.55s var(--ease), border-color 0.45s ease, box-shadow 0.55s ease, background 0.45s ease;
  transform: translateY(0);
  will-change: transform;
}
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.075), transparent 62%);
  opacity: 0;
  transition: opacity 0.5s ease;
}
.card:hover {
  border-color: var(--line-hi);
  background: var(--glass-hi);
  box-shadow: 0 30px 70px -34px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(139, 124, 255, 0.14);
}
.card:hover::after { opacity: 1; }

.card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: linear-gradient(140deg, #14161d, #0b0c10 60%, #101218);
}
.card--wide .card__media { aspect-ratio: 16 / 8; }

.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s var(--ease), filter 0.6s ease;
  filter: saturate(0.94);
}
.card:hover .card__media img {
  transform: scale(1.055);
  filter: saturate(1.06);
}

/* 占位（图片不存在时显示） */
.card__ph {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background:
    radial-gradient(120% 100% at 20% 0%, rgba(139, 124, 255, 0.14), transparent 60%),
    linear-gradient(140deg, #13151c, #0a0b0f);
  border-bottom: 1px solid transparent;
}
.card__ph::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.13);
  border-radius: 14px;
}
.ph__num {
  position: relative;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 800;
  line-height: 1;
  color: rgba(255, 255, 255, 0.10);
  letter-spacing: -0.02em;
}
.ph__hint {
  position: relative;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: rgba(255, 255, 255, 0.24);
}
.card:has(img) .card__ph { display: none; }

.card__info { padding: clamp(16px, 2vw, 24px) clamp(18px, 2.4vw, 28px) clamp(20px, 2.6vw, 30px); }

/* 卡片右上角标签：在线试玩 */
.card__badge {
  position: absolute;
  top: 14px; right: 14px;
  z-index: 3;
  padding: 6px 13px;
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: #fff;
  border-radius: 99px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(10, 11, 15, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}
.card:hover .card__badge { opacity: 1; transform: none; }
@media (hover: none) {
  .card__badge { opacity: 1; transform: none; }
}
.card__meta {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.card__meta i { width: 3px; height: 3px; border-radius: 50%; background: currentColor; }
.card__title {
  margin: 10px 0 6px;
  font-size: clamp(1.02rem, 1.8vw, 1.3rem);
  font-weight: 600;
  letter-spacing: 0;
  transition: color 0.35s ease;
}
.card:hover .card__title { color: #fff; }
.card__desc {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink-dim);
  line-height: 1.7;
}

/* ============ 关于 ============ */
.about { padding-bottom: clamp(36px, 5vw, 64px); }
.about__grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: clamp(30px, 6vw, 80px);
  align-items: start;
}
.about__text p {
  margin: 0 0 18px;
  color: var(--ink-dim);
  max-width: 52ch;
}
.about__text .lead {
  font-size: clamp(1.2rem, 2.4vw, 1.75rem);
  line-height: 1.55;
  color: var(--ink);
  margin-bottom: 24px;
}
.about__text .lead strong {
  font-weight: 700;
  background: linear-gradient(100deg, var(--accent-1), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.link-arrow {
  display: inline-block;
  margin-top: 8px;
  font-size: 14px;
  color: var(--ink);
  border-bottom: 1px solid var(--line-hi);
  padding-bottom: 2px;
  transition: border-color 0.35s ease, transform 0.35s var(--ease);
}
.link-arrow:hover { border-color: var(--accent-2); transform: translateX(4px); }

.skill-group { margin-bottom: 30px; }
.skill-group h4 {
  margin: 0 0 14px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.chips li {
  padding: 6px 14px;
  font-size: 13px;
  border-radius: 99px;
  border: 1px solid var(--line);
  background: var(--glass);
  color: var(--ink-dim);
  transition: color 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}
.chips li:hover {
  color: var(--ink);
  border-color: var(--line-hi);
  background: var(--glass-hi);
}

.facts { margin: 34px 0 0; padding: 0; display: grid; gap: 12px; }
.facts > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
}
.facts dt { color: var(--ink-faint); }
.facts dd { margin: 0; color: var(--ink); display: flex; align-items: center; gap: 7px; }
.pulse {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #4be08a;
  box-shadow: 0 0 0 0 rgba(75, 224, 138, 0.6);
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(75, 224, 138, 0.55); }
  70%  { box-shadow: 0 0 0 9px rgba(75, 224, 138, 0); }
  100% { box-shadow: 0 0 0 0 rgba(75, 224, 138, 0); }
}

/* ============ 联系 ============ */
.contact {
  padding-bottom: clamp(60px, 10vw, 120px);
}
.contact__inner {
  position: relative;
  padding: clamp(38px, 7vw, 86px) clamp(24px, 5vw, 64px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    radial-gradient(90% 130% at 12% 0%, rgba(139, 124, 255, 0.16), transparent 58%),
    radial-gradient(80% 120% at 92% 100%, rgba(78, 214, 224, 0.13), transparent 60%),
    rgba(255, 255, 255, 0.035);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  overflow: hidden;
}
.contact__eyebrow {
  margin: 0 0 18px;
  font-size: 11px;
  letter-spacing: 0.36em;
  color: var(--ink-faint);
}
.contact__title {
  margin: 0 0 clamp(26px, 4vw, 40px);
  font-size: clamp(1.9rem, 5vw, 3.4rem);
  line-height: 1.18;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.contact__mail {
  display: inline-block;
  font-size: clamp(1.05rem, 2.6vw, 1.6rem);
  font-weight: 500;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--line-hi);
  transition: color 0.35s ease, border-color 0.35s ease, transform 0.35s var(--ease);
}
.contact__mail:hover {
  color: var(--accent-2);
  border-color: var(--accent-2);
  transform: translateY(-2px);
}
.contact__links {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  list-style: none;
  margin: clamp(30px, 5vw, 48px) 0 0;
  padding: 0;
}
.contact__links a {
  font-size: 13.5px;
  color: var(--ink-dim);
  transition: color 0.3s ease;
}
.contact__links a:hover { color: var(--ink); }

/* ============ 页脚 ============ */
.footer {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 28px clamp(20px, 5vw, 56px) 40px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
}
.footer p { margin: 0; }

/* ============ 入场动画（仅在 JS 可用时隐藏，避免脚本失效白屏） ============ */
.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.js .reveal.in { opacity: 1; transform: none; }

/* ============ 响应式 ============ */
@media (max-width: 860px) {
  .grid { grid-template-columns: 1fr; }
  .card--wide { grid-column: span 1; }
  .card--wide .card__media { aspect-ratio: 4 / 3; }
  .about__grid { grid-template-columns: 1fr; }
  .nav__links { gap: 18px; }
  .hero__scroll { display: none; }
}

@media (max-width: 520px) {
  body { font-size: 15px; }
  .nav__logo span { display: none; }
  .section__head { flex-direction: column; align-items: flex-start; gap: 8px; }
  .footer { flex-direction: column; }
}

/* ============ 无障碍 / 省电模式 ============ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal, .js .reveal { opacity: 1; transform: none; }
  .glow { display: none; }
}

:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
  border-radius: 4px;
}
