/*
Theme Name: AI駆動経営ラボ
Theme URI: https://aidlab.jp
Author: aidlab
Description: AI駆動経営ラボ - クール・ミニマルダークテーマ
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: aidlab
*/

/* ── Reset & Base ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }

:root {
  --bg:           #0a0a0a;
  --bg-2:         #111111;
  --bg-3:         #1a1a1a;
  --border:       #222222;
  --border-light: #2a2a2a;
  --text:         #e8e8e8;
  --text-muted:   #666666;
  --text-dim:     #999999;
  --accent:       #00e5cc;
  --accent-dim:   rgba(0,229,204,0.10);
  --accent-glow:  rgba(0,229,204,0.15);
  --red:          #ff4444;
  --white:        #ffffff;
  --font-display: 'Syne', sans-serif;
  --font-body:    'Noto Sans JP', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;
  --nav-h:        64px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.8;
  overflow-x: hidden;
}

/* Noise overlay */
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.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
  opacity: 0.35;
}

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }

/* ── WordPress Admin Bar ── */
.admin-bar #site-nav { top: 32px; }
@media screen and (max-width: 782px) {
  .admin-bar #site-nav { top: 46px; }
}
.admin-bar .hero { padding-top: calc(var(--nav-h) + 32px + 4rem); }
@media screen and (max-width: 782px) {
  .admin-bar .hero { padding-top: calc(var(--nav-h) + 46px + 3rem); }
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ══════════════════════════════
   NAVIGATION
══════════════════════════════ */
#site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  border-bottom: 1px solid var(--border);
  background: rgba(10,10,10,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-logo img {
  height: 28px;
  width: auto;
  display: block;
}

.logo-main {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.logo-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  margin-left: 0.3rem;
  vertical-align: middle;
  animation: dot-pulse 2s infinite;
}

@keyframes dot-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.35; transform: scale(0.75); }
}

.logo-sub {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--accent);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Desktop nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color 0.2s;
  white-space: nowrap;
}

.nav-links a:hover { color: var(--accent); }

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}

.nav-hamburger span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--text-muted);
  transition: all 0.3s;
}

.nav-hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile menu */
.nav-mobile {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0;
  background: rgba(10,10,10,0.97);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 2rem;
  z-index: 99;
  transform: translateY(-10px);
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
}

.admin-bar .nav-mobile { top: calc(var(--nav-h) + 32px); }
@media screen and (max-width: 782px) {
  .admin-bar .nav-mobile { top: calc(var(--nav-h) + 46px); }
}

.nav-mobile.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: all;
  display: block;
}

.nav-mobile ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.nav-mobile a {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color 0.2s;
}

.nav-mobile a:hover { color: var(--accent); }

/* ══════════════════════════════
   HERO
══════════════════════════════ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: calc(var(--nav-h) + 4rem);
  padding-bottom: 4rem;
  padding-left: 2rem;
  padding-right: 2rem;
  position: relative;
  overflow: hidden;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.3;
  -webkit-mask-image: radial-gradient(ellipse at 30% 50%, black 20%, transparent 65%);
          mask-image: radial-gradient(ellipse at 30% 50%, black 20%, transparent 65%);
  pointer-events: none;
}

.hero-glow {
  position: absolute;
  top: 10%; left: -15%;
  width: 700px; height: 700px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 65%);
  pointer-events: none;
}

.hero-content {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  position: relative;
  z-index: 1;
}

/* Two-column hero: text left, visual placeholder right */
.hero-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

/* Placeholder keeps the text column at ~half width;
   the actual canvas is a separate hero-level layer. */
.hero-visual {
  position: relative;
  width: 100%;
  min-height: 420px;
}

/* Canvas spans the full right half of the hero section,
   edge-to-edge with the viewport, full hero height.
   Sits above the grid/glow but below the text content. */
