/*
Theme Name:  Yuzumi AI Blog
Description: AI・副業・IT系カジュアルブログテーマ
Author:      Yuzumi
Version:     1.0.0
*/

/* ── Google Fonts ── */
@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700;900&display=swap");

/* ── Design Tokens ── */
:root {
  --pri:    #7c3aed;
  --pri2:   #6d28d9;
  --acc:    #f97316;
  --acc2:   #ea580c;
  --dark:   #0f172a;
  --dark2:  #1e1b4b;
  --tx:     #1e293b;
  --mu:     #64748b;
  --bg:     #f8fafc;
  --cd:     #ffffff;
  --bd:     #e2e8f0;
  --r:      12px;
  --rs:     8px;
  --rp:     999px;
  --sh:     0 1px 4px rgba(0,0,0,.08), 0 6px 20px rgba(0,0,0,.06);
  --shh:    0 4px 12px rgba(0,0,0,.12), 0 16px 40px rgba(0,0,0,.10);
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  background: var(--bg);
  color: var(--tx);
  font-size: 15px;
  line-height: 1.8;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--pri); text-decoration: none; transition: color .2s; }
a:hover { color: var(--acc); }

/* ── Layout ── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.site-wrapper {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 20px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 28px;
  align-items: start;
}
@media (max-width: 860px) { .site-wrapper { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .site-wrapper { padding: 16px; } }

/* ── Header ── */
.site-header {
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark2) 100%);
  position: sticky;
  top: 0;
  z-index: 999;
  box-shadow: 0 2px 20px rgba(0,0,0,.4);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.site-logo a {
  font-size: 1.25rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: -.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.site-logo a::before {
  content: "⚡";
  font-size: 1.1rem;
}
.site-nav ul {
  list-style: none;
  display: flex;
  gap: 4px;
}
.site-nav ul li a {
  color: rgba(255,255,255,.75);
  font-size: .85rem;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: var(--rs);
  display: block;
  transition: all .2s;
}
.site-nav ul li a:hover {
  color: #fff;
  background: rgba(124,58,237,.4);
}
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}
.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
}
@media (max-width: 640px) {
  .menu-toggle { display: flex; }
  .site-nav { display: none; position: absolute; top: 64px; left: 0; right: 0; background: var(--dark); padding: 12px 20px; }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; gap: 2px; }
}

/* ── Hero ── */
.hero {
  background: linear-gradient(135deg, var(--dark) 0%, #2d1b69 50%, #1e3a5f 100%);
  padding: 72px 20px 60px;
  position: relative;
  overflow: hidden;
  text-align: center;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 80%, rgba(124,58,237,.25) 0%, transparent 60%),
              radial-gradient(ellipse at 70% 20%, rgba(249,115,22,.15) 0%, transparent 50%);
}
.hero-inner { position: relative; max-width: 720px; margin: 0 auto; }
.hero-badge {
  display: inline-block;
  background: rgba(124,58,237,.3);
  color: #c4b5fd;
  border: 1px solid rgba(124,58,237,.5);
  padding: 5px 18px;
  border-radius: var(--rp);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .1em;
  margin-bottom: 20px;
}
.hero-title {
  font-size: clamp(2rem, 6vw, 3.2rem);
  font-weight: 900;
  color: #fff;
  line-height: 1.2;
  letter-spacing: -.5px;
  margin-bottom: 16px;
}
.hero-title em {
  font-style: normal;
  background: linear-gradient(135deg, #a78bfa, var(--acc));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-desc {
  font-size: 1rem;
  color: rgba(255,255,255,.7);
  line-height: 1.8;
  margin-bottom: 32px;
}
.hero-btns {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--pri), var(--acc));
  color: #fff;
  padding: 13px 30px;
  border-radius: var(--rp);
  font-weight: 700;
  font-size: .95rem;
  transition: all .2s;
  box-shadow: 0 4px 20px rgba(124,58,237,.4);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(124,58,237,.5);
  color: #fff;
}
.btn-outline {
  border: 2px solid rgba(255,255,255,.4);
  color: rgba(255,255,255,.85);
  padding: 11px 28px;
  border-radius: var(--rp);
  font-weight: 700;
  font-size: .95rem;
  transition: all .2s;
}
.btn-outline:hover {
  border-color: #fff;
  color: #fff;
  background: rgba(255,255,255,.1);
}

