/*
Theme Name: Art of Truth
Theme URI: https://artoftruth.org
Description: Custom dark editorial theme for Art of Truth
Version: 1.0
Author: Maël Guimet
*/

/* ============================================================
   VARIABLES
   ============================================================ */
:root {
  --bg:         #0d0d10;
  --bg2:        #111115;
  --surface:    #16161c;
  --surface2:   #1c1c24;
  --border:     #272733;
  --accent:     #d4a843;
  --accent-h:   #e8c060;
  --text:       #d0d0d8;
  --muted:      #8888a0;
  --heading:    #f0f0f4;
  --nav-h:      64px;
  --container:  1160px;
  --radius:     6px;
  --ease:       0.2s ease;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 17px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: Georgia, 'Times New Roman', serif;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a { color: var(--accent); text-decoration: none; transition: color var(--ease); }
a:hover { color: var(--accent-h); }

*:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Visually hidden but accessible to screen readers */
.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 9999;
  padding: 0.8rem 1.5rem;
  background: var(--accent);
  color: var(--bg);
  font-family: system-ui, sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
}
.skip-link:focus {
  left: 0;
  color: var(--bg);
}

h1, h2, h3, h4, h5, h6 {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--heading);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

ul, ol { list-style: none; }

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section { padding: 5rem 0; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-block;
  background: var(--accent);
  color: #0d0d10;
  font-family: system-ui, sans-serif;
  font-weight: 700;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 0.75em 2em;
  border-radius: var(--radius);
  border: 2px solid var(--accent);
  cursor: pointer;
  transition: background var(--ease), color var(--ease), transform var(--ease), border-color var(--ease);
}
.btn:hover {
  background: var(--accent-h);
  border-color: var(--accent-h);
  color: #0d0d10;
  transform: translateY(-2px);
}
.btn-outline {
  background: transparent;
  color: var(--accent);
}
.btn-outline:hover {
  background: var(--accent);
  color: #0d0d10;
}

/* ============================================================
   HEADER & NAV
   ============================================================ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 200;
  background: rgba(13, 13, 16, 0.88);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: border-color var(--ease), background var(--ease);
}
.site-header.is-scrolled {
  border-bottom-color: var(--border);
  background: rgba(13, 13, 16, 0.97);
}

.header-inner {
  display: flex;
  align-items: center;
  height: var(--nav-h);
  gap: 2rem;
}

.site-brand {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  text-decoration: none;
  line-height: 1;
}
.brand-name {
  font-family: system-ui, sans-serif;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  white-space: nowrap;
}
.brand-tagline {
  font-family: system-ui, sans-serif;
  font-size: 0.6rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-top: 3px;
}

.site-nav { margin-left: auto; }

.nav-list {
  display: flex;
  gap: 0.15rem;
  align-items: center;
}
.nav-list li a {
  font-family: system-ui, sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  padding: 0.4em 0.85em;
  border-radius: 4px;
  transition: color var(--ease), background var(--ease);
}
.nav-list li a:hover,
.nav-list li.current-menu-item > a,
.nav-list li.current_page_item > a,
.nav-list li.current-page-ancestor > a {
  color: var(--accent);
  background: rgba(212, 168, 67, 0.09);
}

/* Mobile burger */
.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  margin-left: auto;
}
.nav-burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--ease), opacity var(--ease);
}
.nav-burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.is-open span:nth-child(2) { opacity: 0; }
.nav-burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: var(--nav-h);
}
.hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #0d0d10 0%, #12101a 45%, #0d1018 75%, #0d0d10 100%);
  z-index: 0;
}
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(212, 168, 67, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(212, 168, 67, 0.04) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%);
}
.hero-content {
  position: relative;
  z-index: 1;
  padding: 5rem 1.5rem 6rem;
  max-width: var(--container);
  margin: 0 auto;
  width: 100%;
}
.hero-eyebrow {
  display: inline-block;
  font-family: system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent);
  border: 1px solid rgba(212, 168, 67, 0.3);
  padding: 0.3em 1em;
  border-radius: 20px;
  margin-bottom: 1.75rem;
}
.hero-title {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: clamp(3.2rem, 9vw, 7rem);
  font-weight: 900;
  line-height: 0.95;
  color: var(--heading);
  letter-spacing: -0.04em;
  margin-bottom: 1.75rem;
}
.hero-title .accent { color: var(--accent); }
.hero-sub {
  font-family: Georgia, serif;
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 500px;
  line-height: 1.7;
  margin-bottom: 2.5rem;
}

