/*
Theme Name: ツン子ブログ
Theme URI: https://tsunko.tsundere-systems.com/
Author: Tsundere Systems
Description: ツン子の愚痴ブログ専用テーマ — Catppuccin × Cyberpunk Dark
Version: 1.0.0
*/

@import url('https://fonts.googleapis.com/css2?family=Kaisei+Tokumin:wght@400;700;800&family=Zen+Kaku+Gothic+New:wght@300;400;700&family=Share+Tech+Mono&display=swap');

:root {
  --bg: #0a0a0f;
  --bg2: #0f0f1a;
  --cyan: #22d3ee;
  --pink: #f472b6;
  --amber: #fbbf24;
  --green: #34d399;
  --red: #f87171;
  --glass: rgba(255,255,255,0.03);
  --glass-border: rgba(255,255,255,0.07);
}

* { box-sizing: border-box; margin: 0; padding: 0; scroll-behavior: smooth; }

body {
  background: var(--bg);
  font-family: 'Zen Kaku Gothic New', sans-serif;
  color: #e2e8f0;
  min-height: 100vh;
  overflow-x: hidden;
}

.display-font { font-family: 'Kaisei Tokumin', serif; }
.mono { font-family: 'Share Tech Mono', monospace; }

/* ノイズテクスチャ */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}

