/*
Theme Name: JapanPro
Theme URI: https://thejapanpro.com
Description: Official JapanPro blog theme — Source Serif 4 headings, Acumin Pro body, matching brand tokens.
Version: 1.2.0
Author: JapanPro Team
Author URI: https://thejapanpro.com
Text Domain: japanpro
*/

/* ── Design tokens ──────────────────────────────────────────────────────────── */

:root {
  --primary:       #ca3617;
  --primary-dark:  #b02e13;
  --primary-light: #ffe9e4;
  --dark:          #121212;
  --muted:         #747474;
  --border:        #d9d9d9;
  --surface:       #f2f2f2;
  --white:         #ffffff;

  --max-width:     1440px;
  --content-width: 780px;
  --px:            50px;
  --py:            50px;
}

/* ── Reset ──────────────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Base ───────────────────────────────────────────────────────────────────── */

html { scroll-behavior: smooth; }

body {
  font-family: 'Acumin Pro', sans-serif;
  color: var(--dark);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

#page { display: flex; flex-direction: column; flex: 1; }
#content { flex: 1; }

img { max-width: 100%; height: auto; display: block; }
a   { color: inherit; text-decoration: none; cursor: pointer; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ── Typography ─────────────────────────────────────────────────────────────── */

h1, h2, h3 {
  font-family: 'Source Serif 4', 'Georgia', serif;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.15;
}
h4, h5, h6 {
  font-family: 'Acumin Pro', sans-serif;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.3;
}
p { line-height: 1.7; }

/* ── Layout ─────────────────────────────────────────────────────────────────── */

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: var(--px);
  padding-right: var(--px);
}

/* ── Badges ─────────────────────────────────────────────────────────────────── */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1.4;
}
.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-surface  { background: var(--surface);       color: var(--muted);   }

/* ── Buttons ────────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 24px;
  height: 40px;
  border-radius: 999px;
  font-family: 'Acumin Pro', sans-serif;
  font-size: 14px;
  font-weight: 700;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
  cursor: pointer;
}
.btn-primary  { background: var(--primary);  color: var(--white); border: none; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline  { background: var(--white); color: var(--primary); border: 1px solid var(--border); }
.btn-outline:hover { background: var(--surface); }

/* ═══════════════════════════════════════════════════════════════════════════════
   HEADER
═══════════════════════════════════════════════════════════════════════════════ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

/* 3-column layout: flex-1 logo | centred nav | flex-1 justify-end right */
.site-header .container {
  display: flex;
  align-items: center;
  padding-top: 24px;
  padding-bottom: 24px;
}

/* Left — logo + journal badge */
.site-branding {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.site-logo     { display: block; }
.site-logo img { height: 44px; width: auto; }
.site-logo-text {
  font-family: 'Source Serif 4', 'Georgia', serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--dark);
  letter-spacing: -0.01em;
}
.site-logo-text em { color: var(--primary); font-style: italic; }

.header-blog-badge {
  display: inline-block;
  background: var(--surface);
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
  line-height: 1.4;
}

/* Centre — nav links */
.site-nav { display: flex; align-items: center; gap: 24px; }
.site-nav a {
  font-size: 16px;
  color: var(--dark);
  transition: color 0.15s;
  white-space: nowrap;
}
.site-nav a:hover,
.site-nav a.active { color: var(--primary); }
.site-nav a.active { font-weight: 700; }

