/* ===== Human Research Collective Blog — ミニマル・リスト型レイアウト ===== */

:root {
  --bg: #ffffff;
  --text: #17181a;
  --muted: #8a8d91;
  --line: #ececed;
  --card-border: #e6e6e7;
  --input-border: #d9d9db;
  --btn-bg: #16181c;
  --btn-text: #ffffff;
  --link-hover: #4a4a4a;
  --pill-bg: #f2f2f3;
  --pill-text: #55585c;
  --pill-hover: #e7e7e9;
  --cat: #6a6d72;
  --max: 900px;
}

/* OS がダークモードのときは色を反転 */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14181b;
    --text: #eaeaea;
    --muted: #8f9296;
    --line: #262b2f;
    --card-border: #2a2f33;
    --input-border: #3a4046;
    --btn-bg: #eaeaea;
    --btn-text: #14181b;
    --link-hover: #b6b6b6;
    --pill-bg: #232a2f;
    --pill-text: #c2c6ca;
    --pill-hover: #2c343a;
    --cat: #a7abb0;
  }
}

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

html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
  overflow-y: scroll;
}

body {
  font-family: "Helvetica Neue", "Hiragino Kaku Gothic ProN",
    "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 64px 24px 40px;
}

/* ===== Blog header ===== */
.blog-head { margin-bottom: 40px; }

.blog-head__back {
  display: inline-block;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 22px;
}
.blog-head__back:hover { color: var(--text); }

.blog-head__title {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.blog-head__sub {
  margin-top: 10px;
  font-size: 15px;
  color: var(--muted);
}

.blog-head__news {
  margin-top: 8px;
  font-size: 15px;
  color: var(--muted);
}

.blog-head__news a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s;
}

.blog-head__news a:hover { color: var(--link-hover); }

/* ===== Search ===== */
.search {
  display: flex;
  gap: 12px;
  margin: 28px 0 56px;
}

.search__input {
  flex: 1 1 auto;
  min-width: 0;
  font: inherit;
  font-size: 15px;
  padding: 13px 18px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--input-border);
  border-radius: 10px;
  outline: none;
  transition: border-color 0.15s;
}
.search__input::placeholder { color: var(--muted); }
.search__input:focus { border-color: var(--text); }

.search__btn {
  flex: none;
  font: inherit;
  font-weight: 700;
  font-size: 15px;
  padding: 0 26px;
  color: var(--btn-text);
  background: var(--btn-bg);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: opacity 0.15s;
}
.search__btn:hover { opacity: 0.85; }

/* ===== Category filter ===== */
.catfilter { margin: -28px 0 44px; }

.catfilter__label {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 12px;
}

.catfilter__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pill {
  font: inherit;
  font-size: 14px;
  line-height: 1;
  padding: 8px 15px;
  color: var(--pill-text);
  background: var(--pill-bg);
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.pill:hover { background: var(--pill-hover); }
.pill.is-active {
  background: var(--btn-bg);
  color: var(--btn-text);
}

/* ===== Post list ===== */
.posts { margin-top: 8px; }

.post {
  padding: 26px 0;
  border-top: 1px solid var(--line);
}
.post:last-of-type { border-bottom: 1px solid var(--line); }

.post__title {
  display: inline;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: -0.01em;
  color: var(--text);
  transition: color 0.15s;
}
.post__title:hover { color: var(--link-hover); }

.post__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
}

.post__cat {
  font-weight: 700;
  color: var(--cat);
}

.posts__empty {
  padding: 40px 0;
  color: var(--muted);
  font-size: 15px;
}

/* ===== Article page ===== */
.article { max-width: 720px; margin: 0 auto; }

.article__back {
  display: inline-block;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 26px;
}
.article__back:hover { color: var(--text); }

.article__title {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.article__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  font-size: 13px;
  color: var(--muted);
}

.article__cat {
  font-weight: 700;
  color: var(--cat);
}

.article__body { margin-top: 40px; }

.article__body h2 {
  font-size: 22px;
  margin: 40px 0 14px;
  letter-spacing: -0.01em;
}
.article__body h3 {
  font-size: 18px;
  margin: 30px 0 10px;
}
.article__body p { margin: 16px 0; font-size: 16.5px; }
.article__body ul,
.article__body ol { margin: 16px 0 16px 24px; font-size: 16.5px; }
.article__body li { margin: 6px 0; }
.article__body blockquote {
  margin: 20px 0;
  padding: 4px 18px;
  border-left: 3px solid var(--line);
  color: var(--muted);
}
.article__body a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.article__body img {
  display: block;
  margin: 24px 0;
  border: 1px solid var(--line);
  border-radius: 6px;
}

/* ===== Footer ===== */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 36px 24px;
  margin-top: 40px;
}
.site-footer__inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  color: var(--muted);
}
.social { display: flex; gap: 20px; }
.social a:hover { color: var(--text); }

@media (max-width: 600px) {
  .wrap { padding: 44px 20px 32px; }
  .blog-head__title { font-size: 27px; }
  .article__title { font-size: 26px; }
  .post__title { font-size: 19px; }
  .search { flex-wrap: wrap; }
  .search__btn { width: 100%; padding: 12px; }
}
