/*
Theme Name: SAITAS Blog Theme
Theme URI: https://timereign.com/saitas/
Author: SAITAS
Author URI: https://timereign.com/saitas/
Description: SAITASサイト用のシンプルなブログテーマ。トップページと統一されたナビゲーション付き。
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: saitas
*/

/* ========================================
   リセット & 基本設定
======================================== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --blue: #0066ff;
  --blue-dim: #004ecc;
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --text-3: #aeaeb2;
  --bg: #ffffff;
  --bg-2: #f5f5f7;
  --border: rgba(0,0,0,.1);
  --en: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --jp: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--jp);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--blue);
  text-decoration: none;
  transition: opacity .2s;
}

a:hover {
  opacity: .7;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ========================================
   ナビゲーション
======================================== */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 999;
  height: 48px;
  background: rgba(255,255,255,.8);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0,0,0,.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}

.nav-logo {
  text-decoration: none;
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.nav-logo-mark {
  font-family: var(--en);
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: .5px;
  line-height: 1;
}

.nav-logo-plus {
  color: var(--blue);
  font-size: 22px;
  font-weight: 300;
  line-height: 1;
  vertical-align: -2px;
}

.nav-logo-reading {
  font-family: var(--jp);
  font-size: 10px;
  font-weight: 300;
  color: var(--text-3);
  letter-spacing: 2px;
  padding-bottom: 1px;
}

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-family: var(--en);
  font-size: 13px;
  color: var(--text-2);
  text-decoration: none;
  transition: color .2s;
  font-weight: 400;
}

.nav-links a:hover {
  color: var(--text);
  opacity: 1;
}

.nav-cta {
  color: var(--blue) !important;
  font-weight: 500 !important;
}

.nav-line {
  font-family: var(--en);
  font-size: 12px;
  font-weight: 600;
  color: #fff !important;
  background: #06C755;
  padding: 7px 14px;
  border-radius: 100px;
  transition: opacity .2s;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.nav-line svg {
  width: 14px;
  height: 14px;
  fill: white;
}

.nav-line:hover {
  opacity: .85;
}

/* ナビゲーション分のスペース */
.nav-spacer {
  height: 48px;
}

/* ========================================
   コンテナ
======================================== */
.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
}

.wide-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ========================================
   記事ページ
======================================== */
.article-header {
  padding: 64px 0 32px;
  text-align: center;
}

.article-category {
  font-family: var(--en);
  font-size: 11px;
  font-weight: 600;
  color: var(--blue);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.article-title {
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
  margin-bottom: 24px;
}

.article-meta {
  font-family: var(--en);
  font-size: 13px;
  color: var(--text-2);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.article-content {
  padding: 32px 0 80px;
}

.article-content h2 {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text);
  margin: 48px 0 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--bg-2);
}

.article-content h3 {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
  margin: 40px 0 20px;
}

.article-content h4 {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
  margin: 32px 0 16px;
}

.article-content p {
  margin-bottom: 24px;
  line-height: 1.8;
}

.article-content ul,
.article-content ol {
  margin: 24px 0;
  padding-left: 24px;
}

.article-content li {
  margin-bottom: 12px;
  line-height: 1.8;
}

.article-content blockquote {
  margin: 32px 0;
  padding: 20px 24px;
  background: var(--bg-2);
  border-left: 4px solid var(--blue);
  color: var(--text-2);
  font-style: italic;
}

.article-content img {
  margin: 32px 0;
  border-radius: 8px;
}

.article-content pre {
  margin: 24px 0;
  padding: 20px;
  background: #1e1e1e;
  color: #d4d4d4;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.6;
}

.article-content code {
  background: var(--bg-2);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 14px;
  font-family: 'Consolas', 'Monaco', monospace;
}

.article-content pre code {
  background: transparent;
  padding: 0;
}

.article-content table {
  width: 100%;
  margin: 32px 0;
  border-collapse: collapse;
  border: 1px solid var(--border);
}

.article-content th,
.article-content td {
  padding: 12px 16px;
  text-align: left;
  border: 1px solid var(--border);
}

.article-content th {
  background: var(--bg-2);
  font-weight: 600;
}

/* ========================================
   記事一覧
======================================== */
.archive-header {
  padding: 80px 0 40px;
  text-align: center;
}

.archive-title {
  font-size: 36px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
}

.archive-description {
  font-size: 16px;
  color: var(--text-2);
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 32px;
  padding: 40px 0 80px;
}

.post-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
  text-decoration: none;
  display: block;
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,.08);
  opacity: 1;
}

.post-thumbnail {
  width: 100%;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, #e8f0ff, #c7d9ff);
  overflow: hidden;
  position: relative;
}

.post-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-body {
  padding: 24px;
}

.post-category {
  font-family: var(--en);
  font-size: 10px;
  font-weight: 600;
  color: var(--blue);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.post-title {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
  margin-bottom: 12px;
}

.post-excerpt {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-2);
  margin-bottom: 16px;
}

.post-meta {
  font-family: var(--en);
  font-size: 12px;
  color: var(--text-3);
}

/* ========================================
   ページネーション
======================================== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 40px 0 80px;
}

.pagination a,
.pagination span {
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: var(--en);
  font-size: 14px;
  color: var(--text);
  text-decoration: none;
  transition: all .2s;
}

.pagination a:hover {
  background: var(--bg-2);
  opacity: 1;
}

.pagination .current {
  background: var(--blue);
  color: white;
  border-color: var(--blue);
}

/* ========================================
   フッター
======================================== */
.site-footer {
  background: var(--bg-2);
  padding: 48px 0 24px;
  border-top: 1px solid var(--border);
}

.footer-content {
  text-align: center;
}

.footer-logo {
  font-family: var(--en);
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
}

.footer-description {
  font-size: 14px;
  color: var(--text-2);
  margin-bottom: 24px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 13px;
  color: var(--text-2);
}

.footer-copyright {
  font-family: var(--en);
  font-size: 12px;
  color: var(--text-3);
}

/* ========================================
   レスポンシブ
======================================== */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  
  .nav-line {
    font-size: 11px;
    padding: 6px 12px;
  }
  
  .article-title {
    font-size: 28px;
  }
  
  .posts-grid {
    grid-template-columns: 1fr;
  }
  
  .container,
  .wide-container {
    padding: 0 16px;
  }
}

@media (max-width: 480px) {
  .site-nav {
    padding: 0 16px;
  }
  
  .nav-logo-reading {
    display: none;
  }
  
  .article-content h2 {
    font-size: 24px;
  }
  
  .article-content h3 {
    font-size: 20px;
  }
}
