/* ==========================================================================
   Nakano Room Theme - CPC Retro Pixel Design System
   Inspired by Amstrad CPC color palette
   ========================================================================== */

/* =========================
   Design Tokens
   ========================= */
:root {
  /* Colors - CPC Retro Pixel Palette */
  --brand: #887ecb;
  --brand-light: #a8a0df;
  --brand-soft: #6abfc6;
  --brand-pale: #1a1a3e;
  --lavender: #887ecb;
  --cyan: #6abfc6;
  --pink: #db7497;
  --bg: #352879;
  --bg-card: #1a1a3e;
  --ink: #e8e2d9;
  --ink-light: #c8bfaf;
  --ink-muted: #8e849a;
  --paper: #0f0f2a;

  /* Shadows - Pixel style */
  --shadow: 4px 4px 0px rgba(0,0,0,0.6);
  --shadow-soft: 2px 2px 0px rgba(0,0,0,0.4);
  --shadow-card: 3px 3px 0px rgba(0,0,0,0.5);
  --shadow-hover: 5px 5px 0px rgba(0,0,0,0.7);

  /* Radius - Pixel sharp */
  --radius-xl: 4px;
  --radius-lg: 4px;
  --radius-md: 2px;
  --radius-sm: 2px;
  --radius-pill: 2px;

  /* Layout */
  --max: 1120px;
  --max-narrow: 780px;

  /* Spacing (8px scale) */
  --s1: 8px;
  --s2: 16px;
  --s3: 24px;
  --s4: 32px;
  --s5: 48px;
  --s6: 64px;
  --s7: 96px;

  /* Typography - Pixel fonts */
  --font-main: 'VT323', monospace;
  --font-display: 'Press Start 2P', cursive;
  --fs-display: clamp(20px, 2.5vw, 32px);
  --fs-h2: clamp(14px, 1.8vw, 22px);
  --fs-h3: clamp(12px, 1.4vw, 16px);
  --fs-body: 18px;
  --fs-small: 16px;
  --fs-xs: 14px;
  --lh-body: 1.6;
  --lh-heading: 1.3;

  /* Borders */
  --border-dashed: 2px solid #6abfc6;
  --border-thin: 2px solid rgba(106,191,198,0.3);

  /* Transitions */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --duration: 0.4s;

  /* Retro-specific */
  --pixel-border: 3px solid #000;
  --pixel-shadow: 4px 4px 0px #000;
  --font-pixel: 'Press Start 2P', cursive;
  --font-mono: 'VT323', monospace;
}

/* =========================
   Base Reset
   ========================= */
*, *::before, *::after { box-sizing: border-box; }
html { height: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-main);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-weight: 400;
  -webkit-font-smoothing: none;
  image-rendering: pixelated;
}

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

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

:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* =========================
   Skip Link
   ========================= */
.skip-link {
  position: absolute;
  left: -9999px;
  top: var(--s1);
  background: var(--bg-card);
  border: 2px solid var(--cyan);
  padding: var(--s1) var(--s2);
  border-radius: var(--radius-sm);
  font-weight: 700;
  z-index: 9999;
}
.skip-link:focus { left: var(--s1); }

/* =========================
   Loading Screen
   ========================= */
.loading-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s var(--ease), visibility 0.6s;
}

body:not(.is-loading) .loading-screen {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loading-inner {
  text-align: center;
}

.loading-mark {
  display: block;
  font-size: 48px;
  animation: loading-bounce 1.2s var(--ease) infinite;
}

.loading-text {
  display: block;
  margin-top: var(--s2);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  color: var(--brand);
  letter-spacing: 0.1em;
}

@keyframes loading-bounce {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-12px) rotate(-8deg); }
}

/* =========================
   Custom Cursor
   ========================= */
.cursor {
  position: fixed;
  top: 0; left: 0;
  width: 20px; height: 20px;
  background: var(--lavender);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  opacity: 0;
  transition: width 0.25s var(--ease), height 0.25s var(--ease), opacity 0.3s;
  transform: translate(-50%, -50%);
  mix-blend-mode: multiply;
}

.cursor.is-enabled { opacity: 0.6; }
.cursor.is-hover { width: 48px; height: 48px; opacity: 0.3; }

