/* ====================
   lulufa 小站样式
   设计思路:留白多、字体大、看图舒服
   ==================== */

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

:root {
    --bg: #fafaf7;
    --text: #2c2c2c;
    --muted: #888;
    --accent: #d97757;
    --border: #e8e6df;
    --card: #ffffff;
    --max-width: 720px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #1a1a1a;
        --text: #e8e6df;
        --muted: #999;
        --accent: #e89478;
        --border: #2c2c2c;
        --card: #222;
    }
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    line-height: 1.7;
    font-size: 17px;
    -webkit-font-smoothing: antialiased;
}

/* ===== 导航 ===== */
header {
    border-bottom: 1px solid var(--border);
    padding: 1.5rem 0;
    margin-bottom: 3rem;
}

nav {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo {
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.5px;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

nav a {
    color: var(--muted);
    text-decoration: none;
    transition: color 0.2s;
    font-size: 0.95rem;
}

nav a:hover,
nav a.active {
    color: var(--accent);
}

/* ===== 主内容 ===== */
main {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem 4rem;
}

.hero {
    margin-bottom: 4rem;
}

.hero h1 {
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: -1px;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.subtitle {
    color: var(--muted);
    font-size: 1rem;
    margin-bottom: 1.5rem;
    letter-spacing: 0.5px;
}

.lead {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text);
}

h2 {
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    margin-top: 3rem;
    font-weight: 600;
    letter-spacing: -0.3px;
}

/* ===== 文章列表 ===== */
.post-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.post-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.2s;
}

.post-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
}

.post-card a {
    color: var(--text);
    text-decoration: none;
}

.post-card h3 {
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.post-card .meta {
    color: var(--muted);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.post-card .excerpt {
    color: var(--text);
    font-size: 0.95rem;
    line-height: 1.6;
}

.post-card .tags {
    margin-top: 0.8rem;
}

.tag {
    display: inline-block;
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--muted);
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    margin-right: 0.4rem;
}

.more {
    display: inline-block;
    margin-top: 1.5rem;
    color: var(--accent);
    text-decoration: none;
    font-size: 0.95rem;
}

.more:hover {
    text-decoration: underline;
}

/* ===== 文章正文 ===== */
.post-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem 4rem;
}

.post-content h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
    line-height: 1.3;
}

.post-content .meta {
    color: var(--muted);
    font-size: 0.9rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.post-content p {
    margin-bottom: 1.2rem;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
    display: block;
}

.post-content blockquote {
    border-left: 3px solid var(--accent);
    padding-left: 1rem;
    margin: 1.5rem 0;
    color: var(--muted);
    font-style: italic;
}

.post-content code {
    background: var(--bg);
    border: 1px solid var(--border);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
    font-family: "SF Mono", Monaco, monospace;
}

/* ===== 照片墙 ===== */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.gallery-item {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 8px;
    background: var(--border);
    cursor: pointer;
    transition: transform 0.2s;
}

.gallery-item:hover {
    transform: scale(1.02);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-item .caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: white;
    padding: 1.5rem 0.8rem 0.6rem;
    font-size: 0.85rem;
    opacity: 0;
    transition: opacity 0.2s;
}

.gallery-item:hover .caption {
    opacity: 1;
}

.empty-state {
    text-align: center;
    color: var(--muted);
    padding: 4rem 1rem;
    border: 2px dashed var(--border);
    border-radius: 12px;
    margin-top: 2rem;
}

/* ===== 关于页 ===== */
.about-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem 4rem;
}

.about-content h1 {
    font-size: 2rem;
    margin-bottom: 2rem;
    letter-spacing: -0.5px;
}

.about-content h2 {
    margin-top: 2.5rem;
}

.about-content p {
    margin-bottom: 1rem;
}

.contact-list {
    list-style: none;
    padding: 0;
}

.contact-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}

.contact-list li:last-child {
    border-bottom: none;
}

/* ===== 页脚 ===== */
footer {
    text-align: center;
    padding: 2rem 1.5rem;
    color: var(--muted);
    font-size: 0.85rem;
    border-top: 1px solid var(--border);
}

footer a {
    color: var(--muted);
    text-decoration: none;
}

footer a:hover {
    color: var(--accent);
}

/* ===== 响应式 ===== */
@media (max-width: 600px) {
    .hero h1 {
        font-size: 1.8rem;
    }
    h2 {
        font-size: 1.25rem;
    }
    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
}