/* produce123.github.io — 深色霓虹主题 */

:root {
  /* 主题变量：如需切浅色，仅改这一处 */
  --bg: #0a0e14;
  --bg-soft: #111722;
  --text: #e6edf3;
  --text-dim: #8b98a9;
  --accent: #22d3ee;          /* 霓虹青 */
  --accent-2: #4ade80;        /* 霓虹绿 */
  --border: #1e2a3a;
  --card-bg: rgba(17, 23, 34, 0.75);
  --radius: 14px;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "PingFang SC", "Microsoft YaHei", -apple-system, "Segoe UI", sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

code {
  background: rgba(34, 211, 238, 0.12);
  padding: 1px 6px;
  border-radius: 5px;
  font-size: 0.9em;
  color: var(--accent);
}

/* ---------- Hero ---------- */
.hero {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 64px 24px 40px;
  background:
    radial-gradient(600px 320px at 50% -10%, rgba(34, 211, 238, 0.14), transparent 70%),
    radial-gradient(500px 260px at 85% 110%, rgba(74, 222, 128, 0.10), transparent 70%),
    var(--bg);
}

.hero-inner { max-width: 720px; }

.hero-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  box-shadow: 0 0 24px rgba(34, 211, 238, 0.35);
  margin-bottom: 24px;
  object-fit: cover;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.hero-avatar:hover {
  transform: scale(1.06);
  box-shadow: 0 0 34px rgba(34, 211, 238, 0.55);
}

.hero-title {
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  font-weight: 800;
  letter-spacing: 0.02em;
}

.cursor {
  color: var(--accent);
  animation: blink 1.1s steps(1) infinite;
}

@keyframes blink { 50% { opacity: 0; } }

.hero-subtitle {
  margin-top: 12px;
  color: var(--text-dim);
  font-size: clamp(1rem, 2.4vw, 1.15rem);
}

.hero-links { margin-top: 28px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-weight: 600;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover {
  background: rgba(34, 211, 238, 0.12);
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.35);
  text-decoration: none;
  transform: translateY(-1px);
}
.btn-ghost {
  border-color: var(--border);
  color: var(--text-dim);
  padding: 7px 16px;
  font-weight: 500;
}
.btn-ghost:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(34, 211, 238, 0.08);
}
.icon { flex-shrink: 0; }

/* ---------- 项目展示 ---------- */
.projects {
  max-width: 900px;
  margin: 0 auto;
  padding: 56px 24px 72px;
}

.section-title {
  font-size: clamp(1.6rem, 4vw, 2.1rem);
  text-align: center;
  font-weight: 700;
}

.section-hint {
  text-align: center;
  color: var(--text-dim);
  margin-top: 6px;
  margin-bottom: 36px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 12px 36px rgba(34, 211, 238, 0.18);
}

.card-body { flex: 1; }

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
}

.card-title::before {
  content: "▍";
  color: var(--accent);
  margin-right: 6px;
}

.card-desc {
  margin-top: 10px;
  color: var(--text-dim);
  font-size: 0.95rem;
}

.tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.tags li {
  font-size: 0.78rem;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.03);
}

.card-foot { margin-top: 20px; }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  padding: 28px 24px;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.9rem;
}

/* ---------- 头像 Lightbox（点击查看完整头像） ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(4, 7, 12, 0.82);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.lightbox.open {
  opacity: 1;
  pointer-events: auto;
}
.lightbox-img {
  max-width: min(80vw, 560px);
  max-height: 80vh;
  border-radius: 12px;
  border: 2px solid var(--accent);
  box-shadow: 0 0 44px rgba(34, 211, 238, 0.4);
  transform: scale(0.94);
  transition: transform 0.25s ease;
}
.lightbox.open .lightbox-img { transform: scale(1); }

.lightbox-hint {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  color: var(--text-dim);
  font-size: 0.85rem;
}

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

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