/* Right — CTA */
.header-right {
  flex: 1;
  display: flex;
  justify-content: flex-end;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   FOOTER — MEGA FOOTER
═══════════════════════════════════════════════════════════════════════════════ */

.site-footer { }

/* ── CTA Banner ── */
.footer-cta-banner {
  background: var(--dark);
  padding: 80px var(--px);
  text-align: center;
}
.footer-cta-banner h2 {
  font-size: 60px;
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 20px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}
.footer-cta-banner p {
  font-size: 18px;
  color: rgba(255,255,255,0.65);
  max-width: 520px;
  margin: 0 auto 36px;
  line-height: 1.7;
}
.footer-cta-banner .btn {
  height: 52px;
  padding: 0 36px;
  font-size: 16px;
}

/* ── Explore section ── */
.footer-explore {
  background: var(--dark);
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 60px 0 70px;
}
.footer-explore-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 40px;
}
.footer-explore-title {
  font-size: 28px;
  color: var(--white);
}
.footer-explore-link {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  transition: color 0.15s;
}
.footer-explore-link:hover { color: #e04020; }

.footer-explore-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 32px;
}
.footer-explore-col h4 {
  font-family: 'Acumin Pro', sans-serif;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.4);
  margin-bottom: 16px;
}
.footer-explore-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-explore-col a {
  font-size: 15px;
  color: rgba(255,255,255,0.7);
  transition: color 0.15s;
  line-height: 1.4;
}
.footer-explore-col a:hover { color: var(--white); }

/* ── Main footer body ── */
.footer-main {
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: 60px 0 50px;
}
.footer-main .container {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 80px;
  align-items: start;
}

.footer-brand { }
.footer-brand-logo { display: block; margin-bottom: 20px; }
.footer-brand-logo img { height: 36px; width: auto; }
.footer-brand-tagline {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 24px;
}
.footer-social {
  display: flex;
  align-items: center;
  gap: 12px;
}
.footer-social a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 15px;
  transition: border-color 0.15s, color 0.15s;
}
.footer-social a:hover { border-color: var(--primary); color: var(--primary); }
.footer-social svg { width: 16px; height: 16px; }

.footer-nav-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
}
.footer-nav-col h4 {
  font-family: 'Acumin Pro', sans-serif;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--dark);
  margin-bottom: 16px;
}
.footer-nav-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-nav-col a {
  font-size: 14px;
  color: var(--muted);
  transition: color 0.15s;
  line-height: 1.4;
}
.footer-nav-col a:hover { color: var(--dark); }

/* ── Copyright bar ── */
.footer-copyright-bar {
  border-top: 1px solid var(--border);
  padding: 20px 0;
}
.footer-copyright-bar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.footer-copy  { font-size: 14px; color: var(--muted); }
.footer-links { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.footer-links a { transition: color 0.15s; }
.footer-links a:hover { color: var(--dark); }
.footer-divider { width: 1px; height: 16px; background: var(--border); flex-shrink: 0; }

/* ═══════════════════════════════════════════════════════════════════════════════
   ARCHIVE — BLOG LISTING
═══════════════════════════════════════════════════════════════════════════════ */

/* ── Hero ── */
.archive-hero {
  background: var(--white);
  padding: 60px var(--px) 50px;
  text-align: center;
}
.archive-hero-inner {
  max-width: 766px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.archive-hero h1 {
  font-size: 36px;
  color: var(--dark);
  line-height: 40px;
  margin-bottom: 0;
}
.archive-hero p {
  font-size: 18px;
  color: var(--muted);
  line-height: 28px;
  margin: 0;
}

/* Search bar */
.archive-search {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(217,217,217,0.3);
  border-radius: 20px;
  padding: 16px 24px;
  width: 100%;
  max-width: 478px;
  margin-top: 10px;
  border: none;
}
.archive-search-icon {
  width: 16px;
  height: 16px;
  color: var(--muted);
  flex-shrink: 0;
}
.archive-search-input {
  flex: 1;
  border: none;
  background: none;
  outline: none;
  font-family: 'Acumin Pro', sans-serif;
  font-size: 14px;
  color: var(--dark);
  min-width: 0;
}
.archive-search-input::placeholder { color: var(--muted); }

/* ── Filter tab bar ── */
.archive-filter-bar {
  background: var(--white);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.archive-filter-bar .container {
  display: flex;
  align-items: center;
  padding-top: 20px;
  padding-bottom: 20px;
  min-height: 81px;
}
.archive-filter-tabs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  width: 100%;
}
.archive-filter-tab {
  display: inline-flex;
  align-items: center;
  font-family: 'Acumin Pro', sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
  border-radius: 52px;
  padding: 12px 24px;
  border: 1px solid var(--border);
  color: var(--muted);
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  cursor: pointer;
  text-decoration: none;
}
.archive-filter-tab:hover { border-color: var(--primary); color: var(--primary); }
.archive-filter-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--surface);
}

