/* Cocoon monochrome 風スタイル（Hugo 移行トライアル）
   参考にした配色: text #333 / border #e9e9e9 / meta gray #9da5a0 / accent red #ef1515 */
:root {
  --text: #333333;
  --meta: #9da5a0;
  --border: #e9e9e9;
  --accent: #ef1515;
  --bg: #f7f7f7;
  --header-bg: #2b2b2b;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
  font-size: 16px;
  line-height: 1.8;
  color: var(--text);
  background: var(--bg);
}
a { color: #0063dc; text-decoration: none; }
a:hover { text-decoration: underline; }

/* header: centered logo, dark bar */
.site-header { background: var(--header-bg); color: #fff; text-align: center; padding: 1.6rem 1rem; }
.site-header .logo { color: #fff; font-size: 1.5rem; font-weight: bold; letter-spacing: .04em; }
.site-header .tagline { color: #bbb; font-size: .8rem; margin: .4rem 0 0; }

/* global nav */
.global-nav { background: #383838; }
.nav-in { max-width: 1120px; margin: 0 auto; display: flex; flex-wrap: wrap; }
.global-nav a { color: #fff; padding: .7rem 1rem; font-size: .85rem; }
.global-nav a:hover { background: rgba(255,255,255,.12); text-decoration: none; }

/* 2-column layout */
.content-wrap { max-width: 1120px; margin: 1.5rem auto; display: flex; gap: 1.5rem; padding: 0 1rem; align-items: flex-start; }
.main { flex: 1 1 auto; width: 67%; }
.sidebar { flex: 0 0 300px; }

/* post card list (Cocoon entry-card style: thumb left, text right) */
.post-card { display: flex; gap: 1rem; background: #fff; border: 1px solid var(--border);
             border-radius: 6px; padding: 1rem; margin-bottom: 1rem; }
.post-card:hover { box-shadow: 0 2px 10px rgba(0,0,0,.06); }
.post-card .thumb { flex: 0 0 160px; height: 110px; overflow: hidden; border-radius: 4px; background: #f0f0f0; }
.post-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-card .thumb.placeholder { display: flex; align-items: center; justify-content: center; color: #ccc; font-size: .75rem; }
.post-card .card-body { flex: 1 1 auto; }
.post-card .card-title { font-size: 1.1rem; font-weight: bold; margin: 0 0 .4rem; line-height: 1.5; }
.post-card .card-title a { color: var(--text); }
.post-card .card-meta { color: var(--meta); font-size: .8rem; margin-bottom: .4rem; }
.post-card .card-snippet { color: #666; font-size: .85rem; }

.cat, .badge { display: inline-block; border: 1px solid var(--accent); color: var(--accent);
               border-radius: 3px; padding: 0 6px; font-size: .72rem; margin-right: 4px; line-height: 1.6; }
.badge-draft { border-color: #c0392b; color: #fff; background: #c0392b; }

/* single article */
.article { background: #fff; border: 1px solid var(--border); border-radius: 6px; padding: 2rem; }
.article h1 { font-size: 1.6rem; line-height: 1.4; border-bottom: 3px solid var(--accent); padding-bottom: .6rem; }
.article h2 { border-left: 5px solid var(--text); background: #f4f4f4; padding: .5rem .8rem; font-size: 1.3rem; margin-top: 2rem; }
.article h3 { border-bottom: 1px solid var(--border); padding-bottom: .3rem; }
.article img { max-width: 100%; height: auto; border-radius: 4px; }
.article .post-meta { color: var(--meta); font-size: .85rem; margin-bottom: 1.5rem; }

/* tables inside articles */
.article table { width: 100%; border-collapse: collapse; margin: 1.2rem 0; font-size: .9rem; }
.article table th, .article table td { border: 1px solid var(--border); padding: .5rem .7rem; text-align: left; vertical-align: top; }
.article table thead th { background: var(--text); color: #fff; font-weight: 700; }
.article table tbody tr:nth-child(even) { background: #fafafa; }
.article table tbody tr:hover { background: #f4f4f4; }
/* horizontal scroll on narrow screens */
.article .table-wrap { overflow-x: auto; }

/* sidebar widgets */
.widget { background: #fff; border: 1px solid var(--border); border-radius: 6px; margin-bottom: 1.2rem; }
.widget-title { background: var(--text); color: #fff; font-size: .9rem; margin: 0; padding: .5rem .8rem; border-radius: 6px 6px 0 0; }
.widget ul { list-style: none; margin: 0; padding: .5rem .8rem; }
.widget li { display: flex; justify-content: space-between; border-bottom: 1px dashed var(--border); padding: .4rem 0; font-size: .85rem; }
.widget li:last-child { border-bottom: none; }
.widget li span { color: var(--meta); }

/* footer */
.site-footer { background: var(--header-bg); color: #ccc; text-align: center; padding: 1.5rem 1rem; margin-top: 2rem; font-size: .8rem; }
.site-footer .note { color: #888; font-size: .72rem; }

@media screen and (max-width: 900px) {
  .content-wrap { flex-direction: column; }
  .main, .sidebar { width: 100%; flex-basis: auto; }
  .post-card .thumb { flex-basis: 110px; height: 80px; }
}
