/* ════════════════════════════════════════════
   Seint · 个人主页
   清新风格 · 优雅动画
   ════════════════════════════════════════════ */

:root {
  /* 配色：薄荷 × 天青的清新渐变 */
  --mint: #a8e6cf;
  --sky: #7fc8f8;
  --lavender: #d4b8f0;
  --ink: #2d3748;
  --ink-soft: #5a6b82;
  --paper: #f7fbfa;
  --card: rgba(255, 255, 255, 0.72);
  --card-border: rgba(255, 255, 255, 0.9);
  --shadow: 0 8px 32px rgba(90, 130, 160, 0.10);
  --shadow-hover: 0 16px 48px rgba(90, 130, 160, 0.18);
  --radius: 22px;
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Noto Sans SC", -apple-system, "PingFang SC", sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--mint); color: var(--ink); }

/* ─────────── 背景：柔雾色块 + 噪点 ─────────── */
.bg-scene {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}

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

.blob-1 {
  width: 46vw; height: 46vw;
  background: var(--mint);
  top: -12vw; left: -10vw;
  animation: drift-1 26s ease-in-out infinite alternate;
}

.blob-2 {
  width: 38vw; height: 38vw;
  background: var(--sky);
  top: 30vh; right: -12vw;
  animation: drift-2 32s ease-in-out infinite alternate;
}

.blob-3 {
  width: 34vw; height: 34vw;
  background: var(--lavender);
  bottom: -14vw; left: 22vw;
  opacity: 0.4;
  animation: drift-3 38s ease-in-out infinite alternate;
}

@keyframes drift-1 {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(6vw, 8vh) scale(1.15); }
}
@keyframes drift-2 {
  from { transform: translate(0, 0) scale(1.1); }
  to   { transform: translate(-8vw, -6vh) scale(0.95); }
}
@keyframes drift-3 {
  from { transform: translate(0, 0); }
  to   { transform: translate(7vw, -7vh) scale(1.2); }
}

.grain {
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='linear' slope='0.04'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ─────────── 导航栏 ─────────── */
.nav {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 40px;
  padding: 12px 28px;
  border-radius: 100px;
  background: var(--card);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
  transition: box-shadow 0.4s var(--ease-smooth);
  animation: nav-drop 0.9s var(--ease-smooth) both 0.2s;
}

@keyframes nav-drop {
  from { opacity: 0; transform: translate(-50%, -24px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

.nav-logo {
  font-family: "Noto Serif SC", serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.5px;
}

.nav-logo .dot { color: var(--sky); }

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

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

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -3px;
  width: 100%; height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--mint), var(--sky));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease-smooth);
}

.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { transform: scaleX(1); }

/* ─────────── Hero 首屏 ─────────── */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 60px;
  position: relative;
}

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

.hero-avatar {
  position: relative;
  width: 128px;
  height: 128px;
  margin: 0 auto 34px;
}

.avatar-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: "Noto Serif SC", serif;
  font-size: 52px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--mint), var(--sky));
  box-shadow: 0 12px 36px rgba(127, 200, 248, 0.35);
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.avatar-placeholder img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.avatar-ring {
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  border: 2px dashed rgba(127, 200, 248, 0.55);
  animation: ring-spin 18s linear infinite;
}

@keyframes ring-spin {
  to { transform: rotate(360deg); }
}

.hero-greeting {
  font-size: 17px;
  color: var(--ink-soft);
  letter-spacing: 2px;
}

.hero-name {
  font-family: "Noto Serif SC", serif;
  font-size: clamp(52px, 9vw, 84px);
  font-weight: 700;
  line-height: 1.15;
  margin: 6px 0 14px;
  background: linear-gradient(120deg, #3aa68b 10%, #4a9fd8 55%, #8b6fd8 95%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200% auto;
  animation: name-flow 8s ease-in-out infinite alternate;
}

@keyframes name-flow {
  from { background-position: 0% center; }
  to   { background-position: 100% center; }
}

.hero-tagline {
  font-size: clamp(16px, 2.4vw, 20px);
  color: var(--ink-soft);
  min-height: 1.8em;
  letter-spacing: 1px;
}

.caret {
  display: inline-block;
  width: 2px;
  height: 1.05em;
  margin-left: 3px;
  vertical-align: -0.15em;
  background: var(--sky);
  animation: caret-blink 1s step-end infinite;
}

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

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 30px;
  border-radius: 100px;
  font-size: 15.5px;
  font-weight: 500;
  text-decoration: none;
  transition: transform 0.35s var(--ease-spring), box-shadow 0.35s var(--ease-smooth);
}

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