/* ── Grid ── */
.archive-content { padding: var(--py) 0; }

.posts-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  row-gap: 30px;
  margin-bottom: 50px;
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid var(--border);
  color: var(--dark);
  background: var(--white);
  transition: all 0.15s;
}
.pagination .page-numbers:hover { border-color: var(--primary); color: var(--primary); }
.pagination .page-numbers.current { background: var(--primary); border-color: var(--primary); color: var(--white); }
.pagination .page-numbers.dots { border: none; background: none; }
.pagination .prev, .pagination .next { font-size: 13px; padding: 0 16px; }

/* ═══════════════════════════════════════════════════════════════════════════════
   POST CARD
═══════════════════════════════════════════════════════════════════════════════ */

.post-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s, transform 0.2s;
  cursor: pointer;
}
.post-card:hover {
  box-shadow: 0 4px 24px rgba(18,18,18,0.08);
  transform: translateY(-2px);
}

/* Invisible full-card link wrapper */
.post-card-link {
  display: block;
  text-decoration: none;
}

.post-card-image {
  position: relative;
  aspect-ratio: 317 / 250;
  overflow: hidden;
  background: var(--surface);
}
.post-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  display: block;
}
.post-card:hover .post-card-image img { transform: scale(1.05); }

.post-card-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 14px;
}

.post-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
  gap: 16px;
}
.post-card-body-inner {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Title: Acumin Pro Bold per Figma (not the serif heading face) */
.post-card-title {
  font-family: 'Acumin Pro', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--dark);
  line-height: 28px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-card-title a:hover { color: var(--primary); }

.post-card-excerpt {
  font-size: 14px;
  color: var(--muted);
  line-height: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Meta: "X min read · Month Year" */
.post-card-meta-simple {
  font-family: 'Acumin Pro', sans-serif;
  font-size: 12px;
  color: var(--muted);
  line-height: 20px;
  margin: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   SINGLE POST
═══════════════════════════════════════════════════════════════════════════════ */

/* ── Hero ── */

.post-hero {
  position: relative;
  height: 477px;
  overflow: hidden;
  background: var(--dark);
  display: flex;
  align-items: flex-end;
}
.post-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.post-hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
}
.post-hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 48px var(--px);
  max-width: var(--max-width);
  margin: 0 auto;
}
.post-hero-category { margin-bottom: 14px; }
.post-hero-title {
  font-family: 'Source Serif 4', 'Georgia', serif;
  font-size: 60px;
  font-weight: 700;
  color: var(--white);
  max-width: 900px;
  margin-bottom: 24px;
  line-height: 70px;
}
.post-hero-meta {
  display: flex;
  align-items: center;
  gap: 17px;
  flex-wrap: wrap;
}
.meta-author {
  display: flex;
  align-items: center;
  gap: 10px;
}
.meta-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
}
.meta-avatar img { width: 100%; height: 100%; object-fit: cover; }
.meta-avatar-initials { font-size: 10px; font-weight: 700; color: var(--primary); }
.post-hero-meta .meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 16px;
  color: var(--white);
}
.post-hero-meta .meta-item a { color: var(--white); }
.post-hero-meta .meta-item a:hover { color: rgba(255,255,255,0.8); }
/* Vertical separator between meta items */
.meta-sep { width: 1px; height: 25px; background: rgba(255,255,255,0.4); flex-shrink: 0; }

/* ── Post 2-column layout: content left + TOC sidebar right ── */

.post-body { padding: var(--py) 0; }

.post-layout {
  display: grid;
  grid-template-columns: 1fr 317px;
  gap: 0 138px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--px);
  align-items: start;
}

/* Content column — prevent grid blowout */
.post-body-inner {
  min-width: 0;
}

/* Sticky TOC sidebar */
.post-toc-sidebar {
  position: sticky;
  top: 120px;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
  scrollbar-width: none;
}
.post-toc-sidebar::-webkit-scrollbar { display: none; }

/* ── TOC sidebar visual design ── */

