/* Publications page styles (moved from templates/pages/publications.html) */
/* ===== Publications Page ===== */

/* Topic filters */
.pub-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
    margin-bottom: 24px;
}

.pub-filter {
    padding: 5px 14px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--muted);
    font: inherit;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.pub-filter:hover { color: var(--text); }

.pub-filter.is-active {
    background: var(--primary-bg);
    border-color: var(--primary-bg);
    color: var(--on-primary);
}

/* Publication list: figure on the left, details on the right, rows split by a rule */
.pub-list {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-bottom: 50px;
    border-top: 1px solid var(--border);
}

.pub-card {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    gap: 24px;
    padding: 24px 0;
    border-bottom: 1px solid var(--border);
}

.pub-card[hidden] { display: none; }

.pub-figure {
    aspect-ratio: 4 / 5;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--surface);
    box-shadow: var(--card-shadow);
}

.pub-figure img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;  /* covers carry the title at the top; crop from the bottom */
    display: block;
}

/* No figure yet: the type icon on a faint lime wash */
.pub-figure-empty {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    background: linear-gradient(160deg, color-mix(in srgb, var(--primary-bg) 14%, transparent), transparent 70%);
}

.pub-figure-empty svg { width: 48px; height: 48px; }

.pub-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.pub-type {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--primary);
}

.pub-title {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.45;
    color: var(--text);
    margin: 0;
}

.pub-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.pub-title a:hover { color: var(--primary); }

.pub-meta {
    font-size: 0.8rem;
    line-height: 1.65;
    color: var(--muted);
}

.pub-summary {
    font-size: 0.86rem;
    line-height: 1.7;
    color: var(--text);
    margin: 0;
}

.pub-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.pub-tag {
    font-size: 0.68rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--text) 7%, transparent);
    color: var(--text);
}

.pub-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 18px;
    margin-top: 2px;
}

.pub-links a {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    transition: color 0.2s;
}

.pub-links a:hover { color: var(--primary); }

.pub-links svg { width: 24px; height: 24px; margin: -4px 0; }

.pub-links .pub-doi {
    font-weight: 500;
    font-size: 0.72rem;
    color: var(--muted);
    word-break: break-all;
}

/* Achievements Grid */
.achieve-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    width: 100%;
    margin-bottom: 50px;
}

.achieve-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: var(--card-shadow);
}

.achieve-item:hover {
    background: var(--surface);
    border-color: var(--border);
    transform: translateY(-4px);
    box-shadow: 0 10px 30px color-mix(in srgb, var(--glow) 15%, transparent);
}

.achieve-icon {
    font-size: 1.8rem;
    margin-bottom: 4px;
    filter: drop-shadow(0 0 6px color-mix(in srgb, var(--glow) 30%, transparent));
}

.achieve-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.3;
}

.achieve-desc {
    font-size: 0.82rem;
    line-height: 1.65;
    color: var(--muted);
}

/* Stats bar */
.pub-stats {
    display: flex;
    gap: 20px;
    width: 100%;
    margin-bottom: 40px;
    padding: 20px 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--card-shadow);
}

.pub-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    padding: 4px 0;
    border-right: 1px solid var(--border);
}

.pub-stat:last-child { border-right: none; }

.ps-num {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 3px;
}

.ps-lbl {
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: color-mix(in srgb, var(--muted) 75%, transparent);
}

@media (max-width: 580px) {
    .pub-card { grid-template-columns: 96px minmax(0, 1fr); gap: 16px; }
    .pub-figure-empty svg { width: 24px; height: 24px; }
    .achieve-grid { grid-template-columns: 1fr; }
    .pub-stats { flex-wrap: wrap; gap: 12px; }
    .pub-stat { flex: 1 1 40%; border-right: none; border-bottom: 1px solid var(--border); padding-bottom: 12px; }
}
