/* ================================================================
   Harmonic Society Philosophy — Main Stylesheet
   Pop, colorful, approachable design
   Mobile-first responsive with flat class names
   ================================================================ */

/* ----------------------------------------------------------------
   0. CSS Custom Properties
   ---------------------------------------------------------------- */
:root {
  /* Colors — Light Mode: Vibrant & Friendly */
  --color-bg: #fafbff;
  --color-bg-secondary: #f0f4ff;
  --color-bg-tertiary: #e8eeff;
  --color-text: #2d3250;
  --color-text-secondary: #555b7a;
  --color-text-muted: #8b90a8;
  --color-accent: #6c5ce7;
  --color-accent-light: #a29bfe;
  --color-accent-bg: rgba(108, 92, 231, 0.07);
  --color-border: #dde2f2;
  --color-border-light: #e8ecf8;
  --color-card-bg: #fff;
  --color-card-shadow: rgba(108, 92, 231, 0.08);
  --color-blockquote-bg: #f8f7ff;
  --color-blockquote-border: #6c5ce7;
  --color-code-bg: #f0f0fa;
  --color-code-text: #6c5ce7;
  --color-table-stripe: #f5f6ff;
  --color-header-bg: rgba(250, 251, 255, 0.92);
  --color-tag-bg: #f0f0fa;
  --color-tag-text: #555b7a;
  --color-tag-border: #dde2f2;
  --color-footer-bg: #2d3250;
  --color-footer-text: #b0b5d0;

  /* Brand colors */
  --hs-brand: #009688;
  --hs-brand-light: #4db6ac;

  /* Pop accent palette */
  --color-pink: #fd79a8;
  --color-orange: #fdcb6e;
  --color-green: #00b894;
  --color-blue: #74b9ff;
  --color-red: #ff7675;
  --color-teal: #00cec9;
  --color-purple: #a29bfe;
  --color-yellow: #ffeaa7;

  /* Era colors */
  --era-ancient: #6c5ce7;
  --era-medieval: #e17055;
  --era-early-modern: #00b894;
  --era-enlightenment: #fdcb6e;
  --era-modern: #0984e3;
  --era-contemporary: #fd79a8;

  /* Category colors */
  --cat-metaphysics: #6c5ce7;
  --cat-epistemology: #0984e3;
  --cat-ethics: #00b894;
  --cat-logic: #e17055;
  --cat-aesthetics: #fd79a8;
  --cat-political: #fdcb6e;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;

  /* Typography */
  --font-body: "Noto Sans JP", "游ゴシック", "Yu Gothic", "Hiragino Kaku Gothic ProN", sans-serif;
  --font-heading: "Noto Sans JP", "游ゴシック", "Yu Gothic", "Hiragino Kaku Gothic ProN", sans-serif;
  --font-mono: "Source Code Pro", "Menlo", "Consolas", monospace;
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  --leading-tight: 1.4;
  --leading-normal: 1.8;
  --leading-relaxed: 2.0;

  /* Layout */
  --content-max-width: 800px;
  --wide-max-width: 1100px;
  --sidebar-width: 250px;
  --header-height: 64px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;
  --transition-bounce: 400ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
}

/* ----------------------------------------------------------------
   0a. Dark Mode
   ---------------------------------------------------------------- */
@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #1a1b2e;
    --color-bg-secondary: #222340;
    --color-bg-tertiary: #2a2c4a;
    --color-text: #e8eaf6;
    --color-text-secondary: #b0b4d0;
    --color-text-muted: #7a7ea0;
    --color-accent: #a29bfe;
    --color-accent-light: #c4bfff;
    --color-accent-bg: rgba(162, 155, 254, 0.1);
    --color-border: #383a58;
    --color-border-light: #2e3050;
    --color-card-bg: #252742;
    --color-card-shadow: rgba(0, 0, 0, 0.3);
    --color-blockquote-bg: #252742;
    --color-blockquote-border: #a29bfe;
    --color-code-bg: #2a2c4a;
    --color-code-text: #a29bfe;
    --color-table-stripe: #252742;
    --color-header-bg: rgba(26, 27, 46, 0.92);
    --color-tag-bg: #2a2c4a;
    --color-tag-text: #b0b4d0;
    --color-tag-border: #383a58;
    --color-footer-bg: #14152a;
    --color-footer-text: #7a7ea0;
  }
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-wrap: break-word;
  line-break: strict;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "palt" 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

input, button, textarea, select {
  font: inherit;
}

ul, ol {
  list-style: none;
}

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

a:hover {
  color: var(--color-accent-light);
}

::selection {
  background-color: var(--color-accent);
  color: #fff;
}

