:root {
  --text: #6b6375;
  --text-h: #08060d;
  --bg: #fff;
  --border: #e5e4e7;
  --code-bg: #f4f3ec;
  --accent: #aa3bff;
  --accent-bg: rgba(170, 59, 255, 0.1);
  --accent-border: rgba(170, 59, 255, 0.5);
  --social-bg: rgba(244, 243, 236, 0.5);
  --shadow:
    rgba(0, 0, 0, 0.1) 0 10px 15px -3px, rgba(0, 0, 0, 0.05) 0 4px 6px -2px;

  --sans: system-ui, 'Segoe UI', Roboto, sans-serif;
  --heading: system-ui, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, Consolas, monospace;

  font: 18px/145% var(--sans);
  letter-spacing: 0.18px;
  color-scheme: light dark;
  color: var(--text);
  background: var(--bg);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  @media (max-width: 1024px) {
    font-size: 16px;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #9ca3af;
    --text-h: #f3f4f6;
    --bg: #16171d;
    --border: #2e303a;
    --code-bg: #1f2028;
    --accent: #c084fc;
    --accent-bg: rgba(192, 132, 252, 0.15);
    --accent-border: rgba(192, 132, 252, 0.5);
    --social-bg: rgba(47, 48, 58, 0.5);
    --shadow:
      rgba(0, 0, 0, 0.4) 0 10px 15px -3px, rgba(0, 0, 0, 0.25) 0 4px 6px -2px;
  }

  #social .button-icon {
    filter: invert(1) brightness(2);
  }
}

body {
  margin: 0;
}

#root {
  width: 1126px;
  max-width: 100%;
  margin: 0 auto;
  text-align: center;
  border-inline: 1px solid var(--border);
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

h1,
h2 {
  font-family: var(--heading);
  font-weight: 500;
  color: var(--text-h);
}

h1 {
  font-size: 56px;
  letter-spacing: -1.68px;
  margin: 32px 0;
  @media (max-width: 1024px) {
    font-size: 36px;
    margin: 20px 0;
  }
}
h2 {
  font-size: 24px;
  line-height: 118%;
  letter-spacing: -0.24px;
  margin: 0 0 8px;
  @media (max-width: 1024px) {
    font-size: 20px;
  }
}
p {
  margin: 0;
}

code,
.counter {
  font-family: var(--mono);
  display: inline-flex;
  border-radius: 4px;
  color: var(--text-h);
}

code {
  font-size: 15px;
  line-height: 135%;
  padding: 4px 8px;
  background: var(--code-bg);
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-padding-bottom: 20px;
}

:root {
  --primary-color: #2563eb;
  --secondary-color: #64748b;
  --accent-color: #3b82f6;
  --bg-color: #ffffff;
  --text-color: #1e293b;
  --light-bg: #f8fafc;
  --border-color: #e2e8f0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: var(--text-color);
  line-height: 1.6;
}

.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
  padding-bottom: 30px;
}

section {
  padding: 80px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--text-color);
  margin-bottom: 1rem;
}

h2 {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 3rem;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

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

.btn {
  display: inline-block;
  padding: 12px 32px;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.btn:hover {
  background-color: var(--accent-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
  color: white;
}

.btn-secondary {
  background-color: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
}

.btn-secondary:hover {
  background-color: var(--primary-color);
  color: white;
}

.footer {
  background-color: var(--light-bg);
  padding: 2rem;
  text-align: center;
  color: var(--secondary-color);
  border-top: 1px solid var(--border-color);
}

/* ========== 全局动画关键帧 ========== */

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

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-100%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========== 滚动揭示系统 ========== */

[data-reveal] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

/* 变体：从左滑入 */
[data-reveal="left"] {
  transform: translateX(-30px);
}

[data-reveal="left"].revealed {
  transform: translateX(0);
}

/* 变体：从右滑入 */
[data-reveal="right"] {
  transform: translateX(30px);
}

[data-reveal="right"].revealed {
  transform: translateX(0);
}

/* 变体：缩放弹入 */
[data-reveal="scale"] {
  transform: scale(0.85);
}

[data-reveal="scale"].revealed {
  transform: scale(1);
}

/* 延迟工具类 */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }
.delay-6 { transition-delay: 0.6s; }

/* ========== 响应式 ========== */

@media (max-width: 768px) {
  section {
    padding: 60px 16px;
  }

  h2 {
    font-size: 2rem;
  }
}
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 80px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.hero-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-greeting {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  opacity: 0;
  animation: fadeInUp 0.6s ease 0.2s forwards;
}

.hero-name {
  font-size: 4rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: white;
  opacity: 0;
  animation: fadeInUp 0.6s ease 0.4s forwards;
}

.hero-title {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeInUp 0.6s ease 0.6s forwards;
}

.hero-description {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  line-height: 1.8;
  opacity: 0;
  animation: fadeInUp 0.6s ease 0.8s forwards;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeInUp 0.6s ease 1.0s forwards;
}

.hero-buttons .btn {
  background-color: white;
  color: var(--primary-color);
}

.hero-buttons .btn:hover {
  background-color: rgba(255, 255, 255, 0.9);
  color: var(--primary-color);
}

.hero-buttons .btn-secondary {
  background-color: transparent;
  border: 2px solid white;
  color: white;
}

.hero-buttons .btn-secondary:hover {
  background-color: white;
  color: var(--primary-color);
}

.hero-image {
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  animation: fadeInRight 0.8s ease 0.5s forwards;
}

.hero-image-placeholder {
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.1) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  font-weight: 700;
  color: white;
  border: 4px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.1), 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: scaleIn 0.8s ease 0.5s forwards, pulse 3s ease-in-out 1.4s infinite;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

@keyframes pulse {
  0%, 100% {
    box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.1), 0 20px 60px rgba(0, 0, 0, 0.3);
  }
  50% {
    box-shadow: 0 0 0 12px rgba(255, 255, 255, 0.15), 0 20px 60px rgba(0, 0, 0, 0.3);
  }
}