.toc-sidebar-bar {
  width: 40px;
  height: 3px;
  background: var(--primary);
  margin-top: 8px;
  margin-bottom: 20px;
}
.toc-sidebar-title {
  font-family: 'Source Serif 4', 'Georgia', serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 20px;
  line-height: 1.2;
}

/* ── Joli TOC sidebar overrides ──
   Force all list/link styles regardless of plugin-generated CSS. */

/* List reset */
.post-toc-sidebar ul,
.post-toc-sidebar ol,
.post-toc-sidebar .joli-toc ul,
.post-toc-sidebar .joli-toc ol,
.post-toc-sidebar .wjt-toc-list {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
}
.post-toc-sidebar li,
.post-toc-sidebar .joli-toc li,
.post-toc-sidebar .wjt-toc-item { padding: 0 !important; }

/* All links — default state */
.post-toc-sidebar a,
.post-toc-sidebar li a,
.post-toc-sidebar ul li a,
.post-toc-sidebar .joli-toc a,
.post-toc-sidebar .wjt-toc-link {
  display: block !important;
  font-family: 'Acumin Pro', sans-serif !important;
  font-size: 15px !important;
  font-weight: 400 !important;
  line-height: 1.5 !important;
  color: var(--muted) !important;
  padding: 5px 0 5px 14px !important;
  border-left: 2px solid transparent !important;
  text-decoration: none !important;
  background: none !important;
  letter-spacing: 0 !important;
  transition: color 0.15s, border-color 0.15s !important;
}

/* Hover */
.post-toc-sidebar a:hover,
.post-toc-sidebar .joli-toc a:hover,
.post-toc-sidebar .wjt-toc-link:hover {
  color: var(--dark) !important;
  border-left-color: var(--border) !important;
  background: none !important;
}

/* Active / current — override plugin blue with brand red */
.post-toc-sidebar a.active,
.post-toc-sidebar a.wjt-active,
.post-toc-sidebar .joli-toc a.active,
.post-toc-sidebar .joli-toc a.wjt-active,
.post-toc-sidebar .joli-toc li.active > a,
.post-toc-sidebar .joli-toc li.wjt-active > a,
.post-toc-sidebar .wjt-toc-item.active > a,
.post-toc-sidebar .wjt-toc-item.wjt-active > a,
.post-toc-sidebar .wjt-toc-link.active,
.post-toc-sidebar .wjt-toc-link.wjt-active {
  color: var(--primary) !important;
  border-left-color: var(--primary) !important;
  background: none !important;
}

/* Hide Joli TOC's own injected title (we render our own "On This Page") */
.post-toc-sidebar .joli-toc-title,
.post-toc-sidebar .wjt-toc-title,
.post-toc-sidebar [class*="toc-title"],
.post-toc-sidebar [class*="toc_title"] { display: none !important; }

/* Hide Joli TOC's auto-inserted inline version — sidebar TOC only.
   Auto-insert must stay ON in Joli TOC settings so heading IDs are generated.
   Targets every known Joli TOC class pattern anywhere inside the content column. */
.post-body-inner [class*="wjt-"],
.post-body-inner [id*="wjt-"],
.post-body-inner [class*="joli-toc"],
.post-body-inner [class*="joli_toc"],
.post-content [class*="wjt-"],
.post-content [id*="wjt-"],
.post-content [class*="joli-toc"],
.post-content [class*="joli_toc"] {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Joli TOC sidebar — fit plugin output to sidebar width */
.post-toc-sidebar .joli-toc,
.post-toc-sidebar .joli-toc-wrap {
  width: 100% !important;
  max-width: 100% !important;
  float: none !important;
  margin: 0 !important;
}

/* ── Post breadcrumb ── */

.post-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}
.post-breadcrumb a {
  font-family: 'Acumin Pro', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
}
.post-breadcrumb a:hover { color: var(--primary); }
.post-breadcrumb-sep {
  font-size: 11px;
  color: var(--border);
  user-select: none;
}
.post-breadcrumb-current {
  font-family: 'Acumin Pro', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 320px;
}

/* ── Article typography ── */

