/* ============================================================
   王凯乐 · 个人作品集
   风格复刻：michaelpumo.com — 极简大字排版 / 深色主题 / 跑马灯
   ============================================================ */

:root {
  --bg: #0e0e0e;
  --bg-soft: #151515;
  --bg-card: #1a1a1a;
  --text: #ececec;
  --text-dim: #8f8f8f;
  --text-faint: #5a5a5a;
  --line: #262626;
  --accent: #c8b48a;
  --radius: 14px;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --font: "Inter", "HarmonyOS Sans SC", "MiSans", "PingFang SC", "Microsoft YaHei", -apple-system, "Segoe UI", sans-serif;
}

html.light {
  --bg: #f4f2ee;
  --bg-soft: #eceae4;
  --bg-card: #ffffff;
  --text: #171717;
  --text-dim: #6b6b6b;
  --text-faint: #a5a5a5;
  --line: #dcd9d2;
}

html.flipped body { transform: rotate(180deg); }

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  accent-color: var(--accent);
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
  transition: background .45s var(--ease), color .45s var(--ease), transform .6s var(--ease);
  overflow-x: hidden;
}

::selection { background: var(--accent); color: #0e0e0e; }

.container {
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
}

/* ---------- 顶部状态栏 ---------- */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-size: 13px;
}

.dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2.2s infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent); }
  50%      { box-shadow: 0 0 0 6px transparent; }
}

.topbar-status { color: var(--text-dim); font-size: 12.5px; letter-spacing: .04em; }

.topbar-nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

.topbar-nav a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 13px;
  letter-spacing: .03em;
  transition: color .25s;
}

.topbar-nav a:hover { color: var(--text); }

.topbar-cta {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 16px;
  transition: border-color .25s, color .25s, transform .25s;
}

.topbar-cta:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

/* ---------- HERO ---------- */
.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 120px 0 80px;
}

.hero-title {
  font-size: clamp(44px, 8.4vw, 118px);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -.03em;
  text-wrap: balance;
}

.hero-title .line { display: block; }
.hero-title .accent { color: var(--accent); }

.hero-bottom {
  margin-top: 56px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}

.hero-sub {
  max-width: 520px;
  color: var(--text-dim);
  font-size: 17px;
}

.hero-sub b { color: var(--text); font-weight: 600; }

.hero-actions {
  display: flex;
  align-items: center;
  gap: 28px;
}

/* ---------- 链接与按钮 ---------- */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 3px;
  transition: gap .25s var(--ease), color .25s;
}

.link-arrow:hover { gap: 14px; color: var(--accent); }

.link-plain {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 13.5px;
  transition: color .25s;
}

.link-plain:hover { color: var(--text); }

.btn {
  display: inline-block;
  margin-top: 36px;
  padding: 14px 30px;
  background: var(--accent);
  color: #0e0e0e;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  border-radius: 999px;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px -10px color-mix(in srgb, var(--accent) 60%, transparent);
}

/* ---------- 区块通用 ---------- */
.section { padding: clamp(90px, 12vw, 150px) 0; }

.section-muted {
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-label {
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 22px;
}

.section-title {
  font-size: clamp(30px, 4.6vw, 56px);
  font-weight: 650;
  line-height: 1.14;
  letter-spacing: -.02em;
}

.section-intro {
  max-width: 560px;
  color: var(--text-dim);
  font-size: 17px;
  margin-top: 20px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(40px, 6vw, 90px);
  align-items: start;
}

.lead {
  font-size: clamp(20px, 2.4vw, 26px);
  font-weight: 550;
  line-height: 1.45;
  margin-bottom: 20px;
  letter-spacing: -.01em;
}

.body-text {
  color: var(--text-dim);
  font-size: 16px;
  margin-bottom: 16px;
}

/* ---------- 照片 ---------- */
.portrait-wrap {
  position: relative;
  margin: 36px 0 8px;
  width: min(340px, 100%);
}

.portrait {
  width: 100%;
  display: block;
  border-radius: var(--radius);
  filter: grayscale(.25) contrast(1.02);
  transition: filter .5s var(--ease), transform .5s var(--ease);
}

.portrait:hover { filter: grayscale(0); transform: scale(1.015); }

.portrait-caption {
  position: absolute;
  bottom: 12px; left: 12px;
  font-size: 11px;
  letter-spacing: .14em;
  color: #fff;
  background: rgba(0, 0, 0, .45);
  backdrop-filter: blur(6px);
  padding: 5px 10px;
  border-radius: 6px;
}

/* ---------- 跑马灯 ---------- */
.marquee-section {
  padding: 44px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.marquee-track {
  display: flex;
  align-items: center;
  gap: 34px;
  width: max-content;
  animation: marquee 30s linear infinite;
}

.marquee:hover .marquee-track { animation-play-state: paused; }

.marquee-track span {
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 550;
  letter-spacing: -.01em;
  white-space: nowrap;
  color: var(--text-dim);
  transition: color .3s;
}

.marquee-track span:hover { color: var(--accent); }

.marquee-track i { color: var(--accent); font-style: normal; font-size: 18px; }

@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* ---------- 能力区块 ---------- */
.cap-block {
  padding: 54px 0;
  border-bottom: 1px solid var(--line);
}

.cap-block:first-of-type { margin-top: 8px; border-top: 1px solid var(--line); }

.cap-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  font-size: clamp(26px, 3.6vw, 44px);
  font-weight: 640;
  letter-spacing: -.02em;
  margin-bottom: 18px;
}

.cap-index {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: .16em;
  color: var(--text-faint);
  text-transform: uppercase;
  white-space: nowrap;
}

.cap-desc {
  max-width: 640px;
  color: var(--text-dim);
  font-size: 16px;
  margin-bottom: 28px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
}

.tag-list li {
  font-size: 13px;
  color: var(--text-dim);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 16px;
  transition: color .25s, border-color .25s, transform .25s;
}

.tag-list li:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
}

