/* ========================================
   非凡工造 - FEIFANGONGZAO
   Stripe / Linear 风 · 浅色精致科技
   ======================================== */

:root {
    /* 主色 */
    --color-accent: #635bff;        /* 主强调（Stripe blurple 系） */
    --color-accent-d: #4c46d6;      /* 主强调深 */
    --color-cyan: #06b6d4;
    --color-violet: #8b5cf6;

    /* 背景层级（浅色） */
    --bg-page: #ffffff;
    --bg-soft: #f7f8fc;
    --bg-card: #ffffff;

    /* 文字 */
    --text-primary: #16182d;
    --text-secondary: #51566b;
    --text-tertiary: #8a90a6;

    /* 边框 / 阴影 */
    --border-light: rgba(22, 24, 45, 0.08);
    --border-soft: rgba(22, 24, 45, 0.12);
    --shadow-sm: 0 1px 2px rgba(16, 24, 64, 0.04), 0 2px 8px rgba(16, 24, 64, 0.04);
    --shadow-md: 0 8px 24px rgba(30, 27, 75, 0.08);
    --shadow-lg: 0 18px 50px rgba(30, 27, 75, 0.12);

    --font-family: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', monospace;

    --section-padding: 120px;

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-full: 9999px;

    --transition-base: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family);
    color: var(--text-primary);
    background-color: var(--bg-page);
    line-height: 1.6;
    overflow-x: hidden;
}

::selection {
    background-color: rgba(99, 91, 255, 0.18);
    color: inherit;
}

/* ========== 滚动进度条 ========== */
.scroll-progress {
    position: fixed;
    top: 0; left: 0;
    height: 3px;
    width: 0%;
    z-index: 60;
    background: linear-gradient(90deg, var(--color-accent), var(--color-violet), var(--color-cyan));
    transition: width 0.1s linear;
}

/* 自定义光标残留元素隐藏（本风格不使用） */
.cursor-dot, .cursor-ring { display: none !important; }

/* ========== 导航栏 ========== */
#navbar { transition: var(--transition-base); }

#navbar.scrolled {
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: saturate(180%) blur(18px);
    -webkit-backdrop-filter: saturate(180%) blur(18px);
    border-bottom: 1px solid var(--border-light);
}

.logo-text {
    font-weight: 800;
    font-size: 19px;
    letter-spacing: 0.01em;
    color: var(--text-primary);
}

.logo-img { filter: none; }

.nav-link {
    position: relative;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    letter-spacing: 0.01em;
    padding: 8px 0;
    transition: var(--transition-base);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0; left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 100%; height: 2px;
    background: var(--color-accent);
    border-radius: 2px;
    transition: transform 0.3s ease;
}

.nav-link:hover, .nav-link.active { color: var(--text-primary); }
.nav-link:hover::after, .nav-link.active::after { transform: translateX(-50%) scaleX(1); }

/* 汉堡菜单 */
.hamburger-line {
    display: block; width: 22px; height: 2px;
    background: var(--text-primary); border-radius: 2px;
    transition: var(--transition-base);
}
.menu-open .hamburger-line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-open .hamburger-line:nth-child(2) { opacity: 0; }
.menu-open .hamburger-line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

#mobile-menu {
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
}

.mobile-nav-link {
    display: block;
    font-size: 15px; font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 13px 0;
    transition: var(--transition-base);
    border-bottom: 1px solid var(--border-light);
}
.mobile-nav-link:hover { color: var(--text-primary); padding-left: 8px; }

/* ========== Hero 区域 ========== */
#hero {
    position: relative;
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
    background: var(--bg-page);
}

/* 顶部柔和彩光（Stripe/Linear 极光） */
.hero-aurora {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(48% 60% at 28% 8%, rgba(99, 91, 255, 0.20), transparent 60%),
        radial-gradient(42% 55% at 82% 4%, rgba(6, 182, 212, 0.16), transparent 60%),
        radial-gradient(40% 50% at 62% 0%, rgba(139, 92, 246, 0.16), transparent 60%);
}

.hero-grid-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(22, 24, 45, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(22, 24, 45, 0.035) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(ellipse 70% 60% at center 40%, black 20%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at center 40%, black 20%, transparent 75%);
}

