/* Base styles and CSS variables for pvabazaar.org journal */
:root {
  --bg: #0f1419;
  --bg-elev: #161d27;
  --text: #e6edf3;
  --muted: #a9b7c6;
  --primary: #5ea0ff;
  --accent: #5eead4;
  --border: #243043;
  --shadow: rgba(0,0,0,0.25);
  --serif: "Georgia", "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
}

/* Modern Journal Base Styles */

/* Typography & Colors */
:root {
  --font-ui: Inter, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji";
  --font-text: "Open Sans", Inter, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
  --font-heading: "Merriweather", Georgia, "Times New Roman", Times, serif;
  --font-code: "Fira Code", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  --bg: #f8fafc;           /* slate-50 */
  --bg-muted: #f1f5f9;     /* slate-100 */
  --surface: #ffffff;      /* white */
  --text: #0f172a;         /* slate-900 */
  --text-muted: #334155;   /* slate-700 */
  --border: #e2e8f0;       /* slate-200 */
  --shadow: 0 8px 24px rgba(2, 6, 23, 0.08);
  --primary: #4169E1;      /* Consciousness Blue */
  --accent: #9370DB;       /* Blockchain Purple */
  --accent-strong: #7a5bd4;
  --wellness: #228B22;     /* Wellness Green */
}

[data-theme="dark"] {
  --bg: #0b1220;          /* deep slate */
  --bg-muted: #0f172a;    /* slate-900 */
  --surface: #0f172a;     /* slate-900 */
  --text: #e5e7eb;        /* slate-200 */
  --text-muted: #94a3b8;  /* slate-400 */
  --border: #1f2937;      /* slate-800 */
  --shadow: 0 8px 24px rgba(3, 7, 18, 0.35);
  --accent: #38bdf8;      /* sky-400 */
  --accent-strong: #0ea5e9;/* sky-500 */
}

/* Reset & Base */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Text defaults: serif for long-form, sans for UI */
body { font-family: var(--font-text); font-size: 15.5px; line-height: 1.65; }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); }
code, pre, kbd, samp { font-family: var(--font-code); }
h1, h2, h3, h4, h5, h6, nav, button, input, textarea { font-family: var(--font-ui); }

/* Links */
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-strong); text-decoration: underline; }

/* Layout helpers */
.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section { padding: 2rem 0; }
.section-muted { background: var(--bg-muted); padding: 2rem 0; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0.5rem;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}
.brand .title { font-size: 1.25rem; font-weight: 700; color: var(--text); }
.brand .tagline { font-size: 0.95rem; color: var(--text-muted); }

.nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.nav a {
  display: inline-block;
  padding: 0.5rem 0.75rem;
  color: var(--text);
  border-radius: 8px;
}
.nav a:hover {
  background: var(--bg-muted);
}

/* Footer */
footer {
  border-top: 1px solid var(--border);
  margin-top: 2rem;
  padding: 1.5rem 0;
  color: var(--text-muted);
}

/* Utilities */
.muted { color: var(--text-muted); }
.surface { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); }
.pad { padding: 1rem; }
.spacer { height: 1rem; }

/* Images */
img { max-width: 100%; height: auto; border-radius: 12px; }

/* Forms */
input, textarea { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 0.6rem 0.75rem; }
input::placeholder, textarea::placeholder { color: var(--text-muted); }
button { font: inherit; background: var(--accent); color: white; border: none; border-radius: 10px; padding: 0.6rem 0.9rem; }
button:hover { background: var(--accent-strong); cursor: pointer; }

/* Responsive */
@media (max-width: 720px) {
  .site-header .wrap { flex-direction: column; align-items: flex-start; }
}


[data-theme="light"] {
  --bg: #f7f9fc;
  --bg-elev: #ffffff;
  --text: #1c242e;
  --muted: #4a5a6a;
  --primary: #1f6feb;
  --accent: #0ea5e9;
  --border: #e5e9ef;
  --shadow: rgba(25, 40, 65, 0.1);
}

html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.7;
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 20px;
}

.header { border-bottom: 1px solid var(--border); }
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
}
.brand {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.brand__title {
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.2px;
}
.brand__tagline { color: var(--muted); font-size: 13px; }

.nav { display: flex; gap: 14px; flex-wrap: wrap; }
.nav a {
  color: var(--text);
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 8px;
}
.nav a.active { background: var(--bg-elev); border: 1px solid var(--border); }
.nav a:hover { color: var(--primary); }

.header__right { display: flex; align-items: center; gap: 10px; }
.themeToggle {
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text);
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
}
.searchInput {
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text);
  border-radius: 8px;
  padding: 8px 10px;
  width: 220px;
}

.main { padding: 24px 0; }

.footer {
  border-top: 1px solid var(--border);
  margin-top: 32px;
  padding: 20px 0;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.footer a { color: var(--muted); text-decoration: none; }
.footer a:hover { color: var(--primary); }

h1, h2, h3 { margin: 0 0 12px 0; }
h1 { font-size: 30px; }
h2 { font-size: 22px; }
h3 { font-size: 18px; }

p { margin: 0 0 12px 0; }

.card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 4px 12px var(--shadow);
}
.card__body { padding: 18px; }

.grid { display: grid; gap: 16px; }
@media (min-width: 700px) {
  .grid.cols-2 { grid-template-columns: 1fr 1fr; }
  .grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
}

.badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  margin-right: 6px;
}

.mark { background: rgba(246, 211, 70, 0.35); padding: 0 2px; border-radius: 3px; }

.sr-only { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.sr-only:focus { position: static; width: auto; height: auto; margin-bottom: 8px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-elev); color: var(--text); }

/* Responsive container padding */
@media (max-width: 480px) { .container { padding: 16px; } .searchInput { width: 160px; } }