#neural-canvas {
  position: absolute;
  top: 0;
  right: 0;
  width: 50vw;
  height: 100%;
  display: block;
  pointer-events: none;
  z-index: 0;
}

.hero-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--accent);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.hero-tag::before {
  content: '';
  display: block;
  width: 24px;
  height: 1px;
  background: var(--accent);
  flex-shrink: 0;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 5.5vw, 5rem);
  font-weight: 800;
  line-height: 1.0;
  letter-spacing: -0.04em;
  color: var(--white);
  margin-bottom: 1.5rem;
}

.hero-title .accent-line {
  color: var(--accent);
  display: block;
}

.hero-subtitle {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-muted);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 2.5rem;
}

.hero-desc {
  max-width: 460px;
  font-size: 0.95rem;
  color: var(--text-dim);
  line-height: 2;
  margin-bottom: 3rem;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 0.85rem 2rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
}

.hero-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}

.hero-cta:hover::before { transform: translateX(0); }
.hero-cta:hover { color: var(--bg); }
.hero-cta span { position: relative; z-index: 1; }

/* ══════════════════════════════
   TICKER
══════════════════════════════ */
.ticker-wrap {
  background: var(--accent);
  padding: 0.7rem 0;
  overflow: hidden;
  white-space: nowrap;
}

.ticker-inner {
  display: inline-flex;
  gap: 4rem;
  animation: ticker-scroll 25s linear infinite;
}

.ticker-item {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--bg);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ══════════════════════════════
   SECTION BASE
══════════════════════════════ */
.section { padding: 6rem 2rem; }
.section-inner { max-width: 1200px; margin: 0 auto; }

.section-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--accent);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-label::after {
  content: '';
  display: block;
  width: 48px;
  height: 1px;
  background: var(--border-light);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 4vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 3rem;
}

/* ══════════════════════════════
   POSTS SECTION
══════════════════════════════ */
.posts-section { background: var(--bg); }

.posts-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.posts-header .section-title { margin-bottom: 0; }

.view-all {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color 0.2s;
  white-space: nowrap;
}

.view-all:hover { color: var(--accent); }

.posts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
}

/* Post card */
.post-card {
  background: var(--bg);
  padding: 2.5rem;
  display: block;
  text-decoration: none;
  position: relative;
  transition: background 0.2s;
  overflow: hidden;
}

.post-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width 0.4s ease;
}

.post-card:hover { background: var(--bg-2); }
.post-card:hover::after { width: 100%; }

/* Featured (full-width) post */
.post-card.featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: start;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.post-cat {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 0.18rem 0.55rem;
  white-space: nowrap;
}

.post-date {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}

.post-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.35;
  margin-bottom: 0.85rem;
  letter-spacing: -0.02em;
}

.post-card.featured .post-title { font-size: 1.7rem; }

.post-excerpt {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.85;
}

.post-number {
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--border-light);
  line-height: 1;
  align-self: flex-end;
  flex-shrink: 0;
}

/* Thumbnail */
.post-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
  margin-bottom: 1.5rem;
  filter: grayscale(30%);
  transition: filter 0.3s;
}

.post-card:hover .post-thumb { filter: grayscale(0%); }

/* ══════════════════════════════
   CATEGORIES
══════════════════════════════ */
.cats-section {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.cats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
}

.cat-card {
  background: var(--bg-2);
  padding: 2.5rem;
  display: block;
  text-decoration: none;
  position: relative;
  transition: background 0.2s;
}

.cat-card:hover { background: var(--bg-3); }

.cat-num {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-muted);
  letter-spacing: 0.15em;
  margin-bottom: 1.5rem;
}

.cat-name {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.02em;
  margin-bottom: 0.3rem;
}

.cat-name-en {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--accent);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.cat-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.75;
}

.cat-arrow {
  position: absolute;
  bottom: 2.5rem; right: 2.5rem;
  font-size: 1.1rem;
  color: var(--border-light);
  transition: all 0.2s;
}

