/* Base styles — clean, serif/academic aesthetic */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.1rem;
  line-height: 1.7;
  color: #333;
  background: #fafaf8;
}

.container {
  max-width: 46rem;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* Blog navigation */
.blog-nav {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  padding: 0.75rem 1rem;
  background: #f5f5f0;
  border-bottom: 1px solid #e0e0d8;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 0.9rem;
}

.blog-nav a {
  color: #555;
  text-decoration: none;
  padding: 0.2rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.blog-nav a:hover,
.blog-nav a.active {
  color: #222;
  border-bottom-color: #2a5db0;
}

/* Typography */
h1, h2, h3 {
  font-weight: normal;
  color: #222;
  line-height: 1.3;
}

h1 {
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
}

h2 {
  font-size: 1.5rem;
  margin-top: 2rem;
}

h3 {
  font-size: 1.25rem;
  margin-top: 1.5rem;
}

a[href] {
  color: #2a5db0;
  text-decoration: none;
}

a[href]:hover {
  text-decoration: underline;
}

/* Site header (home page) */
.site-header {
  text-align: center;
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #e0e0d8;
}

.site-header h1 {
  font-size: 3rem;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: bold;
  margin-bottom: 0.3rem;
}

/* Site description */
.site-description {
  font-style: italic;
  color: #666;
  margin-bottom: 0;
  font-size: 1.05rem;
}

/* Post list */
.post-list {
  list-style: none;
  padding: 0;
}

.post-item {
  margin-bottom: 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.75rem;
}

.post-item time {
  font-size: 0.9rem;
  color: #888;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  min-width: 9rem;
}

.post-item a {
  font-size: 1.1rem;
}

.view-all {
  margin-top: 1.5rem;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 0.95rem;
}

/* Tags */
.tags {
  font-size: 0.85rem;
}

.tag {
  display: inline-block;
  background: #eee;
  color: #555;
  padding: 0.15rem 0.55rem;
  border-radius: 3px;
  margin-right: 0.3rem;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.tag:hover {
  background: #ddd;
  text-decoration: none;
  color: #333;
}

/* Tag list page */
.tag-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.tag-list-item {
  display: flex;
  align-items: baseline;
  gap: 0.3rem;
}

.tag-list-item .tag {
  font-size: 1rem;
  padding: 0.3rem 0.7rem;
}

.tag-count {
  font-size: 0.8rem;
  color: #999;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

/* Single post */
.post header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e0e0d8;
}

.post header h1 {
  margin-bottom: 0.3rem;
}

.post header time {
  display: block;
  font-size: 0.95rem;
  color: #888;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  margin-bottom: 0.5rem;
}

.post-content {
  font-size: 1.1rem;
}

.post-content p {
  margin-bottom: 1.3rem;
}

.post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  display: block;
  margin: 0 auto;
}

.post-content blockquote {
  border-left: 3px solid #ccc;
  margin-left: 0;
  padding-left: 1.5rem;
  color: #555;
  font-style: italic;
}

.post-content code {
  font-size: 0.9em;
  background: #f0f0f0;
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
}

.post-content pre {
  background: #f5f5f0;
  padding: 1rem;
  overflow-x: auto;
  border-radius: 4px;
  border: 1px solid #e0e0d8;
  line-height: 1.5;
}

.post-content pre code {
  background: none;
  padding: 0;
}

.post-content ul,
.post-content ol {
  padding-left: 1.5rem;
}

.post-content li {
  margin-bottom: 0.4rem;
}

.post-content strong {
  font-weight: bold;
  color: #222;
}

.post-content em {
  font-style: italic;
}

.post-content table {
  table-layout: fixed;
  width: 100%;
  border-collapse: collapse;
  border: solid thin;
}

.post-content table td {
  padding: 2px 7px;
}

.post-content table td + td, .post-content table th + th {
  border-left: solid thin;
}

.post-content table thead {
  background: #d7c1e4;
  border-bottom: solid thin;
}
.post-content table tbody tr:nth-child(even) {
  background-color: #f4eef4;
}

.post-content .warning {
  background: #ffc690;
  border: solid 2px #c7874a;
  border-radius: 10px;
  padding: 15px;
}
.post-content .warning h3 {
  margin: 0;
  font-weight: bold;
}
.post-content .warning h3:before, .post-content .warning h3:after {
  content: "⚠️";
  text-shadow: 0 0 black;
  margin: 0 6px;
}
/* Post navigation (prev/next) */
.post-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e0e0d8;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 0.9rem;
  gap: 1rem;
}

.post-nav-prev,
.post-nav-next {
  max-width: 48%;
}

.post-nav-next {
  margin-left: auto;
  text-align: right;
}

/* Footer */
footer {
  border-top: 1px solid #ddd;
  color: #999;
  font-size: 0.85rem;
  margin-top: 3rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.footer-links a {
  color: #999;
}

.footer-links a:hover {
  color: #555;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 0.9rem;
  list-style: none;
}

/* Responsive — tablet */
@media (max-width: 768px) {
  .container {
    padding: 1.5rem 1.25rem;
  }

  .site-header h1 {
    font-size: 2.4rem;
  }

  .blog-nav {
    gap: 1rem;
    flex-wrap: wrap;
  }
}

/* Responsive — mobile */
@media (max-width: 600px) {
  .post-item {
    flex-direction: column;
    gap: 0.2rem;
  }

  .post-item time {
    min-width: auto;
  }

  h1 {
    font-size: 1.6rem;
  }

  .site-header h1 {
    font-size: 2rem;
  }

  .blog-nav {
    gap: 0.75rem;
    font-size: 0.85rem;
    padding: 0.6rem 0.75rem;
  }

  .post-nav {
    flex-direction: column;
    gap: 0.75rem;
  }

  .post-nav-prev,
  .post-nav-next {
    max-width: 100%;
    text-align: left;
  }

  .footer-content {
    flex-direction: column;
    gap: 0.25rem;
  }
}
