/* 全局样式 */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Oxygen,
    Ubuntu,
    Cantarell,
    sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: #1f2937;
  background-color: #ffffff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* 容器样式 */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* 头部样式 */
header {
  width: 100%;
  background-color: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(5px);
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(229, 231, 235, 0.5);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo-icon {
  color: #137fec;
  width: 1.75rem;
  height: 1.75rem;
}

.logo-text {
  font-size: 1.125rem;
  font-weight: 700;
  color: #111827;
}

.nav-section {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: #4b5563;
  text-decoration: none;
  transition: color 0.2s;
}

.nav-link:hover {
  color: #137fec;
}

.user-avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  background-size: cover;
  background-position: top;
}

/* 主内容区域 */
main {
  flex-grow: 1;
}

/* Hero 区域 */
.hero-section {
  padding: 5rem 0 6rem;
  text-align: center;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3rem;
}

.hero-text {
  flex: 1;
  text-align: center;
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 900;
  line-height: 1.1;
  color: #111827;
}

.hero-title span {
  color: #137fec;
}

.hero-subtitle {
  font-size: 1.125rem;
  color: #4b5563;
  margin-top: 1rem;
}

.hero-description {
  max-width: 40rem;
  margin: 1.5rem auto 0;
  color: #6b7280;
}

.hero-image {
  flex-shrink: 0;
}

.hero-image-container {
  width: 20rem;
  height: 20rem;
  border-radius: 9999px;
  overflow: hidden;
  box-shadow:
    0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
  border: 4px solid rgba(19, 127, 236, 0.2);
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hobbies-header {
  text-align: center;
  margin-bottom: 3rem;
}

.hero-image-content {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
}

/* 关于我区域（保留样式以兼容其他页面） */
.about-section {
  padding: 5rem 0 6rem;
}

.about-content {
  max-width: 48rem;
  margin: 0 auto;
  text-align: center;
}

.about-title {
  font-size: 2.25rem;
  font-weight: 700;
  color: #111827;
}

.about-description {
  margin-top: 1.5rem;
  color: #4b5563;
  line-height: 1.6;
}

/* 兴趣爱好预览区域 */
.interests-section {
  padding: 5rem 0 6rem;
  background-color: #ffffff;
}

/* 个人技能区域 */
.skills-section {
  padding: 5rem 0 6rem;
  background-color: #f6f7f8;
}
.skills-header {
  text-align: center;
}
.skills-title {
  font-size: 2.25rem;
  font-weight: 700;
  color: #111827;
}
.skills-subtitle {
  font-size: 1.125rem;
  color: #4b5563;
  margin-top: 1rem;
}
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}
.skill-card {
  background-color: #ffffff;
  border-radius: 0.75rem;
  box-shadow:
    0 1px 3px 0 rgba(0, 0, 0, 0.1),
    0 1px 2px 0 rgba(0, 0, 0, 0.06);
  padding: 1.25rem;
  transition:
    transform 0.3s,
    box-shadow 0.3s;
}
.skill-card:hover {
  transform: translateY(-6px);
  box-shadow:
    0 16px 30px rgba(0, 0, 0, 0.08),
    0 6px 12px rgba(0, 0, 0, 0.06);
}
.skill-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  background: rgba(19, 127, 236, 0.08);
  color: #137fec;
  margin-bottom: 0.75rem;
}
.skill-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #111827;
}