.cat-card:hover .cat-arrow {
  color: var(--accent);
  transform: translate(3px,-3px);
}

/* ══════════════════════════════
   ABOUT SECTION
══════════════════════════════ */
.about-section { background: var(--bg); }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.about-box {
  border: 1px solid var(--border-light);
  padding: 3rem;
  background: var(--bg-2);
  position: relative;
}

.about-box::before {
  content: '';
  position: absolute;
  top: -1px; left: 2rem;
  width: 56px; height: 2px;
  background: var(--accent);
}

.about-stat {  margin-bottom: 2rem;
}
.about-stat:last-child { margin-bottom: 0; }

.stat-value {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.04em;
  line-height: 1;
}
.stat-value span { color: var(--accent); }

.stat-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-muted);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  margin-top: 0.35rem;
}

.about-text .section-label { margin-bottom: 0.75rem; }
.about-text .section-title { margin-bottom: 1.5rem; }

.about-text p {
  font-size: 0.92rem;
  color: var(--text-dim);
  line-height: 2;
  margin-bottom: 1.5rem;
}
.about-text p:last-child { margin-bottom: 0; }
.about-text strong { color: var(--white); font-weight: 500; }

/* ══════════════════════════════
   PAGE / SINGLE (記事ページ)
══════════════════════════════ */
.page-wrap {
  padding-top: calc(var(--nav-h) + 4rem);
  padding-bottom: 6rem;
  min-height: 100vh;
}

.article {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 2rem;
}

.article-header { margin-bottom: 3rem; }

.article-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  color: var(--white);
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin: 1rem 0;
}

.article-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  margin-bottom: 3rem;
  border: 1px solid var(--border);
}

/* 記事本文 (ブロックエディタ出力のスタイリング) */
.article-body {
  font-size: 1rem;
  color: var(--text-dim);
  line-height: 2;
}

.article-body > * { margin-bottom: 1.6rem; }

.article-body h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.02em;
  margin-top: 3rem;
  margin-bottom: 1.2rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border-light);
}

.article-body h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--white);
  margin-top: 2.4rem;
  margin-bottom: 1rem;
}

.article-body h4 {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text);
  margin-top: 2rem;
}

.article-body p { color: var(--text-dim); }

.article-body a {
  color: var(--accent);
  border-bottom: 1px solid var(--accent-dim);
  transition: border-color 0.2s;
}
.article-body a:hover { border-bottom-color: var(--accent); }

.article-body strong { color: var(--white); font-weight: 500; }

.article-body ul,
.article-body ol {
  padding-left: 1.5rem;
  color: var(--text-dim);
}
.article-body li { margin-bottom: 0.6rem; }
.article-body ul li::marker { color: var(--accent); }
.article-body ol li::marker { color: var(--accent); font-family: var(--font-mono); }

.article-body blockquote {
  border-left: 2px solid var(--accent);
  padding: 0.5rem 0 0.5rem 1.5rem;
  margin: 2rem 0;
  color: var(--text-muted);
  font-style: italic;
  background: var(--bg-2);
}

.article-body code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--bg-3);
  color: var(--accent);
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
}

.article-body pre {
  background: var(--bg-2);
  border: 1px solid var(--border);
  padding: 1.5rem;
  overflow-x: auto;
  border-radius: 4px;
}
.article-body pre code {
  background: none;
  color: var(--text);
  padding: 0;
}

.article-body img {
  border: 1px solid var(--border);
  margin: 2rem auto;
}

.article-body figure { margin: 2rem 0; }
.article-body figcaption {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 0.75rem;
}

/* WordPress alignment classes */
.article-body .aligncenter { margin-left: auto; margin-right: auto; }
.article-body .alignleft { float: left; margin-right: 1.5rem; }
.article-body .alignright { float: right; margin-left: 1.5rem; }
.article-body .alignwide { width: 100%; }

