- 采用响应式设计优化移动端显示效果 - 引入玻璃拟态UI组件提升视觉体验 - 添加多语言切换功能(中/英) - 集成主题切换(明/暗模式) - 重新组织个人信息展示结构 - 使用bento网格布局替代传统分段 - 更新社交链接图标与交互方式 - 优化技术栈可视化呈现 - 增强MBTI性格特征展示模块 - 改进GitHub项目与博客文章加载体验 - 重写微信公众号弹窗样式 - 替换外部资源CDN链接以提高加载速度 - 移除旧版导航栏与页脚组件 - 调整元数据viewport配置增强兼容性
363 lines
17 KiB
CSS
363 lines
17 KiB
CSS
/* about.css - Aurora Nexus Design System */
|
|
|
|
/* =========================================
|
|
1. Design Tokens & Typography
|
|
========================================= */
|
|
:root {
|
|
/* 字体栈:兼容中英混排,大陆访问快 */
|
|
--font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
|
|
--font-serif: "Georgia", "Times New Roman", "Songti SC", "SimSun", serif;
|
|
--font-mono: "JetBrains Mono", "Fira Code", Consolas, monospace;
|
|
|
|
/* DAY THEME: 晨曦 (Morning Light) */
|
|
--bg-canvas: #f4f6f8;
|
|
--bg-orb-1: rgba(168, 237, 234, 0.6);
|
|
--bg-orb-2: rgba(254, 214, 227, 0.6);
|
|
|
|
--glass-surface: rgba(255, 255, 255, 0.7);
|
|
--glass-border: 1px solid rgba(255, 255, 255, 0.9);
|
|
--glass-shadow: 0 10px 40px rgba(0, 0, 0, 0.04);
|
|
--glass-blur: 20px;
|
|
|
|
--text-primary: #1a1a1a;
|
|
--text-secondary: #555555;
|
|
--text-tertiary: #999999;
|
|
|
|
--accent-color: #6c5ce7;
|
|
--accent-glow: rgba(108, 92, 231, 0.2);
|
|
|
|
--nav-bg: rgba(255, 255, 255, 0.85);
|
|
--radius-lg: 24px;
|
|
--radius-md: 16px;
|
|
}
|
|
|
|
[data-theme="night"] {
|
|
/* NIGHT THEME: 赛博 (Cyber Neon) */
|
|
--bg-canvas: #050505;
|
|
--bg-orb-1: rgba(76, 29, 149, 0.4);
|
|
--bg-orb-2: rgba(13, 148, 136, 0.3);
|
|
|
|
--glass-surface: rgba(20, 20, 25, 0.7);
|
|
--glass-border: 1px solid rgba(255, 255, 255, 0.08);
|
|
--glass-shadow: 0 15px 50px rgba(0, 0, 0, 0.6);
|
|
|
|
--text-primary: #ffffff;
|
|
--text-secondary: #a0a0a0;
|
|
--text-tertiary: #666666;
|
|
|
|
--accent-color: #00d2ff;
|
|
--accent-glow: rgba(0, 210, 255, 0.4);
|
|
|
|
--nav-bg: rgba(20, 20, 20, 0.85);
|
|
}
|
|
|
|
/* =========================================
|
|
2. Global Reset
|
|
========================================= */
|
|
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
|
|
body {
|
|
font-family: var(--font-sans);
|
|
background-color: var(--bg-canvas);
|
|
color: var(--text-primary);
|
|
line-height: 1.6;
|
|
min-height: 100vh;
|
|
transition: background-color 0.4s ease, color 0.3s ease;
|
|
overflow-x: hidden;
|
|
}
|
|
a { text-decoration: none; color: inherit; transition: color 0.2s; }
|
|
button { border: none; background: none; cursor: pointer; font-family: inherit; }
|
|
|
|
/* =========================================
|
|
3. Ambient Background
|
|
========================================= */
|
|
.ambient-canvas {
|
|
position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: -1; overflow: hidden; pointer-events: none;
|
|
}
|
|
.light-orb {
|
|
position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.6;
|
|
animation: float 25s infinite alternate ease-in-out;
|
|
}
|
|
.orb-1 { top: -10%; left: -10%; width: 60vw; height: 60vw; background: var(--bg-orb-1); }
|
|
.orb-2 { bottom: -10%; right: -10%; width: 50vw; height: 50vw; background: var(--bg-orb-2); animation-delay: -5s; }
|
|
.noise-overlay {
|
|
position: absolute; inset: 0; opacity: 0.03;
|
|
background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
|
|
}
|
|
@keyframes float { 0% { transform: translate(0,0); } 100% { transform: translate(40px, 60px); } }
|
|
|
|
/* =========================================
|
|
4. Glass Components (Universal)
|
|
========================================= */
|
|
.glass-nav, .bento-box, .glass-panel, .glass-list, .modal-card {
|
|
background: var(--glass-surface);
|
|
backdrop-filter: blur(var(--glass-blur));
|
|
-webkit-backdrop-filter: blur(var(--glass-blur));
|
|
border: var(--glass-border);
|
|
box-shadow: var(--glass-shadow);
|
|
border-radius: var(--radius-lg);
|
|
transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s ease;
|
|
}
|
|
|
|
.bento-box:hover, .glass-panel:hover {
|
|
transform: translateY(-4px);
|
|
box-shadow: 0 20px 40px rgba(0,0,0,0.1);
|
|
border-color: var(--accent-color);
|
|
}
|
|
|
|
/* 渐变与发光文字 */
|
|
.gradient-name {
|
|
background: linear-gradient(135deg, var(--text-primary), var(--accent-color));
|
|
-webkit-background-clip: text; background-clip: text; color: transparent;
|
|
font-weight: 800;
|
|
}
|
|
[data-theme="night"] .gradient-name {
|
|
text-shadow: 0 0 25px var(--accent-glow);
|
|
}
|
|
.neon-text {
|
|
font-family: var(--font-mono); color: var(--text-primary); font-weight: 700;
|
|
}
|
|
[data-theme="night"] .neon-text {
|
|
color: #fff; text-shadow: 0 0 10px var(--accent-color);
|
|
}
|
|
.glow-title {
|
|
display: flex; align-items: center; gap: 8px; font-size: 1.4rem; color: var(--text-primary);
|
|
}
|
|
|
|
/* =========================================
|
|
5. Navigation
|
|
========================================= */
|
|
.glass-nav {
|
|
position: fixed; z-index: 1000;
|
|
}
|
|
/* PC Navigation */
|
|
@media (min-width: 769px) {
|
|
.glass-nav {
|
|
top: 20px; left: 50%; transform: translateX(-50%);
|
|
width: 90%; max-width: 1280px; height: 70px; padding: 0 30px;
|
|
border-radius: 100px;
|
|
}
|
|
.nav-content { display: flex; justify-content: space-between; align-items: center; height: 100%; }
|
|
.brand { font-family: var(--font-serif); font-size: 1.5rem; font-weight: 700; display: flex; align-items: center; }
|
|
.brand-dot { width: 8px; height: 8px; background: var(--accent-color); border-radius: 50%; margin-left: 6px; }
|
|
|
|
.nav-actions { display: flex; align-items: center; gap: 20px; }
|
|
.nav-btn { display: flex; align-items: center; gap: 6px; font-weight: 500; color: var(--text-secondary); transition: all 0.3s; }
|
|
.nav-btn:hover, .nav-btn.active { color: var(--text-primary); }
|
|
.nav-btn i { font-size: 1.1rem; }
|
|
|
|
.divider { height: 20px; width: 1px; background: var(--text-tertiary); opacity: 0.3; }
|
|
.icon-btn { font-size: 1.2rem; color: var(--text-primary); padding: 5px; border-radius: 50%; transition: background 0.3s; }
|
|
.icon-btn:hover { background: rgba(128,128,128,0.1); }
|
|
.lang-text { font-size: 0.8rem; font-weight: 700; font-family: var(--font-mono); }
|
|
|
|
[data-theme="day"] .show-light { display: none; }
|
|
[data-theme="night"] .show-dark { display: none; }
|
|
}
|
|
|
|
/* =========================================
|
|
6. BENTO GRID LAYOUT (The Core)
|
|
========================================= */
|
|
.main-stage { max-width: 1280px; margin: 120px auto 60px; padding: 0 40px; }
|
|
.bento-layout {
|
|
display: grid; gap: 24px;
|
|
/* PC: 3 Columns, 2 Rows */
|
|
grid-template-columns: 320px 1fr 280px;
|
|
grid-template-rows: 240px 220px auto;
|
|
grid-template-areas:
|
|
"profile bio stats"
|
|
"profile bio mbti"
|
|
"tech tech interests";
|
|
}
|
|
|
|
/* 区域分配 */
|
|
.area-profile { grid-area: profile; }
|
|
.area-bio { grid-area: bio; }
|
|
.area-stats { grid-area: stats; }
|
|
.area-mbti { grid-area: mbti; }
|
|
.area-tech { grid-area: tech; position: relative; overflow: hidden; }
|
|
.area-interests { grid-area: interests; }
|
|
.mobile-only-box { display: none; }
|
|
|
|
/* --- Profile Card --- */
|
|
.area-profile { padding: 30px; display: flex; flex-direction: column; justify-content: space-between; }
|
|
.avatar-wrapper { position: relative; width: 120px; height: 120px; margin: 0 auto 20px; }
|
|
.avatar-img { width: 100%; height: 100%; border-radius: 50%; border: 4px solid var(--bg-canvas); object-fit: cover; }
|
|
.status-badge {
|
|
position: absolute; bottom: 0; right: 0; background: #2ecc71; color: #fff;
|
|
font-size: 0.7rem; padding: 2px 8px; border-radius: 10px; border: 2px solid var(--bg-canvas);
|
|
}
|
|
.profile-meta { text-align: center; }
|
|
.gradient-name { font-size: 2rem; margin-bottom: 8px; font-family: var(--font-serif); }
|
|
.role-text { color: var(--text-secondary); margin-bottom: 15px; font-size: 0.9rem; }
|
|
.meta-tags { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
|
|
.glass-pill {
|
|
background: rgba(128,128,128,0.1); padding: 4px 10px; border-radius: 8px;
|
|
font-size: 0.8rem; color: var(--text-secondary); display: flex; align-items: center; gap: 4px;
|
|
}
|
|
.social-dock { display: flex; justify-content: center; gap: 15px; margin-top: 20px; }
|
|
.s-icon { font-size: 1.4rem; color: var(--text-secondary); transition: transform 0.2s, color 0.2s; }
|
|
.s-icon:hover { color: var(--accent-color); transform: scale(1.1); }
|
|
|
|
/* --- Bio Card --- */
|
|
.area-bio { padding: 35px; display: flex; flex-direction: column; justify-content: center; position: relative; }
|
|
.section-label { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 2px; color: var(--text-tertiary); margin-bottom: 15px; }
|
|
.bio-text { font-size: 1rem; line-height: 1.8; color: var(--text-primary); margin-bottom: 20px; }
|
|
.quote-block { border-left: 3px solid var(--accent-color); padding-left: 15px; color: var(--text-secondary); font-style: italic; font-size: 0.95rem; }
|
|
|
|
/* --- Stats Card --- */
|
|
.area-stats { display: flex; flex-direction: column; justify-content: center; padding: 25px; }
|
|
.stat-grid { display: grid; grid-template-columns: 1fr; gap: 15px; }
|
|
.stat-cell { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid rgba(128,128,128,0.1); padding-bottom: 10px; }
|
|
.stat-cell:last-child { border-bottom: none; }
|
|
.stat-num { font-size: 1.4rem; }
|
|
.stat-label { font-size: 0.8rem; color: var(--text-tertiary); }
|
|
|
|
/* --- MBTI --- */
|
|
.area-mbti { padding: 25px; display: flex; align-items: center; }
|
|
.mbti-card { width: 100%; }
|
|
.mbti-visual { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
|
|
.mbti-big { font-size: 2.5rem; font-weight: 900; color: var(--accent-color); font-family: var(--font-mono); opacity: 0.8; }
|
|
.mbti-sub { font-size: 1rem; font-weight: 600; color: var(--text-primary); }
|
|
.mbti-traits { font-size: 0.9rem; color: var(--text-secondary); }
|
|
.trait-tags { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
|
|
.trait { font-size: 0.75rem; background: rgba(var(--accent-color), 0.1); padding: 2px 8px; border-radius: 4px; }
|
|
|
|
/* --- Tech Stack --- */
|
|
.area-tech { display: flex; flex-direction: column; }
|
|
.box-header { padding: 20px; display: flex; align-items: center; border-bottom: 1px solid rgba(128,128,128,0.1); }
|
|
.box-header h3 { font-size: 1.1rem; color: var(--text-primary); }
|
|
.tech-viewport { flex: 1; position: relative; width: 100%; min-height: 300px; }
|
|
.tech-tag {
|
|
position: absolute; padding: 6px 12px; border-radius: 6px;
|
|
font-family: var(--font-mono); font-size: 0.85rem; font-weight: 600;
|
|
color: var(--text-primary); background: rgba(255,255,255,0.4);
|
|
border: 1px solid rgba(255,255,255,0.3); box-shadow: 0 4px 10px rgba(0,0,0,0.05);
|
|
white-space: nowrap; user-select: none;
|
|
}
|
|
[data-theme="night"] .tech-tag { background: rgba(0,0,0,0.5); border-color: rgba(255,255,255,0.1); color: #fff; }
|
|
|
|
/* --- Interests --- */
|
|
.area-interests { padding: 20px; }
|
|
.timeline-list { display: flex; flex-direction: column; justify-content: space-around; height: 100%; padding-top: 10px; }
|
|
.tl-item { display: flex; align-items: center; gap: 15px; }
|
|
.tl-icon { font-size: 1.5rem; width: 40px; text-align: center; }
|
|
.tl-info h4 { font-size: 0.95rem; margin-bottom: 2px; }
|
|
.tl-info span { font-size: 0.8rem; color: var(--text-tertiary); }
|
|
|
|
/* =========================================
|
|
7. Content Columns (Repo & Blog)
|
|
========================================= */
|
|
.content-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 40px; }
|
|
.col-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
|
|
.more-link { font-size: 0.9rem; color: var(--accent-color); font-weight: 600; }
|
|
|
|
.glass-list { padding: 20px; display: flex; flex-direction: column; gap: 12px; min-height: 200px; }
|
|
.blog-card {
|
|
padding: 15px; background: rgba(128,128,128,0.05); border-radius: var(--radius-md);
|
|
cursor: pointer; transition: all 0.2s; border-left: 3px solid transparent;
|
|
}
|
|
.blog-card:hover { background: rgba(128,128,128,0.1); border-left-color: var(--accent-color); }
|
|
.b-title { font-weight: 600; margin-bottom: 5px; color: var(--text-primary); display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
|
|
.b-meta { font-size: 0.8rem; color: var(--text-secondary); display: flex; justify-content: space-between; }
|
|
|
|
.projects-list { padding: 10px; max-height: 400px; overflow-y: auto; }
|
|
.repo-card {
|
|
margin-bottom: 12px; padding: 15px; background: rgba(128,128,128,0.05);
|
|
border-radius: var(--radius-md); border: 1px solid transparent; cursor: pointer;
|
|
}
|
|
.repo-card:hover { border-color: var(--accent-color); }
|
|
.repo-top { display: flex; justify-content: space-between; font-weight: 700; color: var(--text-primary); }
|
|
.repo-desc { font-size: 0.85rem; color: var(--text-secondary); margin-top: 5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
|
|
|
|
/* Loading Animation */
|
|
.skeleton-loader { height: 60px; background: rgba(128,128,128,0.1); border-radius: 8px; margin-bottom: 10px; animation: pulse 1.5s infinite; }
|
|
@keyframes pulse { 0% { opacity: 0.5; } 50% { opacity: 1; } 100% { opacity: 0.5; } }
|
|
|
|
/* Comments */
|
|
.comments-area { margin: 40px 0; }
|
|
.comment-box { padding: 30px; }
|
|
|
|
/* =========================================
|
|
8. Tablet Layout (Adaptive)
|
|
========================================= */
|
|
@media (min-width: 769px) and (max-width: 1024px) {
|
|
.bento-layout {
|
|
grid-template-columns: 1fr 1fr;
|
|
grid-template-areas:
|
|
"profile stats"
|
|
"profile mbti"
|
|
"bio bio"
|
|
"tech tech"
|
|
"interests interests";
|
|
grid-template-rows: auto;
|
|
}
|
|
.area-profile { flex-direction: row; align-items: center; gap: 20px; }
|
|
.avatar-wrapper { margin: 0; width: 100px; height: 100px; }
|
|
.content-columns { grid-template-columns: 1fr; }
|
|
}
|
|
|
|
/* =========================================
|
|
9. Mobile Layout (App Stream)
|
|
========================================= */
|
|
@media (max-width: 768px) {
|
|
.main-stage { padding: 0 16px; margin: 20px auto 100px; }
|
|
|
|
/* Nav -> Bottom Dock */
|
|
.glass-nav {
|
|
top: auto; bottom: 0; left: 0; transform: none; width: 100%; border-radius: 0;
|
|
height: 60px; padding: 0; border-top: 1px solid rgba(128,128,128,0.1);
|
|
background: var(--nav-bg);
|
|
}
|
|
.brand, .divider, .lang-text { display: none; }
|
|
.nav-content { justify-content: center; }
|
|
.nav-actions { width: 100%; justify-content: space-around; gap: 0; }
|
|
.nav-btn { flex-direction: column; font-size: 0.7rem; gap: 2px; }
|
|
.nav-btn i { font-size: 1.4rem; }
|
|
.nav-btn span { font-size: 10px; }
|
|
.icon-btn { font-size: 1.2rem; }
|
|
|
|
/* Bento Stacking */
|
|
.bento-layout { display: flex; flex-direction: column; gap: 16px; }
|
|
|
|
.area-profile { padding: 20px; flex-direction: row; gap: 15px; align-items: center; }
|
|
.avatar-wrapper { width: 80px; height: 80px; margin: 0; }
|
|
.profile-meta { text-align: left; }
|
|
.gradient-name { font-size: 1.6rem; margin-bottom: 4px; }
|
|
.role-text { font-size: 0.8rem; margin-bottom: 8px; }
|
|
.meta-tags { justify-content: flex-start; }
|
|
.desktop-only { display: none; }
|
|
|
|
.area-stats { padding: 15px; }
|
|
.stat-grid { grid-template-columns: 1fr 1fr 1fr; gap: 5px; }
|
|
.stat-cell { flex-direction: column; border-bottom: none; border-right: 1px solid rgba(128,128,128,0.1); padding: 5px; }
|
|
.stat-cell:last-child { border-right: none; }
|
|
.stat-num { font-size: 1.1rem; }
|
|
.stat-label { font-size: 0.6rem; }
|
|
|
|
.area-tech { height: auto; min-height: auto; }
|
|
.tech-viewport { min-height: auto; padding: 15px; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
|
|
.tech-tag { position: relative !important; transform: none !important; margin: 0; font-size: 0.8rem; }
|
|
|
|
.mobile-only-box { display: flex; justify-content: space-around; padding: 20px; }
|
|
.s-btn { font-size: 1.5rem; color: var(--text-secondary); width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; background: rgba(128,128,128,0.1); border-radius: 50%; }
|
|
|
|
.content-columns { display: flex; flex-direction: column; gap: 20px; }
|
|
.repo-desc { -webkit-line-clamp: 1; }
|
|
}
|
|
|
|
/* =========================================
|
|
10. Modal & Footer
|
|
========================================= */
|
|
.modal-backdrop {
|
|
position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 2000;
|
|
background: rgba(0,0,0,0.6); backdrop-filter: blur(5px);
|
|
display: none; align-items: center; justify-content: center;
|
|
}
|
|
.modal-card {
|
|
width: 300px; padding: 30px; background: var(--bg-canvas); border-radius: 24px;
|
|
text-align: center; position: relative; box-shadow: 0 20px 50px rgba(0,0,0,0.4);
|
|
}
|
|
.close-modal { position: absolute; top: 15px; right: 15px; font-size: 1.5rem; color: var(--text-secondary); }
|
|
.qr-wrapper img { width: 100%; border-radius: 12px; margin: 20px 0; border: 1px solid rgba(128,128,128,0.2); }
|
|
|
|
.site-footer { text-align: center; color: var(--text-tertiary); font-size: 0.8rem; padding-bottom: 80px; } /* padding for mobile dock */ |