/*
  谷尘 Guchen - AIGC 设计师个人作品集
  主样式表 - 黑色科技主题
*/

/* --- CSS 变量定义 --- */
:root {
    /* 主色调 - 黑色系 */
    --bg-primary: #050505;
    --bg-secondary: #0a0a0a;
    --bg-tertiary: #121212;
    --bg-card: #0f0f0f;

    /* 强调色 - 银白灰色系 */
    --accent-primary: #e0e0e0;
    --accent-secondary: #a0a0a0;
    --accent-glow: #ffffff;

    /* 文字色 */
    --text-primary: #fafafa;
    --text-secondary: #a3a3a3;
    --text-muted: #6b6b6b;

    /* 边框 */
    --border-color: #1f1f1f;
    --border-glow: rgba(255, 255, 255, 0.3);

    /* 渐变 */
    --gradient-primary: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    --gradient-glow: linear-gradient(135deg, var(--accent-glow), var(--accent-secondary));

    /* 间距 */
    --section-padding: 100px 0;
    --container-width: 1600px;

    /* 过渡 */
    --transition-fast: 0.1s ease;
    --transition-medium: 0.15s ease-out;
    --transition-slow: 0.25s ease-out;

    /* 字体 */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

/* --- 基础重置 --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* --- 背景粒子画布 --- */
#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.35;
}

/* --- 通用容器 --- */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

/* --- 导航栏 --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 60px;
    z-index: 1000;
    background: rgba(5, 5, 5, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid transparent;
    transition: all var(--transition-fast);
}

.navbar.scrolled {
    border-bottom-color: var(--border-color);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.8);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 4px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-medium);
}

.logo:hover {
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.5);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 60px;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    position: relative;
    transition: color var(--transition-fast);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--text-primary);
    transition: width var(--transition-medium);
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-links a:hover::after {
    width: 100%;
}

/* --- 导航栏下拉菜单 --- */
.nav-links li {
    position: relative;
}

.nav-links .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(15px);
    background: rgba(20, 20, 30, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 8px 0;
    min-width: 150px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    white-space: nowrap;
}

.nav-links li:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(15px);
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    margin: 0 8px;
}

.dropdown-menu a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.dropdown-menu a:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 15px;
    right: 15px;
    bottom: 0;
    height: 1px;
    background: linear-gradient(to right, transparent 0%, rgba(255, 255, 255, 0.15) 50%, transparent 100%);
}

.dropdown-menu a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1), inset 0 0 10px rgba(255, 255, 255, 0.02);
}

.dropdown-menu a:hover::before {
    transform: scaleX(1);
}

.dropdown-menu a:hover .skill-icon-outer {
    border-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}

.skill-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    position: relative;
    flex-shrink: 0;
}

.skill-icon-outer {
    width: 12px;
    height: 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transition: all 0.3s ease;
    position: absolute;
}

.skill-icon-circle {
    width: 5px;
    height: 5px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    background: transparent;
    transition: all 0.3s ease;
    position: absolute;
    filter: grayscale(100%);
}

.dropdown-menu a:hover .skill-icon-circle {
    background: #fff;
    border-color: #fff;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}

.dropdown-icon {
    display: none;
}

/* --- 移动端菜单按钮 --- */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 1001;
}

.menu-toggle span {
    width: 28px;
    height: 2px;
    background: var(--text-primary);
    transition: all var(--transition-fast);
}

