/*
 * Static rebuild of the Finch layout (two columns, light card on a dark slate background).
 * Palette and spacing follow the original Finch 1.0.4 theme; the grid replaces Bootstrap 3.
 */

:root {
  --bg: #293136;
  --ink: #293136;
  --accent: #3485b4;
  --accent-dark: #276a91;
  --muted: #aaa;
  --line: #eee;
  --bar: #455159;
  --bar-dark: #3c464d;
  --code-bg: #f6f8fa;
  --code-line: #e1e4e8;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--ink);
  font-family: 'Oxygen', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

h1, h2, h3, h4, h5, h6 { margin-top: 0; }
p { margin: 0 0 10px; }
a { color: var(--accent); text-decoration: none; transition: color .15s; }
a:hover { color: var(--ink); text-decoration: underline; }
a:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
img { max-width: 100%; height: auto; }

/* ----- layout ----- */
.container { width: 100%; max-width: 1170px; margin: 0 auto; padding: 0 15px; }
@media (min-width: 1280px) { .container { max-width: 1280px; } }

.row { display: flex; flex-wrap: wrap; margin: 0 -15px; }
.col-main { flex: 0 0 66.6667%; max-width: 66.6667%; padding: 0 15px; min-width: 0; }
.col-side { flex: 0 0 33.3333%; max-width: 33.3333%; padding: 0 15px; min-width: 0; }
.col-full { flex: 0 0 100%; max-width: 100%; padding: 0 15px; min-width: 0; }

#content-holder {
  background-color: #fff;
  margin: 0 -0px;
  padding: 30px;
  border-radius: 3px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
}

/* ----- header & footer ----- */
header { text-align: center; padding-top: 45px; }
header #blog-name {
  color: #fff;
  font-size: 24px;
  font-weight: bold;
  letter-spacing: .02em;
  text-transform: uppercase;
  display: inline-block;
  border-bottom: 3px solid var(--accent);
  padding-bottom: 4px;
  margin-bottom: 10px;
}
header #blog-name:hover { text-decoration: none; border-bottom-color: #5aa6d3; }
header #description { color: #888; margin-bottom: 40px; font-style: italic; }
header .spacer { height: 30px; }

