/* hubspace1.club — design DNA K7mNx2Qp */

:root {
  /* Background intensity: light | medium | none (default: light) */
  --bg-image: url('/assets/art/background.svg');
  --bg-fallback: linear-gradient(160deg, rgba(248,246,243,0.95) 0%, rgba(240,238,235,0.98) 100%);
}

body[data-bg-intensity="medium"] {
  background-blend-mode: overlay;
}
body[data-bg-intensity="none"] {
  background-image: var(--bg-fallback) !important;
}

/* Type scale */
.site-title { font-size: 1.875rem; line-height: 1.2; }
.nav-link { font-size: 0.875rem; line-height: 1.35; }
.post-card-title { font-size: 1.25rem; line-height: 1.35; }
.post-card-excerpt { font-size: 0.875rem; line-height: 1.5; }
.post-card-meta { font-size: 0.8125rem; line-height: 1.35; }
.post-page-title { font-size: 2.25rem; line-height: 1.2; }
.post-page-body { font-size: 1rem; line-height: 1.6; }
.footer-text { font-size: 0.8125rem; line-height: 1.5; }
.footer-small { font-size: 0.75rem; line-height: 1.5; }

/* Spacing rhythm */
.rhythm-1 { margin-bottom: 0.25rem; }
.rhythm-2 { margin-bottom: 0.5rem; }
.rhythm-3 { margin-bottom: 0.75rem; }
.rhythm-4 { margin-bottom: 1rem; }
.rhythm-5 { margin-bottom: 1.5rem; }
.rhythm-6 { margin-bottom: 2rem; }
.rhythm-7 { margin-bottom: 2.5rem; }
.rhythm-8 { margin-bottom: 3rem; }
.rhythm-9 { margin-bottom: 4rem; }
.rhythm-10 { margin-bottom: 5rem; }

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Georgia, 'Times New Roman', serif;
  color: #2a2826;
  background: var(--bg-fallback);
  background-image: var(--bg-image);
  background-size: cover;
  background-attachment: fixed;
  background-position: center;
  display: flex;
  flex-direction: column;
}

/* Background intensity: light = default visible; medium/none overridden by theme */
body[data-bg-intensity="none"] { background-image: var(--bg-fallback); }
body[data-bg-intensity="medium"] { background-image: var(--bg-image); background-blend-mode: overlay; }

/* ========== THEME A: Warm cream, serif, medium spacing ========== */
[data-theme="theme-a"] {
  --color-bg: #f8f6f3;
  --color-surface: #fffefb;
  --color-text: #2a2826;
  --color-text-muted: #5c5854;
  --color-accent: #8b6914;
  --color-link: #6b5210;
  --color-border: rgba(0,0,0,0.08);
  --font-heading: Georgia, serif;
  --font-body: Georgia, serif;
  --space-header: 2rem;
  --space-card: 1.5rem;
  --radius-card: 10px;
  --shadow-card: 0 2px 8px rgba(0,0,0,0.08);
  --border-card: 1px solid rgba(0,0,0,0.08);
}

/* ========== THEME B: Cool gray, sans, tight spacing ========== */
[data-theme="theme-b"] {
  --color-bg: #f0eeeb;
  --color-surface: #faf9f7;
  --color-text: #1e1d1b;
  --color-text-muted: #4a4744;
  --color-accent: #2c5f7a;
  --color-link: #1e4a5e;
  --color-border: rgba(0,0,0,0.12);
  --font-heading: 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Segoe UI', system-ui, sans-serif;
  --space-header: 1.25rem;
  --space-card: 1rem;
  --radius-card: 6px;
  --shadow-card: 0 2px 6px rgba(0,0,0,0.06);
  --border-card: 1px solid rgba(0,0,0,0.12);
}

/* ========== THEME C: Dark charcoal, mixed type, loose spacing ========== */
[data-theme="theme-c"] {
  --color-bg: #2a2826;
  --color-surface: #363432;
  --color-text: #f0eeeb;
  --color-text-muted: #b0ada8;
  --color-accent: #c9a227;
  --color-link: #e0c040;
  --color-border: rgba(255,255,255,0.1);
  --font-heading: Georgia, serif;
  --font-body: 'Segoe UI', system-ui, sans-serif;
  --space-header: 2.5rem;
  --space-card: 2rem;
  --radius-card: 3px;
  --shadow-card: none;
  --border-card: 1px solid rgba(255,255,255,0.1);
}

/* ========== THEME D: Soft lavender, rounded, relaxed ========== */
[data-theme="theme-d"] {
  --color-bg: #f5f2f8;
  --color-surface: #fdfcff;
  --color-text: #2d2a32;
  --color-text-muted: #5a5660;
  --color-accent: #6b5b8a;
  --color-link: #5a4a78;
  --color-border: rgba(107,91,138,0.2);
  --font-heading: Georgia, serif;
  --font-body: Georgia, serif;
  --space-header: 2rem;
  --space-card: 1.5rem;
  --radius-card: 24px;
  --shadow-card: 0 4px 16px rgba(107,91,138,0.08);
  --border-card: 1px solid rgba(107,91,138,0.15);
}

/* ========== THEME E: High contrast light, minimal radius ========== */
[data-theme="theme-e"] {
  --color-bg: #ffffff;
  --color-surface: #ffffff;
  --color-text: #0a0a0a;
  --color-text-muted: #444;
  --color-accent: #0a0a0a;
  --color-link: #0a0a0a;
  --color-border: rgba(0,0,0,0.18);
  --font-heading: 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Segoe UI', system-ui, sans-serif;
  --space-header: 1.5rem;
  --space-card: 1.25rem;
  --radius-card: 0;
  --shadow-card: none;
  --border-card: 1px solid rgba(0,0,0,0.18);
}

