/* ========================================
   Apple-Style Main Stylesheet
   雨昕AI博 - 主样式
   ======================================== */

/* CSS 变量 */
:root {
    --color-bg: #ffffff;
    --color-bg-dark: #000000;
    --color-bg-tinted: #f5f5f7;
    --color-text: #1d1d1f;
    --color-text-secondary: #6e6e73;
    --color-text-light: #f5f5f7;
    --color-accent: #0071e3;
    --color-accent-hover: #0077ed;
    --color-border: #d2d2d7;
    --color-card: #ffffff;

    --gradient-blue: linear-gradient(135deg, #0066ff 0%, #00d4ff 100%);
    --gradient-purple: linear-gradient(135deg, #7c3aed 0%, #c026d3 100%);
    --gradient-green: linear-gradient(135deg, #059669 0%, #34d399 100%);
    --gradient-orange: linear-gradient(135deg, #ea580c 0%, #fbbf24 100%);
    --gradient-text: linear-gradient(135deg, #2997ff 0%, #5e5ce6 50%, #bf5af2 100%);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 28px;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 24px 80px rgba(0, 0, 0, 0.15);

    --nav-height: 52px;
    --max-width: 1080px;
    --section-padding: 140px 0;
}

/* 容器 */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 22px;
}

/* 渐变文字 */
.gradient-text {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% 200%;
    animation: gradientShift 6s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* ========================================
   导航栏
   ======================================== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    z-index: 9999;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    transition: background-color 0.3s, border-color 0.3s;
}

.nav.scrolled {
    background: rgba(255, 255, 255, 0.85);
    border-bottom-color: rgba(0, 0, 0, 0.1);
}

.nav-wrapper {
    max-width: 1024px;
    height: 100%;
    margin: 0 auto;
    padding: 0 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.logo-icon {
    font-size: 20px;
    background: var(--gradient-blue);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-menu {
    display: flex;
    gap: 4px;
    align-items: center;
}

.nav-link {
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 400;
    color: #1d1d1f;
    opacity: 0.85;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.nav-link:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.04);
}

.nav-link.active {
    color: var(--color-accent);
    opacity: 1;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    padding: 8px;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: #1d1d1f;
    border-radius: 2px;
    transition: all 0.3s;
}

.nav-toggle.active span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* ========================================
   Hero 首屏
   ======================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    background: #fbfbfd;
}

.hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: floatOrb 20s ease-in-out infinite;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #2997ff 0%, transparent 70%);
    top: -10%;
    left: -5%;
    animation-delay: 0s;
}

.orb-2 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, #bf5af2 0%, transparent 70%);
    bottom: -15%;
    right: -10%;
    animation-delay: -7s;
}

.orb-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #64d2ff 0%, transparent 70%);
    top: 40%;
    left: 50%;
    animation-delay: -14s;
}

@keyframes floatOrb {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -40px) scale(1.05); }
    66% { transform: translate(-20px, 30px) scale(0.95); }
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 22px;
}

.hero-eyebrow {
    font-size: 15px;
    font-weight: 500;
    color: var(--color-accent);
    letter-spacing: 0.02em;
    margin-bottom: 16px;
    opacity: 0;
    animation: fadeUp 0.8s ease 0.2s forwards;
}

.hero-title {
    font-size: clamp(40px, 7vw, 80px);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin-bottom: 24px;
    opacity: 0;
    animation: fadeUp 0.8s ease 0.4s forwards;
}

.hero-subtitle {
    font-size: clamp(17px, 2.2vw, 21px);
    font-weight: 400;
    color: var(--color-text-secondary);
    line-height: 1.5;
    margin-bottom: 40px;
    opacity: 0;
    animation: fadeUp 0.8s ease 0.6s forwards;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeUp 0.8s ease 0.8s forwards;
}

.hero-scroll {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    color: var(--color-text-secondary);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0;
    animation: fadeUp 0.8s ease 1.2s forwards;
}

