/* ==============================================
   AI 素养课 v2 — 浅灰主调 + AI 高级感
   参考：Vercel / Linear / Cursor / Anthropic
   ============================================== */

:root {
    /* 主色 - 极简白灰 */
    --bg: #fafafa;
    --bg-subtle: #f4f4f5;
    --bg-elevated: #ffffff;

    /* 文字 */
    --text: #0a0a0a;
    --text-secondary: #525252;
    --text-tertiary: #a3a3a3;

    /* 边框 */
    --border: #e5e5e5;
    --border-subtle: #f0f0f0;

    /* 强调色 - 克制使用 */
    --accent: #18181b;
    --accent-blue: #2563eb;
    --accent-cyan: #0891b2;
    --accent-gradient: linear-gradient(135deg, #0a0a0a 0%, #1e1e1e 100%);

    /* 状态色（低饱和度） */
    --green: #15803d;
    --orange: #c2410c;
    --red: #b91c1c;
    --purple: #6b21a8;

    /* 尺寸 */
    --radius-sm: 6px;
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;

    /* 阴影 - 极轻 */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);

    /* 字体 */
    --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "SF Pro Text", "Inter", system-ui, sans-serif;
    --font-mono: "SF Mono", Monaco, Consolas, "JetBrains Mono", monospace;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    font-weight: 400;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* 微妙背景：浅灰 + 网格 */
    background-image:
        radial-gradient(circle at 50% 0%, rgba(99, 102, 241, 0.04) 0%, transparent 60%),
        linear-gradient(rgba(0, 0, 0, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.02) 1px, transparent 1px);
    background-size: 100% 100%, 60px 60px, 60px 60px;
    background-attachment: fixed;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== 顶部导航 ===== */
.topnav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(250, 250, 250, 0.8);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--border);
    margin: 0 -24px 32px;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}
.topnav .brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.01em;
}
.topnav .brand-mark {
    width: 24px;
    height: 24px;
    background: var(--accent-gradient);
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    font-family: var(--font-mono);
}
.topnav .nav-links {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}
.topnav .nav-links a {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.15s ease;
}
.topnav .nav-links a:hover {
    background: var(--bg-subtle);
    color: var(--text);
}
.topnav .nav-links a.active {
    background: var(--text);
    color: #fff;
}

/* ===== Hero ===== */
.hero {
    text-align: left;
    padding: 80px 0 60px;
    position: relative;
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-family: var(--font-mono);
}
.hero-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--green);
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(21, 128, 61, 0.15);
    animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}
.hero h1 {
    font-size: 48px;
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: var(--text);
    margin-bottom: 16px;
    max-width: 700px;
}
.hero h1 .gradient-text {
    background: linear-gradient(120deg, #0a0a0a 0%, #525252 50%, #0a0a0a 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero .lead {
    font-size: 17px;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 600px;
    margin-bottom: 32px;
    font-weight: 400;
}
.hero-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}
.hero-meta {
    display: flex;
    gap: 24px;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
}
.hero-meta .item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.hero-meta .label {
    font-size: 11px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}
.hero-meta .value {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

/* ===== 按钮 ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    border-radius: var(--radius);
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.15s ease;
    text-decoration: none;
    user-select: none;
    line-height: 1.4;
    font-family: var(--font-sans);
}
.btn:active { transform: scale(0.98); }
.btn-primary {
    background: var(--text);
    color: #fff;
    border-color: var(--text);
}
.btn-primary:hover {
    background: #27272a;
    border-color: #27272a;
}
.btn-secondary {
    background: var(--bg-elevated);
    color: var(--text);
    border-color: var(--border);
}
.btn-secondary:hover {
    background: var(--bg-subtle);
    border-color: #d4d4d4;
}
.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border-color: transparent;
}
.btn-ghost:hover {
    background: var(--bg-subtle);
    color: var(--text);
}
.btn-arrow::after {
    content: '→';
    font-family: var(--font-mono);
    transition: transform 0.2s ease;
}
.btn-arrow:hover::after {
    transform: translateX(2px);
}
.btn-block {
    display: flex;
    width: 100%;
    justify-content: center;
}

/* ===== 卡片网格 ===== */
.section {
    margin: 64px 0;
}
.section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 12px;
}
.section-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.02em;
}
.section-meta {
    font-size: 13px;
    color: var(--text-tertiary);
    font-family: var(--font-mono);
}
.section-desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 8px;
    max-width: 600px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}