/* ----------------------------------------------------------------
   2. Typography
   ---------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 800;
  line-height: var(--leading-tight);
  color: var(--color-text);
  letter-spacing: 0.01em;
}

h1 {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-lg);
}

h2 {
  font-size: var(--text-2xl);
  margin-top: var(--space-3xl);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 3px solid var(--color-accent-bg);
  position: relative;
}

h2::after {
  content: "";
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 60px;
  height: 3px;
  background: linear-gradient(135deg, var(--color-accent), var(--color-pink));
  border-radius: 2px;
}

h3 {
  font-size: var(--text-xl);
  margin-top: var(--space-2xl);
  margin-bottom: var(--space-md);
}

h4 {
  font-size: var(--text-lg);
  margin-top: var(--space-xl);
  margin-bottom: var(--space-sm);
}

p {
  margin-bottom: var(--space-md);
  text-align: justify;
  text-justify: inter-ideograph;
}

strong, b { font-weight: 700; }
em, i { font-style: italic; }
small { font-size: var(--text-sm); }

mark {
  background: linear-gradient(135deg, rgba(253, 203, 110, 0.3), rgba(253, 121, 168, 0.2));
  padding: 0.1em 0.3em;
  border-radius: var(--radius-sm);
}

hr {
  border: none;
  height: 3px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-pink), var(--color-orange), var(--color-green));
  margin: var(--space-2xl) 0;
  border-radius: var(--radius-full);
  opacity: 0.3;
}

sup, sub {
  font-size: 0.75em;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}

sup { top: -0.5em; }
sub { bottom: -0.25em; }

ruby { ruby-align: center; }
rt { font-size: 0.5em; color: var(--color-text-secondary); }

/* ----------------------------------------------------------------
   3. Main Content Area (baseof.html)
   ---------------------------------------------------------------- */
.main-content {
  flex: 1;
  padding-top: var(--space-xl);
  padding-bottom: var(--space-3xl);
  width: 100%;
  max-width: var(--wide-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-md);
  padding-right: var(--space-md);
}

/* ----------------------------------------------------------------
   4. Header & Navigation (header.html)
   ---------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--color-header-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--color-border-light);
  height: var(--header-height);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--wide-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-md);
  padding-right: var(--space-md);
}

.site-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  text-decoration: none;
  white-space: nowrap;
  transition: opacity var(--transition-fast);
}

.site-logo:hover {
  opacity: 0.8;
}

.site-logo-mark {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.site-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.site-title-en {
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: 900;
  letter-spacing: 0.02em;
  background: linear-gradient(135deg, var(--hs-brand), var(--hs-brand-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.site-title-jp {
  font-family: var(--font-heading);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  letter-spacing: 0.04em;
}

.main-nav {
  display: flex;
  align-items: center;
}

/* Hamburger toggle button */
.nav-toggle {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 101;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background-color: var(--color-text);
  border-radius: 2px;
  transition: transform var(--transition-base), opacity var(--transition-base);
}

/* Hamburger → X animation */
.nav-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Nav list — hidden on mobile by default.
   Uses height:calc instead of bottom:0 because backdrop-filter on .site-header
   creates a new containing block, making position:fixed behave like absolute. */
.nav-list {
  display: none;
  position: fixed;
  top: var(--header-height);
  left: 0;
  width: 100%;
  height: calc(100vh - var(--header-height));
  height: calc(100dvh - var(--header-height));
  flex-direction: column;
  background-color: var(--color-bg);
  padding: var(--space-xl) var(--space-md);
  margin: 0;
  z-index: 99;
  overflow-y: auto;
  list-style: none;
  -webkit-overflow-scrolling: touch;
}

.nav-list.open {
  display: flex;
}

.nav-list li {
  border-bottom: 1px solid var(--color-border-light);
}

.nav-list a {
  display: block;
  padding: var(--space-md);
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-text);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.nav-list a:hover {
  color: var(--color-accent);
}

.nav-list a.active {
  color: var(--color-accent);
  font-weight: 700;
}

/* ----------------------------------------------------------------
   5. Breadcrumb (breadcrumb.html)
   ---------------------------------------------------------------- */
.breadcrumb {
  padding: var(--space-md) 0;
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.breadcrumb ol {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-xs);
  list-style: none;
}

.breadcrumb li {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.breadcrumb li:not(:last-child)::after {
  content: "\203A";
  color: var(--color-text-muted);
  margin-left: var(--space-xs);
}

.breadcrumb a {
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.breadcrumb a:hover {
  color: var(--color-accent);
}

.breadcrumb li[aria-current="page"] {
  color: var(--color-text-secondary);
}

/* ----------------------------------------------------------------
   6. Single Article (single.html)
   ---------------------------------------------------------------- */
.article-content {
  max-width: var(--content-max-width);
  margin-left: auto;
  margin-right: auto;
}

.article-header {
  margin-bottom: var(--space-xl);
}

.article-header h1 {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-md);
  background: linear-gradient(135deg, var(--color-text) 0%, var(--color-accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm) var(--space-md);
  margin-bottom: var(--space-xl);
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.meta-date {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
}

.meta-lastmod {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-style: italic;
  opacity: 0.85;
}

.meta-era-period {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: var(--text-xs);
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--color-accent), var(--color-pink));
  padding: 0.3em 0.8em;
  border-radius: var(--radius-full);
}

/* Tag / Badge styling for meta items */
.meta-eras,
.meta-categories,
.meta-tags {
  display: inline-flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.meta-eras a,
.meta-categories a,
.meta-tags a {
  display: inline-flex;
  align-items: center;
  padding: 0.25em 0.75em;
  font-family: var(--font-heading);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-tag-text);
  background-color: var(--color-tag-bg);
  border: 1px solid var(--color-tag-border);
  border-radius: var(--radius-full);
  text-decoration: none;
  transition: all var(--transition-fast);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.meta-eras a:hover,
.meta-categories a:hover,
.meta-tags a:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px var(--color-card-shadow);
}

/* Era badges: colorful outline */
.meta-eras a {
  color: var(--era-ancient);
  border-color: var(--era-ancient);
  background-color: transparent;
}

.meta-eras a:hover {
  background-color: var(--era-ancient);
  color: #fff;
}

/* Category badges: filled, colorful */
.meta-categories a {
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-light));
  color: #fff;
  border-color: transparent;
  font-weight: 700;
}