.post-content { font-size: 20px; line-height: 1.8; color: var(--muted); }
.post-content > * + * { margin-top: 24px; }
.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
  scroll-margin-top: 130px;
  color: var(--dark);
}
.post-content h2 { font-size: 30px; margin-top: 52px; margin-bottom: 8px; }
.post-content h3 { font-size: 24px; margin-top: 40px; margin-bottom: 8px; }
.post-content p  { font-size: 20px; line-height: 1.8; color: var(--muted); }
.post-content ul,
.post-content ol  { padding-left: 24px; }
.post-content li  { font-size: 20px; line-height: 1.8; color: var(--muted); }
.post-content a   { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
.post-content a:hover { color: var(--primary-dark); }
.post-content blockquote {
  border-left: 4px solid var(--primary);
  padding: 8px 28px;
  margin: 36px 0;
}
.post-content blockquote p {
  font-family: 'Source Serif 4', 'Georgia', serif;
  font-size: 24px;
  font-style: italic;
  font-weight: 500;
  color: var(--dark);
  line-height: 1.45;
  margin: 0;
}
.post-content img  { width: 100%; border-radius: 10px; }
.post-content figure { margin: 36px 0; }
.post-content figcaption { font-size: 14px; color: var(--muted); text-align: center; margin-top: 10px; }
.post-content hr  { border: none; border-top: 1px solid var(--border); margin: 52px 0; }
.post-content pre {
  background: var(--dark);
  color: var(--white);
  padding: 20px 24px;
  border-radius: 10px;
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.6;
}
.post-content code {
  background: var(--surface);
  color: var(--primary);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 14px;
}
.post-content pre code { background: none; color: inherit; padding: 0; }

/* ── Article CTA box ── */

.article-cta {
  background: rgba(202,54,23,0.1);
  border-radius: 10px;
  padding: 40px;
  margin-top: 52px;
}
.article-cta-title {
  font-family: 'Acumin Pro', sans-serif;
  font-size: 30px;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.3;
  margin-bottom: 12px;
}
.article-cta-text {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 24px;
}
.article-cta .btn {
  height: 48px;
  padding: 0 32px;
  font-size: 16px;
}

/* ── Post tags ── */

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 52px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
.post-tag {
  padding: 4px 14px;
  background: var(--surface);
  border-radius: 999px;
  font-size: 13px;
  color: var(--muted);
  transition: all 0.15s;
}
.post-tag:hover { background: var(--primary-light); color: var(--primary); }

/* ── Share bar ── */

.share-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 20px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-top: 40px;
}
.share-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-right: 4px;
}
.share-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-family: 'Acumin Pro', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--dark);
  background: var(--white);
  cursor: pointer;
  transition: all 0.15s;
}
.share-button:hover { border-color: var(--primary); color: var(--primary); }

/* ═══════════════════════════════════════════════════════════════════════════════
   RELATED POSTS
═══════════════════════════════════════════════════════════════════════════════ */

.related-posts-section {
  padding: var(--py) 0;
  border-top: 1px solid var(--border);
}
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 36px;
}
.section-title { font-size: 36px; }
.section-link  { font-size: 14px; font-weight: 700; color: var(--primary); transition: color 0.15s; }
.section-link:hover { color: var(--primary-dark); }
.related-posts-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

/* ── Related post card (simplified) ── */

.related-post-card {
  display: flex;
  flex-direction: column;
  cursor: pointer;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
}
.related-post-card:hover {
  box-shadow: 0 4px 24px rgba(18,18,18,0.08);
  transform: translateY(-2px);
}
.related-post-card-image {
  aspect-ratio: 317 / 250;
  overflow: hidden;
  background: var(--surface);
}
.related-post-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  display: block;
}
.related-post-card:hover .related-post-card-image img { transform: scale(1.05); }
.related-post-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.related-post-card-title {
  font-family: 'Acumin Pro', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--dark);
  line-height: 28px;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.related-post-card-title a:hover { color: var(--primary); }