.btn-primary {
  color: #fff;
  background: linear-gradient(120deg, #46b894, #4a9fd8);
  box-shadow: 0 8px 24px rgba(74, 159, 216, 0.35);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 34px rgba(74, 159, 216, 0.45);
}

.btn-primary svg { transition: transform 0.3s var(--ease-spring); }
.btn-primary:hover svg { transform: translateX(4px); }

.btn-ghost {
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(10px);
}

.btn-ghost:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

/* 滚动提示 */
.scroll-hint {
  position: absolute;
  bottom: 34px;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0.65;
}

.mouse {
  display: block;
  width: 24px;
  height: 38px;
  border: 2px solid var(--ink-soft);
  border-radius: 14px;
  position: relative;
}

.wheel {
  position: absolute;
  top: 7px; left: 50%;
  width: 3px; height: 7px;
  margin-left: -1.5px;
  border-radius: 3px;
  background: var(--ink-soft);
  animation: wheel-roll 1.8s ease-in-out infinite;
}

@keyframes wheel-roll {
  0%   { transform: translateY(0); opacity: 1; }
  70%  { transform: translateY(12px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

/* ─────────── 通用 Section ─────────── */
.section {
  max-width: 880px;
  margin: 0 auto;
  padding: 90px 24px;
}

.section-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}

.section-index {
  font-family: "Noto Serif SC", serif;
  font-size: 15px;
  color: var(--sky);
  letter-spacing: 1px;
}

.section-head h2 {
  font-family: "Noto Serif SC", serif;
  font-size: clamp(28px, 4.5vw, 38px);
  font-weight: 700;
}

.section-sub {
  width: 100%;
  color: var(--ink-soft);
  font-size: 15px;
}

/* ─────────── 关于我 ─────────── */
.about-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(16px);
  border-radius: var(--radius);
  padding: 40px 44px;
  box-shadow: var(--shadow);
  font-size: 16.5px;
  color: var(--ink-soft);
}

.about-tags {
  list-style: none;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 26px;
}

.about-tags li {
  padding: 7px 18px;
  font-size: 13.5px;
  color: var(--ink);
  border-radius: 100px;
  background: linear-gradient(120deg, rgba(168, 230, 207, 0.35), rgba(127, 200, 248, 0.28));
  border: 1px solid rgba(127, 200, 248, 0.35);
  transition: transform 0.3s var(--ease-spring);
}

.about-tags li:hover { transform: translateY(-3px) scale(1.04); }

/* ─────────── AI 站 主推卡片 ─────────── */
.ai-card {
  position: relative;
  display: block;
  text-decoration: none;
  border-radius: calc(var(--radius) + 4px);
  overflow: hidden;
  background: linear-gradient(130deg, #173f36 0%, #14425e 55%, #2c2a5e 100%);
  box-shadow: 0 20px 60px rgba(20, 66, 94, 0.35);
  transition: transform 0.5s var(--ease-smooth), box-shadow 0.5s var(--ease-smooth);
}

.ai-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 30px 80px rgba(20, 66, 94, 0.45);
}

.ai-card-glow {
  position: absolute;
  width: 340px; height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(127, 200, 248, 0.35), transparent 65%);
  top: -120px; right: -80px;
  transition: transform 0.6s var(--ease-smooth);
  pointer-events: none;
}

.ai-card:hover .ai-card-glow { transform: scale(1.4); }

.ai-card-body {
  position: relative;
  padding: 52px 52px 46px;
  color: #eaf6ff;
}

.ai-badge {
  display: inline-block;
  padding: 5px 14px;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  border-radius: 100px;
  color: var(--mint);
  border: 1px solid rgba(168, 230, 207, 0.45);
  margin-bottom: 20px;
}

.ai-card h3 {
  font-family: "Noto Serif SC", serif;
  font-size: clamp(30px, 5vw, 42px);
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  background: linear-gradient(100deg, #a8e6cf, #7fc8f8);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.ai-card p {
  color: rgba(234, 246, 255, 0.78);
  font-size: 16px;
  max-width: 480px;
}

.ai-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 30px;
  font-size: 15.5px;
  font-weight: 500;
  color: var(--mint);
}

.ai-cta svg { transition: transform 0.35s var(--ease-spring); }
.ai-card:hover .ai-cta svg { transform: translate(4px, -4px); }

/* ─────────── 社交链接 ─────────── */
.social-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
}

