星夜随笔 html网页 开源

星夜随笔-html博客

星夜随笔 --- 设计说明

整体风格

  • 深蓝夜空主题 :继承原文件的深蓝基调(#0f1629),但色调更加柔和和谐,去除了过于强烈的对比

  • 星光银蓝配色 :以月光蓝(#7da8d1)为点缀,搭配柔和的银白色系,营造宁静唯美的阅读氛围

  • 大量留白:极简主义设计,内容区域最大宽度900px,两侧充分留白

核心特性

表格

特性 说明
动态星空背景 Canvas绘制的粒子星空系统,包含闪烁星星 + 随机流星效果
玻璃拟态导航 固定顶部导航,滚动时自动增强背景模糊
渐入动画 Hero区域元素依次淡入,头像有轻微的浮动呼吸效果
精选文章卡片 大图卡片hover时图片缩放 + 渐变遮罩,视觉层次丰富
文章列表 日期 + 标题 + 摘要的极简排版,hover时左侧出现月光渐变 + 箭头滑入
标签云 圆角胶囊标签,hover时上浮 + 发光效果
关于我区域 左右分栏布局,图片 + 文字 + 引用语
返回顶部 滚动超过500px后显示,玻璃质感按钮
自定义滚动条 与主题风格一致的细滚动条

图片占位说明

你需要在同目录放置以下图片文件:

  • avatar.jpg --- 头像(圆形,建议 1:1)

  • featured1.jpg / featured2.jpg / featured3.jpg --- 精选文章封面图

  • about.jpg --- 关于我区域图片

如果图片缺失,会显示默认占位图,不影响整体效果。

可自定义内容

  • 修改 hero-name 中的"你的名字"

  • 修改文章列表中的标题、日期、摘要

  • 修改标签云中的标签

  • 修改关于我区域的文字

html 复制代码
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>星夜随笔 --- 个人博客</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@300;400;500;600;700&family=Noto+Sans+SC:wght@300;400;500&family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300;1,400&family=Great+Vibes&display=swap" rel="stylesheet">
<style>
/* ============================================
   星夜随笔 --- 唯美简约个人博客主页
   设计理念:深蓝夜空 + 柔和星光 + 极简留白
   ============================================ */

:root {
  /* 主色调 --- 深邃夜空 */
  --night-deep:    #0f1629;
  --night-mid:     #1a2240;
  --night-soft:    #232d4d;

  /* 星光色系 --- 柔和银蓝 */
  --star-dim:      #6b7a9e;
  --star-soft:     #8a9bb8;
  --star-bright:   #b0c4de;
  --star-glow:     #d4e4f7;
  --star-white:    #eef4fb;

  /* 强调色 --- 月光蓝 */
  --moon:          #7da8d1;
  --moon-soft:     #a3c4e8;
  --moon-glow:     rgba(125, 168, 209, 0.15);

  /* 玻璃质感 */
  --glass-bg:      rgba(255, 255, 255, 0.03);
  --glass-border:  rgba(255, 255, 255, 0.06);
  --glass-hover:   rgba(255, 255, 255, 0.08);

  /* 文字 */
  --text-title:    #f0f4fa;
  --text-body:     #c8d4e8;
  --text-muted:    #7a8aaa;
  --text-faint:    #4a5a7a;

  /* 动画 */
  --ease-out:      cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft:     cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Noto Serif SC', 'Source Han Serif SC', serif;
  font-weight: 300;
  background: var(--night-deep);
  color: var(--text-body);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

/* ========== 星空背景画布 ========== */
#starfield {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ========== 渐变遮罩层 ========== */
#gradient-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 1;
  pointer-events: none;
  background: 
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(35, 45, 77, 0.4) 0%, transparent 70%),
    radial-gradient(ellipse 60% 50% at 80% 20%, rgba(125, 168, 209, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 20% 80%, rgba(125, 168, 209, 0.04) 0%, transparent 50%);
}

/* ========== 顶部导航 ========== */
.nav-bar {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  z-index: 100;
  padding: 0 5vw;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  background: rgba(15, 22, 41, 0.6);
  border-bottom: 1px solid var(--glass-border);
  transition: all 0.5s var(--ease-soft);
}

.nav-bar.scrolled {
  background: rgba(15, 22, 41, 0.85);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.logo {
  font-family: 'Great Vibes', cursive;
  font-size: 1.8rem;
  color: var(--star-white);
  text-decoration: none;
  letter-spacing: 1px;
  transition: all 0.4s var(--ease-out);
  position: relative;
}

.logo::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 1px;
  background: linear-gradient(90deg, var(--moon), transparent);
  transition: width 0.5s var(--ease-out);
}

.logo:hover::after {
  width: 100%;
}

.logo:hover {
  color: var(--moon-soft);
  text-shadow: 0 0 20px rgba(125, 168, 209, 0.3);
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: 2px;
  text-transform: uppercase;
  position: relative;
  padding: 4px 0;
  transition: color 0.4s var(--ease-soft);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 50%;
  width: 0; height: 1px;
  background: var(--moon);
  transition: all 0.4s var(--ease-out);
  transform: translateX(-50%);
}

.nav-links a:hover {
  color: var(--star-bright);
}

.nav-links a:hover::after {
  width: 100%;
}

/* ========== 主内容区 ========== */
main {
  position: relative;
  z-index: 10;
}

/* ========== Hero 区域 ========== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 5vw 80px;
  position: relative;
}

.hero-avatar {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.08);
  box-shadow: 
    0 0 0 4px rgba(125, 168, 209, 0.1),
    0 0 40px rgba(125, 168, 209, 0.15),
    0 20px 60px rgba(0, 0, 0, 0.4);
  margin-bottom: 2.5rem;
  transition: all 0.6s var(--ease-out);
  animation: avatarFloat 6s ease-in-out infinite;
}

@keyframes avatarFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.hero-avatar:hover {
  box-shadow: 
    0 0 0 6px rgba(125, 168, 209, 0.15),
    0 0 60px rgba(125, 168, 209, 0.25),
    0 25px 70px rgba(0, 0, 0, 0.5);
  transform: scale(1.03);
}

.hero-name {
  font-family: 'Noto Serif SC', serif;
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 300;
  color: var(--text-title);
  letter-spacing: 6px;
  margin-bottom: 0.8rem;
  opacity: 0;
  animation: fadeUp 1s var(--ease-out) 0.3s forwards;
}

.hero-subtitle {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  font-weight: 300;
  font-style: italic;
  color: var(--star-soft);
  letter-spacing: 3px;
  margin-bottom: 2rem;
  opacity: 0;
  animation: fadeUp 1s var(--ease-out) 0.6s forwards;
}

.hero-desc {
  max-width: 520px;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 2;
  margin-bottom: 2.5rem;
  opacity: 0;
  animation: fadeUp 1s var(--ease-out) 0.9s forwards;
}

.hero-divider {
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--moon), transparent);
  margin-bottom: 2.5rem;
  opacity: 0;
  animation: fadeUp 1s var(--ease-out) 1.1s forwards;
}

.hero-social {
  display: flex;
  gap: 1.5rem;
  opacity: 0;
  animation: fadeUp 1s var(--ease-out) 1.3s forwards;
}

.hero-social a {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  color: var(--text-muted);
  font-size: 0.85rem;
  text-decoration: none;
  transition: all 0.4s var(--ease-out);
  backdrop-filter: blur(10px);
}

.hero-social a:hover {
  border-color: rgba(125, 168, 209, 0.3);
  background: var(--moon-glow);
  color: var(--star-bright);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(125, 168, 209, 0.15);
}

.scroll-hint {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-faint);
  font-size: 0.75rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  opacity: 0;
  animation: fadeUp 1s var(--ease-out) 2s forwards;
}

.scroll-hint .line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--text-faint), transparent);
  animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
  0%, 100% { opacity: 0.3; transform: scaleY(0.5); }
  50% { opacity: 1; transform: scaleY(1); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========== 文章列表区域 ========== */
.section {
  padding: 100px 5vw;
  max-width: 900px;
  margin: 0 auto;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin-bottom: 3.5rem;
}

.section-title {
  font-family: 'Noto Serif SC', serif;
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--text-title);
  letter-spacing: 4px;
  white-space: nowrap;
}

.section-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--glass-border), transparent);
}

