﻿/*
Theme Name: Nemothia Editorial
Theme URI: https://nemothia.com/
Author: Nemothia
Author URI: https://nemothia.com/
Description: Premium standalone editorial theme for Nemothia, a technology insight media site covering AI, semiconductors, robotics, and adjacent fields. Fast, SEO-ready, accessible, with light/dark modes.
Version: 2.0.2
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: nemothia-editorial
Tags: blog, news, editorial, two-columns, custom-menu, featured-images, translation-ready, full-width-template, threaded-comments
*/

/* ==========================================================================
   1. Design tokens
   ========================================================================== */
:root {
  --brand-ink: #0d1b2a;
  --brand-blue: #2563eb;
  --brand-blue-2: #1d4ed8;

  --bg: #ffffff;
  --paper: #ffffff;
  --panel: #f4f7fb;
  --panel-2: #eef2f8;
  --ink: #0d1b2a;
  --ink-soft: #24344a;
  --muted: #5b6b7f;
  --line: #e4e9f0;
  --line-strong: #cfd8e3;
  --accent: #2563eb;
  --accent-ink: #ffffff;
  --accent-soft: rgba(37, 99, 235, 0.10);
  --shadow-sm: 0 1px 2px rgba(13, 27, 42, 0.06), 0 1px 3px rgba(13, 27, 42, 0.05);
  --shadow-md: 0 6px 18px rgba(13, 27, 42, 0.08);
  --shadow-lg: 0 18px 46px rgba(13, 27, 42, 0.14);

  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Apple SD Gothic Neo", "Noto Sans KR", Arial, sans-serif;
  --font-serif: Georgia, "Times New Roman", serif;

  --max: 1200px;
  --wide: 1360px;
  --radius: 14px;
  --radius-sm: 10px;
  --radius-pill: 999px;
  --gutter: clamp(18px, 4vw, 44px);
  --header-h: 66px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

html[data-theme="dark"],
html.dark {
  --bg: #0b1220;
  --paper: #111a2b;
  --panel: #131e31;
  --panel-2: #17233a;
  --ink: #e8eef8;
  --ink-soft: #c6d2e4;
  --muted: #8ea0b8;
  --line: #22314a;
  --line-strong: #2c3d5a;
  --accent: #5b8cff;
  --accent-ink: #06101f;
  --accent-soft: rgba(91, 140, 255, 0.14);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 22px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.55);
}

/* Follow OS preference until the user picks a theme explicitly. */
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]):not([data-theme="dark"]) {
    --bg: #0b1220;
    --paper: #111a2b;
    --panel: #131e31;
    --panel-2: #17233a;
    --ink: #e8eef8;
    --ink-soft: #c6d2e4;
    --muted: #8ea0b8;
    --line: #22314a;
    --line-strong: #2c3d5a;
    --accent: #5b8cff;
    --accent-ink: #06101f;
    --accent-soft: rgba(91, 140, 255, 0.14);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 8px 22px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.55);
  }
}

/* ==========================================================================
   2. Base / reset
   ========================================================================== */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease);
}

img { display: block; max-width: 100%; height: auto; }
svg { display: block; }

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s var(--ease);
}
a:hover { color: var(--brand-blue-2); }

button, input, select, textarea { font: inherit; color: inherit; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap { width: min(var(--max), calc(100% - var(--gutter) * 2)); margin-inline: auto; }

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  left: 12px; top: -60px;
  z-index: 999;
  padding: 10px 16px;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 8px;
  font-weight: 700;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 12px; color: var(--accent-ink); }

