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

body {
  font-family: 'Georgia', serif;
  font-size: 16px;
  line-height: 1.7;
  color: #222;
  background: #fff;
  max-width: 900px;
  margin: 0 auto;
}

/* HEADER */
header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #e0e0e0;
}

.site-title {
  font-family: 'Courier New', monospace;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.site-logo {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  vertical-align: middle;
  margin-right: 8px;
}

.site-title span { color: #999; font-weight: 400; }

.top-nav { display: flex; gap: 20px; list-style: none; }

.top-nav a {
  font-family: 'Courier New', monospace;
  font-size: 12px;
  color: #888;
  text-decoration: none;
  letter-spacing: 0.05em;
}

.top-nav a.active {
  color: #222;
  border-bottom: 1px solid #222;
}

/* BODY LAYOUT */
.body-wrap {
  display: grid;
  grid-template-columns: 160px 1fr;
  min-height: calc(100vh - 120px);
}

/* SIDEBAR */
.sidebar {
  border-right: 1px solid #e0e0e0;
  padding: 24px 16px;
}

.sidebar-label {
  font-family: 'Courier New', monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #bbb;
  margin-bottom: 10px;
}

.sidebar-nav { list-style: none; display: flex; flex-direction: column; gap: 2px; }

.sidebar-nav a {
  font-family: 'Courier New', monospace;
  font-size: 13px;
  color: #888;
  text-decoration: none;
  display: block;
  padding: 5px 8px;
  border-radius: 4px;
}

.sidebar-nav a.active { color: #222; background: #f5f5f5; }

.search-box {
  width: 100%;
  font-family: 'Courier New', monospace;
  font-size: 11px;
  padding: 6px 8px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  background: #f9f9f9;
  color: #222;
  margin-top: 24px;
}

.search-box::placeholder { color: #bbb; }

/* MAIN */
main { padding: 24px 32px; }

.section-title {
  font-family: 'Courier New', monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #bbb;
  margin-bottom: 20px;
}

/* ARTICLE LIST */
.article-list { display: flex; flex-direction: column; }

.article-item {
  display: block;
  padding: 14px 0 8px;
  text-decoration: none;
  color: inherit;
}

.article-item:first-child { border-top: 1px solid #e0e0e0; }
.article-item:hover .article-title { text-decoration: underline; }

.article-meta {
  font-family: 'Courier New', monospace;
  font-size: 10px;
  color: #bbb;
  margin-bottom: 4px;
  letter-spacing: 0.04em;
}

.article-title {
  font-family: 'Georgia', serif;
  font-size: 15px;
  font-weight: 400;
  color: #222;
  line-height: 1.4;
  margin-bottom: 4px;
}

.article-desc {
  font-family: 'Georgia', serif;
  font-size: 16px;
  color: #888;
  line-height: 1.6;
  margin-bottom: 4px;
}
.home-headline {
  padding: 32px 0 28px;
  border-bottom: 1px solid #e0e0e0;
  margin-bottom: 28px;
}

.home-headline h1 {
  font-family: 'Georgia', serif;
  font-size: 22px;
  font-weight: 400;
  line-height: 1.4;
  margin-bottom: 8px;
  color: #222;
}

.home-headline p {
  font-family: 'Georgia', serif;
  font-size: 14px;
  color: #888;
  line-height: 1.6;
}

.copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  font-family: 'Courier New', monospace;
  font-size: 10px;
  padding: 3px 8px;
  border: 1px solid #ccc;
  border-radius: 3px;
  background: #fff;
  color: #888;
  cursor: pointer;
  letter-spacing: 0.05em;
}

.copy-btn:hover { color: #222; border-color: #888; }
/* SINGLE ARTICLE */
article { max-width: 640px; }

article h1.article-title {
  font-size: 28px;
  line-height: 1.3;
  margin: 8px 0 12px;
}

article hr {
  border: none;
  border-top: 1px solid #e0e0e0;
  margin: 20px 0;
}

.article-body { font-size: 15px; line-height: 1.8; }
.article-body p { margin-bottom: 1.2em; }
.article-body h2 { font-size: 17px; margin: 1.8em 0 0.6em; font-weight: 500; }
.article-body h3 { font-size: 15px; margin: 1.4em 0 0.4em; font-weight: 500; }
.article-body code {
  font-family: 'Courier New', monospace;
  font-size: 13px;
  background: #fafaf7;
  padding: 1px 5px;
  border-radius: 3px;
  border: 0px solid #efefea;
}
.article-body pre {
  background: #fafaf7;
  border: 1px solid #efefea;
  padding: 16px;
  border-radius: 4px;
  overflow-x: auto;
  margin-bottom: 1.2em;
}
.article-body pre code { background: none; padding: 0; }

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  margin-bottom: 0;
  padding-bottom: 12px;
  border-bottom: 1px solid #e0e0e0;
}

.tag {
  font-family: 'Courier New', monospace;
  font-size: 10px;
  padding: 2px 8px;
  border: 1px solid #e0e0e0;
  border-radius: 3px;
  color: #888;
  text-decoration: none;
  letter-spacing: 0.04em;
}

.tag:hover {
  border-color: #F5C842;
  color: #222;
}

#search-results {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.search-result-item {
  display: block;
  padding: 6px 8px;
  text-decoration: none;
  color: inherit;
  border-radius: 4px;
  background: #f9f9f9;
  border: 1px solid #e0e0e0;
}

.search-result-item:hover { background: #f0f0f0; }

.search-result-title {
  font-family: 'Courier New', monospace;
  font-size: 11px;
  color: #222;
}

.search-result-meta {
  font-family: 'Courier New', monospace;
  font-size: 10px;
  color: #bbb;
  margin-top: 2px;
}

/* FOOTER */
footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px;
  border-top: 1px solid #e0e0e0;
  font-family: 'Courier New', monospace;
  font-size: 10px;
  color: #bbb;
  letter-spacing: 0.04em;
}


footer a { color: #bbb; text-decoration: none; }
footer a:hover { color: #222; }