/* ============ pgl 个人作品集样式 ============ */

:root {
  --bg: #0b0f19;
  --bg-alt: #111827;
  --card: #151e2f;
  --text: #e8ecf4;
  --text-dim: #9aa7bd;
  --accent: #4f8cff;
  --accent-2: #7c5cff;
  --border: #22304a;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --radius: 14px;
  --container: 980px;
}

html.light {
  --bg: #f7f9fc;
  --bg-alt: #ffffff;
  --card: #ffffff;
  --text: #1a2233;
  --text-dim: #5b6b84;
  --accent: #2f6bff;
  --accent-2: #6a3df5;
  --border: #e2e8f2;
  --shadow: 0 10px 30px rgba(30, 50, 100, 0.10);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s ease, color 0.3s ease;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- 顶栏 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 62px;
}

.brand {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: 0.5px;
}
.brand:hover { text-decoration: none; }
.brand .dot { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
}

.nav-links a {
  color: var(--text-dim);
  font-size: 15px;
  padding: 8px 12px;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
}
.nav-links a:hover {
  color: var(--text);
  background: var(--bg-alt);
  text-decoration: none;
}

.nav-links a.active { color: var(--accent); font-weight: 600; }

.theme-toggle {
  margin-left: 10px;
  background: var(--bg-alt);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  transition: transform 0.2s;
}
.theme-toggle:hover { transform: rotate(20deg); }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  width: 40px;
  height: 40px;
  padding: 10px 8px;
}
.nav-toggle span {
  display: block;
  height: 2px;
  margin: 4px 0;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: 62px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 10px 24px 16px;
    transform-origin: top;
    transform: scaleY(0);
    opacity: 0;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }
  .nav-links.open {
    transform: scaleY(1);
    opacity: 1;
  }
  .nav-links li { text-align: left; }
  .theme-toggle { margin: 6px 0 0 12px; width: 100%; height: 40px; border-radius: 8px; text-align: left; }
}

/* ---------- Hero ---------- */
.hero {
  padding: 120px 0 90px;
  background:
    radial-gradient(600px 300px at 20% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%),
    radial-gradient(600px 300px at 85% 20%, color-mix(in srgb, var(--accent-2) 14%, transparent), transparent 70%);
}

.hero-kicker {
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.hero-name {
  font-size: clamp(48px, 9vw, 84px);
  font-weight: 800;
  letter-spacing: 2px;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1.15;
}

.hero-role {
  font-size: clamp(18px, 3vw, 24px);
  font-weight: 600;
  margin: 14px 0 12px;
}

.hero-tagline {
  color: var(--text-dim);
  max-width: 620px;
  font-size: 17px;
}

.hero-actions { margin-top: 32px; display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-block;
  padding: 12px 26px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 600;
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }

.btn-primary {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 8px 22px color-mix(in srgb, var(--accent) 35%, transparent);
}
.btn-primary:hover { box-shadow: 0 10px 28px color-mix(in srgb, var(--accent) 50%, transparent); }

.btn-ghost {
  border: 1px solid var(--border);
  color: var(--text);
  background: transparent;
}
.btn-ghost:hover { background: var(--bg-alt); }

/* ---------- 区块通用 ---------- */
.section { padding: 88px 0; }
.section-alt { background: var(--bg-alt); }

.section-title {
  font-size: 30px;
  font-weight: 700;
  margin-bottom: 10px;
}
.section-title::after {
  content: "";
  display: block;
  width: 46px;
  height: 4px;
  margin-top: 12px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.section-lead { color: var(--text-dim); margin-top: 16px; max-width: 680px; }

/* ---------- 关于 ---------- */
.about-list {
  list-style: none;
  margin-top: 28px;
  display: grid;
  gap: 14px;
  max-width: 720px;
}
.about-list li {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  font-size: 16px;
}

/* ---------- 技能标签 ---------- */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}
.chip {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 15px;
  transition: border-color 0.2s, color 0.2s, transform 0.15s;
}
.chip:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

/* ---------- 时间线 ---------- */
.timeline {
  margin-top: 32px;
  border-left: 2px solid var(--border);
  padding-left: 26px;
  display: grid;
  gap: 34px;
}
.tl-item { position: relative; }
.tl-item::before {
  content: "";
  position: absolute;
  left: -33px;
  top: 8px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 20%, transparent);
}
.tl-item h3 { font-size: 19px; font-weight: 700; }
.tl-org {
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
  margin-left: 8px;
}
.tl-meta {
  color: var(--text-dim);
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
  margin: 4px 0 8px;
}
.tl-desc { color: var(--text-dim); max-width: 640px; }

/* ---------- 作品卡片 ---------- */
.cards {
  margin-top: 32px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 22px;
}
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 24px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.2s, border-color 0.2s;
}
.card:hover { transform: translateY(-6px); border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); }
.card h3 { font-size: 19px; }
.card p { color: var(--text-dim); font-size: 15px; flex: 1; }
.card-tags { font-size: 13px !important; }
.card-link { font-weight: 600; font-size: 15px; }
.card-link:hover { text-decoration: none; color: var(--accent-2); }

/* ---------- 联系 ---------- */
.contact-inner { text-align: center; display: flex; flex-direction: column; align-items: center; }
.contact-links { margin-top: 26px; }
.social-links { margin-top: 26px; display: flex; gap: 22px; flex-wrap: wrap; justify-content: center; }
.social-links a {
  color: var(--text-dim);
  font-size: 15px;
  padding: 6px 10px;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.social-links a:hover { color: var(--accent); border-color: var(--accent); text-decoration: none; }

/* ---------- 页脚 ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 26px 0;
  background: var(--bg-alt);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--text-dim);
  font-size: 14px;
}
.back-top { color: var(--text-dim); }
.back-top:hover { color: var(--accent); text-decoration: none; }

/* ---------- 滚动显现动画 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

::selection { background: color-mix(in srgb, var(--accent) 40%, transparent); }
