/* ============================================================
   廖持权 Strange · AI 产品经理 作品集
   纯静态 · 零依赖 · 手写
   ============================================================ */

:root {
  --void: #07080c;
  --panel: #10131a;
  --panel-2: #161a23;
  --panel-3: #1b2029;
  --line: #232833;
  --line-2: #2e3542;
  --brass: #c4894a;
  --gold: #e8c47a;
  --cyan: #6ee7f0;
  --mint: #7fe0b0;
  --rose: #e88b9a;
  --ink: #f0ebe3;
  --muted: #8a8f98;
  --dim: #5d636e;
  --serif: Georgia, "Songti SC", "SimSun", serif;
  --sans: "Segoe UI", "PingFang SC", "Microsoft YaHei", -apple-system, sans-serif;
  --mono: "SF Mono", "JetBrains Mono", Consolas, "Courier New", monospace;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  background: var(--void);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---------- 背景：网格 + 光斑 + 噪点 ---------- */
.bg-layer {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(900px 520px at 12% -8%, rgba(196,137,74,.09), transparent 62%),
    radial-gradient(820px 520px at 88% 4%, rgba(110,231,240,.06), transparent 62%),
    radial-gradient(700px 700px at 50% 110%, rgba(127,224,176,.045), transparent 65%);
}
.bg-grid {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.022) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 30%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 30%, transparent 78%);
}
.bg-noise {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: .028;
  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='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

.wrap { position: relative; z-index: 2; max-width: 1120px; margin: 0 auto; padding: 0 28px; }

.mono { font-family: var(--mono); }

/* ---------- 滚动进度条 ---------- */
.progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 0;
  background: linear-gradient(90deg, var(--brass), var(--gold), var(--cyan));
  z-index: 100; transition: width .1s linear;
}

/* ============ 导航 ============ */
nav {
  position: sticky; top: 0; z-index: 90;
  backdrop-filter: blur(16px) saturate(1.4);
  background: rgba(7,8,12,.72);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
nav.scrolled { border-bottom-color: var(--line); background: rgba(7,8,12,.88); }
.nav-in {
  max-width: 1120px; margin: 0 auto; padding: 14px 28px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.logo { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink); }
.logo-mark {
  width: 33px; height: 33px; border: 1px solid var(--brass); color: var(--gold);
  display: grid; place-items: center; font-size: 14px; font-family: var(--serif);
  flex-shrink: 0; transition: background .25s, color .25s;
}
.logo:hover .logo-mark { background: var(--brass); color: var(--void); }
.logo-txt { display: flex; flex-direction: column; line-height: 1.25; }
.logo-txt b { font-size: 14px; font-weight: 600; letter-spacing: .02em; }
.logo-txt span { font-size: 9.5px; color: var(--dim); letter-spacing: .14em; }

.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a {
  color: var(--muted); text-decoration: none; font-size: 13.5px;
  position: relative; transition: color .2s; padding: 3px 0;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 0;
  background: var(--gold); transition: width .28s var(--ease);
}
.nav-links a:hover, .nav-links a.active { color: var(--gold); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

.nav-cta {
  font-family: var(--mono); font-size: 11px; letter-spacing: .1em;
  border: 1px solid var(--line-2); color: var(--gold); text-decoration: none;
  padding: 7px 14px; transition: all .22s;
}
.nav-cta:hover { border-color: var(--brass); background: rgba(196,137,74,.1); }

@media (max-width: 780px) { .nav-links, .nav-cta { display: none; } }

/* ============ Hero ============ */
header.hero { padding: 104px 0 76px; position: relative; }

.status-pill {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); background: var(--panel);
  padding: 6px 14px; border-radius: 100px;
  font-size: 11.5px; color: var(--muted); letter-spacing: .04em;
  margin-bottom: 30px;
}
.status-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--mint);
  box-shadow: 0 0 0 0 rgba(127,224,176,.55);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(127,224,176,.5); }
  70%  { box-shadow: 0 0 0 8px rgba(127,224,176,0); }
  100% { box-shadow: 0 0 0 0 rgba(127,224,176,0); }
}

