/* ===== PMI ThinkTank Blog — sakana.ai風レイアウト ===== */

:root {
  --text: #1a1a1a;
  --text-muted: #8a8a8a;
  --text-light: #b0b0b0;
  --line: #ececec;
  --accent: #1a5f7a;
  --bg: #ffffff;
  --card: #ffffff;
  --body-text: #333333;
  --excerpt: #444444;
  --max: 1000px;
}

/* ダークモード */
:root[data-theme="dark"] {
  --text: #eaeaea;
  --text-muted: #9a9a9a;
  --text-light: #6a6a6a;
  --line: #2c2c2c;
  --accent: #5bb4d6;
  --bg: #14181b;
  --card: #1b2024;
  --body-text: #cfcfcf;
  --excerpt: #bdbdbd;
}

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

html {
  scroll-behavior: smooth;
  /* スクロールバーの有無でヘッダー/フッターが左右にズレるのを防ぐ */
  scrollbar-gutter: stable;
  overflow-y: scroll;
}

body {
  /* 英数字は Helvetica Neue、日本語は Noto Sans JP（グリフの無い文字は自動でフォールバック） */
  font-family: "Helvetica Neue", "Noto Sans JP", "Hiragino Kaku Gothic ProN",
    "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
}

/* ===== Header ===== */
.site-header {
  border-bottom: 1px solid var(--line);
  padding: 40px 24px 36px;
}

.site-header__inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.theme-toggle {
  flex: none;
  margin-top: 4px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  cursor: pointer;
  display: inline-flex;
  overflow: hidden;
  transition: border-color 0.15s;
}

.theme-toggle:hover {
  border-color: var(--text-muted);
}

.theme-toggle .tt-opt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 100%;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  transition: background 0.15s, color 0.15s;
}

.theme-toggle .tt-opt.is-active {
  background: var(--accent);
  color: #fff;
}

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

.site-home:hover {
  color: var(--text);
}

.logo {
  display: block;
}

.logo img {
  height: 44px;
  width: auto;
  display: block;
}

.logo__sub {
  display: block;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.28em;
  color: var(--text-muted);
  margin-top: 8px;
  text-transform: uppercase;
}

/* ===== Category nav ===== */
.category-nav {
  max-width: var(--max);
  margin: 40px auto 8px;
  padding: 0 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  font-size: 15px;
}

.category-nav a {
  color: var(--text-muted);
  padding-bottom: 4px;
  transition: color 0.15s;
}

.category-nav a:hover {
  color: var(--text);
}

.category-nav a.is-active {
  color: var(--text);
  border-bottom: 1.5px solid var(--text);
}

/* ===== Post list ===== */
.post-list {
  max-width: var(--max);
  margin: 24px auto 80px;
  padding: 0 24px;
}

.post {
  padding: 44px 0;
  border-bottom: 1px solid var(--line);
}

.post:first-child {
  padding-top: 24px;
}

.post__title {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: var(--text);
  transition: color 0.15s;
}

.post__title:hover {
  color: var(--accent);
}

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

.post__cat {
  color: var(--accent);
  font-weight: 600;
}

.post__thumb {
  display: block;
  width: 100%;
  border-radius: 4px;
  margin-top: 24px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.post__thumb img,
.post__thumb svg {
  display: block;
  width: 100%;
  height: auto;
}

.post__excerpt {
  margin-top: 20px;
  font-size: 16px;
  color: var(--excerpt);
  max-width: 760px;
}

.post__more {
  display: inline-block;
  margin-top: 18px;
  font-size: 15px;
  color: var(--accent);
  font-weight: 600;
}

.post__more::after {
  content: " →";
}

/* ===== Footer ===== */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 44px 24px;
}

.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: 14px;
  color: var(--text-muted);
}

.social {
  display: flex;
  gap: 20px;
}

.social a:hover {
  color: var(--text);
}

/* ===== Article page ===== */
.article {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 24px 80px;
}

.article__back {
  font-size: 14px;
  color: var(--text-muted);
}

.article__title {
  font-size: 38px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin-top: 20px;
}

.article__meta {
  margin-top: 14px;
  font-size: 14px;
  color: var(--text-muted);
}

.article__hero {
  margin: 36px 0;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.article__hero svg,
.article__hero img {
  display: block;
  width: 100%;
}

.article__body h2 {
  font-size: 24px;
  margin: 40px 0 14px;
}

.article__body p {
  margin: 16px 0;
  font-size: 17px;
  color: var(--body-text);
}

.article__body ul {
  margin: 16px 0 16px 24px;
  font-size: 17px;
  color: var(--body-text);
}

/* 本文中の画像はカラム幅に収める */
.article__body img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 24px 0;
  border: 1px solid var(--line);
  border-radius: 4px;
}

@media (max-width: 600px) {
  .logo { font-size: 34px; }
  .post__title { font-size: 24px; }
  .article__title { font-size: 28px; }
  .category-nav { gap: 18px; font-size: 14px; }
}