/* =========================
   Header
   ========================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--paper);
  border-bottom: 3px solid #6abfc6;
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 8px var(--s3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
}

/* Brand */
.brand {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  color: #e8e2d9 !important;
  text-decoration: none;
}
.brand a {
  color: #e8e2d9 !important;
}
.brand:hover { color: var(--brand) !important; }
.brand a:hover { color: var(--brand) !important; }

.brand-mark {
  width: 38px; height: 38px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--lavender), var(--cyan));
  color: white;
  font-size: 20px;
  box-shadow: var(--shadow-soft);
  transform: rotate(-4deg);
}

.brand-text {
  letter-spacing: 0.02em;
}

/* Nav toggle (mobile) */
.nav-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 8px 6px;
  background: var(--bg-card);
  border: var(--border-dashed);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: transform 0.3s var(--ease);
}
.nav-toggle:hover { transform: rotate(-4deg); }

.nav-toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--brand);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.3s;
}

/* Nav toggle active state */
.site-nav.is-open .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.site-nav.is-open .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}
.site-nav.is-open .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Nav list */
.nav-list {
  display: none;
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Mobile nav open */
.site-nav.is-open .nav-list {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg);
  border-bottom: var(--border-dashed);
  padding: var(--s3);
  gap: var(--s1);
  box-shadow: var(--shadow-soft);
}

.nav-list li { margin: 0; position: relative; }

.nav-list a {
  display: block;
  padding: var(--s1) var(--s2);
  border-radius: var(--radius-pill);
  font-weight: 500;
  color: #e8e2d9 !important;
  transition: all 0.3s var(--ease);
}
.nav-list a:hover {
  background: var(--brand-pale);
  color: var(--brand);
  transform: translateX(4px);
}

/* Current menu item */
.nav-list .current-menu-item a,
.nav-list .current_page_item a {
  background: var(--brand-pale);
  color: var(--brand);
  font-weight: 700;
}

/* Sub-menu (dropdown) - hidden by default, show on hover */
.nav-list .sub-menu {
  display: none;
  list-style: none;
  padding: 0;
  margin: 0;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--paper);
  border: 2px solid #6abfc6;
  box-shadow: var(--pixel-shadow, 4px 4px 0px #000);
  min-width: 180px;
  z-index: 200;
}

.nav-list li:hover > .sub-menu,
.nav-list li:focus-within > .sub-menu {
  display: block;
}

.nav-list .sub-menu a {
  padding: 8px 16px;
  font-size: var(--fs-small);
  white-space: nowrap;
}

/* =========================
   Hero Section
   ========================= */
.hero {
  position: relative;
  overflow: hidden;
  padding: 0;
  min-height: 340px;
  max-height: 400px;
  display: flex;
  align-items: flex-end;
  background: var(--bg);
}

/* Hero background video */
.hero-video-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%; /* show the cat (upper portion of video) */
  z-index: 0;
}

/* Dark overlay so text is readable over video */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(15, 15, 42, 0.85) 0%,
    rgba(53, 40, 121, 0.4) 50%,
    rgba(53, 40, 121, 0.2) 100%
  );
  z-index: 1;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: var(--max);
  margin: 0 auto;
  padding: 24px var(--s3) 28px;
  display: grid;
  gap: var(--s3);
  align-items: end;
}

.display {
  font-family: var(--font-display);
  font-size: var(--fs-display);
  font-weight: 800;
  line-height: var(--lh-heading);
  margin: 0 0 var(--s2);
  color: var(--ink);
}

.lead {
  margin: 0 0 var(--s4);
  max-width: 52ch;
  color: var(--ink-light);
  font-size: 17px;
}

.hero-cta {
  display: flex;
  gap: var(--s2);
  flex-wrap: nowrap;
  margin-left: 320px;
}
.hero-cta .btn {
  white-space: nowrap;
  flex-shrink: 0;
}

/* Hero decorations */
.hero-collage {
  position: relative;
  min-height: 280px;
}

.hero-shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.6;
}

.hero-shape-1 {
  width: 200px; height: 200px;
  background: linear-gradient(135deg, var(--lavender), var(--brand-pale));
  top: 10%; right: 10%;
  animation: float 6s ease-in-out infinite;
}