.scroll-arrow {
    width: 1px;
    height: 30px;
    background: linear-gradient(to bottom, var(--color-text-secondary), transparent);
    position: relative;
    animation: scrollPulse 2s ease infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   按钮
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 400;
    border-radius: 980px;
    transition: all 0.25s ease;
    cursor: pointer;
    white-space: nowrap;
}

.btn-primary {
    background: var(--color-accent);
    color: #ffffff;
}

.btn-primary:hover {
    background: var(--color-accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(0, 113, 227, 0.3);
}

.btn-ghost {
    background: transparent;
    color: var(--color-accent);
    border: 1px solid var(--color-accent);
}

.btn-ghost:hover {
    background: rgba(0, 113, 227, 0.06);
}

.btn-large {
    padding: 16px 36px;
    font-size: 17px;
}

/* ========================================
   通用 Section
   ======================================== */
.section {
    padding: var(--section-padding);
    position: relative;
}

.section-dark {
    background: #000000;
    color: #f5f5f7;
}

.section-tinted {
    background: #f5f5f7;
}

.section-header {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 80px;
}

.section-eyebrow {
    display: inline-block;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-accent);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.section-title {
    font-size: clamp(32px, 5vw, 56px);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin-bottom: 20px;
}

.section-title.light {
    color: #f5f5f7;
}

.section-desc {
    font-size: clamp(17px, 2vw, 21px);
    color: var(--color-text-secondary);
    line-height: 1.5;
}

.section-desc.light {
    color: #a1a1a6;
}

.accent-blue { color: #2997ff; }
.accent-purple { color: #bf5af2; }
.accent-green { color: #30d158; }
.accent-orange { color: #ff9f0a; }

/* ========================================
   关于我 - 卡片网格
   ======================================== */
.intro-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.intro-card {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: var(--radius-lg);
    padding: 40px 32px;
    text-align: center;
    transition: all 0.4s ease;
    box-shadow: var(--shadow-sm);
}

.intro-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.intro-icon {
    font-size: 48px;
    margin-bottom: 24px;
}

.intro-card h3 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 12px;
}

.intro-card p {
    font-size: 15px;
    color: var(--color-text-secondary);
    line-height: 1.6;
}

/* ========================================
   模块概览 - 深色网格
   ======================================== */
.modules-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.module-tile {
    position: relative;
    background: #1d1d1f;
    border-radius: var(--radius-xl);
    padding: 48px;
    overflow: hidden;
    transition: all 0.4s ease;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.module-tile:hover {
    transform: scale(1.02);
    border-color: rgba(255, 255, 255, 0.15);
}

.module-glow {
    position: absolute;
    top: -50%;
    right: -30%;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.3;
    transition: opacity 0.4s;
}

.module-tile:hover .module-glow {
    opacity: 0.5;
}

.glow-blue { background: #2997ff; }
.glow-purple { background: #bf5af2; }
.glow-green { background: #30d158; }
.glow-orange { background: #ff9f0a; }

.module-content {
    position: relative;
    z-index: 1;
}

.module-tag {
    display: inline-block;
    font-size: 12px;
    font-weight: 500;
    color: #a1a1a6;
    padding: 4px 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 980px;
    margin-bottom: 24px;
}

.module-name {
    font-size: 48px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.module-fullname {
    font-size: 14px;
    color: #86868b;
    margin-bottom: 20px;
}

.module-desc {
    font-size: 17px;
    color: #d2d2d7;
    line-height: 1.5;
}

/* ========================================
   详情 Section - 双栏布局
   ======================================== */
.detail-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.detail-wrapper.reverse {
    direction: rtl;
}

.detail-wrapper.reverse > * {
    direction: ltr;
}

.detail-title {
    font-size: clamp(30px, 4vw, 44px);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin-bottom: 24px;
}

.detail-desc {
    font-size: 18px;
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin-bottom: 32px;
}

/* 特性列表 */
.feature-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.feature-list li {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.feature-dot {
    flex-shrink: 0;
    width: 10px;
    height: 10px;
    margin-top: 6px;
    border-radius: 50%;
    background: var(--color-accent);
    box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.15);
}

.feature-dot.purple {
    background: #bf5af2;
    box-shadow: 0 0 0 4px rgba(191, 90, 242, 0.15);
}

.feature-dot.green {
    background: #30d158;
    box-shadow: 0 0 0 4px rgba(48, 209, 88, 0.15);
}

.feature-dot.orange {
    background: #ff9f0a;
    box-shadow: 0 0 0 4px rgba(255, 159, 10, 0.15);
}

.feature-list strong {
    display: block;
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 4px;
}

.feature-list p {
    font-size: 15px;
    color: var(--color-text-secondary);
    line-height: 1.5;
}

/* ========================================
   可视化卡片
   ======================================== */
.visual-card {
    border-radius: var(--radius-xl);
    padding: 48px;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-xl);
}

/* RAG 流水线 */
.card-rag {
    background: linear-gradient(160deg, #f0f7ff 0%, #e3f0ff 100%);
}

.pipeline {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.pipeline-step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 28px;
    background: #ffffff;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    width: 100%;
    max-width: 260px;
    transition: all 0.3s;
}

.pipeline-step.highlight {
    background: var(--gradient-blue);
    color: #ffffff;
    box-shadow: 0 8px 24px rgba(0, 113, 227, 0.3);
}

.step-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0, 113, 227, 0.1);
    font-size: 13px;
    font-weight: 600;
    color: var(--color-accent);
}

.pipeline-step.highlight .step-num {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

.step-label {
    font-size: 16px;
    font-weight: 500;
}

.pipeline-arrow {
    color: #2997ff;
    font-size: 20px;
}

/* SKILL 堆叠 */
.card-skill {
    background: linear-gradient(160deg, #faf0ff 0%, #f3e3ff 100%);
}

.skill-stack {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    max-width: 280px;
}

.skill-block {
    padding: 18px 24px;
    background: #ffffff;
    border-radius: var(--radius-md);
    text-align: center;
    font-size: 16px;
    font-weight: 500;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
}

.skill-block.highlight {
    background: var(--gradient-purple);
    color: #ffffff;
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.3);
}

/* MCP 图 */
.card-mcp {
    background: linear-gradient(160deg, #f0fff5 0%, #e3ffe9 100%);
    min-height: 420px;
}

.mcp-diagram {
    position: relative;
    width: 100%;
    height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mcp-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--gradient-green);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    box-shadow: 0 8px 32px rgba(48, 209, 88, 0.4);
    z-index: 2;
}

.mcp-node {
    position: absolute;
    padding: 10px 18px;
    background: #ffffff;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    box-shadow: var(--shadow-md);
    z-index: 2;
}

.node-1 { top: 10%; left: 15%; }
.node-2 { top: 10%; right: 15%; }
.node-3 { bottom: 10%; left: 15%; }
.node-4 { bottom: 10%; right: 15%; }

.mcp-line {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120px;
    height: 2px;
    background: linear-gradient(90deg, #30d158, transparent);
    transform-origin: left center;
    z-index: 1;
}

.line-1 { transform: rotate(-145deg); }
.line-2 { transform: rotate(-35deg); }
.line-3 { transform: rotate(145deg); }
.line-4 { transform: rotate(35deg); }

/* Agent 循环 */
.card-agent {
    background: linear-gradient(160deg, #fff8f0 0%, #ffefde 100%);
}

.agent-loop {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 260px;
}

.loop-step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 24px;
    background: #ffffff;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s;
}

.loop-icon {
    font-size: 24px;
}

.step-think { border-left: 4px solid #2997ff; }
.step-plan { border-left: 4px solid #bf5af2; }
.step-act { border-left: 4px solid #ff9f0a; }
.step-observe { border-left: 4px solid #30d158; }

/* ========================================
   学习路线 - 时间线
   ======================================== */
.timeline {
    max-width: 760px;
    margin: 0 auto;
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 120px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, transparent, var(--color-border), transparent);
}

.timeline-item {
    display: flex;
    gap: 40px;
    margin-bottom: 48px;
    position: relative;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-marker {
    flex-shrink: 0;
    width: 100px;
    text-align: right;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-accent);
    padding-top: 4px;
}

.timeline-content {
    flex: 1;
    padding-left: 40px;
    position: relative;
}

.timeline-content::before {
    content: '';
    position: absolute;
    left: -7px;
    top: 8px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #ffffff;
    border: 3px solid var(--color-accent);
    box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.1);
}

.timeline-content h3 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 8px;
}

.timeline-content p {
    font-size: 15px;
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
}

.timeline-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.timeline-tags span {
    font-size: 12px;
    font-weight: 500;
    padding: 4px 12px;
    background: rgba(0, 113, 227, 0.08);
    color: var(--color-accent);
    border-radius: 980px;
}

/* ========================================
   统计数据
   ======================================== */
.section-stats {
    padding: 80px 0;
    background: #000000;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    text-align: center;
}

.stat-item {
    padding: 20px;
}

.stat-number {
    display: block;
    font-size: clamp(40px, 6vw, 64px);
    font-weight: 700;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 15px;
    color: #a1a1a6;
}

/* ========================================
   CTA
   ======================================== */
.section-cta {
    padding: 120px 0;
    text-align: center;
    background: #fbfbfd;
}

.cta-title {
    font-size: clamp(36px, 5vw, 56px);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin-bottom: 20px;
}

.cta-desc {
    font-size: 19px;
    color: var(--color-text-secondary);
    margin-bottom: 40px;
}

.cta-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ========================================
   页脚
   ======================================== */
.footer {
    background: #f5f5f7;
    padding: 60px 0 30px;
    border-top: 1px solid var(--color-border);
}

.footer-top {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-bottom: 40px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
}

.footer-tagline {
    font-size: 14px;
    color: var(--color-text-secondary);
}

.footer-links {
    display: flex;
    gap: 60px;
    justify-content: flex-end;
}

.footer-col h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
}

.footer-col a {
    display: block;
    font-size: 13px;
    color: var(--color-text-secondary);
    margin-bottom: 10px;
    transition: color 0.2s;
}

.footer-col a:hover {
    color: var(--color-text);
}

.footer-bottom {
    border-top: 1px solid var(--color-border);
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--color-text-secondary);
}

.footer-note {
    opacity: 0.7;
}

/* ========================================
   响应式
   ======================================== */
@media (max-width: 980px) {
    .detail-wrapper {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .detail-wrapper.reverse {
        direction: ltr;
    }

    .intro-grid {
        grid-template-columns: 1fr;
    }

    .modules-grid {
        grid-template-columns: 1fr;
    }

    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-top {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .footer-links {
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 90px 0;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: var(--nav-height);
        left: 0;
        right: 0;
        flex-direction: column;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(20px);
        padding: 20px;
        border-bottom: 1px solid var(--color-border);
    }

    .nav-menu.open {
        display: flex;
    }

    .nav-toggle {
        display: flex;
    }

    .timeline::before {
        left: 20px;
    }

    .timeline-item {
        flex-direction: column;
        gap: 8px;
    }

    .timeline-marker {
        text-align: left;
        width: auto;
        padding-left: 48px;
    }

    .timeline-content {
        padding-left: 48px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .module-tile {
        padding: 32px 28px;
    }

    .module-name {
        font-size: 36px;
    }

    .visual-card {
        padding: 32px 24px;
        min-height: 320px;
    }
}

@media (max-width: 480px) {
    .stats-row {
        grid-template-columns: 1fr;
    }

    .footer-links {
        gap: 30px;
        flex-direction: column;
    }
}