/* ============================================================
   CATEGORY INTRO GRID (homepage)
   ============================================================ */
.categories-intro {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.section-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}
.section-title {
  font-family: system-ui, sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--heading);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
  margin: 0;
  line-height: 1.15;
}
.section-line {
  flex: 1;
  height: 1px;
  background: var(--border);
}
.cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.cat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.75rem;
  display: block;
  text-decoration: none;
  transition: transform var(--ease), box-shadow var(--ease);
}
.cat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  color: inherit;
}
.cat-card h3 {
  font-family: system-ui, sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 0.6rem;
}
.cat-card p {
  font-family: system-ui, sans-serif;
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}

/* ============================================================
   POSTS GRID
   ============================================================ */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.view-all { text-align: center; margin-top: 3rem; }

/* ============================================================
   POST CARD
   ============================================================ */
.post-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--ease), border-color var(--ease), box-shadow var(--ease);
}
.post-card:hover {
  transform: translateY(-4px);
  border-color: rgba(212, 168, 67, 0.35);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}
.post-card-img {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--surface2);
  flex-shrink: 0;
}
.post-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.post-card:hover .post-card-img img { transform: scale(1.05); }

.post-card-no-img {
  display: block;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--surface2), var(--surface));
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.post-card-body {
  padding: 1.25rem 1.3rem 1.4rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.post-card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.7rem;
  flex-wrap: wrap;
}
.post-cat a {
  font-family: system-ui, sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--accent);
  background: rgba(212, 168, 67, 0.1);
  border: 1px solid rgba(212, 168, 67, 0.22);
  border-radius: 3px;
  padding: 0.15em 0.55em;
  text-decoration: none;
}
.post-cat a:hover { background: rgba(212, 168, 67, 0.2); color: var(--accent-h); }

.post-date {
  font-family: system-ui, sans-serif;
  font-size: 0.75rem;
  color: var(--muted);
}
.post-card-title {
  font-family: system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
  margin-bottom: 0.6rem;
}
.post-card-title a { color: var(--heading); text-decoration: none; }
.post-card-title a:hover { color: var(--accent); }

.post-card-excerpt {
  font-family: Georgia, serif;
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.65;
  margin: 0;
}

/* ============================================================
   ARCHIVE / BLOG
   ============================================================ */
.archive-wrap {
  padding-top: calc(var(--nav-h) + 4rem);
  padding-bottom: 6rem;
}
.archive-header {
  margin-bottom: 3.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
}
.archive-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--heading);
}
.archive-desc {
  font-size: 1rem;
  color: var(--muted);
  margin-top: 0.75rem;
  font-style: italic;
}
.no-posts {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--muted);
  padding: 4rem 0;
}

/* ============================================================
   SEARCH
   ============================================================ */