header nav { background-color: var(--bar); font-weight: bold; width: 100%; margin-bottom: 0; }
header nav ul { padding: 0; margin: 0; list-style: none; }
header nav li { display: inline-block; border-top: 4px solid var(--bar); }
header nav li:hover { border-color: #4c575f; background-color: #4c575f; }
header nav li a { color: #ccc; display: block; padding: 16px 35px 20px; }
header nav li a:hover { background-color: #4c575f; color: #fff; text-decoration: none; }
header nav li.current-menu-item { border-top: 4px solid var(--accent); }
header nav li.current-menu-item a { background-color: var(--bar-dark); color: #fff; }

footer { background-color: var(--bar); margin-bottom: 60px; color: #999; border-radius: 0 0 3px 3px; overflow: hidden; }
#footer-top a { color: #fff; }
#footer-top { background-color: var(--bar-dark); text-align: center; padding: 15px 0; }
#footer-top ul { list-style: none; padding: 0; margin: 0 0 30px; }
#footer-top li { display: inline; margin-right: 15px; font-size: 15px; }
#footer-top .search-form { border: 2px solid #4c575f; width: 420px; max-width: 100%; margin: 20px auto; display: flex; }
#footer-top .search-form label { margin: 0; flex: 1; }
#footer-top input[type=search] { background-color: var(--bar-dark); color: #fff; width: 100%; margin: 0; border: 0; border-radius: 0; }
#footer-top input[type=submit] { padding: 12px 18px; border-radius: 0; }
#footer-bottom { font-size: 14px; text-align: center; padding: 14px 0; }
#footer-bottom a { color: #999; margin: 0 8px; }

/* ----- widgets ----- */
.widget { font-size: 14px; line-height: 1.6em; margin-bottom: 30px; padding-bottom: 30px; border-bottom: 1px solid var(--line); }
.widget:last-child { border-bottom: 0; }
.widget h4 { font-size: 16px; font-weight: bold; margin-bottom: 10px; }
.widget ul { padding: 0; margin: 0 0 0 14px; }
.widget_recent_entries ul, .widget_recent_comments ul { margin-left: 0; list-style: none; }
.widget_recent_entries ul li, .widget_recent_comments ul li { border-bottom: 1px dotted var(--line); padding: 7px 0; }
.widget_nav_menu ul, .widget_categories ul, .widget_archive ul { list-style: none; margin-left: 0; }
.widget_nav_menu li, .widget_categories li, .widget_archive li { border-bottom: 1px dotted var(--line); padding: 5px 0; }
.widget_categories li span, .widget_archive li span { color: var(--muted); float: right; font-size: 12px; }
.widget_search form { display: flex; gap: 6px; }
.widget_search label { flex: 1; }
.widget_search input[type=search] { width: 100%; padding: 9px; margin: 0; }

/* ----- posts & pages ----- */
article { line-height: 1.7em; padding: 0 30px 15px 0; margin: 0 0 30px; border-bottom: 1px solid var(--line); overflow-wrap: break-word; }
article:last-of-type { margin-bottom: 20px; }
article h1 { font-size: 30px; }
article h2 { font-size: 26px; }
article h3 { font-size: 24px; }
article h4 { font-size: 21px; }
article h5 { font-size: 18px; }
article h6 { font-size: 16px; }
article p { margin-bottom: 30px; }
article ul, article ol { padding: 0; margin: 0 0 30px 16px; }
article li { margin-bottom: 4px; }
article blockquote { border-left: 4px solid var(--accent); padding-left: 30px; margin: 0 0 30px; color: #8a8a8a; font-style: italic; }
article blockquote p { margin-bottom: 10px; }
article table { width: 100%; margin-bottom: 30px; border-collapse: collapse; }
article td, article th { border: 1px solid #ccc; padding: 4px 8px; }

article pre {
  background: var(--code-bg);
  border: 1px solid var(--code-line);
  border-radius: 4px;
  padding: 0;
  margin: 0 0 30px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.55;
  tab-size: 4;
}
article pre code {
  display: block;
  padding: 14px 16px;
  font-family: Monaco, Menlo, Consolas, 'Liberation Mono', 'Courier New', monospace;
  background: transparent;
  color: #333;
  white-space: pre;
}
article li pre { margin-bottom: 16px; }
article .code-title { margin: 0; padding: 6px 16px; font-size: 12px; font-weight: bold; color: #666; background: #eceff2; border: 1px solid var(--code-line); border-bottom: 0; border-radius: 4px 4px 0 0; }
article .code-title + pre { border-radius: 0 0 4px 4px; }
article code { font-family: Monaco, Menlo, Consolas, monospace; font-size: .9em; }

.post-title { font-weight: bold; font-size: 36px; line-height: 46px; margin-bottom: 14px; }
.post-title a { color: var(--ink); }
.post-title a:hover { color: var(--accent); text-decoration: none; }
article.single .post-title { font-size: 38px; }
.post-meta { color: var(--muted); border-left: 3px solid var(--accent); line-height: 1em; font-weight: bold; padding-left: 8px; margin-bottom: 24px; font-size: 14px; }
.post-meta a { color: var(--muted); }
.post-meta a:hover { color: var(--accent); }
.post-tags { color: var(--accent); font-size: 12px; margin-bottom: 20px; }
.post-tags span { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-right: 4px; }
.post-tags a { margin-right: 6px; }
.read-more { display: inline-block; margin-bottom: 20px; font-weight: bold; font-size: 14px; }

.aligncenter { text-align: center; }
.alignleft { float: left; margin-right: 15px; }
.alignright { float: right; margin-left: 15px; }

.archive-heading { font-size: 22px; font-weight: bold; margin-bottom: 26px; padding-bottom: 10px; border-bottom: 3px solid var(--accent); display: inline-block; }
.archive-heading small { color: var(--muted); font-size: 14px; font-weight: normal; margin-left: 8px; }

/* ----- post navigation & pager ----- */
.post-nav { display: flex; justify-content: space-between; gap: 20px; font-size: 14px; margin: 0 30px 30px 0; }
.post-nav a { display: block; max-width: 48%; }
.post-nav .next { text-align: right; margin-left: auto; }
.post-nav small { display: block; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-size: 11px; }

.pager { margin: 0 0 20px; }
.page-numbers {
  border: 1px solid #ccc;
  padding: 5px 12px;
  font-size: 14px;
  display: inline-block;
  background-color: #eee;
  border-radius: 99px;
  color: #777;
  margin: 0 5px 6px 0;
}
a.page-numbers:hover { background: var(--accent); border-color: var(--accent); color: #fff; text-decoration: none; }
.page-numbers.current { background-color: transparent; color: var(--ink); font-weight: bold; }
.page-numbers.dots { background: none; border-color: transparent; }

/* ----- archive page ----- */
.archive-year { font-size: 22px; font-weight: bold; margin: 30px 0 10px; }
.archive-year:first-of-type { margin-top: 0; }
.archive-list { list-style: none; padding: 0; margin: 0 0 10px; }
.archive-list li { display: flex; gap: 14px; padding: 7px 0; border-bottom: 1px dotted var(--line); font-size: 15px; }
.archive-list time { color: var(--muted); flex: 0 0 5.5em; font-size: 13px; padding-top: 2px; }

/* ----- comments ----- */
#comments { font-size: 14px; margin-bottom: 30px; padding-right: 30px; }
#comments-title { font-size: 20px; margin-bottom: 20px; }
.comment-list { padding: 0; margin: 0; list-style: none; }
.comment-list .children { list-style: none; margin: 20px 0 0 40px; padding: 0; }
.comment-list li { margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--line); line-height: 1.5em; }
.comment-list li li:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.comment-author { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.comment-author .avatar {
  width: 36px; height: 36px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bar); color: #fff; font-weight: bold; font-size: 15px; flex: none;
}
.bypostauthor .comment-author .avatar { background: var(--accent); }
.comment-author .name { font-weight: bold; }
.comment-author .name a { color: var(--ink); }
.comment-meta { color: var(--muted); font-size: 12px; }
.comment-meta a { color: var(--muted); }
.comment-body p { margin-bottom: 10px; }
.comments-note { color: var(--muted); font-size: 13px; font-style: italic; }

/* ----- form elements ----- */
input[type=text], input[type=email], input[type=password], input[type=search], textarea {
  border: 1px solid #ddd;
  margin-right: 5px;
  padding: 12px;
  width: 85%;
  font-size: 14px;
  color: #222;
  margin-bottom: 10px;
  border-radius: 3px;
  font-family: inherit;
}
input[type=submit], input[type=reset] {
  background-color: var(--bg);
  border: 0;
  color: #fff;
  padding: 10px 14px;
  text-align: center;
  font-size: 14px;
  border-radius: 2px;
  cursor: pointer;
  font-family: inherit;
  transition: background-color .15s;
}
input[type=submit]:hover { background-color: var(--accent); }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.search-result { padding: 14px 0; border-bottom: 1px solid var(--line); }
.search-result h3 { font-size: 20px; margin-bottom: 4px; }
.search-result p { margin: 0; color: #666; font-size: 14px; line-height: 1.6; }
mark { background: #fff3a3; color: inherit; padding: 0 2px; }

/* ----- responsive ----- */
@media (max-width: 992px) {
  header nav li a { padding: 12px 25px 18px; font-size: 15px; }
}

@media (max-width: 768px) {
  header { padding-top: 15px; }
  header #blog-name { font-size: 20px; }
  header #description { margin-bottom: 20px; }
  header nav li a { padding: 8px 17px 12px; font-size: 14px; }
  .container { padding: 0; }
  #content-holder { padding: 20px 15px; border-radius: 0; }
  .row { margin: 0; }
  .col-main, .col-side, .col-full { flex: 0 0 100%; max-width: 100%; padding: 0; }
  article { padding: 0 0 10px; }
  .post-title, article.single .post-title { font-size: 28px; line-height: 36px; }
  .post-nav, #comments { margin-right: 0; padding-right: 0; }
  .col-side { margin-top: 30px; }
  #footer-top .search-form { width: 300px; }
}
