/*
Theme Name:  FIRE SE
Theme URI:   https://fire-se.com
Author:      FIRE SE
Description: Dark tech editorial theme for FIRE SE — Systems Engineer's Tech Blog
Version:     1.0.0
License:     GNU General Public License v2 or later
Text Domain: fire-se
*/

/* ============================================================
   CSS CUSTOM PROPERTIES
   ============================================================ */
:root {
  --bg:           #0a0a0f;
  --surface:      #111118;
  --surface2:     #16161f;
  --surface3:     #1c1c28;
  --border:       #1e1e2e;
  --border-light: #2a2a3e;

  --accent:             #ff4b2b;
  --accent-2:           #ff6b35;
  --accent-dim:         rgba(255, 75, 43, 0.12);
  --accent-glow:        0 0 20px rgba(255, 75, 43, 0.3);
  --accent-glow-strong: 0 0 40px rgba(255, 75, 43, 0.5);

  --text:       #e8e8f0;
  --text-mid:   #a0a0c0;
  --text-muted: #6b6b85;
  --text-dim:   #3a3a55;

  --font-display: 'Bebas Neue', sans-serif;
  --font-mono:    'Space Mono', monospace;
  --font-sans:    'Noto Sans JP', sans-serif;

  --container: 1200px;
  --sidebar-w: 300px;
  --header-h:  64px;
  --gap:       48px;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.7;
  overflow-x: hidden;
}
/* Noise texture */
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='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none; z-index: 9999; opacity: 0.35;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 40px;
}

.site-layout {
  display: grid;
  grid-template-columns: 1fr var(--sidebar-w);
  gap: var(--gap);
  padding: 56px 0 80px;
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  z-index: 500;
  background: rgba(10, 10, 15, 0.88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

/* ヘッダーは container より広めの余白で中央に収める */
.site-header .container {
  max-width: 1440px;
  padding: 0 60px;
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo */
.site-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.site-logo__wordmark {
  font-family: var(--font-display);
  font-size: 26px;
  letter-spacing: 4px;
  line-height: 1;
  color: var(--text);
}
.site-logo__fire { color: var(--accent); text-shadow: var(--accent-glow); }
.site-logo__sep {
  width: 1px; height: 20px;
  background: var(--border-light);
}
.site-logo__sub {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Primary nav */
.primary-nav { display: flex; align-items: center; gap: 4px; }
.primary-nav a {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 6px 14px;
  transition: color .2s;
  position: relative;
}
.primary-nav a::after {
  content: '';
  position: absolute; bottom: 0; left: 14px; right: 14px;
  height: 1px; background: var(--accent);
  transform: scaleX(0); transition: transform .3s;
}
.primary-nav a:hover { color: var(--text); }
.primary-nav a:hover::after,
.primary-nav a.current-menu-item::after,
.primary-nav a.current-menu-ancestor::after { transform: scaleX(1); }
.primary-nav a.current-menu-item { color: var(--accent); }

/* Header search */
.header-search {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 6px 14px;
}
.header-search input {
  background: none; border: none; outline: none;
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 1px;
  color: var(--text-muted); width: 120px;
}
.header-search input::placeholder { color: var(--text-dim); }
.header-search svg { color: var(--text-dim); flex-shrink: 0; }

/* Mobile toggle */
.nav-toggle {
  display: none;
  flex-direction: column; gap: 5px;
  width: 24px; padding: 4px 0;
  cursor: pointer;
}
.nav-toggle span {
  display: block; height: 1px;
  background: var(--text-muted); transition: all .3s;
}

/* Page offset */
.page-offset { padding-top: var(--header-h); }

/* ============================================================
   TICKER
   ============================================================ */
.ticker-wrap {
  background: var(--accent);
  overflow: hidden; white-space: nowrap;
  padding: 9px 0;
}
.ticker-inner {
  display: inline-flex;
  animation: ticker 35s linear infinite;
}
.ticker-item {
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 2.5px;
  text-transform: uppercase;
  color: rgba(255,255,255,.85);
  padding: 0 36px;
  display: inline-flex; align-items: center; gap: 14px;
}
.ticker-sep {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: rgba(255,255,255,.4);
  flex-shrink: 0;
}
@keyframes ticker {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ============================================================
   HERO  (front-page / home)
   ============================================================ */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: calc(100vh - var(--header-h));
  position: relative; overflow: hidden;
}

.hero__glow {
  position: absolute; border-radius: 50%;
  pointer-events: none;
}
.hero__glow--1 {
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(255,75,43,.07) 0%, transparent 70%);
  top: -150px; left: -150px;
}
.hero__glow--2 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(255,107,53,.05) 0%, transparent 70%);
  bottom: -100px; right: 0;
}

.hero__left {
  display: flex; flex-direction: column; justify-content: center;
  padding: 80px 60px 80px 0;
  position: relative; z-index: 2;
}

.hero__eyebrow {
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 4px; text-transform: uppercase;
  color: var(--accent);
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 24px;
}
.hero__eyebrow::before {
  content: '';
  width: 32px; height: 1px;
  background: var(--accent); box-shadow: var(--accent-glow);
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(72px, 8vw, 112px);
  line-height: .92; letter-spacing: 2px;
  margin-bottom: 32px;
}
.hero__title .fire {
  display: block; color: var(--accent);
  text-shadow: var(--accent-glow-strong);
}
.hero__title .se {
  display: block; color: transparent;
  -webkit-text-stroke: 1px rgba(232,232,240,.25);
}

.hero__desc {
  font-size: 14px; line-height: 1.85; font-weight: 300;
  color: var(--text-muted); max-width: 420px;
  margin-bottom: 36px;
}

.hero__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 40px; }

