/* 苹果风格优化 - 自定义CSS */
:root {
  --apple-blue: #0071e3;
  --apple-gray: #f5f5f7;
  --apple-black: #1d1d1f;
  --apple-white: #ffffff;
  --apple-shadow: rgba(0, 0, 0, 0.22) 3px 5px 30px 0px;
}

/* 全局样式 */
body {
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--apple-black);
  background: var(--apple-gray);
  line-height: 1.47;
  letter-spacing: -0.374px;
  margin: 0;
  padding: 0;
}

/* 导航栏 - 苹果风格玻璃效果 */
#nav {
  background: rgba(0, 0, 0, 0.8) !important;
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  height: 48px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#nav a, #nav span {
  color: var(--apple-white) !important;
  font-size: 12px;
  font-weight: 400;
}

/* 主内容区域 */
.page {
  background: var(--apple-gray);
  min-height: 100vh;
}

/* 文章卡片 - 苹果风格卡片 */
.recent-post-item {
  background: var(--apple-white);
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 16px;
  box-shadow: var(--apple-shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.recent-post-item:hover {
  transform: translateY(-2px);
  box-shadow: rgba(0, 0, 0, 0.3) 4px 6px 35px 0px;
}

.article-title {
  color: var(--apple-black);
  font-size: 28px;
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: 0.196px;
  text-decoration: none;
  transition: color 0.3s ease;
}

.article-title:hover {
  color: var(--apple-blue);
}

.article-meta-wrap {
  margin-top: 12px;
  font-size: 14px;
  color: rgba(0, 0, 0, 0.8);
}

.article-meta-wrap a {
  color: var(--apple-blue);
  text-decoration: none;
}

.article-meta-wrap a:hover {
  text-decoration: underline;
}

/* 文章内容 */
.content {
  margin-top: 16px;
  font-size: 17px;
  line-height: 1.47;
  color: rgba(0, 0, 0, 0.8);
}

/* 侧边栏卡片 */
.card-widget {
  background: var(--apple-white);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--apple-shadow);
}

.card-widget .item-headline {
  font-size: 21px;
  font-weight: 600;
  color: var(--apple-black);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

/* 分类列表 */
.card-category-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.card-category-list-item {
  margin-bottom: 8px;
}

.card-category-list-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  color: var(--apple-black);
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.3s ease;
}

.card-category-list-link:hover {
  background: rgba(0, 113, 227, 0.1);
  color: var(--apple-blue);
}

.card-category-list-name {
  font-size: 17px;
  font-weight: 400;
}

.card-category-list-count {
  background: var(--apple-blue);
  color: var(--apple-white);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

/* 标签云 */
.card-tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.card-tag-cloud a {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(0, 113, 227, 0.1);
  color: var(--apple-blue);
  text-decoration: none;
  border-radius: 16px;
  font-size: 14px;
  transition: background 0.3s ease;
}

.card-tag-cloud a:hover {
  background: var(--apple-blue);
  color: var(--apple-white);
}

/* 按钮风格 */
a, button {
  color: var(--apple-blue);
  transition: opacity 0.3s ease;
}

a:hover, button:hover {
  opacity: 0.7;
}

/* 主页标题 */
#site-title {
  font-size: 56px;
  font-weight: 600;
  color: var(--apple-black);
  line-height: 1.07;
  letter-spacing: -0.28px;
  text-align: center;
  margin-bottom: 16px;
}

#site-subtitle {
  font-size: 21px;
  font-weight: 400;
  color: rgba(0, 0, 0, 0.8);
  text-align: center;
  margin-bottom: 32px;
}

/* 社交图标 */
.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.05);
  color: var(--apple-black);
  text-decoration: none;
  transition: background 0.3s ease;
}

.social-icon:hover {
  background: var(--apple-blue);
  color: var(--apple-white);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .recent-post-item {
    padding: 16px;
    margin-bottom: 12px;
  }
  
  .article-title {
    font-size: 24px;
  }
  
  #site-title {
    font-size: 40px;
  }
  
  #site-subtitle {
    font-size: 18px;
  }
  
  .card-widget {
    padding: 16px;
    margin-bottom: 12px;
  }
}

@media (max-width: 480px) {
  .recent-post-item {
    padding: 12px;
  }
  
  .article-title {
    font-size: 20px;
  }
  
  #site-title {
    font-size: 32px;
  }
  
  #site-subtitle {
    font-size: 16px;
  }
}

/* 滚动条样式 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--apple-gray);
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
}

/* 选中文本样式 */
::selection {
  background: rgba(0, 113, 227, 0.3);
  color: var(--apple-black);
}

/* 焦点样式 - 无障碍访问 */
:focus-visible {
  outline: 2px solid var(--apple-blue);
  outline-offset: 2px;
}


/* 重构后的样式 */

/* 导航栏 */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 70px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  z-index: 1000;
  transition: all 0.3s ease;
}

.nav.scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 24px;
  font-weight: 700;
  color: var(--apple-black);
  text-decoration: none;
  transition: color 0.3s ease;
}