/* --- Hero 区域 --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding-top: 70px;
}

.hero-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 60px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-left {
    animation: fadeInLeft 1s ease forwards;
    opacity: 0;
}

.hero-right {
    animation: fadeInRight 1s ease forwards;
    opacity: 0;
}

.hero-left h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    letter-spacing: 0.3em;
    margin-bottom: 8px;
    position: relative;
}

.hero-left h1::before {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--text-primary);
    filter: blur(35px);
    opacity: 0.08;
}

.subtitle {
    font-size: clamp(1rem, 2vw, 1.5rem);
    font-weight: 400;
    letter-spacing: 0.5em;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.hero-intro {
    font-size: clamp(1rem, 1.5vw, 1.1rem);
    line-height: 2;
    color: var(--text-secondary);
    margin-bottom: 32px;
    max-width: 500px;
}

.hero-tags {
    margin-top: 24px;
}

.hero-tags-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.hero-tag {
    font-size: 0.8rem;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-secondary);
    border-radius: 12px;
    font-family: var(--font-mono);
    transition: all var(--transition-medium);
    cursor: pointer;
    text-align: center;
}

.hero-tag:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    color: var(--text-primary);
}

.hero-tag.active {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
    color: var(--text-primary);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

/* --- Hero 右侧图片 --- */
.hero-image {
    width: 100%;
    aspect-ratio: 4/5;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a2e 30%, #16213e 30%, #0f0f1a 70%, #1a1a2e 100%);
    position: relative;
    overflow: hidden;
    transition: opacity 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-placeholder .placeholder-art-blur,
.image-placeholder .placeholder-art-clear {
    transition: opacity 0.2s ease;
}

.image-placeholder.fade-out .placeholder-art-blur,
.image-placeholder.fade-out .placeholder-art-clear {
    opacity: 0.5;
}

/* --- 向下滚动提示 --- */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    animation: bounce 2s infinite;
}

.scroll-indicator span {
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.2em;
}

.scroll-indicator .arrow {
    width: 20px;
    height: 20px;
    border-right: 2px solid var(--text-secondary);
    border-bottom: 2px solid var(--text-secondary);
    transform: rotate(45deg);
}

/* --- 版块通用样式 --- */
html {
    scroll-behavior: smooth;
}

.section {
    min-height: 100vh;
    padding: var(--section-padding);
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: 40px;
    letter-spacing: 0.2em;
    color: var(--text-primary);
}

/* --- 关于我 --- */
.about {
    background: var(--bg-secondary);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr;
    max-width: 800px;
    margin: 0 auto;
    gap: 32px;
}

.about-text p {
    font-size: 1.1rem;
    line-height: 2;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.about-text p:last-child {
    margin-bottom: 0;
}

.highlight {
    color: var(--accent-glow);
    font-weight: 600;
}

/* --- 技能 --- */
.skills {
    background: var(--bg-primary);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 30px;
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
}

.skill-card {
    background: rgba(15, 15, 15, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px 20px;
    text-align: center;
    transition: all var(--transition-medium);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 180px;
    text-decoration: none;
    color: inherit;
}

.skill-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform var(--transition-fast);
}

.skill-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
    opacity: 0;
    transition: opacity var(--transition-medium);
    pointer-events: none;
}

.skill-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-glow);
    box-shadow: 0 15px 40px rgba(255, 255, 255, 0.1), inset 0 0 30px rgba(255, 255, 255, 0.03);
}

.skill-card:hover::before {
    transform: scaleX(1);
}

.skill-card:hover::after {
    opacity: 1;
}

.skill-icon {
    font-size: 3.5rem;
    color: var(--accent-primary);
    margin-bottom: 24px;
    text-shadow: 0 0 25px rgba(255, 255, 255, 0.3);
    position: relative;
    display: inline-block;
    transform-style: preserve-3d;
    animation: iconFloat 3s ease-in-out infinite;
}

/* 3D 符号容器 */
.skill-icon-3d {
    width: 32px;
    height: 32px;
    margin: 0 auto 18px;
    position: relative;
    transform-style: preserve-3d;
    animation: symbolRotate 6s linear infinite;
}

