/* ========================================
   周玉彤 - 个人主页
   四页分页 · 蓝绿渐变 · 毛玻璃质感
   ======================================== */

:root {
  --primary-50: #ecfdf5;
  --primary-100: #d1fae5;
  --primary-200: #a7f3d0;
  --primary-300: #6ee7b7;
  --primary-400: #34d399;
  --primary-500: #10b981;
  --primary-600: #059669;
  --primary-700: #047857;

  --blue-50: #eff6ff;
  --blue-100: #dbeafe;
  --blue-200: #bfdbfe;
  --blue-400: #60a5fa;
  --blue-500: #3b82f6;
  --blue-600: #2563eb;

  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;

  --text-primary: var(--gray-800);
  --text-secondary: var(--gray-500);
  --text-muted: var(--gray-400);
  --bg-body: #f0fdf4;
  --bg-card: rgba(255, 255, 255, 0.82);
  --shadow-sm: 0 1px 3px rgba(16, 185, 129, 0.06), 0 1px 2px rgba(16, 185, 129, 0.04);
  --shadow-md: 0 4px 20px rgba(16, 185, 129, 0.08), 0 2px 8px rgba(16, 185, 129, 0.04);
  --shadow-lg: 0 8px 40px rgba(16, 185, 129, 0.12), 0 4px 16px rgba(16, 185, 129, 0.06);
  --shadow-xl: 0 20px 60px rgba(16, 185, 129, 0.15);
  --radius-sm: 8px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; scroll-snap-type: y mandatory; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
  color: var(--text-primary);
  line-height: 1.7;
  background: var(--bg-body);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }

::selection { background: var(--primary-200); color: var(--primary-700); }

/* ---------- 全屏页面 ---------- */
.page-section {
  width: 100%;
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  scroll-snap-align: start;
}

.page-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.page-bg img {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

.bg-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg,
      rgba(16, 185, 129, 0.25) 0%,
      rgba(59, 130, 246, 0.15) 50%,
      rgba(16, 185, 129, 0.1) 100%
    );
}

.bg-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(255, 255, 255, 0.4) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 50%, rgba(16, 185, 129, 0.08) 0%, transparent 50%);
  animation: overlayShift 8s ease-in-out infinite alternate;
}

@keyframes overlayShift {
  0% { transform: scale(1); opacity: 0.7; }
  100% { transform: scale(1.1); opacity: 1; }
}

.page-content {
  position: relative;
  z-index: 2;
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 100px 24px 120px;
}

.page-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 40px;
  letter-spacing: -0.02em;
  text-align: center;
}

.page-title i {
  color: var(--primary-500);
  margin: 0 8px;
}

/* ---------- 首页 ---------- */
.avatar-container {
  margin-bottom: 28px;
  perspective: 800px;
}

.avatar {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid rgba(255, 255, 255, 0.9);
  box-shadow:
    0 0 0 8px rgba(16, 185, 129, 0.15),
    0 20px 60px rgba(16, 185, 129, 0.2);
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease;
  animation: avatarIn 1s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s both;
}

.avatar:hover {
  transform: scale(1.08) rotate(-3deg);
  box-shadow:
    0 0 0 12px rgba(16, 185, 129, 0.2),
    0 30px 80px rgba(16, 185, 129, 0.3);
}

@keyframes avatarIn {
  from { opacity: 0; transform: scale(0.6) rotate(-10deg); }
  to { opacity: 1; transform: scale(1) rotate(0deg); }
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 3.5rem);
  font-weight: 800;
  color: var(--gray-800);
  margin-bottom: 12px;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 20px rgba(255, 255, 255, 0.5);
  animation: fadeUp 0.8s ease 0.4s both;
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: var(--text-secondary);
  margin-bottom: 28px;
  font-weight: 400;
  animation: fadeUp 0.8s ease 0.6s both;
}

.hero-motto {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 32px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 100px;
  box-shadow:
    0 4px 24px rgba(16, 185, 129, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  margin-bottom: 40px;
  border: 1px solid rgba(16, 185, 129, 0.12);
  animation: fadeUp 0.8s ease 0.8s both;
  transition: var(--transition);
}

.hero-motto:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 8px 40px rgba(16, 185, 129, 0.15);
}

.hero-motto i {
  color: var(--primary-500);
  font-size: 1rem;
  opacity: 0.7;
}

.hero-motto span {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  font-weight: 600;
  background: linear-gradient(135deg, var(--primary-600), var(--blue-500));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.05em;
}

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

.scroll-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  transition: var(--transition);
  animation: fadeUp 0.8s ease 1s both;
}

.scroll-btn:hover {
  color: var(--primary-500);
  transform: translateY(4px);
}

.scroll-btn i {
  font-size: 1.2rem;
  animation: scrollBounce 2.5s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(8px); }
  60% { transform: translateY(4px); }
}