/* ========== 文章卡片 ========== */
.article-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.article-item {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--glass-border);
  text-decoration: none;
  color: inherit;
  transition: all 0.5s var(--ease-out);
  position: relative;
  overflow: hidden;
}

.article-item::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, var(--moon-glow), transparent);
  opacity: 0;
  transition: opacity 0.5s var(--ease-out);
  pointer-events: none;
}

.article-item:hover::before {
  opacity: 1;
}

.article-item:hover {
  padding-left: 1rem;
}

.article-item:hover .article-title {
  color: var(--star-glow);
}

.article-item:hover .article-arrow {
  opacity: 1;
  transform: translateX(0);
}

.article-date {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.9rem;
  color: var(--text-faint);
  min-width: 80px;
  padding-top: 0.3rem;
  letter-spacing: 1px;
  flex-shrink: 0;
}

.article-content {
  flex: 1;
}

.article-title {
  font-family: 'Noto Serif SC', serif;
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--text-body);
  margin-bottom: 0.5rem;
  transition: color 0.4s var(--ease-soft);
  line-height: 1.6;
}

.article-excerpt {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.8;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-arrow {
  font-size: 1.2rem;
  color: var(--moon);
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.4s var(--ease-out);
  align-self: center;
  flex-shrink: 0;
}

/* ========== 标签云 ========== */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1rem;
}

