/* ============================================
   Nekmon Blog Portal - style.css
   nekmon.app と統一のデザイントークン
   ============================================ */

:root {
  --c-bg: #fafafa;
  --c-bg-alt: #f0f0f0;
  --c-surface: #ffffff;
  --c-text: #0a0a0a;
  --c-text-sub: #555;
  --c-text-muted: #888;
  --c-accent: #0a0a0a;
  --c-accent-hover: #333;
  --c-border: #e0e0e0;
  --c-card-shadow: rgba(0, 0, 0, 0.06);

  --ff-heading: 'Hiragino Mincho ProN', 'Yu Mincho', serif;
  --ff-body: -apple-system, BlinkMacSystemFont, 'Hiragino Sans', 'Noto Sans JP', sans-serif;
  --ff-mono: 'SF Mono', 'Fira Code', monospace;

  --fs-hero: clamp(2rem, 5vw, 3.5rem);
  --fs-section: clamp(1.5rem, 3vw, 2rem);
  --fs-lead: clamp(1rem, 2vw, 1.25rem);
  --fs-body: 1rem;
  --fs-sm: 0.875rem;
  --fs-xs: 0.8125rem;

  --w-max: 1000px;
  --w-narrow: 640px;
}

/* ============================================
   Reset
   ============================================ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--ff-body);
  color: var(--c-text);
  background: var(--c-bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }

.wrap {
  width: 100%;
  max-width: var(--w-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================
   Header
   ============================================ */
.header {
  padding: 20px 0;
  position: sticky;
  top: 0;
  background: rgba(250, 250, 250, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 100;
  border-bottom: 1px solid var(--c-border);
}
.header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-family: var(--ff-mono);
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--c-text);
  text-decoration: none;
}
.logo__sub {
  font-weight: 400;
  color: var(--c-text-muted);
  font-size: 0.875rem;
  margin-left: 4px;
}
.header-nav {
  display: flex;
  gap: 28px;
}
.header-nav a {
  font-size: var(--fs-sm);
  color: var(--c-text-sub);
  text-decoration: none;
  transition: color 0.2s;
}
.header-nav a:hover { color: var(--c-text); }

/* ============================================
   Hero
   ============================================ */
.hero {
  padding: 100px 0 60px;
  background: var(--c-bg);
}
.hero .wrap {
  max-width: 800px;
}
.hero__label {
  font-family: var(--ff-mono);
  font-size: var(--fs-xs);
  color: var(--c-text-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.hero__title {
  font-family: var(--ff-heading);
  font-size: var(--fs-hero);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--c-text);
  margin-bottom: 20px;
}
.hero__lead {
  font-size: var(--fs-lead);
  color: var(--c-text-sub);
  line-height: 1.9;
  max-width: 560px;
}

/* ============================================
   Tag Filter
   ============================================ */
.filter {
  padding: 0 0 40px;
  background: var(--c-bg);
}
.filter__tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.filter__tag {
  display: inline-block;
  font-family: var(--ff-mono);
  font-size: var(--fs-xs);
  color: var(--c-text-muted);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  padding: 6px 16px;
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}
.filter__tag:hover {
  color: var(--c-text);
  border-color: var(--c-text-muted);
}
.filter__tag--active {
  color: #fff;
  background: var(--c-accent);
  border-color: var(--c-accent);
}
.filter__tag--active:hover {
  background: var(--c-accent-hover);
  border-color: var(--c-accent-hover);
}

/* ============================================
   Articles Grid
   ============================================ */
.articles {
  padding: 0 0 120px;
  background: var(--c-bg);
}
.articles__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
.article-card {
  display: block;
  padding: 32px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: 12px;
  text-decoration: none;
  transition: box-shadow 0.3s, border-color 0.2s;
}
.article-card:hover {
  box-shadow: 0 8px 32px var(--c-card-shadow);
  border-color: var(--c-text-muted);
}
.article-card__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.article-card__date {
  font-family: var(--ff-mono);
  font-size: var(--fs-xs);
  color: var(--c-text-muted);
}
.article-card__template {
  font-family: var(--ff-mono);
  font-size: 0.6875rem;
  color: var(--c-text-muted);
  background: var(--c-bg-alt);
  padding: 2px 10px;
  border-radius: 100px;
}
.article-card__title {
  font-family: var(--ff-heading);
  font-size: var(--fs-section);
  font-weight: 400;
  line-height: 1.4;
  margin-bottom: 8px;
}
.article-card__summary {
  font-size: var(--fs-sm);
  color: var(--c-text-sub);
  line-height: 1.8;
  margin-bottom: 16px;
}
.article-card__tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.article-card__tag {
  font-family: var(--ff-mono);
  font-size: 0.6875rem;
  color: var(--c-text-muted);
  background: var(--c-bg);
  padding: 2px 10px;
  border-radius: 100px;
  border: 1px solid var(--c-border);
}

/* ============================================
   Empty State
   ============================================ */
.empty-state {
  text-align: center;
  padding: 80px 24px;
}
.empty-state__icon {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.3;
}
.empty-state__title {
  font-family: var(--ff-heading);
  font-size: var(--fs-section);
  font-weight: 400;
  color: var(--c-text);
  margin-bottom: 8px;
}
.empty-state__text {
  font-size: var(--fs-sm);
  color: var(--c-text-muted);
  line-height: 1.8;
}

/* ============================================
   Footer
   ============================================ */
.footer {
  padding: 40px 0 32px;
  background: var(--c-bg);
  border-top: 1px solid var(--c-border);
}
.footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer__copy {
  font-size: var(--fs-xs);
  color: var(--c-text-muted);
}
.footer__nav {
  display: flex;
  gap: 20px;
}
.footer__link {
  font-size: var(--fs-xs);
  color: var(--c-text-muted);
  text-decoration: none;
  transition: color 0.2s;
}
.footer__link:hover { color: var(--c-text); }

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
  .hero { padding: 72px 0 40px; }
  .hero__lead { max-width: 100%; }
  .articles { padding: 0 0 72px; }
  .article-card { padding: 24px; }
  .footer .wrap {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
  .footer__nav { flex-direction: column; gap: 8px; }
}

@media (max-width: 480px) {
  .wrap { padding: 0 16px; }
  .hero { padding: 56px 0 32px; }
  .header-nav { gap: 16px; }
  .article-card { padding: 20px; }
  .article-card__title { font-size: clamp(1.25rem, 4vw, 1.5rem); }
}
