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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.7;
  color: #1a1a1a;
  max-width: 720px;
  margin: 0 auto;
  padding: 1.5rem;
  background: #fff;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 0 0 1rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid #e0e0e0;
  font-size: 0.9rem;
}

nav a {
  color: #333;
  text-decoration: none;
}

nav a:hover {
  text-decoration: underline;
}

nav .title-group h1 {
  margin: 0 0 5px;
  font-size: 1.3rem;
}
nav .title-group h4 {
  margin: 0 0 8px;
  font-weight: normal;
  font-size: 0.9rem;
  color: #666;
}

.nav-sep {
  color: #999;
  margin: 0 0.4rem;
}

.nav-current {
  color: #666;
}

.nav-link {
  color: #fff;
  font-size: 0.85rem;
  white-space: nowrap;
  padding: 4px 12px;
  background: #599ac0;
  border-radius: 6px;
  border: 1px solid #58a8d7;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
  text-decoration: none;
}

.nav-link:hover {
  background: #6aa3c7;
  border-color: #5a93b7;
  box-shadow: 0 1px 4px rgba(0,0,0,0.18);
  text-decoration: none;
}

h1, h2, h3, h4 {
  line-height: 1.3;
}

main > h1 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 1.5rem;
  color: #333;
}

.article-card {
  display: block;
  color: inherit;
  text-decoration: none;
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #eee;
  transition: opacity 0.15s;
}

.article-card:hover {
  opacity: 0.8;
}

.article-card article {
  margin: 0;
  padding: 0;
  border: none;
}

.article-card article h2 {
  margin: 0 0 0.2rem;
  font-size: 1.4rem;
  color: #1a1a1a;
}

.article-card:last-child {
  border-bottom: none;
}

.read-more {
  display: inline-block;
  margin-top: 0.5rem;
  color: #7eb8da;
  font-size: 0.85rem;
}

.article-card:hover .read-more {
  color: #0066cc;
}

time {
  display: block;
  color: #888;
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}

.preview p {
  margin: 0.5rem 0;
}

/* Full article view */

.full-article .back-to-blog-wrapper {
  text-align: center;
  margin: 2.5rem 0 1rem;
}
.full-article h1 {
  margin: 0 0 0.2rem;
  font-size: 1.8rem;
}

.full-article .content > h6:first-child {
  font-size: 0.95rem;
  font-weight: normal;
  color: #666;
  margin: 0 0 1rem;
  line-height: 1.4;
}

.full-article .content p {
  margin: 1rem 0;
}

.full-article .content h2 {
  margin-top: 2rem;
}

.full-article .content h3 {
  margin-top: 1.5rem;
}

.full-article .content a:has(img) {
  display: block;
  text-decoration: none;
}

.full-article .content a:has(img):hover img {
  opacity: 0.85;
}

.full-article .content img {
  max-width: 100%;
  max-height: 550px;
  height: auto;
  width: auto;
  display: block;
  margin: 1.5rem auto;
  border-radius: 4px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.15);
  transition: opacity 0.15s;
}

.full-article .content pre {
  background: #f5f5f5;
  padding: 1rem;
  overflow-x: auto;
  border-radius: 4px;
  font-size: 0.9rem;
}

.full-article .content code {
  background: #f0f0f0;
  padding: 0.125rem 0.3rem;
  border-radius: 2px;
  font-size: 0.9em;
}

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

.full-article .content blockquote {
  margin: 1rem 0;
  padding: 0 1rem;
  border-left: 3px solid #ccc;
  color: #555;
}

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

.full-article .content a {
  color: #0066cc;
}

@media (max-width: 500px) {
  body {
    padding: 1rem;
  }
  article h2 {
    font-size: 1.2rem;
  }
  .full-article h1 {
    font-size: 1.4rem;
  }
}
