/* ===== NEW IN TOKYO - Design System ===== */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@300;400;500;700;900&family=Noto+Serif+JP:wght@400;700&display=swap');

:root {
  --bg-primary: #0d0d1a;
  --bg-secondary: #141428;
  --bg-card: rgba(25, 25, 50, 0.7);
  --bg-glass: rgba(255,255,255,0.04);
  --text-primary: #e8e6f0;
  --text-secondary: #9a97b0;
  --text-muted: #6b6880;
  --accent: #f472b6;
  --accent-light: #fbcfe8;
  --accent-dark: #be185d;
  --gold: #fbbf24;
  --sakura: #f9a8d4;
  --border: rgba(255,255,255,0.06);
  --shadow: 0 8px 32px rgba(0,0,0,0.4);
  --radius: 16px;
  --radius-sm: 10px;
  --transition: 0.3s cubic-bezier(0.4,0,0.2,1);
  --max-width: 1280px;
  --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: 'Noto Sans JP', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.8;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  position: fixed;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(ellipse at 20% 50%, rgba(244,114,182,0.06) 0%, transparent 50%),
              radial-gradient(ellipse at 80% 20%, rgba(251,191,36,0.04) 0%, transparent 50%),
              radial-gradient(ellipse at 50% 80%, rgba(99,102,241,0.05) 0%, transparent 50%);
  z-index: -1;
  animation: bgShift 20s ease-in-out infinite alternate;
}

@keyframes bgShift {
  0% { transform: translate(0,0) rotate(0deg); }
  100% { transform: translate(-5%,3%) rotate(3deg); }
}

a { color: var(--accent); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--accent-light); }

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

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

/* ===== HEADER ===== */
.site-header {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: rgba(13,13,26,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition: var(--transition);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  font-family: 'Noto Serif JP', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-logo .logo-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--accent), var(--gold));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
}

.site-logo span { background: linear-gradient(135deg, var(--accent-light), var(--gold)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

/* Nav */
.main-nav { display: flex; align-items: center; gap: 8px; }
.main-nav a {
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
}
.main-nav a:hover, .main-nav a.active {
  color: var(--text-primary);
  background: var(--bg-glass);
}

.menu-toggle {
  display: none;
  background: none; border: none; color: var(--text-primary);
  font-size: 1.5rem; cursor: pointer; padding: 8px;
}

/* Mobile Nav */
.mobile-nav {
  display: none;
  position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0;
  background: rgba(13,13,26,0.97);
  backdrop-filter: blur(20px);
  z-index: 999;
  padding: 24px;
  overflow-y: auto;
}

.mobile-nav.open { display: flex; flex-direction: column; gap: 4px; }

.mobile-nav a {
  color: var(--text-secondary);
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  font-size: 1.05rem;
  font-weight: 500;
}
.mobile-nav a:hover { background: var(--bg-glass); color: var(--text-primary); }

/* ===== HERO ===== */
.hero {
  padding: calc(var(--header-h) + 60px) 0 60px;
  text-align: center;
  position: relative;
}

.hero h1 {
  font-family: 'Noto Serif JP', serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  line-height: 1.3;
  margin-bottom: 20px;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--sakura) 50%, var(--gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 32px;
}

.hero-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 24px; }
.hero-tags a {
  padding: 8px 18px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 500;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  transition: var(--transition);
}
.hero-tags a:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(244,114,182,0.08);
  transform: translateY(-2px);
}

/* ===== SECTION ===== */
.section { padding: 60px 0; }
.section-title {
  font-family: 'Noto Serif JP', serif;
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.section-subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 36px;
}

/* ===== BLOG GRID ===== */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.blog-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
}
.blog-card:hover {
  transform: translateY(-6px);
  border-color: rgba(244,114,182,0.2);
  box-shadow: 0 20px 60px rgba(244,114,182,0.08);
}

.blog-card .card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: var(--bg-secondary);
  position: relative;
  overflow: hidden;
}

.blog-card .card-image img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.5s ease;
}
.blog-card:hover .card-image img { transform: scale(1.05); }

.card-category {
  position: absolute;
  top: 12px; left: 12px;
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(244,114,182,0.9);
  color: #fff;
  backdrop-filter: blur(8px);
  z-index: 2;
}

