:root {
  --bg: #0f0f1a;
  --bg-alt: #1a1a2e;
  --card: #16213e;
  --accent: #e94560;
  --accent-2: #0f3460;
  --text: #eaeaea;
  --text-muted: #9aa0b4;
  --border: #2a2a4a;
  --radius: 12px;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 1.2rem;
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-radius: 8px;
  color: #fff;
  font-weight: 800;
}

.site-nav {
  display: flex;
  gap: 20px;
}

.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.site-nav a:hover {
  color: var(--accent);
}

/* Main */
.site-main {
  flex: 1;
}

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--accent-2), var(--bg-alt));
  padding: 80px 0;
  text-align: center;
}

.hero-eyebrow {
  color: var(--accent);
  font-size: 0.85rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 16px;
  background: linear-gradient(90deg, #fff, var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-sub {
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
  font-size: 1.05rem;
}

/* Sections */
.section-title {
  font-size: 1.6rem;
  font-weight: 700;
  margin: 40px 0 24px;
  padding-bottom: 8px;
  border-bottom: 3px solid var(--accent);
  display: inline-block;
}

/* Post grid */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 60px;
}

.post-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.post-card__date {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.post-card__title {
  font-size: 1.1rem;
  margin: 8px 0 12px;
}

.post-card__title a {
  color: var(--text);
  text-decoration: none;
}

.post-card__title a:hover {
  color: var(--accent);
}

.post-card__excerpt {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.post-card__cats {
  margin-top: 12px;
}

.category-badge {
  display: inline-block;
  background: var(--accent-2);
  color: #fff;
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 20px;
  margin-right: 6px;
}

/* Article */
.article {
  padding: 40px 0 60px;
}

.article-header {
  margin-bottom: 32px;
}

.article-meta {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 12px;
}

.article-category {
  color: var(--accent);
}

.article-title {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.4;
  margin-bottom: 16px;
}

.article-lead {
  color: var(--text-muted);
  font-size: 1.05rem;
}

.article-toc {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 32px;
}

.article-toc summary {
  font-weight: 700;
  cursor: pointer;
  margin-bottom: 8px;
}

.article-toc nav ul {
  list-style: none;
  padding-left: 0;
}

.article-toc nav ul ul {
  padding-left: 20px;
}

.article-toc nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  line-height: 2;
}

.article-toc nav a:hover {
  color: var(--accent);
}

.article-body {
  font-size: 1rem;
}

.article-body h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 40px 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent);
}

.article-body h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 28px 0 12px;
  color: var(--accent);
}

.article-body p {
  margin-bottom: 16px;
}

.article-body ul,
.article-body ol {
  margin: 0 0 16px 24px;
}

.article-body li {
  margin-bottom: 8px;
}

.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 0.9rem;
}

.article-body th,
.article-body td {
  border: 1px solid var(--border);
  padding: 10px 12px;
  text-align: left;
}

.article-body th {
  background: var(--bg-alt);
  font-weight: 700;
}

.article-body tr:nth-child(even) {
  background: var(--bg-alt);
}

.article-body strong {
  color: var(--accent);
}

.article-footer {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.category-link {
  color: var(--accent);
  text-decoration: none;
  margin-right: 8px;
}

.category-link:hover {
  text-decoration: underline;
}

/* List page */
.list-page {
  padding: 40px 0 60px;
}

.list-title {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 24px;
}

/* Footer */
.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 24px 0;
  text-align: center;
}

.footer-copy {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 8px;
}

.footer-note {
  color: var(--text-muted);
  font-size: 0.75rem;
}

/* Responsive */
@media (max-width: 768px) {
  .hero {
    padding: 60px 0;
  }

  .hero-title {
    font-size: 1.8rem;
  }

  .article-title {
    font-size: 1.5rem;
  }

  .site-nav {
    gap: 12px;
  }

  .site-nav a {
    font-size: 0.8rem;
  }
}