:root {
  --primary: #8CB3C9;
  --secondary: #667B5A;
  --accent: #E8A1A6;
  --text: #3A3A3A;
  --background: #F8F4F0;
  --shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
  --particle-color: rgba(232,180,184,0.3);
}

body {
  background-color: var(--background);
  color: var(--text);
  line-height: 1.6;
}

header {
  background: var(--primary);
  padding: 1.5rem;
}

@keyframes cardFloat {
  0% { transform: translateY(0) rotateZ(0deg) scale(1); clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%); }
  50% { transform: translateY(-8px) rotateZ(2deg) scale(1.02); clip-path: polygon(2% 0%, 98% 0%, 100% 98%, 0% 100%); }
  100% { transform: translateY(0) rotateZ(0deg) scale(1); clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%); }
}

@keyframes cardPress {
  0% { transform: scale(1); }
  50% { transform: scale(0.98); }
  100% { transform: scale(1); }
}

.post:active::after {
  opacity: 1;
  animation: ripple 0.6s ease-out;
}

@keyframes ripple {
  to {
    transform: translate(-50%, -50%) scale(2);
    opacity: 0;
  }
}

.post {
  background: rgba(255,255,255,0.85);
  padding: 1.5rem;
  border-radius: 12px;
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
  transition: all 0.4s cubic-bezier(0.34,1.56,0.64,1);
  animation: cardFloat 3s ease-in-out infinite;
  position: relative;
  overflow: hidden;
}

.post::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at center, var(--particle-color) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.3s;
  animation: particleGlow 4s ease-in-out infinite;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

@keyframes particleGlow {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.3); }
}

.post:hover {
  transform: translateY(-3px);
}

.menu-toggle {
  display: none;
  background: transparent;
  border: none;
  padding: 1rem;
  cursor: pointer;
}

.menu-toggle span {
  background: var(--text);
}

@media (max-width: 480px) {
  body {
    -webkit-tap-highlight-color: transparent;
  }
  nav {
    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
  }
  
  nav.active {
    transform: none;
  }

  .post {
    --scale-factor: 0.98;
    animation: cardPress 0.4s ease-out;
  }

  button:active {
    transform: scale(0.96) translateZ(0);
    opacity: 0.9;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  }
}

