@charset "UTF-8";

:root {
    --bg-base: #f3f3f3;
    --bg-mica: rgba(243, 243, 243, 0.85);
    --bg-card: rgba(255, 255, 255, 0.72);
    --bg-hover: rgba(0, 0, 0, 0.04);
    --bg-active: rgba(0, 0, 0, 0.08);
    --text-primary: #1a1a1a;
    --text-secondary: #5f5f5f;
    --text-tertiary: #8a8a8a;
    --accent: #5b5fc7;
    --accent-hover: #4a4eb3;
    --border: rgba(0, 0, 0, 0.06);
    --shadow: 0 2px 8px rgba(0,0,0,0.04), 0 0 1px rgba(0,0,0,0.08);
    --shadow-hover: 0 8px 24px rgba(0,0,0,0.08), 0 0 1px rgba(0,0,0,0.1);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --glow-1: rgba(91, 95, 199, 0.75);
    --glow-2: rgba(118, 75, 162, 0.65);
    --glow-3: rgba(0, 150, 255, 0.55);
    --glow-4: rgba(236, 72, 153, 0.45);
    --glow-5: rgba(34, 197, 94, 0.35);
    --glow-6: rgba(245, 158, 11, 0.3);
}

[data-theme="dark"] {
    --bg-base: #202020;
    --bg-mica: rgba(32, 32, 32, 0.85);
    --bg-card: rgba(40, 40, 40, 0.72);
    --bg-hover: rgba(255, 255, 255, 0.06);
    --bg-active: rgba(255, 255, 255, 0.1);
    --text-primary: #e0e0e0;
    --text-secondary: #a0a0a0;
    --text-tertiary: #707070;
    --accent: #7a7fd9;
    --accent-hover: #8b90e8;
    --border: rgba(255, 255, 255, 0.06);
    --shadow: 0 2px 8px rgba(0,0,0,0.2), 0 0 1px rgba(255,255,255,0.04);
    --shadow-hover: 0 8px 24px rgba(0,0,0,0.3), 0 0 1px rgba(255,255,255,0.06);
    --glow-1: rgba(91, 95, 199, 0.50);
    --glow-2: rgba(118, 75, 162, 0.44);
    --glow-3: rgba(0, 150, 255, 0.36);
    --glow-4: rgba(236, 72, 153, 0.30);
    --glow-5: rgba(34, 197, 94, 0.24);
    --glow-6: rgba(245, 158, 11, 0.20);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: "Segoe UI Variable", "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
    background: var(--bg-base); color: var(--text-primary);
    min-height: 100vh; overflow-x: hidden;
    transition: background 0.5s ease, color 0.5s ease;
    -webkit-font-smoothing: antialiased;
}

.bg-layer { position: fixed; inset: 0; z-index: -2; background: var(--bg-base); transition: background 0.5s ease; }
.bg-glow { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bg-glow .orb { position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.9; animation: float 7s ease-in-out infinite; }
.bg-glow .orb:nth-child(1) { width: 700px; height: 700px; background: var(--glow-1); top: -20%; left: -15%; animation-delay: 0s; }
.bg-glow .orb:nth-child(2) { width: 650px; height: 650px; background: var(--glow-2); bottom: -20%; right: -15%; animation-delay: -3.5s; }
.bg-glow .orb:nth-child(3) { width: 550px; height: 550px; background: var(--glow-3); top: 40%; left: 55%; animation-delay: -1.5s; }
.bg-glow .orb:nth-child(4) { width: 600px; height: 600px; background: var(--glow-4); top: 70%; left: 0%; animation-delay: -5s; }
.bg-glow .orb:nth-child(5) { width: 500px; height: 500px; background: var(--glow-5); top: 5%; left: 75%; animation-delay: -2.5s; }
.bg-glow .orb:nth-child(6) { width: 450px; height: 450px; background: var(--glow-6); top: 85%; left: 35%; animation-delay: -6s; }
@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    20% { transform: translate(60px, -70px) scale(1.12); }
    40% { transform: translate(-50px, 50px) scale(0.9); }
    60% { transform: translate(70px, 40px) scale(1.06); }
    80% { transform: translate(-40px, -50px) scale(0.96); }
}
.mica-overlay { position: fixed; inset: 0; z-index: 0; backdrop-filter: blur(45px) saturate(1.2); -webkit-backdrop-filter: blur(45px) saturate(1.2); background: var(--bg-mica); transition: background 0.5s ease; pointer-events: none; }

.loader-overlay { position: fixed; inset: 0; z-index: 9999; background: var(--bg-base); display: flex; align-items: center; justify-content: center; transition: opacity 0.5s ease, visibility 0.5s ease; }
.loader-overlay.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.origin-loader { width: 44px; height: 44px; position: relative; }
.origin-loader::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 3px solid transparent; border-top-color: var(--accent); border-right-color: var(--accent); animation: origin-spin 0.9s cubic-bezier(0.4, 0, 0.2, 1) infinite; }
.origin-loader::after { content: ""; position: absolute; inset: 5px; border-radius: 50%; border: 3px solid transparent; border-bottom-color: var(--accent); border-left-color: var(--accent); animation: origin-spin 0.7s cubic-bezier(0.4, 0, 0.2, 1) infinite reverse; opacity: 0.5; }
@keyframes origin-spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