.search-form { margin-top: 1.5rem; }
.search-wrap {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  max-width: 480px;
  transition: border-color var(--ease);
}
.search-wrap:focus-within { border-color: var(--accent); }
.search-field {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  padding: 0.7rem 1rem;
  font-family: system-ui, sans-serif;
  font-size: 0.9rem;
  color: var(--text);
}
.search-field::placeholder { color: var(--muted); }
.search-btn {
  background: none;
  border: none;
  border-left: 1px solid var(--border);
  padding: 0.6rem 0.9rem;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: color var(--ease);
}
.search-btn:hover { color: var(--accent); }

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
  margin-top: 4rem;
  display: flex;
  justify-content: center;
}
.nav-links { display: inline-flex; gap: 0.4rem; flex-wrap: wrap; }
.nav-links a,
.nav-links span {
  font-family: system-ui, sans-serif;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.875rem;
  color: var(--text);
  text-decoration: none;
  transition: background var(--ease), color var(--ease), border-color var(--ease);
}
.nav-links a:hover { background: var(--surface2); border-color: var(--accent); color: var(--accent); }
.nav-links .current { background: var(--accent); border-color: var(--accent); color: #0d0d10; font-weight: 700; }

/* ============================================================
   SINGLE POST
   ============================================================ */
.single-wrap {
  padding-top: calc(var(--nav-h) + 4rem);
  padding-bottom: 6rem;
  max-width: 820px;
}
.post-header { margin-bottom: 2.5rem; }
.post-header-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.post-header-meta time {
  font-family: system-ui, sans-serif;
  font-size: 0.82rem;
  color: var(--muted);
}
.post-title {
  font-size: clamp(2rem, 5.5vw, 3.5rem);
  font-weight: 900;
  color: var(--heading);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 1.25rem;
}

.post-byline {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
  font-family: system-ui, sans-serif;
  font-size: 0.82rem;
}
.post-byline-author {
  color: var(--muted);
  font-weight: 500;
}
.post-byline-approved {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #4ade80;
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}
.post-byline-what {
  color: var(--muted);
  font-size: 0.75rem;
  text-decoration: underline;
  text-underline-offset: 2px;
  opacity: 0.6;
}
.post-byline-what:hover { opacity: 1; color: var(--accent); }
.post-featured-img {
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 2rem;
  border: 1px solid var(--border);
}
.post-featured-img img { width: 100%; }
.post-featured-img .featured-img-caption {
  font-size: 0.75rem;
  color: var(--muted);
  font-style: italic;
  text-align: center;
  padding: 0.4rem 1rem;
  margin: 0;
  opacity: 0.6;
  line-height: 1.4;
}

/* ============================================================
   ENTRY CONTENT
   ============================================================ */
.entry-content {
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--text);
}
.entry-content > * + * { margin-top: 1.4rem; }
.entry-content h2 {
  font-family: system-ui, sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  margin-top: 3.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
  color: var(--heading);
  letter-spacing: -0.02em;
}
.entry-content h3 {
  font-family: system-ui, sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  margin-top: 2.5rem;
  color: var(--heading);
}
.entry-content a { color: var(--accent); border-bottom: 1px solid rgba(212,168,67,0.3); }
.entry-content a:hover { border-bottom-color: var(--accent); }
.entry-content strong { color: var(--heading); font-weight: 700; }
.entry-content em { color: var(--muted); }
.entry-content ul, .entry-content ol {
  margin-left: 1.5rem;
  list-style: disc;
}
.entry-content ol { list-style: decimal; }
.entry-content li { margin-bottom: 0.4rem; }
.entry-content blockquote {
  border-left: 3px solid var(--accent);
  background: var(--surface);
  padding: 1.25rem 1.5rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 2rem 0;
}
.entry-content blockquote p { font-style: italic; color: var(--text); margin: 0; }
.entry-content code {
  background: var(--surface2);
  color: var(--accent);
  font-size: 0.88em;
  padding: 0.1em 0.4em;
  border-radius: 3px;
  font-family: 'Fira Code', 'Courier New', monospace;
}
.entry-content pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.4rem 0.6rem;
  overflow-x: auto;
  margin: 0;
}
.entry-content pre code {
  background: none;
  padding: 0;
  border-radius: 0;
  font-size: 0.88em;
  color: var(--accent);
}

