/* General styles */

:root {
  --max-width: 860px;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
}

body {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5em;
  font-size: 1rem;
  font-weight: 400;
}

h1, h2, h3 {
  font-weight: 750;
  line-height: 1.2;
}

h1 {
  font-size: 1.8em;
  margin-bottom: 0.5em;
}

h2 {
  font-size: 1.5em;
  border-bottom: 1px solid #eee;
  padding-bottom: 0.25em;
  margin-top: 1.5em;
  margin-bottom: 0.75em;
}

h3 {
  font-size: 1.1em;
  margin-bottom: 0.25em;
}

p {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}

a {
  text-decoration: none;
  color: #0066cc;
}

a:hover {
  text-decoration: underline;
}

section {
  margin: 2em 0;
}

img, video {
  max-width: 100%;
}

.paper {
  display: flex;
  margin-bottom: 2em;
  align-items: flex-start;
  gap: 1.5em;
}

.paper-visual {
  width: 360px;
  height: 200px;
  object-fit: cover;
  border-radius: 2px;
  flex-shrink: 0;
}

.paper-textual {
  flex-grow: 1;
}

.paper-highlighted {
  padding: 1em;
  background-color: #f8f9fa;
  border-radius: 4px;
  margin-left: -1em;
  margin-right: -1em;
}

.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1em;
}

@media (max-width: 768px) {
  .paper {
    flex-direction: column;
  }
  
  .paper-visual {
    width: 100%;
    height: auto;
    max-height: 200px;
  }
}

/* Site-specific styles */

#paper-list {
  list-style-type: none;
  padding: 0;
  display: flex;
  flex-direction: column;
}

#paper-list strong {
  font-weight: 500;
}

#paper-list li {
  padding: 1em;
  margin-left: -1em;
  margin-right: -1em;
  align-items: center;
  gap: 1em 1.5em;
  flex-wrap: wrap;
  line-height: 1.3em;
}

#paper-list[data-show-default="false"] li {
  display: none;
}
#paper-list[data-show-default="true"] li {
  display: flex;
}

#paper-list li.paper-highlighted {
  background: rgb(255, 255, 230);
}

#paper-list li.paper-default {
  display: flex;
}

#paper-list li h3 {
  font-size: inherit;
  font-weight: 500;
  color: #000;
  padding: 0;
  margin: 0;
}

#paper-list li .paper-visual {
  width: 13em;
  height: 9.5em;
  object-fit: cover;
  overflow: hidden;
  display: block;
  border-radius: 1px;
}
#paper-list li .paper-visual * {
  display: none;
}

#paper-list li .paper-textual {
  flex-grow: 1;
  flex-basis: 20em;
}

.image-grid {
  display: flex;
  gap: 1em;
  flex-wrap: wrap;
}
.image-grid > a {
  width: 12em;
  height: 8em;
  display: block;
}
.image-grid > a:hover {
  opacity: 1;
}
.image-grid > a > * {
  object-fit: cover;
  width: 100%;
  height: 100%;
}

/* Custom Scrollbar Styles */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb {
  background: #aaa;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #777;
}

/* For Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: #aaa #f1f1f1;
}
