@import url('https://fonts.googleapis.com/css2?family=Exo:wght@300;400;500;600;700&family=Roboto+Mono:wght@300;400;500;700&display=swap');

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --c-white: #ffffff;
  --c-light: #f5f5f5;
  --c-dark: #1f1f1f;
  --c-mid: #3a3a3a;
  --c-accent: #2a2a2a;
  --c-border: rgba(31,31,31,0.10);
  --c-shadow-sm: 0 2px 8px rgba(31,31,31,0.08), 0 1px 2px rgba(31,31,31,0.04);
  --c-shadow-md: 0 6px 20px rgba(31,31,31,0.10), 0 2px 6px rgba(31,31,31,0.06);
  --c-shadow-lg: 0 12px 36px rgba(31,31,31,0.13), 0 4px 12px rgba(31,31,31,0.07);
  --c-shadow-xl: 0 24px 60px rgba(31,31,31,0.16), 0 8px 20px rgba(31,31,31,0.09);
  --radius: 18px;
  --radius-sm: 10px;
  --radius-pill: 999px;
  --font-body: 'Exo', 'PingFang SC', 'Hiragino Sans GB', system-ui, sans-serif;
  --font-mono: 'Roboto Mono', 'Courier New', monospace;
  --nav-h: 64px;
  --sidebar-w: 220px;
  --content-max: 780px;
  --page-max: 1140px;
  --transition: 0.25s cubic-bezier(0.4,0,0.2,1);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--c-dark);
  background: var(--c-light);
  min-height: 100vh;
  padding-bottom: calc(var(--nav-h) + 16px);
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
img { display: block; max-width: 100%; height: auto; }
ul, ol { list-style: none; }

.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;
}

/* ── Page Wrap ── */
.page-wrap {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 16px;
}

/* ── Bottom Fixed Nav ── */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--c-border);
  box-shadow: 0 -4px 24px rgba(31,31,31,0.10);
  height: var(--nav-h);
}

.bottom-nav-inner {
  max-width: var(--page-max);
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
}

.brand-icon {
  flex-shrink: 0;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: var(--c-dark);
  border-radius: var(--radius-sm);
  color: var(--c-white);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 18px;
  text-decoration: none;
}
.brand-icon img { width: 32px; height: 32px; border-radius: 6px; }
.brand-mono { font-family: var(--font-mono); font-size: 18px; }

.nav-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-pills::-webkit-scrollbar { display: none; }
.nav-pills dt { display: none; }
.nav-pills dd { display: contents; }

.pill-btn {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  padding: 8px 14px;
  min-height: 40px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 500;
  background: var(--c-light);
  color: var(--c-dark);
  border: 1px solid var(--c-border);
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
  text-decoration: none;
}
.pill-btn:hover {
  background: var(--c-dark);
  color: var(--c-white);
  box-shadow: var(--c-shadow-md);
  text-decoration: none;
}

.nav-search {
  display: flex;
  align-items: center;
  background: var(--c-light);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-pill);
  overflow: hidden;
  flex-shrink: 0;
}
.nav-search input {
  border: none;
  background: transparent;
  padding: 8px 12px;
  font-size: 13px;
  font-family: var(--font-mono);
  width: 110px;
  outline: none;
  min-height: 40px;
  color: var(--c-dark);
}
.nav-search button {
  border: none;
  background: transparent;
  padding: 8px 10px;
  cursor: pointer;
  font-size: 16px;
  min-height: 40px;
  min-width: 40px;
  color: var(--c-dark);
}

/* ── Hero ── */
.hero-block {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  gap: 48px;
  padding: 80px 0 60px;
  overflow: hidden;
}

.hero-text {
  flex: 1;
  text-align: right;
  z-index: 2;
  position: relative;
}

.hero-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  padding: 4px 14px;
  border: 1px solid var(--c-dark);
  border-radius: var(--radius-pill);
  margin-bottom: 20px;
  background: var(--c-white);
  box-shadow: var(--c-shadow-sm);
}

.hero-text h1 {
  font-size: clamp(28px, 5vw, 52px);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 18px;
  letter-spacing: -0.02em;
}