.skill-card:hover .skill-icon-3d {
    animation: symbolSpin 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes symbolRotate {
    0% {
        transform: rotateY(0deg);
    }
    100% {
        transform: rotateY(360deg);
    }
}

@keyframes symbolSpin {
    0% {
        transform: rotateY(0deg) scale(1);
    }
    100% {
        transform: rotateY(360deg) scale(1.2);
    }
}

/* 中心符号 */
.geo-symbol {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    color: var(--text-primary);
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.6), 0 0 40px rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.skill-card:hover .geo-symbol {
    text-shadow: 0 0 30px rgba(255, 255, 255, 1), 0 0 60px rgba(255, 255, 255, 0.5), 0 0 90px rgba(255, 255, 255, 0.3);
}

/* 卡片悬浮轻微放大 */
.skill-card {
    transform: scale(1);
    transition: all var(--transition-medium);
}

.skill-card:hover {
    transform: translateY(-6px) scale(1.03);
    border-color: var(--border-glow);
    box-shadow: 0 20px 50px rgba(255, 255, 255, 0.12), inset 0 0 40px rgba(255, 255, 255, 0.05);
}

.skill-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.skill-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* --- 作品集 --- */
.portfolio {
    background: var(--bg-secondary);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
    width: 1600px;
    margin: 0 auto;
}

.portfolio-card {
    background: rgba(15, 15, 15, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all var(--transition-medium);
    cursor: pointer;
    min-height: 420px;
    position: relative;
    text-decoration: none;
    color: inherit;
    display: block;
}

.portfolio-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.05) 0%,
        transparent 50%,
        rgba(255, 255, 255, 0.05) 100%
    );
    opacity: 0;
    transition: opacity var(--transition-medium);
    z-index: 0;
}

.portfolio-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-glow);
    box-shadow: 0 15px 40px rgba(255, 255, 255, 0.08), inset 0 0 40px rgba(255, 255, 255, 0.02);
}

.portfolio-card:hover::before {
    opacity: 1;
}

.portfolio-image {
    width: 100%;
    height: 320px;
    background: linear-gradient(180deg, #1a1a2e 0%, #0f0f1a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.portfolio-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.portfolio-card:hover .portfolio-image::before {
    opacity: 0.3;
}

.placeholder-art-blur {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: blur(5px);
    position: absolute;
    inset: 0;
}

.placeholder-art-clear {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    clip-path: polygon(50% 50%, -150% -150%, 150% -50%, -150% 50%);
    animation: clearReveal 5s ease-in-out;
    z-index: 10;
}

.image-placeholder::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        transparent 0%,
        transparent 20%,
        rgba(255, 255, 255, 0.15) 40%,
        rgba(255, 255, 255, 0.8) 50%,
        rgba(255, 255, 255, 0.15) 60%,
        transparent 80%,
        transparent 100%
    );
    animation: clearReveal 5s ease-in-out;
    pointer-events: none;
    z-index: 20;
    filter: blur(100px);
}

@keyframes clearReveal {
    0% {
        clip-path: polygon(-50% 50%, -150% -50%, 150% -50%, -150% 50%);
    }
    50% {
        clip-path: polygon(30% 30%, 130% -70%, 230% 30%, -70% 130%);
    }
    100% {
        clip-path: polygon(100% 100%, 200% 0%, 300% 100%, 0 200%);
    }
}

.portfolio-info {
    padding: 20px 16px;
    position: relative;
    z-index: 1;
}

.portfolio-info h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.portfolio-info p {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-bottom: 10px;
    display: none;
}

.tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.tag {
    font-size: 0.65rem;
    padding: 3px 8px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border-radius: 20px;
    font-family: var(--font-mono);
}

/* --- 联系 --- */
.contact {
    background: var(--bg-primary);
}

.contact-intro {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 32px;
}

.contact-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 24px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    min-width: 120px;
    transition: all var(--transition-medium);
}

.contact-link:hover {
    border-color: var(--border-glow);
    color: var(--text-primary);
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(99, 162, 241, 0.15);
}

.contact-link .icon {
    font-size: 1.5rem;
    color: var(--accent-primary);
}

/* --- 页脚 --- */
.footer {
    background: var(--bg-secondary);
    padding: 48px;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.footer p {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-family: var(--font-mono);
}

/* --- 动画关键帧 --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(10px);
    }
}

@keyframes shimmer {
    0% {
        transform: translate(-100%, -100%) rotate(30deg);
    }
    100% {
        transform: translate(100%, 100%) rotate(30deg);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(99, 162, 241, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(99, 162, 241, 0.6);
    }
}

/* --- 滚动动画类 --- */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- 响应式设计 --- */
/* 平板和大屏幕手机（1024px 及以下） */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
        padding: 0 24px;
    }

    .hero-right {
        order: -1;
    }

    .hero-image {
        max-width: 400px;
        margin: 0 auto;
    }

    .hero-intro {
        max-width: 100%;
    }

    .hero-tags {
        justify-content: center;
    }

    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(3, 1fr);
        width: 100%;
        max-width: 800px;
    }

    .portfolio-grid {
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: repeat(2, 1fr);
        width: 100%;
        max-width: 100%;
    }

    .navbar {
        padding: 0 24px;
    }

    .nav-links {
        gap: 32px;
    }
}