h1.title {
  font-family: var(--serif);
  font-size: clamp(40px, 6.4vw, 72px);
  line-height: 1.13;
  font-weight: 400;
  letter-spacing: -.015em;
  margin-bottom: 24px;
}
h1.title em {
  font-style: normal;
  background: linear-gradient(100deg, var(--gold) 8%, var(--brass) 52%, var(--cyan) 106%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

.lede {
  font-size: clamp(15px, 1.75vw, 18px);
  color: var(--muted); max-width: 660px; margin-bottom: 38px;
}
.lede strong { color: var(--ink); font-weight: 500; }

.hero-meta {
  display: flex; flex-wrap: wrap; gap: 24px 44px;
  padding-top: 28px; border-top: 1px solid var(--line);
  font-size: 12.5px; color: var(--dim);
}
.hero-meta div b { display: block; color: var(--ink); font-size: 15px; font-weight: 500; margin-top: 4px; }

/* ============ 通用分节 ============ */
section { padding: 76px 0; }
.sec-head { margin-bottom: 46px; }
.sec-label {
  font-family: var(--mono); font-size: 11px; letter-spacing: .2em;
  color: var(--brass); text-transform: uppercase; display: block; margin-bottom: 14px;
}
h2.sec-title {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(27px, 3.7vw, 40px); line-height: 1.24;
}
.sec-sub { color: var(--muted); font-size: 14.5px; margin-top: 13px; max-width: 640px; }

/* ============ 项目网格 ============ */
.projects { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 820px) { .projects { grid-template-columns: 1fr; } }

.card {
  background: linear-gradient(180deg, var(--panel) 0%, rgba(16,19,26,.55) 100%);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 26px;
  display: flex; flex-direction: column;
  transition: border-color .3s, transform .3s var(--ease), background .3s;
  position: relative; overflow: hidden;
  cursor: pointer;
}
.card::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(420px 220px at var(--mx, 50%) var(--my, 0%), rgba(196,137,74,.09), transparent 70%);
  opacity: 0; transition: opacity .35s;
}
.card::after {
  content: ""; position: absolute; left: 0; top: 0; height: 1px; width: 0;
  background: linear-gradient(90deg, var(--brass), var(--cyan));
  transition: width .5s var(--ease);
}
.card:hover { border-color: var(--line-2); background: var(--panel-2); transform: translateY(-4px); }
.card:hover::before { opacity: 1; }
.card:hover::after { width: 100%; }

.card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 15px; position: relative; }
.card-idx { font-family: var(--mono); font-size: 11px; color: var(--dim); letter-spacing: .1em; }
.card-en { font-family: var(--mono); font-size: 10.5px; color: var(--brass); letter-spacing: .1em; text-align: right; }

.card h3 { font-size: 19px; font-weight: 600; margin-bottom: 11px; letter-spacing: .01em; position: relative; }
.card p { color: var(--muted); font-size: 14px; flex-grow: 1; margin-bottom: 17px; position: relative; }

/* 项目封面图位 */
.card-cover {
  position: relative; margin: -26px -26px 20px; aspect-ratio: 16 / 9;
  overflow: hidden; border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, #141821 0%, #0d1015 100%);
  display: grid; place-items: center;
}
.card-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s var(--ease); }
.card:hover .card-cover img { transform: scale(1.04); }
.card-cover .ph {
  font-family: var(--mono); font-size: 11px; color: var(--dim);
  letter-spacing: .12em; text-align: center; line-height: 1.8; padding: 0 20px;
}
.card-cover .ph b { display: block; font-size: 26px; color: var(--line-2); font-family: var(--serif); letter-spacing: 0; margin-bottom: 6px; }

.tags { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 19px; position: relative; }
.tag {
  font-size: 11px; color: var(--muted); border: 1px solid var(--line);
  padding: 3.5px 9px; border-radius: 2px; background: rgba(255,255,255,.02);
  font-family: var(--mono); letter-spacing: .02em;
  transition: border-color .2s, color .2s;
}
.card:hover .tag { border-color: var(--line-2); }

.card-link {
  display: inline-flex; align-items: center; gap: 7px;
  color: var(--gold); text-decoration: none; font-size: 13.5px;
  border-bottom: 1px solid transparent; align-self: flex-start;
  transition: gap .2s, border-color .2s; position: relative;
}
.card-link:hover { gap: 11px; border-color: var(--brass); }
.card-link.dead { color: var(--dim); cursor: default; }
.card-link.dead:hover { gap: 7px; border-color: transparent; }

