@import url("../fonts.css");
@import url("../links.css");

:root {
  --page-gutter: 20px;
  --focus-color: rgba(255, 255, 255, 0.55);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: #181818;
}

body {
  min-height: 100vh;
  margin: 0;
  padding: 1px 0 72px;
  background: #181818;
  color: #f0f0f0;
  font-family: "Archivo", Arial, sans-serif;
}

:where(a, button, [tabindex]):focus-visible {
  outline: 1px solid var(--focus-color);
  outline-offset: 3px;
}

.return-icon {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: #f0f0f0;
  line-height: 0;
  text-decoration: none;
  opacity: 0.78;
  transition: opacity 0.18s ease;
}

.return-icon:hover,
.return-icon:focus-visible {
  opacity: 1;
}

.watermark {
  position: fixed;
  top: 20px;
  left: 50%;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  transform: translateX(-50%);
  pointer-events: none;
  color: rgba(255, 255, 255, 0.34);
  font-size: 1.2em;
  letter-spacing: 2px;
  line-height: 1;
  text-align: center;
  text-transform: lowercase;
  white-space: nowrap;
}

.lately-updated {
  margin: 0 0 34px;
  color: rgba(255, 255, 255, 0.34);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-align: center;
}

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

.library {
  max-width: 940px;
  margin: 96px auto 0;
  padding: 0 var(--page-gutter);
}

.library-shelves {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 64px 72px;
}

.library-shelf h2 {
  margin: 0 0 26px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.library-shelf ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.library-entry + .library-entry {
  margin-top: 26px;
}

.library-title,
.library-meta {
  display: block;
}

.library-title {
  color: rgba(255, 255, 255, 0.88);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.45;
}

.library-meta {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.42);
  font-size: 0.82rem;
  line-height: 1.45;
}

.library-title.editorial-link {
  width: fit-content;
  --editorial-link-rest-opacity: 0.88;
}

@media (max-width: 700px) {
  body {
    padding-bottom: 54px;
  }

  .library {
    max-width: 560px;
    margin-top: 92px;
  }

  .library-shelves {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 48px 24px;
  }

  .library-shelf h2 {
    margin-bottom: 22px;
    font-size: 0.84rem;
  }

  .library-entry + .library-entry {
    margin-top: 22px;
  }

  .library-title {
    font-size: 0.94rem;
  }

  .library-meta {
    font-size: 0.78rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .return-icon,
  .editorial-link {
    transition: none;
  }
}