.hero-shape-2 {
  width: 140px; height: 140px;
  background: linear-gradient(135deg, var(--cyan), rgba(116, 196, 228, 0.4));
  bottom: 20%; right: 30%;
  animation: float 8s ease-in-out infinite reverse;
}

.hero-shape-3 {
  width: 100px; height: 100px;
  background: linear-gradient(135deg, var(--pink), rgba(232, 160, 200, 0.4));
  top: 40%; left: 5%;
  animation: float 7s ease-in-out infinite 1s;
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-16px) rotate(6deg); }
}

.label {
  position: absolute;
  background: var(--bg-card);
  border: 3px solid var(--brand);
  color: var(--brand);
  border-radius: var(--radius-pill);
  padding: var(--s1) var(--s2);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: var(--fs-small);
  transform: rotate(-8deg);
  box-shadow: var(--shadow-soft);
}

.label-new {
  right: 20%;
  top: 10%;
}

.scribble {
  position: absolute;
  right: 24px;
  top: 50%;
  width: 80px; height: 80px;
  background:
    radial-gradient(circle at 30% 30%, rgba(116, 196, 228, 0.4), transparent 60%),
    radial-gradient(circle at 60% 70%, rgba(196, 164, 228, 0.4), transparent 55%);
  border-radius: 50%;
  filter: blur(1px);
  transform: rotate(12deg);
}

.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: var(--s3);
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  opacity: 0.5;
  animation: scroll-bounce 2s ease-in-out infinite;
}

.scroll-text {
  font-size: var(--fs-xs);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.scroll-arrow {
  font-size: 18px;
  color: var(--brand-soft);
}

@keyframes scroll-bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(6px); }
}

/* =========================
   Buttons
   ========================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s1);
  border-radius: var(--radius-sm);
  padding: 14px 28px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-body);
  border: 3px solid #fff;
  background: var(--bg-card);
  color: var(--ink);
  cursor: pointer;
  transition: all 0.15s steps(2);
  box-shadow: var(--pixel-shadow);
  text-decoration: none;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  color: var(--ink);
}

.btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0px #000;
}

.btn-primary {
  background: linear-gradient(135deg, var(--lavender), var(--brand-soft));
  border-color: transparent;
  color: white;
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--brand-light), var(--lavender));
  color: white;
}

.btn-ghost {
  background: transparent;
  border-style: dashed;
}
.btn-ghost:hover {
  background: var(--brand-pale);
}

/* =========================
   Filters / Chips
   ========================= */
.filters {
  max-width: var(--max);
  margin: 0 auto;
  padding: var(--s3) var(--s3) var(--s4);
}

.chip-row {
  display: flex;
  gap: var(--s1);
  flex-wrap: wrap;
}

.chip {
  display: inline-block;
  border: none;
  cursor: pointer;
  background: rgba(196, 164, 228, 0.18);
  color: var(--ink);
  padding: var(--s1) var(--s2);
  border-radius: var(--radius-lg);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--fs-small);
  text-decoration: none;
  transition: all 0.3s var(--ease);
  box-shadow: var(--shadow-soft);
}

.chip:hover {
  background: rgba(196, 164, 228, 0.35);
  transform: translateY(-2px) rotate(-1deg);
}

.chip.is-active {
  background: var(--bg-card);
  outline: 3px solid var(--cyan);
  font-weight: 700;
  transform: rotate(-2deg);
}

.chip-sm {
  padding: 4px 12px;
  font-size: var(--fs-xs);
  border-radius: var(--radius-md);
}

/* =========================
   Section Headings
   ========================= */
.section-head {
  max-width: var(--max);
  margin: 0 auto var(--s4);
  padding: 0 var(--s3);
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--fs-h2);
  font-weight: 800;
  line-height: var(--lh-heading);
  margin: 0;
  position: relative;
  display: inline-block;
}

/* ピクセル風下線 */
.section-title::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 0;
  border-bottom: 3px dashed var(--cyan);
  z-index: -1;
}

.section-sub {
  margin: var(--s1) 0 0;
  color: var(--ink-muted);
  font-size: var(--fs-small);
}

/* =========================
   Post Grid / Cards
   ========================= */