.nav-logo:hover {
  color: var(--apple-blue);
}

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

.nav-link {
  color: rgba(0, 0, 0, 0.8);
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--apple-blue);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--apple-blue);
  transition: width 0.3s ease;
}

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

.nav-social {
  display: flex;
  gap: 16px;
}

.social-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--apple-black);
  text-decoration: none;
  transition: all 0.3s ease;
}

.social-icon:hover {
  background: var(--apple-blue);
  color: white;
  transform: translateY(-2px);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--apple-black);
  cursor: pointer;
}

/* 主页头部 */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 120px 24px 80px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  position: relative;
}

.hero-content {
  max-width: 800px;
  margin-bottom: 60px;
}

.hero-title {
  font-size: 64px;
  font-weight: 800;
  margin-bottom: 24px;
  line-height: 1.1;
  letter-spacing: -2px;
}

.hero-subtitle {
  font-size: 24px;
  font-weight: 300;
  margin-bottom: 32px;
  opacity: 0.9;
}

.hero-tags {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 40px;
}

.tag {
  padding: 8px 20px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50px;
  font-size: 14px;
  font-weight: 500;
  backdrop-filter: blur(10px);
}

.hero-cta {
  display: flex;
  gap: 16px;
  justify-content: center;
}

.btn {
  padding: 14px 32px;
  border-radius: 50px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: white;
  color: var(--apple-blue);
}

.btn-primary:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
  background: transparent;
  color: white;
  border: 2px solid white;
}

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

.btn-outline {
  background: transparent;
  color: var(--apple-blue);
  border: 2px solid var(--apple-blue);
}

.btn-outline:hover {
  background: var(--apple-blue);
  color: white;
}

.hero-scroll {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0) translateX(-50%);
  }
  40% {
    transform: translateY(-20px) translateX(-50%);
  }
  60% {
    transform: translateY(-10px) translateX(-50%);
  }
}

/* 区块样式 */
.section {
  padding: 100px 0;
}

.section-alt {
  background: var(--apple-gray);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-title {
  font-size: 48px;
  font-weight: 700;
  color: var(--apple-black);
  text-align: center;
  margin-bottom: 60px;
  line-height: 1.2;
}

.section-cta {
  text-align: center;
  margin-top: 60px;
}

/* 文章卡片网格 */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
}

.post-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.post-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.post-card-content {
  padding: 30px;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 14px;
  color: rgba(0, 0, 0, 0.6);
}

.post-category {
  padding: 4px 12px;
  background: rgba(0, 113, 227, 0.1);
  color: var(--apple-blue);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.post-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.3;
}

.post-title a {
  color: var(--apple-black);
  text-decoration: none;
  transition: color 0.3s ease;
}

.post-title a:hover {
  color: var(--apple-blue);
}

.post-excerpt {
  font-size: 16px;
  line-height: 1.6;
  color: rgba(0, 0, 0, 0.7);
  margin-bottom: 20px;
}

.read-more {
  color: var(--apple-blue);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.3s ease;
}

.read-more:hover {
  color: #0056b3;
  transform: translateX(5px);
}

/* 分类网格 */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
}

.category-card {
  background: white;
  padding: 40px 30px;
  border-radius: 16px;
  text-align: center;
  text-decoration: none;
  color: var(--apple-black);
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.category-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.category-icon {
  font-size: 48px;
  margin-bottom: 20px;
}

.category-card h3 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
}

.category-card p {
  font-size: 16px;
  color: rgba(0, 0, 0, 0.7);
}

/* 关于预览 */
.about-preview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.about-content {
  padding-right: 40px;
}

.about-content p {
  font-size: 18px;
  line-height: 1.8;
  color: rgba(0, 0, 0, 0.8);
  margin-bottom: 24px;
}

.about-image {
  position: relative;
}

.about-image img {
  width: 100%;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* 页脚 */
.footer {
  background: var(--apple-black);
  color: white;
  padding: 80px 0 40px;
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 60px;
  margin-bottom: 60px;
}

.footer-logo {
  font-size: 28px;
  font-weight: 700;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: white;
}

.footer-social {
  display: flex;
  gap: 16px;
}

.footer-social a {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-decoration: none;
  transition: all 0.3s ease;
}

.footer-social a:hover {
  background: var(--apple-blue);
  transform: translateY(-2px);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 30px;
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
}

.footer-bottom a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
}

