:root {
  --bg: #fafaf8;
  --surface: #ffffff;
  --text: #18181b;
  --muted: #52525b;
  --border: #e4e4e7;
  --accent: #1d4ed8;
  --accent-hover: #1e40af;
  --radius: 10px;
  --shadow: none;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, Helvetica, Arial, sans-serif;
  --font-heading: var(--font-body);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 2.5rem 1.25rem 5rem;
  font-family: var(--font-body);
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.2s ease, color 0.2s ease;
}

main {
  max-width: 740px;
  margin: 0 auto;
}

header {
  margin-bottom: 2.5rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--border);
}

h1 {
  margin: 0 0 0.75rem;
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.lead {
  margin: 0 0 0.9rem;
  font-size: 1.03rem;
  color: var(--muted);
}

nav.links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-top: 1.25rem;
  font-size: 0.95rem;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

section {
  margin-bottom: 2.5rem;
}

h2 {
  margin: 0 0 1rem;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.section-note {
  margin: -0.4rem 0 1.1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

ul.pub-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1rem;
}

.pub-item {
  padding: 1rem 1.15rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.pub-title {
  display: block;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.pub-meta {
  font-size: 0.9rem;
  color: var(--muted);
}

footer {
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1rem;
}

/* =========================================================
   1. BENTO FAMILY BASE & 21 BENTO VARIATIONS
   ========================================================= */
:root[data-theme^="bento"] main {
  max-width: 920px;
}

:root[data-theme^="bento"] header {
  background: var(--header-bg, linear-gradient(135deg, #ffffff 0%, #eef2ff 100%));
  border: var(--header-border, 1px solid var(--border));
  border-radius: var(--header-radius, 22px);
  padding: 2rem;
  box-shadow: var(--header-shadow, var(--shadow));
}

:root[data-theme^="bento"] ul.pub-list {
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
}

:root[data-theme^="bento"] .pub-item {
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

:root[data-theme^="bento"] nav.links a {
  background: var(--pill-bg, #e0e7ff);
  color: var(--pill-text, var(--accent));
  border: 1px solid var(--pill-border, transparent);
  padding: 0.3rem 0.78rem;
  border-radius: var(--pill-radius, 999px);
  font-weight: 600;
  font-size: 0.88rem;
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

:root[data-theme^="bento"] nav.links a:hover {
  transform: translateY(-1px);
  text-decoration: none;
  border-color: var(--pill-hover-border, var(--accent));
  background: var(--pill-hover-bg, var(--pill-bg, #e0e7ff));
  color: var(--pill-hover-text, var(--pill-text, var(--accent-hover)));
}

/* 1.1 BENTO (Modern SaaS/Research Card Grid — Baseline) */
:root[data-theme="bento"] {
  --bg: #f1f5f9;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --border: #e2e8f0;
  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --radius: 18px;
  --shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
  --header-bg: linear-gradient(135deg, #ffffff 0%, #eef2ff 100%);
  --pill-bg: #e0e7ff;
}

/* 1.2 BENTOPASTEL (Pastel Macaron) */
:root[data-theme="bentopastel"] {
  --bg: #faf5ff;
  --surface: #ffffff;
  --text: #2e1065;
  --muted: #5b4b7a;
  --border: #e9d5ff;
  --accent: #6d28d9;
  --accent-hover: #5b21b6;
  --radius: 20px;
  --shadow: 0 6px 18px rgba(109, 40, 217, 0.06);
  --header-bg: linear-gradient(135deg, #fff1f2 0%, #f3e8ff 52%, #e0f2fe 100%);
  --pill-bg: #f3e8ff;
  --pill-border: #d8b4fe;
  --pill-text: #5b21b6;
}

:root[data-theme="bentopastel"] .pub-item:nth-child(4n+1) {
  border-top: 3px solid #f9a8d4;
}

:root[data-theme="bentopastel"] .pub-item:nth-child(4n+2) {
  border-top: 3px solid #a5b4fc;
}

:root[data-theme="bentopastel"] .pub-item:nth-child(4n+3) {
  border-top: 3px solid #6ee7b7;
}

:root[data-theme="bentopastel"] .pub-item:nth-child(4n+4) {
  border-top: 3px solid #fcd34d;
}

/* 1.3 BENTORED (Vermilion Lacquer) */
:root[data-theme="bentored"] {
  --bg: #fcf5f5;
  --surface: #ffffff;
  --text: #1c1011;
  --muted: #5c4043;
  --border: #f2d5d8;
  --accent: #c81e1e;
  --accent-hover: #991b1b;
  --radius: 18px;
  --shadow: 0 4px 16px rgba(153, 27, 27, 0.06);
  --header-bg: linear-gradient(135deg, #ffffff 0%, #ffe4e6 100%);
  --pill-bg: #fee2e2;
  --pill-border: #fecaca;
  --pill-text: #991b1b;
}

:root[data-theme="bentored"] .pub-item:hover {
  border-color: #fca5a5;
  transform: translateY(-2px);
}

/* 1.4 BENTOMATCHA (Kyoto Matcha & Oat) */
:root[data-theme="bentomatcha"] {
  --bg: #f3f6ef;
  --surface: #fcfdfb;
  --text: #192b1e;
  --muted: #465c4b;
  --border: #d6e3cc;
  --accent: #2d6a3e;
  --accent-hover: #1e4d2b;
  --radius: 18px;
  --shadow: 0 4px 16px rgba(25, 43, 30, 0.05);
  --header-bg: linear-gradient(135deg, #fcfdfb 0%, #e3f1d8 100%);
  --pill-bg: #e3f1d8;
  --pill-border: #c1dbb0;
  --pill-text: #1e4d2b;
}

/* 1.5 BENTOOCEAN (Pelagic Sea & Sail) */
:root[data-theme="bentoocean"] {
  --bg: #edf6f9;
  --surface: #ffffff;
  --text: #0c2438;
  --muted: #3f5e75;
  --border: #cde4ee;
  --accent: #0369a1;
  --accent-hover: #075985;
  --radius: 18px;
  --shadow: 0 5px 18px rgba(12, 36, 56, 0.06);
  --header-bg: linear-gradient(135deg, #ffffff 0%, #e0f2fe 52%, #ccfbf1 100%);
  --pill-bg: #e0f2fe;
  --pill-border: #bae6fd;
  --pill-text: #075985;
}

:root[data-theme="bentoocean"] .pub-item {
  border-bottom: 3px solid #bae6fd;
}

/* 1.6 BENTOAMBER (Solar Honey & Espresso) */
:root[data-theme="bentoamber"] {
  --bg: #faf5eb;
  --surface: #fffdf9;
  --text: #271c12;
  --muted: #5c4938;
  --border: #eadbc0;
  --accent: #b45309;
  --accent-hover: #92400e;
  --radius: 18px;
  --shadow: 0 4px 16px rgba(39, 28, 18, 0.05);
  --header-bg: linear-gradient(135deg, #fffdf9 0%, #fef3c7 100%);
  --pill-bg: #fef3c7;
  --pill-border: #fde68a;
  --pill-text: #92400e;
}

/* 1.7 BENTOGLASS (Riso Aurora Frosted Glass) */
:root[data-theme="bentoglass"] {
  --bg: #fdf6e3;
  --surface: rgba(255, 253, 248, 0.66);
  --text: #1c1917;
  --muted: #57534e;
  --border: rgba(255, 255, 255, 0.72);
  --accent: #0369a1;
  --accent-hover: #6d28d9;
  --radius: 20px;
  --shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), 0 8px 30px rgba(153, 27, 27, 0.07);
  --header-bg: rgba(255, 253, 248, 0.68);
  --header-border: 1px solid rgba(255, 255, 255, 0.78);
  --pill-bg: rgba(252, 165, 165, 0.32);
  --pill-border: rgba(153, 27, 27, 0.18);
  --pill-text: #881337;
}

:root[data-theme="bentoglass"] body {
  background-image:
    radial-gradient(circle at 12% 14%, rgba(252, 165, 165, 0.45), transparent 38%),
    radial-gradient(circle at 88% 22%, rgba(2, 132, 199, 0.18), transparent 38%),
    radial-gradient(circle at 55% 88%, rgba(109, 40, 217, 0.14), transparent 42%);
  background-attachment: fixed;
}

:root[data-theme="bentoglass"] header,
:root[data-theme="bentoglass"] .pub-item {
  backdrop-filter: blur(14px) saturate(135%);
  -webkit-backdrop-filter: blur(14px) saturate(135%);
}

/* 1.8 BENTONOCTURNE (Midnight Obsidian Glass) */
:root[data-theme="bentonocturne"] {
  --bg: #090d16;
  --surface: rgba(255, 255, 255, 0.055);
  --text: #f1f5f9;
  --muted: #94a3b8;
  --border: rgba(255, 255, 255, 0.13);
  --accent: #38bdf8;
  --accent-hover: #7dd3fc;
  --radius: 20px;
  --shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 10px 32px rgba(0, 0, 0, 0.4);
  --header-bg: rgba(255, 255, 255, 0.065);
  --pill-bg: rgba(56, 189, 248, 0.14);
  --pill-border: rgba(56, 189, 248, 0.3);
  --pill-text: #7dd3fc;
}

:root[data-theme="bentonocturne"] body {
  background-image:
    radial-gradient(circle at 15% 15%, rgba(56, 189, 248, 0.17), transparent 36%),
    radial-gradient(circle at 85% 28%, rgba(168, 85, 247, 0.17), transparent 38%),
    radial-gradient(circle at 50% 88%, rgba(20, 184, 166, 0.12), transparent 42%);
  background-attachment: fixed;
}

:root[data-theme="bentonocturne"] header,
:root[data-theme="bentonocturne"] .pub-item {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* 1.9 BENTOPRISM (Holographic Dichroic Prism) */
:root[data-theme="bentoprism"] {
  --bg: #f6f8fc;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --border: #e2e8f0;
  --accent: #4f46e5;
  --accent-hover: #db2777;
  --radius: 20px;
  --shadow: 0 8px 24px rgba(79, 70, 229, 0.08);
  --pill-bg: linear-gradient(135deg, #e0f2fe, #fae8ff);
  --pill-border: rgba(99, 102, 241, 0.25);
  --pill-text: #3730a3;
}

:root[data-theme="bentoprism"] header {
  background:
    linear-gradient(135deg, #ffffff 0%, #f5f3ff 50%, #ecfeff 100%) padding-box,
    linear-gradient(135deg, #06b6d4, #6366f1, #ec4899, #f59e0b) border-box;
  border: 2px solid transparent;
}

:root[data-theme="bentoprism"] .pub-item {
  background:
    linear-gradient(#ffffff, #ffffff) padding-box,
    linear-gradient(135deg, #38bdf8 0%, #818cf8 35%, #f472b6 70%, #fbbf24 100%) border-box;
  border: 1.5px solid transparent;
}

/* 1.10 BENTOAURORA (Boreal Mesh & Sea Glass) */
:root[data-theme="bentoaurora"] {
  --bg: #071921;
  --surface: rgba(11, 35, 46, 0.72);
  --text: #ecfdf5;
  --muted: #99c2b5;
  --border: rgba(52, 211, 153, 0.24);
  --accent: #34d399;
  --accent-hover: #6ee7b7;
  --radius: 20px;
  --shadow: 0 10px 32px rgba(0, 0, 0, 0.35);
  --header-bg: rgba(11, 35, 46, 0.78);
  --pill-bg: rgba(52, 211, 153, 0.14);
  --pill-border: rgba(52, 211, 153, 0.32);
  --pill-text: #a7f3d0;
}

:root[data-theme="bentoaurora"] body {
  background-image:
    radial-gradient(circle at 18% 12%, rgba(52, 211, 153, 0.2), transparent 40%),
    radial-gradient(circle at 82% 24%, rgba(6, 182, 212, 0.18), transparent 42%),
    radial-gradient(circle at 46% 85%, rgba(139, 92, 246, 0.16), transparent 44%);
  background-attachment: fixed;
}

:root[data-theme="bentoaurora"] header,
:root[data-theme="bentoaurora"] .pub-item {
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* 1.11 BENTOCLAY (Soft Ceramic Claymorphism) */
:root[data-theme="bentoclay"] {
  --bg: #eaeff8;
  --surface: #f8faff;
  --text: #1e293b;
  --muted: #475569;
  --border: rgba(255, 255, 255, 0.8);
  --accent: #4f46e5;
  --accent-hover: #3730a3;
  --radius: 26px;
  --header-radius: 30px;
  --header-bg: linear-gradient(145deg, #ffffff 0%, #f1f5fe 100%);
  --shadow:
    inset 0 3px 5px rgba(255, 255, 255, 0.95),
    inset 0 -5px 10px rgba(99, 102, 241, 0.1),
    0 12px 24px rgba(30, 41, 59, 0.08);
  --pill-bg: #ffffff;
  --pill-border: rgba(255, 255, 255, 0.9);
  --pill-text: #4338ca;
}

:root[data-theme="bentoclay"] nav.links a {
  box-shadow:
    inset 0 2px 3px rgba(255, 255, 255, 0.95),
    inset 0 -2px 4px rgba(99, 102, 241, 0.12),
    0 4px 10px rgba(30, 41, 59, 0.07);
}

/* 1.12 BENTOROUGH (Rough Cotton Press & Ink Grain) */
:root[data-theme="bentorough"] {
  --bg: #efe9dc;
  --surface: #faf6ed;
  --text: #1c1917;
  --muted: #57534e;
  --border: #292524;
  --accent: #1e3a8a;
  --accent-hover: #991b1b;
  --radius: 19px 14px 20px 15px / 15px 19px 14px 20px;
  --header-radius: 22px 16px 24px 18px / 18px 22px 16px 24px;
  --header-bg: #faf6ed;
  --header-border: 1.5px solid #292524;
  --shadow: 3px 3px 0 rgba(41, 37, 36, 0.18);
  --pill-bg: #e7dfd0;
  --pill-border: #57534e;
  --pill-text: #1c1917;
}

:root[data-theme="bentorough"] body {
  background-color: var(--bg);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='128' height='128'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='128' height='128' filter='url(%23n)' opacity='0.065'/%3E%3C/svg%3E"),
    radial-gradient(rgba(41, 37, 36, 0.06) 1px, transparent 0);
  background-size: 128px 128px, 16px 16px;
}

:root[data-theme="bentorough"] .pub-item {
  border-width: 1.5px;
}

:root[data-theme="bentorough"] .pub-item:nth-child(odd) {
  transform: rotate(-0.25deg);
}

:root[data-theme="bentorough"] .pub-item:nth-child(even) {
  transform: rotate(0.25deg);
}

:root[data-theme="bentorough"] .pub-item:hover {
  transform: rotate(0deg) translateY(-1px);
}

:root[data-theme="bentorough"] nav.links a {
  border-style: dashed;
}

/* 1.13 BENTORISO (Duotone Riso Overprint Bento) */
:root[data-theme="bentoriso"] {
  --bg: #fdf6e3;
  --surface: #fffdf8;
  --text: #1c1917;
  --muted: #57534e;
  --border: #1e293b;
  --accent: #0284c7;
  --accent-hover: #991b1b;
  --radius: 16px;
  --header-bg: #fffdf8;
  --header-border: 1.5px solid #1e293b;
  --header-shadow: 6px 6px 0 #fca5a5;
  --shadow: 5px 5px 0 #bae6fd;
  --pill-bg: #ffe4e6;
  --pill-border: #fb7185;
  --pill-text: #9f1239;
}

:root[data-theme="bentoriso"] body {
  background-image:
    radial-gradient(rgba(153, 27, 27, 0.11) 1.1px, transparent 0),
    radial-gradient(rgba(2, 132, 199, 0.08) 1.1px, transparent 0);
  background-size: 16px 16px;
  background-position: 0 0, 8px 8px;
}

:root[data-theme="bentoriso"] h1 {
  text-shadow: 2px 2px 0 #fca5a5;
}

:root[data-theme="bentoriso"] .pub-item {
  border-width: 1.5px;
}

:root[data-theme="bentoriso"] .pub-item:nth-child(even) {
  box-shadow: 5px 5px 0 #fecdd3;
}

/* 1.14 BENTOBLUEPRINT (Cyanotype Schematic Grid) */
:root[data-theme="bentoblueprint"] {
  --bg: #eaf2fb;
  --surface: #ffffff;
  --text: #0f294a;
  --muted: #3b5575;
  --border: #93c5fd;
  --accent: #1d4ed8;
  --accent-hover: #1e40af;
  --radius: 12px;
  --header-radius: 14px;
  --header-bg: linear-gradient(135deg, #ffffff 0%, #eff6ff 100%);
  --shadow: 0 4px 14px rgba(30, 64, 175, 0.07);
  --pill-bg: #dbeafe;
  --pill-border: #93c5fd;
  --pill-text: #1e40af;
}

:root[data-theme="bentoblueprint"] body {
  background-image:
    linear-gradient(to right, rgba(37, 99, 235, 0.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(37, 99, 235, 0.07) 1px, transparent 1px),
    linear-gradient(to right, rgba(37, 99, 235, 0.14) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(37, 99, 235, 0.14) 1px, transparent 1px);
  background-size: 24px 24px, 24px 24px, 120px 120px, 120px 120px;
}

:root[data-theme="bentoblueprint"] .pub-item {
  border-top: 3px solid #2563eb;
}

:root[data-theme="bentoblueprint"] .pub-meta,
:root[data-theme="bentoblueprint"] nav.links a {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

/* 1.15 BENTOKRAFT (Archival Kraft & Index Cardstock) */
:root[data-theme="bentokraft"] {
  --bg: #e5dac7;
  --surface: #fbf8f1;
  --text: #261e17;
  --muted: #5c5043;
  --border: #c4b399;
  --accent: #9a3412;
  --accent-hover: #7c2d12;
  --radius: 14px;
  --header-radius: 18px;
  --header-bg: linear-gradient(135deg, #fdfbf7 0%, #f3ead8 100%);
  --shadow: 0 3px 10px rgba(60, 42, 24, 0.07);
  --pill-bg: #efe6d5;
  --pill-border: #cbbba0;
  --pill-text: #7c2d12;
}

/* 1.16 BENTODOT (Halftone Pop Outline Bento) */
:root[data-theme="bentodot"] {
  --bg: #f8fafc;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --border: #0f172a;
  --accent: #2563eb;
  --accent-hover: #4f46e5;
  --radius: 18px;
  --header-bg: linear-gradient(135deg, #ffffff 0%, #eef2ff 100%);
  --header-border: 2px solid #0f172a;
  --header-shadow: 5px 5px 0 #818cf8;
  --shadow: 4px 4px 0 #cbd5e1;
  --pill-bg: #eef2ff;
  --pill-border: #0f172a;
  --pill-text: #0f172a;
}

:root[data-theme="bentodot"] body {
  background-image: radial-gradient(#cbd5e1 1.25px, transparent 0);
  background-size: 16px 16px;
}

:root[data-theme="bentodot"] .pub-item {
  border-width: 2px;
}

:root[data-theme="bentodot"] .pub-item:hover {
  box-shadow: 6px 6px 0 #818cf8;
  transform: translate(-2px, -2px);
}

:root[data-theme="bentodot"] nav.links a {
  border-width: 1.5px;
}

/* 1.17 BENTOLINEAR (Hairline Slate & Spotlight) */
:root[data-theme="bentolinear"] {
  --bg: #fafafa;
  --surface: #ffffff;
  --text: #18181b;
  --muted: #52525b;
  --border: #e4e4e7;
  --accent: #3730a3;
  --accent-hover: #4f46e5;
  --radius: 14px;
  --header-radius: 18px;
  --header-bg: radial-gradient(90% 130% at 50% 0%, #eef2ff 0%, #ffffff 72%);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 0 0 4px rgba(24, 24, 27, 0.025);
  --pill-bg: #f4f4f5;
  --pill-border: #e4e4e7;
  --pill-text: #27272a;
  --pill-hover-bg: #eef2ff;
  --pill-hover-border: #c7d2fe;
  --pill-hover-text: #4338ca;
}

/* 1.18 BENTOINDUSTRIAL (Braun Anodized Aluminum) */
:root[data-theme="bentoindustrial"] {
  --bg: #e5e7eb;
  --surface: #f5f6f8;
  --text: #18181b;
  --muted: #4b5563;
  --border: #cfd4dc;
  --accent: #c2410c;
  --accent-hover: #9a3412;
  --radius: 14px;
  --header-radius: 16px;
  --header-bg: linear-gradient(180deg, #fafafa 0%, #eff1f5 100%);
  --shadow: inset 0 1px 0 #ffffff, 0 2px 5px rgba(15, 23, 42, 0.08);
  --pill-bg: #ffffff;
  --pill-border: #cbd5e1;
  --pill-text: #c2410c;
}

:root[data-theme="bentoindustrial"] .pub-item {
  background: linear-gradient(180deg, #fafafa 0%, #f1f3f5 100%);
}

:root[data-theme="bentoindustrial"] header h1::after {
  content: "";
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #ea580c;
  margin-left: 0.55rem;
  vertical-align: middle;
  box-shadow: 0 0 0 2px rgba(234, 88, 12, 0.2);
}

:root[data-theme="bentoindustrial"] nav.links a {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

/* 1.19 BENTOTERMINAL (Cryptographer Dark Cipher Bento) */
:root[data-theme="bentoterminal"] {
  --bg: #0a1017;
  --surface: #111a24;
  --text: #e2f1ec;
  --muted: #8ba69e;
  --border: #1e3142;
  --accent: #34d399;
  --accent-hover: #6ee7b7;
  --radius: 16px;
  --header-radius: 18px;
  --header-bg: linear-gradient(135deg, #111a24 0%, #09241f 100%);
  --shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  --pill-bg: rgba(16, 185, 129, 0.13);
  --pill-border: rgba(52, 211, 153, 0.3);
  --pill-text: #6ee7b7;
}

:root[data-theme="bentoterminal"] body {
  background-image: radial-gradient(rgba(16, 185, 129, 0.1) 1px, transparent 0);
  background-size: 22px 22px;
}

:root[data-theme="bentoterminal"] .pub-meta,
:root[data-theme="bentoterminal"] nav.links a {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

/* 1.20 BENTOSERIF (Literary Vellum & Serif Bento) */
:root[data-theme="bentoserif"] {
  --bg: #f5f1e8;
  --surface: #fffefb;
  --text: #1c1917;
  --muted: #57534e;
  --border: #e2dacb;
  --accent: #9f1239;
  --accent-hover: #881337;
  --radius: 16px;
  --header-radius: 20px;
  --header-bg: linear-gradient(135deg, #fffefb 0%, #f7efe0 100%);
  --shadow: 0 4px 16px rgba(41, 32, 24, 0.05);
  --font-heading: Georgia, "Times New Roman", Times, serif;
  --pill-bg: #f9e6e8;
  --pill-border: #ebc5cc;
  --pill-text: #881337;
}

:root[data-theme="bentoserif"] .pub-title {
  font-family: var(--font-heading);
  font-size: 1.04rem;
}

/* 1.21 BENTOSUNSET (Dusk Quartz & Horizon Mesh) */
:root[data-theme="bentosunset"] {
  --bg: #fcf5f3;
  --surface: #ffffff;
  --text: #291524;
  --muted: #63485b;
  --border: #f3dad4;
  --accent: #be185d;
  --accent-hover: #9d174d;
  --radius: 20px;
  --header-radius: 24px;
  --header-bg: linear-gradient(135deg, #fff7ed 0%, #ffe4e6 52%, #f3e8ff 100%);
  --shadow: 0 6px 20px rgba(157, 23, 77, 0.06);
  --pill-bg: #fce7f3;
  --pill-border: #fbcfe8;
  --pill-text: #9d174d;
}

/* =========================================================
   2. NORDIC (Warm Sage, Linen & Terracotta)
   ========================================================= */
:root[data-theme="nordic"] {
  --bg: #f3efe7;
  --surface: #faf8f3;
  --text: #1f332e;
  --muted: #4f635d;
  --border: #dcd5c7;
  --accent: #b45309;
  --accent-hover: #92400e;
  --radius: 14px;
}

:root[data-theme="nordic"] h1 {
  color: #152b26;
  font-weight: 650;
}

:root[data-theme="nordic"] .pub-item {
  border: 1px solid var(--border);
  padding: 1.2rem 1.3rem;
}

:root[data-theme="nordic"] h2 {
  color: #2f5249;
}

/* =========================================================
   3. EDITORIAL (Classic Broadsheet & Warm Paper)
   ========================================================= */
:root[data-theme="editorial"] {
  --bg: #f6f2e9;
  --surface: #fbf9f4;
  --text: #1c1917;
  --muted: #57534e;
  --border: #d6cfc2;
  --accent: #9a3412;
  --accent-hover: #7c2d12;
  --radius: 2px;
  --font-body: Georgia, "Times New Roman", Times, serif;
  --font-heading: Georgia, "Times New Roman", Times, serif;
}

:root[data-theme="editorial"] h1 {
  font-size: 2.6rem;
  font-weight: 400;
  letter-spacing: -0.03em;
  border-bottom: 3px double var(--border);
  padding-bottom: 0.6rem;
}

:root[data-theme="editorial"] h2 {
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  color: var(--accent);
}

:root[data-theme="editorial"] .pub-item {
  border: none;
  border-top: 1px solid var(--border);
  background: transparent;
  padding: 0.9rem 0;
}

/* =========================================================
   4. SWISS (International Typographic Grid)
   ========================================================= */
:root[data-theme="swiss"] {
  --bg: #f4f4ef;
  --surface: #ffffff;
  --text: #111111;
  --muted: #444444;
  --border: #111111;
  --accent: #dc2626;
  --accent-hover: #991b1b;
  --radius: 0px;
}

:root[data-theme="swiss"] main {
  max-width: 1060px;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 0 3rem;
  align-items: start;
}

:root[data-theme="swiss"] header {
  grid-column: 1;
  grid-row: 1 / span 4;
  position: sticky;
  top: 2rem;
  border-bottom: none;
  border-top: 6px solid #111111;
  padding-top: 1rem;
}

:root[data-theme="swiss"] h1 {
  font-size: 2.5rem;
  line-height: 1.05;
  text-transform: uppercase;
}

:root[data-theme="swiss"] section {
  grid-column: 2;
  border-top: 2px solid #111111;
  padding-top: 1rem;
}

:root[data-theme="swiss"] footer {
  grid-column: 1 / -1;
}

@media (max-width: 820px) {
  :root[data-theme="swiss"] main {
    grid-template-columns: 1fr;
  }
  :root[data-theme="swiss"] header,
  :root[data-theme="swiss"] section {
    grid-column: auto;
    grid-row: auto;
    position: static;
  }
}

/* =========================================================
   5. BRUTALIST (Neo-Brutalist Indie Zine)
   ========================================================= */
:root[data-theme="brutalist"] {
  --bg: #fef9c3;
  --surface: #ffffff;
  --text: #18181b;
  --muted: #3f3f46;
  --border: #18181b;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --radius: 0px;
  --shadow: 5px 5px 0px #18181b;
}

:root[data-theme="brutalist"] header {
  background: #bef264;
  border: 3px solid #18181b;
  box-shadow: 6px 6px 0px #18181b;
  padding: 1.5rem;
}

:root[data-theme="brutalist"] .pub-item {
  border: 2.5px solid #18181b;
}

:root[data-theme="brutalist"] nav.links a {
  background: #ffffff;
  border: 2px solid #18181b;
  padding: 0.25rem 0.65rem;
  font-weight: 700;
  color: #18181b;
  box-shadow: 3px 3px 0px #18181b;
}

:root[data-theme="brutalist"] nav.links a:hover {
  background: #fde047;
  text-decoration: none;
}

/* =========================================================
   FLOATING THEME SWITCHER BAR
   ========================================================= */
.theme-bar {
  position: fixed;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  max-width: calc(100vw - 1.5rem);
  white-space: nowrap;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  background: rgba(24, 24, 27, 0.92);
  color: #f4f4f5;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 0.85rem;
  backdrop-filter: blur(8px);
}

.theme-bar a,
.theme-bar button {
  color: #93c5fd;
  background: transparent;
  border: none;
  cursor: pointer;
  font: inherit;
  padding: 0.15rem 0.4rem;
  border-radius: 6px;
  text-decoration: none;
}

.theme-bar a:hover,
.theme-bar button:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  text-decoration: none;
}

.theme-bar .theme-label {
  font-weight: 600;
  color: #ffffff;
  padding: 0 0.25rem;
}

@media (max-width: 520px) {
  .theme-bar {
    gap: 0.35rem;
    padding: 0.42rem 0.65rem;
    font-size: 0.78rem;
  }

  .theme-bar a,
  .theme-bar button {
    padding: 0.15rem 0.3rem;
  }
}
