/* ============================================
   首页：简介 + 序号文章流 + 下划线搜索
   ============================================ */

/* ---------- 简介 ---------- */
.home-intro {
    padding: 8px 0 56px;
}

.home-intro-bio {
    max-width: 560px;
    font-size: 1rem;
    line-height: 1.85;
    color: var(--text-secondary);
}

/* ---------- 文章流 ---------- */
.home-feed {
    margin-top: 56px;
}

.home-feed-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 6px;
}

.home-feed-title {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
}

.home-feed-more {
    font-family: var(--font-mono);
    font-size: 0.66rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-secondary);
    text-decoration: none;
    border-bottom: 1px solid var(--accent-subtle);
    padding-bottom: 2px;
    white-space: nowrap;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.home-feed-more:hover {
    color: var(--accent-strong);
    border-bottom-color: var(--accent-color);
}

.home-feed-list {
    list-style: none;
    border-top: 1px solid var(--accent-subtle);
    margin-top: 18px;
}

.home-feed-item {
    position: relative;
    border-bottom: 1px solid var(--accent-subtle);
}

.home-feed-link {
    display: block;
    padding: 26px 0;
    text-decoration: none;
    color: inherit;
}

.home-feed-post-title {
    font-family: var(--font-serif);
    font-size: 1.24rem;
    font-weight: 600;
    line-height: 1.45;
    color: var(--text-primary);
    transition: color 0.2s ease;
}

.home-feed-link:hover .home-feed-post-title {
    color: var(--accent-strong);
}

.home-feed-post-desc {
    margin-top: 9px;
    max-width: 640px;
    font-size: 0.93rem;
    line-height: 1.75;
    color: var(--text-secondary);
}

.home-feed-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 12px;
    font-family: var(--font-mono);
    font-size: 0.64rem;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}

/* ---------- 搜索 ---------- */
.home-search-box {
    position: relative;
    max-width: 620px;
    margin-top: 30px;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: stretch;
}

.home-search-form {
    min-width: 0;
}

.home-search-controls {
    display: flex;
    align-items: stretch;
    gap: 0;
    border-bottom: 1px solid var(--text-primary);
    transition: border-color 0.2s ease;
}

.home-search-controls:focus-within {
    border-bottom-color: var(--accent-color);
}

.home-search-input {
    flex: 1;
    min-width: 0;
    padding: 13px 4px;
    border: 0;
    background: transparent;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 1rem;
    outline: none;
}

.home-search-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.8;
}

.home-search-input::-webkit-search-cancel-button {
    -webkit-appearance: none;
}

.home-search-button {
    width: 42px;
    height: 42px;
    align-self: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 2px;
    background-color: var(--text-primary);
    color: var(--bg-color);
    transition: background-color 0.2s ease;
}

.home-search-button:hover {
    background-color: var(--accent-strong);
}

.home-search-results {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    right: 0;
    max-height: 60vh;
    overflow-y: auto;
    padding: 4px 18px;
    background-color: var(--bg-color);
    border: 1px solid var(--accent-subtle);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
    z-index: 50;
}

/* 搜索结果：扁平分隔列表 */
.search-item {
    display: block;
    padding: 16px 0;
    border-bottom: 1px solid var(--accent-subtle);
    text-decoration: none;
    color: inherit;
}

.search-item:hover .search-item-title {
    color: var(--accent-strong);
}

.search-item-title {
    font-family: var(--font-serif);
    font-size: 1.02rem;
    font-weight: 600;
    line-height: 1.5;
    color: var(--text-primary);
    transition: color 0.2s ease;
}

.search-item-desc {
    margin-top: 5px;
    font-size: 0.86rem;
    line-height: 1.7;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.search-item-meta {
    display: flex;
    gap: 12px;
    margin-top: 7px;
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.search-highlight {
    background-color: var(--mark-bg);
    color: var(--mark-text);
    padding: 0 2px;
}

.search-empty,
.search-error {
    padding: 20px 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* ---------- 移动端 ---------- */
@media (max-width: 768px) {
    .home-intro {
        padding: 0 0 40px;
    }

    .home-intro-bio {
        font-size: 0.95rem;
    }

    .home-feed {
        margin-top: 44px;
    }

    .home-feed-list {
        margin-top: 14px;
    }

    .home-feed-link {
        padding: 22px 0;
    }

    .home-feed-post-title {
        font-size: 1.1rem;
    }

    .home-feed-post-desc {
        font-size: 0.88rem;
    }
}
