/* =============================================
   blog.css — ブログ・Notionブロック共通スタイル
   ============================================= */

/* --------- ページ基本 --------- */
.blog-body {
    background: #0d0d0f;
    color: #e0e0e0;
    font-family: 'Inter', 'Noto Sans JP', sans-serif;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

/* --------- ヘッダー --------- */
.blog-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(13,13,15,.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.blog-header-inner {
    max-width: 900px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.blog-logo {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    letter-spacing: .05em;
}
.blog-nav { display: flex; gap: 20px; }
.blog-nav a {
    font-size: .88rem;
    color: #9ca3af;
    text-decoration: none;
    transition: color .2s;
}
.blog-nav a:hover, .blog-nav a.active { color: #c4b5fd; }

/* --------- メイン --------- */
.blog-main {
    max-width: 900px;
    margin: 0 auto;
    padding: 48px 24px 80px;
    min-height: 60vh;
}

/* --------- ブログ一覧ヘッダー --------- */
.blog-list-header { margin-bottom: 40px; }
.blog-title {
    font-size: 2.8rem;
    font-weight: 700;
    margin: 0 0 8px;
    background: linear-gradient(135deg, #c4b5fd, #93c5fd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.blog-subtitle { color: #6b7280; font-size: .95rem; margin: 0; }

/* --------- ローディング / エラー --------- */
.blog-loading, .article-loading {
    text-align: center;
    padding: 60px 0;
    color: #6b7280;
}
.loading-spinner {
    width: 36px; height: 36px;
    border: 3px solid rgba(196,181,253,.2);
    border-top-color: #c4b5fd;
    border-radius: 50%;
    animation: spin .8s linear infinite;
    margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.blog-error, .article-error {
    background: rgba(239,68,68,.1);
    border: 1px solid rgba(239,68,68,.3);
    color: #fca5a5;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    font-size: .9rem;
}
.blog-empty {
    text-align: center;
    padding: 60px 0;
    color: #6b7280;
    font-size: .95rem;
}
.blog-empty a { color: #c4b5fd; }

/* --------- 記事カードグリッド --------- */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}
.article-card {
    display: flex;
    flex-direction: column;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform .25s, box-shadow .25s, border-color .25s;
}
.article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,.4);
    border-color: rgba(196,181,253,.3);
}
.article-card-cover {
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: rgba(196,181,253,.08);
}
.article-card-cover img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .4s;
}
.article-card:hover .article-card-cover img { transform: scale(1.05); }
.article-card-no-cover {
    width: 100%; height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: rgba(196,181,253,.4);
}
.article-card-body { padding: 16px; flex: 1; }
.article-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: #f3f4f6;
    margin: 0 0 10px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.article-card-meta { display: flex; flex-direction: column; gap: 6px; }
.article-card-meta time { font-size: .78rem; color: #6b7280; }
.article-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.tag {
    font-size: .72rem;
    padding: 2px 8px;
    background: rgba(196,181,253,.15);
    color: #c4b5fd;
    border-radius: 20px;
}

/* --------- 個別記事 --------- */
.article-container { max-width: 720px; margin: 0 auto; }
.article-cover {
    width: 100%;
    max-height: 360px;
    overflow: hidden;
    border-radius: 16px;
    margin-bottom: 32px;
}
.article-cover img { width: 100%; height: 100%; object-fit: cover; }
.article-header { margin-bottom: 36px; }
.article-icon { font-size: 2.5rem; margin-bottom: 12px; }
.article-title {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.4;
    color: #f9fafb;
    margin: 0 0 14px;
}
.article-meta {
    display: flex;
    gap: 16px;
    font-size: .82rem;
    color: #6b7280;
}
.article-footer {
    margin-top: 60px;
    padding-top: 24px;
    border-top: 1px solid rgba(255,255,255,.08);
}
.back-link {
    color: #c4b5fd;
    text-decoration: none;
    font-size: .9rem;
    font-weight: 500;
}
.back-link:hover { text-decoration: underline; }

/* =============================================
   Notionブロック スタイル
   ============================================= */
.notion-content {
    font-size: 1rem;
    line-height: 1.85;
    color: #d1d5db;
}
.notion-content p { margin: 0 0 1em; }
.notion-content p:last-child { margin-bottom: 0; }

/* 見出し */
.notion-content .notion-h1 {
    font-size: 1.6rem;
    font-weight: 700;
    color: #f9fafb;
    margin: 2em 0 .6em;
    border-bottom: 1px solid rgba(255,255,255,.1);
    padding-bottom: .4em;
}
.notion-content .notion-h2 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #f3f4f6;
    margin: 1.8em 0 .5em;
}
.notion-content .notion-h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #e5e7eb;
    margin: 1.5em 0 .4em;
}

/* リスト */
.notion-content .notion-list {
    margin: .5em 0 1em 1.5em;
    padding: 0;
}
.notion-content .notion-list li { margin-bottom: .4em; }

/* 引用 */
.notion-content .notion-quote {
    border-left: 4px solid #c4b5fd;
    padding: 10px 18px;
    margin: 1.2em 0;
    background: rgba(196,181,253,.06);
    border-radius: 0 8px 8px 0;
    color: #c4b5fd;
    font-style: italic;
}

/* コールアウト */
.notion-content .notion-callout {
    display: flex;
    gap: 12px;
    padding: 14px 16px;
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 8px;
    margin: 1.2em 0;
    align-items: flex-start;
}
.notion-content .notion-callout-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
    margin-top: 2px;
}

/* コード */
.notion-content .notion-code {
    background: #1a1a2e;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 8px;
    padding: 16px 20px;
    margin: 1.2em 0;
    overflow-x: auto;
    font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    font-size: .85rem;
    line-height: 1.6;
}
.notion-content code {
    background: rgba(196,181,253,.12);
    color: #c4b5fd;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: .88em;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
}
.notion-content .notion-code code {
    background: none;
    color: #cdd6f4;
    padding: 0;
}

/* 画像 */
.notion-content .notion-image {
    margin: 1.5em 0;
    text-align: center;
}
.notion-content .notion-image img {
    max-width: 100%;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,.3);
}
.notion-content .notion-image figcaption {
    font-size: .8rem;
    color: #6b7280;
    margin-top: 8px;
}

/* 区切り */
.notion-content .notion-divider {
    border: none;
    border-top: 1px solid rgba(255,255,255,.1);
    margin: 2em 0;
}

/* トグル */
.notion-content .notion-toggle {
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 8px;
    padding: 4px 0;
    margin: .8em 0;
}
.notion-content .notion-toggle summary {
    padding: 10px 16px;
    cursor: pointer;
    font-weight: 500;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
}
.notion-content .notion-toggle summary::before {
    content: '▶';
    font-size: .7rem;
    transition: transform .2s;
    color: #6b7280;
}
.notion-content .notion-toggle[open] summary::before { transform: rotate(90deg); }
.notion-content .notion-toggle > div {
    padding: 4px 16px 12px 36px;
}

/* リンク */
.notion-content a {
    color: #93c5fd;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.notion-content a:hover { color: #c4b5fd; }

/* 強調 */
.notion-content strong { color: #f9fafb; font-weight: 600; }
.notion-content em { color: #d1d5db; font-style: italic; }
.notion-content del { color: #6b7280; }

/* =============================================
   引用ボックス（notion-embed.js 用）
   インラインにどこにでも埋め込み可能
   ============================================= */
.notion-quote-block {
    border: 1px solid rgba(196,181,253,.25);
    border-radius: 14px;
    padding: 24px 28px;
    margin: 1.5em 0;
    background: rgba(196,181,253,.04);
    position: relative;
}
.notion-quote-block::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 4px; height: 100%;
    background: linear-gradient(180deg, #c4b5fd, #93c5fd);
    border-radius: 4px 0 0 4px;
}
.notion-quote-block .notion-block-title {
    font-size: .78rem;
    font-weight: 600;
    color: #c4b5fd;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.notion-quote-block .notion-block-title::before {
    content: '';
    display: inline-block;
    width: 6px; height: 6px;
    background: #c4b5fd;
    border-radius: 50%;
}
.notion-quote-block-loading {
    text-align: center;
    padding: 20px;
    color: #6b7280;
    font-size: .85rem;
}
.notion-quote-block-error {
    color: #fca5a5;
    font-size: .85rem;
    padding: 8px 0;
}

/* --------- フッター --------- */
.blog-footer {
    text-align: center;
    padding: 32px 24px;
    border-top: 1px solid rgba(255,255,255,.06);
    color: #4b5563;
    font-size: .82rem;
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: center;
}
.blog-footer a { color: #6b7280; text-decoration: none; }
.blog-footer a:hover { color: #c4b5fd; }

/* --------- レスポンシブ --------- */
@media (max-width: 640px) {
    .blog-title { font-size: 2rem; }
    .article-title { font-size: 1.5rem; }
    .articles-grid { grid-template-columns: 1fr; }
    .blog-main { padding: 32px 16px 60px; }
}
