/* ==========================================================================
   个人作品集 · 全局样式
   现代大胆风格 —— 深色底 + 电光渐变强调色
   ========================================================================== */

/* ---------- 设计变量 ---------- */
:root {
  /* 配色 */
  --bg: #0b0b10;
  --bg-2: #101018;
  --surface: #16161f;
  --surface-2: #1d1d28;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);

  --text: #f4f4f8;
  --text-dim: #c6c6d1;
  --muted: #8f8f9d;

  --accent: #7c5cff;          /* 电光紫 */
  --accent-2: #2de0ff;        /* 电光青 */
  --accent-3: #ff5c8a;        /* 霓虹粉 */

  --grad: linear-gradient(120deg, var(--accent) 0%, var(--accent-2) 100%);
  --grad-warm: linear-gradient(120deg, var(--accent-3) 0%, var(--accent) 100%);

  /* 字体 */
  --font-display: "Space Grotesk", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-body: "Inter", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;

  /* 尺寸与间距 */
  --container: 1160px;
  --radius: 18px;
  --radius-sm: 12px;
  --nav-h: 76px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- 重置 ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

button,
input,
textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

/* 全局背景光斑 */
.bg-glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.bg-glow::before,
.bg-glow::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.35;
}

.bg-glow::before {
  width: 520px;
  height: 520px;
  top: -180px;
  right: -120px;
  background: radial-gradient(circle, rgba(124, 92, 255, 0.55), transparent 70%);
}

.bg-glow::after {
  width: 460px;
  height: 460px;
  bottom: -160px;
  left: -120px;
  background: radial-gradient(circle, rgba(45, 224, 255, 0.4), transparent 70%);
}

/* ---------- 布局 ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

.section {
  padding-block: 96px;
}

.section--tight {
  padding-block: 64px;
}

/* ---------- 文字 ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 700;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-2);
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--grad);
  border-radius: 2px;
}

.section-title {
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  margin-top: 16px;
}

.section-sub {
  color: var(--muted);
  max-width: 560px;
  margin-top: 16px;
  font-size: 1.05rem;
}

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease),
    background 0.3s var(--ease), border-color 0.3s var(--ease);
}

.btn:active {
  transform: scale(0.97);
}

.btn--primary {
  background: var(--grad);
  color: #0b0b10;
  box-shadow: 0 10px 30px -8px rgba(124, 92, 255, 0.55);
}

.btn--primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px -8px rgba(124, 92, 255, 0.7);
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}

.btn--ghost:hover {
  border-color: var(--accent);
  background: rgba(124, 92, 255, 0.08);
  transform: translateY(-3px);
}

.btn .arrow {
  transition: transform 0.3s var(--ease);
}

.btn:hover .arrow {
  transform: translateX(4px);
}

/* ---------- 导航栏 ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease),
    backdrop-filter 0.35s var(--ease);
  border-bottom: 1px solid transparent;
}

.nav.scrolled {
  background: rgba(11, 11, 16, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
}

.logo__dot {
  color: var(--accent-2);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav__link {
  position: relative;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-dim);
  transition: color 0.25s var(--ease), background 0.25s var(--ease);
}

.nav__link:hover {
  color: var(--text);
}

.nav__link.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.nav__cta {
  padding: 10px 22px;
  font-size: 0.92rem;
}

.nav__toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  width: 44px;
  height: 44px;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.nav__toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}

.nav__toggle.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav__toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.nav__toggle.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- 首页 Hero ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-h);
  position: relative;
}

.hero__inner {
  padding-block: 80px;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-dim);
}

.hero__badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3ddc84;
  box-shadow: 0 0 0 0 rgba(61, 220, 132, 0.6);
  animation: pulse 2.2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(61, 220, 132, 0.55); }
  70% { box-shadow: 0 0 0 10px rgba(61, 220, 132, 0); }
  100% { box-shadow: 0 0 0 0 rgba(61, 220, 132, 0); }
}

.hero__title {
  font-size: clamp(3rem, 9vw, 6.5rem);
  font-weight: 700;
  margin-top: 28px;
  letter-spacing: -0.03em;
}

.hero__title .line {
  display: block;
}

.hero__sub {
  font-size: clamp(1.1rem, 2.2vw, 1.35rem);
  color: var(--muted);
  max-width: 560px;
  margin-top: 24px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 40px;
}

.hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
  margin-top: 72px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}

.stat__num {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.stat__label {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 4px;
}

/* 滚动提示 */
.scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.scroll-hint__bar {
  width: 1px;
  height: 48px;
  background: var(--border-strong);
  overflow: hidden;
  position: relative;
}

.scroll-hint__bar::after {
  content: "";
  position: absolute;
  top: -50%;
  left: 0;
  width: 100%;
  height: 50%;
  background: var(--grad);
  animation: scrollline 1.8s var(--ease) infinite;
}

@keyframes scrollline {
  to { top: 100%; }
}

