/* 星枢·舰长（Stellar Nexus）官网样式
   从 index.html 内联样式原样拆出，未做任何视觉改动 */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
:root {
    --bg-deep: #020617; --neon-cyan: #22d3ee; --neon-blue: #38bdf8; --neon-indigo: #818cf8;
    --text-primary: #e2e8f0; --text-secondary: #94a3b8; --font-sans: 'Inter', sans-serif; --font-mono: 'JetBrains Mono', monospace;
    --header-height: 68px; --glass-bg: rgba(255, 255, 255, 0.03); --text-muted: #64748b;
}
html { scroll-behavior: smooth; }
body { font-family: var(--font-sans); background: var(--bg-deep); color: var(--text-primary); overflow-x: hidden; line-height: 1.6; -webkit-font-smoothing: antialiased; }
::-webkit-scrollbar { width: 5px; } ::-webkit-scrollbar-track { background: var(--bg-deep); } ::-webkit-scrollbar-thumb { background: var(--neon-cyan); }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; position: relative; z-index: 2; }
section { scroll-margin-top: var(--header-height); }

#ascii-canvas { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: 0; pointer-events: none; opacity: 0.15; }
.deep-glow { position: fixed; border-radius: 50%; filter: blur(120px); pointer-events: none; z-index: 0; opacity: 0.3; will-change: transform; }
.deep-glow--cyan { width: 600px; height: 600px; background: var(--neon-cyan); top: -20%; right: -15%; opacity: 0.12; animation: floatGlow 25s infinite alternate ease-in-out; }
.deep-glow--indigo { width: 500px; height: 500px; background: var(--neon-indigo); bottom: -20%; left: -10%; opacity: 0.1; animation: floatGlow 30s infinite alternate-reverse ease-in-out; }
@keyframes floatGlow { 0% { transform: translate(0, 0) scale(1); } 100% { transform: translate(50px, 30px) scale(1.05); } }

.header { position: fixed; top: 0; left: 0; width: 100%; z-index: 100; padding: 12px 0; background: rgba(2, 6, 23, 0.6); backdrop-filter: blur(24px); border-bottom: 1px solid rgba(56, 189, 248, 0.06); height: var(--header-height); padding-top: calc(12px + env(safe-area-inset-top, 0px)); }
.header.scrolled { background: rgba(2, 6, 23, 0.9); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3); border-bottom-color: rgba(34, 211, 238, 0.2); }
.header .container { display: flex; align-items: center; justify-content: space-between; height: 100%; }
.logo { font-family: var(--font-mono); font-weight: 700; font-size: 1.1rem; display: flex; gap: 10px; }
.logo .brand { background: linear-gradient(135deg, var(--neon-cyan), var(--neon-indigo)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; color: transparent; }
.nav-links { display: flex; gap: 28px; list-style: none; font-size: 0.7rem; letter-spacing: 1.2px; }
.nav-links > li { position: relative; }
.nav-links a { color: var(--text-secondary); position: relative; text-decoration: none; }
.nav-links a.active { color: var(--neon-cyan); text-shadow: 0 0 15px rgba(34, 211, 238, 0.4); font-weight: 600; }

.nav-cta { background: rgba(34, 211, 238, 0.04); border: 1px solid rgba(34, 211, 238, 0.3); color: var(--neon-cyan); padding: 8px 24px; border-radius: 40px; font-size: 0.7rem; cursor: pointer; text-decoration: none; }
.hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; }
.hamburger span { display: block; width: 26px; height: 2px; background: var(--text-primary); transition: all 0.3s; }
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }
.mobile-menu { position: fixed; top: 0; right: -100%; width: 80%; max-width: 340px; height: 100%; background: rgba(2, 6, 23, 0.92); backdrop-filter: blur(32px); padding: 100px 32px 40px; transition: right 0.35s; z-index: 99; display: flex; flex-direction: column; gap: 28px; }
.mobile-menu.open { right: 0; }
.mobile-menu a { color: var(--text-secondary); font-size: 1.1rem; }
.mobile-menu a.active { color: var(--neon-cyan); font-weight: 600; }
.mobile-cta { margin-top: auto; background: rgba(34, 211, 238, 0.04); border: 1px solid rgba(34, 211, 238, 0.3); color: var(--neon-cyan); padding: 14px 24px; border-radius: 40px; font-size: 0.75rem; cursor: pointer; text-align: center; }
.menu-overlay { position: fixed; inset: 0; z-index: 98; background: rgba(0, 0, 0, 0.5); opacity: 0; pointer-events: none; transition: opacity 0.35s; }
.menu-overlay.active { opacity: 1; pointer-events: auto; }