.tag {
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--text-muted);
  padding: 0.4rem 1rem;
  border: 1px solid var(--glass-border);
  border-radius: 100px;
  background: var(--glass-bg);
  text-decoration: none;
  transition: all 0.4s var(--ease-out);
  letter-spacing: 1px;
}

.tag:hover {
  border-color: rgba(125, 168, 209, 0.3);
  background: var(--moon-glow);
  color: var(--star-bright);
  transform: translateY(-2px);
}

/* ========== 精选文章(大图卡片) ========== */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 4rem;
}

.featured-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 16/10;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--glass-border);
  transition: all 0.6s var(--ease-out);
}

.featured-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease-out);
}

.featured-card:hover img {
  transform: scale(1.08);
}

.featured-card:hover {
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  border-color: rgba(125, 168, 209, 0.2);
}

.featured-overlay {
  position: absolute;
  bottom: 0; left: 0;
  width: 100%;
  padding: 2rem 1.5rem 1.5rem;
  background: linear-gradient(to top, rgba(15, 22, 41, 0.95) 0%, rgba(15, 22, 41, 0.5) 60%, transparent 100%);
  transition: all 0.5s var(--ease-out);
}

.featured-card:hover .featured-overlay {
  padding-bottom: 2rem;
}

.featured-tag {
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--moon);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.featured-title {
  font-family: 'Noto Serif SC', serif;
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--text-title);
  line-height: 1.5;
}

/* ========== 关于我区域 ========== */
.about-section {
  background: linear-gradient(180deg, transparent 0%, rgba(125, 168, 209, 0.03) 50%, transparent 100%);
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-image {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  aspect-ratio: 3/4;
  border: 1px solid var(--glass-border);
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease-out);
}

.about-image:hover img {
  transform: scale(1.05);
}

.about-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(15, 22, 41, 0.6) 100%);
  pointer-events: none;
}

.about-text h3 {
  font-family: 'Noto Serif SC', serif;
  font-size: 1.8rem;
  font-weight: 300;
  color: var(--text-title);
  margin-bottom: 1.5rem;
  letter-spacing: 3px;
}

.about-text p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 2.2;
  margin-bottom: 1.5rem;
}

.about-quote {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  font-style: italic;
  color: var(--star-soft);
  padding-left: 1.5rem;
  border-left: 2px solid var(--moon);
  line-height: 1.8;
  margin-top: 2rem;
}

/* ========== 页脚 ========== */
.footer {
  padding: 60px 5vw 40px;
  text-align: center;
  border-top: 1px solid var(--glass-border);
  position: relative;
  z-index: 10;
}

.footer-quote {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  font-style: italic;
  color: var(--text-faint);
  margin-bottom: 2rem;
  letter-spacing: 1px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-links a {
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 0.8rem;
  color: var(--text-faint);
  text-decoration: none;
  letter-spacing: 2px;
  text-transform: uppercase;
  transition: color 0.4s var(--ease-soft);
}

.footer-links a:hover {
  color: var(--star-bright);
}

.footer-copy {
  font-size: 0.75rem;
  color: var(--text-faint);
  letter-spacing: 1px;
}

.footer-copy .heart {
  color: var(--moon);
  display: inline-block;
  animation: heartbeat 2s ease-in-out infinite;
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

/* ========== 返回顶部按钮 ========== */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.4s var(--ease-out);
  z-index: 100;
  font-size: 1rem;
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
}

.back-to-top:hover {
  border-color: rgba(125, 168, 209, 0.3);
  background: var(--moon-glow);
  color: var(--star-bright);
  transform: translateY(-3px);
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hero { padding: 100px 5vw 60px; }
  .hero-avatar { width: 110px; height: 110px; }
  .section { padding: 60px 5vw; }
  .about-content { grid-template-columns: 1fr; gap: 2rem; }
  .article-item { flex-direction: column; gap: 0.5rem; }
  .article-date { padding-top: 0; }
  .featured-grid { grid-template-columns: 1fr; }
}

/* ========== 页面加载动画 ========== */
.page-wrapper {
  opacity: 0;
  animation: pageReveal 1s var(--ease-out) 0.2s forwards;
}

@keyframes pageReveal {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ========== 自定义滚动条 ========== */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--night-deep);
}