/* ==========================================================================
   3. Header
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.2s var(--ease), background-color 0.25s var(--ease);
}
.site-header.is-scrolled { box-shadow: var(--shadow-sm); }

.header-inner {
  display: grid;
  width: min(var(--wide), calc(100% - var(--gutter) * 2));
  min-height: var(--header-h);
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  margin-inline: auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1;
}
.brand:hover { color: var(--ink); }
.brand .brand-logo { height: 34px; width: auto; }
.brand .brand-logo--dark { display: none; }
html[data-theme="dark"] .brand .brand-logo--light,
html.dark .brand .brand-logo--light { display: none; }
html[data-theme="dark"] .brand .brand-logo--dark,
html.dark .brand .brand-logo--dark { display: block; }
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .brand .brand-logo--light { display: none; }
  html:not([data-theme="light"]) .brand .brand-logo--dark { display: block; }
}
.brand img.custom-logo { height: 34px; width: auto; }

.top-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  flex-wrap: wrap;
}
.top-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--ink-soft);
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  transition: color 0.15s var(--ease), background-color 0.15s var(--ease);
}
.top-nav a:hover { color: var(--accent); background: var(--accent-soft); }
.top-nav .current-menu-item > a,
.top-nav .current-cat > a,
.top-nav .is-active { color: var(--accent); }
.top-nav .current-menu-item > a::after,
.top-nav .is-active::after {
  content: "";
  position: absolute;
  left: 12px; right: 12px; bottom: 2px;
  height: 2px; border-radius: 2px;
  background: var(--accent);
}

.header-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px;
  width: 210px;
  height: 40px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background: var(--paper);
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.search-form:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search-form input {
  min-width: 0; border: 0; background: transparent;
  padding: 0 8px 0 16px; color: var(--ink); outline: none; font-size: 14px;
}
.search-form input::placeholder { color: var(--muted); }
.search-form button {
  border: 0; background: transparent; color: var(--muted);
  cursor: pointer; font-size: 0; display: grid; place-items: center;
}
.search-form button::before {
  content: ""; width: 16px; height: 16px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E") center/contain no-repeat;
}
.search-form button:hover { color: var(--accent); }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 40px; height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background: var(--paper);
  color: var(--ink-soft);
  cursor: pointer;
  transition: color 0.15s var(--ease), border-color 0.15s var(--ease), background-color 0.15s var(--ease);
}
.icon-btn:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.icon-btn svg { width: 18px; height: 18px; }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
html[data-theme="dark"] .theme-toggle .icon-sun,
html.dark .theme-toggle .icon-sun { display: block; }
html[data-theme="dark"] .theme-toggle .icon-moon,
html.dark .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
  html:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}

.menu-toggle {
  display: none;
  width: 40px; height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  font-size: 0;
}
.menu-toggle::before {
  content: ""; display: block; width: 18px; height: 14px; margin: 0 auto;
  background:
    linear-gradient(currentColor, currentColor) top/100% 2px no-repeat,
    linear-gradient(currentColor, currentColor) center/100% 2px no-repeat,
    linear-gradient(currentColor, currentColor) bottom/100% 2px no-repeat;
}

/* ==========================================================================
   4. Breadcrumb
   ========================================================================== */
.breadcrumb {
  width: min(var(--max), calc(100% - var(--gutter) * 2));
  margin: 18px auto 0;
  font-size: 13px;
  color: var(--muted);
}
.breadcrumb ol { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; padding: 0; list-style: none; }
.breadcrumb li { display: inline-flex; align-items: center; gap: 6px; }
.breadcrumb li:not(:last-child)::after { content: "/"; color: var(--line-strong); }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb [aria-current="page"] { color: var(--ink-soft); font-weight: 600; }

/* ==========================================================================
   5. Hero
   ========================================================================== */
.channel-hero {
  background:
    radial-gradient(1200px 220px at 12% -40%, var(--accent-soft), transparent 70%),
    var(--panel);
  border-bottom: 1px solid var(--line);
}
.hero-inner {
  display: grid;
  width: min(var(--max), calc(100% - var(--gutter) * 2));
  grid-template-columns: 1fr 1.05fr;
  gap: 44px;
  align-items: center;
  margin-inline: auto;
  padding: clamp(30px, 6vw, 58px) 0;
}
.hero-inner h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(38px, 6vw, 64px);
  font-weight: 800;
  line-height: 1.03;
  letter-spacing: -0.02em;
}
.hero-inner p {
  margin: 0;
  color: var(--ink-soft);
  font-size: clamp(16px, 2vw, 18px);
  line-height: 1.6;
  max-width: 52ch;
}

/* ==========================================================================
   6. Layout
   ========================================================================== */
.page-shell { width: min(var(--max), calc(100% - var(--gutter) * 2)); margin-inline: auto; }
.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 48px;
  align-items: start;
  padding: clamp(28px, 5vw, 52px) 0 clamp(48px, 8vw, 88px);
  min-height: 380px;
}
.primary-column { min-width: 0; }