.hero-badge {
    display: inline-flex; align-items: center; gap: 9px;
    padding: 8px 18px;
    font-size: 13px; font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(8px);
    margin-bottom: 32px;
}

.badge-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(99, 91, 255, 0.18);
    animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.45; }
}

.hero-title { line-height: 1.05; }

.hero-eyebrow {
    font-family: var(--font-mono);
    font-size: clamp(12px, 2vw, 15px);
    font-weight: 500;
    letter-spacing: 0.42em;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: 18px;
}

/* 标题：纯色，无渐变 */
.hero-name {
    font-size: clamp(54px, 11vw, 104px);
    font-weight: 800;
    letter-spacing: -0.025em;
    color: var(--text-primary);
}

.hero-subtitle {
    font-size: clamp(17px, 2.4vw, 22px);
    font-weight: 400;
    color: var(--text-secondary);
}

/* 领域轮播 */
.hero-rotator {
    display: inline-flex; align-items: center; gap: 12px;
    margin-top: 24px;
    padding: 9px 22px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-sm);
    font-size: clamp(15px, 2vw, 18px);
}
.rotator-prefix { color: var(--text-tertiary); font-weight: 400; }
.rotator-track {
    position: relative; display: inline-block;
    min-width: 110px; text-align: left;
    font-weight: 700; font-family: var(--font-mono);
}
.rotator-word { color: var(--color-accent); }
.rotator-word.swap-out { animation: rotatorOut 0.4s forwards; }
.rotator-word.swap-in { animation: rotatorIn 0.4s forwards; }
@keyframes rotatorOut { to { opacity: 0; transform: translateY(-12px); } }
@keyframes rotatorIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

/* 滚动指示器 */
.scroll-indicator {
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    color: var(--text-tertiary); text-decoration: none;
    transition: var(--transition-base);
}
.scroll-indicator:hover { color: var(--color-accent); }
.scroll-mouse {
    width: 22px; height: 34px;
    border: 1.5px solid currentColor; border-radius: 12px;
    display: flex; justify-content: center; padding-top: 6px;
}
.scroll-wheel {
    width: 3px; height: 7px; border-radius: 2px; background: currentColor;
    animation: scroll-wheel 1.8s ease-in-out infinite;
}
@keyframes scroll-wheel {
    0% { opacity: 0; transform: translateY(-4px); }
    40% { opacity: 1; }
    80%, 100% { opacity: 0; transform: translateY(8px); }
}

/* ========== 按钮 ========== */
.btn-primary {
    position: relative;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 14px 30px;
    font-size: 15px; font-weight: 600;
    color: #fff;
    background: var(--color-accent);
    border-radius: var(--radius-full);
    text-decoration: none; border: none; cursor: pointer;
    box-shadow: 0 6px 20px rgba(99, 91, 255, 0.28);
    transition: var(--transition-base);
}
.btn-primary:hover {
    background: var(--color-accent-d);
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(99, 91, 255, 0.38);
}

.btn-secondary {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 14px 30px;
    font-size: 15px; font-weight: 600;
    color: var(--text-primary);
    background: #fff;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-full);
    text-decoration: none; cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-base);
}
.btn-secondary:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
    transform: translateY(-2px);
}