.hero__cta { display: flex; align-items: center; gap: 20px; }

/* Hero right — terminal */
.hero__right {
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.hero__grid-bg {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,75,43,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,75,43,.04) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: linear-gradient(to right, transparent, black 20%, black 80%, transparent);
}

/* Terminal card */
.terminal {
  width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 0 60px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.04);
  position: relative; z-index: 2;
}
.terminal__bar {
  padding: 10px 16px;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px;
}
.terminal__dot {
  width: 10px; height: 10px; border-radius: 50%;
}
.terminal__dot:nth-child(1) { background: #ff5f56; }
.terminal__dot:nth-child(2) { background: #ffbd2e; }
.terminal__dot:nth-child(3) { background: #27c93f; }
.terminal__label {
  font-family: var(--font-mono); font-size: 10px;
  color: var(--text-dim); letter-spacing: 1px;
  margin-left: 8px;
}
.terminal__body {
  padding: 24px;
  font-family: var(--font-mono); font-size: 12px; line-height: 2;
  color: var(--text-muted);
}
.t-prompt { color: var(--accent); }
.t-cmd    { color: var(--text); }
.t-cmt    { color: var(--text-dim); }
.t-str    { color: #7ec8a0; }
.t-num    { color: #c9a6f5; }
.t-out    { color: #6ba4d8; padding-left: 16px; display: block; }
.t-cursor {
  display: inline-block; width: 8px; height: 14px;
  background: var(--accent); vertical-align: middle; margin-left: 2px;
  box-shadow: var(--accent-glow);
  animation: blink 1s step-end infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

/* ============================================================
   STATS BAR
   ============================================================ */
.stats-bar {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  position: relative;
}
.stats-bar::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}
.stats-bar__inner {
  display: grid; grid-template-columns: repeat(4, 1fr);
  divide-x: 1px;
}
.stat-item {
  text-align: center; padding: 24px 16px;
  border-right: 1px solid var(--border);
}
.stat-item:last-child { border-right: none; }
.stat-item__num {
  display: block;
  font-family: var(--font-display); font-size: 36px; letter-spacing: 2px;
  color: var(--accent); text-shadow: var(--accent-glow);
  line-height: 1;
}
.stat-item__label {
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 2px;
  text-transform: uppercase; color: var(--text-dim); margin-top: 6px;
}

/* ============================================================
   POST CARD  (汎用)
   ============================================================ */
.post-card {
  background: var(--bg);
  border: 1px solid var(--border);
  display: flex; flex-direction: column;
  position: relative; overflow: hidden;
  transition: background .3s;
}
.post-card::before {
  content: '';
  position: absolute; top: 0; left: 0;
  width: 2px; height: 0;
  background: var(--accent); box-shadow: var(--accent-glow);
  transition: height .4s;
}
.post-card:hover { background: var(--surface); }
.post-card:hover::before { height: 100%; }

.post-card__thumb {
  aspect-ratio: 16/9; overflow: hidden;
  background: var(--surface2);
  position: relative;
}
.post-card__thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s;
}
.post-card:hover .post-card__thumb img { transform: scale(1.04); }
.post-card__thumb-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 48px; letter-spacing: 2px;
  color: var(--text-dim);
  background: linear-gradient(135deg, var(--surface2) 0%, var(--surface3) 100%);
}

.post-card__body { padding: 24px; flex: 1; display: flex; flex-direction: column; gap: 12px; }

.post-card__meta {
  display: flex; align-items: center; gap: 12px;
}
.post-card__cat {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--accent);
  display: flex; align-items: center; gap: 6px;
}
.post-card__cat::before {
  content: ''; width: 12px; height: 1px;
  background: var(--accent);
}
.post-card__date {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 1px;
  color: var(--text-dim);
}

.post-card__title {
  font-size: 15px; font-weight: 700; line-height: 1.55;
  color: var(--text); transition: color .2s;
}
.post-card:hover .post-card__title { color: var(--accent); }

.post-card__excerpt {
  font-size: 13px; color: var(--text-muted); line-height: 1.7;
  font-weight: 300;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card__footer {
  margin-top: auto; padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.post-card__read-more {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 1px;
  text-transform: uppercase; color: var(--text-dim);
  transition: all .2s;
  display: flex; align-items: center; gap: 6px;
}
.post-card:hover .post-card__read-more {
  color: var(--accent); letter-spacing: 2px;
}

/* featured card  */
.post-card--featured {
  grid-column: span 2;
  flex-direction: row;
}
.post-card--featured .post-card__thumb {
  width: 45%; aspect-ratio: unset;
  flex-shrink: 0;
}
.post-card--featured .post-card__title { font-size: 20px; }

/* ============================================================
   POSTS GRID
   ============================================================ */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}
.posts-grid--3col { grid-template-columns: repeat(3, 1fr); }

/* ============================================================
   POST LIST  (archive/category)
   ============================================================ */
.post-list { display: flex; flex-direction: column; gap: 1px; }

.post-list-item {
  background: var(--bg);
  border: 1px solid var(--border);
  display: grid;
  grid-template-columns: 200px 1fr;
  transition: background .25s;
}
.post-list-item:hover { background: var(--surface); }

.post-list-item__thumb {
  aspect-ratio: 4/3; overflow: hidden;
  background: var(--surface2);
  position: relative;
}
.post-list-item__thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s;
}
.post-list-item:hover .post-list-item__thumb img { transform: scale(1.05); }
.post-list-item__thumb-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 32px;
  color: var(--text-dim);
  background: linear-gradient(135deg, var(--surface2), var(--surface3));
}

.post-list-item__body {
  padding: 20px 24px;
  display: flex; flex-direction: column; gap: 10px;
  justify-content: center;
}
.post-list-item__meta {
  display: flex; align-items: center; gap: 12px;
}
.post-list-item__cat {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--accent);
}
.post-list-item__date {
  font-family: var(--font-mono); font-size: 10px;
  color: var(--text-dim); letter-spacing: 1px;
}
.post-list-item__title {
  font-size: 16px; font-weight: 700; line-height: 1.5;
  color: var(--text); transition: color .2s;
}
.post-list-item:hover .post-list-item__title { color: var(--accent); }
.post-list-item__excerpt {
  font-size: 13px; color: var(--text-muted); line-height: 1.7; font-weight: 300;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}

/* ============================================================
   SECTION HEADER
   ============================================================ */
.section-header {
  display: flex; align-items: baseline; justify-content: space-between;
  padding-bottom: 20px; margin-bottom: 32px;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.section-header::after {
  content: ''; position: absolute; bottom: -1px; left: 0;
  width: 48px; height: 1px;
  background: var(--accent); box-shadow: var(--accent-glow);
}
.section-title {
  font-family: var(--font-display); font-size: 32px; letter-spacing: 3px;
  color: var(--text); display: flex; align-items: center; gap: 14px;
}
.section-title__badge {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 2px;
  border: 1px solid var(--accent); color: var(--accent); padding: 2px 10px;
  box-shadow: var(--accent-glow); align-self: center;
}
.section-more {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 2px;
  text-transform: uppercase; color: var(--text-muted);
  display: flex; align-items: center; gap: 6px; transition: color .2s;
}
.section-more:hover { color: var(--accent); }

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar { display: flex; flex-direction: column; gap: 40px; }

.widget {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 28px;
}
.widget__title {
  font-family: var(--font-display); font-size: 22px; letter-spacing: 2px;
  color: var(--text); margin-bottom: 20px;
  padding-bottom: 14px; border-bottom: 1px solid var(--border);
  position: relative;
}
.widget__title::after {
  content: ''; position: absolute; bottom: -1px; left: 0;
  width: 28px; height: 1px;
  background: var(--accent); box-shadow: var(--accent-glow);
}

/* Popular posts widget */
.widget-popular__list { display: flex; flex-direction: column; }
.widget-popular__item {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  transition: padding-left .25s;
}
.widget-popular__item:last-child { border-bottom: none; }
.widget-popular__item:hover { padding-left: 6px; }
.widget-popular__rank {
  font-family: var(--font-display); font-size: 28px; letter-spacing: 1px;
  color: var(--text-dim); line-height: 1; flex-shrink: 0;
  transition: color .25s; min-width: 32px;
}
.widget-popular__item:hover .widget-popular__rank { color: rgba(255,75,43,.4); }
.widget-popular__title {
  font-size: 13px; font-weight: 500; line-height: 1.55; color: var(--text-muted);
  transition: color .2s;
}
.widget-popular__item:hover .widget-popular__title { color: var(--text); }

/* Category widget */
.widget-cats__list { display: flex; flex-direction: column; gap: 2px; }
.widget-cats__item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px;
  border: 1px solid transparent;
  font-size: 13px; color: var(--text-muted);
  transition: all .2s;
}
.widget-cats__item:hover {
  border-color: var(--border-light);
  background: var(--surface2);
  color: var(--text);
  padding-left: 20px;
}
.widget-cats__count {
  font-family: var(--font-mono); font-size: 10px; color: var(--text-dim);
}

/* Search widget */
.widget-search__form {
  display: flex; border: 1px solid var(--border);
}
.widget-search__input {
  flex: 1; background: none; border: none; outline: none;
  padding: 10px 14px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 1px;
  color: var(--text-muted);
}
.widget-search__input::placeholder { color: var(--text-dim); }
.widget-search__btn {
  background: var(--accent); border: none;
  padding: 0 16px; cursor: pointer;
  color: white; transition: opacity .2s;
}
.widget-search__btn:hover { opacity: .85; }

/* About widget */
.widget-about__profile {
  display: flex; gap: 14px; align-items: center;
  padding: 16px; background: var(--bg); border: 1px solid var(--border);
  margin-bottom: 16px;
}
.widget-about__avatar {
  width: 44px; height: 44px;
  background: var(--accent); box-shadow: var(--accent-glow);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 20px; color: white;
  flex-shrink: 0;
}
.widget-about__name {
  font-family: var(--font-mono); font-size: 12px; font-weight: 700; color: var(--text);
}
.widget-about__role {
  font-family: var(--font-mono); font-size: 9px; color: var(--text-dim);
  letter-spacing: 1px; margin-top: 3px;
}
.widget-about__desc {
  font-size: 13px; line-height: 1.75; color: var(--text-muted); font-weight: 300;
  margin-bottom: 16px;
}

/* ============================================================
   BUTTONS / TAGS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 2px;
  text-transform: uppercase; transition: all .2s; white-space: nowrap;
}
.btn--primary {
  background: var(--accent); color: #fff; padding: 12px 28px;
  box-shadow: var(--accent-glow); position: relative; overflow: hidden;
}
.btn--primary::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,.12) 50%, transparent 70%);
  transform: translateX(-100%); transition: transform .5s;
}
.btn--primary:hover { box-shadow: var(--accent-glow-strong); }
.btn--primary:hover::before { transform: translateX(100%); }
.btn--outline {
  border: 1px solid var(--border-light); color: var(--text-muted); padding: 10px 24px;
}
.btn--outline:hover { border-color: var(--accent); color: var(--accent); }
.btn--ghost { color: var(--text-muted); }
.btn--ghost:hover { color: var(--accent); }

.tag {
  display: inline-flex; align-items: center;
  padding: 3px 12px; border: 1px solid var(--border-light);
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--text-muted); transition: all .2s;
}
.tag:hover, .tag.is-active {
  border-color: var(--accent); color: var(--accent); box-shadow: var(--accent-glow);
}

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination { display: flex; align-items: center; gap: 4px; margin-top: 48px; flex-wrap: wrap; }
.pagination .page-numbers {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border: 1px solid var(--border);
  font-family: var(--font-mono); font-size: 12px;
  color: var(--text-muted); transition: all .2s;
}
.pagination .page-numbers:hover,
.pagination .page-numbers.current {
  border-color: var(--accent); color: var(--accent);
  background: var(--accent-dim);
}
.pagination .page-numbers.dots { border: none; color: var(--text-dim); }

/* ============================================================
   BREADCRUMB
   ============================================================ */
.breadcrumb {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 1px;
  color: var(--text-dim); margin-bottom: 32px; flex-wrap: wrap;
}
.breadcrumb a { color: var(--text-muted); transition: color .2s; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb__sep { color: var(--text-dim); }

/* ============================================================
   ARCHIVE / CATEGORY HEADER
   ============================================================ */
.archive-header {
  padding: 48px 0 40px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 48px; position: relative;
}
.archive-header::after {
  content: ''; position: absolute; bottom: -1px; left: 0;
  width: 64px; height: 1px; background: var(--accent); box-shadow: var(--accent-glow);
}
.archive-header__eyebrow {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 3px;
  text-transform: uppercase; color: var(--accent);
  display: flex; align-items: center; gap: 10px; margin-bottom: 14px;
}
.archive-header__eyebrow::before {
  content: ''; width: 24px; height: 1px; background: var(--accent);
}
.archive-header__title {
  font-family: var(--font-display); font-size: clamp(40px, 5vw, 64px);
  letter-spacing: 3px; line-height: 1; color: var(--text); margin-bottom: 12px;
}
.archive-header__desc {
  font-size: 14px; color: var(--text-muted); font-weight: 300; max-width: 600px;
}
.archive-header__count {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 2px;
  color: var(--text-dim); margin-top: 16px;
}

/* ============================================================
   SINGLE POST
   ============================================================ */
.single-header {
  padding: 56px 0 48px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 48px;
  position: relative;
}
.single-header::after {
  content: ''; position: absolute; bottom: -1px; left: 0;
  width: 64px; height: 1px; background: var(--accent); box-shadow: var(--accent-glow);
}
.single-header__meta {
  display: flex; align-items: center; gap: 16px; margin-bottom: 20px; flex-wrap: wrap;
}
.single-header__cat {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 2px;
  text-transform: uppercase; color: var(--accent);
  border: 1px solid var(--accent); padding: 3px 12px;
  box-shadow: var(--accent-glow);
}
.single-header__date {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 1px; color: var(--text-dim);
}
.single-header__title {
  font-size: clamp(24px, 3.5vw, 40px); font-weight: 700; line-height: 1.35;
  color: var(--text); margin-bottom: 20px;
}
.single-header__thumb {
  margin-top: 32px; border: 1px solid var(--border);
  overflow: hidden;
}
.single-header__thumb img { width: 100%; height: auto; display: block; }

/* Article body */
.entry-content {
  font-size: 15px; line-height: 1.9; color: #ddddf0;
  font-weight: 400;
  overflow-x: hidden;
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: break-word;
}
.entry-content h2 {
  font-size: 22px; font-weight: 700; color: var(--text);
  margin: 48px 0 20px;
  padding-left: 16px; border-left: 3px solid var(--accent);
}
.entry-content h3 {
  font-size: 18px; font-weight: 700; color: var(--text);
  margin: 36px 0 16px;
}
.entry-content p { margin-bottom: 24px; }
.entry-content a { color: var(--accent); border-bottom: 1px solid rgba(255,75,43,.3); transition: border-color .2s; }
.entry-content a:hover { border-color: var(--accent); }
.entry-content ul, .entry-content ol { margin: 0 0 24px 24px; }
.entry-content li { margin-bottom: 8px; }
.entry-content ul li { list-style: disc; }
.entry-content ol li { list-style: decimal; }
.entry-content blockquote {
  margin: 32px 0; padding: 20px 24px;
  background: var(--surface); border-left: 3px solid var(--accent);
  font-style: italic; color: var(--text-muted);
}
.entry-content table {
  width: 100%; border-collapse: collapse; margin-bottom: 24px; font-size: 14px;
}
.entry-content th {
  background: var(--surface); font-weight: 700;
  padding: 10px 16px; border: 1px solid var(--border);
  text-align: left; font-family: var(--font-mono); font-size: 11px; letter-spacing: 1px;
}
.entry-content td { padding: 10px 16px; border: 1px solid var(--border); }
.entry-content tr:nth-child(even) td { background: var(--surface); }
.entry-content img { border: 1px solid var(--border); margin: 24px 0; max-width: 100%; height: auto; }

/* テーブルとコードブロックのはみ出し防止 */
.entry-content table,
.entry-content pre {
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}

/* Code blocks */
.entry-content pre {
  background: var(--surface2); border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  padding: 20px 24px; margin-bottom: 24px;
  font-family: var(--font-mono); font-size: 13px; line-height: 1.7;
  color: var(--text-mid);
  white-space: pre;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  word-break: normal;
  word-wrap: normal;
  overflow-wrap: normal;
}
.entry-content code {
  font-family: var(--font-mono); font-size: 13px;
  background: var(--surface2); padding: 2px 8px; color: var(--accent);
}
.entry-content pre code { background: none; padding: 0; color: inherit; }

/* Post footer */
.single-footer { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--border); }
.single-footer__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }

