/* I want my page to be centered, with a short description below the tittle,
  followed by a main block of content. This block must be centered as well, and
  must have three divisions, respectively: sidetopics, posts, and author information. */

html,
body {
  min-height: 100%;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  background: linear-gradient(to bottom, #050b1f 0%, #0b1d42 52%, #182d5c 100%);
  background-attachment: fixed;
  font-family: verdana, sans-serif;
  font-size: 1rem;
  padding: 20px;
  color: white;
}

h1 {
  margin-bottom: 8px;
  text-align: center;
  font-family: "Noto Sans JP", "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  font-size: 3rem;
}

#content {
  display: grid;
  grid-template-columns: 0.8fr 2fr 1.2fr;
  gap: 20px;
  margin: 20px auto 0;
  max-width: 1100px;
}

.site-header {
  margin: 0 auto;
  max-width: 800px;
  text-align: center;
}

.site-section {
  padding: 20px;
  border: 1px solid #526da8;
  border-radius: 8px;
  background: rgb(5 11 31 / 45%);
}

.site-section h2 {
  margin-top: 0;
  font-size: 1.5rem;
}

.topic-list {
  margin: 0;
  padding-left: 20px;
}

.topic-list a {
  color: #d5e0ff;
}

.site-section h3 {
  margin-bottom: 8px;
}

.post-list {
  margin: 0;
  padding-left: 20px;
}

.post-list a {
  color: #d5e0ff;
}

.post {
  border-top: 1px solid #526da8;
  padding-top: 16px;
}

.topic-results {
  max-height: 420px;
  overflow-y: auto;
}

.back-to-posts {
  margin-bottom: 16px;
  border: 1px solid #8fa7df;
  border-radius: 4px;
  background: #182d5c;
  color: white;
  padding: 6px 10px;
  cursor: pointer;
}

.back-to-posts:hover,
.back-to-posts:focus-visible {
  background: #526da8;
}

.topic-results-title {
  margin: 0 0 16px;
}

.topic-results-list {
  display: grid;
  gap: 16px;
}

.topic-result {
  padding-top: 16px;
  border-top: 1px solid #526da8;
}

.topic-result-title {
  display: block;
  margin-bottom: 4px;
  color: #d5e0ff;
  font-size: 1.05rem;
}

.topic-result .post-date,
.topic-result .post-summary {
  display: block;
}

.post-header {
  margin-bottom: 12px;
}

.post-title {
  margin: 0;
  font-size: 1.2rem;
}

.post-date {
  color: #b8c7e8;
  font-size: 0.8rem;
}

.post-summary {
  margin: 0 0 12px;
  color: #b8c7e8;
  font-size: 0.85rem;
  font-style: italic;
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.post-tags a {
  color: #d5e0ff;
  font-size: 0.8rem;
}

.post-content p {
  margin-bottom: 0;
}

.post-navigation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: sticky;
  bottom: 0;
  margin: 24px -20px -20px;
  padding: 10px 20px;
  border-top: 1px solid #526da8;
  background: #0b1d42;
}

.post-navigation button {
  min-width: 32px;
  min-height: 32px;
  border: 1px solid #8fa7df;
  border-radius: 4px;
  background: #182d5c;
  color: white;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

.post-navigation button:hover,
.post-navigation button:focus-visible {
  background: #526da8;
}

.post-position {
  color: #b8c7e8;
  font-size: 0.8rem;
}

[hidden] {
  display: none;
}

@media (max-width: 700px) {
  #content {
    grid-template-columns: 1fr;
  }
}