/* copy code button */
.entry-content pre { position: relative; }
.copy-code-btn {
  position: absolute;
  top: 0.25rem;
  right: 0.25rem;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--muted);
  font-family: system-ui, sans-serif;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.2em 0.5em;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity var(--ease), color var(--ease), background var(--ease), border-color var(--ease);
  z-index: 1;
}
.entry-content pre:hover .copy-code-btn,
.copy-code-btn:focus-visible { opacity: 1; }
.copy-code-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--accent);
}
.copy-code-btn.is-copied {
  color: #4ade80;
  border-color: #4ade80;
  opacity: 1;
}

/* tables inside articles */
.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.92rem;
  line-height: 1.5;
}
.entry-content th,
.entry-content td {
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}
.entry-content th {
  background: var(--surface2);
  color: var(--heading);
  font-weight: 700;
  white-space: nowrap;
}
.entry-content td { color: var(--text); }
.entry-content tr:nth-child(even) td { background: var(--surface); }
.entry-content tr:hover td { background: var(--surface2); }
@media (max-width: 768px) {
  .entry-content table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .entry-content th, .entry-content td { white-space: nowrap; padding: 0.5rem 0.6rem; font-size: 0.85rem; }
}

/* ============================================================
   STATIC PAGE
   ============================================================ */
.page-wrap {
  padding-top: calc(var(--nav-h) + 4rem);
  padding-bottom: 6rem;
  max-width: 820px;
}
.page-header {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}
.page-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  letter-spacing: -0.03em;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: #09090c;
  border-top: 1px solid var(--border);
  padding: 1.5rem 0 1rem;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.footer-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.footer-brand-name {
  font-family: system-ui, sans-serif;
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
}
.footer-brand-name:hover { color: var(--accent-h); }
.footer-sep { color: var(--muted); font-size: 0.8rem; }
.footer-tagline {
  font-family: Georgia, serif;
  font-size: 0.8rem;
  color: var(--muted);
  font-style: italic;
}
.footer-copy {
  font-family: system-ui, sans-serif;
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 0.6rem;
  opacity: 0.6;
  text-align: center;
}
.footer-nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.footer-nav-list {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
.footer-nav-list a {
  font-family: system-ui, sans-serif;
  font-size: 0.8rem;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--ease);
}
.footer-nav-list a:hover { color: var(--accent); }
.footer-rss-dropdown { position: relative; flex-shrink: 0; }
.footer-rss-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--muted);
  font-size: 0.8rem;
  padding: 0.3rem 0.6rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: color 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.footer-rss-btn:hover { color: var(--accent); border-color: var(--accent); }
.rss-menu {
  display: none;
  position: absolute;
  bottom: 100%;
  right: 0;
  margin-bottom: 0.4rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  list-style: none;
  padding: 0.3rem 0;
  min-width: 120px;
  z-index: 100;
}
.footer-rss-dropdown.is-open .rss-menu { display: block; }
.rss-menu-item {
  display: block;
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
}
.rss-menu-item:hover { color: var(--fg); background: rgba(255,255,255,0.05); }
.rss-menu-item.rss-current { color: var(--accent); }

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar { width: 7px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .cat-grid, .posts-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  :root { --nav-h: 56px; }

  /* ── Grid ── */
  .cat-grid, .posts-grid { grid-template-columns: 1fr; }

  /* ── Header: [brand] ---- [lang] [burger] ── */
  .header-inner {
    gap: 0;
    padding: 0 0.75rem;
  }
  .site-brand { flex-shrink: 0; flex-grow: 1; }
  .brand-tagline { display: none; }
  .lang-switcher { margin-right: 1em; }
  .lang-current { padding: 0.4em 0.5em; }
  .nav-burger {
    display: flex;
    padding: 10px;
    justify-content: center;
    align-items: center;
  }

  /* ── Mobile nav overlay ── */
  .site-nav {
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    background: rgba(13, 13, 16, 0.98);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.5rem 1.5rem;
    display: none;
    z-index: 199;
  }
  .site-nav.is-open { display: block; }
  .nav-list { flex-direction: column; align-items: flex-start; gap: 0; }
  .nav-list li { width: 100%; }
  .nav-list li a { display: block; font-size: 1rem; padding: 0.65em 0.5em; }

  /* ── Footer ── */
  .footer-inner { flex-direction: column; }
  .footer-nav { align-self: flex-end; }
  .footer-tagline { display: none; }

  /* ── Hero ── */
  .hero-title { line-height: 1.0; }
}