.card-body { padding: 20px; }

.card-body h3 {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-body .excerpt {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 16px;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.card-meta .date { display: flex; align-items: center; gap: 4px; }
.card-meta .read-time { display: flex; align-items: center; gap: 4px; }

/* ===== FEATURED CARD ===== */
.featured-card {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  min-height: 360px;
}
.featured-card .card-image { height: 100%; min-height: 300px; }
.featured-card .card-body { display: flex; flex-direction: column; justify-content: center; padding: 40px; }
.featured-card .card-body h3 { font-size: 1.5rem; -webkit-line-clamp: 3; }
.featured-card .card-body .excerpt { -webkit-line-clamp: 4; }

/* ===== ARTICLE PAGE ===== */
.article-page { padding: calc(var(--header-h) + 40px) 0 60px; }

.article-header {
  max-width: 800px;
  margin: 0 auto 40px;
  text-align: center;
}

.article-header .breadcrumb {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}
.article-header .breadcrumb a { color: var(--accent); }

.article-header h1 {
  font-family: 'Noto Serif JP', serif;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 900;
  line-height: 1.4;
  margin-bottom: 16px;
}

.article-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  flex-wrap: wrap;
}

.article-featured-img {
  max-width: 900px;
  margin: 0 auto 40px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
.article-featured-img img { width: 100%; height: auto; }

.article-content {
  max-width: 760px;
  margin: 0 auto;
  font-size: 1.05rem;
  line-height: 2;
  color: var(--text-primary);
}

.article-content h2 {
  font-family: 'Noto Serif JP', serif;
  font-size: 1.5rem;
  margin: 48px 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border);
}

.article-content h3 {
  font-size: 1.2rem;
  margin: 32px 0 12px;
}

.article-content p { margin-bottom: 20px; }

.article-content blockquote {
  border-left: 4px solid var(--accent);
  padding: 16px 24px;
  margin: 24px 0;
  background: var(--bg-glass);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: var(--text-secondary);
}

.article-content ul, .article-content ol {
  margin: 16px 0;
  padding-left: 28px;
}
.article-content li { margin-bottom: 8px; }

.article-content .mid-article-img {
  margin: 32px 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
}

.article-tags {
  max-width: 760px;
  margin: 40px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.article-tags span {
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 0.8rem;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

/* ===== CATEGORY PAGE ===== */
.category-header {
  padding: calc(var(--header-h) + 40px) 0 40px;
  text-align: center;
}
.category-header h1 {
  font-family: 'Noto Serif JP', serif;
  font-size: 2rem;
  margin-bottom: 8px;
}
.category-header p { color: var(--text-secondary); }

.category-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 40px;
}
.category-nav a {
  padding: 8px 20px;
  border-radius: 50px;
  font-size: 0.85rem;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  transition: var(--transition);
}
.category-nav a:hover, .category-nav a.active {
  background: rgba(244,114,182,0.1);
  border-color: var(--accent);
  color: var(--accent);
}

/* ===== SIDEBAR ===== */
.content-with-sidebar {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
  align-items: start;
}

.sidebar { position: sticky; top: calc(var(--header-h) + 24px); }

.sidebar-widget {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
}

.sidebar-widget h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.sidebar-widget .popular-post {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
}
.sidebar-widget .popular-post:last-child { border-bottom: none; }
.sidebar-widget .popular-post:hover { opacity: 0.8; }
.sidebar-widget .popular-post .thumb {
  width: 64px; height: 64px; border-radius: 8px;
  overflow: hidden; flex-shrink: 0;
  background: var(--bg-secondary);
}
.sidebar-widget .popular-post .thumb img { width: 100%; height: 100%; object-fit: cover; }
.sidebar-widget .popular-post .info h4 {
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sidebar-widget .popular-post .info .meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ===== FOOTER ===== */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 60px 0 24px;
  margin-top: 80px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-col h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.footer-col p { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.7; }

.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul a { color: var(--text-secondary); font-size: 0.88rem; }
.footer-col ul a:hover { color: var(--accent); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ===== PAGINATION ===== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 48px;
}
.pagination button {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-glass);
  color: var(--text-secondary);
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
}
.pagination button:hover, .pagination button.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ===== LOADING ===== */
.skeleton {
  background: linear-gradient(90deg, var(--bg-secondary) 25%, rgba(255,255,255,0.05) 50%, var(--bg-secondary) 75%);
  background-size: 400% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ===== SCROLL TOP ===== */
.scroll-top {
  position: fixed;
  bottom: 24px; right: 24px;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0;
  transform: translateY(20px);
  transition: var(--transition);
  z-index: 900;
  box-shadow: 0 4px 20px rgba(244,114,182,0.3);
}
.scroll-top.visible { opacity: 1; transform: translateY(0); }
.scroll-top:hover { transform: translateY(-4px); box-shadow: 0 8px 30px rgba(244,114,182,0.4); }

/* ===== STATIC PAGES ===== */
.static-page {
  padding: calc(var(--header-h) + 40px) 0 60px;
  max-width: 800px;
  margin: 0 auto;
}
.static-page h1 {
  font-family: 'Noto Serif JP', serif;
  font-size: 2rem;
  margin-bottom: 24px;
}
.static-page h2 { font-size: 1.3rem; margin: 32px 0 12px; }
.static-page p { margin-bottom: 16px; color: var(--text-secondary); line-height: 1.9; }
.static-page ul { padding-left: 24px; margin-bottom: 16px; }
.static-page li { margin-bottom: 8px; color: var(--text-secondary); }

/* ===== CONTACT FORM ===== */
.contact-form { max-width: 600px; }
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--text-secondary);
}
.form-group input, .form-group textarea, .form-group select {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-glass);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  transition: var(--transition);
}
.form-group input:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(244,114,182,0.15);
}
.form-group textarea { min-height: 140px; resize: vertical; }
.btn-submit {
  padding: 14px 40px;
  border-radius: var(--radius-sm);
  border: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.btn-submit:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(244,114,182,0.3); }