/* ── Category Pills ── */
.category-bar {
  background: var(--cd);
  border-bottom: 1px solid var(--bd);
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
}
.category-bar .container {
  display: flex;
  gap: 8px;
  padding: 12px 20px;
}
.cat-pill {
  display: inline-block;
  padding: 6px 16px;
  border-radius: var(--rp);
  font-size: .8rem;
  font-weight: 700;
  color: var(--mu);
  background: var(--bg);
  border: 1px solid var(--bd);
  white-space: nowrap;
  transition: all .2s;
  cursor: pointer;
}
.cat-pill:hover, .cat-pill.active {
  background: var(--pri);
  color: #fff;
  border-color: var(--pri);
}

/* ── Section Heading ── */
.section-title {
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--tx);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}
.section-title::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 1.1em;
  background: linear-gradient(135deg, var(--pri), var(--acc));
  border-radius: 4px;
}

/* ── Post Grid ── */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.post-card {
  background: var(--cd);
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: var(--sh);
  transition: transform .25s, box-shadow .25s;
  border: 1px solid var(--bd);
  display: flex;
  flex-direction: column;
}
.post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shh);
}
.post-card-thumb {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: linear-gradient(135deg, var(--dark2), var(--pri2));
}
.post-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s;
}
.post-card:hover .post-card-thumb img { transform: scale(1.05); }
.post-card-thumb .no-thumb {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  opacity: .4;
}
.post-card-body {
  padding: 18px 20px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.post-cat-badge {
  display: inline-block;
  background: rgba(124,58,237,.1);
  color: var(--pri);
  font-size: .72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--rp);
  margin-bottom: 8px;
}
.post-card-title {
  font-size: .97rem;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 8px;
  flex: 1;
}
.post-card-title a { color: var(--tx); }
.post-card-title a:hover { color: var(--pri); }
.post-card-excerpt {
  font-size: .82rem;
  color: var(--mu);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 14px;
}
.post-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .75rem;
  color: var(--mu);
}
.post-card-meta .date::before { content: "📅 "; }
.post-card-more {
  display: inline-block;
  background: var(--pri);
  color: #fff;
  font-size: .78rem;
  font-weight: 700;
  padding: 7px 16px;
  border-radius: var(--rp);
  margin-top: 12px;
  align-self: flex-start;
  transition: all .2s;
}
.post-card-more:hover {
  background: var(--acc);
  color: #fff;
  transform: translateX(2px);
}

/* ── Pagination ── */
.pagination {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 36px 0;
  flex-wrap: wrap;
}
.pagination a, .pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--rs);
  font-size: .88rem;
  font-weight: 700;
  border: 1px solid var(--bd);
  background: var(--cd);
  color: var(--tx);
  transition: all .2s;
}
.pagination a:hover, .pagination .current {
  background: var(--pri);
  border-color: var(--pri);
  color: #fff;
}