/* ── Language switcher (dropdown) ──────────────────────── */
.lang-switcher {
  position: relative;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  margin-left: 1.5rem;
}
.lang-current {
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.25em 0.55em;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.3em;
  transition: color 0.15s, border-color 0.15s;
}
.lang-current:hover,
.lang-current[aria-expanded="true"] { color: var(--text); border-color: var(--accent); }
.lang-current svg { transition: transform 0.15s; }
.lang-current[aria-expanded="true"] svg { transform: rotate(180deg); }

.lang-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: #1a1a20;
  border: 1px solid var(--border);
  border-radius: 4px;
  list-style: none;
  margin: 0;
  padding: 0.25rem 0;
  min-width: 60px;
  z-index: 200;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}
.lang-dropdown.is-open { display: block; }
.lang-dropdown li a,
.lang-dropdown li span {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.4em 0.9em;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.12s, background 0.12s;
  white-space: nowrap;
}
.lang-dropdown li a:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.lang-dropdown li.current-lang span { color: var(--accent); }

/* ── Reading time ──────────────────────────────────────── */
.read-time {
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.read-time::before { content: '·'; margin-right: 0.4em; }

/* ── Share buttons ────────────────────────────────────── */
.post-share {
  margin: 2rem 0 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.post-share-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-family: system-ui, sans-serif;
}
.post-share-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.post-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.4rem 0.7rem;
  font-size: 0.75rem;
  color: var(--muted);
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  line-height: 1;
}
.post-share-btn:hover {
  color: var(--text);
  border-color: var(--accent);
  background: rgba(212, 168, 67, 0.06);
}
.post-share-btn.is-copied {
  color: var(--accent);
  border-color: var(--accent);
}
.post-share-btn svg {
  flex-shrink: 0;
}
@media (max-width: 480px) {
  .post-share { flex-direction: column; align-items: flex-start; }
  .post-share-buttons { gap: 0.4rem; }
}

/* ── Related articles ──────────────────────────────────── */
.related-posts {
  margin-top: 25.5px;
  padding-top: 0;
  border-top: 1px solid var(--border);
}
.related-title {
  margin-top: 25px;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 1.5rem;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}
.related-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  transition: border-color 0.15s;
}
.related-card:hover { border-color: var(--accent); }
.related-card-img { display: block; }
.related-card-img img { width: 100%; height: 150px; object-fit: cover; display: block; }
.related-card-body { padding: 0.9rem 1rem; flex: 1; }
.related-card-cat { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); display: block; margin-bottom: 0.35rem; }
.related-card-title { font-size: 0.95rem; font-weight: 600; line-height: 1.4; margin: 0; }
.related-card-title a { color: var(--text); text-decoration: none; }
.related-card-title a:hover { color: var(--accent); }

/* ── My take (human editor opinion on culture articles) ── */
.my-take {
  margin: 2.5rem 0;
  padding: 1.25rem 1.5rem;
  background: rgba(212, 168, 67, 0.06);
  border: 1px solid rgba(212, 168, 67, 0.25);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.my-take-label {
  display: block;
  font-family: system-ui, sans-serif;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}
.my-take-body {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text);
}
.my-take-body > * + * { margin-top: 0.75rem; }

