:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --fg: #1d1d1f;
  --muted: #6e6e73;
  --accent: #2563eb;
  --accent-soft: rgba(37, 99, 235, 0.08);
  --border: rgba(0, 0, 0, 0.08);
  --card-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.06);
  --card-shadow-hover: 0 2px 4px rgba(0, 0, 0, 0.06), 0 16px 40px rgba(0, 0, 0, 0.1);
  --header-bg: rgba(245, 246, 248, 0.78);
  --hero-bg: #0a0f1e;
  --hero-fg: #f2f4f8;
  --hero-muted: #9aa4b8;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101114;
    --surface: #1a1c20;
    --fg: #e8e8ea;
    --muted: #9a9aa1;
    --accent: #7aa5f8;
    --accent-soft: rgba(122, 165, 248, 0.1);
    --border: rgba(255, 255, 255, 0.1);
    --card-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
    --card-shadow-hover: 0 2px 4px rgba(0, 0, 0, 0.4), 0 16px 40px rgba(0, 0, 0, 0.5);
    --header-bg: rgba(16, 17, 20, 0.78);
  }
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP", "Yu Gothic Medium", Meiryo, sans-serif;
  line-height: 1.9;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 1000px; margin: 0 auto; padding: 0 1.5rem; }
.container-narrow { max-width: 720px; margin: 0 auto; padding: 0 1.5rem; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- header ---------- */

header.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0.8rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--fg);
}
.brand:hover { text-decoration: none; }
.brand-avatar {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  display: block;
  image-rendering: pixelated;
  border: 1px solid var(--border);
}
.brand-text { font-size: 1.05rem; font-weight: 700; letter-spacing: -0.01em; }
.brand-accent { color: var(--accent); }

nav.site-nav { display: flex; gap: 1.4rem; font-size: 0.88rem; }
nav.site-nav a { color: var(--muted); }
nav.site-nav a:hover { color: var(--fg); text-decoration: none; }

/* ---------- hero (top page) ---------- */

.hero {
  background: var(--hero-bg);
  color: var(--hero-fg);
  position: relative;
  overflow: hidden;
  padding: 5.5rem 0 0;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 45% at 22% 8%, rgba(56, 130, 246, 0.22), transparent 65%),
    radial-gradient(ellipse 50% 40% at 82% 30%, rgba(45, 212, 191, 0.13), transparent 65%);
  pointer-events: none;
}

.hero-inner { position: relative; text-align: center; }

.hero-eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--hero-muted);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 0.32rem 1rem;
  margin-bottom: 1.6rem;
}

.hero h1 {
  font-size: clamp(2.1rem, 5.4vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.35;
  margin-bottom: 1.2rem;
}

.hero h1 .grad {
  background: linear-gradient(92deg, #5eead4 5%, #60a5fa 55%, #a78bfa 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  max-width: 620px;
  margin: 0 auto 2.4rem;
  font-size: 1.02rem;
  color: var(--hero-muted);
}

.hero-chart {
  position: relative;
  display: block;
  width: min(920px, 100%);
  margin: 0 auto -1px;
}
.hero-chart svg { display: block; width: 100%; height: auto; }

/* ---------- page hero (sub pages) ---------- */

.page-hero {
  background: var(--hero-bg);
  color: var(--hero-fg);
  position: relative;
  overflow: hidden;
  padding: 3.6rem 0 3.2rem;
}
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 55% 70% at 25% 0%, rgba(56, 130, 246, 0.2), transparent 65%);
  pointer-events: none;
}
.page-hero .container-narrow { position: relative; }
.page-hero .kicker {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--hero-muted);
  margin-bottom: 0.7rem;
}
.page-hero h1 {
  font-size: clamp(1.5rem, 3.6vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.45;
}
.page-hero .page-meta { margin-top: 0.8rem; font-size: 0.85rem; color: var(--hero-muted); }

/* ---------- sections ---------- */

main { padding: 0 0 4rem; }

.section { padding: 4rem 0 0; }

.section-title {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-bottom: 0.5rem;
}
.section-sub { color: var(--muted); font-size: 0.92rem; margin-bottom: 2rem; }

/* principles */

.principles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
}
@media (max-width: 760px) { .principles { grid-template-columns: 1fr; } }

.principle {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.5rem 1.4rem;
  box-shadow: var(--card-shadow);
}
.principle .num {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 0.5rem;
}
.principle h3 { font-size: 1.02rem; font-weight: 700; margin-bottom: 0.5rem; letter-spacing: -0.01em; }
.principle p { font-size: 0.88rem; color: var(--muted); line-height: 1.85; }

