/* ============================================================
   杨壹凯 · 设计资源分享站
   主题：暗色 / 渐变强调 / 玻璃拟态
   ============================================================ */

:root {
  --bg: #0b0e17;
  --bg-alt: #10141f;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-strong: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.09);
  --text: #e8ebf2;
  --text-dim: #9aa3b5;
  --text-faint: #6b7385;
  --accent-1: #6d5df6;
  --accent-2: #22d3ee;
  --accent-3: #f472b6;
  --grad-main: linear-gradient(120deg, var(--accent-1), var(--accent-2));
  --grad-warm: linear-gradient(120deg, var(--accent-3), var(--accent-1));
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  --font-en: "Inter", "Noto Sans SC", sans-serif;
  --font-sc: "Noto Sans SC", "Inter", sans-serif;
  --font-mono: "JetBrains Mono", monospace;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sc);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: min(1120px, 92%);
  margin: 0 auto;
}

/* ---------- 背景装饰 ---------- */

.bg-decoration {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
}

.blob-1 {
  width: 480px;
  height: 480px;
  top: -160px;
  left: -120px;
  background: radial-gradient(circle, rgba(109, 93, 246, 0.55), transparent 70%);
}

.blob-2 {
  width: 420px;
  height: 420px;
  top: 30%;
  right: -140px;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.35), transparent 70%);
}

.blob-3 {
  width: 380px;
  height: 380px;
  bottom: -120px;
  left: 30%;
  background: radial-gradient(circle, rgba(244, 114, 182, 0.3), transparent 70%);
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
}

/* ---------- 导航 ---------- */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(11, 14, 23, 0.72);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}

.nav.scrolled {
  border-color: var(--border);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--grad-main);
  font-family: var(--font-en);
  font-weight: 800;
  font-size: 14px;
  color: #fff;
  letter-spacing: 0.5px;
}

.brand-name {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 1px;
}

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

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 14.5px;
  transition: color 0.25s ease;
  position: relative;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  background: var(--grad-main);
  border-radius: 2px;
  transition: width 0.25s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

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

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

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

/* ---------- Hero ---------- */

.hero {
  padding: 170px 0 80px;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 13.5px;
  color: var(--text-dim);
  margin-bottom: 28px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 0 0 rgba(34, 211, 238, 0.5);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 211, 238, 0.5); }
  70% { box-shadow: 0 0 0 10px rgba(34, 211, 238, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 211, 238, 0); }
}

.hero-title {
  font-size: clamp(40px, 7vw, 68px);
  font-weight: 900;
  letter-spacing: 2px;
  line-height: 1.25;
  margin-bottom: 20px;
}

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