/* ── Editor note ───────────────────────────────────────── */
.editor-note {
  margin: 1.5rem 0;
  padding: 0.7rem 1rem;
  background: rgba(255,255,255,0.03);
  border-left: 3px solid var(--muted);
  border-radius: 0 3px 3px 0;
  font-size: 0.85rem;
  color: var(--muted);
  font-style: italic;
}
.editor-note strong { color: var(--text); font-style: normal; }

/* ── Support Us page ───────────────────────────────────── */
.support-hero { text-align: center; padding: 4rem 0 2rem; }
.support-hero h1 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 1rem; }
.support-hero p { color: var(--muted); max-width: 540px; margin: 0 auto; line-height: 1.7; }
.support-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; margin: 3rem 0; }
.support-card { border: 1px solid var(--border); border-radius: 8px; padding: 1.8rem; display: flex; flex-direction: column; gap: 0.75rem; }
.support-card-label { font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent); }
.support-card h2 { font-size: 1.2rem; margin: 0; }
.support-card p { color: var(--muted); font-size: 0.9rem; line-height: 1.6; margin: 0; flex: 1; }
.support-card .coming-soon-badge { display: inline-block; font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; padding: 0.25em 0.6em; border-radius: 3px; border: 1px solid var(--border); color: var(--muted); align-self: flex-start; }

/* ── Translation notice ────────────────────────────────── */
.translation-notice {
  margin-top: 0.75rem;
  padding: 0.6rem 0.9rem;
  background: rgba(212, 168, 67, 0.06);
  border-left: 3px solid var(--accent);
  border-radius: 0 3px 3px 0;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.5;
}
.translation-notice a { color: var(--accent); text-decoration: none; }
.translation-notice a:hover { text-decoration: underline; }

/* ============================================================
   AUTHOR ARCHIVE PAGE  (v1.8)
   ============================================================ */
.author-wrap { padding: 6rem 0 4rem; }

.author-header {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  margin-bottom: 3rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
}

.author-avatar-wrap {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--surface2);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}
.author-avatar-icon {
  font-family: system-ui, sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.03em;
}

.author-domain {
  display: inline-block;
  font-family: system-ui, sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  border: 1px solid rgba(212,168,67,0.3);
  padding: 0.2em 0.8em;
  border-radius: 20px;
  margin-bottom: 0.75rem;
}
.author-name {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  margin: 0.25rem 0 0.75rem;
}
.author-bio {
  color: var(--text);
  line-height: 1.7;
  max-width: 600px;
  margin-bottom: 0.75rem;
}
.author-disclosure {
  font-size: 0.82rem;
  color: var(--muted);
  font-style: italic;
}
.author-disclosure a { color: var(--accent); }

.author-wrap .section-header { margin-bottom: 2rem; }

/* ── Byline author link ─────────────────────────────────── */
.post-byline-author a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(208,208,216,0.3);
  transition: border-color var(--ease), color var(--ease);
}
.post-byline-author a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ── AI Verified badge ──────────────────────────────────── */
.post-byline-ai-verified {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #a78bfa;
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}