.meta-categories a:hover {
  opacity: 0.85;
  color: #fff;
  border-color: transparent;
}

/* Tag badges */
.meta-tags a:hover {
  color: var(--color-accent);
  border-color: var(--color-accent);
  background-color: var(--color-accent-bg);
}

/* Two-column layout: article + sidebar */
.article-body.two-column {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xl);
}

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

/* Article body content typography */
.article-main ul,
.article-main ol {
  margin-bottom: var(--space-md);
  padding-left: var(--space-xl);
}

.article-main ul {
  list-style-type: disc;
}

.article-main ol {
  list-style-type: decimal;
}

.article-main li {
  margin-bottom: var(--space-xs);
  line-height: var(--leading-normal);
}

.article-main li > ul,
.article-main li > ol {
  margin-top: var(--space-xs);
  margin-bottom: 0;
}

/* Links within article content */
.article-main a {
  color: var(--color-accent);
  text-decoration: underline;
  text-decoration-color: rgba(108, 92, 231, 0.3);
  text-underline-offset: 0.15em;
  transition: text-decoration-color var(--transition-fast), color var(--transition-fast);
}

.article-main a:hover {
  text-decoration-color: var(--color-accent);
}

/* ----------------------------------------------------------------
   7. Sidebar & Table of Contents (sidebar.html)
   ---------------------------------------------------------------- */
.sidebar {
  width: 100%;
}

.toc {
  padding: var(--space-lg);
  background: linear-gradient(135deg, var(--color-card-bg), var(--color-bg-secondary));
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
}

.toc-title {
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: 800;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--color-accent-bg);
  /* Override default h2 styles */
  margin-top: 0;
  border-bottom-width: 2px;
}

.toc-title::after {
  display: none;
}

/* Hugo-generated TableOfContents */
#TableOfContents ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

#TableOfContents ul ul {
  padding-left: var(--space-md);
  margin-top: var(--space-xs);
}

#TableOfContents li {
  margin-bottom: var(--space-xs);
}

#TableOfContents a {
  display: block;
  padding: var(--space-xs) 0;
  padding-left: var(--space-sm);
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: all var(--transition-fast);
  line-height: 1.5;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

#TableOfContents a:hover {
  color: var(--color-accent);
  border-left-color: var(--color-accent);
  background-color: var(--color-accent-bg);
}

/* ----------------------------------------------------------------
   7b. Column Branding (column-branding.html)
   ---------------------------------------------------------------- */
.column-branding {
  margin-top: var(--space-2xl);
  padding: var(--space-xl);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--color-accent-bg), var(--color-bg-secondary));
  border: 1px solid var(--color-border-light);
}

.column-branding-inner {
  display: flex;
  gap: var(--space-lg);
  align-items: flex-start;
}

.column-branding-logo {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
}

.column-branding-body {
  flex: 1;
  min-width: 0;
}

.column-branding-tagline {
  margin: 0 0 var(--space-xs);
  font-family: var(--font-heading);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-accent);
}

.column-branding-description {
  margin: 0 0 var(--space-md);
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
  color: var(--color-text-secondary);
}

.column-branding-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.column-branding-link {
  display: inline-block;
  padding: var(--space-xs) var(--space-md);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-accent);
  background-color: var(--color-bg);
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-full);
  text-decoration: none;
  transition: color var(--transition-fast), background-color var(--transition-fast);
}

.column-branding-link:hover {
  color: #fff;
  background-color: var(--color-accent);
}

.column-branding-link--external::after {
  content: " \2197";
}

/* ----------------------------------------------------------------
   8. Related Pages (related.html)
   ---------------------------------------------------------------- */
.related-pages {
  margin-top: var(--space-3xl);
  padding-top: var(--space-2xl);
  border-top: 3px solid var(--color-accent-bg);
}

.related-pages h2 {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 800;
  margin-bottom: var(--space-lg);
  margin-top: 0;
  border-bottom: none;
  padding-bottom: 0;
}

.related-pages h2::after {
  display: none;
}

.related-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
  list-style: none;
}

.related-item {
  padding: var(--space-md);
  background-color: var(--color-card-bg);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  border-left: 4px solid var(--color-accent);
  transition: all var(--transition-base);
}

.related-item:hover {
  border-left-color: var(--color-pink);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px var(--color-card-shadow);
}

.related-item a {
  font-family: var(--font-heading);
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-text);
  text-decoration: none;
}

.related-item:hover a {
  color: var(--color-accent);
}