/* 中等屏幕手机（768px 及以下） */
@media (max-width: 768px) {
    html {
        font-size: 14px;
    }

    .hero-container {
        padding: 0 16px;
    }

    .hero-image {
        max-width: 280px;
    }

    .hero-tags-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .skills-grid {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(6, 1fr);
        width: 100%;
    }

    .skill-card {
        min-height: 160px;
        padding: 20px 16px;
    }

    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(3, 1fr);
        width: 100%;
    }

    .portfolio-card {
        min-height: 280px;
    }

    .portfolio-image {
        height: 200px;
    }

    .navbar {
        padding: 0 16px;
        height: 60px;
    }

    .logo {
        font-size: 1.2rem;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: var(--bg-primary);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 32px;
        transition: right var(--transition-medium);
    }

    .nav-links.active {
        right: 0;
    }

    .menu-toggle {
        display: flex;
    }

    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }

    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }

    .contact-links {
        flex-wrap: wrap;
    }

    .section-title {
        font-size: 2rem;
    }
}

/* 小屏幕手机（480px 及以下） */
@media (max-width: 480px) {
    html {
        font-size: 13px;
    }

    .hero-container {
        padding: 0 12px;
    }

    .hero-image {
        max-width: 220px;
        aspect-ratio: 1;
    }

    .hero-tags-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .hero-tag {
        font-size: 0.7rem;
        padding: 8px 12px;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .skill-card {
        min-height: 140px;
        padding: 16px 12px;
    }

    .skill-icon-3d {
        width: 24px;
        height: 24px;
    }

    .geo-symbol {
        font-size: 1.2rem;
    }

    .skill-card h3 {
        font-size: 1.1rem;
    }

    .skill-card p {
        font-size: 0.85rem;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(6, 1fr);
        width: 100%;
    }

    .portfolio-card {
        min-height: 200px;
    }

    .portfolio-image {
        height: 150px;
    }

    .navbar {
        padding: 0 12px;
        height: 56px;
    }

    .logo {
        font-size: 1rem;
    }

    .menu-toggle span {
        width: 24px;
    }

    .section {
        padding: 60px 0 40px;
    }

    .section-title {
        font-size: 1.5rem;
        margin-bottom: 24px;
    }

    .container {
        padding: 0 16px;
    }

    .contact-links {
        flex-direction: column;
        align-items: center;
        gap: 16px;
    }

    .contact-link {
        min-width: 100px;
        padding: 16px;
    }
}

/* 横屏手机 */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 80px 0 40px;
    }

    .hero-container {
        gap: 24px;
    }

    .hero-image {
        max-width: 200px;
        aspect-ratio: 1;
    }

    .hero-left h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .hero-intro {
        font-size: 0.9rem;
        margin-bottom: 16px;
    }

    .hero-tags-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* 大屏设备 */
@media (min-width: 1920px) {
    html {
        font-size: 18px;
    }

    .container {
        max-width: 1800px;
    }

    .hero-container {
        gap: 100px;
    }

    .skills-grid {
        gap: 40px;
    }

    .portfolio-grid {
        gap: 16px;
    }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    .skill-card:hover {
        transform: none;
    }

    .portfolio-card:hover {
        transform: none;
    }

    .hero-tag:hover {
        background: rgba(255, 255, 255, 0.05);
        border-color: rgba(255, 255, 255, 0.15);
    }

    .nav-links a:hover::after {
        width: 0;
    }

    .nav-links a.active::after {
        width: 100%;
    }

    /* 移动端下拉菜单 - 点击显示 */
    .nav-links .has-dropdown:hover .dropdown-menu {
        opacity: 0;
        visibility: hidden;
    }

    .nav-links .has-dropdown.mobile-open .dropdown-menu {
        opacity: 1;
        visibility: visible;
        transform: translateX(-50%) translateY(15px);
    }
}

/* 减少动画偏好 */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    scroll-behavior: auto !important;
}