.app-bar { position: fixed; top: 0; left: 0; right: 0; z-index: 100; padding: 12px 24px; backdrop-filter: blur(40px) saturate(1.5); -webkit-backdrop-filter: blur(40px) saturate(1.5); background: rgba(255, 255, 255, 0.65); border-bottom: 1px solid var(--border); transition: background 0.5s ease, border-color 0.5s ease; }
[data-theme="dark"] .app-bar { background: rgba(32, 32, 32, 0.65); }
.app-bar::after { content: ""; position: absolute; bottom: -40px; left: 0; right: 0; height: 40px; background: linear-gradient(to bottom, var(--bg-mica), transparent); pointer-events: none; opacity: 0.8; }
.app-bar-inner { max-width: 900px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; }

.greeting-brand { font-size: clamp(15px, 2.5vw, 18px); font-weight: 700; background: linear-gradient(90deg, #7c3aed, #3b82f6, #7c3aed); background-size: 200% auto; -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; animation: gradient-flow 3s linear infinite; letter-spacing: 0.02em; white-space: nowrap; }
@keyframes gradient-flow { 0% { background-position: 0% center; } 100% { background-position: 200% center; } }

.nav-center { display: flex; gap: 32px; align-items: center; }
.nav-tab { padding: 6px 16px; border-radius: var(--radius-md); text-decoration: none; color: var(--text-secondary); font-size: 14px; font-weight: 500; transition: var(--transition); cursor: pointer; user-select: none; border: none; background: none; font-family: inherit; }
.nav-tab:hover { background: var(--bg-hover); color: var(--text-primary); transform: scale(1.05); }
.nav-tab:active { transform: scale(0.97); }
.nav-tab.active { color: var(--accent); font-weight: 600; }

.nav-right { display: flex; align-items: center; gap: 10px; }

.bilibili-btn { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; padding: 0; border-radius: var(--radius-md); background: var(--bg-card); backdrop-filter: blur(20px); border: 1px solid var(--border); text-decoration: none; color: var(--text-secondary); transition: var(--transition); box-shadow: var(--shadow); cursor: pointer; }
.bilibili-btn:hover { transform: scale(1.12); box-shadow: var(--shadow-hover); background: var(--bg-hover); color: var(--text-primary); }
.bilibili-btn:active { transform: scale(0.95); }
.bilibili-btn svg { width: 20px; height: 20px; flex-shrink: 0; fill: #FB7299; }

.theme-toggle { width: 38px; height: 38px; border-radius: var(--radius-md); border: 1px solid var(--border); background: var(--bg-card); backdrop-filter: blur(20px); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: var(--transition); box-shadow: var(--shadow); color: var(--text-primary); }
.theme-toggle:hover { transform: scale(1.12); box-shadow: var(--shadow-hover); background: var(--bg-hover); }
.theme-toggle:active { transform: scale(0.95); }
.theme-toggle svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.pages-container { position: relative; width: 100%; overflow: hidden; margin-top: 80px; }
.pages-track { display: flex; width: 200%; transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1); }
.page { width: 50%; min-height: calc(100vh - 140px); padding: 40px 24px 80px; flex-shrink: 0; }
.page-inner { max-width: 900px; margin: 0 auto; }

.about-title { font-size: clamp(26px, 5vw, 38px); font-weight: 700; color: var(--text-primary); line-height: 1.2; margin-bottom: 10px; letter-spacing: -0.02em; }
.about-sub { font-size: clamp(13px, 2vw, 15px); color: var(--text-secondary); font-weight: 400; margin-bottom: 36px; }
.bio-line { font-size: clamp(14px, 2.2vw, 16px); color: var(--text-secondary); line-height: 1.8; margin-bottom: 12px; max-width: 600px; }

.project-title { font-size: clamp(26px, 5vw, 38px); font-weight: 700; color: var(--text-primary); margin-bottom: 32px; }

.project-card {
    background: var(--bg-card); backdrop-filter: blur(40px) saturate(1.2);
    border: 1px solid var(--border); border-radius: var(--radius-lg);
    padding: 28px 32px; box-shadow: var(--shadow); transition: var(--transition);
    display: flex; align-items: center; justify-content: space-between; gap: 20px;
    margin-bottom: 16px;
}
.project-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }

.project-name { font-size: clamp(18px, 3vw, 24px); font-weight: 600; color: var(--text-primary); line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.download-btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 10px 28px; border-radius: var(--radius-md);
    background: #5b5fc7;
    color: #ffffff;
    font-size: 14px; font-weight: 600;
    text-decoration: none; border: none;
    transition: var(--transition); cursor: pointer;
    box-shadow: 0 4px 12px rgba(91, 95, 199, 0.35);
    white-space: nowrap; flex-shrink: 0;
    aspect-ratio: 2 / 1;
}
.download-btn:hover { transform: scale(1.08); background: #4a4eb3; box-shadow: 0 6px 20px rgba(91, 95, 199, 0.5); }
.download-btn:active { transform: scale(0.96); }

.footer { position: relative; z-index: 1; padding: 20px 24px; display: flex; justify-content: space-between; align-items: center; max-width: 900px; margin: 0 auto; width: 100%; }
.footer-left { color: var(--text-tertiary); font-size: 12px; }
.footer-right { color: var(--text-tertiary); font-size: 6px; }

@media (max-width: 640px) {
    .app-bar { padding: 10px 16px; }
    .nav-center { gap: 16px; }
    .nav-tab { padding: 6px 12px; font-size: 13px; }
    .page { padding: 24px 16px 60px; }
    .project-card { padding: 20px 16px; gap: 12px; }
    .download-btn { padding: 8px 18px; font-size: 13px; }
}