.related-post-card-excerpt {
  font-family: 'Acumin Pro', sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: var(--muted);
  line-height: 20px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 10px;
}
.related-post-card-meta {
  font-family: 'Acumin Pro', sans-serif;
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  line-height: 20px;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   AUTHOR BIO
═══════════════════════════════════════════════════════════════════════════════ */

.author-bio-section {
  padding: var(--py) 0;
  border-top: 1px solid var(--border);
}
.author-bio-inner {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 var(--px);
}
.author-bio-card {
  background: var(--surface);
  border-radius: 10px;
  padding: 30px;
  display: flex;
  gap: 24px;
  align-items: flex-start;
}
.author-bio-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
}
.author-bio-avatar img { width: 100%; height: 100%; object-fit: cover; }
.author-bio-avatar-initials { font-size: 22px; font-weight: 700; color: var(--primary); }
.author-bio-details { flex: 1; }
.author-bio-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary);
  margin-bottom: 4px;
}
.author-bio-name {
  font-size: 20px;
  font-family: 'Source Serif 4', 'Georgia', serif;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 10px;
  line-height: 1.2;
}
.author-bio-name a:hover { color: var(--primary); }
.author-bio-desc { font-size: 15px; color: var(--muted); line-height: 1.65; }

/* ═══════════════════════════════════════════════════════════════════════════════
   COMMENTS
═══════════════════════════════════════════════════════════════════════════════ */

.comments-section {
  padding: var(--py) 0;
  border-top: 1px solid var(--border);
}
.comments-inner {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 var(--px);
}

#comments-title {
  font-size: 28px;
  margin-bottom: 30px;
}

/* Comment list */
.comment-list {
  list-style: none;
  padding: 0;
  margin: 0 0 48px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.comment-item { }
.comment-body { display: flex; gap: 16px; }
.comment-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--surface);
}
.comment-avatar img { width: 100%; height: 100%; object-fit: cover; }
.comment-content-wrap { flex: 1; }
.comment-meta-row { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; }
.comment-author-name { font-size: 15px; font-weight: 700; color: var(--dark); }
.comment-author-name a { color: var(--dark); }
.comment-author-name a:hover { color: var(--primary); }
.comment-date { font-size: 13px; color: var(--muted); }
.comment-text p { font-size: 15px; color: var(--dark); line-height: 1.65; margin-bottom: 6px; }
.comment-reply-link {
  display: inline-block;
  margin-top: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  transition: color 0.15s;
}
.comment-reply-link:hover { color: var(--primary-dark); }
.children {
  list-style: none;
  padding: 0;
  margin: 20px 0 0 60px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Comment form */
#respond { margin-top: 48px; }
.comment-reply-title {
  font-size: 22px;
  font-family: 'Source Serif 4', 'Georgia', serif;
  font-weight: 700;
  margin-bottom: 6px;
}
.comment-reply-title small a { font-family: 'Acumin Pro', sans-serif; font-size: 14px; font-weight: 400; color: var(--primary); margin-left: 12px; }
.comment-notes { font-size: 14px; color: var(--muted); margin-bottom: 20px; }
.comment-form { display: flex; flex-direction: column; gap: 16px; }
.comment-form-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.comment-form p { display: flex; flex-direction: column; gap: 6px; margin: 0; }
.comment-form label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--dark); }
.comment-form .required { color: var(--primary); }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: 'Acumin Pro', sans-serif;
  font-size: 15px;
  color: var(--dark);
  background: var(--white);
  outline: none;
  transition: border-color 0.15s;
  resize: vertical;
}
.comment-form input:focus,
.comment-form textarea:focus { border-color: var(--primary); }
.comment-form textarea { min-height: 120px; }
.comment-form .form-submit { display: flex; }
.comment-form #submit {
  padding: 0 28px;
  height: 40px;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: 999px;
  font-family: 'Acumin Pro', sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}
.comment-form #submit:hover { background: var(--primary-dark); }

/* ═══════════════════════════════════════════════════════════════════════════════
   NO RESULTS / 404
═══════════════════════════════════════════════════════════════════════════════ */

.no-results-wrap {
  padding: 100px var(--px);
  text-align: center;
}
.no-results-wrap h2 { font-size: 28px; margin-bottom: 12px; }
.no-results-wrap p  { font-size: 16px; color: var(--muted); margin-bottom: 24px; }