.hero { min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; padding: calc(var(--header-height) + 40px) 0 60px; position: relative; background: radial-gradient(ellipse at 50% 50%, #163a5c 0%, #0d2438 70%, #020617 100%); overflow: hidden; }
#hero-particle-canvas { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
.hero-content { max-width: 820px; position: relative; z-index: 2; display: flex; flex-direction: column; align-items: flex-start; gap: 28px; }
.reveal-element { opacity: 0; transform: translateY(30px); transition: opacity 0.6s cubic-bezier(0.23, 1, 0.32, 1), transform 0.6s; }
.reveal-element.visible { opacity: 1; transform: translateY(0); }
.hero-title { font-size: clamp(2.6rem, 8vw, 5.6rem); font-weight: 800; line-height: 1.05; letter-spacing: -2px; }
.hero-title .highlight { background: linear-gradient(135deg, var(--neon-cyan), var(--neon-indigo)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; color: transparent; }
.hero-sub { font-size: clamp(1rem, 2vw, 1.25rem); color: var(--text-secondary); max-width: 620px; font-weight: 300; line-height: 1.8; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.btn-primary { background: linear-gradient(135deg, var(--neon-cyan), var(--neon-blue)); border: none; padding: 16px 44px; border-radius: 60px; font-weight: 700; color: var(--bg-deep); cursor: pointer; box-shadow: 0 0 40px rgba(34, 211, 238, 0.12); }
.btn-secondary { background: transparent; border: 1px solid rgba(255, 255, 255, 0.08); padding: 16px 44px; border-radius: 60px; font-weight: 600; color: var(--text-primary); cursor: pointer; text-decoration: none; display: inline-block; }
.btn-tertiary { background: transparent; border: 1px solid rgba(255, 255, 255, 0.08); padding: 16px 30px; border-radius: 60px; font-weight: 600; color: var(--text-primary); cursor: pointer; text-decoration: none; display: inline-block; }

.section { padding: 80px 0; position: relative; }
.section-header { margin-bottom: 40px; }
.section-tag { font-family: var(--font-mono); font-size: 0.65rem; color: var(--neon-cyan); text-transform: uppercase; letter-spacing: 3px; }
.section-title { font-size: clamp(1.6rem, 3.5vw, 2.8rem); font-weight: 700; letter-spacing: -1px; }
.section-desc { color: var(--text-secondary); margin-top: 12px; }

#skills { background: #000; min-height: 100vh; display: flex; align-items: center; justify-content: center; overflow: hidden; position: relative; }
#skills .container { text-align: left; width: 100%; max-width: 1200px; margin: 0 auto; }
#skills .section-header { text-align: left; margin-bottom: 20px; }
.char { display: inline-block; opacity: 0; transform: translateY(100%) rotateX(-90deg); transition: opacity 0.5s cubic-bezier(0.25, 1, 0.5, 1), transform 0.5s cubic-bezier(0.25, 1, 0.5, 1); margin-right: 4px; }
.char.show { opacity: 1; transform: translateY(0) rotateX(0); }
#particleCanvas { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 10; transform: perspective(1200px) rotateY(25deg) rotateX(10deg) scale(1.1); transform-origin: center center; }
#skills-text-container { position: relative; z-index: 20; margin-top: 60px; text-align: center; }
#main-desc {
    font-size: clamp(1.4rem, 3vw, 3.4rem); font-family: var(--font-sans); color: #a3b8cc; font-weight: 600;
    line-height: 1.8; max-width: 1000px; margin: 0 auto; opacity: 0; filter: blur(20px);
    transform: perspective(1200px) rotateY(25deg) rotateX(10deg) scale(1.1);
    will-change: transform, filter, opacity; text-shadow: 2px 2px 4px rgba(0,0,0,0.7); letter-spacing: 1px;
}
#main-desc.visible { opacity: 1; filter: blur(0); transition: opacity 0.5s ease, filter 0.5s ease; animation: slowRotate 10s ease-in-out infinite alternate; }
@keyframes slowRotate {
    0% { transform: perspective(1200px) rotateY(25deg) rotateX(10deg) scale(1.1); }
    100% { transform: perspective(1200px) rotateY(10deg) rotateX(10deg) scale(1.1); }
}

#projects { min-height: 100vh; display: flex; align-items: center; justify-content: center; flex-direction: column; position: relative; overflow: hidden; }
#projects .container { display: flex; justify-content: space-between; align-items: center; gap: 40px; width: 100%; }
.projects-left { flex: 0 0 45%; text-align: left; display: flex; flex-direction: column; gap: 30px; max-width: 600px; }
.tag-char { display: inline-block; opacity: 0; transform: translateY(100%) rotateX(-90deg); transition: opacity 0.5s cubic-bezier(0.25, 1, 0.5, 1), transform 0.5s cubic-bezier(0.25, 1, 0.5, 1); margin-right: 2px; }
.tag-char.show { opacity: 1; transform: translateY(0) rotateX(0); }
.project-card { padding: 25px; background: var(--glass-bg); border-radius: 20px; text-align: left; transition: all 0.4s ease; border: 1px solid rgba(255,255,255,0.05); }
.project-card.active { opacity: 1; transform: translateY(0); color: var(--text-primary); background: rgba(34, 211, 238, 0.08); border-color: rgba(34, 211, 238, 0.4); box-shadow: 0 0 20px rgba(34, 211, 238, 0.1); }
.project-card.active h3 { color: var(--neon-cyan); }
.project-card.active p { color: var(--text-secondary); }
.project-card.inactive { opacity: 0.3; filter: grayscale(100%); transform: scale(0.98); color: var(--text-muted); }
.project-card.inactive h3 { color: var(--text-muted); }
.project-card.inactive p { color: var(--text-muted); }
.project-icon { margin-right: 10px; font-size: 1.2rem; vertical-align: middle; }
.projects-right { flex: 0 0 55%; width: 55%; height: 70vh; border-radius: 20px; position: relative; background: rgba(255,255,255,0.02); border: 2px dashed rgba(255,255,255,0.2); overflow: hidden; }
.project-img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: translateX(50px); transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1); }
.project-img.visible { opacity: 1; transform: translateX(0); }
.project-img.hidden { opacity: 0; transform: translateX(-50px); }
.projects-bottom { margin-top: 50px; text-align: center; width: 100%; }
.btn-wiki { background: rgba(34, 211, 238, 0.1); border: 1px solid rgba(34, 211, 238, 0.5); color: var(--neon-cyan); padding: 12px 40px; border-radius: 30px; cursor: pointer; font-size: 1rem; transition: all 0.3s; }
.btn-wiki:hover { background: var(--neon-cyan); color: var(--bg-deep); }

#about { min-height: 100vh; display: flex; align-items: center; justify-content: center; flex-direction: column; }
.wiki-btn-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 50px; }
.wiki-card { background: var(--glass-bg); border: 1px solid rgba(255,255,255,0.1); padding: 30px 20px; border-radius: 16px; text-align: center; cursor: pointer; transition: all 0.3s; text-decoration: none; display: block; color: var(--text-primary); }
.wiki-card:hover { background: rgba(34, 211, 238, 0.1); border-color: var(--neon-cyan); }
.wiki-icon { font-size: 2.5rem; display: block; margin-bottom: 10px; }
.wiki-title { font-size: 1.2rem; font-weight: 700; margin-bottom: 5px; color: var(--neon-cyan); }
.wiki-desc { font-size: 0.85rem; color: var(--text-secondary); }
.about-wiki-bottom { margin-top: 60px; padding: 40px; background: var(--glass-bg); border-radius: 20px; border: 1px solid rgba(255,255,255,0.1); }
.about-wiki-bottom h2 { margin-bottom: 20px; }
.btn-full-wiki { background: linear-gradient(135deg, var(--neon-cyan), var(--neon-blue)); color: var(--bg-deep); border: none; padding: 15px 50px; font-size: 1rem; font-weight: 700; border-radius: 30px; cursor: pointer; margin-top: 20px; }

