/* Publications */
.pub-year {
  margin-top: 1.5rem;
}

.pub-year:first-of-type {
  margin-top: 0.2rem;
}

.pub-year h2 {
  font-size: 1.22rem;
  margin-bottom: 0.45rem;
}

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

.pub-list li {
  padding: 0.6rem 0;
  border-top: 1px solid var(--line);
}

.pub-list li:first-child {
  border-top: 0;
}

.pub-sections .section-title {
  margin-top: 1.2rem;
}

.pub-sections .section-title:first-of-type {
  margin-top: 0.2rem;
}

.pub-compact li {
  padding: 0.4rem 0;
  line-height: 1.45;
}

.pub-shell {
  width: var(--wide-shell-width);
  margin: 0 auto;
}

.pub-jump-links {
  margin-top: 0.85rem;
}

.pub-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fffdf8;
}

.pub-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
  min-width: 980px;
  font-size: 0.93rem;
}

.pub-table th,
.pub-table td {
  border-top: 1px solid #e4d9c4;
  padding: 0.5rem 0.58rem;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.pub-table thead th {
  border-top: 0;
  background: #efe6d2;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #5a4312;
}

.pub-table tbody tr:first-child td {
  border-top: 0;
}

.pub-table th:first-child,
.pub-table td:first-child {
  width: 30ch;
}

.pub-table th:nth-child(2),
.pub-table td:nth-child(2) {
  width: calc(100% - 45ch);
}

.pub-table th:nth-child(3),
.pub-table td:nth-child(3) {
  width: 15ch;
}

.pub-stack {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.18rem;
}

.pub-links-stack li {
  display: block;
}

.pub-links-stack {
  justify-items: stretch;
}

.pub-links-stack a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 24px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f7f1e4;
  text-decoration: none;
  padding: 0.05rem 0.34rem;
  white-space: normal;
  line-height: 1.2;
  text-align: center;
}

.pub-links-stack a:hover,
.pub-links-stack a:focus-visible {
  background: #ece1c8;
}

.pub-empty {
  color: var(--muted);
}

.pub-divider td {
  padding: 0.3rem 0;
  border-top: 1px solid #ddd1bc;
  background: transparent;
}

@media (max-width: 820px) {
  .pub-table {
    min-width: 0;
    table-layout: fixed;
    font-size: 0.92rem;
  }

  .pub-table colgroup,
  .pub-table thead {
    border: 0;
    clip: rect(0 0 0 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    white-space: nowrap;
    width: 1px;
  }

  .pub-table-wrap {
    padding: 0.4rem;
  }

  .pub-table tbody {
    display: grid;
    gap: 0.7rem;
  }

  .pub-table tbody tr {
    display: grid;
    gap: 0.55rem;
    border: 1px solid #e4d9c4;
    border-radius: var(--radius-md);
    background: #fffdf8;
    padding: 0.72rem 0.78rem;
  }

  .pub-table tbody td {
    display: block;
    width: auto;
    border-top: 0;
    padding: 0;
  }

  .pub-table tbody tr.pub-divider {
    display: block;
    border: 0;
    border-radius: 0;
    background: transparent;
    padding: 0.1rem 0 0;
  }

  .pub-divider td {
    padding: 0.12rem 0 0;
    border-top: 1px solid #ddd1bc;
    background: transparent;
  }

  .pub-table th:first-child,
  .pub-table td:first-child,
  .pub-table th:nth-child(2),
  .pub-table td:nth-child(2),
  .pub-table th:nth-child(3),
  .pub-table td:nth-child(3) {
    width: auto;
  }

  .pub-table tbody td::before {
    display: block;
    margin-bottom: 0.22rem;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #5a4312;
    font-weight: 700;
  }

  .pub-table tbody td:nth-child(1)::before {
    content: "Co-authors";
  }

  .pub-table tbody td:nth-child(2)::before {
    content: "Citation";
  }

  .pub-table tbody td:nth-child(3)::before {
    content: "Links";
  }

  .pub-table tbody tr.pub-divider td::before {
    display: none;
  }

  .pub-stack {
    gap: 0.28rem;
  }

  .pub-links-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    justify-items: initial;
  }

  .pub-links-stack li {
    display: flex;
  }

  .pub-links-stack a {
    width: auto;
    min-width: 6rem;
    min-height: 38px;
    padding: 0.18rem 0.62rem;
  }
}