.posts {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--s3) var(--s7);
}

.post-grid {
  display: grid;
  gap: var(--s3);
  grid-template-columns: 1fr;
}

.card {
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--pixel-shadow);
  transition: all 0.15s steps(2);
  border: var(--pixel-border);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.card-media {
  margin: 0;
  overflow: hidden;
  aspect-ratio: 4 / 3;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.card:hover .card-media img {
  transform: scale(1.05);
}

.card-media-placeholder {
  background: linear-gradient(135deg, var(--brand-pale), rgba(116, 196, 228, 0.15));
  display: flex;
  align-items: center;
  justify-content: center;
}

.placeholder-icon {
  font-size: 48px;
  opacity: 0.3;
}

.card-body {
  padding: var(--s3);
}

.meta {
  margin: 0 0 var(--s1);
  color: var(--ink-muted);
  font-size: var(--fs-xs);
  display: flex;
  align-items: center;
  gap: 6px;
}

.dot { opacity: 0.4; }

.tag {
  display: inline-block;
  background: var(--brand-pale);
  color: var(--brand);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 11px;
  transform: rotate(-1deg);
}

.card-title {
  margin: 0 0 var(--s1);
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  font-weight: 700;
  line-height: 1.4;
  color: var(--ink);
}

.card-excerpt {
  margin: 0;
  color: var(--ink-light);
  font-size: var(--fs-small);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* =========================
   Scroll Reveal
   ========================= */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-inview {
  opacity: 1;
  transform: translateY(0);
}

/* JS無効時: そのまま表示 */
.no-js .reveal {
  opacity: 1;
  transform: none;
}

/* =========================
   Single Article
   ========================= */
.single-article {
  max-width: var(--max-narrow);
  margin: 0 auto;
  padding: 0 var(--s3);
  overflow-x: clip;
}

.single-header {
  padding: var(--s6) 0 var(--s4);
  text-align: center;
}

.single-header-inner { max-width: 640px; margin: 0 auto; }

.single-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  margin-bottom: var(--s3);
  flex-wrap: wrap;
}

.single-cats { display: flex; gap: var(--s1); }

.single-date {
  color: var(--ink-muted);
  font-size: var(--fs-small);
}

.single-updated {
  color: var(--ink-muted);
  font-size: var(--fs-xs);
}

.single-title {
  font-size: clamp(26px, 3.5vw, 44px);
}

/* Hero image */
.single-hero {
  margin: 0 calc(-1 * var(--s3)) var(--s5);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.single-hero img {
  width: 100%;
  height: auto;
}

/* Content */
.single-content {
  font-size: 17px;
  line-height: 2;
  overflow-wrap: break-word;
  word-break: break-word;
}

.single-content p {
  margin: 0 0 var(--s3);
}

.single-content h2 {
  font-family: var(--font-display);
  font-size: var(--fs-h2);
  font-weight: 800;
  margin: var(--s6) 0 var(--s3);
  padding-bottom: var(--s1);
  border-bottom: var(--border-dashed);
  position: relative;
}

.single-content h3 {
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  font-weight: 700;
  margin: var(--s5) 0 var(--s2);
  padding-left: var(--s2);
  border-left: 4px solid var(--lavender);
}

.single-content h4 {
  font-weight: 700;
  margin: var(--s4) 0 var(--s2);
}

.single-content ul,
.single-content ol {
  margin: 0 0 var(--s3);
  padding-left: var(--s3);
}

.single-content li {
  margin-bottom: var(--s1);
}

.single-content blockquote {
  margin: var(--s4) 0;
  padding: var(--s3) var(--s4);
  background: var(--brand-pale);
  border-left: 4px solid var(--lavender);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
  color: var(--ink-light);
}

.single-content pre {
  margin: var(--s4) 0;
  padding: var(--s3);
  background: #1f1b24;
  color: #e8daf5;
  border-radius: var(--radius-md);
  overflow-x: auto;
  max-width: 100%;
  font-size: var(--fs-small);
  line-height: 1.6;
  box-shadow: var(--shadow-soft);
}

.single-content code {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.9em;
}

.single-content p > code,
.single-content li > code {
  background: var(--brand-pale);
  color: var(--brand);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.85em;
}

.single-content img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  margin: var(--s3) 0;
  max-width: 100%;
  height: auto;
}

.single-content table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--s4) 0;
  font-size: var(--fs-small);
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.single-content th,
.single-content td {
  padding: var(--s2);
  text-align: left;
  border-bottom: var(--border-thin);
}