.grid-2 {
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
}
.grid-3 {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

/* ===== 卡片 ===== */
.card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0,0,0,0.04), transparent);
    opacity: 0;
    transition: opacity 0.2s;
}
.card:hover {
    border-color: #d4d4d4;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}
.card:hover::before {
    opacity: 1;
}
.card-icon {
    width: 32px;
    height: 32px;
    background: var(--bg-subtle);
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    color: var(--text);
    font-size: 16px;
    font-weight: 600;
    font-family: var(--font-mono);
}
.card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    gap: 6px;
}
.card-desc {
    font-size: 13.5px;
    color: var(--text-secondary);
    line-height: 1.5;
    flex: 1;
}
.card-meta {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-subtle);
}
.card-tag {
    font-size: 11px;
    color: var(--text-tertiary);
    background: var(--bg-subtle);
    padding: 2px 8px;
    border-radius: 100px;
    font-weight: 500;
    font-family: var(--font-mono);
}
.card-tag.dark { background: var(--text); color: #fff; }
.card-arrow {
    position: absolute;
    top: 20px;
    right: 20px;
    color: var(--text-tertiary);
    font-family: var(--font-mono);
    font-size: 14px;
    opacity: 0;
    transform: translateX(-4px);
    transition: all 0.2s;
}
.card:hover .card-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* ===== 概念框 ===== */
.concept-box {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin: 24px 0;
    position: relative;
    overflow: hidden;
}
.concept-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 3px;
    background: var(--text);
}
.concept-label {
    font-size: 11px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
    font-weight: 600;
    font-family: var(--font-mono);
}
.concept-text {
    font-size: 15px;
    color: var(--text);
    line-height: 1.6;
}

/* ===== 列表项 ===== */
.list-item {
    padding: 12px 16px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.15s ease;
}
.list-item:hover {
    background: var(--bg-subtle);
    border-color: #d4d4d4;
}
.list-item .icon {
    width: 24px;
    height: 24px;
    background: var(--bg-subtle);
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    flex-shrink: 0;
    font-family: var(--font-mono);
}
.list-item .content {
    flex: 1;
    min-width: 0;
}
.list-item .title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 1px;
}
.list-item .desc {
    font-size: 12.5px;
    color: var(--text-tertiary);
    line-height: 1.4;
}
.list-item .arrow {
    color: var(--text-tertiary);
    font-family: var(--font-mono);
    font-size: 13px;
    transition: transform 0.15s;
}
.list-item:hover .arrow {
    color: var(--text);
    transform: translateX(2px);
}

