@import url("./engine.css");

/* Blog-specific additions. Engine CSS already handles .document, .header,
 * .main, .footer, .section, .title, .form, .field, .button, .autocomplete,
 * .tag, .table, light/dark mode, and the Pretendard font. */

.post-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; }
.post-item {
  padding: .75rem 0;
  border-bottom: 1px dashed var(--code-background);
  display: flex; flex-direction: column; gap: .25rem;
}
.post-link { font-size: 1.125rem; font-weight: 500; color: var(--link-text); }
.post-link:hover { text-decoration: underline; text-underline-offset: .15em; }
.post-meta { font-size: .8125rem; opacity: .6; display: flex; flex-wrap: wrap; gap: .25rem .375rem; align-items: baseline; }
.post-meta .dot { opacity: .5; }
.post-meta .tag { opacity: 1; }

.post-content { line-height: 1.8; }
.post-content h1, .post-content h2, .post-content h3 { line-height: 1.3; margin-top: 2em; }
.post-content h1:first-child, .post-content h2:first-child { margin-top: 0; }
.post-content h1 { font-size: 1.5rem; }
.post-content h2 { font-size: 1.25rem; border-bottom: var(--border); padding-bottom: .2em; }
.post-content h3 { font-size: 1.125rem; }
.post-content p, .post-content ul, .post-content ol, .post-content pre, .post-content blockquote { margin: .8em 0; }
.post-content ul, .post-content ol { padding-left: 1.5em; list-style: revert; }
.post-content ul li, .post-content ol li { margin: .25em 0; }
.post-content blockquote {
  border-left: 3px solid var(--code-background);
  padding: .1rem 1rem;
  opacity: .8;
  margin-left: 0;
}
.post-content a { color: var(--link-text); text-decoration: underline; text-underline-offset: .15em; }
.post-content img { max-width: 100%; height: auto; display: block; margin: 1em 0; border-radius: .25rem; }
.post-content pre {
  background: var(--code-background);
  padding: .75rem 1rem;
  border-radius: .25rem;
  overflow: auto;
  font-family: var(--monospace);
  font-size: .875rem;
  line-height: 1.6;
}
.post-content code {
  background: var(--code-background);
  padding: .125rem .375rem;
  border-radius: .25rem;
  font-family: var(--monospace);
  font-size: .875em;
}
.post-content pre code { background: transparent; padding: 0; }
.post-content hr { border: 0; border-top: 1px dashed var(--code-background); margin: 2em 0; }
.post-content table { border-collapse: collapse; width: auto; margin: 1em 0; }
.post-content table th, .post-content table td { padding: .375rem .75rem; border: var(--table-border); }
.post-content table th { background: var(--code-background); text-align: left; }

.pagination {
  display: flex; align-items: center; justify-content: center; gap: 1rem;
  padding: 2rem 0 .5rem;
}
.pagination .page-indicator {
  font-family: var(--monospace); font-size: .875rem;
  opacity: .7; font-variant-numeric: tabular-nums;
}

.post-nav {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1rem;
  margin: 3rem 0 2rem;
  padding: 1.5rem 0 0;
  border-top: var(--border);
}
.post-nav div { display: flex; flex-direction: column; gap: .25rem; min-width: 0; }
.post-nav div:last-child { text-align: right; align-items: flex-end; }
.post-nav small { font-size: .75rem; opacity: .6; }
.post-nav a { color: var(--link-text); font-weight: 500; }

.comments { margin-top: 3rem; padding-top: 1.5rem; border-top: var(--border); }
.comments .field-title { margin-bottom: 1rem; }

.category-group { margin: 2rem 0; }
.category-group .field-title { display: flex; align-items: center; gap: .5rem; }

.tag-cloud {
  display: flex; flex-wrap: wrap; gap: .5rem;
  padding: 1rem 0; margin: 0 0 1rem; border-bottom: var(--border);
}
.tag-cloud .tag { padding: .25rem .5rem; text-decoration: none; }
.tag-cloud .tag:hover { background: var(--autocomplete-link-hover-background); }
.tag-cloud small { opacity: .5; font-variant-numeric: tabular-nums; }

/* Dropdown menu — engine gives .dropdown-content but defaults a solid bg */
.dropdown-content a { display: block; }

/* Rouge / highlight syntax (minimal, matches engine's monochrome aesthetic) */
.highlight .k, .highlight .kd, .highlight .kn, .highlight .kp, .highlight .kr, .highlight .kt { color: inherit; font-weight: 700; }
.highlight .c, .highlight .c1, .highlight .cm { color: inherit; opacity: .55; font-style: italic; }
.highlight .s, .highlight .s1, .highlight .s2, .highlight .sr { color: inherit; opacity: .7; }
.highlight .nf, .highlight .nc, .highlight .nn { color: inherit; font-weight: 500; }
.highlight .nb { color: inherit; opacity: .8; }
.highlight .mi, .highlight .mf { color: inherit; opacity: .7; }