.single-content th {
  background: var(--brand-pale);
  font-weight: 700;
  color: var(--brand);
}

.single-content hr {
  border: none;
  border-top: var(--border-dashed);
  margin: var(--s5) 0;
}

/* Single footer */
.single-footer {
  margin-top: var(--s6);
  padding-top: var(--s4);
  border-top: var(--border-dashed);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: var(--s3);
}

.single-tags {
  display: flex;
  gap: var(--s1);
  flex-wrap: wrap;
}

.tag-link {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(196, 164, 228, 0.15);
  border-radius: var(--radius-pill);
  font-size: var(--fs-xs);
  color: var(--brand);
  font-weight: 500;
  transition: all 0.3s var(--ease);
}
.tag-link:hover {
  background: var(--brand-pale);
  transform: rotate(-2deg);
}

.single-share {
  display: flex;
  align-items: center;
  gap: var(--s1);
}

.share-label {
  font-size: var(--fs-xs);
  color: var(--ink-muted);
}

.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: var(--radius-pill);
  background: var(--brand-pale);
  color: var(--brand);
  font-weight: 800;
  font-size: var(--fs-xs);
  transition: all 0.3s var(--ease);
}
.share-btn:hover {
  background: var(--lavender);
  color: white;
  transform: rotate(-4deg);
}

/* Post navigation */
.post-navigation {
  max-width: var(--max-narrow);
  margin: var(--s5) auto var(--s7);
  padding: 0 var(--s3);
}

.nav-links {
  display: grid;
  gap: var(--s3);
  grid-template-columns: 1fr;
}

.nav-prev,
.nav-next {
  display: block;
  padding: var(--s3);
  text-decoration: none;
  color: var(--ink);
}

.nav-label {
  display: block;
  font-size: var(--fs-xs);
  color: var(--ink-muted);
  margin-bottom: var(--s1);
}

.nav-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-body);
}

/* =========================
   Page Template
   ========================= */
.page-article {
  max-width: var(--max-narrow);
  margin: 0 auto;
  padding: 0 var(--s3);
}

.page-header {
  padding: var(--s6) 0 var(--s4);
  text-align: center;
}

.page-title {
  font-size: clamp(28px, 3.5vw, 48px);
}

.page-content {
  padding-bottom: var(--s7);
}

/* =========================
   404 Page
   ========================= */
.error-404 {
  text-align: center;
  padding: var(--s7) var(--s3);
}

.error-inner {
  max-width: 480px;
  margin: 0 auto;
}

.error-sticker {
  width: 100px; height: 100px;
  margin: 0 auto var(--s4);
  background: linear-gradient(135deg, var(--lavender), var(--cyan));
  border-radius: 50%;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow);
  animation: float 4s ease-in-out infinite;
}

.error-mark {
  font-size: 48px;
  color: white;
  font-weight: 900;
}

.error-title {
  color: var(--brand);
  margin-bottom: var(--s2);
}

.error-message {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: var(--s2);
}

.error-desc {
  color: var(--ink-muted);
  margin-bottom: var(--s4);
}

/* =========================
   No Posts
   ========================= */
.no-posts {
  text-align: center;
  padding: var(--s7) var(--s3);
  color: var(--ink-muted);
}

/* =========================
   Pagination
   ========================= */
.pagination,
.nav-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--s1);
  padding: var(--s5) 0;
}

.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px; height: 40px;
  padding: 0 var(--s2);
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  border: var(--border-thin);
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  transition: all 0.3s var(--ease);
  box-shadow: var(--shadow-soft);
}

.page-numbers:hover {
  background: var(--brand-pale);
  transform: translateY(-2px);
}

.page-numbers.current {
  background: var(--lavender);
  color: white;
  border-color: transparent;
  transform: rotate(-2deg);
}

/* =========================
   Footer
   ========================= */