.hero-subtitle {
  font-size: clamp(15px, 2.2vw, 17.5px);
  color: var(--text-dim);
  margin-bottom: 40px;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 64px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 30px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.btn-primary {
  background: var(--grad-main);
  color: #fff;
  box-shadow: 0 8px 24px rgba(109, 93, 246, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(109, 93, 246, 0.5);
}

.btn-ghost {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-ghost:hover {
  transform: translateY(-2px);
  background: var(--surface-strong);
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: clamp(32px, 8vw, 88px);
  flex-wrap: wrap;
}

.stat {
  text-align: center;
}

.stat-num {
  display: block;
  font-family: var(--font-en);
  font-size: 34px;
  font-weight: 800;
  background: var(--grad-main);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-label {
  font-size: 13px;
  color: var(--text-faint);
}

/* ---------- Section 通用 ---------- */

.section {
  padding: 96px 0;
}

.section-alt {
  background: rgba(16, 20, 31, 0.55);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-head {
  text-align: center;
  margin-bottom: 48px;
}

.section-tag {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--accent-2);
}

.section-title {
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 900;
  letter-spacing: 1px;
  margin-top: 8px;
}

.section-sub {
  color: var(--text-dim);
  margin-top: 12px;
  font-size: 15px;
}

/* ---------- 关于我 ---------- */

.about-grid {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 40px;
  align-items: stretch;
}

.about-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 32px;
  text-align: center;
  box-shadow: var(--shadow);
}

.about-avatar {
  width: 96px;
  height: 96px;
  margin: 0 auto 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 38px;
  font-weight: 900;
  color: #fff;
  background: var(--grad-warm);
  box-shadow: 0 8px 28px rgba(244, 114, 182, 0.35);
}

.about-card h3 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 4px;
}

.about-role {
  color: var(--accent-2);
  font-size: 14px;
  margin-bottom: 18px;
}

.about-desc {
  color: var(--text-dim);
  font-size: 14.5px;
  text-align: left;
  margin-bottom: 24px;
}

.about-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.about-tags span {
  padding: 5px 14px;
  border-radius: 999px;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  font-size: 12.5px;
  color: var(--text-dim);
}

.about-philosophy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 28px;
}

.philosophy-item {
  display: flex;
  gap: 20px;
  padding: 22px 24px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.philosophy-item:hover {
  transform: translateY(-3px);
  border-color: rgba(109, 93, 246, 0.45);
}

.philosophy-num {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 20px;
  background: var(--grad-main);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  flex-shrink: 0;
}

.philosophy-item h4 {
  font-size: 16.5px;
  margin-bottom: 4px;
}

.philosophy-item p {
  color: var(--text-dim);
  font-size: 14px;
}

/* ---------- 筛选栏 ---------- */

.filter-bar {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.filter-btn {
  padding: 9px 20px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.25s ease;
}

.filter-btn:hover {
  color: var(--text);
  border-color: rgba(109, 93, 246, 0.5);
}

.filter-btn.active {
  background: var(--grad-main);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 6px 20px rgba(109, 93, 246, 0.35);
}

/* ---------- 搜索框 ---------- */

.resource-search {
  position: relative;
  max-width: 520px;
  margin: 0 auto 44px;
}

.resource-search svg {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-faint);
  pointer-events: none;
}

.resource-search input {
  width: 100%;
  padding: 14px 20px 14px 48px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 14.5px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.resource-search input::placeholder {
  color: var(--text-faint);
}

.resource-search input:focus {
  border-color: var(--accent-1);
  box-shadow: 0 0 0 4px rgba(109, 93, 246, 0.18);
}

/* ---------- 资源卡片 ---------- */

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.card {
  opacity: 0;
  transform: translateY(18px);
  animation: fadeUp 0.5s ease forwards;
  animation-play-state: paused;
}

.card.reveal {
  animation-play-state: running;
}

.card.hidden {
  display: none;
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 28px 26px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.card-link:hover {
  transform: translateY(-5px);
  border-color: rgba(109, 93, 246, 0.5);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.card-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  font-family: var(--font-en);
  font-weight: 800;
  font-size: 15px;
  color: #fff;
  margin-bottom: 20px;
}

.icon-a { background: linear-gradient(135deg, #6d5df6, #22d3ee); }
.icon-b { background: linear-gradient(135deg, #f472b6, #6d5df6); }
.icon-c { background: linear-gradient(135deg, #22d3ee, #34d399); }
.icon-d { background: linear-gradient(135deg, #f59e0b, #ef4444); }
.icon-e { background: linear-gradient(135deg, #34d399, #22d3ee); }
.icon-f { background: linear-gradient(135deg, #6366f1, #a855f7); }

.card-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.card-desc {
  color: var(--text-dim);
  font-size: 13.8px;
  flex-grow: 1;
  margin-bottom: 18px;
}

.card-tag {
  align-self: flex-start;
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  color: var(--accent-2);
}

.grid-empty {
  text-align: center;
  color: var(--text-faint);
  padding: 48px 0;
}

/* ---------- 软件推荐 ---------- */

.software-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

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

.software-item:hover {
  transform: translateY(-3px);
  border-color: rgba(34, 211, 238, 0.5);
  background: var(--surface-strong);
}

.soft-icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 12px;
  font-family: var(--font-en);
  font-weight: 800;
  font-size: 14px;
  color: #fff;
}

.soft-a { background: linear-gradient(135deg, #f24e1e, #ff7262); }
.soft-b { background: linear-gradient(135deg, #f7b500, #ffde00); color: #333; }
.soft-c { background: linear-gradient(135deg, #8c52ff, #5ac8ff); }
.soft-d { background: linear-gradient(135deg, #0055ff, #00b7ff); }
.soft-e { background: linear-gradient(135deg, #e85d8a, #f7b955); }
.soft-f { background: linear-gradient(135deg, #9999ff, #1d2b8c); }
.soft-g { background: linear-gradient(135deg, #e15b9f, #3d9bf6); }
.soft-h { background: linear-gradient(135deg, #ea7600, #ffad33); }
.soft-i { background: linear-gradient(135deg, #c86bfa, #39f); }
.soft-j { background: linear-gradient(135deg, #6d5df6, #22d3ee); }
.soft-k { background: linear-gradient(135deg, #1a1a1a, #4d4d4d); }
.soft-l { background: linear-gradient(135deg, #f7b500, #e74c3c); }

.soft-info {
  flex-grow: 1;
  min-width: 0;
}

.soft-info h3 {
  font-size: 15.5px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.soft-info p {
  font-size: 12.5px;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.soft-badge {
  flex-shrink: 0;
  font-size: 11.5px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-dim);
  background: var(--surface-strong);
}

/* ---------- 联系 ---------- */

.contact-box {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
  padding: 60px 48px;
  border-radius: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.contact-box::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--grad-main);
}

.contact-desc {
  color: var(--text-dim);
  margin: 16px 0 32px;
}

.contact-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.contact-socials {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.social-link {
  padding: 9px 22px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-dim);
  text-decoration: none;
  font-size: 13.5px;
  transition: all 0.25s ease;
}

.social-link:hover {
  color: var(--text);
  border-color: rgba(244, 114, 182, 0.6);
  background: var(--surface-strong);
}

/* ---------- 页脚 ---------- */

.footer {
  padding: 36px 0;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer p {
  color: var(--text-faint);
  font-size: 13.5px;
}

.footer-quote {
  font-style: italic;
  color: var(--text-dim);
}

/* ---------- 返回顶部 ---------- */

.back-top {
  position: fixed;
  right: 26px;
  bottom: 26px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--grad-main);
  border: none;
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: all 0.3s ease;
  box-shadow: 0 8px 24px rgba(109, 93, 246, 0.4);
  z-index: 90;
}

.back-top svg {
  width: 20px;
  height: 20px;
}

.back-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-top:hover {
  transform: translateY(-3px);
}

/* ---------- 响应式 ---------- */

@media (max-width: 960px) {
  .about-grid {
    grid-template-columns: 1fr;
  }

  .cards-grid,
  .software-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 720px) {
  .section {
    padding: 72px 0;
  }

  .nav-links {
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(11, 14, 23, 0.96);
    border-bottom: 1px solid var(--border);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
  }

  .nav-links.open {
    max-height: 320px;
  }

  .nav-links a {
    padding: 16px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  }

  .nav-links a::after {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .hero {
    padding-top: 140px;
  }

  .hide-mobile {
    display: none;
  }

  .cards-grid,
  .software-grid {
    grid-template-columns: 1fr;
  }

  .contact-box {
    padding: 44px 24px;
  }
}