/* ---------- 实践 ---------- */
.edu-card {
  margin-top: 36px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 28px;
}

.edu-date {
  font-size: 12px;
  letter-spacing: .12em;
  color: var(--accent);
}

.edu-school { font-size: 20px; font-weight: 620; margin-top: 8px; }

.edu-major { color: var(--text-dim); font-size: 14.5px; margin-top: 4px; }

.edu-note { color: var(--text-faint); font-size: 13px; margin-top: 14px; line-height: 1.7; }

.practice-item {
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}

.practice-item:first-child { border-top: 1px solid var(--line); }

.practice-item h3 { font-size: 19px; font-weight: 620; margin-bottom: 10px; }

.practice-item p { color: var(--text-dim); font-size: 15px; }

.strength-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.strength-list span {
  font-size: 13px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 16px;
}

/* ---------- 作品 ---------- */
.work-grid {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.work-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px 32px 28px;
  text-decoration: none;
  color: var(--text);
  position: relative;
  overflow: hidden;
  transition: transform .35s var(--ease), border-color .35s;
}

.work-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%),
              color-mix(in srgb, var(--accent) 12%, transparent), transparent 65%);
  opacity: 0;
  transition: opacity .4s;
}

.work-card:hover::after { opacity: 1; }
.work-card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }

.work-num {
  font-size: 12px;
  letter-spacing: .16em;
  color: var(--text-faint);
}

.work-name { font-size: 24px; font-weight: 640; letter-spacing: -.01em; }

.work-desc { color: var(--text-dim); font-size: 15px; }

.work-stack {
  font-size: 12.5px;
  color: var(--text-faint);
  letter-spacing: .04em;
}

.work-card .link-arrow { margin-top: 14px; font-size: 14px; }

/* ---------- FAQ ---------- */
.faq-list { display: flex; flex-direction: column; }

.faq-item {
  border-bottom: 1px solid var(--line);
  padding: 4px 0;
}

.faq-item:first-child { border-top: 1px solid var(--line); }

.faq-item summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  font-size: 18px;
  font-weight: 570;
  padding: 22px 0;
  transition: color .25s;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "+";
  font-size: 22px;
  font-weight: 300;
  color: var(--text-faint);
  transition: transform .3s var(--ease), color .3s;
}

.faq-item[open] summary::after { transform: rotate(45deg); color: var(--accent); }
.faq-item summary:hover { color: var(--accent); }

.faq-item p {
  color: var(--text-dim);
  font-size: 15px;
  padding: 0 0 24px;
  max-width: 640px;
}

/* ---------- PLAY ---------- */
.section-play { border-top: 1px solid var(--line); }

.play-grid {
  margin-top: 44px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.play-item {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.play-key {
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.play-swatches { display: flex; gap: 12px; }

.swatch {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 2px solid transparent;
  background: var(--sw);
  cursor: pointer;
  transition: transform .25s var(--ease), border-color .25s, box-shadow .25s;
}

.swatch:hover { transform: scale(1.12); }

.swatch.is-active {
  border-color: var(--text);
  box-shadow: 0 0 0 3px var(--bg), 0 0 0 4.5px var(--text);
}

.play-toggle {
  align-self: flex-start;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 550;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 11px 22px;
  cursor: pointer;
  transition: border-color .25s, color .25s, transform .25s;
}

.play-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

/* ---------- 页脚 ---------- */
.footer {
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
  padding: clamp(90px, 12vw, 140px) 0 44px;
}

.footer-kicker {
  font-size: 15px;
  color: var(--text-dim);
  margin-bottom: 26px;
}

.footer-mail {
  display: inline-block;
  font-size: clamp(30px, 6.4vw, 84px);
  font-weight: 680;
  letter-spacing: -.03em;
  color: var(--text);
  text-decoration: none;
  line-height: 1.1;
  word-break: break-all;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-repeat: no-repeat;
  background-size: 0% 3px;
  background-position: 0 100%;
  transition: background-size .5s var(--ease), color .3s;
  padding-bottom: 8px;
}

.footer-mail:hover { background-size: 100% 3px; color: var(--accent); }

.footer-meta { margin-top: 80px; }

.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
  color: var(--text-dim);
  font-size: 14.5px;
}

.footer-head {
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 8px;
}

.footer-copy {
  padding-top: 26px;
  border-top: 1px solid var(--line);
  color: var(--text-faint);
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-ref { letter-spacing: .04em; }

/* ---------- 入场动画 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}

.reveal.is-visible { opacity: 1; transform: none; }

.delay-1 { transition-delay: .12s; }
.delay-2 { transition-delay: .24s; }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .grid-2 { grid-template-columns: 1fr; }
  .work-grid { grid-template-columns: 1fr; }
  .play-grid { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: 1fr; gap: 20px; }
  .topbar-nav a:not(.topbar-cta) { display: none; }
  .hero-bottom { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee-track { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