@media (max-width: 768px) {
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-name {
    font-size: 2.5rem;
  }

  .hero-image {
    order: -1;
  }

  .hero-image-placeholder {
    width: 200px;
    height: 200px;
  }

  .hero-buttons {
    justify-content: center;
  }
}
.about {
  background-color: var(--light-bg);
}

.about-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.about-content {
  display: grid;
  grid-template-columns: auto 2fr 1fr;
  gap: 3rem;
  align-items: start;
}

.about-avatar {
  display: flex;
  justify-content: center;
}

.avatar-image {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border: 4px solid white;
}

.about-text p {
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--secondary-color);
}

.about-text h3 {
  margin-top: 2rem;
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
}

.skills-heading {
  margin-top: 3rem;
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 1rem;
  margin-bottom: 2rem;
}

.skill-category {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.skill-category h4 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.skill-category ul {
  list-style: none;
}

.skill-category li {
  padding: 0.5rem 0;
  color: var(--secondary-color);
  position: relative;
  padding-left: 1.5rem;
}

.skill-category li::before {
  content: "";
}

.section-icon {
  margin-right: 0.5rem;
  font-size: 2rem;
  vertical-align: middle;
}

.subsection-icon {
  margin-right: 0.5rem;
  font-size: 1.3rem;
  vertical-align: middle;
}

.skill-icon {
  margin-right: 0.4rem;
  font-size: 1.1rem;
  vertical-align: middle;
}

.list-icon {
  margin-right: 0.3rem;
  font-size: 0.9rem;
  vertical-align: middle;
}

.about-stats {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.stat-icon {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.stat-item {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-number {
  display: block;
  font-size: 3rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.stat-label {
  color: var(--secondary-color);
  font-size: 1rem;
}

@media (max-width: 768px) {
  .about-content {
    grid-template-columns: 1fr;
  }

  .about-avatar {
    order: -1;
  }

  .avatar-image {
    width: 150px;
    height: 150px;
  }

  .about-stats {
    flex-direction: row;
    justify-content: space-around;
  }

  .stat-item {
    padding: 1.5rem;
  }

  .stat-number {
    font-size: 2rem;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }

  .skills-heading {
    margin-top: 2rem;
  }
}
.projects {
  background-color: white;
}

.projects-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
}

.project-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.project-image {
  height: 200px;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
}

.project-image-icon {
  font-size: 4rem;
  opacity: 0.8;
}

.section-icon {
  margin-right: 0.5rem;
  font-size: 2rem;
  vertical-align: middle;
}

.project-title-icon {
  margin-right: 0.4rem;
  font-size: 1.1rem;
  vertical-align: middle;
}

.tag-icon {
  margin-right: 0.2rem;
  font-size: 0.8rem;
  vertical-align: middle;
}

.btn-icon {
  margin-right: 0.3rem;
  font-size: 0.9rem;
  vertical-align: middle;
}

.project-content {
  padding: 1.5rem;
}

.project-content h3 {
  font-size: 1.3rem;
  margin-bottom: 0.8rem;
}

.project-content p {
  color: var(--secondary-color);
  margin-bottom: 1rem;
  line-height: 1.6;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.tag {
  background-color: var(--light-bg);
  color: var(--primary-color);
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
}

.project-links {
  display: flex;
  gap: 1rem;
}

.project-links .btn {
  flex: 1;
  text-align: center;
  padding: 10px 20px;
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }
}
.blog {
  background-color: var(--light-bg);
}

.blog-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.blog-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.blog-card-content {
  padding: 1.5rem;
}

.blog-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  color: var(--secondary-color);
}

.blog-card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.8rem;
  line-height: 1.4;
}

.blog-card p {
  color: var(--secondary-color);
  margin-bottom: 1rem;
  line-height: 1.6;
}

.blog-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.blog-tag {
  color: var(--primary-color);
  font-size: 0.85rem;
}

.section-icon {
  margin-right: 0.5rem;
  font-size: 2rem;
  vertical-align: middle;
}

.intro-icon {
  margin-right: 0.3rem;
  font-size: 1rem;
  vertical-align: middle;
}

.meta-icon {
  margin-right: 0.2rem;
  font-size: 0.8rem;
  vertical-align: middle;
}

.blog-title-icon {
  margin-right: 0.3rem;
  font-size: 1rem;
  vertical-align: middle;
}

.blog-tag-icon {
  margin-right: 0.2rem;
  font-size: 0.7rem;
  vertical-align: middle;
}

.read-more-icon {
  margin-right: 0.2rem;
  font-size: 0.9rem;
  vertical-align: middle;
}

.btn-icon {
  margin-right: 0.3rem;
  font-size: 0.9rem;
  vertical-align: middle;
}

.blog-read-more {
  display: inline-block;
  color: var(--primary-color);
  font-weight: 600;
  text-decoration: none;
  transition: gap 0.3s ease;
}

.blog-read-more:hover {
  gap: 8px;
}

.blog-cta {
  text-align: center;
}

@media (max-width: 768px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }
}
.contact {
  background-color: white;
}

.contact-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* TODO: 表单恢复后改回 grid-template-columns: 1fr 1fr */
.contact-content {
  max-width: 680px;
  margin: 0 auto;
  align-items: start;
}

.contact-info h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.contact-info > p {
  color: var(--secondary-color);
  margin-bottom: 2.5rem;
  line-height: 1.8;
}

.contact-details {
  margin-bottom: 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.contact-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}

.contact-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.contact-row strong {
  color: var(--text-color);
  font-size: 1.05rem;
}

.contact-item a {
  color: var(--primary-color);
  text-decoration: none;
  font-size: 1rem;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.social-link {
  display: inline-block;
  padding: 0.5rem 1rem;
  background-color: var(--light-bg);
  color: var(--primary-color);
  text-decoration: none;
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.social-link:hover {
  background-color: var(--primary-color);
  color: white;
}

.section-icon {
  margin-right: 0.5rem;
  font-size: 2rem;
  vertical-align: middle;
}

.contact-heading-icon {
  margin-right: 0.5rem;
  font-size: 1.3rem;
  vertical-align: middle;
}

.contact-icon {
  font-size: 1.3rem;
  color: var(--primary-color);
  flex-shrink: 0;
  margin-top: 0.2rem;
}

.social-icon {
  margin-right: 0.3rem;
  font-size: 1rem;
  vertical-align: middle;
}

.form-icon {
  margin-right: 0.3rem;
  font-size: 0.9rem;
  vertical-align: middle;
}

.btn-icon {
  margin-right: 0.3rem;
  font-size: 0.9rem;
  vertical-align: middle;
}

.contact-form {
  background: var(--light-bg);
  padding: 2rem;
  border-radius: 12px;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-color);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.3s ease;
  background-color: white;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
}

.contact-form .btn {
  width: 100%;
  border: none;
  cursor: pointer;
}

@media (max-width: 768px) {
  .contact-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .contact-form {
    padding: 1.5rem;
  }
}
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
  z-index: 1000;
  padding: 1rem 0;
  animation: slideDown 0.6s ease forwards;
}

.navbar-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navbar-logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-icon {
  font-size: 1.8rem;
}

.nav-icon {
  margin-right: 0.3rem;
  font-size: 1.1rem;
}

.navbar-menu a {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
  display: flex;
  align-items: center;
}

.navbar-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.navbar-menu a {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.navbar-menu a:hover {
  color: var(--primary-color);
}

.navbar-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}

.navbar-toggle span {
  width: 25px;
  height: 3px;
  background-color: var(--text-color);
  transition: all 0.3s ease;
}

@media (max-width: 768px) {
  .navbar-toggle {
    display: flex;
  }

  .navbar-menu {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background-color: white;
    flex-direction: column;
    padding: 2rem;
    gap: 1.5rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transform: translateY(-100%);
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
  }

  .navbar-menu.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }
}