/* ---------- 精选项目 / 卡片 ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 48px;
}

.card {
  position: relative;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease),
    box-shadow 0.4s var(--ease);
}

.card:hover {
  transform: translateY(-6px);
  border-color: var(--border-strong);
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.7);
}

.card__media {
  aspect-ratio: 16 / 10;
  position: relative;
  overflow: hidden;
  background: var(--surface-2);
}

.card__media .thumb {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  transition: transform 0.5s var(--ease);
}

.card:hover .card__media .thumb {
  transform: scale(1.08);
}

.thumb--1 { background: linear-gradient(135deg, #2a1f52, #7c5cff); }
.thumb--2 { background: linear-gradient(135deg, #0b2a33, #2de0ff); }
.thumb--3 { background: linear-gradient(135deg, #3a1330, #ff5c8a); }
.thumb--4 { background: linear-gradient(135deg, #1f2a0d, #9be046); }
.thumb--5 { background: linear-gradient(135deg, #33190f, #ff9a4d); }
.thumb--6 { background: linear-gradient(135deg, #0f1d33, #4d8bff); }

.card__tag {
  position: absolute;
  top: 16px;
  left: 16px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.card__body {
  padding: 26px;
}

.card__title {
  font-size: 1.35rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card__title .arrow {
  color: var(--muted);
  transition: transform 0.3s var(--ease), color 0.3s var(--ease);
}

.card:hover .card__title .arrow {
  transform: translate(4px, -4px);
  color: var(--accent-2);
}

.card__desc {
  color: var(--muted);
  margin-top: 10px;
  font-size: 0.95rem;
}

.card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.chip {
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-dim);
}

/* ---------- 关于页 ---------- */
.about-hero {
  padding-top: calc(var(--nav-h) + 80px);
  padding-bottom: 40px;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 56px;
  align-items: start;
}

.about-photo {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 4 / 5;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-photo .placeholder {
  font-size: 6rem;
  filter: grayscale(0.1);
}

.about-photo__caption {
  position: absolute;
  bottom: 18px;
  left: 18px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
  font-size: 0.8rem;
}

.prose p {
  color: var(--text-dim);
  margin-top: 18px;
  font-size: 1.05rem;
}

.prose p:first-child {
  margin-top: 0;
}

.prose strong {
  color: var(--text);
}

.skill-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 28px;
}

.skill {
  padding: 18px 20px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
}

.skill__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
}

.skill__bar {
  height: 6px;
  border-radius: 999px;
  background: var(--surface-2);
  margin-top: 12px;
  overflow: hidden;
}

.skill__fill {
  height: 100%;
  border-radius: inherit;
  background: var(--grad);
  width: 0;
  transition: width 1.2s var(--ease);
}

/* 时间线 */
.timeline {
  margin-top: 40px;
  position: relative;
  padding-left: 28px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--border-strong);
}

.timeline__item {
  position: relative;
  padding-bottom: 36px;
}

.timeline__item:last-child {
  padding-bottom: 0;
}

.timeline__item::before {
  content: "";
  position: absolute;
  left: -26px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--accent);
}

.timeline__period {
  font-size: 0.8rem;
  color: var(--accent-2);
  font-weight: 600;
  letter-spacing: 0.06em;
}

.timeline__role {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  margin-top: 6px;
}

.timeline__place {
  color: var(--muted);
  font-size: 0.92rem;
  margin-top: 2px;
}

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

/* ---------- 联系页 ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 56px;
  align-items: start;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 32px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}

.contact-item:hover {
  border-color: var(--border-strong);
  transform: translateX(4px);
}

.contact-item__icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--surface-2);
  font-size: 1.2rem;
}

.contact-item__label {
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.contact-item__value {
  font-weight: 600;
  margin-top: 2px;
}

/* 表单 */
.form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 34px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
}

.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-dim);
}

.field input,
.field textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
  outline: none;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.18);
}

.field textarea {
  resize: vertical;
  min-height: 140px;
}

.form__note {
  font-size: 0.85rem;
  color: var(--muted);
}

.form__status {
  display: none;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  border: 1px solid transparent;
}

.form__status.show {
  display: block;
}

.form__status.success {
  background: rgba(61, 220, 132, 0.12);
  border-color: rgba(61, 220, 132, 0.35);
  color: #7ce8a8;
}

/* ---------- 页脚 ---------- */
.footer {
  border-top: 1px solid var(--border);
  padding-block: 40px;
  margin-top: 40px;
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.footer__copy {
  color: var(--muted);
  font-size: 0.9rem;
}

.footer__links {
  display: flex;
  gap: 24px;
}

.footer__links a {
  color: var(--text-dim);
  font-size: 0.9rem;
  transition: color 0.25s var(--ease);
}

.footer__links a:hover {
  color: var(--accent-2);
}

/* ---------- 页面页头（内页共用） ---------- */
.page-head {
  padding-top: calc(var(--nav-h) + 88px);
  padding-bottom: 48px;
}

.page-head__title {
  font-size: clamp(2.6rem, 6vw, 4.5rem);
  margin-top: 18px;
}

.page-head__sub {
  color: var(--muted);
  max-width: 600px;
  margin-top: 18px;
  font-size: 1.1rem;
}

/* ---------- 揭示动画 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }
.reveal[data-delay="4"] { transition-delay: 0.32s; }

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

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .card-grid {
    grid-template-columns: 1fr;
  }

  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .about-photo {
    position: static;
    max-width: 420px;
  }
}

@media (max-width: 768px) {
  .section {
    padding-block: 68px;
  }

  .nav__toggle {
    display: flex;
  }

  .nav__links {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 20px 24px 28px;
    background: rgba(11, 11, 16, 0.97);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s var(--ease), opacity 0.3s var(--ease),
      visibility 0.3s;
  }

  .nav__links.is-open {
    transform: none;
    opacity: 1;
    visibility: visible;
  }

  .nav__link {
    padding: 14px 16px;
    font-size: 1.05rem;
  }

  .nav__cta {
    margin-top: 12px;
    justify-content: center;
  }

  .hero__stats {
    gap: 32px;
  }

  .form__row {
    grid-template-columns: 1fr;
  }

  .footer__inner {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .skill-list {
    grid-template-columns: 1fr;
  }

  .hero__actions .btn {
    width: 100%;
    justify-content: center;
  }
}
