/* ============================================================
   张旭瑞 · 作品集  —  设计系统
   深色高级感 / 跨境电商独立站风格
   ============================================================ */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: none; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* ---------- Tokens ---------- */
:root {
  --bg:            #080B10;
  --bg-soft:       #0C1118;
  --surface:       #111823;
  --surface-2:     #161F2C;
  --border:        rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);

  --text:          #E9EFF6;
  --text-soft:     #A8B4C4;
  --text-dim:      #68758A;

  --accent:        #2DD4BF;
  --accent-deep:   #14B8A6;
  --accent-2:      #6366F1;
  --accent-warm:   #F59E0B;
  --danger:        #F87171;

  --grad:          linear-gradient(120deg, #2DD4BF 0%, #6366F1 100%);
  --grad-soft:     linear-gradient(120deg, rgba(45,212,191,.16), rgba(99,102,241,.16));

  --radius-sm: 10px;
  --radius:    16px;
  --radius-lg: 24px;

  --shadow:    0 20px 50px -20px rgba(0, 0, 0, .8);
  --shadow-lg: 0 40px 100px -30px rgba(0, 0, 0, .9);

  --max: 1180px;
  --ease: cubic-bezier(.22, .61, .36, 1);

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
          "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: "SF Mono", "JetBrains Mono", Consolas, "Courier New", monospace;
}

/* ---------- Base ---------- */
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* 背景光晕 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(60vw 50vh at 15% -10%, rgba(45, 212, 191, .12), transparent 60%),
    radial-gradient(50vw 45vh at 90% 5%,  rgba(99, 102, 241, .10), transparent 60%);
}

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.section { position: relative; z-index: 1; padding: 96px 0; }
.section--tight { padding: 64px 0; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { line-height: 1.2; font-weight: 700; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.9rem); }
h2 { font-size: clamp(1.55rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.15rem; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .78rem; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: 16px;
}
.eyebrow::before {
  content: ""; width: 22px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent));
}

.lead { color: var(--text-soft); font-size: 1.05rem; max-width: 62ch; }
.muted { color: var(--text-dim); }

/* 渐变文字 */
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 26px; border-radius: 999px;
  font-size: .94rem; font-weight: 600;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease),
              background .25s, border-color .25s, opacity .25s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: var(--grad); color: #041013;
  box-shadow: 0 10px 30px -10px rgba(45, 212, 191, .6);
}
.btn--primary:hover { box-shadow: 0 16px 40px -12px rgba(45, 212, 191, .75); }

.btn--ghost {
  border: 1px solid var(--border-strong); color: var(--text);
  background: rgba(255, 255, 255, .03);
}
.btn--ghost:hover { background: rgba(255, 255, 255, .07); border-color: rgba(255,255,255,.28); }

.btn--sm { padding: 9px 18px; font-size: .85rem; }

/* ---------- Tags / Chips ---------- */
.tag {
  display: inline-block;
  padding: 5px 12px; border-radius: 999px;
  font-size: .76rem; font-weight: 500; letter-spacing: .02em;
  color: var(--text-soft);
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--border);
  white-space: nowrap;
}
.tag--accent { color: var(--accent); background: rgba(45,212,191,.10); border-color: rgba(45,212,191,.28); }
.tag--warm   { color: var(--accent-warm); background: rgba(245,158,11,.10); border-color: rgba(245,158,11,.28); }

/* ---------- Cards ---------- */
.card {
  position: relative;
  background: linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.012));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform .4s var(--ease), border-color .4s, box-shadow .4s;
}
.card:hover { border-color: var(--border-strong); transform: translateY(-4px); box-shadow: var(--shadow); }

.card--pad { padding: 28px; }

/* 顶部高光描边 */
.card--glow::after {
  content: ""; position: absolute; inset: -1px; border-radius: inherit;
  padding: 1px;
  background: linear-gradient(140deg, rgba(45,212,191,.5), transparent 40%, transparent 60%, rgba(99,102,241,.4));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0; transition: opacity .4s;
  pointer-events: none;
}
.card--glow:hover::after { opacity: 1; }

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0; transform: translateY(26px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; }
  html { scroll-behavior: auto; }
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ---------- Divider ---------- */
.hr {
  height: 1px; border: 0;
  background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
  margin: 0;
}

/* ---------- 回到顶部 / 作品集通用返回 ---------- */
.backbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 14px 24px;
  background: rgba(8, 11, 16, .82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.backbar a { font-size: .9rem; color: var(--text-soft); transition: color .2s; }
.backbar a:hover { color: var(--accent); }
.backbar .title { font-weight: 600; font-size: .95rem; }

/* ---------- Utility ---------- */
.grid { display: grid; gap: 20px; }
.flex { display: flex; }
.between { justify-content: space-between; }
.center { align-items: center; }
.wrap-gap { gap: 12px; flex-wrap: wrap; }
.text-c { text-align: center; }
.mt-s { margin-top: 10px; } .mt-m { margin-top: 20px; } .mt-l { margin-top: 36px; }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-deep, #060910); }
::-webkit-scrollbar-thumb { background: #24303F; border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: #33455A; }
