@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

body {
    font-family: 'Poppins', 'SF Pro Display', sans-serif;
    background-color: #121214;
    color: #F8F8F8;
}

.clip-path-circle {
    clip-path: circle(50% at 50% 50%);
}

.clip-path-diagonal {
    clip-path: polygon(0 0, 100% 0, 100% 85%, 0 100%);
}

.clip-path-rounded {
    clip-path: polygon(10% 0, 100% 0, 100% 90%, 90% 100%, 0 100%, 0 10%);
}

.gradient-text {
    background: linear-gradient(90deg, #FF9500, #FF3B30);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

.bg-grid {
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 20px 20px;
}

.text-outline {
    -webkit-text-stroke: 1px white;
    color: transparent;
}

.noise-bg {
    position: relative;
}

.noise-bg::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.05;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    z-index: -1;
}

/* 动画类 */
.animate-fade-in {
    animation: fadeIn 0.8s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 添加序列动画延迟 */
.grid > div:nth-child(1) { animation-delay: 0.1s; }
.grid > div:nth-child(2) { animation-delay: 0.2s; }
.grid > div:nth-child(3) { animation-delay: 0.3s; }
.grid > div:nth-child(4) { animation-delay: 0.4s; }
.grid > div:nth-child(5) { animation-delay: 0.5s; }
.grid > div:nth-child(6) { animation-delay: 0.6s; }

/* 页面加载器样式 */
#page-loader {
    transition: opacity 0.5s ease;
}

/* 响应式优化 */
@media (max-width: 768px) {
    h1 {
        font-size: 3rem !important;
    }
    
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* 提高可访问性的焦点样式 */
a:focus, button:focus, input:focus, textarea:focus {
    outline: 2px solid #FF9500;
    outline-offset: 2px;
}

/* 优化表单输入的触摸目标尺寸 */
@media (max-width: 768px) {
    input, textarea, button {
        min-height: 44px; /* 确保在移动设备上有足够的触摸区域 */
    }
}

/* 图片加载优化 */
img {
    transition: opacity 0.3s ease;
}

img.lazy-load {
    opacity: 0;
}

img.lazy-loaded {
    opacity: 1;
}

/* 特定动画延迟 */
.animation-delay-500ms {
    animation-delay: 0.5s;
}

.animation-delay-1000ms {
    animation-delay: 1s;
}

/* 页脚波浪效果 */
.footer-wave {
    clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 50% 50%, 0% 100%);
}

/* 添加新样式 */
/* 页面过渡效果 */
.section-highlight {
    animation: highlight-pulse 1s ease;
}

@keyframes highlight-pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 149, 0, 0.3); }
    70% { box-shadow: 0 0 0 15px rgba(255, 149, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 149, 0, 0); }
}

/* 提升焦点样式 */
a:focus, button:focus, input:focus, textarea:focus {
    outline: 2px solid #FF9500;
    outline-offset: 2px;
}

/* 作品项目悬停效果增强 */
.portfolio-item-active {
    transform: translateY(-5px) !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* 关键渲染路径优化样式 */
html {
    scroll-behavior: smooth;
}

body.loaded main {
    opacity: 1;
} 

/* 主题切换样式 */
/* 默认深色主题 */
:root {
    --bg-primary: #121214;
    --bg-secondary: #1C1C1E;
    --text-primary: #F8F8F8;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-tertiary: rgba(255, 255, 255, 0.5);
    --border-color: rgba(255, 255, 255, 0.1);
    --card-bg: rgba(255, 255, 255, 0.05);
    --primary-color: #FF9500;
    --primary-hover: rgba(255, 149, 0, 0.9);
    --accent-color-1: #FF3B30;
    --accent-color-2: #5AC8FA;
    --accent-color-3: #FFCC00;
}

/* 浅色主题 */
.light-mode {
    --bg-primary: #F8F8F8;
    --bg-secondary: #EFEFEF;
    --text-primary: #121214;
    --text-secondary: rgba(0, 0, 0, 0.7);
    --text-tertiary: rgba(0, 0, 0, 0.5);
    --border-color: rgba(0, 0, 0, 0.1);
    --card-bg: rgba(0, 0, 0, 0.03);
    --primary-color: #FF9500;
    --primary-hover: rgba(255, 149, 0, 0.9);
    --accent-color-1: #FF3B30;
    --accent-color-2: #007AFF;
    --accent-color-3: #FFCC00;
}

/* 应用CSS变量 */
body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

nav, .bg-dark {
    background-color: var(--bg-primary);
}

.bg-secondary {
    background-color: var(--bg-secondary);
}

.border-white\/10 {
    border-color: var(--border-color);
}

.text-white {
    color: var(--text-primary);
}

.text-white\/80, .text-white\/70 {
    color: var(--text-secondary);
}

.text-white\/60, .text-white\/50, .text-white\/40 {
    color: var(--text-tertiary);
}

.bg-white\/5, .bg-white\/10 {
    background-color: var(--card-bg);
}

.bg-primary {
    background-color: var(--primary-color);
}

.text-primary {
    color: var(--primary-color);
}

.gradient-text {
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color-1));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* 主题切换按钮动画 */
.theme-toggle {
    position: relative;
    overflow: hidden;
}

.theme-toggle i {
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.theme-toggle:hover i {
    transform: rotate(30deg);
}

/* 主题切换过渡效果 */
body, section, nav, .bg-white\/5, .text-white, .text-white\/80, .text-white\/70,
.text-white\/60, .text-white\/50, .text-white\/40, .bg-white\/10, .border-white\/10 {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* 技能高亮效果 */
.skill-highlight {
    animation: skill-pulse 3s ease;
}

@keyframes skill-pulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 149, 0, 0); 
    }
    20% { 
        transform: scale(1.02);
        box-shadow: 0 0 0 10px rgba(255, 149, 0, 0.3); 
    }
    40% { 
        transform: scale(1);
        box-shadow: 0 0 0 5px rgba(255, 149, 0, 0); 
    }
    60% { 
        transform: scale(1.02);
        box-shadow: 0 0 0 10px rgba(255, 149, 0, 0.3); 
    }
}

/* 图片查看器样式 */
.lightbox-image {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* 过渡效果增强 */
.theme-toggle, .bg-white\/5, .bg-white\/10, .bg-primary, .text-primary,
.border-white\/10, .hover-scale, nav a, button, input, textarea, .lightbox-image {
    will-change: transform, opacity, background-color, color, border-color;
}

/* 提高可点击区域的视觉反馈 */
button, .theme-toggle, #portfolio .grid > div {
    transform-origin: center;
    backface-visibility: hidden;
}

/* 滚动体验优化 */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-padding-top: 100px;
    }
    
    .smooth-anchor {
        scroll-margin-top: 100px;
    }
} 