/* ── Sidebar ── */
.sidebar-widget {
  background: var(--cd);
  border-radius: var(--r);
  padding: 22px;
  margin-bottom: 20px;
  box-shadow: var(--sh);
  border: 1px solid var(--bd);
}
.widget-title {
  font-size: .9rem;
  font-weight: 900;
  color: var(--tx);
  border-left: 4px solid var(--pri);
  padding-left: 10px;
  margin-bottom: 16px;
}
.sidebar-post-list { list-style: none; }
.sidebar-post-list li {
  padding: 8px 0;
  border-bottom: 1px solid var(--bd);
  font-size: .85rem;
}
.sidebar-post-list li:last-child { border-bottom: none; }
.sidebar-post-list a { color: var(--tx); font-weight: 600; }
.sidebar-post-list a:hover { color: var(--pri); }
.sidebar-cat-list { list-style: none; }
.sidebar-cat-list li {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid var(--bd);
  font-size: .85rem;
}
.sidebar-cat-list li:last-child { border-bottom: none; }
.sidebar-cat-list a { color: var(--tx); }
.sidebar-cat-list a:hover { color: var(--pri); }
.sidebar-cat-list .count {
  background: var(--bg);
  color: var(--mu);
  font-size: .72rem;
  padding: 2px 8px;
  border-radius: var(--rp);
}
.sidebar-tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; }
.sidebar-tag-cloud a {
  background: var(--bg);
  color: var(--mu);
  font-size: .78rem;
  padding: 4px 12px;
  border-radius: var(--rp);
  border: 1px solid var(--bd);
  transition: all .2s;
}
.sidebar-tag-cloud a:hover {
  background: var(--pri);
  color: #fff;
  border-color: var(--pri);
}

/* ── Single Post ── */
.single-wrap { max-width: 780px; }
.entry-header { margin-bottom: 28px; }
.entry-cats { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.entry-cat {
  display: inline-block;
  background: rgba(124,58,237,.1);
  color: var(--pri);
  font-size: .75rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--rp);
}
.entry-title {
  font-size: clamp(1.4rem, 4vw, 2rem);
  font-weight: 900;
  line-height: 1.3;
  color: var(--dark);
  margin-bottom: 12px;
}
.entry-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: .8rem;
  color: var(--mu);
  flex-wrap: wrap;
}
.entry-thumb {
  border-radius: var(--r);
  overflow: hidden;
  margin-bottom: 32px;
  box-shadow: var(--sh);
}
.entry-thumb img { width: 100%; max-height: 420px; object-fit: cover; }

/* Article content */
.entry-content { font-size: .97rem; line-height: 1.9; }
.entry-content h2 {
  font-size: 1.15rem;
  font-weight: 900;
  border-left: 5px solid var(--pri);
  padding-left: 14px;
  margin: 36px 0 14px;
  color: var(--dark);
}
.entry-content h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 24px 0 10px;
  color: var(--tx);
}
.entry-content p { margin-bottom: 16px; color: var(--tx); }
.entry-content ul, .entry-content ol {
  padding-left: 1.5rem;
  margin-bottom: 16px;
}
.entry-content li { margin-bottom: 4px; }
.entry-content a { color: var(--pri); text-decoration: underline; }
.entry-content img {
  border-radius: var(--rs);
  box-shadow: var(--sh);
  margin: 16px 0;
}
.entry-content blockquote {
  border-left: 4px solid var(--pri);
  padding: 12px 20px;
  background: rgba(124,58,237,.05);
  border-radius: 0 var(--rs) var(--rs) 0;
  margin: 16px 0;
  color: var(--mu);
}
.entry-content code {
  background: var(--dark);
  color: #a78bfa;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: .88em;
}
.entry-content pre {
  background: var(--dark);
  color: #e2e8f0;
  padding: 20px;
  border-radius: var(--rs);
  overflow-x: auto;
  margin: 16px 0;
  font-size: .88rem;
}
.entry-content pre code { background: none; color: inherit; padding: 0; }

/* Post tags */
.post-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 32px; }
.post-tags a {
  background: var(--bg);
  color: var(--mu);
  font-size: .78rem;
  padding: 5px 14px;
  border-radius: var(--rp);
  border: 1px solid var(--bd);
  transition: all .2s;
}
.post-tags a::before { content: "#"; }
.post-tags a:hover {
  background: var(--pri);
  color: #fff;
  border-color: var(--pri);
}

/* Post nav */
.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 40px;
}
.post-nav a {
  display: block;
  padding: 18px;
  background: var(--cd);
  border: 1px solid var(--bd);
  border-radius: var(--r);
  color: var(--tx);
  font-size: .88rem;
  font-weight: 700;
  transition: all .2s;
  box-shadow: var(--sh);
}
.post-nav a:hover {
  border-color: var(--pri);
  color: var(--pri);
}
.post-nav .nav-prev { text-align: left; }
.post-nav .nav-next { text-align: right; }
.post-nav .nav-label {
  display: block;
  font-size: .72rem;
  color: var(--mu);
  margin-bottom: 4px;
  font-weight: 400;
}
@media (max-width: 500px) { .post-nav { grid-template-columns: 1fr; } }