.related-description {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  margin-top: var(--space-xs);
  margin-bottom: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ----------------------------------------------------------------
   9. List Page (list.html)
   ---------------------------------------------------------------- */
.list-page {
  max-width: var(--wide-max-width);
  margin-left: auto;
  margin-right: auto;
}

.list-header {
  margin-bottom: var(--space-2xl);
  padding-bottom: var(--space-xl);
  border-bottom: 3px solid var(--color-accent-bg);
  position: relative;
}

.list-header h1 {
  margin-bottom: var(--space-sm);
}

.list-description {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  max-width: 600px;
  line-height: var(--leading-relaxed);
}

.page-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

.page-card {
  background-color: var(--color-card-bg);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  border-left: 4px solid var(--color-accent);
  transition: transform var(--transition-bounce), box-shadow var(--transition-base), border-color var(--transition-fast);
}

.page-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px var(--color-card-shadow);
  border-left-color: var(--color-pink);
}

.page-card h2 {
  font-size: var(--text-xl);
  margin-top: 0;
  margin-bottom: var(--space-sm);
  padding-bottom: 0;
  border-bottom: none;
}

.page-card h2::after {
  display: none;
}

.page-card h2 a {
  color: var(--color-text);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.page-card:hover h2 a {
  color: var(--color-accent);
}

.card-description {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: var(--leading-normal);
  margin-bottom: var(--space-md);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-era-period {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: var(--text-xs);
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--color-accent), var(--color-pink));
  padding: 0.3em 0.8em;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-sm);
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-heading);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  padding-top: var(--space-sm);
  border-top: 1px solid var(--color-border-light);
  margin-top: var(--space-sm);
}

/* Tag/badge styling for card items */
.card-eras,
.card-categories,
.card-tags {
  display: inline-flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.card-eras a,
.card-categories a,
.card-tags a {
  display: inline-flex;
  align-items: center;
  padding: 0.2em 0.65em;
  font-family: var(--font-heading);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-tag-text);
  background-color: var(--color-tag-bg);
  border: 1px solid var(--color-tag-border);
  border-radius: var(--radius-full);
  text-decoration: none;
  transition: all var(--transition-fast);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.card-eras a:hover,
.card-categories a:hover,
.card-tags a:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 6px var(--color-card-shadow);
}

.card-eras a {
  color: var(--era-ancient);
  border-color: var(--era-ancient);
  background-color: transparent;
}

.card-eras a:hover {
  background-color: var(--era-ancient);
  color: #fff;
}

.card-categories a {
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-light));
  color: #fff;
  border-color: transparent;
  font-weight: 700;
}

.card-categories a:hover {
  opacity: 0.85;
  color: #fff;
  border-color: transparent;
}

/* ----------------------------------------------------------------
   10. Home Page (index.html)
   ---------------------------------------------------------------- */
.home-hero {
  position: relative;
  padding: var(--space-3xl) var(--space-md);
  text-align: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #f5576c 75%, #fda085 100%);
  background-size: 300% 300%;
  animation: gradientShift 12s ease infinite;
  margin-bottom: var(--space-2xl);
  overflow: hidden;
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  /* Extend full width */
  margin-left: calc(-1 * var(--space-md));
  margin-right: calc(-1 * var(--space-md));
  margin-top: calc(-1 * var(--space-xl));
  padding-left: var(--space-md);
  padding-right: var(--space-md);
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.home-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.home-hero::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--color-bg);
  border-radius: 50% 50% 0 0;
}

.home-hero h1 {
  position: relative;
  z-index: 1;
  font-family: var(--font-heading);
  font-size: var(--text-4xl);
  font-weight: 900;
  color: #fff;
  letter-spacing: 0.04em;
  margin-bottom: var(--space-md);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.hero-tagline {
  position: relative;
  z-index: 1;
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin-bottom: var(--space-md);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.hero-description {
  position: relative;
  z-index: 1;
  font-size: var(--text-lg);
  color: rgba(255, 255, 255, 0.92);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 0;
  line-height: var(--leading-relaxed);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.home-sections {
  margin-bottom: var(--space-3xl);
}

.home-sections h2 {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-lg);
  margin-top: 0;
  padding-bottom: var(--space-sm);
  border-bottom: 3px solid var(--color-accent-bg);
}

.section-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

.section-card {
  display: flex;
  flex-direction: column;
  background-color: var(--color-card-bg);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-xl) var(--space-lg);
  text-decoration: none;
  color: inherit;
  transition: transform var(--transition-bounce), box-shadow var(--transition-base);
  position: relative;
  overflow: hidden;
}

.section-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-pink));
  transition: height var(--transition-base);
}

