:root {
  color-scheme: light;
  --bg: #f6f7f4;
  --paper: #ffffff;
  --ink: #202225;
  --muted: #676b64;
  --line: #d7dad3;
  --accent: #1f467c;
  --accent-soft: #e4ebf5;
  --sage: #4f746a;
  --gold: #b5874a;
  --blue: #4a78b5;
  --shadow: 0 18px 45px rgba(31, 39, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.58;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: #173660;
}

.site-header {
  background: var(--blue);
  border-bottom: 1px solid rgba(32, 34, 37, 0.14);
  min-height: 54px;
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
}

.header-inner {
  align-items: center;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 980px;
  min-height: 54px;
  padding: 0 32px;
}

.wordmark {
  color: #ffffff;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0;
  text-decoration: none;
  text-transform: uppercase;
}

.nav {
  display: flex;
  gap: 22px;
  font-family: inherit;
  font-size: 16px;
}

.nav a {
  color: rgba(255, 255, 255, 0.84);
  text-decoration: none;
}

.nav a:hover {
  color: #ffffff;
}

.section {
  margin: 0 auto;
  max-width: 980px;
  padding: 56px 32px;
}

.home-grid {
  align-items: start;
  display: grid;
  gap: 42px;
  grid-template-columns: 230px minmax(0, 1fr);
  padding-top: 72px;
}

.portrait {
  aspect-ratio: 1 / 1;
  border: 1px solid rgba(58, 75, 78, 0.22);
  box-shadow: var(--shadow);
  display: block;
  height: auto;
  min-width: 0;
  object-fit: cover;
  object-position: center;
  width: 230px;
}

.eyebrow {
  color: var(--sage);
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 8px;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  line-height: 1.16;
}

h1 {
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 400;
  margin: 0 0 18px;
}

h2 {
  border-bottom: 1px solid var(--line);
  font-size: 28px;
  font-weight: 400;
  margin: 0 0 18px;
  padding-bottom: 10px;
}

h3 {
  font-size: 16px;
  font-weight: 400;
  margin: 0 0 6px;
}

.pub-title {
  color: var(--accent);
}

.highlight {
  color: var(--gold);
  font-weight: 700;
}

p {
  margin: 0 0 16px;
}

.intro p {
  max-width: 720px;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  font-family: inherit;
  font-size: 16px;
  margin-top: 20px;
}

.links a {
  border-bottom: 1px solid rgba(31, 70, 124, 0.35);
  text-decoration: none;
}

.text-section {
  padding-bottom: 24px;
  padding-top: 24px;
}

.section-heading {
  align-items: end;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 10px;
}

.section-heading h2 {
  border: 0;
  margin: 0;
  padding: 0;
}

.section-heading p {
  color: var(--muted);
  font-family: inherit;
  font-size: 16px;
  margin: 0 0 3px;
  white-space: nowrap;
}

button {
  appearance: none;
  background: transparent;
  border: 0;
  color: var(--accent);
  cursor: pointer;
  font: inherit;
  padding: 0;
}

button:hover,
button.is-active {
  color: var(--ink);
}

button.is-active {
  font-weight: 700;
}

.topic-controls {
  display: none;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 26px;
}

.topic-controls.is-visible {
  display: flex;
}

.topic {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-family: inherit;
  font-size: 16px;
  line-height: 1;
  padding: 8px 12px;
}

.topic.is-active {
  background: var(--accent-soft);
  border-color: rgba(31, 70, 124, 0.28);
  color: var(--accent);
}

.pub-list {
  display: grid;
  gap: 12px;
}

.pub {
  align-items: center;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 10px 28px rgba(31, 39, 42, 0.08);
  display: grid;
  gap: 18px;
  grid-template-columns: 115px minmax(0, 1fr);
  padding: 8px 18px;
}

.pub[hidden] {
  display: none;
}

.thumb {
  background: #ffffff;
  border: 0;
  box-shadow: none;
  overflow: hidden;
  position: relative;
  width: 115px;
}

.pub-image {
  background: #ffffff;
  display: block;
  height: auto;
  width: 115px;
}

.thumb::before,
.thumb::after {
  content: "";
  position: absolute;
}

.thumb-a {
  background: linear-gradient(135deg, #edf2ef, #7d9a88);
}

.thumb-a::before {
  background: rgba(31, 70, 124, 0.72);
  height: 44%;
  left: 20%;
  top: 30%;
  transform: rotate(-18deg);
  width: 56%;
}

.thumb-b {
  background: linear-gradient(135deg, #e9eef4, #4e6e8e);
}

.thumb-b::before {
  border: 14px solid rgba(255, 255, 255, 0.8);
  height: 54%;
  left: 22%;
  top: 22%;
  width: 54%;
}

.thumb-c {
  background: linear-gradient(135deg, #edf1e9, #a87525);
}

.thumb-c::before {
  background: rgba(34, 32, 28, 0.7);
  border-radius: 50%;
  height: 48%;
  left: 16%;
  top: 24%;
  width: 32%;
}

.thumb-c::after {
  background: rgba(255, 255, 255, 0.75);
  height: 16%;
  right: 17%;
  top: 43%;
  width: 36%;
}

.thumb-d {
  background: linear-gradient(135deg, #d6dfda, #4f746a);
}

.thumb-d::before {
  background: rgba(255, 255, 255, 0.76);
  height: 58%;
  left: 38%;
  top: 20%;
  transform: skewX(-12deg);
  width: 22%;
}

.thumb-e {
  background: linear-gradient(135deg, #ecefeb, #1f467c);
}

.thumb-e::before {
  border-bottom: 42px solid rgba(255, 255, 255, 0.8);
  border-left: 28px solid transparent;
  border-right: 28px solid transparent;
  left: 30%;
  top: 24%;
}

.thumb-f {
  background: linear-gradient(135deg, #edf1e9, #4e6e8e);
}

.thumb-f::before {
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.85) 22%, transparent 24%) 0 0 / 28px 28px;
  height: 100%;
  inset: 0;
  width: 100%;
}

.pub-body {
  min-width: 0;
}

.pub .authors,
.pub .venue,
.pub .note {
  margin-bottom: 4px;
}

.authors,
.venue,
.note {
  color: var(--muted);
  font-family: inherit;
  font-size: 16px;
}

.authors {
  color: var(--ink);
}

.note {
  color: var(--gold);
  font-weight: 700;
}

.note-context {
  color: var(--muted);
  font-weight: 400;
}

.footer {
  color: var(--muted);
  font-family: inherit;
  font-size: 16px;
  margin: 10px auto 48px;
  max-width: 980px;
  padding: 0 32px;
}

@media (max-width: 760px) {
  body {
    font-size: 16px;
  }

  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding: 16px 22px;
  }

  .section {
    padding-left: 22px;
    padding-right: 22px;
  }

  .home-grid {
    grid-template-columns: 1fr;
    padding-top: 42px;
  }

  .portrait {
    max-width: 220px;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
    gap: 8px;
  }

  .section-heading p {
    white-space: normal;
  }

  .pub {
    grid-template-columns: 104px minmax(0, 1fr);
  }
}

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

  .thumb {
    max-width: 220px;
  }
}
