/* --- 1. 基础重置与变量 --- */
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
    scroll-behavior: smooth; 
}

:root {
    --bg: #f8f7f2;       /* 宣纸感淡色 */
    --text: #1a1a1a;     /* 墨色 */
    --accent: #a62116;   /* 印章红 */
    --card: #ffffff;
    --minor: #555555;
    --line: rgba(0,0,0,0.06);
}

/* 深色模式设定 */
.dark {
    --bg: #121212;
    --text: #eeeeee;
    --card: #1e1e1e;
    --minor: #aaaaaa;
    --line: rgba(255,255,255,0.08);
}

body {
    font-family: "Noto Serif SC", "PingFang SC", "Microsoft Yahei", serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.8;
    overflow-x: hidden;
    transition: background 0.3s ease, color 0.3s ease;
}

/* --- 2. 导航栏 --- */
.nav-wrap {
    width: 100%;
    height: 70px;
    padding: 0 6%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0; left: 0;
    z-index: 999;
    background: rgba(248, 247, 242, 0.9);
    border-bottom: 1px solid var(--line);
}

.nav-logo { font-size: 24px; letter-spacing: 4px; font-weight: bold; }
.nav-menu { display: flex; gap: 32px; align-items: center; }
.nav-menu a { text-decoration: none; color: var(--text); font-size: 15px; transition: 0.3s; }
.nav-menu a:hover { color: var(--accent); }

/* --- 3. 首页展示区 --- */
header {
    text-align: center;
    padding: 120px 20px 60px;
    border-bottom: 1px solid var(--line);
}

header h1 {
    font-size: 3.5rem;
    letter-spacing: 12px;
    margin-bottom: 15px;
    font-weight: 500;
}

.seal {
    display: inline-block;
    border: 2px solid var(--accent);
    color: var(--accent);
    padding: 5px 12px;
    font-weight: bold;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

/* --- 4. 作品网格 --- */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 60px auto;
    padding: 0 30px;
}

.artwork {
    background: var(--card);
    padding: 15px;
    border: 1px solid var(--line);
    cursor: pointer;
    transition: all 0.4s ease;
}

.artwork:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

.artwork img {
    width: 100%;
    height: auto;
    display: block;
}

.artwork-info {
    text-align: center;
    margin-top: 15px;
    font-size: 0.95rem;
    color: var(--minor);
    letter-spacing: 1px;
}

/* --- 5. 灯箱放大效果 --- */
#overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.92);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

#overlay img {
    max-width: 90%;
    max-height: 90%;
    border: 3px solid #fff;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

/* 粒子画布层级 */
#inkCanvas {
    position: fixed;
    top:0; left:0; width:100%; height:100%;
    z-index:-1;
    pointer-events:none;
}