/* Each era section card gets a distinct color */
.section-card:nth-child(1)::before { background: linear-gradient(90deg, var(--era-ancient), #a29bfe); }
.section-card:nth-child(2)::before { background: linear-gradient(90deg, var(--era-medieval), #fab1a0); }
.section-card:nth-child(3)::before { background: linear-gradient(90deg, var(--era-early-modern), #55efc4); }
.section-card:nth-child(4)::before { background: linear-gradient(90deg, var(--era-enlightenment), #ffeaa7); }
.section-card:nth-child(5)::before { background: linear-gradient(90deg, var(--era-modern), #74b9ff); }
.section-card:nth-child(6)::before { background: linear-gradient(90deg, var(--era-contemporary), #fd79a8); }

.section-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px var(--color-card-shadow);
  color: inherit;
}

.section-card:hover::before {
  height: 6px;
}

.section-card h3 {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--color-text);
  margin-bottom: var(--space-sm);
  margin-top: 0;
}

.section-card:hover h3 {
  color: var(--color-accent);
}

.section-card p {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: var(--leading-normal);
  margin-bottom: 0;
  text-align: left;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.home-recent {
  margin-bottom: var(--space-2xl);
}

.home-recent h2 {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-lg);
  margin-top: 0;
  padding-bottom: var(--space-sm);
  border-bottom: 3px solid var(--color-accent-bg);
}

.recent-articles {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.recent-card {
  padding: var(--space-md) var(--space-lg);
  background-color: var(--color-card-bg);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--color-accent);
  transition: all var(--transition-base);
}

.recent-card:hover {
  border-left-color: var(--color-pink);
  transform: translateX(4px);
  box-shadow: 0 4px 16px var(--color-card-shadow);
}

.recent-card h3 {
  font-size: var(--text-base);
  font-weight: 700;
  margin-top: 0;
  margin-bottom: var(--space-xs);
}

.recent-card h3 a {
  color: var(--color-text);
  text-decoration: none;
}

.recent-card:hover h3 a {
  color: var(--color-accent);
}

.recent-card p {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-xs);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-align: left;
}

.recent-card time {
  font-family: var(--font-heading);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* ----------------------------------------------------------------
   10a. Columns Section (columns/list.html)
   ---------------------------------------------------------------- */
:root {
  --color-column: #00cec9;
  --color-column-light: #55efc4;
  --color-column-bg: rgba(0, 206, 201, 0.07);
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-column: #55efc4;
    --color-column-light: #00cec9;
    --color-column-bg: rgba(85, 239, 196, 0.1);
  }
}

.columns-page {
  max-width: var(--wide-max-width);
  margin-left: auto;
  margin-right: auto;
}

.columns-header {
  margin-bottom: var(--space-2xl);
  padding-bottom: var(--space-xl);
  border-bottom: 3px solid var(--color-column-bg);
}

.columns-header h1 {
  margin-bottom: var(--space-sm);
  background: linear-gradient(135deg, var(--color-column), var(--color-teal));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.columns-description {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  max-width: 700px;
  line-height: var(--leading-relaxed);
}

/* Featured card */
.column-featured {
  display: block;
  position: relative;
  margin-bottom: var(--space-2xl);
  padding: var(--space-2xl) var(--space-xl);
  background: linear-gradient(135deg, #00cec9, #0984e3);
  border-radius: var(--radius-xl);
  text-decoration: none;
  color: #fff;
  overflow: hidden;
  transition: transform var(--transition-bounce), box-shadow var(--transition-base);
}

.column-featured::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(circle at 10% 90%, rgba(255, 255, 255, 0.12) 0%, transparent 50%),
    radial-gradient(circle at 90% 10%, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
  pointer-events: none;
}

.column-featured:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 206, 201, 0.3);
  color: #fff;
}

.column-featured-inner {
  position: relative;
  z-index: 1;
}

.column-featured h2 {
  font-size: var(--text-2xl);
  color: #fff;
  margin-top: var(--space-sm);
  margin-bottom: var(--space-md);
  padding-bottom: 0;
  border-bottom: none;
}

.column-featured h2::after {
  display: none;
}

.column-featured-description {
  font-size: var(--text-base);
  color: rgba(255, 255, 255, 0.9);
  max-width: 700px;
  line-height: var(--leading-normal);
  margin-bottom: var(--space-md);
  text-align: left;
}

.column-featured-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.8);
}

.column-featured-meta time {
  font-family: var(--font-heading);
}

/* Topic badge */
.column-topic-badge {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: var(--text-xs);
  font-weight: 700;
  padding: 0.3em 0.8em;
  border-radius: var(--radius-full);
  background-color: rgba(255, 255, 255, 0.2);
  color: #fff;
  letter-spacing: 0.02em;
}

/* Column tags */
.column-tags {
  display: inline-flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.column-tag {
  font-family: var(--font-heading);
  font-size: var(--text-xs);
  padding: 0.2em 0.6em;
  border-radius: var(--radius-full);
  background-color: rgba(255, 255, 255, 0.15);
  color: inherit;
}

/* Grid cards */
.columns-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

.column-card {
  display: flex;
  flex-direction: column;
  background-color: var(--color-card-bg);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  border-top: 4px solid var(--color-column);
  text-decoration: none;
  color: inherit;
  transition: transform var(--transition-bounce), box-shadow var(--transition-base), border-color var(--transition-fast);
}

.column-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px var(--color-card-shadow);
  border-top-color: var(--color-column-light);
  color: inherit;
}

.column-card .column-topic-badge {
  background-color: var(--color-column-bg);
  color: var(--color-column);
  align-self: flex-start;
  margin-bottom: var(--space-sm);
}

.column-card h3 {
  font-size: var(--text-lg);
  font-weight: 800;
  color: var(--color-text);
  margin-top: 0;
  margin-bottom: var(--space-sm);
}

.column-card:hover h3 {
  color: var(--color-column);
}

.column-card-description {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: var(--leading-normal);
  margin-bottom: var(--space-md);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
  text-align: left;
}

.column-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm);
  padding-top: var(--space-sm);
  border-top: 1px solid var(--color-border-light);
  margin-top: auto;
}

.column-card-meta time {
  font-family: var(--font-heading);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.column-card-meta .column-tag {
  background-color: var(--color-column-bg);
  color: var(--color-column);
}

/* ----------------------------------------------------------------
   10b. Home — Columns Section
   ---------------------------------------------------------------- */
.home-columns {
  margin-bottom: var(--space-3xl);
}

.home-columns h2 {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-lg);
  margin-top: 0;
  padding-bottom: var(--space-sm);
  border-bottom: 3px solid var(--color-column-bg);
}

.home-columns h2::after {
  background: linear-gradient(135deg, var(--color-column), var(--color-blue));
}

.home-columns-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

.home-column-card {
  display: flex;
  flex-direction: column;
  background-color: var(--color-card-bg);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  border-top: 4px solid var(--color-column);
  text-decoration: none;
  color: inherit;
  transition: transform var(--transition-bounce), box-shadow var(--transition-base);
}

.home-column-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px var(--color-card-shadow);
  color: inherit;
}

.home-column-card .column-topic-badge {
  align-self: flex-start;
  background-color: var(--color-column-bg);
  color: var(--color-column);
  margin-bottom: var(--space-sm);
}

.home-column-card h3 {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-text);
  margin-top: 0;
  margin-bottom: var(--space-sm);
}

.home-column-card:hover h3 {
  color: var(--color-column);
}

.home-column-card p {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-sm);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-align: left;
}

.home-column-card time {
  font-family: var(--font-heading);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: auto;
}

.home-columns-more {
  text-align: center;
  margin-top: var(--space-xl);
}

.home-columns-more a {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-column);
  padding: var(--space-sm) var(--space-xl);
  border: 2px solid var(--color-column);
  border-radius: var(--radius-full);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.home-columns-more a:hover {
  background-color: var(--color-column);
  color: #fff;
}

/* ----------------------------------------------------------------
   11. Footer (footer.html)
   ---------------------------------------------------------------- */
.site-footer {
  background: linear-gradient(135deg, #2d3250, #424874);
  color: var(--color-footer-text);
  padding: var(--space-2xl) var(--space-md) 0;
  margin-top: auto;
}

.footer-inner {
  max-width: var(--wide-max-width);
  margin-left: auto;
  margin-right: auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer-title {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: 900;
  letter-spacing: 0.02em;
  background: linear-gradient(135deg, var(--hs-brand), var(--hs-brand-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-description {
  font-size: var(--text-sm);
  color: var(--color-footer-text);
  max-width: 320px;
  line-height: var(--leading-normal);
}

.footer-heading {
  font-family: var(--font-heading);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-footer-text);
  opacity: 0.6;
  margin-bottom: var(--space-sm);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer-links a {
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  color: var(--color-footer-text);
  text-decoration: none;
  transition: color var(--transition-fast);
  font-weight: 500;
}

.footer-links a:hover {
  color: #fff;
}

.footer-nav-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer-nav-section a {
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  color: var(--color-footer-text);
  text-decoration: none;
  transition: color var(--transition-fast);
  font-weight: 500;
}

.footer-nav-section a:hover {
  color: #fff;
}

.footer-bottom {
  max-width: var(--wide-max-width);
  margin-left: auto;
  margin-right: auto;
  margin-top: var(--space-xl);
  padding: var(--space-md) 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.copyright {
  font-family: var(--font-heading);
  font-size: var(--text-xs);
  color: var(--color-footer-text);
  opacity: 0.7;
}

/* ----------------------------------------------------------------
   12. Thinkers List (thinkers/list.html)
   ---------------------------------------------------------------- */
.thinkers-list {
  max-width: var(--wide-max-width);
  margin-left: auto;
  margin-right: auto;
}

.thinkers-era-group {
  margin-bottom: var(--space-3xl);
}

.thinkers-era-group h2 {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-sm);
  border-bottom: 3px solid var(--color-accent);
  margin-top: 0;
}

.thinkers-era-group h2::after {
  display: none;
}

.thinker-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

.thinker-card {
  background-color: var(--color-card-bg);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  border-left: 4px solid var(--color-accent);
  transition: all var(--transition-bounce);
}

.thinker-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px var(--color-card-shadow);
  border-left-color: var(--color-pink);
}

.thinker-card h3 {
  font-size: var(--text-xl);
  font-weight: 800;
  margin-top: 0;
  margin-bottom: var(--space-xs);
}

.thinker-card h3 a {
  color: var(--color-text);
  text-decoration: none;
}

.thinker-card:hover h3 a {
  color: var(--color-accent);
}

.thinker-period {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: var(--text-xs);
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--color-accent), var(--color-pink));
  padding: 0.3em 0.8em;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-sm);
}

.thinker-description {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: var(--leading-normal);
  margin-bottom: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ----------------------------------------------------------------
   13. Taxonomy Terms Page (taxonomy/terms.html)
   ---------------------------------------------------------------- */
.taxonomy-terms-page {
  max-width: var(--wide-max-width);
  margin-left: auto;
  margin-right: auto;
}

.terms-header {
  margin-bottom: var(--space-2xl);
  text-align: center;
  padding-bottom: var(--space-xl);
  border-bottom: 3px solid var(--color-accent-bg);
}

.terms-header h1 {
  margin-bottom: var(--space-sm);
}

.terms-description {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: var(--leading-relaxed);
}

.terms-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

.term-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  background-color: var(--color-card-bg);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: inherit;
  transition: all var(--transition-base);
  border-left: 3px solid var(--color-accent);
}

.term-card:hover {
  border-left-color: var(--color-pink);
  background-color: var(--color-accent-bg);
  color: inherit;
  transform: translateX(4px);
}

.term-card h2 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--text-base);
  margin: 0;
  padding: 0;
  border-bottom: none;
}

.term-card h2::after {
  display: none;
}

.term-card:hover h2 {
  color: var(--color-accent);
}

.term-count {
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-light));
  padding: 0.25em 0.65em;
  border-radius: var(--radius-full);
  min-width: 2em;
  text-align: center;
  white-space: nowrap;
}