/* Author box */
.author-box {
  display: flex; gap: 20px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--border);
  padding: 24px; margin-top: 40px;
}
.author-box__avatar {
  width: 56px; height: 56px; flex-shrink: 0;
  background: var(--accent); box-shadow: var(--accent-glow);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 24px; color: white;
}
.author-box__name {
  font-family: var(--font-mono); font-size: 13px; font-weight: 700;
  color: var(--text); margin-bottom: 4px;
}
.author-box__role {
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 1px;
  color: var(--text-dim); text-transform: uppercase; margin-bottom: 10px;
}
.author-box__bio { font-size: 13px; color: var(--text-muted); line-height: 1.7; font-weight: 300; }

/* Related posts */
.related-posts { margin-top: 56px; }

/* Post nav */
.post-nav {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
  background: var(--border); border: 1px solid var(--border);
  margin-top: 48px;
}
.post-nav__item {
  background: var(--bg); padding: 24px;
  transition: background .25s;
}
.post-nav__item:hover { background: var(--surface); }
.post-nav__dir {
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 2px;
  text-transform: uppercase; color: var(--text-dim); margin-bottom: 8px;
  display: flex; align-items: center; gap: 6px;
}
.post-nav__title {
  font-size: 14px; font-weight: 700; line-height: 1.5;
  color: var(--text-muted); transition: color .2s;
}
.post-nav__item:hover .post-nav__title { color: var(--accent); }
.post-nav__item--prev .post-nav__dir::before { content: '←'; color: var(--accent); }
.post-nav__item--next { text-align: right; }
.post-nav__item--next .post-nav__dir { justify-content: flex-end; }
.post-nav__item--next .post-nav__dir::after { content: '→'; color: var(--accent); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  margin-top: 0;
}
.footer-main {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr;
  gap: 60px; padding: 60px 0 48px;
  border-bottom: 1px solid var(--border);
}
.footer-brand__logo {
  font-family: var(--font-display); font-size: 36px; letter-spacing: 4px;
  line-height: 1; margin-bottom: 14px;
}
.footer-brand__logo .fire { color: var(--accent); text-shadow: var(--accent-glow); }
.footer-brand__desc {
  font-size: 13px; color: var(--text-muted); line-height: 1.75; font-weight: 300;
  max-width: 280px;
}
.footer-col__title {
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 3px;
  text-transform: uppercase; color: var(--text-dim); margin-bottom: 16px;
}
.footer-col__links { display: flex; flex-direction: column; gap: 10px; }
.footer-col__links a {
  font-size: 13px; color: var(--text-muted); transition: color .2s;
  display: flex; align-items: center; gap: 8px;
}
.footer-col__links a::before {
  content: ''; width: 0; height: 1px; background: var(--accent);
  transition: width .2s;
}
.footer-col__links a:hover { color: var(--accent); }
.footer-col__links a:hover::before { width: 12px; }