/* post cards */

.post-cards { display: grid; gap: 1.1rem; }

.post-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.6rem 1.7rem;
  box-shadow: var(--card-shadow);
  color: var(--fg);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.post-card:hover {
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: var(--card-shadow-hover);
}
.post-card .card-top {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.55rem;
}
.post-card .badge {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 0.18rem 0.7rem;
}
.post-card .tag { font-size: 0.76rem; color: var(--muted); }
.post-card h3 { font-size: 1.12rem; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 0.4rem; }
.post-card p { font-size: 0.9rem; color: var(--muted); line-height: 1.85; }
.post-card .read-more {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
}

/* notice */

.notice {
  margin-top: 4rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.4rem 1.6rem;
  font-size: 0.86rem;
  color: var(--muted);
}
.notice strong { color: var(--fg); font-weight: 600; }

/* ---------- article ---------- */

article.article { padding-top: 2.8rem; }

article.article > * + * { margin-top: 1.1rem; }

article.article h2 {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-top: 2.8rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

article.article h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-top: 2rem;
}

article.article ul, article.article ol { padding-left: 1.5rem; }
article.article li { margin: 0.4rem 0; }
article.article li ul { margin-top: 0.4rem; }
article.article strong { font-weight: 700; }

.article-nav {
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.88rem;
}

/* ---------- footer ---------- */

footer.site-footer {
  background: var(--hero-bg);
  color: var(--hero-muted);
  padding: 2.6rem 0 3rem;
  font-size: 0.82rem;
}
footer.site-footer .container {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
footer.site-footer a { color: var(--hero-muted); }
footer.site-footer a:hover { color: var(--hero-fg); }
footer.site-footer .foot-links { display: flex; gap: 1.4rem; flex-wrap: wrap; }

/* ---------- author card / x link ---------- */

.author-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1rem 1.2rem;
  box-shadow: var(--card-shadow);
  margin-bottom: 2rem;
}
.author-avatar {
  width: 62px;
  height: 62px;
  border-radius: 12px;
  image-rendering: pixelated;
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.author-name { font-weight: 700; letter-spacing: -0.01em; }
.author-meta { font-size: 0.85rem; color: var(--muted); }
.author-meta a { color: var(--accent); }

/* ---------- opt-in (mailing list CTA) ---------- */

.optin-wrap { margin-top: 3rem; }

.optin {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2.1rem 1.8rem;
  box-shadow: var(--card-shadow);
  overflow: hidden;
  text-align: center;
}
.optin::before {
  content: "";
  position: absolute;
  left: 0; top: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, #5eead4, #60a5fa, #a78bfa);
}
.optin-eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 0.25rem 0.85rem;
  margin-bottom: 0.9rem;
}
.optin-title { font-size: 1.4rem; font-weight: 700; letter-spacing: -0.015em; margin-bottom: 0.35rem; }
.optin-sub { color: var(--fg); font-weight: 600; font-size: 1rem; margin-bottom: 0.7rem; }
.optin-tagline { color: var(--accent); font-weight: 600; font-size: 1rem; margin-bottom: 1.4rem; }
.optin-desc { color: var(--muted); font-size: 0.9rem; max-width: 520px; margin: 0 auto 1.5rem; line-height: 1.85; }
.optin-btn {
  display: inline-block;
  background: #2563eb;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.98rem;
  padding: 0.85rem 1.9rem;
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.optin-btn:hover { text-decoration: none; color: #fff; transform: translateY(-1px); box-shadow: 0 10px 26px rgba(37, 99, 235, 0.38); }
.optin-btn-lg { font-size: 1.05rem; padding: 1rem 2.2rem; }
.optin-note {
  margin-top: 1.5rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.75;
}
.optin-note p { margin: 0; }
.optin-legal { margin-top: 1.1rem; font-size: 0.78rem; color: var(--muted); }
.optin-legal a { color: var(--accent); }

/* ---------- checklist (lead magnet) ---------- */

.checklist { list-style: none; padding: 0; counter-reset: ci; margin-top: 1rem; }
.checklist li {
  position: relative;
  padding: 1rem 0 1rem 2.6rem;
  border-bottom: 1px solid var(--border);
}
.checklist li::before {
  counter-increment: ci;
  content: counter(ci);
  position: absolute;
  left: 0;
  top: 1rem;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 7px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.checklist strong { display: block; margin-bottom: 0.2rem; letter-spacing: -0.01em; }
.checklist p { margin: 0; color: var(--muted); font-size: 0.9rem; line-height: 1.8; }