/* ========== 动画 ========== */
.animate-fade-in-up {
    opacity: 0; transform: translateY(30px);
    animation: fadeInUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.animation-delay-100 { animation-delay: 0.1s; }
.animation-delay-200 { animation-delay: 0.25s; }
.animation-delay-300 { animation-delay: 0.4s; }
.animation-delay-400 { animation-delay: 0.55s; }
@keyframes fadeInUp { to { opacity: 1; transform: translateY(0); } }

.reveal {
    opacity: 0; transform: translateY(38px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    transition-delay: var(--d, 0s);
}
.reveal.revealed { opacity: 1; transform: translateY(0); }

/* ========== Section 通用 ========== */
.section-padding { padding: var(--section-padding) 0; }

.section-header { text-align: center; max-width: 720px; margin: 0 auto; }

.section-tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 12px; font-weight: 600;
    letter-spacing: 0.22em; text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: 16px;
    padding: 6px 16px;
    background: rgba(99, 91, 255, 0.08);
    border: 1px solid rgba(99, 91, 255, 0.16);
    border-radius: var(--radius-full);
}

.section-title {
    font-size: clamp(32px, 5vw, 50px);
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.15;
    color: var(--text-primary);
    text-align: center;
}
.section-title.text-left { text-align: left; }
.section-title span { color: var(--color-accent); }

.section-desc {
    margin-top: 18px;
    font-size: 17px;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* 区块交替底色 */
#expertise { background: var(--bg-soft); }
#about { background: var(--bg-page); }

/* ========== 工程领域 / 技能卡 ========== */
.skill-card {
    position: relative;
    padding: 30px 28px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease, box-shadow 0.3s ease;
}

.skill-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(99, 91, 255, 0.08), transparent 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}
.skill-card:hover {
    border-color: rgba(99, 91, 255, 0.3);
    box-shadow: var(--shadow-lg);
}
.skill-card:hover::before { opacity: 1; }

.skill-index {
    position: absolute; top: 22px; right: 26px;
    font-family: var(--font-mono);
    font-size: 13px; font-weight: 600;
    color: var(--text-tertiary); opacity: 0.6;
}

.skill-icon-wrap {
    display: inline-flex; align-items: center; justify-content: center;
    width: 56px; height: 56px;
    border-radius: var(--radius-md);
    background: rgba(99, 91, 255, 0.08);
    border: 1px solid rgba(99, 91, 255, 0.14);
    margin-bottom: 22px;
    transition: var(--transition-base);
}
.skill-icon-wrap svg { width: 27px; height: 27px; color: var(--color-accent); }
.skill-card:hover .skill-icon-wrap {
    transform: translateY(-2px);
    background: rgba(99, 91, 255, 0.12);
}

.skill-title { font-size: 20px; font-weight: 700; color: var(--text-primary); margin-bottom: 10px; }
.skill-desc { font-size: 14.5px; line-height: 1.7; color: var(--text-secondary); margin-bottom: 18px; }

.skill-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.skill-tags span {
    font-family: var(--font-mono);
    font-size: 12px; padding: 4px 11px;
    color: var(--text-secondary);
    background: var(--bg-soft);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-full);
    transition: var(--transition-base);
}
.skill-card:hover .skill-tags span { border-color: rgba(99, 91, 255, 0.25); color: var(--text-primary); }

/* 整合特色卡 */
.skill-card-feature {
    background: linear-gradient(150deg, rgba(99, 91, 255, 0.06), rgba(139, 92, 246, 0.05));
    border-color: rgba(99, 91, 255, 0.2);
    display: flex; flex-direction: column; justify-content: center;
}
.skill-icon-feature { background: var(--color-accent); border-color: transparent; }
.skill-icon-feature svg { color: #fff; }

.skill-link {
    display: inline-flex; align-items: center; gap: 7px;
    margin-top: 6px;
    font-size: 14px; font-weight: 600;
    color: var(--color-accent); text-decoration: none;
    transition: var(--transition-base);
}
.skill-link:hover { gap: 12px; color: var(--color-accent-d); }

/* ========== 关于我们 ========== */
.about-lead {
    font-size: clamp(20px, 2.6vw, 28px);
    font-weight: 600; color: var(--text-primary);
    line-height: 1.4; margin: 24px 0 18px;
}
.about-text { color: var(--text-secondary); line-height: 1.85; margin-bottom: 16px; font-size: 16px; }
.about-text-muted { color: var(--text-tertiary); line-height: 1.85; font-size: 15px; }

.feature-card {
    display: flex; align-items: flex-start; gap: 20px;
    padding: 26px 28px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease, box-shadow 0.3s ease;
}
.feature-card:hover { border-color: rgba(99, 91, 255, 0.25); box-shadow: var(--shadow-md); }

.feature-icon-wrapper {
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    width: 54px; height: 54px;
    border-radius: var(--radius-md);
    background: rgba(99, 91, 255, 0.08);
    border: 1px solid rgba(99, 91, 255, 0.14);
    transition: var(--transition-base);
}
.feature-card:hover .feature-icon-wrapper { transform: scale(1.05); background: rgba(99, 91, 255, 0.12); }
.feature-icon { width: 27px; height: 27px; color: var(--color-accent); }

.feature-title { font-size: 18px; font-weight: 700; color: var(--text-primary); margin-bottom: 6px; }
.feature-desc { font-size: 14px; line-height: 1.7; color: var(--text-secondary); }

/* 统计数字（纯色） */
.stat-item { text-align: center; }
.stat-number {
    font-size: clamp(34px, 4vw, 46px);
    font-weight: 800; letter-spacing: -0.03em; line-height: 1;
    color: var(--text-primary);
}
.stat-number::after { content: attr(data-suffix); font-size: 0.6em; vertical-align: super; color: var(--color-accent); margin-left: 1px; }
.stat-number:not([data-suffix])::after { content: '+'; color: var(--color-accent); }
.stat-label { font-size: 13px; color: var(--text-tertiary); margin-top: 10px; font-weight: 500; }

/* ========== 联系我们 / 页脚 ========== */
footer { position: relative; background: var(--bg-soft); }

.footer-top-line {
    position: absolute; top: 0; left: 0; width: 100%; height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-soft), transparent);
}
.footer-bg-glow {
    position: absolute; top: 0; left: 50%;
    transform: translateX(-50%);
    width: 900px; height: 360px;
    background: radial-gradient(60% 100% at 50% 0%, rgba(99, 91, 255, 0.10), transparent 60%);
    pointer-events: none;
}