/* ----------------------------------------------------------------
   14. Taxonomy Era & School Pages
   ---------------------------------------------------------------- */
.taxonomy-page {
  max-width: var(--wide-max-width);
  margin-left: auto;
  margin-right: auto;
}

.taxonomy-header {
  text-align: center;
  padding-bottom: var(--space-xl);
  margin-bottom: var(--space-2xl);
  border-bottom: 3px solid var(--color-accent-bg);
}

.taxonomy-header h1 {
  margin-bottom: var(--space-sm);
}

.taxonomy-description {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: var(--leading-relaxed);
}

.taxonomy-pages {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

/* era-page specific */
.era-page .page-card.era-card {
  border-left: 4px solid var(--era-ancient);
}

/* school-page specific */
.school-page .page-card.school-card {
  border-left: 4px solid var(--color-green);
  background: linear-gradient(135deg, var(--color-card-bg), rgba(0, 184, 148, 0.03));
}

/* ----------------------------------------------------------------
   15. Blockquote Styling
   ---------------------------------------------------------------- */
blockquote {
  position: relative;
  margin: var(--space-2xl) 0;
  padding: var(--space-lg) var(--space-xl);
  background: linear-gradient(135deg, #f8f7ff, #fff0f6);
  border-left: 4px solid;
  border-image: linear-gradient(180deg, var(--color-accent), var(--color-pink)) 1;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
}

@media (prefers-color-scheme: dark) {
  blockquote {
    background: linear-gradient(135deg, #252742, #2a2040);
  }
}

blockquote::before {
  content: "\201C";
  position: absolute;
  top: -0.1em;
  left: 0.15em;
  font-size: 3em;
  color: var(--color-accent);
  opacity: 0.2;
  font-family: Georgia, serif;
  line-height: 1;
  pointer-events: none;
}

blockquote p {
  text-align: left;
  position: relative;
  z-index: 1;
}

blockquote p:last-child {
  margin-bottom: 0;
}

blockquote cite,
blockquote footer {
  display: block;
  margin-top: var(--space-md);
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-style: normal;
  color: var(--color-text-muted);
}

blockquote cite::before,
blockquote footer::before {
  content: "\2014\00a0";
}

blockquote blockquote {
  margin: var(--space-md) 0;
  border-left-width: 3px;
  opacity: 0.9;
}

/* ----------------------------------------------------------------
   16. Table Styles
   ---------------------------------------------------------------- */
.article-main table,
.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-xl) 0;
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.article-main thead,
.article-content thead {
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-light));
  color: #fff;
}