.footer { padding: 36px 0 24px; display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--text-muted); border-top: 1px solid rgba(255,255,255,0.05); background: rgba(2,6,23,0.8); }
.footer a { color: var(--text-muted); text-decoration: none; transition: color 0.3s; }
.footer a:hover { color: var(--neon-cyan); }

.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.6s, transform 0.6s; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* 移动端专项样式 */
@media (max-width: 768px) {
    .nav-links { display: none; } .hamburger { display: flex; }
    .hero-actions { flex-direction: column; } .btn-primary, .btn-secondary, .btn-tertiary { width: 100%; text-align: center; }

    #projects { height: auto; overflow: visible; padding: 60px 0; }
    #projects .container { flex-direction: column; gap: 20px; }
    .projects-left { max-width: 100%; flex: 0 0 100%; width: 100%; }

    .project-card.inactive { opacity: 1; filter: none; transform: scale(1); color: var(--text-primary); }
    .project-card.inactive h3 { color: var(--neon-cyan); }
    .project-card.inactive p { color: var(--text-secondary); }

    /* 移动端隐藏 PC 的大图轮播框 */
    .projects-right { display: none !important; }

    /* 移动端显示卡片内嵌图片（默认隐藏） */
    .mobile-project-img {
        display: block;
        width: 100%;
        height: auto;
        margin-top: 15px;
        border-radius: 12px;
        object-fit: cover;
        border: 1px solid rgba(255,255,255,0.1);
    }

    .wiki-btn-grid { grid-template-columns: 1fr; }
    .about-wiki-bottom { padding: 20px; }
}

/* PC 端默认隐藏移动端图片 */
.mobile-project-img {
    display: none;
}