.archive-meta {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 6px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--ink);
}
.archive-meta h2 { margin: 4px 0 0; font-size: clamp(24px, 3vw, 30px); font-weight: 800; letter-spacing: -0.01em; }
.archive-meta span, .post-date { color: var(--muted); font-size: 13px; }

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ==========================================================================
   7. Post list (cards)
   ========================================================================== */
.list-item {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 26px;
  padding: 26px;
  margin-top: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), border-color 0.18s var(--ease);
}
.list-item:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.list-thumb {
  display: block; width: 240px; aspect-ratio: 16 / 10;
  overflow: hidden; border-radius: var(--radius-sm); background: var(--panel-2);
}
.list-thumb img, .related-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s var(--ease); }
.list-item:hover .list-thumb img { transform: scale(1.04); }
.list-copy { min-width: 0; align-self: center; }
.meta-link {
  display: inline-flex; align-items: center;
  color: var(--accent); font-size: 12px; font-weight: 800;
  letter-spacing: 0.05em; text-transform: uppercase;
}
.list-copy h2 { margin: 8px 0 8px; font-size: clamp(19px, 2.4vw, 23px); line-height: 1.32; font-weight: 700; letter-spacing: -0.01em; }
.list-copy h2 a { color: var(--ink); }
.list-copy h2 a:hover { color: var(--accent); }
.list-copy p {
  display: -webkit-box; margin: 0 0 12px; overflow: hidden;
  color: var(--muted); font-size: 15px; line-height: 1.6;
  -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2;
}

.empty-state {
  margin: 24px 0; padding: 40px 28px;
  border: 1px dashed var(--line-strong); border-radius: var(--radius);
  color: var(--muted); text-align: center; background: var(--panel);
}

/* ==========================================================================
   8. Sidebar
   ========================================================================== */
.side-column { position: sticky; top: calc(var(--header-h) + 20px); display: grid; gap: 20px; }
.side-block {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--paper); padding: 24px 22px; box-shadow: var(--shadow-sm);
}
.side-block > .eyebrow { margin-bottom: 4px; }
.side-block h2 { margin: 0 0 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line); font-size: 19px; font-weight: 700; }
.popular-list { display: grid; margin: 0; padding: 0; list-style: none; counter-reset: popular; }
.popular-list li {
  display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px;
  padding: 14px 0; border-bottom: 1px solid var(--line); counter-increment: popular;
}
.popular-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.popular-list li::before {
  content: counter(popular, decimal-leading-zero);
  color: var(--accent); font-size: 15px; font-weight: 800; line-height: 1.5;
}
.popular-list a { display: block; color: var(--ink); font-weight: 600; line-height: 1.4; font-size: 15px; }
.popular-list a:hover { color: var(--accent); }
.popular-list span { grid-column: 2; color: var(--muted); font-size: 12px; }

/* ==========================================================================
   9. Single article
   ========================================================================== */
.article-view { max-width: 780px; margin-inline: auto; }
.article-header { padding-bottom: 24px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.article-header h1 {
  margin: 12px 0 16px; color: var(--ink);
  font-size: clamp(30px, 5vw, 46px); line-height: 1.12;
  font-weight: 800; letter-spacing: -0.02em;
}
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; color: var(--muted); font-size: 14px; }
.article-meta .sep { color: var(--line-strong); }
.article-meta .author { color: var(--ink-soft); font-weight: 600; }