/* 技能卡片静态展示 */
.skill-card {
  cursor: default;
}
.skill-card:focus {
  outline: none;
}
.skill-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem;
}
.skill-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.skill-panel {
  margin-top: 0.25rem;
  opacity: 1;
  max-height: none;
  overflow: visible;
}
.skill-desc {
  color: #4b5563;
  line-height: 1.65;
  margin-top: 0.5rem;
}
.interests-header {
  text-align: center;
}
.interests-title {
  font-size: 2.25rem;
  font-weight: 700;
  color: #111827;
}
.interests-subtitle {
  font-size: 1.125rem;
  color: #4b5563;
  margin-top: 1rem;
}
.interests-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}
.interest-card {
  background-color: #ffffff;
  border-radius: 0.75rem;
  box-shadow:
    0 1px 3px 0 rgba(0, 0, 0, 0.1),
    0 1px 2px 0 rgba(0, 0, 0, 0.06);
  padding: 1.25rem;
  transition:
    transform 0.3s,
    box-shadow 0.3s;
}
.interest-card:hover {
  transform: translateY(-6px);
  box-shadow:
    0 16px 30px rgba(0, 0, 0, 0.08),
    0 6px 12px rgba(0, 0, 0, 0.06);
}
.interest-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  background: rgba(19, 127, 236, 0.08);
  color: #137fec;
  margin-bottom: 0.75rem;
}
.interest-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #111827;
}
.interest-description {
  font-size: 0.95rem;
  color: #4b5563;
  margin-top: 0.4rem;
  line-height: 1.65;
}
.interests-actions {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
}

/* 页脚区域 */
footer {
  background-color: #ffffff;
  border-top: 1px solid rgba(229, 231, 235, 0.5);
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 3rem 0;
  gap: 1.5rem;
}

.footer-text {
  font-size: 0.875rem;
  color: #6b7280;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.footer-link {
  color: #6b7280;
  transition: color 0.2s;
}

.footer-link:hover {
  color: #137fec;
}

.footer-icon {
  width: 1.5rem;
  height: 1.5rem;
}

/* ================= 新增美化与动效样式 ================= */
:root {
  --brand: #137fec;
  --brand-600: #0f6ac6;
  --text-900: #111827;
  --text-700: #374151;
  --muted-700: #4b5563;
  --muted-500: #6b7280;
  --surface: #ffffff;
  --surface-subtle: #f6f7f8;
  --ring: rgba(19, 127, 236, 0.2);
}

/* 标题英文装饰 */
.section-title {
  position: relative;
  display: inline-block;
  z-index: 0;
}
.section-title::before {
  content: attr(data-deco);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: clamp(3rem, 12vw, 7rem);
  font-weight: 900;
  line-height: 1;
  color: rgba(17, 24, 39, 0.06);
  letter-spacing: 0.06em;
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
}

/* Header 滚动阴影 */
header.scrolled {
  box-shadow:
    0 6px 24px rgba(0, 0, 0, 0.06),
    0 1px 0 rgba(229, 231, 235, 0.8);
}

/* Hero 背景装饰与层次 */
.hero-section {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(
      1200px 600px at 85% 20%,
      rgba(19, 127, 236, 0.06),
      transparent 60%
    ),
    radial-gradient(
      800px 400px at 10% 80%,
      rgba(19, 127, 236, 0.08),
      transparent 60%
    );
}
.hero-section::before {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  top: -120px;
  right: -140px;
  background: radial-gradient(
    circle,
    rgba(19, 127, 236, 0.18),
    transparent 60%
  );
  filter: blur(40px);
  transform: translateZ(0);
  pointer-events: none;
}

/* 主按钮与次按钮 */
.hero-actions {
  margin-top: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.btn {
  display: inline-block;
  padding: 0.7rem 1.1rem;
  border-radius: 0.625rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
  will-change: transform;
}
.btn:active {
  transform: translateY(1px);
}
.btn:focus {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}
.btn-primary:hover {
  background: var(--brand-600);
  border-color: var(--brand-600);
}

.btn-ghost {
  background: transparent;
  color: var(--brand);
  border-color: var(--ring);
}
.btn-ghost:hover {
  background: rgba(19, 127, 236, 0.08);
  border-color: var(--brand);
}

/* Reveal 进场动画（IntersectionObserver控制） */
.reveal {
  opacity: 0;
  transform: translateY(14px) scale(0.98);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}
.delay-1 {
  transition-delay: 0.08s;
}
.delay-2 {
  transition-delay: 0.16s;
}
.delay-3 {
  transition-delay: 0.24s;
}

/* 头像轻微视差倾斜 */
.parallax-tilt {
  transition: transform 0.3s ease;
  will-change: transform;
}