.hero-desc {
  font-size: 16px;
  color: var(--c-mid);
  margin-bottom: 32px;
  max-width: 420px;
  margin-left: auto;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  padding: 14px 28px;
  min-height: 48px;
  background: var(--c-dark);
  color: var(--c-white);
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 15px;
  box-shadow: var(--c-shadow-lg);
  transition: transform var(--transition), box-shadow var(--transition);
  text-decoration: none;
}
.cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--c-shadow-xl);
  text-decoration: none;
}

.hero-media {
  flex: 0 0 42%;
  max-width: 480px;
  position: relative;
  z-index: 2;
}
.hero-img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--c-shadow-xl);
}
.hero-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 320px;
  background: var(--c-white);
  border-radius: var(--radius);
  box-shadow: var(--c-shadow-xl);
}
.hero-icon {
  font-family: var(--font-mono);
  font-size: 80px;
  font-weight: 700;
  color: var(--c-dark);
  opacity: 0.08;
}

.float-badge {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  padding: 6px 14px;
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-pill);
  box-shadow: var(--c-shadow-md);
  z-index: 3;
  top: 18%;
  right: 36%;
  pointer-events: none;
}
.float-badge-2 {
  top: auto;
  bottom: 22%;
  right: 30%;
}

/* ── Layout: Sidebar + Content ── */
.content-section,
.topic-hero-section,
.topic-content-section,
.article-top-section,
.article-body-section,
.info-top-section {
  display: flex;
  gap: 32px;
  padding: 40px 0;
}

.sidebar {
  flex: 0 0 var(--sidebar-w);
  position: relative;
  z-index: 2;
}

.sidebar-inner {
  background: var(--c-white);
  border-radius: var(--radius);
  box-shadow: var(--c-shadow-md);
  padding: 24px 20px;
  position: sticky;
  top: 20px;
}

.sidebar-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--c-mid);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--c-border);
}

.sidebar dl { margin-bottom: 16px; }
.sidebar dl:last-child { margin-bottom: 0; }
.sidebar dt {
  font-size: 13px;
  font-weight: 600;
  color: var(--c-dark);
  margin-bottom: 8px;
}
.sidebar dd { margin: 0; }
.sidebar dd a {
  display: block;
  padding: 6px 10px;
  min-height: 36px;
  font-size: 13px;
  border-radius: var(--radius-sm);
  color: var(--c-mid);
  transition: background var(--transition), color var(--transition);
  text-decoration: none;
  line-height: 1.4;
  display: flex;
  align-items: center;
}
.sidebar dd a:hover {
  background: var(--c-light);
  color: var(--c-dark);
  text-decoration: none;
}

.main-content {
  flex: 1;
  min-width: 0;
}

/* ── Breadcrumb ── */
.breadcrumb {
  font-size: 13px;
  color: var(--c-mid);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--c-mid); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

/* ── Prose ── */
.prose-body {
  font-size: 17px;
  line-height: 1.8;
  color: var(--c-dark);
}
.prose-body h2, .prose-body h3 {
  font-weight: 700;
  margin: 28px 0 12px;
}
.prose-body h2 { font-size: 22px; }
.prose-body h3 { font-size: 18px; }
.prose-body p { margin-bottom: 16px; }
.prose-body ul, .prose-body ol { padding-left: 20px; margin-bottom: 16px; }
.prose-body ul { list-style: disc; }
.prose-body ol { list-style: decimal; }
.prose-body li { margin-bottom: 6px; }
.prose-body a { color: var(--c-dark); text-decoration: underline; }
.prose-body hr {
  border: none;
  border-top: 2px solid var(--c-border);
  margin: 24px 0;
}
.prose-body table { border-collapse: collapse; width: 100%; margin-bottom: 16px; }
.prose-body th, .prose-body td {
  border: 1px solid var(--c-border);
  padding: 8px 12px;
  text-align: left;
}
.prose-body th { background: var(--c-light); font-weight: 600; }

/* ── Article Meta ── */
.article-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.pub-date, .mod-date {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--c-mid);
  padding: 4px 10px;
  background: var(--c-light);
  border-radius: var(--radius-pill);
}