.footer-bottom a:hover {
  color: white;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .nav-menu {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    padding: 20px;
    gap: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  }
  
  .nav-menu.active {
    display: flex;
  }
  
  .nav-toggle {
    display: block;
  }
  
  .hero-title {
    font-size: 48px;
  }
  
  .hero-subtitle {
    font-size: 20px;
  }
  
  .hero-cta {
    flex-direction: column;
    align-items: center;
  }
  
  .section-title {
    font-size: 36px;
  }
  
  .posts-grid {
    grid-template-columns: 1fr;
  }
  
  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .about-preview {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .about-content {
    padding-right: 0;
    text-align: center;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 36px;
  }
  
  .hero-subtitle {
    font-size: 18px;
  }
  
  .categories-grid {
    grid-template-columns: 1fr;
  }
  
  .section {
    padding: 60px 0;
  }
}


/* 关于页面样式 */

/* 页面头部 */
.page-header {
  padding: 120px 0 60px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  text-align: center;
}

.page-title {
  font-size: 48px;
  font-weight: 700;
  margin-bottom: 16px;
}

.page-subtitle {
  font-size: 20px;
  font-weight: 300;
  opacity: 0.9;
}

/* 关于页面网格 */
.about-grid {
  display: grid;
  gap: 60px;
}

/* 个人信息卡片 */
.about-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 40px;
  align-items: center;
  background: white;
  padding: 40px;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.about-avatar img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.about-info h2 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--apple-black);
}

.about-role {
  font-size: 18px;
  color: var(--apple-blue);
  font-weight: 500;
  margin-bottom: 12px;
}

.about-motto {
  font-size: 16px;
  color: rgba(0, 0, 0, 0.7);
  font-style: italic;
  margin-bottom: 20px;
}

.about-social {
  display: flex;
  gap: 12px;
}

.about-social a {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0, 113, 227, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--apple-blue);
  text-decoration: none;
  transition: all 0.3s ease;
}

.about-social a:hover {
  background: var(--apple-blue);
  color: white;
  transform: translateY(-2px);
}

/* 关于区块 */
.about-section {
  background: white;
  padding: 40px;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.about-section h3 {
  font-size: 24px;
  font-weight: 700;
  color: var(--apple-black);
  margin-bottom: 30px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.about-section h3 i {
  color: var(--apple-blue);
  font-size: 20px;
}

/* 时间线 */
.timeline {
  position: relative;
  padding-left: 30px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--apple-blue), rgba(0, 113, 227, 0.3));
}

.timeline-item {
  position: relative;
  margin-bottom: 30px;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -35px;
  top: 5px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--apple-blue);
  border: 3px solid white;
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.3);
}

.timeline-content h4 {
  font-size: 20px;
  font-weight: 700;
  color: var(--apple-black);
  margin-bottom: 8px;
}

.timeline-date {
  font-size: 14px;
  color: var(--apple-blue);
  font-weight: 600;
  margin-bottom: 8px;
}

.timeline-content p {
  font-size: 16px;
  line-height: 1.6;
  color: rgba(0, 0, 0, 0.8);
  margin-bottom: 8px;
}

.timeline-content ul {
  list-style: none;
  padding: 0;
  margin-top: 12px;
}

.timeline-content ul li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 8px;
  font-size: 16px;
  color: rgba(0, 0, 0, 0.8);
}

.timeline-content ul li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--apple-blue);
  font-weight: bold;
}

/* 技能网格 */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
}

.skill-category h4 {
  font-size: 18px;
  font-weight: 600;
  color: var(--apple-black);
  margin-bottom: 16px;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-tag {
  padding: 8px 16px;
  background: rgba(0, 113, 227, 0.1);
  color: var(--apple-blue);
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.skill-tag:hover {
  background: var(--apple-blue);
  color: white;
  transform: translateY(-2px);
}

/* 爱好网格 */
.hobbies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
}

.hobby-item {
  text-align: center;
  padding: 30px 20px;
  border-radius: 12px;
  background: rgba(0, 113, 227, 0.05);
  transition: all 0.3s ease;
}

.hobby-item:hover {
  background: rgba(0, 113, 227, 0.1);
  transform: translateY(-4px);
}

.hobby-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.hobby-item h4 {
  font-size: 18px;
  font-weight: 600;
  color: var(--apple-black);
  margin-bottom: 8px;
}

.hobby-item p {
  font-size: 14px;
  color: rgba(0, 0, 0, 0.7);
  line-height: 1.5;
}

/* 联系方式网格 */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  border-radius: 12px;
  background: rgba(0, 113, 227, 0.05);
  transition: all 0.3s ease;
}

.contact-item:hover {
  background: rgba(0, 113, 227, 0.1);
}

.contact-item i {
  font-size: 24px;
  color: var(--apple-blue);
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 113, 227, 0.1);
  border-radius: 50%;
}

.contact-item h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--apple-black);
  margin-bottom: 4px;
}

.contact-item p,
.contact-item a {
  font-size: 14px;
  color: rgba(0, 0, 0, 0.7);
  text-decoration: none;
}

.contact-item a:hover {
  color: var(--apple-blue);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .about-card {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 30px;
  }
  
  .about-avatar {
    display: flex;
    justify-content: center;
  }
  
  .about-social {
    justify-content: center;
  }
  
  .skills-grid {
    grid-template-columns: 1fr;
  }
  
  .hobbies-grid {
    grid-template-columns: 1fr;
  }
  
  .contact-grid {
    grid-template-columns: 1fr;
  }
  
  .page-title {
    font-size: 36px;
  }
}