/* ===== NEW BADGE ===== */
.new-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  background: var(--gold);
  color: #000;
  margin-left: 6px;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .content-with-sidebar { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .main-nav { display: none; }
  .menu-toggle { display: block; }
  .blog-grid { grid-template-columns: 1fr; }
  .featured-card { grid-template-columns: 1fr; }
  .featured-card .card-image { min-height: 200px; }
  .featured-card .card-body { padding: 24px; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
  .hero { padding: calc(var(--header-h) + 40px) 0 40px; }
  .article-content { font-size: 1rem; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .blog-grid { grid-template-columns: 1fr; }
  .category-nav { gap: 6px; }
  .category-nav a { padding: 6px 14px; font-size: 0.8rem; }
}

/* ===== TOC (Table of Contents) ===== */
.toc-container {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 24px;
  margin: 32px 0;
}
.toc-container h3 { margin-top: 0; font-size: 1.1rem; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.toc-list { list-style: none; padding: 0; margin: 0; }
.toc-list li { margin-bottom: 10px; }
.toc-list a { color: var(--text-secondary); text-decoration: none; font-size: 0.95rem; transition: var(--transition); }
.toc-list a:hover { color: var(--accent); padding-left: 5px; }

/* ===== AUTHOR BOX ===== */
.author-box {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin: 48px 0;
}
.author-avatar {
  width: 80px; height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent);
}
.author-info h4 { font-size: 1.1rem; margin-bottom: 6px; color: var(--text-primary); }
.author-info p { font-size: 0.9rem; color: var(--text-secondary); margin: 0; line-height: 1.6; }

/* ===== SOCIAL SHARE ===== */
.social-share {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 32px 0;
  padding: 20px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  transition: var(--transition);
}
.share-btn:hover { transform: translateY(-2px); opacity: 0.9; }
.share-x { background: #000; border: 1px solid #333; }
.share-line { background: #06c755; }
.share-hatena { background: #00a4de; }
.share-facebook { background: #1877f2; }

/* ===== LOGO STYLING ===== */
.site-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.site-logo img {
  height: 65px;
  width: 65px;
  object-fit: contain;
  mix-blend-mode: screen; /* Instantly removes the black background */
  filter: contrast(1.2) brightness(1.2); /* Enhances the golden pop */
}
.site-logo span {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: 1px;
}