/* WP table */
.article-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.article-body th,
.article-body td {
  border: 1px solid var(--border-light);
  padding: 0.7rem 1rem;
  text-align: left;
}
.article-body th {
  background: var(--bg-3);
  color: var(--white);
  font-weight: 500;
}

/* Article footer / tags */
.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.article-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  border: 1px solid var(--border-light);
  padding: 0.3rem 0.7rem;
  letter-spacing: 0.08em;
  transition: all 0.2s;
}
.article-tag:hover { color: var(--accent); border-color: var(--accent); }

/* ══════════════════════════════
   ARCHIVE / INDEX LIST
══════════════════════════════ */
.archive-header {
  padding-top: calc(var(--nav-h) + 4rem);
  padding-bottom: 2rem;
  text-align: center;
}
.archive-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.03em;
}

/* ══════════════════════════════
   PAGINATION
══════════════════════════════ */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 4rem;
  flex-wrap: wrap;
}
.pagination .page-numbers {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  border: 1px solid var(--border-light);
  padding: 0.55rem 0.9rem;
  transition: all 0.2s;
}
.pagination .page-numbers:hover,
.pagination .page-numbers.current {
  color: var(--bg);
  background: var(--accent);
  border-color: var(--accent);
}

/* ══════════════════════════════
   FOOTER
══════════════════════════════ */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 3rem 2rem;
  background: var(--bg);
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-copy {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
}
.footer-note {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--border-light);
  letter-spacing: 0.1em;
}

/* ══════════════════════════════
   FADE-UP ANIMATION
══════════════════════════════ */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .fade-up { opacity: 1; transform: none; transition: none; }
  .ticker-inner { animation: none; }
  .logo-dot { animation: none; }
}

/* ══════════════════════════════
   RESPONSIVE — Tablet (1024px)
══════════════════════════════ */
@media screen and (max-width: 1024px) {
  .about-grid { gap: 3rem; }
  .section { padding: 5rem 2rem; }
}

/* ══════════════════════════════
   RESPONSIVE — Mobile (768px)
══════════════════════════════ */
@media screen and (max-width: 768px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }

  .hero { padding-top: calc(var(--nav-h) + 3rem); }
  .hero-desc { max-width: 100%; }
  .hero-layout {
    grid-template-columns: 1fr;
    gap: 0;
  }
  /* On mobile the network becomes a faint full-width backdrop */
  #neural-canvas {
    width: 100%;
    opacity: 0.4;
    z-index: 0;
  }
  .hero-visual { display: none; }
  .hero-text { position: relative; z-index: 1; }

  .posts-grid { grid-template-columns: 1fr; }
  .post-card.featured {
    grid-template-columns: 1fr;
  }
  .post-card.featured .post-number { display: none; }
  .post-card { padding: 2rem; }

  .cats-grid { grid-template-columns: 1fr; }

  .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .about-box { padding: 2rem; }

  .section { padding: 4rem 1.5rem; }
  .section-title { margin-bottom: 2rem; }

  .article { padding: 0 1.5rem; }
  .article-body .alignleft,
  .article-body .alignright {
    float: none;
    margin: 2rem auto;
  }

  .footer-inner { flex-direction: column; text-align: center; }
}

/* ══════════════════════════════
   RESPONSIVE — Small (480px)
══════════════════════════════ */
@media screen and (max-width: 480px) {
  .nav-inner { padding: 0 1.25rem; }
  .logo-sub { display: none; }

  .hero { padding-left: 1.25rem; padding-right: 1.25rem; }
  .hero-title { font-size: clamp(2.2rem, 11vw, 3rem); }

  .section { padding: 3.5rem 1.25rem; }
  .post-card { padding: 1.5rem; }
  .cat-card { padding: 2rem 1.5rem; }
  .cat-arrow { bottom: 2rem; right: 1.5rem; }

  .article { padding: 0 1.25rem; }
  .stat-value { font-size: 2rem; }
}
