:root {
  color-scheme: dark;
  --bg: #0e1111;
  --panel: #141819;
  --panel-soft: #191f20;
  --line: #2a3233;
  --text: #edf2ef;
  --muted: #a8b3ad;
  --accent: #6fcf97;
  --accent-2: #79b8ff;
  --warn: #f2c94c;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 10%, rgba(111, 207, 151, 0.13), transparent 28rem),
    radial-gradient(circle at 90% 20%, rgba(121, 184, 255, 0.12), transparent 24rem),
    linear-gradient(135deg, rgba(255, 255, 255, 0.025) 25%, transparent 25%) 0 0 / 32px 32px,
    var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 300px;
  padding: 28px 22px;
  border-right: 1px solid var(--line);
  background: rgba(14, 17, 17, 0.92);
  overflow: auto;
}

.home-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
}

.eyebrow {
  margin: 28px 0 8px;
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: 34px;
  line-height: 1.05;
}

h2 {
  font-size: 28px;
}

.intro {
  color: var(--muted);
  line-height: 1.55;
}

.search-label {
  display: block;
  margin: 28px 0 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input,
select {
  width: 100%;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: var(--panel);
  color: var(--text);
}

.stats {
  margin: 14px 0 18px;
  color: var(--muted);
  font-size: 13px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

button,
.chip {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--text);
  cursor: pointer;
  font: inherit;
}

.filters button {
  padding: 8px 10px;
  font-size: 12px;
}

.filters button.active {
  border-color: var(--accent);
  color: var(--accent);
}

main {
  margin-left: 300px;
  padding: 34px;
}

.toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.toolbar-actions {
  display: flex;
  align-items: end;
  gap: 10px;
}

.toolbar-actions label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.toolbar-actions select {
  width: 160px;
}

#clearFilters {
  padding: 10px 12px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.card {
  display: flex;
  min-height: 330px;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: rgba(20, 24, 25, 0.9);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.year {
  color: var(--accent);
  font-weight: 800;
}

.quality {
  color: var(--warn);
  font-size: 11px;
  font-weight: 800;
}

.title {
  margin: 0 0 9px;
  font-size: 15px;
  line-height: 1.28;
}

.venue {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 0 0 10px;
}

.chip {
  padding: 4px 7px;
  color: var(--muted);
  cursor: default;
  font-size: 11px;
}

ul {
  margin: 0;
  padding-left: 18px;
}

li {
  margin: 4px 0;
  color: #d9e0dc;
  font-size: 12px;
  line-height: 1.35;
}

details {
  margin-top: auto;
  padding-top: 12px;
}

summary {
  color: var(--accent-2);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.abstract {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.paper-link {
  display: inline-block;
  margin-top: 8px;
  color: var(--accent);
  font-size: 12px;
  text-decoration: none;
}

.empty {
  grid-column: 1 / -1;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 30px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 1180px) {
  .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .sidebar {
    position: static;
    width: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  main {
    margin-left: 0;
    padding: 22px;
  }

  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .toolbar-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .toolbar-actions select {
    width: 100%;
  }

  .grid {
    grid-template-columns: 1fr;
  }
}