/* ── Footer ── */
.site-footer {
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark2) 100%);
  margin-top: 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 32px;
  padding: 52px 20px 32px;
  max-width: 1100px;
  margin: 0 auto;
}
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 460px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand { }
.footer-logo {
  font-size: 1.2rem;
  font-weight: 900;
  color: #fff;
  margin-bottom: 8px;
}
.footer-logo::before { content: "⚡ "; }
.footer-tagline {
  font-size: .82rem;
  color: rgba(255,255,255,.4);
  line-height: 1.7;
}
.footer-col-title {
  font-size: .82rem;
  font-weight: 700;
  color: var(--acc);
  letter-spacing: .06em;
  margin-bottom: 12px;
  text-transform: uppercase;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 6px; }
.footer-col ul li a {
  font-size: .82rem;
  color: rgba(255,255,255,.45);
  transition: color .2s;
}
.footer-col ul li a:hover { color: rgba(255,255,255,.85); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 16px 20px;
  text-align: center;
  font-size: .75rem;
  color: rgba(255,255,255,.25);
  max-width: 1100px;
  margin: 0 auto;
}

/* ── Search form ── */
.search-form {
  display: flex;
  gap: 8px;
}
.search-form input[type="search"] {
  flex: 1;
  padding: 9px 14px;
  border: 1.5px solid var(--bd);
  border-radius: var(--rs);
  font-size: .88rem;
  outline: none;
  transition: border-color .2s;
  font-family: inherit;
}
.search-form input:focus { border-color: var(--pri); }
.search-form button {
  background: var(--pri);
  color: #fff;
  border: none;
  padding: 9px 16px;
  border-radius: var(--rs);
  font-weight: 700;
  cursor: pointer;
  font-size: .88rem;
  transition: background .2s;
}
.search-form button:hover { background: var(--acc); }

/* ── Breadcrumb ── */
.breadcrumb {
  font-size: .78rem;
  color: var(--mu);
  padding: 10px 0;
  margin-bottom: 8px;
}
.breadcrumb a { color: var(--mu); }
.breadcrumb a:hover { color: var(--pri); }
.breadcrumb span { margin: 0 6px; }

/* ── 404 / No posts ── */
.not-found-wrap {
  text-align: center;
  padding: 80px 20px;
}
.not-found-icon { font-size: 4rem; margin-bottom: 16px; }
.not-found-title {
  font-size: 2rem;
  font-weight: 900;
  color: var(--dark);
  margin-bottom: 10px;
}
.not-found-text { color: var(--mu); margin-bottom: 24px; }

/* ── WordPress widgets & blocks ── */
.wp-block-latest-posts__list { list-style: none; padding: 0; }
.wp-block-latest-posts__list li { padding: 7px 0; border-bottom: 1px solid var(--bd); font-size: .85rem; }
.wp-block-latest-posts__post-title { color: var(--tx); font-weight: 600; }
.wp-block-latest-posts__post-title:hover { color: var(--pri); }
.wp-block-categories-list, .wp-block-archives-list { list-style: none; padding: 0; }
.wp-block-categories-list li, .wp-block-archives-list li {
  padding: 6px 0;
  border-bottom: 1px solid var(--bd);
  font-size: .85rem;
}
.wp-block-search__input {
  border: 1.5px solid var(--bd);
  border-radius: var(--rs);
  padding: 9px 13px;
  width: 100%;
  font-size: .88rem;
  font-family: inherit;
}
.wp-block-search__button {
  background: var(--pri);
  color: #fff;
  border: none;
  padding: 9px 16px;
  border-radius: var(--rs);
  font-weight: 700;
  cursor: pointer;
}