/* ========== THEME F: Muted olive, raised cards, dotted ========== */
[data-theme="theme-f"] {
  --color-bg: #f2f1eb;
  --color-surface: #faf9f4;
  --color-text: #2c2b26;
  --color-text-muted: #5a584e;
  --color-accent: #5a6b4a;
  --color-link: #4a5b3a;
  --color-border: rgba(90,107,74,0.2);
  --font-heading: Georgia, serif;
  --font-body: Georgia, serif;
  --space-header: 2.5rem;
  --space-card: 2rem;
  --radius-card: 16px;
  --shadow-card: 0 4px 16px rgba(0,0,0,0.1);
  --border-card: 1px dashed rgba(90,107,74,0.25);
}

/* Apply theme colors */
body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
}

h1, h2, h3, .site-title, .post-card-title, .post-page-title {
  font-family: var(--font-heading);
  color: var(--color-text);
}

a {
  color: var(--color-link);
  text-decoration: underline;
  transition: opacity 0.2s ease, color 0.2s ease;
}
a:hover { opacity: 0.85; }
a:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

/* ========== LAYOUT: list mode, max-content ========== */
.site-wrap {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1rem;
  flex: 1;
}

/* ========== HEADER: split layout ========== */
.site-header {
  padding: var(--space-header) 0;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.site-title {
  margin: 0;
  font-size: 1.875rem;
}
.site-title a { text-decoration: none; color: inherit; }

.site-nav {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a { text-decoration: none; }

/* ========== POSTS LIST (card composition B: title, meta, excerpt, tags, link) ========== */
.posts-list {
  list-style: none;
  margin: 0;
  padding: 2rem 0;
}

.post-card {
  background: var(--color-surface);
  border: var(--border-card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: var(--space-card);
  margin-bottom: 1.5rem;
}

.post-card-title { margin: 0 0 0.5rem 0; }
.post-card-title a { text-decoration: none; color: inherit; }
.post-card-meta { color: var(--color-text-muted); margin-bottom: 0.5rem; }
.post-card-excerpt { color: var(--color-text-muted); margin: 0 0 0.75rem 0; }
.post-card-tags { margin-bottom: 0.75rem; }
.post-card-tags .tag {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  margin-right: 0.35rem;
  margin-bottom: 0.25rem;
  font-size: 0.75rem;
  border-radius: 9999px;
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  background: transparent;
}
.post-card-link { font-size: 0.875rem; }

/* ========== PAGINATION ========== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 2rem 0;
  flex-wrap: wrap;
}
.pagination-info { color: var(--color-text-muted); font-size: 0.875rem; }
.pagination button {
  padding: 0.5rem 1rem;
  font: inherit;
  cursor: pointer;
  background: var(--color-surface);
  border: var(--border-card);
  border-radius: 6px;
  color: var(--color-text);
  transition: background 0.2s ease, border-color 0.2s ease;
}
.pagination button:hover:not(:disabled) { background: var(--color-accent); color: var(--color-surface); border-color: var(--color-accent); }
.pagination button:disabled { opacity: 0.5; cursor: not-allowed; }

/* ========== FOOTER ========== */
.site-footer {
  margin-top: auto;
  padding: 2rem 0;
  border-top: 1px solid var(--color-border);
  color: var(--color-text-muted);
}

.footer-inner { display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: flex-start; }
.footer-block { flex: 1 1 200px; }
.footer-block p { margin: 0 0 0.5rem 0; }
.footer-block a { color: var(--color-link); }
.footer-theme { margin-top: 1rem; }
.footer-theme label { margin-right: 0.5rem; font-size: 0.8125rem; }
.footer-theme select {
  font: inherit;
  padding: 0.25rem 0.5rem;
  border-radius: 3px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: 0.8125rem;
}

/* ========== CONTACT PAGE ========== */
.page-heading { margin: 0 0 1.5rem 0; font-size: 1.5rem; }
.contact-details { margin-bottom: 2rem; }
.contact-details p { margin: 0 0 0.5rem 0; }
.contact-form-note {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
  padding: 0.75rem;
  background: var(--color-surface);
  border-radius: 6px;
  border: 1px solid var(--color-border);
}
.contact-form label { display: block; margin-bottom: 0.25rem; font-size: 0.875rem; }
.contact-form input, .contact-form textarea {
  width: 100%;
  max-width: 400px;
  padding: 0.5rem;
  margin-bottom: 1rem;
  font: inherit;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-surface);
  color: var(--color-text);
}

/* ========== PRIVACY POLICY ========== */
.privacy-section { margin-bottom: 2rem; }
.privacy-section h2 { font-size: 1.25rem; margin: 0 0 0.75rem 0; }
.privacy-section p { margin: 0 0 0.5rem 0; }
.privacy-todo { font-style: italic; color: var(--color-text-muted); }

/* ========== POST PAGE ========== */
.post-page-header { margin-bottom: 2rem; }
.post-page-meta { color: var(--color-text-muted); margin-bottom: 0.5rem; font-size: 0.875rem; }
.post-page-tags { margin-bottom: 1rem; }
.post-page-tags .tag {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  margin-right: 0.35rem;
  margin-bottom: 0.25rem;
  font-size: 0.75rem;
  border-radius: 9999px;
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  background: transparent;
}
.post-page-body p { margin: 0 0 1rem 0; }
.back-link { font-size: 0.875rem; margin-bottom: 1rem; display: inline-block; }

/* ========== POSTS INDEX ========== */
.posts-index-intro { margin-bottom: 1.5rem; color: var(--color-text-muted); }