.error-404-wrap {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--py) var(--px);
}
.error-code { font-size: 100px; font-family: 'Source Serif 4', 'Georgia', serif; color: var(--primary); line-height: 1; margin-bottom: 16px; }
.error-404-wrap h2 { font-size: 28px; margin-bottom: 12px; }
.error-404-wrap p  { font-size: 16px; color: var(--muted); margin-bottom: 28px; }

/* ═══════════════════════════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════════════════════════ */

@media (max-width: 1200px) {
  .post-layout        { gap: 0 80px; }
  .footer-explore-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-nav-grid    { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 1024px) {
  :root { --px: 30px; }
  .posts-grid             { grid-template-columns: repeat(2, 1fr); }
  .related-posts-grid     { grid-template-columns: repeat(2, 1fr); }
  .post-hero-title        { font-size: 44px; line-height: 52px; }
  .archive-hero h1        { font-size: 30px; line-height: 36px; }
  .footer-cta-banner h2   { font-size: 44px; }
  .post-layout            { grid-template-columns: 1fr 280px; gap: 0 60px; }
  .footer-main .container { grid-template-columns: 180px 1fr; gap: 48px; }
  .footer-explore-grid    { grid-template-columns: repeat(3, 1fr); }
  .archive-filter-tab     { font-size: 14px; }
}

@media (max-width: 768px) {
  :root { --px: 20px; --py: 40px; }

  /* Header */
  .site-nav        { display: none; }
  .header-right    { display: none; }
  .site-branding   { flex: unset; }

  /* Archive */
  .posts-grid             { grid-template-columns: 1fr; }
  .archive-hero           { padding: 40px var(--px) 32px; }
  .archive-hero h1        { font-size: 26px; line-height: 32px; }
  .archive-hero p         { font-size: 16px; }
  .archive-search         { max-width: 100%; }
  .archive-filter-tabs    { gap: 8px; }
  .archive-filter-tab     { font-size: 13px; padding: 8px 16px; }

  /* Single — stack content above TOC on mobile */
  .post-layout      { grid-template-columns: 1fr; }
  .post-toc-sidebar { position: static; max-height: none; order: 2; margin-top: 40px; }
  .post-body-inner  { order: 1; }
  .post-hero        { height: 360px; }
  .post-hero-title  { font-size: 32px; line-height: 38px; max-width: 100%; }
  .post-hero-content { padding: 28px var(--px); }
  .post-content     { font-size: 17px; }
  .post-content p,
  .post-content li  { font-size: 17px; }
  .post-content h2  { font-size: 24px; }
  .post-content h3  { font-size: 20px; }
  .post-content blockquote p { font-size: 20px; }
  .article-cta      { padding: 28px 24px; }
  .article-cta-title { font-size: 22px; }

  /* Related */
  .related-posts-grid   { grid-template-columns: repeat(2, 1fr); }
  .section-header       { flex-direction: column; gap: 8px; }
  .section-title        { font-size: 28px; }

  /* Author bio */
  .author-bio-card         { flex-direction: column; gap: 16px; }
  .author-bio-avatar       { width: 64px; height: 64px; }

  /* Comments */
  .comment-form-fields     { grid-template-columns: 1fr; }
  .children                { margin-left: 30px; }

  /* Footer */
  .footer-cta-banner       { padding: 60px var(--px); }
  .footer-cta-banner h2    { font-size: 32px; }
  .footer-cta-banner p     { font-size: 16px; }
  .footer-explore-grid     { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .footer-main .container  { grid-template-columns: 1fr; gap: 40px; }
  .footer-nav-grid         { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .footer-copyright-bar .container { flex-direction: column; text-align: center; gap: 12px; }
  .footer-links            { flex-wrap: wrap; justify-content: center; }
}

@media (max-width: 480px) {
  .related-posts-grid   { grid-template-columns: 1fr; }
  .footer-explore-grid  { grid-template-columns: 1fr; }
  .footer-nav-grid      { grid-template-columns: 1fr 1fr; }
}