.badge-shot {
  font-size: 10px; font-family: var(--mono); color: var(--dim);
  border: 1px solid var(--line); padding: 2.5px 7px; border-radius: 2px;
  position: relative;
}

/* 冷启动提示 */
.cold-note {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 12px; color: #b99569; line-height: 1.55;
  background: rgba(196,137,74,.07);
  border: 1px solid rgba(196,137,74,.22);
  border-radius: 2px; padding: 9px 11px; margin-bottom: 15px;
  position: relative;
}
.cold-note .ico-cold { flex-shrink: 0; font-size: 12px; line-height: 1.5; }

/* 截图型卡片 */
.card.shot-card { grid-column: span 2; cursor: pointer; }
@media (max-width: 820px) { .card.shot-card { grid-column: span 1; } }
.shot-card .shot-body { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; align-items: center; position: relative; }
@media (max-width: 740px) { .shot-card .shot-body { grid-template-columns: 1fr; } }
.shot-img {
  width: 100%; border-radius: 3px; border: 1px solid var(--line);
  display: block; filter: saturate(.95);
}

/* ============ 亮点数据 ============ */
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
@media (max-width: 780px) { .metrics { grid-template-columns: 1fr 1fr; } }
.metric { background: var(--panel); padding: 28px 22px; transition: background .28s; }
.metric:hover { background: var(--panel-2); }
.metric b {
  display: block; font-family: var(--serif); font-size: 32px; font-weight: 400;
  color: var(--gold); line-height: 1.1; margin-bottom: 8px;
}
.metric span { font-size: 12.5px; color: var(--dim); line-height: 1.5; display: block; }

