/* 
 * 响应式样式表
 * 包含网站在不同屏幕尺寸下的样式适配
 */

/* 大屏幕设备 (大于1200px) */
@media (min-width: 1200px) {
  .container {
    max-width: 1140px;
  }
}

/* 中等屏幕设备 (小于1200px) */
@media (max-width: 1199.98px) {
  .container {
    max-width: 960px;
  }

  .hero-content h1 {
    font-size: 2.5rem;
  }
}

/* 平板设备 (小于992px) */
@media (max-width: 991.98px) {
  .container {
    max-width: 720px;
  }

  .hero {
    flex-direction: column;
    text-align: center;
    padding: 6rem 0 3rem;
  }

  .hero::before {
    background-position: center top;
  }

  .hero-content {
    padding-right: 0;
    margin-bottom: 3rem;
  }

  .hero-buttons {
    justify-content: center;
  }

  .hero-image {
    justify-content: center;
  }

  .about-preview {
    flex-direction: column;
  }

  .about-content {
    padding-right: 0;
    margin-bottom: 2rem;
    text-align: center;
  }

  .footer-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2rem;
  }

  .footer-links ul {
    justify-content: center;
  }

  .footer-social {
    justify-content: center;
  }

  /* 关于页面适配 */
  .about-intro {
    flex-direction: column;
    text-align: center;
  }

  .about-image {
    margin-bottom: 2rem;
    order: -1;
  }

  .personal-info {
    justify-content: center;
  }

  /* 联系页面适配 */
  .contact-container {
    flex-direction: column;
  }

  .contact-info {
    margin-bottom: 3rem;
  }
}

/* 手机设备 (小于768px) */
@media (max-width: 767.98px) {
  .container {
    max-width: 540px;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    height: 100vh;
    background-color: white;
    box-shadow: var(--shadow-lg);
    padding: 2rem;
    transition: right var(--transition-normal);
    z-index: 1001;
  }

  body.dark-mode .nav-menu {
    background-color: var(--bg-primary);
  }

  .nav-menu.active {
    right: 0;
  }

  .nav-menu ul {
    flex-direction: column;
    gap: 2rem;
  }

  .hamburger {
    display: block;
    z-index: 1002;
  }

  .hamburger.active .line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
  }

  .hamburger.active .line:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active .line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
  }

  .page-title {
    padding: 7rem 0 3rem;
  }

  .page-title h1 {
    font-size: 2rem;
  }

  .hero-content h1 {
    font-size: 2rem;
  }

  .hero::before {
    background-position: center center;
    opacity: 0.25;
    /* 在手机上降低透明度，提高内容可读性 */
  }

  .section-title {
    font-size: 1.75rem;
  }

  .preview-grid {
    grid-template-columns: 1fr;
  }

  /* 摄影页面适配 */
  .gallery-filter .filter-buttons {
    flex-wrap: wrap;
    justify-content: center;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  /* 文章页面适配 */
  .article-item {
    flex-direction: column;
  }

  .article-image {
    width: 100%;
    margin-bottom: 1rem;
  }

  /* 小红书页面适配 */
  .xhs-profile {
    flex-direction: column;
    text-align: center;
  }

  .xhs-avatar {
    margin-bottom: 1.5rem;
  }

  .xhs-stats {
    justify-content: center;
  }

  .notes-grid {
    grid-template-columns: 1fr;
  }

  /* 关于页面适配 */
  .skills-container {
    grid-template-columns: 1fr;
  }

  .interests-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 小型手机设备 (小于576px) */
@media (max-width: 575.98px) {
  .container {
    padding: 0 1rem;
  }

  .hero-buttons {
    flex-direction: column;
    gap: 1rem;
  }

  .hero-buttons .btn {
    width: 100%;
  }

  .hero::before {
    background-position: center center;
    background-size: cover;
  }

  .page-title h1 {
    font-size: 1.75rem;
  }

  .page-title p {
    font-size: 1rem;
  }

  .footer-links ul {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }

  /* 联系页面适配 */
  .info-list {
    grid-template-columns: 1fr;
  }

  .social-icons {
    flex-wrap: wrap;
    justify-content: center;
  }
}