.social-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px 26px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.4s var(--ease-spring), box-shadow 0.4s var(--ease-smooth);
}

.social-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover), 0 0 0 1px var(--brand);
}

.social-icon {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 52px; height: 52px;
  border-radius: 16px;
  color: var(--brand);
  background: color-mix(in srgb, var(--brand) 10%, white);
  transition: transform 0.4s var(--ease-spring), background 0.3s, color 0.3s;
}

.social-card:hover .social-icon {
  transform: scale(1.08) rotate(-4deg);
  background: var(--brand);
  color: #fff;
}

.social-text { display: flex; flex-direction: column; gap: 2px; }

.social-text strong { font-size: 16.5px; font-weight: 600; }

.social-text small {
  font-size: 13px;
  color: var(--ink-soft);
}

.social-arrow {
  margin-left: auto;
  font-size: 18px;
  color: var(--brand);
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 0.3s, transform 0.35s var(--ease-spring);
}

.social-card:hover .social-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* ─────────── 项目展示 ─────────── */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 32px 34px 30px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--ink);
  overflow: hidden;
  transition: transform 0.45s var(--ease-spring), box-shadow 0.45s var(--ease-smooth);
}

/* 顶部渐变光带，悬停时浮现 */
.project-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--mint), var(--sky), var(--lavender));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s var(--ease-smooth);
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

.project-card:hover::before { transform: scaleX(1); }

.project-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.project-icon {
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  border-radius: 14px;
  color: #3a86c8;
  background: linear-gradient(135deg, rgba(168, 230, 207, 0.4), rgba(127, 200, 248, 0.35));
  transition: transform 0.4s var(--ease-spring);
}

.project-card:hover .project-icon { transform: scale(1.08) rotate(-4deg); }

.project-repo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--ink-soft);
  letter-spacing: 0.3px;
}

.project-card h3 {
  font-family: "Noto Serif SC", serif;
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 10px;
}

.project-card > p {
  font-size: 14.5px;
  color: var(--ink-soft);
  flex: 1;
}

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

.project-tags li {
  padding: 4px 13px;
  font-size: 12px;
  color: var(--ink-soft);
  border-radius: 100px;
  border: 1px solid rgba(127, 200, 248, 0.4);
  background: rgba(255, 255, 255, 0.55);
}

.project-arrow {
  position: absolute;
  right: 26px; bottom: 24px;
  font-size: 18px;
  color: var(--sky);
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 0.3s, transform 0.35s var(--ease-spring);
}

.project-card:hover .project-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* ─────────── 页脚 ─────────── */
.footer {
  text-align: center;
  padding: 48px 24px 40px;
  font-size: 13.5px;
  color: var(--ink-soft);
  letter-spacing: 1px;
}

/* ─────────── 入场 & 滚动显现动画 ─────────── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease-smooth), transform 0.9s var(--ease-smooth);
}

.reveal[data-delay="1"] { transition-delay: 0.10s; }
.reveal[data-delay="2"] { transition-delay: 0.22s; }
.reveal[data-delay="3"] { transition-delay: 0.34s; }
.reveal[data-delay="4"] { transition-delay: 0.46s; }

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─────────── 响应式 ─────────── */
@media (max-width: 640px) {
  .nav { gap: 22px; padding: 10px 20px; }
  .nav-links { gap: 16px; }
  .about-card { padding: 30px 26px; }
  .ai-card-body { padding: 38px 30px 34px; }
  .social-grid { grid-template-columns: 1fr; }
}

/* ─────────── 尊重减弱动画偏好 ─────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