::-webkit-scrollbar-thumb {
  background: var(--night-soft);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--star-dim);
}

/* ========== 选中文字样式 ========== */
::selection {
  background: rgba(125, 168, 209, 0.25);
  color: var(--star-white);
}
</style>
<base target="_blank">
</head>
<body>

<!-- 星空画布 -->
<canvas id="starfield"></canvas>
<div id="gradient-overlay"></div>

<div class="page-wrapper">

<!-- 导航栏 -->
<nav class="nav-bar" id="navbar">
  <a href="#" class="logo">星夜随笔</a>
  <ul class="nav-links">
    <li><a href="#home">首页</a></li>
    <li><a href="#articles">文章</a></li>
    <li><a href="#featured">精选</a></li>
    <li><a href="#about">关于</a></li>
  </ul>
</nav>

<main>

<!-- Hero 区域 -->
<section class="hero" id="home">
  <img src="avatar.jpg" alt="头像" class="hero-avatar" onerror="this.style.display='none'">
  <h1 class="hero-name">你的名字</h1>
  <p class="hero-subtitle">Starry Night Essays</p>
  <p class="hero-desc">
    在寂静的深夜里,用文字记录生活的点滴。<br>
    每一篇文章,都是与星空的一次对话。
  </p>
  <div class="hero-divider"></div>
  <div class="hero-social">
    <a href="#" title="GitHub">GH</a>
    <a href="#" title="Twitter">TW</a>
    <a href="#" title="Email">@</a>
    <a href="#" title="RSS">RSS</a>
  </div>
  <div class="scroll-hint">
    <span>向下探索</span>
    <div class="line"></div>
  </div>
</section>

<!-- 精选文章 -->
<section class="section" id="featured">
  <div class="section-header">
    <h2 class="section-title">精选文章</h2>
    <div class="section-line"></div>
  </div>
  <div class="featured-grid">
    <a href="#" class="featured-card">
      <img src="featured1.jpg" alt="精选文章1" onerror="this.src='data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 width=%22400%22 height=%22250%22><rect fill=%22%231a2240%22 width=%22400%22 height=%22250%22/><text fill=%22%237a8aaa%22 x=%2250%%22 y=%2250%%22 text-anchor=%22middle%22 font-family=%22serif%22 font-size=%2216%22>Featured Image 1</text></svg>'">
      <div class="featured-overlay">
        <div class="featured-tag">随笔</div>
        <div class="featured-title">深夜里的那盏灯</div>
      </div>
    </a>
    <a href="#" class="featured-card">
      <img src="featured2.jpg" alt="精选文章2" onerror="this.src='data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 width=%22400%22 height=%22250%22><rect fill=%22%231a2240%22 width=%22400%22 height=%22250%22/><text fill=%22%237a8aaa%22 x=%2250%%22 y=%2250%%22 text-anchor=%22middle%22 font-family=%22serif%22 font-size=%2216%22>Featured Image 2</text></svg>'">
      <div class="featured-overlay">
        <div class="featured-tag">技术</div>
        <div class="featured-title">代码与星空的对话</div>
      </div>
    </a>
    <a href="#" class="featured-card">
      <img src="featured3.jpg" alt="精选文章3" onerror="this.src='data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 width=%22400%22 height=%22250%22><rect fill=%22%231a2240%22 width=%22400%22 height=%22250%22/><text fill=%22%237a8aaa%22 x=%2250%%22 y=%2250%%22 text-anchor=%22middle%22 font-family=%22serif%22 font-size=%2216%22>Featured Image 3</text></svg>'">
      <div class="featured-overlay">
        <div class="featured-tag">摄影</div>
        <div class="featured-title">追逐极光的旅程</div>
      </div>
    </a>
  </div>
</section>