.contact-card {
    display: block; text-align: center;
    padding: 30px 22px;
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
}
.contact-card:hover { border-color: rgba(99, 91, 255, 0.25); box-shadow: var(--shadow-md); }

.contact-icon-wrap {
    display: inline-flex; align-items: center; justify-content: center;
    width: 52px; height: 52px;
    border-radius: var(--radius-md);
    background: rgba(99, 91, 255, 0.08);
    border: 1px solid rgba(99, 91, 255, 0.14);
    color: var(--color-accent);
    transition: var(--transition-base);
}
.contact-card:hover .contact-icon-wrap { transform: scale(1.08); }

.contact-title { margin-top: 18px; font-weight: 600; color: var(--text-primary); }
.contact-value { color: var(--text-tertiary); font-size: 13.5px; margin-top: 4px; font-family: var(--font-mono); }

/* 社交图标 */
.social-icon {
    display: flex; align-items: center; justify-content: center;
    width: 48px; height: 48px; border-radius: 50%;
    background: #fff;
    color: var(--text-tertiary);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    transition: var(--transition-base);
}
.social-icon:hover { transform: translateY(-4px); }
.social-icon svg { width: 20px; height: 20px; }
.social-wechat:hover { color: #07C160; border-color: rgba(7, 193, 96, 0.4); }
.social-bilibili:hover { color: #FB7299; border-color: rgba(251, 114, 153, 0.4); }
.social-github:hover { color: #16182d; border-color: var(--border-soft); }

/* 页脚快速链接 */
.footer-link {
    display: block;
    font-size: 14px;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 4px 0;
    transition: var(--transition-base);
}
.footer-link:hover { color: var(--color-accent); padding-left: 4px; }

/* ========== 响应式 ========== */
@media (min-width: 1400px) { :root { --section-padding: 140px; } }
@media (max-width: 1024px) { :root { --section-padding: 96px; } }
@media (max-width: 768px) {
    :root { --section-padding: 80px; }
    .hero-cta { flex-direction: column; align-items: center; }
    .btn-primary, .btn-secondary { width: 100%; max-width: 300px; }
    .feature-card { padding: 22px 24px; }
    .section-title.text-left { text-align: center; }
    .about-lead { text-align: center; }
}
@media (max-width: 480px) {
    :root { --section-padding: 64px; }
    .skill-card { padding: 26px 24px; }
    .contact-card { padding: 26px 18px; }
}

@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; }
    .reveal { opacity: 1; transform: none; }
    .animate-fade-in-up { opacity: 1; transform: none; }
}