.post {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

/* 新增模块样式 */
.profile-section {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 2rem;
  padding: 2rem 0;
  background: linear-gradient(to right, var(--background) 40%, rgba(255,255,255,0.9));
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  padding: 2rem 0;
}

.project-gallery {
  column-count: 3;
  column-gap: 2rem;
}

@media (max-width: 768px) {
  .profile-section {
    grid-template-columns: 1fr;
  }
  .project-gallery {
    column-count: 1;
  }
}

.post:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

hljs {
  background: var(--background);
  padding: 1rem;
  border-radius: 4px;
}

.post pre {
  background: var(--background);
  padding: 1rem;
  border-radius: 4px;
  overflow-x: auto;
}

footer {
  background-color: #f5f5f5;
  padding: 20px;
  text-align: center;
  position: fixed;
  bottom: 0;
  width: 100%;
}

.bio-card {
  background: rgba(255,255,255,0.9);
  padding: 2rem;
  border-radius: 16px;
  transition: transform 0.3s ease;
}

.skill-tags {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.tag {
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9em;
}

.tag.react { background: rgba(97,218,251,0.2); }
.tag.node { background: rgba(140,200,75,0.2); }
.tag.aws { background: rgba(255,153,0,0.2); }

.project-card {
  break-inside: avoid;
  margin-bottom: 2rem;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow 0.3s ease;
}

.project-thumbnail {
  height: 200px;
  background: var(--primary);
  position: relative;
}

/* 添加全屏视差效果 */
.parallax-banner {
    height: 100vh;
    background: linear-gradient(135deg, #1a1a1a 0%, #4a4a4a 100%);
    position: relative;
    overflow: hidden;
}

.glass-header {
    position: fixed;
    width: 100%;
    padding: 1.5rem;
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(12px);
    z-index: 1000;
}

.nav-links {
    display: flex;
    gap: 2rem;
    justify-content: flex-end;
}

/* 添加视差动画 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero-text {
    font-size: 4rem;
    color: #fff;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: fadeIn 1.2s ease-out;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    .menu-toggle {
        display: block;
    }
}

/* 添加滚动指示器动画 */
.scroll-indicator {
    width: 24px;
    height: 40px;
    border: 2px solid #fff;
    border-radius: 12px;
    position: absolute;
    bottom: 2rem;
    left: 50%;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-30px); }
    60% { transform: translateY(-15px); }
}

/* 新增新闻页面样式 */
.news-filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.search-box {
    display: flex;
    flex: 1;
    max-width: 400px;
}

.search-box input {
    flex: 1;
    padding: 0.8rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    font-size: 1rem;
}

.search-btn {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 0.8rem 1rem;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

.category-filter select {
    padding: 0.8rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.post-list {
    display: grid;
    gap: 2rem;
    margin-bottom: 3rem;
}

.post-card {
    display: flex;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.post-image {
    width: 30%;
    background-color: #f5f5f5;
    min-height: 200px;
}

.post-content {
    padding: 1.5rem;
    width: 70%;
}

.category-tag {
    display: inline-block;
    padding: 0.3rem 0.6rem;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-bottom: 0.8rem;
}

.category-tag.tech {
    background-color: #e3f2fd;
    color: #1976d2;
}

.category-tag.team {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.category-tag.project {
    background-color: #fff3e0;
    color: #ef6c00;
}

.post-meta {
    color: #666;
    font-size: 0.9rem;
    margin: 1rem 0;
    display: flex;
    gap: 1rem;
}

.read-more {
    display: inline-block;
    color: #007bff;
    font-weight: 500;
    margin-top: 1rem;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin: 3rem 0;
}

.page-btn {
    padding: 0.6rem 1.2rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    text-decoration: none;
}

.page-numbers {
    display: flex;
    gap: 0.5rem;
}

.page-number {
    padding: 0.6rem 1.2rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    text-decoration: none;
}

.page-number.active {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

/* 关于页面样式 */
.about-page {
    max-width: 1200px;
}

.about-intro {
    display: flex;
    gap: 2rem;
    margin: 3rem 0;
    align-items: center;
}

.about-image {
    width: 40%;
    height: 400px;
    background-color: #f5f5f5;
    border-radius: 8px;
}

.about-content {
    width: 60%;
}

.team-section {
    margin: 4rem 0;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.team-member {
    text-align: center;
    padding: 1.5rem;
    border: 1px solid #eee;
    border-radius: 8px;
}

.member-avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background-color: #f5f5f5;
    margin: 0 auto 1rem;
}

.member-title {
    color: #666;
    font-style: italic;
    margin-bottom: 1rem;
}

.development-history {
    margin: 4rem 0;
}

.timeline {
    position: relative;
    margin-top: 2rem;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background-color: #eee;
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
    padding-left: 2rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -2rem;
    top: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #007bff;
    transform: translateX(-50%);
}

.timeline-date {
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: #007bff;
}

.contact-section {
    margin: 4rem 0;
    text-align: center;
}

.contact-info {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* 首页新增样式 */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.view-all {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
}

.featured-news {
    margin: 4rem 0;
}

.news-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.featured-news-card {
    display: flex;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.news-image {
    width: 40%;
    height: 250px;
    background-color: #f5f5f5;
}

.news-content {
    padding: 1.5rem;
    width: 60%;
}

.latest-news {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.news-item {
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
}

.news-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.project-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-link {
    display: inline-block;
    margin-top: 1rem;
    color: #007bff;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: bold;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: #333;
    text-decoration: none;
}

.copyright {
    text-align: center;
    margin-top: 2rem;
    color: #666;
    font-size: 0.9rem;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .post-card {
        flex-direction: column;
    }
    .post-image, .post-content {
        width: 100%;
    }
    .about-intro {
        flex-direction: column;
    }
    .about-image, .about-content {
        width: 100%;
    }
    .news-grid {
        grid-template-columns: 1fr;
    }
    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }
}