<!-- 最新文章列表 -->
<section class="section" id="articles">
  <div class="section-header">
    <h2 class="section-title">最新文章</h2>
    <div class="section-line"></div>
  </div>
  <div class="article-list">
    <a href="#" class="article-item">
      <span class="article-date">2026.06.25</span>
      <div class="article-content">
        <h3 class="article-title">在Jetson Orin上部署实时三维重建系统</h3>
        <p class="article-excerpt">探索如何在边缘计算设备上实现高效的3D Gaussian Splatting SLAM,优化内存占用与推理速度...</p>
      </div>
      <span class="article-arrow">→</span>
    </a>
    <a href="#" class="article-item">
      <span class="article-date">2026.06.18</span>
      <div class="article-content">
        <h3 class="article-title">Three.js 体积云渲染实践</h3>
        <p class="article-excerpt">使用程序化生成技术,在Web端实现逼真的体积云效果,包含光照、散射与动态天气系统...</p>
      </div>
      <span class="article-arrow">→</span>
    </a>
    <a href="#" class="article-item">
      <span class="article-date">2026.06.10</span>
      <div class="article-content">
        <h3 class="article-title">医疗AI中的时序预测模型</h3>
        <p class="article-excerpt">基于LSTM与注意力机制的SpO2/HR/RR多参数预测,探讨低氧血症预警的深度学习方案...</p>
      </div>
      <span class="article-arrow">→</span>
    </a>
    <a href="#" class="article-item">
      <span class="article-date">2026.05.28</span>
      <div class="article-content">
        <h3 class="article-title">飞行轨迹预测的Transformer改进</h3>
        <p class="article-excerpt">针对C-172飞机数据,设计了一种结合残差连接与xLSTM的新型时序预测架构...</p>
      </div>
      <span class="article-arrow">→</span>
    </a>
    <a href="#" class="article-item">
      <span class="article-date">2026.05.15</span>
      <div class="article-content">
        <h3 class="article-title">Canvas 弥散渐变与星光效果</h3>
        <p class="article-excerpt">纯前端实现程序化背景生成器,探索CSS与Canvas在视觉表现上的边界...</p>
      </div>
      <span class="article-arrow">→</span>
    </a>
    <a href="#" class="article-item">
      <span class="article-date">2026.05.02</span>
      <div class="article-content">
        <h3 class="article-title">SLAM论文投稿经验分享</h3>
        <p class="article-excerpt">从SGAD深度置信度到VBGS变分推断,记录三区论文投稿的完整心路历程...</p>
      </div>
      <span class="article-arrow">→</span>
    </a>
  </div>
  <div class="tag-cloud" style="margin-top: 2.5rem;">
    <a href="#" class="tag">SLAM</a>
    <a href="#" class="tag">Three.js</a>
    <a href="#" class="tag">深度学习</a>
    <a href="#" class="tag">前端开发</a>
    <a href="#" class="tag">计算机视觉</a>
    <a href="#" class="tag">时序预测</a>
    <a href="#" class="tag">Jetson</a>
    <a href="#" class="tag">3DGS</a>
  </div>
</section>

<!-- 关于我 -->
<section class="section about-section" id="about">
  <div class="section-header">
    <h2 class="section-title">关于我</h2>
    <div class="section-line"></div>
  </div>
  <div class="about-content">
    <div class="about-image">
      <img src="about.jpg" alt="关于我" onerror="this.src='data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 width=%22400%22 height=%22533%22><rect fill=%22%231a2240%22 width=%22400%22 height=%22533%22/><text fill=%22%237a8aaa%22 x=%2250%%22 y=%2250%%22 text-anchor=%22middle%22 font-family=%22serif%22 font-size=%2218%22>About Image</text></svg>'">
    </div>
    <div class="about-text">
      <h3>Pan</h3>
      <p>
        研一计算机技术专业学生,热爱前端可视化与机器学习工程。
        在Three.js的3D世界中探索光影的奥秘,在SLAM的算法里追寻空间的真理。
      </p>
      <p>
        相信代码可以创造美,技术能够连接世界。
        在这个安静的角落,记录学习路上的点滴思考与灵感迸发。
      </p>
      <div class="about-quote">
        "在星空下写代码,<br>
        每一行都是与宇宙的对话。"
      </div>
    </div>
  </div>
</section>

</main>

<!-- 页脚 -->
<footer class="footer">
  <p class="footer-quote">"The stars are the street lights of eternity."</p>
  <div class="footer-links">
    <a href="#">首页</a>
    <a href="#">归档</a>
    <a href="#">友链</a>
    <a href="#">留言</a>
  </div>
  <p class="footer-copy">
    © 2026 星夜随笔 · Made with <span class="heart">♥</span> under the stars
  </p>