/* 浮动装饰 */
.floating-deco {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.deco-item {
  position: absolute;
  font-size: 1.8rem;
  animation: floatDeco 7s ease-in-out infinite;
  opacity: 0.4;
  color: var(--primary-400);
}

.deco-item:nth-child(1) { top: 10%; left: 8%; animation-delay: 0s; }
.deco-item:nth-child(2) { top: 15%; right: 12%; animation-delay: 1.2s; }
.deco-item:nth-child(3) { bottom: 20%; left: 10%; animation-delay: 2.4s; }
.deco-item:nth-child(4) { bottom: 15%; right: 15%; animation-delay: 3.6s; }

@keyframes floatDeco {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  33% { transform: translateY(-15px) rotate(8deg); }
  66% { transform: translateY(-8px) rotate(-5deg); }
}

/* ---------- 页面导航 ---------- */
.page-nav {
  position: fixed;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 100;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 100px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.nav-btn:hover,
.nav-btn.active {
  background: linear-gradient(135deg, var(--primary-400), var(--blue-400));
  color: white;
  border-color: transparent;
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

/* ---------- 关于 ---------- */
.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  width: 100%;
  max-width: 1000px;
}

.about-card {
  background: var(--bg-card);
  padding: 40px 28px;
  border-radius: var(--radius-lg);
  text-align: center;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(16, 185, 129, 0.08);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.about-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-400), var(--blue-400));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.about-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(16, 185, 129, 0.2);
}

.card-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  background: linear-gradient(135deg, var(--primary-100), var(--blue-100));
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.about-card:hover .card-icon {
  transform: scale(1.1) rotate(-5deg);
  box-shadow: 0 8px 30px rgba(16, 185, 129, 0.2);
}

.card-icon i {
  font-size: 1.6rem;
  background: linear-gradient(135deg, var(--primary-500), var(--blue-500));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.about-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.about-card p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

/* ---------- 经历 ---------- */
.experience-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  width: 100%;
  max-width: 800px;
}

.experience-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(16, 185, 129, 0.08);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.experience-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(16, 185, 129, 0.2);
}

.exp-img {
  height: 220px;
  overflow: hidden;
}

.exp-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.experience-card:hover .exp-img img {
  transform: scale(1.08);
}

.experience-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  padding: 20px 24px 8px;
}

.experience-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
  padding: 0 24px 24px;
}

/* ---------- 联系 ---------- */
.contact-card {
  background: var(--bg-card);
  padding: 48px 56px;
  border-radius: var(--radius-xl);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(16, 185, 129, 0.08);
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  max-width: 500px;
  width: 100%;
}

.contact-card:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-4px);
  border-color: rgba(16, 185, 129, 0.15);
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 24px;
}

.contact-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--primary-100), var(--blue-100));
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition);
}

.contact-card:hover .contact-icon {
  transform: scale(1.05) rotate(-5deg);
}

.contact-icon i {
  font-size: 1.5rem;
  background: linear-gradient(135deg, var(--primary-500), var(--blue-500));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.contact-label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
}

.contact-info a {
  font-size: 1.2rem;
  color: var(--text-primary);
  font-weight: 600;
  transition: var(--transition);
  position: relative;
}

.contact-info a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary-400), var(--blue-400));
  transition: width 0.3s ease;
}

.contact-info a:hover {
  color: var(--primary-600);
}

.contact-info a:hover::after {
  width: 100%;
}

.footer-motto {
  margin-top: 40px;
  font-size: 1.1rem;
  font-weight: 500;
  background: linear-gradient(90deg, var(--primary-400), var(--blue-400));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.05em;
  opacity: 0.8;
}

/* ---------- 滚动条 ---------- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--gray-100); }
::-webkit-scrollbar-thumb { background: linear-gradient(180deg, var(--primary-300), var(--blue-300)); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, var(--primary-400), var(--blue-400)); }

.tech-footer {
    background: linear-gradient(135deg, var(--gray-800), var(--gray-900));
    padding: 30px;
    text-align: center;
}

.tech-support {
    font-size: 0.85rem !important;
    color: var(--text-muted) !important;
}

.tech-support a {
    color: var(--primary-400);
    transition: color 0.3s;
}

.tech-support a:hover {
    color: var(--primary-500);
    text-decoration: underline;
}

/* ---------- 响应式 ---------- */
@media (max-width: 992px) {
  .about-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  html { scroll-snap-type: none; }

  .avatar { width: 140px; height: 140px; }
  .hero-title { font-size: 2.2rem; }
  .hero-motto { padding: 14px 24px; gap: 10px; }
  .hero-motto span { font-size: 1rem; }

  .page-nav { bottom: 20px; gap: 6px; }
  .nav-btn { padding: 8px 14px; font-size: 0.8rem; }

  .about-grid { grid-template-columns: 1fr; gap: 20px; }
  .about-card { padding: 32px 24px; }

  .experience-grid { grid-template-columns: 1fr; gap: 24px; }
  .exp-img { height: 200px; }

  .contact-card { padding: 36px 28px; }
}

@media (max-width: 480px) {
  .avatar { width: 120px; height: 120px; }
  .hero-title { font-size: 1.8rem; }
  .hero-subtitle { font-size: 0.95rem; }

  .about-card { padding: 28px 20px; }
  .card-icon { width: 56px; height: 56px; }
  .card-icon i { font-size: 1.3rem; }

  .contact-card { padding: 28px 20px; }
  .contact-item { flex-direction: column; text-align: center; gap: 16px; }
}
