:root {
  --fg: #111;
  --muted: #666;
  --bg: #fff;
  --chip: #f2f2f2;
  --chip-active: #111;
  --chip-active-fg: #fff;
  --border: #e6e6e6;
  --link: #0b57d0;
  --shadow: 0 1px 10px rgba(0,0,0,0.04);
  --radius: 12px;
  --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
}

button {
  all: unset;
}

button:hover {
  color: var(--fg) !important;
  box-shadow: unset;
}

a:hover {
  color: var(--fg) !important;
  box-shadow: unset;
}

body {
  /* color: var(--fg); */
  background: var(--bg);
  margin: 0;
  padding: 40px 18px;
}

.container {
  max-width: 980px;
  margin: 0 auto;
}

/* h1 {
  font-size: 34px;
  margin: 0 0 12px;
  letter-spacing: -0.02em;
} */

.sub {
  color: var(--muted);
  margin: 0 0 22px;
  line-height: 1.5;
}

.toolbar {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
  margin: 18px 0 20px;
}

.toolbar-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.search {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  outline: none;
}

.search:focus {
  border-color: #c9c9c9;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.chip {
  user-select: none;
  border: 1px solid var(--border);
  background: var(--chip);
  color: var(--fg);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 13px;
  cursor: pointer;
  transition: 120ms ease;
}

.chip.active {
  background: var(--chip-active);
  color: var(--chip-active-fg) !important;
  border-color: var(--chip-active);
}

.chip:focus {
  outline: 2px solid rgba(11,87,208,0.25);
  outline-offset: 2px;
}

.meta {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13px;
}

.btn {
  border: 1px solid var(--border);
  background: #fff;
  padding: 6px 10px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px;
}

.btn:hover {
  border-color: #cfcfcf;
}

.list {
  display: flex;
  flex-direction: column;
  gap: 6px; /* Spacing between publications */
}

.pub {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 14px 12px;
  box-shadow: var(--shadow);
}

.pub-top {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
}

.title {
  font-weight: 650;
  font-size: 16px;
  margin: 0;
  line-height: 1.35;
}

.title a {
  color: inherit;          /* keeps title color */
  text-decoration: none;  /* no underline */
}

.title a:hover {
  text-decoration: underline; /* subtle affordance */
}

.venue {
  color: var(--muted);
  font-size: 13px;
  margin-top: 6px;
  line-height: 1.4;
}

.authors {
  color: var(--muted);
  font-size: 13px;
  margin-top: 6px;
  line-height: 1.4;
}

.badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 10px;
}

.badge-link {
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--link);
  cursor: pointer;
}

.badge-link:hover {
  text-decoration: underline;
}

.badge-bib {
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  cursor: pointer;
}

.tag {
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fafafa;
  color: #333;
  cursor: pointer;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

.year-divider {
  margin: 24px 0 10px;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.icon-link,
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #fff;
  cursor: pointer;
}

.icon-link svg,
.icon-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
}

.icon-link {
  color: #333;
}

.icon-link:hover,
.icon-btn:hover {
  background: #f5f5f5;
}

.icon-btn {
  color: #333;
}

@media (min-width: 720px) {
  .toolbar { grid-template-columns: 1fr; }
}

.pub {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 16px;
}

.pub-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pub-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pub-image a {
  display: block;
  width: 100%;
  height: 100%;
}

.author-btn,
.venue-btn {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.author-btn:hover,
.venue-btn:hover {
  text-decoration: underline;
}

.author-btn:focus,
.venue-btn:focus {
  outline: 2px solid rgba(11, 87, 208, 0.3);
  outline-offset: 2px;
}

@media (max-width: 640px) {
  .pub {
    grid-template-columns: 1fr;
  }
}