/* ── Article Hero Figure ── */
.article-hero-figure {
  margin: 0 0 24px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--c-shadow-lg);
}
.article-hero-img { width: 100%; }

/* ── Prose Article ── */
.prose-article {
  background: var(--c-white);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--c-shadow-md);
  position: relative;
  z-index: 1;
  margin-bottom: 24px;
}

/* ── Inline Aside ── */
.inline-aside {
  background: var(--c-light);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--c-shadow-sm);
}
.inline-aside h2 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}
.inline-aside hr {
  border: none;
  border-top: 2px solid var(--c-border);
  margin-bottom: 16px;
}
.inline-aside dl dt {
  font-size: 13px;
  font-weight: 600;
  color: var(--c-mid);
  margin-bottom: 8px;
}
.inline-aside dl dd { margin: 0; }
.inline-aside dl dd a {
  display: block;
  padding: 5px 0;
  font-size: 14px;
  color: var(--c-dark);
  text-decoration: none;
  border-bottom: 1px solid var(--c-border);
}
.inline-aside dl dd a:hover { text-decoration: underline; }

/* ── Section Deco ── */
.section-deco, .topic-deco {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}
.deco-line {
  display: block;
  flex: 1;
  height: 2px;
  background: var(--c-border);
  border-radius: 2px;
}
.deco-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  padding: 4px 12px;
  background: var(--c-dark);
  color: var(--c-white);
  border-radius: var(--radius-pill);
}
.deco-count {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--c-mid);
}

/* ── Topic/Home h1 ── */
.main-content h1 {
  font-size: clamp(24px, 4vw, 40px);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 14px;
  letter-spacing: -0.02em;
}
.topic-desc {
  font-size: 16px;
  color: var(--c-mid);
  margin-bottom: 0;
}

/* ── Topics Section (Home) ── */
.topics-section, .article-list-section {
  padding: 40px 0;
}
.topics-section h2, .article-list-section h2,
.about-links-section h2, .privacy-nav-section h2 {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 8px;
}
.topics-section > hr, .article-list-section > hr,
.about-links-section > hr, .privacy-nav-section > hr {
  border: none;
  border-top: 2px solid var(--c-border);
  margin: 0 0 20px;
}

/* ── Cards Grid ── */
.topic-card, .art-card {
  background: var(--c-white);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 20px;
  position: relative;
  transition: transform var(--transition), box-shadow var(--transition);
  animation: staggerIn 0.4s ease both;
  animation-delay: calc(var(--stagger, 0) * 80ms);
}

.layer-1 { box-shadow: 0 2px 8px rgba(31,31,31,0.07), 0 1px 2px rgba(31,31,31,0.04); z-index: 1; }
.layer-2 { box-shadow: 0 6px 18px rgba(31,31,31,0.09), 0 2px 6px rgba(31,31,31,0.05); z-index: 2; }
.layer-3 { box-shadow: 0 12px 32px rgba(31,31,31,0.11), 0 4px 10px rgba(31,31,31,0.06); z-index: 3; }
.layer-4 { box-shadow: 0 20px 48px rgba(31,31,31,0.14), 0 6px 16px rgba(31,31,31,0.07); z-index: 4; }

.topic-card:hover, .art-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--c-shadow-xl);
}

.card-eyebrow, .card-num {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--c-mid);
  margin-bottom: 10px;
}

.topic-card h3, .art-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}
.topic-card h3 a, .art-card h3 a {
  color: var(--c-dark);
  text-decoration: none;
}
.topic-card h3 a:hover, .art-card h3 a:hover { text-decoration: underline; }
.topic-card p, .art-card p {
  font-size: 14px;
  color: var(--c-mid);
  line-height: 1.6;
  margin-bottom: 12px;
}

.card-date {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--c-mid);
}

.sub-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.sub-link {
  display: inline-block;
  padding: 4px 12px;
  background: var(--c-light);
  border-radius: var(--radius-pill);
  font-size: 12px;
  color: var(--c-dark);
  text-decoration: none;
  transition: background var(--transition);
}
.sub-link:hover { background: var(--c-dark); color: var(--c-white); text-decoration: none; }

/* ── About / Privacy Sections ── */
.about-links-section, .privacy-nav-section {
  padding: 32px 0;
}