/* ============ 能力分栏 ============ */
.skills { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 880px) { .skills { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .skills { grid-template-columns: 1fr; } }
.skill { border-top: 1px solid var(--line); padding-top: 20px; transition: border-color .3s; }
.skill:hover { border-top-color: var(--brass); }
.skill h4 { font-size: 15px; font-weight: 600; margin-bottom: 13px; display: flex; align-items: center; gap: 9px; }
.skill h4 .k {
  font-family: var(--mono); font-size: 10px; color: var(--brass);
  border: 1px solid rgba(196,137,74,.35); padding: 1.5px 6px; border-radius: 2px;
}
.skill ul { list-style: none; }
.skill li { font-size: 13px; color: var(--muted); padding: 4.5px 0 4.5px 15px; position: relative; line-height: 1.55; }
.skill li::before {
  content: ""; position: absolute; left: 0; top: 12px;
  width: 5px; height: 1px; background: var(--dim);
}

/* ============ Q&A ============ */
.qa { border-top: 1px solid var(--line); }
.qa details { border-bottom: 1px solid var(--line); }
.qa summary {
  cursor: pointer; list-style: none; padding: 22px 0;
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  font-size: 15.5px; color: var(--ink); transition: color .2s;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary:hover { color: var(--gold); }
.qa summary .q {
  font-family: var(--mono); font-size: 11px; color: var(--brass);
  letter-spacing: .1em; margin-right: 15px;
}
.qa summary .ico {
  width: 19px; height: 19px; flex-shrink: 0; border: 1px solid var(--line);
  display: grid; place-items: center; color: var(--muted); font-size: 13px;
  transition: transform .25s, border-color .25s, color .25s; line-height: 1;
}
.qa details[open] summary .ico { transform: rotate(45deg); border-color: var(--brass); color: var(--gold); }
.qa .ans { padding: 0 0 26px 0; color: var(--muted); font-size: 14px; max-width: 780px; }
.qa .ans p + p { margin-top: 12px; }
.qa .ans strong { color: var(--ink); font-weight: 500; }
.qa .ans a { color: var(--gold); }

/* ============ 联系 ============ */
.contact { border: 1px solid var(--line); background: var(--panel); padding: 56px 44px; border-radius: 3px; text-align: center; position: relative; overflow: hidden; }
.contact::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(600px 300px at 50% 0%, rgba(196,137,74,.1), transparent 70%);
  pointer-events: none;
}
@media (max-width: 640px) { .contact { padding: 40px 24px; } }
.contact h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(25px, 3.5vw, 36px); margin-bottom: 14px; position: relative; }
.contact p { color: var(--muted); font-size: 14.5px; margin-bottom: 32px; position: relative; }
.contact-rows { display: flex; flex-wrap: wrap; gap: 13px; justify-content: center; position: relative; }
.cbtn {
  display: inline-flex; align-items: center; gap: 9px;
  border: 1px solid var(--line); background: var(--panel-2);
  color: var(--ink); text-decoration: none; padding: 11px 21px;
  font-size: 13.5px; border-radius: 2px; transition: all .22s var(--ease);
}
.cbtn:hover { border-color: var(--brass); color: var(--gold); transform: translateY(-2px); }
.cbtn.primary { background: var(--brass); border-color: var(--brass); color: #14100a; font-weight: 600; }
.cbtn.primary:hover { background: var(--gold); color: #14100a; }
.cbtn .lbl { font-family: var(--mono); font-size: 10px; color: var(--dim); letter-spacing: .1em; }
.cbtn.primary .lbl { color: rgba(20,16,10,.55); }

/* ============ 页脚 ============ */
footer {
  border-top: 1px solid var(--line); margin-top: 84px; padding: 36px 0 44px;
  display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap;
  font-size: 12px; color: var(--dim);
}
footer .fmono { font-family: var(--mono); letter-spacing: .04em; }

/* ============ 项目详情弹窗 ============ */
dialog.pd {
  border: none; padding: 0; background: transparent;
  max-width: min(760px, 92vw); width: 100%;
  max-height: 88vh; margin: auto;
}
dialog.pd::backdrop { background: rgba(4,5,8,.82); backdrop-filter: blur(6px); }
.pd-inner {
  background: var(--panel); border: 1px solid var(--line-2);
  border-radius: 4px; max-height: 88vh; overflow-y: auto;
  animation: pdIn .32s var(--ease);
}
@keyframes pdIn { from { opacity: 0; transform: translateY(16px) scale(.985); } to { opacity: 1; transform: none; } }
.pd-head {
  padding: 30px 32px 22px; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: var(--panel); z-index: 2;
}
.pd-kicker { font-family: var(--mono); font-size: 10.5px; color: var(--brass); letter-spacing: .14em; display: block; margin-bottom: 10px; }
.pd-head h3 { font-family: var(--serif); font-weight: 400; font-size: 26px; line-height: 1.3; }
.pd-close {
  position: absolute; top: 22px; right: 24px;
  width: 32px; height: 32px; border: 1px solid var(--line); background: var(--panel-2);
  color: var(--muted); cursor: pointer; font-size: 17px; line-height: 1;
  transition: all .2s;
}
.pd-close:hover { border-color: var(--brass); color: var(--gold); }
.pd-body { padding: 26px 32px 34px; }
.pd-body h4 {
  font-family: var(--mono); font-size: 11px; color: var(--brass);
  letter-spacing: .14em; text-transform: uppercase; margin: 24px 0 10px;
}
.pd-body h4:first-child { margin-top: 0; }
.pd-body p { color: var(--muted); font-size: 14px; margin-bottom: 11px; }
.pd-body p strong { color: var(--ink); font-weight: 500; }
.pd-body ul { list-style: none; }
.pd-body li { color: var(--muted); font-size: 13.5px; padding: 4px 0 4px 16px; position: relative; }
.pd-body li::before { content: ""; position: absolute; left: 0; top: 12px; width: 5px; height: 1px; background: var(--brass); }
.pd-foot { padding: 0 32px 30px; }
.pd-note { color: var(--dim); font-size: 12.5px; font-style: italic; }

/* ============ 入场动画 ============ */
.rise { opacity: 0; transform: translateY(24px); transition: opacity .75s var(--ease), transform .75s var(--ease); }
.rise.in { opacity: 1; transform: none; }
.rise.d1 { transition-delay: .08s; }
.rise.d2 { transition-delay: .16s; }
.rise.d3 { transition-delay: .24s; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .rise { opacity: 1; transform: none; }
}
