/* ========== リセット & ベース ========== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --color-bg: #fafafa;
    --color-surface: #ffffff;
    --color-primary: #2563eb;
    --color-primary-dark: #1d4ed8;
    --color-text: #1a1a2e;
    --color-text-muted: #6b7280;
    --color-border: #e5e7eb;
    --color-accent: #eff6ff;
    --font-sans: "Hiragino Kaku Gothic ProN", "Noto Sans JP", system-ui, sans-serif;
    --font-serif: "Hiragino Mincho ProN", "Noto Serif JP", Georgia, serif;
    --max-width: 860px;
    --radius: 10px;
}

body {
    font-family: var(--font-sans);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--color-primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ========== ヘッダー ========== */
.site-header {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    padding: 14px 24px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: var(--color-text-muted);
    max-width: var(--max-width);
    margin: 0 auto;
}

.breadcrumb span {
    color: var(--color-border);
}

.breadcrumb a {
    color: var(--color-text-muted);
    font-weight: 500;
}

.breadcrumb a:hover {
    color: var(--color-primary);
    text-decoration: none;
}

/* ========== フッター ========== */
.site-footer {
    margin-top: auto;
    padding: 28px 24px;
    border-top: 1px solid var(--color-border);
    text-align: center;
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

/* ========== ブログ一覧ページ ========== */
.blog-hero {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    padding: 48px 24px 40px;
    text-align: center;
}

.blog-hero h1 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.blog-hero p {
    margin-top: 8px;
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

.blog-list-wrapper {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 40px 24px 64px;
    flex: 1;
}

.post-grid {
    display: grid;
    gap: 24px;
}

/* -------- カード -------- */
.post-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s, border-color 0.2s;
    text-decoration: none;
    color: inherit;
}

.post-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border-color: var(--color-primary);
    text-decoration: none;
}

.post-card-thumb {
    width: 100%;
    aspect-ratio: 16 / 7;
    object-fit: cover;
    display: block;
}

.post-card-body {
    padding: 20px 24px 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-bottom: 10px;
}

.post-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 10px;
}

.post-card-excerpt {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card-more {
    margin-top: 16px;
    font-size: 0.85rem;
    color: var(--color-primary);
    font-weight: 600;
}

/* 空状態 */
.empty-state {
    text-align: center;
    padding: 80px 0;
    color: var(--color-text-muted);
}

.empty-state p {
    margin-top: 8px;
    font-size: 0.9rem;
}

/* ========== 記事ページ ========== */
.post-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 48px 24px 80px;
    flex: 1;
    width: 100%;
}

.post {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    padding: 28px 40px 0;
}

.post-author {
    background: var(--color-accent);
    color: var(--color-primary);
    padding: 2px 10px;
    border-radius: 20px;
    font-weight: 600;
}

.post-title {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.35;
    letter-spacing: -0.02em;
    padding: 16px 40px 28px;
}

.post-thumbnail {
    margin: 0 0 8px;
}

.post-thumbnail img {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    display: block;
}

/* 本文 */
.post-body {
    padding: 36px 40px 48px;
    font-size: 1rem;
    line-height: 1.85;
}

.post-body h2 {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 2.5em 0 0.8em;
    padding-bottom: 6px;
    border-bottom: 2px solid var(--color-border);
}

.post-body h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 2em 0 0.6em;
    color: var(--color-primary-dark);
}

.post-body p {
    margin-bottom: 1.2em;
}

.post-body ul, .post-body ol {
    margin: 0.8em 0 1.2em 1.5em;
}

.post-body li {
    margin-bottom: 0.4em;
}

.post-body img {
    max-width: 100%;
    border-radius: 6px;
    margin: 1.5em 0;
    display: block;
}

.post-body strong {
    font-weight: 700;
}

.post-body a {
    color: var(--color-primary);
    border-bottom: 1px solid currentColor;
}

.post-body blockquote {
    border-left: 4px solid var(--color-primary);
    padding: 10px 20px;
    margin: 1.5em 0;
    color: var(--color-text-muted);
    background: var(--color-accent);
    border-radius: 0 6px 6px 0;
}

.post-body code {
    background: #f3f4f6;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
    font-family: "SF Mono", Consolas, monospace;
}

.post-body pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 20px 24px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.5em 0;
}

.post-body pre code {
    background: none;
    padding: 0;
    font-size: 0.88em;
    color: inherit;
}

.post-body hr {
    border: none;
    border-top: 1px solid var(--color-border);
    margin: 2.5em 0;
}

/* ========== レスポンシブ ========== */
@media (max-width: 640px) {
    .blog-hero h1 { font-size: 1.5rem; }
    .post-title { font-size: 1.35rem; padding: 16px 24px 20px; }
    .post-meta { padding: 20px 24px 0; }
    .post-body { padding: 24px 24px 36px; }
}