/* ===== 标签筛选 ===== */
.filter-bar {
    display: inline-flex;
    gap: 2px;
    padding: 3px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.filter-btn {
    padding: 6px 12px;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    background: transparent;
    border: none;
    transition: all 0.15s;
    font-family: var(--font-sans);
}
.filter-btn.active {
    background: var(--text);
    color: #fff;
}
.filter-btn:hover:not(.active) {
    background: var(--bg-subtle);
}

/* ===== FAQ ===== */
.faq-item {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 6px;
    overflow: hidden;
    transition: border-color 0.15s;
}
.faq-item:hover { border-color: #d4d4d4; }
.faq-q {
    padding: 14px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 500;
    color: var(--text);
    user-select: none;
    transition: background 0.15s;
    font-size: 14.5px;
    gap: 16px;
}
.faq-q:hover { background: var(--bg-subtle); }
.faq-q-text { flex: 1; }
.faq-q-tag {
    font-size: 11px;
    color: var(--text-tertiary);
    background: var(--bg-subtle);
    padding: 2px 8px;
    border-radius: 100px;
    font-family: var(--font-mono);
    font-weight: 600;
    flex-shrink: 0;
}
.faq-arrow {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-tertiary);
    font-family: var(--font-mono);
    font-size: 14px;
    flex-shrink: 0;
}
.faq-item.open .faq-arrow {
    transform: rotate(180deg);
}
.faq-a {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 14px;
}
.faq-item.open .faq-a {
    padding: 0 20px 16px;
    max-height: 2000px;
}
.faq-a strong { color: var(--text); font-weight: 600; }
.faq-a ul, .faq-a ol { margin: 8px 0 8px 20px; }
.faq-a li { margin: 3px 0; }

/* ===== 视频卡片 ===== */
.video-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 12px;
    transition: all 0.2s;
}
.video-card:hover {
    border-color: #d4d4d4;
    box-shadow: var(--shadow-md);
}
.video-card video {
    width: 100%;
    display: block;
    background: #000;
    aspect-ratio: 16/9;
}
.video-card .info {
    padding: 14px 16px;
}
.video-card .info h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 2px;
    font-family: var(--font-mono);
}
.video-card .info p {
    font-size: 12.5px;
    color: var(--text-tertiary);
}

/* ===== 强调块 ===== */
.quote {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-left: 3px solid var(--text);
    border-radius: var(--radius);
    padding: 20px 24px;
    margin: 24px 0;
    font-size: 16px;
    font-weight: 500;
    color: var(--text);
    line-height: 1.5;
    font-style: italic;
}
.quote::before {
    content: '"';
    display: block;
    font-size: 32px;
    color: var(--text-tertiary);
    line-height: 0.5;
    margin-bottom: 8px;
    font-style: normal;
}

/* ===== 状态标签（顶部小标）===== */
.status-line {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-tertiary);
    font-family: var(--font-mono);
    margin-bottom: 16px;
}
.status-line::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--text);
    border-radius: 50%;
}

/* ===== Footer ===== */
.footer {
    margin: 80px -24px 0;
    padding: 32px 24px;
    border-top: 1px solid var(--border);
    text-align: left;
    color: var(--text-tertiary);
    font-size: 12.5px;
    line-height: 1.8;
}
.footer a {
    color: var(--text-secondary);
    text-decoration: none;
    margin-right: 16px;
    transition: color 0.15s;
}
.footer a:hover { color: var(--text); }
.footer-meta {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-subtle);
}

/* ===== 工具类 ===== */
.text-mono { font-family: var(--font-mono); }
.text-secondary { color: var(--text-secondary); }
.text-tertiary { color: var(--text-tertiary); }
.text-center { text-align: center; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mt-2 { margin-top: 16px; }
.mt-4 { margin-top: 32px; }
.hidden { display: none; }

/* ===== 渐入动画 ===== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.section, .hero, .card, .list-item, .faq-item, .video-card {
    animation: fadeIn 0.4s ease-out backwards;
}
.section:nth-child(1) { animation-delay: 0.05s; }
.section:nth-child(2) { animation-delay: 0.1s; }
.section:nth-child(3) { animation-delay: 0.15s; }
.section:nth-child(4) { animation-delay: 0.2s; }
.section:nth-child(5) { animation-delay: 0.25s; }
.section:nth-child(6) { animation-delay: 0.3s; }

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .container { padding: 0 16px; }
    .topnav { margin: 0 -16px 24px; padding: 12px 16px; }
    .hero { padding: 48px 0 32px; }
    .hero h1 { font-size: 32px; }
    .hero .lead { font-size: 15px; }
    .section { margin: 40px 0; }
    .section-title { font-size: 18px; }
    .grid, .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .footer { margin: 48px -16px 0; padding: 24px 16px; }
    .card { padding: 16px; }
}

/* ===== 极简滚动条 ===== */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 100px;
    border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover {
    background: #d4d4d4;
}

/* ===== 选中文本 ===== */
::selection {
    background: var(--text);
    color: var(--bg);
}