.about-aside, .privacy-aside {
  background: var(--c-white);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--c-shadow-sm);
  display: inline-block;
  min-width: 260px;
}
.about-aside dt, .privacy-aside dt {
  font-size: 14px;
  font-weight: 600;
  color: var(--c-dark);
  margin-bottom: 10px;
}
.about-aside dd, .privacy-aside dd { margin: 0; }
.about-aside dd a, .privacy-aside dd a {
  display: block;
  padding: 6px 0;
  font-size: 14px;
  color: var(--c-mid);
  text-decoration: none;
  border-bottom: 1px solid var(--c-border);
}
.about-aside dd a:hover, .privacy-aside dd a:hover { color: var(--c-dark); text-decoration: underline; }

.policy-date {
  font-size: 13px;
  color: var(--c-mid);
  margin-bottom: 20px;
}

/* ── Footer ── */
.site-footer {
  background: var(--c-dark);
  color: var(--c-light);
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 40px 32px 24px;
  margin-top: 48px;
  box-shadow: var(--c-shadow-xl);
}

.footer-form-block {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 28px;
  margin-bottom: 28px;
  border-bottom: 1px solid rgba(255,255,255,0.10);
  flex-wrap: wrap;
}
.footer-form-label {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,0.7);
}
.footer-form {
  display: flex;
  gap: 0;
  border-radius: var(--radius-pill);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.15);
}
.footer-form input {
  border: none;
  background: rgba(255,255,255,0.08);
  color: var(--c-white);
  padding: 10px 16px;
  font-size: 14px;
  font-family: var(--font-body);
  outline: none;
  min-height: 44px;
  width: 200px;
}
.footer-form input::placeholder { color: rgba(255,255,255,0.4); }
.footer-form button {
  border: none;
  background: var(--c-white);
  color: var(--c-dark);
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  min-height: 44px;
  font-family: var(--font-body);
}
.footer-form button:hover { background: var(--c-light); }

.footer-cols {
  display: flex;
  gap: 32px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.footer-cols dl {
  flex: 1;
  min-width: 140px;
}
.footer-cols dt {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.10em;
  color: rgba(255,255,255,0.5);
  margin-bottom: 12px;
  font-family: var(--font-mono);
}
.footer-cols dd { margin: 0 0 8px; }
.footer-cols dd a {
  font-size: 14px;
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  transition: color var(--transition);
  display: block;
  padding: 2px 0;
  min-height: 28px;
}
.footer-cols dd a:hover { color: var(--c-white); text-decoration: underline; }

.footer-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
  flex-wrap: wrap;
  gap: 10px;
}
.footer-copy {
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  font-family: var(--font-mono);
}
.footer-links { display: flex; gap: 16px; }
.footer-links a {
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
}
.footer-links a:hover { color: var(--c-white); text-decoration: underline; }

/* ── hr styling ── */
hr {
  border: none;
  border-top: 2px solid var(--c-border);
  margin: 12px 0 20px;
}

/* ── Animations ── */
@keyframes staggerIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .parallax { transform: none !important; }
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .hero-block { flex-direction: column; min-height: auto; padding: 48px 0 40px; gap: 32px; }
  .hero-text { text-align: left; }
  .hero-desc { margin-left: 0; }
  .hero-media { flex: none; width: 100%; max-width: 100%; }
  .content-section,
  .topic-hero-section,
  .topic-content-section,
  .article-top-section,
  .article-body-section,
  .info-top-section { flex-direction: column; }
  .sidebar { flex: none; width: 100%; }
  .sidebar-inner { position: static; }
  .footer-cols { gap: 20px; }
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .page-wrap { padding: 0 12px; }
  .nav-search input { width: 80px; }
  .pill-btn { padding: 8px 10px; font-size: 12px; }
  .bottom-nav-inner { gap: 8px; }
  .prose-article { padding: 20px 16px; }
  .site-footer { padding: 32px 16px 20px; }
  .footer-form input { width: 140px; }
  .hero-text h1 { font-size: 26px; }
  .float-badge, .float-badge-2 { display: none; }
  .footer-cols { flex-direction: column; }
}