.site-footer {
  position: relative;
  background: var(--paper);
  color: rgba(232, 226, 217, 0.7);
  overflow: hidden;
  border-top: 3px solid #6abfc6;
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: var(--s6) var(--s3) var(--s4);
  display: grid;
  gap: var(--s4);
}

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

.footer-mark {
  display: inline-block;
  font-size: 32px;
  margin-bottom: var(--s1);
}

.footer-name {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  color: var(--brand-light);
  margin-bottom: var(--s1);
}

.footer-desc {
  margin: 0;
  font-size: var(--fs-small);
  color: rgba(255, 255, 255, 0.5);
}

.footer-nav-area {
  display: flex;
  justify-content: center;
  gap: var(--s5);
  flex-wrap: wrap;
}

.footer-menu {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: var(--s3);
  flex-wrap: wrap;
  justify-content: center;
}

.footer-menu a {
  color: rgba(255, 255, 255, 0.6);
  font-size: var(--fs-small);
  transition: color 0.3s var(--ease);
}
.footer-menu a:hover { color: var(--brand-light); }

.social-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: var(--s2);
}

.social-list a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.6);
  font-size: var(--fs-xs);
  font-weight: 800;
  transition: all 0.3s var(--ease);
}
.social-list a:hover {
  background: var(--brand);
  color: white;
  transform: rotate(-4deg);
}

.footer-bottom {
  text-align: center;
  padding-top: var(--s3);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-bottom small {
  font-size: var(--fs-xs);
  color: rgba(255, 255, 255, 0.3);
}

/* Footer decoration */
.footer-deco {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 6px;
  background: linear-gradient(90deg,
    var(--brand),
    var(--lavender),
    var(--cyan),
    var(--pink),
    var(--brand)
  );
}

/* =========================
   Search Form
   ========================= */
.search-form {
  display: flex;
  gap: var(--s1);
  max-width: 400px;
  margin: var(--s3) auto;
}

.search-form .search-field {
  flex: 1;
  padding: var(--s2);
  border: var(--border-dashed);
  border-radius: var(--radius-pill);
  font-family: var(--font-main);
  font-size: var(--fs-body);
  background: var(--bg-card);
  color: var(--ink);
}

.search-form .search-submit {
  padding: var(--s2) var(--s3);
  border: none;
  border-radius: var(--radius-pill);
  background: var(--lavender);
  color: white;
  font-family: var(--font-display);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s var(--ease);
}
.search-form .search-submit:hover {
  background: var(--brand);
}

/* =========================
   WordPress Block Editor Alignments
   ========================= */
.alignwide {
  max-width: calc(var(--max) + var(--s6));
  margin-left: auto;
  margin-right: auto;
}

.alignfull {
  max-width: 100%;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
}

/* =========================
   Tablet (720px+)
   ========================= */
@media (min-width: 720px) {
  .hero-inner {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
  }

  .post-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .nav-links {
    grid-template-columns: 1fr 1fr;
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
    text-align: left;
  }

  .footer-brand { text-align: left; }
  .footer-nav-area { justify-content: flex-end; }
}

/* =========================
   Desktop (960px+)
   ========================= */
@media (min-width: 960px) {
  /* Nav: horizontal */
  .nav-list {
    display: flex !important;
    position: static;
    background: none;
    border: none;
    padding: 0;
    gap: 4px;
    box-shadow: none;
  }

  .nav-list a {
    padding: var(--s1) var(--s2);
  }
  .nav-list a:hover {
    transform: none;
  }

  .nav-toggle { display: none; }

  /* Cards: 3 columns */
  .post-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Single: wider hero */
  .single-hero {
    margin-left: calc(-1 * var(--s6));
    margin-right: calc(-1 * var(--s6));
  }
}

/* =========================
   Large Desktop (1200px+)
   ========================= */
@media (min-width: 1200px) {
  .hero {
    padding: 32px 0 16px;
  }

  .hero-collage {
    min-height: 280px;
  }

  .hero-shape-1 { width: 260px; height: 260px; }
  .hero-shape-2 { width: 180px; height: 180px; }
  .hero-shape-3 { width: 130px; height: 130px; }
}

/* =========================
   Motion Safety
   ========================= */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .loading-screen { display: none; }
  .cursor { display: none; }
}