</footer>

<!-- 返回顶部 -->
<button class="back-to-top" id="backToTop" onclick="window.scrollTo({top:0,behavior:'smooth'})">↑</button>

</div><!-- page-wrapper -->

<script>
/* ============================================
   星空粒子系统
   ============================================ */
(function() {
  const canvas = document.getElementById('starfield');
  const ctx = canvas.getContext('2d');
  let width, height;
  let stars = [];
  let shootingStars = [];

  function resize() {
    width = canvas.width = window.innerWidth;
    height = canvas.height = window.innerHeight;
    initStars();
  }

  function initStars() {
    stars = [];
    const count = Math.floor((width * height) / 4000);
    for (let i = 0; i < count; i++) {
      stars.push({
        x: Math.random() * width,
        y: Math.random() * height,
        size: Math.random() * 1.5 + 0.3,
        opacity: Math.random() * 0.6 + 0.1,
        speed: Math.random() * 0.3 + 0.05,
        twinkleSpeed: Math.random() * 0.02 + 0.005,
        twinklePhase: Math.random() * Math.PI * 2
      });
    }
  }

  function createShootingStar() {
    if (Math.random() > 0.995) {
      shootingStars.push({
        x: Math.random() * width,
        y: Math.random() * height * 0.5,
        length: Math.random() * 80 + 40,
        speed: Math.random() * 8 + 4,
        angle: Math.random() * Math.PI / 4 + Math.PI / 4,
        opacity: 1,
        life: 1
      });
    }
  }

  function draw() {
    ctx.clearRect(0, 0, width, height);

    // 绘制星星
    stars.forEach(star => {
      star.twinklePhase += star.twinkleSpeed;
      const twinkle = Math.sin(star.twinklePhase) * 0.3 + 0.7;
      const alpha = star.opacity * twinkle;

      ctx.beginPath();
      ctx.arc(star.x, star.y, star.size, 0, Math.PI * 2);
      ctx.fillStyle = `rgba(212, 228, 247, ${alpha})`;
      ctx.fill();

      // 星光晕
      if (star.size > 1) {
        ctx.beginPath();
        ctx.arc(star.x, star.y, star.size * 3, 0, Math.PI * 2);
        ctx.fillStyle = `rgba(125, 168, 209, ${alpha * 0.15})`;
        ctx.fill();
      }
    });

    // 绘制流星
    createShootingStar();
    shootingStars = shootingStars.filter(s => s.life > 0);

    shootingStars.forEach(s => {
      s.x += Math.cos(s.angle) * s.speed;
      s.y += Math.sin(s.angle) * s.speed;
      s.life -= 0.015;

      const grad = ctx.createLinearGradient(
        s.x, s.y,
        s.x - Math.cos(s.angle) * s.length,
        s.y - Math.sin(s.angle) * s.length
      );
      grad.addColorStop(0, `rgba(212, 228, 247, ${s.life})`);
      grad.addColorStop(1, 'rgba(212, 228, 247, 0)');

      ctx.beginPath();
      ctx.moveTo(s.x, s.y);
      ctx.lineTo(
        s.x - Math.cos(s.angle) * s.length,
        s.y - Math.sin(s.angle) * s.length
      );
      ctx.strokeStyle = grad;
      ctx.lineWidth = 1.5;
      ctx.stroke();
    });

    requestAnimationFrame(draw);
  }

  window.addEventListener('resize', resize);
  resize();
  draw();
})();

/* ============================================
   导航栏滚动效果
   ============================================ */
window.addEventListener('scroll', () => {
  const navbar = document.getElementById('navbar');
  const backToTop = document.getElementById('backToTop');

  if (window.scrollY > 50) {
    navbar.classList.add('scrolled');
  } else {
    navbar.classList.remove('scrolled');
  }

  if (window.scrollY > 500) {
    backToTop.classList.add('visible');
  } else {
    backToTop.classList.remove('visible');
  }
});

/* ============================================
   平滑滚动
   ============================================ */
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
  anchor.addEventListener('click', function(e) {
    e.preventDefault();
    const target = document.querySelector(this.getAttribute('href'));
    if (target) {
      target.scrollIntoView({ behavior: 'smooth', block: 'start' });
    }
  });
});
</script>

</body>
</html>