/* 移动端响应式优化 */

/* Hero Section 移动端优化 */
@media (max-width: 768px) {
  .hero-title {
    font-size: clamp(1.5rem, 8vw, 2.5rem) !important;
    line-height: 1.2;
  }

  .title-line {
    display: block;
    word-break: break-word;
  }

  .hero-subtitle {
    font-size: clamp(0.875rem, 4vw, 1rem) !important;
    line-height: 1.5;
    max-width: 100%;
  }

  .hero-cta {
    flex-direction: column;
    gap: 12px;
  }

  .pill-btn {
    width: 100%;
    justify-content: center;
  }

  .pill-btn-primary,
  .pill-btn-outline {
    padding: 12px 20px !important;
    font-size: 0.875rem;
  }
}

/* GitHub 日历移动端优化 */
@media (max-width: 768px) {
  .github-calendar-mini {
    padding: 12px !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
  }

  .calendar-grid {
    display: grid;
    grid-template-columns: repeat(13, 10px) !important;
    grid-template-rows: repeat(7, 10px) !important;
    gap: 2px !important;
    min-width: 300px;
  }

  .calendar-cell {
    width: 10px !important;
    height: 10px !important;
    border-radius: 2px !important;
  }

  .github-calendar-mini .calendar-months {
    display: none;
  }

  .github-card-footer {
    font-size: 0.75rem;
  }

  .contrib-count {
    font-size: 0.75rem;
  }
}

/* 联系按钮移动端优化 */
@media (max-width: 768px) {
  .contact-wrapper {
    padding: 24px 16px !important;
  }

  .contact-wrapper h2 {
    font-size: clamp(1.5rem, 6vw, 2rem) !important;
  }

  .contact-wrapper p {
    font-size: 0.875rem;
    line-height: 1.5;
  }

  .contact-links {
    flex-direction: column;
    gap: 12px;
  }

  .contact-link {
    padding: 12px 16px !important;
    font-size: 0.875rem;
  }

  .contact-icon {
    font-size: 1.5rem;
  }

  .pill-btn-lg {
    width: 100%;
    padding: 12px 20px !important;
    font-size: 0.875rem;
  }
}

/* 导航栏移动端优化 */
@media (max-width: 768px) {
  .github-header {
    padding: 8px 12px;
  }

  .header-container {
    gap: 8px;
  }

  .header-search {
    display: none;
  }

  .brand-link {
    font-size: 1rem;
  }

  .header-avatar {
    width: 32px;
    height: 32px;
  }

  .theme-btn {
    width: 32px;
    height: 32px;
  }
}

/* 悬浮目录移动端隐藏 */
@media (max-width: 1024px) {
  .floating-toc {
    display: none;
  }
}

/* 卡片网格移动端优化 */
@media (max-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr !important;
  }

  .about-cards {
    grid-template-columns: 1fr !important;
  }

  .stat-card {
    padding: 16px !important;
  }

  .stat-number {
    font-size: 1.5rem;
  }

  .stat-label {
    font-size: 0.75rem;
  }
}

/* 技能卡片移动端优化 */
@media (max-width: 768px) {
  .skills-grid {
    grid-template-columns: 1fr !important;
  }

  .skill-card {
    padding: 16px !important;
  }

  .skill-header {
    gap: 8px;
  }

  .skill-icon {
    font-size: 1.5rem;
  }

  .skill-header h3 {
    font-size: 1rem;
  }

  .skill-desc {
    font-size: 0.875rem;
  }

  .skill-tags {
    gap: 6px;
  }

  .skill-tag {
    padding: 4px 8px;
    font-size: 0.75rem;
  }
}

/* 项目卡片移动端优化 */
@media (max-width: 768px) {
  .project-featured {
    flex-direction: column;
    gap: 16px;
  }

  .project-visual {
    min-height: 200px;
  }

  .project-icon-large {
    font-size: 3rem;
  }

  .projects-grid {
    grid-template-columns: 1fr !important;
  }

  .project-card {
    padding: 16px !important;
  }

  .project-card-icon {
    font-size: 2rem;
  }

  .project-card h4 {
    font-size: 0.95rem;
  }

  .project-card p {
    font-size: 0.8rem;
  }
}

/* 生活相册移动端优化 */
@media (max-width: 768px) {
  .life-gallery {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px;
  }

  .life-card {
    aspect-ratio: 1;
  }

  .life-card-large {
    grid-column: span 1;
  }

  .life-overlay {
    padding: 12px;
  }

  .life-overlay h4 {
    font-size: 0.875rem;
  }

  .life-count {
    font-size: 0.75rem;
  }
}

/* 证书卡片移动端优化 */
@media (max-width: 768px) {
  .certs-showcase {
    grid-template-columns: 1fr !important;
  }

  .cert-card {
    padding: 16px !important;
  }

  .cert-badge-grade {
    width: 40px;
    height: 40px;
    font-size: 1.25rem;
  }

  .cert-content h4 {
    font-size: 0.95rem;
  }

  .cert-content p {
    font-size: 0.8rem;
  }
}

/* GitHub 热门项目移动端优化 */
@media (max-width: 768px) {
  .github-controls {
    flex-direction: column;
    gap: 12px;
  }

  .search-box {
    width: 100%;
  }

  .language-filter {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .trending-list {
    grid-template-columns: 1fr !important;
  }

  .trending-item {
    padding: 12px !important;
  }

  .trending-item h4 {
    font-size: 0.95rem;
  }

  .trending-item p {
    font-size: 0.8rem;
  }
}

/* 页脚移动端优化 */
@media (max-width: 768px) {
  .footer-content {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
  }

  .footer-social {
    justify-content: center;
  }

  .footer-bottom p {
    font-size: 0.75rem;
  }
}

/* 返回顶部按钮移动端优化 */
@media (max-width: 768px) {
  .back-to-top {
    width: 40px;
    height: 40px;
    bottom: 80px;
    right: 16px;
  }

  .back-to-top svg {
    width: 16px;
    height: 16px;
  }
}

/* 通用文本优化 */
@media (max-width: 768px) {
  .section-title {
    font-size: clamp(1.5rem, 6vw, 2rem) !important;
  }

  .section-subtitle {
    font-size: clamp(0.875rem, 3vw, 1rem) !important;
  }

  .container {
    padding: 0 16px !important;
  }

  h1 {
    font-size: clamp(1.5rem, 8vw, 2.5rem);
  }

  h2 {
    font-size: clamp(1.25rem, 6vw, 2rem);
  }

  h3 {
    font-size: clamp(1rem, 5vw, 1.5rem);
  }

  p {
    font-size: clamp(0.875rem, 3vw, 1rem);
    line-height: 1.6;
  }
}

/* 液态玻璃效果优化 */
.glass-card {
  backdrop-filter: blur(10px) !important;
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

[data-theme="light"] .glass-card {
  background: rgba(255, 255, 255, 0.7) !important;
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
}

/* 标题动态效果 */
.section-title {
  position: relative;
  display: inline-block;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: titleGlow 3s ease-in-out infinite;
}

@keyframes titleGlow {
  0%, 100% {
    filter: drop-shadow(0 0 0px rgba(88, 166, 255, 0));
  }
  50% {
    filter: drop-shadow(0 0 10px rgba(88, 166, 255, 0.3));
  }
}

/* 按钮悬停效果 */
.pill-btn {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.pill-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.pill-btn:hover::before {
  left: 100%;
}

/* 卡片悬停效果 */
.glass-card {
  transition: all 0.3s ease;
}

.glass-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(88, 166, 255, 0.15);
  border-color: rgba(88, 166, 255, 0.3);
}
