/* ===== Reset ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

/* ===== Base ===== */
body {
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  color: #1a1a2e;
  background: #f4f5f7;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0;
}
a { color: #a02030; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== Header ===== */
#header {
  background: #fff;
  padding: 48px 44px 36px 44px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  border-top: 4px solid #a02030;
}
#header .htext { flex: 1; }
#header .hlogo img { height: 80px; width: auto; display: block; }
#header h1 {
  font-size: 38px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #1a1a2e;
  line-height: 1.2;
}
#header h1 a { color: #1a1a2e; }
#header h1 a:hover { color: #a02030; text-decoration: none; }
#header p.sub {
  font-size: 16px;
  color: #555;
  margin-top: 6px;
  letter-spacing: 0.3px;
}

/* ===== Navigation ===== */
#nav {
  background: #fff;
  padding: 14px 44px;
  font-size: 15px;
  border-top: 1px solid #e2e4e8;
  border-bottom: 1px solid #e2e4e8;
  position: sticky;
  top: 0;
  z-index: 100;
}
#nav a {
  margin-right: 20px;
  color: #1a1a2e;
  font-weight: 600;
  padding: 2px 0;
  border-bottom: 2px solid transparent;
}
#nav a:hover {
  color: #a02030;
  text-decoration: none;
  border-bottom-color: #a02030;
}

/* ===== Content ===== */
#main {
  background: #fff;
  padding: 36px 44px 48px 44px;
}

/* ===== Blog Index ===== */
.post-list { list-style: none; margin: 0; padding: 0; }
.post-list li {
  padding: 18px 0;
  border-bottom: 1px solid #eee;
}
.post-list li:last-child { border-bottom: none; }
.post-list .post-date {
  font-size: 14px;
  color: #777;
  font-style: italic;
}
.post-list .post-title {
  font-size: 20px;
  font-weight: 700;
  display: block;
  margin-top: 4px;
}
.post-list .post-excerpt {
  font-size: 15px;
  color: #444;
  margin-top: 6px;
  display: block;
}

/* ===== Blog Post ===== */
.post-header {
  margin-bottom: 28px;
  border-bottom: 2px solid #e2e4e8;
  padding-bottom: 14px;
}
.post-header h2 {
  font-size: 28px;
  color: #1a1a2e;
  border-bottom: none;
  margin: 0 0 6px 0;
  padding: 0;
  font-weight: 700;
}
.post-header .post-meta {
  font-size: 14px;
  color: #777;
  font-style: italic;
}
.post-content { text-align: justify; }
.post-content p {
  margin-bottom: 16px;
  font-size: 17px;
  line-height: 1.8;
}
.post-content h3 {
  font-size: 20px;
  margin: 28px 0 12px 0;
  color: #a02030;
  font-weight: 600;
}
.post-content pre {
  background: #f4f5f7;
  padding: 16px 20px;
  font-size: 14px;
  line-height: 1.6;
  overflow-x: auto;
  margin: 16px 0;
  border-left: 3px solid #a02030;
}
.post-content code {
  font-family: "Courier New", Courier, monospace;
  font-size: 15px;
}
.post-content blockquote {
  border-left: 3px solid #e2e4e8;
  padding-left: 20px;
  margin: 16px 0;
  color: #555;
  font-style: italic;
}
.post-content ul, .post-content ol {
  margin: 10px 0 10px 24px;
  font-size: 17px;
}
.post-content li { margin-bottom: 6px; }

/* Back link */
.back-link {
  display: inline-block;
  margin-top: 28px;
  font-size: 15px;
  font-weight: 600;
  color: #a02030;
  border-bottom: 2px solid transparent;
}
.back-link:hover {
  text-decoration: none;
  border-bottom-color: #a02030;
}

/* ===== Footer ===== */
#footer {
  padding: 20px 44px;
  font-size: 13px;
  color: #888;
  border-top: 1px solid #e2e4e8;
  background: #f4f5f7;
  text-align: center;
}
#footer a { color: #888; }
#footer a:hover { color: #a02030; }

/* ===== Responsive ===== */
@media (max-width: 600px) {
  #header { padding: 32px 20px 24px 20px; }
  #header h1 { font-size: 28px; }
  #header .hlogo img { height: 56px; }
  #nav { padding: 12px 20px; }
  #nav a { margin-right: 14px; }
  #main { padding: 24px 20px; }
  #footer { padding: 16px 20px; }
  .post-header h2 { font-size: 22px; }
}