.article-main th,
.article-content th {
  font-family: var(--font-heading);
  font-weight: 700;
  text-align: left;
  padding: var(--space-sm) var(--space-md);
  color: #fff;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.article-main td,
.article-content td {
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid var(--color-border-light);
  vertical-align: top;
}

.article-main tbody tr:nth-child(even),
.article-content tbody tr:nth-child(even) {
  background-color: var(--color-table-stripe);
}

.article-main tbody tr:hover,
.article-content tbody tr:hover {
  background-color: var(--color-accent-bg);
}

/* Responsive table wrapper */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: var(--space-xl) 0;
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
}

.table-wrapper table {
  margin: 0;
}

/* ----------------------------------------------------------------
   17. Code & Pre Styles
   ---------------------------------------------------------------- */
code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  padding: 0.2em 0.5em;
  background-color: var(--color-code-bg);
  color: var(--color-code-text);
  border-radius: var(--radius-sm);
  word-break: break-word;
}

pre {
  margin: var(--space-xl) 0;
  padding: var(--space-lg);
  background-color: var(--color-code-bg);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  line-height: 1.6;
}

pre code {
  padding: 0;
  background-color: transparent;
  border-radius: 0;
  font-size: var(--text-sm);
  word-break: normal;
}

/* Footnotes (Hugo-generated) */
.footnotes {
  margin-top: var(--space-3xl);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--color-border-light);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