.footer-bottom {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 0;
}
.footer-copy {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 1px; color: var(--text-dim);
}
.footer-links { display: flex; gap: 24px; }
.footer-links a {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 1px;
  text-transform: uppercase; color: var(--text-dim); transition: color .2s;
}
.footer-links a:hover { color: var(--accent); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .site-layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .footer-main { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  :root { --header-h: 56px; }
  .container { padding: 0 20px; }
  .primary-nav { display: none; }
  .primary-nav.is-open {
    display: flex; flex-direction: column;
    position: fixed; top: var(--header-h); left: 0; right: 0;
    background: var(--surface); border-bottom: 1px solid var(--border);
    padding: 20px;
  }
  .nav-toggle { display: flex; }
  .header-search { display: none; }
  .hero { grid-template-columns: 1fr; }
  .hero__right { display: none; }
  .posts-grid { grid-template-columns: 1fr; }

  /* 通常カード：横長（サムネ左30% / テキスト右70%） */
  .post-card {
    flex-direction: row;
  }
  .post-card__thumb {
    width: 30%;
    flex-shrink: 0;
    aspect-ratio: auto;
    min-height: 100px;
  }
  .post-card__body {
    flex: 1;
    min-width: 0;
  }
  .post-card__excerpt { display: none; }

  /* フィーチャーカードは縦のまま */
  .post-card--featured {
    flex-direction: column;
  }
  .post-card--featured .post-card__thumb {
    width: 100%;
    aspect-ratio: 16/9;
  }
  .post-card--featured .post-card__excerpt { display: block; }

  .post-list-item { grid-template-columns: 140px 1fr; }
  .footer-main { grid-template-columns: 1fr; gap: 32px; }
  .post-nav { grid-template-columns: 1fr; }
  .stats-bar__inner { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .post-list-item { grid-template-columns: 1fr; }
  .post-list-item__thumb { aspect-ratio: 16/9; }
}