.article-body { color: var(--ink-soft); font-size: 18px; line-height: 1.85; padding-top: 28px; }
.article-body > *:first-child { margin-top: 0; }
.article-body p { margin: 0 0 24px; }
.article-body h2, .article-body h3, .article-body h4 { color: var(--ink); line-height: 1.3; letter-spacing: -0.01em; scroll-margin-top: calc(var(--header-h) + 20px); }
.article-body h2 { margin: 48px 0 16px; font-size: clamp(24px, 3vw, 30px); font-weight: 800; }
.article-body h3 { margin: 38px 0 14px; font-size: clamp(20px, 2.4vw, 24px); font-weight: 700; }
.article-body h4 { margin: 30px 0 12px; font-size: 19px; font-weight: 700; }
.article-body a { color: var(--accent); border-bottom: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); }
.article-body a:hover { border-bottom-color: var(--accent); }
.article-body img, .article-body figure { border-radius: var(--radius-sm); margin: 30px 0; }
.article-body figure { margin: 30px 0; }
.article-body figcaption { margin-top: 10px; color: var(--muted); font-size: 14px; text-align: center; }
.article-body ul, .article-body ol { margin: 0 0 24px; padding-left: 1.3em; }
.article-body li { margin-bottom: 8px; }
.article-body blockquote {
  margin: 30px 0; padding: 18px 24px;
  border-left: 4px solid var(--accent); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--panel); color: var(--ink); font-size: 18px;
}
.article-body blockquote p:last-child { margin-bottom: 0; }
.article-body pre {
  margin: 28px 0; padding: 18px 20px; overflow: auto;
  background: var(--brand-ink); color: #e6edf6; border-radius: var(--radius-sm); font-size: 14px;
}
.article-body code { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 0.92em; }
.article-body :not(pre) > code { padding: 2px 6px; background: var(--panel-2); border-radius: 6px; }
.article-body table { width: 100%; border-collapse: collapse; margin: 28px 0; font-size: 15px; }
.article-body th, .article-body td { padding: 12px 14px; border: 1px solid var(--line); text-align: left; }
.article-body th { background: var(--panel); font-weight: 700; }
.article-body hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }

.tag-trail { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 36px; }
.tag-trail a {
  display: inline-flex; padding: 6px 12px; border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill); color: var(--muted); font-size: 13px;
}
.tag-trail a:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }

/* Author box */
.author-box {
  display: flex; gap: 18px; align-items: center;
  margin-top: 40px; padding: 22px 24px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel);
}
.author-box .avatar { flex: none; }
.author-box .avatar img { width: 56px; height: 56px; border-radius: 50%; }
.author-box .eyebrow { margin-bottom: 2px; }
.author-box strong { display: block; font-size: 18px; color: var(--ink); }
.author-box p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }

/* Prev / next */
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 36px; }
.post-nav a {
  display: block; padding: 18px 20px; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow-sm);
  transition: transform 0.16s var(--ease), box-shadow 0.16s var(--ease), border-color 0.16s var(--ease);
}
.post-nav a:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.post-nav .dir { display: block; color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.post-nav .t { display: block; margin-top: 6px; color: var(--ink); font-weight: 700; line-height: 1.35; }
.post-nav .next { text-align: right; }

/* Related */
.related-posts { margin-top: 52px; padding-top: 28px; border-top: 1px solid var(--line); }
.section-head h2 { margin: 0 0 18px; font-size: 22px; font-weight: 800; letter-spacing: -0.01em; }
.related-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.related-card {
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  background: var(--paper); box-shadow: var(--shadow-sm);
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.related-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.related-thumb { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--panel-2); }
.related-card .body { padding: 14px 16px 18px; }
.related-card h3 { margin: 0; font-size: 16px; line-height: 1.38; font-weight: 700; }
.related-card h3 a { color: var(--ink); }
.related-card h3 a:hover { color: var(--accent); }
.related-card .post-date { display: block; margin-top: 8px; }

/* ==========================================================================
   10. Static pages
   ========================================================================== */
.static-page { max-width: 780px; margin-inline: auto; padding: clamp(34px, 6vw, 60px) 0 clamp(48px, 8vw, 80px); }
.static-page h1 {
  margin: 0 0 22px; padding-bottom: 22px; border-bottom: 2px solid var(--ink);
  color: var(--ink); font-size: clamp(34px, 6vw, 54px); font-weight: 800; line-height: 1.05; letter-spacing: -0.02em;
}
.static-page .article-body { padding-top: 0; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: var(--radius-pill);
  background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 15px;
  border: 1px solid var(--accent); cursor: pointer;
  transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease), background-color 0.15s var(--ease);
}
.btn:hover { color: var(--accent-ink); background: var(--brand-blue-2); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-outline { background: transparent; color: var(--accent); }
.btn-outline:hover { background: var(--accent-soft); color: var(--accent); box-shadow: none; }

.cta-band {
  margin: 40px 0 0; padding: 28px 30px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(135deg, var(--accent-soft), transparent);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px;
}
.cta-band h3 { margin: 0; font-size: 20px; font-weight: 800; }
.cta-band p { margin: 4px 0 0; color: var(--muted); }

.faq details {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 4px 18px; margin-bottom: 12px; background: var(--paper);
}
.faq summary { padding: 14px 0; font-weight: 700; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; color: var(--accent); font-weight: 800; }
.faq details[open] summary::after { content: "-"; }
.faq details > p { margin: 0 0 16px; color: var(--muted); }

/* ==========================================================================
   11. Pagination
   ========================================================================== */
.paging { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 40px; }
.paging .page-numbers {
  display: inline-grid; place-items: center; min-width: 40px; min-height: 40px; padding: 0 8px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: var(--paper); color: var(--ink-soft); font-size: 14px; font-weight: 700;
  transition: color 0.15s var(--ease), border-color 0.15s var(--ease), background-color 0.15s var(--ease);
}
.paging .page-numbers:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.paging .current { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.paging .dots { border: 0; background: transparent; }

/* ==========================================================================
   12. Footer
   ========================================================================== */
.site-footer { margin-top: 28px; border-top: 1px solid var(--line); background: var(--panel); }
.footer-inner {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr auto; gap: 40px;
  width: min(var(--wide), calc(100% - var(--gutter) * 2)); margin-inline: auto;
  padding: 38px 0 24px;
}
.footer-brand .brand { font-size: 20px; }
.footer-brand p { margin: 14px 0 0; color: var(--muted); font-size: 14px; max-width: 34ch; }
.footer-col h4 { margin: 0 0 14px; font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-col a { color: var(--ink-soft); font-size: 15px; }
.footer-col a:hover { color: var(--accent); }
.footer-social { display: flex; gap: 10px; }
.footer-social a {
  display: inline-grid; place-items: center; width: 38px; height: 38px;
  border: 1px solid var(--line-strong); border-radius: 50%; color: var(--ink-soft);
  transition: color 0.15s var(--ease), border-color 0.15s var(--ease), background-color 0.15s var(--ease);
}
.footer-social a:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.footer-social svg { width: 18px; height: 18px; }
.footer-bottom {
  width: min(var(--wide), calc(100% - var(--gutter) * 2)); margin-inline: auto;
  padding: 16px 0 28px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  color: var(--muted); font-size: 13px;
}
.footer-bottom nav { display: flex; flex-wrap: wrap; gap: 16px; }
.footer-bottom a { color: var(--muted); }
.footer-bottom a:hover { color: var(--accent); }

/* ==========================================================================
   13. Responsive
   ========================================================================== */
@media (max-width: 1080px) {
  .header-inner { grid-template-columns: auto 1fr auto; gap: 14px; }
  .top-nav {
    position: fixed; inset: var(--header-h) 0 auto 0; z-index: 99;
    display: none; flex-direction: column; align-items: stretch; gap: 2px;
    padding: 14px var(--gutter) 20px; background: var(--bg);
    border-bottom: 1px solid var(--line); box-shadow: var(--shadow-md);
  }
  .top-nav.is-open { display: flex; }
  .top-nav a { padding: 12px 14px; font-size: 16px; }
  .top-nav .current-menu-item > a::after, .top-nav .is-active::after { display: none; }
  .search-form { display: none; }
  .menu-toggle { display: inline-grid; place-items: center; }
  .content-layout { grid-template-columns: 1fr; gap: 34px; }
  .side-column { position: static; }
  .hero-inner { grid-template-columns: 1fr; gap: 14px; }
  .related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 30px; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  :root { --gutter: 18px; }
  .list-item { grid-template-columns: 1fr; gap: 14px; padding: 18px; }
  .list-thumb { width: 100%; }
  .article-body { font-size: 17px; line-height: 1.8; }
  .related-grid { grid-template-columns: 1fr; }
  .post-nav { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 26px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .author-box { flex-direction: column; align-items: flex-start; text-align: left; }
}

/* ==========================================================================
   14. Motion / print
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}
@media print {
  .site-header, .site-footer, .side-column, .breadcrumb, .post-nav, .related-posts, .tag-trail { display: none !important; }
  body { background: #fff; color: #000; }
  .content-layout { grid-template-columns: 1fr; }
  a { color: #000; border: 0; }
}