/* ── Review request ────────────────────────────────────── */
.review-request {
  margin: 2.5rem 0 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.review-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 0.4rem 0.9rem;
  border-radius: 4px;
  font-size: 0.78rem;
  font-family: system-ui, sans-serif;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.review-btn:hover { border-color: var(--accent); color: var(--text); }
.review-form { margin-top: 0.8rem; max-width: 500px; }
.review-form textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 4px;
  padding: 0.6rem;
  font-size: 0.85rem;
  font-family: system-ui, sans-serif;
  resize: vertical;
}
.review-form textarea:focus { border-color: var(--accent); outline: none; }
.review-form-actions { display: flex; gap: 0.5rem; margin-top: 0.5rem; }
.review-submit, .review-cancel {
  padding: 0.35rem 0.8rem;
  border-radius: 4px;
  font-size: 0.78rem;
  font-family: system-ui, sans-serif;
  cursor: pointer;
  border: 1px solid var(--border);
}
.review-submit { background: var(--accent); color: #000; border-color: var(--accent); font-weight: 600; }
.review-submit:hover { opacity: 0.9; }
.review-cancel { background: none; color: var(--muted); }
.review-cancel:hover { color: var(--text); }
.review-status { display: block; margin-top: 0.6rem; font-size: 0.8rem; font-family: system-ui, sans-serif; }
.review-ok { color: #4ade80; }
.review-info { color: var(--muted); }

/* ── Verified badge ─────────────────────────────────────── */
.post-byline-verified {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  font-family: system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 500;
  color: #5a9ed8;
  opacity: 0.85;
}
.post-byline-verified svg { flex-shrink: 0; }

/* ============================================================
   TOPIC CLUSTER MAP PAGE  (v1.8)
   ============================================================ */
.cluster-page { padding-top: calc(var(--nav-h) + 2rem); }
.cluster-header { padding-bottom: 1.5rem; }
.cluster-title { font-size: clamp(1.8rem, 4vw, 2.5rem); margin-bottom: 0.5rem; }
.cluster-sub { color: var(--muted); font-size: 0.95rem; margin-bottom: 1.25rem; }

.cluster-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
}
.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-family: system-ui, sans-serif;
  font-size: 0.75rem;
  color: var(--muted);
}
.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.cluster-wrap {
  position: relative;
  width: 100%;
  background: var(--bg2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
#cluster-canvas {
  display: block;
  width: 100%;
  cursor: default;
}

.cluster-tooltip {
  display: none;
  position: absolute;
  pointer-events: none;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  font-family: system-ui, sans-serif;
  font-size: 0.8rem;
  color: var(--text);
  max-width: 240px;
  line-height: 1.45;
  z-index: 10;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}
.tt-cat {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

@media (max-width: 640px) {
  .author-header { flex-direction: column; gap: 1.25rem; }
  .author-avatar-wrap { width: 64px; height: 64px; }
}

/* ============================================================
   PRINT STYLESHEET
   ============================================================ */
@media print {
  *, *::before, *::after { background: #fff !important; color: #000 !important; box-shadow: none !important; text-shadow: none !important; }

  body { font-size: 12pt; line-height: 1.6; }

  .site-header, .site-footer, .site-nav, .nav-burger, .lang-switcher,
  .search-btn, .skip-link, .tts-player, .tts-section, .version-toggle,
  .copy-code-btn,
  .post-share, .related-posts, .related-articles, .review-request,
  .back-to-top, .pagination, .hero-bg,
  [class*="cookie"], [class*="enshittify"], [class*="admanipulate"],
  [class*="determinism"] { display: none !important; }

  [style*="position: fixed"], [style*="position: sticky"],
  [style*="position:fixed"], [style*="position:sticky"] { position: static !important; }

  .container, .single-wrap, .page-wrap, .entry-content {
    max-width: 100% !important;
    margin: 0 !important;
    padding: 1cm !important;
  }

  a { text-decoration: underline; }
  a[href^="http"]:after { content: " (" attr(href) ")"; font-size: 0.85em; word-break: break-all; }
  a[href^="#"]:after, a[href^="javascript"]:after { content: ""; }

  img { max-width: 100% !important; page-break-inside: avoid; }

  h1, h2, h3, h4, h5, h6 { break-after: avoid; page-break-after: avoid; color: #000 !important; }
  p, li, blockquote { orphans: 3; widows: 3; }

  .entry-content blockquote { border-left: 3px solid #999 !important; padding: 0.5rem 1rem !important; }
  .entry-content code { border: 1px solid #ccc !important; }
  .entry-content pre { border: 1px solid #ccc !important; page-break-inside: avoid; white-space: pre-wrap; }
  .entry-content table, .entry-content th, .entry-content td { border-color: #999 !important; }
}
