/* ==========================================================================
   Sovereign Intellect - Modern Typography First Theme
   ========================================================================== */

:root {
  --text-main: #1a1a1a;
  --text-muted: #666666;
  --bg-main: #ffffff;
  --bg-secondary: #f8f9fa;
  --accent-color: #2563eb;
  --accent-hover: #1d4ed8;
  --border-color: #e5e7eb;
  --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-reading: 'Merriweather', Georgia, serif;
  --max-width: 740px;
  --wide-width: 1000px;
}

/* Reset & Base */
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font-reading);
  color: var(--text-main);
  background: var(--bg-main);
  line-height: 1.8;
  font-size: 19px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6, .site-title, .site-nav, .post-meta {
  font-family: var(--font-ui);
  color: var(--text-main);
  line-height: 1.3;
}

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

/* Layout */
.wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--border-color);
  padding: 15px 0; /* REDUCED FROM 20px */
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(5px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: var(--wide-width);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-title {
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: var(--text-main) !important;
}

.site-nav {
  display: flex;
  gap: 24px;
}

.site-nav a {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.site-nav a:hover {
  color: var(--text-main);
}

/* Content Area */
.site-content {
  min-height: calc(100vh - 200px);
  padding: 30px 0; /* REDUCED FROM 60px */
}

/* Typography (Posts) */
.post-header { text-align: center; margin-bottom: 3rem; }

.post-title {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.post-subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  font-family: var(--font-ui);
  font-weight: 400;
  margin-top: 0;
}

.post-meta {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.post-content h2 {
  font-size: 1.75rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

.post-content p {
  margin-bottom: 1.5rem;
}

/* Justified text for specific blocks */
[align="justify"], 
[align="justify"] p {
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
}

/* Code blocks */
pre, code {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  background: var(--bg-secondary);
  border-radius: 6px;
}
code { padding: 0.2em 0.4em; font-size: 0.85em; }
pre { padding: 1.5rem; overflow-x: auto; border: 1px solid var(--border-color); }
pre code { padding: 0; background: none; }

/* Series Nav */
.series-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background: var(--bg-secondary);
  border-radius: 8px;
  margin-bottom: 2rem;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-weight: 600;
}

.series-nav-bottom {
  margin-top: 3rem;
  margin-bottom: 0;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border-color);
  padding: 40px 0;
  text-align: center;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-family: var(--font-ui);
  font-size: 0.95rem;
}
th, td {
  padding: 12px;
  border-bottom: 1px solid var(--border-color);
  text-align: left;
}
th { font-weight: 600; background: var(--bg-secondary); }
