#logo {
  text-decoration: none;
  color: #2d3436;
  font-family: 'Courier New', Courier, monospace;
  font-weight: 900;
  font-size: 2.5rem;
  letter-spacing: 0.5rem;
  transition: all 0.3s ease;
}

#logo:hover {
  letter-spacing: 0.8rem;
  color: #00b894;
}

/* Tags Menu */
.tags-menu {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  padding: 1rem 0;
}

.tag-link {
  display: inline-block;
  padding: 0.2rem 0.8rem;
  font-size: 0.9rem;
  color: #636e72;
  text-decoration: none;
  transition: all 0.2s ease;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05rem;
}

.tag-link:hover {
  color: #2d3436;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 4px;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  background-color: #f9f9fb;
  color: #2d3436;
}

header {
  background-color: #fff;
  color: #2d3436;
  padding: 0;
  text-align: center;
  border-bottom: 1px solid #eee;
}

.header-top {
  padding: 3rem 1rem;
}

.header-divider {
  border-top: 2px solid #2d3436;
  border-bottom: 1px solid #2d3436;
  height: 4px;
  width: 100%;
  margin: 0;
}

.header-bottom {
  background-color: #f1f2f6;
  padding: 0.5rem 1rem;
}

header h1 {
  margin: 0;
  display: block;
}

/* Home / Grid */
#posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  padding: 1.5rem;
  max-width: 1400px;
  margin: 0 auto;
}

#posts-grid>.post-card:only-child {
  justify-self: left;
  max-width: 320px;
}

.single-post {
  max-width: 740px;
}

.post-link {
  text-decoration: none;
  color: inherit;
  display: block;
  height: 100%;
}

.post-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.05);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  height: 100%;
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.post-card img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  border-bottom: 1px solid #eee;
}

.post-card .content {
  padding: 1rem 1rem 1.1rem;
}

.post-card h2 {
  margin: 0 0 0.55rem;
  font-size: 1.08rem;
  line-height: 1.4;
  color: #2d3436;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card p {
  margin: 0;
  color: #636e72;
  font-size: 0.92rem;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Post Detail / Markdown Content */
#content,
#related-posts-section {
  margin: 3rem auto;
  padding: 0 1.5rem;
  background: transparent;
}

#content {
  font-size: 1.12rem;
  line-height: 1.85;
}

#content h1,
#content h2,
#content h3 {
  color: #2d3436;
  margin-bottom: 1rem;
}

#content p,
#content li {
  font-size: 1em;
  line-height: inherit;
}

#content p,
#content ul,
#content ol {
  margin-bottom: 1.35rem;
}

.single-post img {
  max-width: 100%;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  margin: 1.5rem 1rem;
  float: right;
}

.posts-grid img {
  max-width: 100%;
  height: 200px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

#content pre {
  background: #2d3436;
  color: #dfe6e9;
  padding: 1.5rem;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 0.9rem;
}

#content code {
  background: #f1f2f6;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-family: 'Courier New', Courier, monospace;
}

#content blockquote {
  border-left: 4px solid #0984e3;
  margin: 2rem 0;
  padding-left: 1.5rem;
  font-style: italic;
  color: #636e72;
}

/* Responsive Design */
@media (max-width: 900px) {
  #posts-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }
}

@media (max-width: 768px) {
  #posts-grid {
    grid-template-columns: 1fr;
    padding: 1rem;
    gap: 1rem;
  }

  header {
    padding: 1.5rem 1rem;
  }

  header h1 {
    font-size: 1.6rem;
  }

  #content {
    margin: 1.5rem auto;
    font-size: 1.04rem;
  }
}
