/* ==================== 响应式设计 ==================== */

/* 大屏幕 (>1200px) */
@media (min-width: 1200px) {
    .hero-title {
        font-size: 3.5rem;
    }
    
    .section-title {
        font-size: 3rem;
    }
}

/* 平板设备 (768px - 1024px) */
@media (max-width: 1024px) {
    .container {
        padding: 0 var(--spacing-md);
    }
    
    .cards-container {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
}

/* 平板竖屏和大手机 (max-width: 768px) */
@media (max-width: 768px) {
    /* 导航栏 */
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        background: var(--white);
        box-shadow: 0 5px 20px var(--shadow);
        transition: var(--transition);
        padding: var(--spacing-md) 0;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu ul {
        flex-direction: column;
        gap: 0;
    }
    
    .nav-menu li {
        border-bottom: 1px solid var(--gray-light);
    }
    
    .nav-menu a {
        display: block;
        padding: var(--spacing-sm) var(--spacing-md);
    }
    
    .menu-toggle {
        display: block;
    }
    
    /* 主横幅 */
    .hero {
        padding: 80px 0 60px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: var(--spacing-sm);
        align-items: stretch;
    }
    
    .btn {
        width: 100%;
        text-align: center;
    }
    
    /* 卡片 */
    .cards-container {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .profile-card {
        padding: var(--spacing-md);
    }
    
    .avatar-placeholder {
        width: 120px;
        height: 120px;
    }
    
    .profile-name {
        font-size: 1.5rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
    
    /* 页脚 */
    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    /* 返回顶部 */
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
}

/* 手机设备 (max-width: 480px) */
@media (max-width: 480px) {
    :root {
        --spacing-xs: 0.375rem;
        --spacing-sm: 0.75rem;
        --spacing-md: 1.5rem;
        --spacing-lg: 2rem;
        --spacing-xl: 3rem;
    }
    
    .container {
        padding: 0 var(--spacing-sm);
    }
    
    /* 导航栏 */
    .logo h1 {
        font-size: 1.25rem;
    }
    
    /* 主横幅 */
    .hero {
        padding: 60px 0 40px;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-subtitle {
        font-size: 0.95rem;
    }
    
    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.95rem;
    }
    
    /* 主要内容 */
    .main-content {
        padding: var(--spacing-lg) 0;
    }
    
    .section-header {
        margin-bottom: var(--spacing-lg);
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .section-subtitle {
        font-size: 0.95rem;
    }
    
    /* 卡片 */
    .profile-card {
        padding: var(--spacing-sm);
        border-radius: var(--radius-md);
    }
    
    .card-header {
        margin-bottom: var(--spacing-md);
    }
    
    .avatar-placeholder {
        width: 100px;
        height: 100px;
        border-width: 3px;
    }
    
    .avatar-default {
        font-size: 3rem;
    }
    
    .profile-name {
        font-size: 1.25rem;
    }
    
    .profile-bio {
        font-size: 0.9rem;
    }
    
    .content-section {
        padding: var(--spacing-sm);
    }
    
    .section-icon {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }
    
    .content-section h4 {
        font-size: 1.1rem;
    }
    
    .content-section p {
        font-size: 0.9rem;
    }
    
    .card-stats {
        padding-top: var(--spacing-sm);
    }
    
    .stat-item i {
        font-size: 1.25rem;
    }
    
    .stat-number {
        font-size: 1.25rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
    
    /* 关于部分 */
    .about-section {
        padding: var(--spacing-lg) 0;
    }
    
    .about-content {
        margin-top: var(--spacing-md);
    }
    
    .about-content p {
        font-size: 1rem;
    }
    
    /* 页脚 */
    .footer {
        padding: var(--spacing-md) 0 var(--spacing-sm);
    }
    
    .footer-section h4 {
        font-size: 1.1rem;
    }
    
    .footer-section p,
    .footer-section a {
        font-size: 0.9rem;
    }
    
    .social-links a {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .footer-bottom {
        font-size: 0.85rem;
    }
    
    /* 返回顶部 */
    .back-to-top {
        bottom: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 0.95rem;
    }
    
    /* 浮动图标 */
    .floating-icon {
        font-size: 2rem;
    }
}

/* 超小屏幕 (max-width: 360px) */
@media (max-width: 360px) {
    .hero-title {
        font-size: 1.5rem;
    }
    
    .section-title {
        font-size: 1.35rem;
    }
    
    .cards-container {
        gap: var(--spacing-sm);
    }
    
    .avatar-placeholder {
        width: 90px;
        height: 90px;
    }
    
    .profile-name {
        font-size: 1.15rem;
    }
}

/* 横屏模式优化 */
@media (max-height: 600px) and (orientation: landscape) {
    .hero {
        padding: 60px 0 40px;
    }
    
    .hero-title {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: var(--spacing-md);
    }
    
    .main-content {
        padding: var(--spacing-lg) 0;
    }
}

/* 打印样式 */
@media print {
    .navbar,
    .hero,
    .footer,
    .back-to-top,
    .menu-toggle {
        display: none;
    }
    
    .main-content {
        padding: 0;
    }
    
    .profile-card {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid var(--gray-light);
    }
    
    a {
        text-decoration: underline;
    }
}

/* 高对比度模式 */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #0066cc;
        --secondary-color: #00994d;
        --text-color: #000000;
        --bg-color: #ffffff;
    }
    
    .profile-card {
        border: 2px solid var(--text-color);
    }
}

/* 深色模式偏好 */
@media (prefers-color-scheme: dark) {
    :root {
        --text-color: #ecf0f1;
        --bg-color: #1a1a1a;
        --white: #2c3e50;
        --gray-light: #34495e;
        --gray-dark: #bdc3c7;
        --shadow: rgba(0, 0, 0, 0.3);
        --shadow-hover: rgba(0, 0, 0, 0.5);
    }
    
    body {
        background-color: var(--bg-color);
        color: var(--text-color);
    }
    
    .navbar,
    .profile-card,
    .about-section {
        background: var(--white);
    }
    
    .content-section {
        background: var(--bg-color);
    }
}

/* 减少动画偏好 */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