.footnotes ol {
  list-style: decimal;
  padding-left: var(--space-xl);
}

.footnotes li {
  margin-bottom: var(--space-sm);
}

.footnote-ref {
  font-size: 0.75em;
  vertical-align: super;
  line-height: 0;
}

/* ----------------------------------------------------------------
   18. Utility Classes
   ---------------------------------------------------------------- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-center { text-align: center; }
.text-muted { color: var(--color-text-muted); }
.text-accent { color: var(--color-accent); }

/* Skip link for accessibility */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-md);
  z-index: 999;
  padding: var(--space-sm) var(--space-md);
  background: linear-gradient(135deg, var(--color-accent), var(--color-pink));
  color: #fff;
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: 0;
  color: #fff;
}

/* ----------------------------------------------------------------
   19. Responsive: Tablet (768px+)
   ---------------------------------------------------------------- */
@media (min-width: 768px) {
  h1 { font-size: var(--text-4xl); }
  h2 { font-size: var(--text-3xl); }

  .main-content {
    padding-left: var(--space-xl);
    padding-right: var(--space-xl);
  }

  /* Header: hide hamburger, show inline nav */
  .nav-toggle {
    display: none;
  }

  .nav-list {
    display: flex;
    position: static;
    flex-direction: row;
    align-items: center;
    gap: var(--space-xs);
    background-color: transparent;
    padding: 0;
    overflow: visible;
  }

  .nav-list li {
    border-bottom: none;
  }

  .nav-list a {
    display: block;
    padding: var(--space-sm) var(--space-md);
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    border-radius: var(--radius-full);
    transition: color var(--transition-fast), background-color var(--transition-fast);
  }

  .nav-list a:hover {
    color: var(--color-accent);
    background-color: var(--color-accent-bg);
  }

  .nav-list a.active {
    color: #fff;
    background: linear-gradient(135deg, var(--color-accent), var(--color-accent-light));
    font-weight: 700;
  }

  /* Article header */
  .article-header h1 {
    font-size: var(--text-4xl);
  }

  /* Section grid: 2 columns */
  .section-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xl);
  }

  /* Page cards: 2 columns */
  .page-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Taxonomy pages: 2 columns */
  .taxonomy-pages {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Terms grid: 2 columns */
  .terms-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Related: 2 columns */
  .related-list {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Thinker cards: 2 columns */
  .thinker-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Columns grid: 2 columns */
  .columns-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .home-columns-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .column-featured h2 {
    font-size: var(--text-3xl);
  }

  /* Hero */
  .home-hero {
    padding: var(--space-4xl) var(--space-xl);
  }

  .home-hero h1 {
    font-size: var(--text-5xl);
  }

  /* Logo: larger on desktop */
  .site-logo-mark {
    width: 32px;
    height: 32px;
  }

  .site-title-en {
    font-size: var(--text-base);
  }

  /* Footer: 3-column grid */
  .footer-inner {
    grid-template-columns: 2fr 1fr 1fr;
    gap: var(--space-2xl);
  }
}

/* ----------------------------------------------------------------
   20. Responsive: Desktop (1024px+)
   ---------------------------------------------------------------- */
@media (min-width: 1024px) {
  /* Two-column article layout with sidebar */
  .article-content {
    max-width: calc(var(--content-max-width) + var(--sidebar-width) + var(--space-3xl));
  }

  .article-body.two-column {
    display: grid;
    grid-template-columns: 1fr var(--sidebar-width);
    gap: var(--space-3xl);
  }

  .sidebar {
    width: var(--sidebar-width);
    flex-shrink: 0;
  }

  /* Sticky TOC in sidebar */
  .toc {
    position: sticky;
    top: calc(var(--header-height) + var(--space-xl));
    max-height: calc(100vh - var(--header-height) - var(--space-2xl));
    overflow-y: auto;
  }

  /* Section grid: 3 columns */
  .section-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Related: 3 columns */
  .related-list {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Terms grid: 3 columns */
  .terms-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Thinker cards: 3 columns */
  .thinker-cards {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Columns grid: 3 columns */
  .columns-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .column-featured {
    padding: var(--space-3xl) var(--space-2xl);
  }

  .column-featured h2 {
    font-size: var(--text-4xl);
  }
}

/* ----------------------------------------------------------------
   21. Print Styles
   ---------------------------------------------------------------- */
@media print {
  *,
  *::before,
  *::after {
    background: transparent !important;
    color: #000 !important;
    box-shadow: none !important;
  }

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

  .site-header,
  .site-footer,
  .nav-toggle,
  .nav-list,
  .sidebar,
  .toc,
  .breadcrumb,
  .related-pages,
  .skip-link {
    display: none !important;
  }

  .article-content,
  .article-main {
    max-width: 100%;
    padding: 0;
  }

  .article-body.two-column {
    display: block;
  }

  h1, h2, h3, h4 {
    page-break-after: avoid;
  }

  blockquote, table, pre {
    page-break-inside: avoid;
  }

  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #666;
  }

  a[href^="#"]::after,
  a[href^="javascript"]::after {
    content: "";
  }
}
