/* ── Search bar ──────────────────────────────────────────── */

.pub-search-wrap {
    position: relative;
    margin-bottom: 2rem;
}

.pub-search-icon {
    position: absolute;
    left: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    color: #bbb;
    font-size: 0.85rem;
    pointer-events: none;
    line-height: 1;
}

.pub-search-input {
    width: 100%;
    padding: 0.6rem 1rem 0.6rem 2.5rem;
    border: 1.5px solid #e2e2e2;
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: inherit;
    color: #333;
    background: #fafafa;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    box-sizing: border-box;
}

.pub-search-input:focus {
    border-color: color-mix(in srgb, var(--highlightColor) 60%, transparent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--highlightColor) 15%, transparent);
    background: #fff;
}

.pub-search-input::placeholder {
    color: #c0c0c0;
}

/* ── List ────────────────────────────────────────────────── */

.publication-list {
    margin-top: 0;
}

/* ── Item ────────────────────────────────────────────────── */

.publication-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 1.2rem 0;
    border-bottom: 1px solid #ebebeb;
}

.publication-item:first-child {
    border-top: 1px solid #ebebeb;
}

/* ── Left column ─────────────────────────────────────────── */

.pub-left-col {
    flex: 0 0 110px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 0.15rem;
}

/* strip pandoc's <p> wrapper */
.pub-left-col p {
    margin: 0;
}

.pub-year-only p {
    font-size: 0.8rem;
    font-weight: 700;
    color: #ccc;
    letter-spacing: 0.05em;
    text-align: center;
    font-variant-numeric: tabular-nums;
    margin: 0;
    padding-top: 0.15rem;
}

.pub-thumbnail {
    width: 110px;
    height: 80px;
    object-fit: cover;
    border-radius: 5px;
    border: 1px solid #e8e8e8;
    display: block;
    transition: opacity 0.2s ease, box-shadow 0.2s ease;
}

.pub-thumbnail:hover {
    opacity: 0.85;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

/* ── Right column ────────────────────────────────────────── */

.pub-right-col {
    flex: 1;
    min-width: 0;
}

/* strip pandoc <p> margins inside content divs */
.publication-title p,
.publication-authors p,
.publication-venue p,
.publication-links p {
    margin: 0;
}

.publication-title {
    font-weight: 700;
    font-size: 0.975rem;
    line-height: 1.5;
    color: #1a1a1a;
    margin-bottom: 0.25rem;
}

.publication-authors {
    font-size: 0.875rem;
    color: #666;
    line-height: 1.5;
    margin-bottom: 0.15rem;
}

.author-self {
    color: var(--highlightColor);
    font-weight: 600;
    opacity: 0.7;
}

.publication-venue {
    font-size: 0.875rem;
    color: #999;
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

.publication-venue em {
    font-style: italic;
}

/* ── Badges ──────────────────────────────────────────────── */

.publication-links {
    margin-top: 0.5rem;
}

/* pandoc wraps the inline links in a <p> — make it a flex row */
.publication-links p {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.pub-badge {
    display: inline-block;
    padding: 2px 10px;
    font-size: 0.775rem;
    font-weight: 500;
    border: 1px solid #d0d0d0;
    border-radius: 20px;
    text-decoration: none !important;
    color: #666 !important;
    background: transparent;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    letter-spacing: 0.01em;
}

.pub-badge:hover {
    background: #444;
    border-color: #444;
    color: #fff !important;
}