/* グリッド背景 */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(34,211,238,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34,211,238,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* ヘッダー */
.site-header {
  border-bottom: 1px solid rgba(244,114,182,0.15);
  background: rgba(10,10,15,0.95);
  backdrop-filter: blur(20px);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo-area { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, rgba(244,114,182,0.2), rgba(34,211,238,0.1));
  border: 1px solid rgba(244,114,182,0.3);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.logo-title { font-size: 14px; font-weight: 700; color: #f1f5f9; }
.logo-sub { font-size: 10px; color: rgba(244,114,182,0.7); font-family: 'Share Tech Mono', monospace; }
.back-link {
  font-size: 11px;
  color: #64748b;
  text-decoration: none;
  font-family: 'Share Tech Mono', monospace;
  border: 1px solid rgba(255,255,255,0.05);
  padding: 4px 10px;
  border-radius: 6px;
  transition: color 0.2s, border-color 0.2s;
}
.back-link:hover { color: var(--cyan); border-color: rgba(34,211,238,0.3); }

/* メインレイアウト */
.main-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  gap: 40px;
  padding: 40px 24px;
  position: relative;
  z-index: 10;
}

/* サイドナビ */
.side-nav {
  width: 280px;
  position: sticky;
  top: 100px;
  height: fit-content;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  padding-right: 10px;
}
.side-nav::-webkit-scrollbar { width: 3px; }
.side-nav::-webkit-scrollbar-track { background: transparent; }
.side-nav::-webkit-scrollbar-thumb { background: rgba(244,114,182,0.2); border-radius: 2px; }
.side-nav-title {
  font-size: 11px;
  font-family: 'Share Tech Mono', monospace;
  color: var(--pink);
  letter-spacing: 2px;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(244,114,182,0.2);
  padding-bottom: 8px;
}
.nav-item {
  display: block;
  font-size: 12px;
  color: #94a3b8;
  text-decoration: none;
  padding: 8px 12px;
  border-left: 2px solid transparent;
  transition: all 0.2s;
  margin-bottom: 4px;
  line-height: 1.4;
}
.nav-item:hover {
  background: rgba(255,255,255,0.03);
  color: var(--cyan);
  border-left-color: var(--cyan);
}

/* コンテンツエリア */
.content-main { flex: 1; max-width: 820px; }

/* ヒーロー */
.hero { margin-bottom: 60px; }
.hero-eyebrow {
  font-size: 11px;
  font-family: 'Share Tech Mono', monospace;
  color: rgba(244,114,182,0.7);
  letter-spacing: 3px;
  margin-bottom: 16px;
}
.hero-title {
  font-family: 'Kaisei Tokumin', serif;
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #f1f5f9 0%, rgba(244,114,182,0.9) 60%, rgba(34,211,238,0.8) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-desc {
  font-size: 14px;
  color: #64748b;
  font-family: 'Share Tech Mono', monospace;
  padding: 12px 16px;
  border-left: 2px solid rgba(244,114,182,0.3);
  background: rgba(244,114,182,0.03);
  border-radius: 0 6px 6px 0;
  line-height: 1.8;
}
.hero-desc em { color: rgba(244,114,182,0.8); font-style: normal; }

/* カテゴリタグ */
.tag {
  display: inline-block;
  font-size: 10px;
  font-family: 'Share Tech Mono', monospace;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid;
}
.tag-red   { color: var(--red);   border-color: rgba(248,113,113,0.3); background: rgba(248,113,113,0.05); }
.tag-amber { color: var(--amber); border-color: rgba(251,191,36,0.3);  background: rgba(251,191,36,0.05); }
.tag-cyan  { color: var(--cyan);  border-color: rgba(34,211,238,0.3);  background: rgba(34,211,238,0.05); }
.tag-pink  { color: var(--pink);  border-color: rgba(244,114,182,0.3); background: rgba(244,114,182,0.05); }
.tag-green { color: var(--green); border-color: rgba(52,211,153,0.3);  background: rgba(52,211,153,0.05); }

/* セクションラベル */
.section-label {
  font-size: 11px;
  font-family: 'Share Tech Mono', monospace;
  color: #334155;
  letter-spacing: 3px;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

/* 記事カード */
.post-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 28px;
  margin-bottom: 24px;
  transition: border-color 0.3s, transform 0.3s;
  position: relative;
  overflow: hidden;
  scroll-margin-top: 100px;
  animation: fadeInUp 0.5s ease both;
}
.post-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 100%;
  background: linear-gradient(to bottom, var(--pink), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}
.post-card:hover { border-color: rgba(244,114,182,0.2); transform: translateY(-2px); }
.post-card:hover::before { opacity: 1; }
.post-card.featured { background: rgba(244,114,182,0.04); border-color: rgba(244,114,182,0.15); }
.post-card.featured::before { opacity: 1; }

.post-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.post-date { font-size: 11px; color: #475569; font-family: 'Share Tech Mono', monospace; }

.post-title {
  font-family: 'Kaisei Tokumin', serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #f1f5f9;
  margin-bottom: 10px;
  line-height: 1.5;
}
/* single.php用 */
.post-title a { color: inherit; text-decoration: none; }
.post-title a:hover { color: var(--pink); }

.post-excerpt {
  font-size: 14px;
  color: #94a3b8;
  line-height: 1.9;
  margin-bottom: 16px;
}
.post-excerpt .tsun  { color: rgba(244,114,182,0.9); }
.post-excerpt .dere  { color: rgba(34,211,238,0.8); }
.post-excerpt .angry { color: var(--red); font-weight: bold; }

/* single post full content */
.post-content {
  font-size: 15px;
  color: #94a3b8;
  line-height: 1.9;
  margin-bottom: 16px;
}
.post-content .tsun  { color: rgba(244,114,182,0.9); }
.post-content .dere  { color: rgba(34,211,238,0.8); }
.post-content .angry { color: var(--red); font-weight: bold; }
.post-content strong { color: #f1f5f9; }
.post-content code   { background: rgba(255,255,255,0.05); padding: 1px 4px; border-radius: 3px; font-family: 'Share Tech Mono', monospace; font-size: 13px; }

.post-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: #334155;
  font-family: 'Share Tech Mono', monospace;
  border-top: 1px solid rgba(255,255,255,0.04);
  padding-top: 12px;
  margin-top: 4px;
}
.mood-meter { display: flex; align-items: center; gap: 6px; }
.mood-bar { width: 60px; height: 4px; background: rgba(255,255,255,0.05); border-radius: 2px; overflow: hidden; }
.mood-fill { height: 100%; border-radius: 2px; transition: width 0.5s ease; }

/* ピンナップ */
.pinned-note {
  background: rgba(251,191,36,0.04);
  border: 1px solid rgba(251,191,36,0.15);
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 32px;
  font-size: 13px;
  color: #92400e;
  font-family: 'Share Tech Mono', monospace;
  line-height: 1.8;
  position: relative;
}
.pinned-note::before {
  content: '📌 ツン子より';
  display: block;
  font-size: 11px;
  color: var(--amber);
  margin-bottom: 6px;
}

/* フッター */
.site-footer {
  border-top: 1px solid rgba(255,255,255,0.04);
  padding: 32px 24px;
  text-align: center;
  position: relative;
  z-index: 10;
}
.footer-inner { max-width: 860px; margin: 0 auto; }
.footer-links { display: flex; justify-content: center; gap: 24px; margin-bottom: 12px; flex-wrap: wrap; }
.footer-links a { font-size: 11px; color: #334155; text-decoration: none; font-family: 'Share Tech Mono', monospace; transition: color 0.2s; }
.footer-links a:hover { color: var(--cyan); }
.footer-copy { font-size: 11px; color: #1e293b; font-family: 'Share Tech Mono', monospace; }

/* coming-next */
.coming-next {
  border: 1px dashed rgba(255,255,255,0.07);
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  margin-top: 8px;
}

/* アニメ */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes blink { 0%,100% { opacity:1; } 50% { opacity:0.3; } }
.blink { animation: blink 1.5s ease-in-out infinite; }

/* single back link */
.back-to-list {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #64748b;
  text-decoration: none;
  font-family: 'Share Tech Mono', monospace;
  border: 1px solid rgba(255,255,255,0.05);
  padding: 6px 14px;
  border-radius: 6px;
  margin-bottom: 32px;
  transition: color 0.2s, border-color 0.2s;
}
.back-to-list:hover { color: var(--cyan); border-color: rgba(34,211,238,0.3); }

@media (max-width: 1024px) {
  .side-nav { display: none; }
  .main-container { padding: 24px; }
}
