/* modelpsychiatry.com — Academic Publication Stylesheet */

:root {
  --bg: #fafaf8;
  --bg-card: #ffffff;
  --text: #1c1c1e;
  --text-secondary: #6e6e73;
  --text-muted: #8e8e93;
  --accent: #1a4f8a;
  --accent-light: #e8f0fb;
  --accent-border: #c0d4f0;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --mono: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
  --max-w: 720px;
  --max-w-wide: 960px;
  --radius: 4px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 18px; -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

/* ─── HEADER ─────────────────────────────────────────── */

.site-header {
  background: #0f2a4a;
  color: #fff;
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.header-inner {
  max-width: var(--max-w-wide);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.site-logo {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  letter-spacing: -0.3px;
}

.site-logo span {
  color: #7eb6e6;
}

.site-nav {
  display: flex;
  gap: 0;
  list-style: none;
}

.site-nav a {
  color: #c5d8ee;
  text-decoration: none;
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.3px;
  padding: 6px 12px;
  border-radius: var(--radius);
  transition: color 0.15s, background 0.15s;
}

.site-nav a:hover {
  color: #fff;
  background: rgba(255,255,255,0.1);
}

/* ─── LAYOUT ─────────────────────────────────────────── */

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

.container-wide {
  max-width: var(--max-w-wide);
  margin: 0 auto;
  padding: 0 24px;
}

/* ─── HERO (HOMEPAGE) ────────────────────────────────── */

.hero {
  background: linear-gradient(135deg, #0f2a4a 0%, #1a4f8a 100%);
  color: #fff;
  padding: 72px 24px 64px;
  text-align: center;
}

.hero-label {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #7eb6e6;
  margin-bottom: 20px;
}

.hero h1 {
  font-family: var(--sans);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  line-height: 1.2;
  max-width: 700px;
  margin: 0 auto 24px;
  color: #fff;
}

.hero-sub {
  font-size: 1.05rem;
  color: #b8d4ee;
  max-width: 560px;
  margin: 0 auto 32px;
  line-height: 1.65;
  font-family: var(--sans);
}

.hero-author {
  font-family: var(--sans);
  font-size: 0.85rem;
  color: #7eb6e6;
}

.hero-author a {
  color: #7eb6e6;
}

/* ─── ANSWER CAPSULE ─────────────────────────────────── */

.answer-capsule {
  background: var(--accent-light);
  border: 1.5px solid var(--accent-border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin: 28px 0;
  font-size: 0.95rem;
  line-height: 1.65;
}

.answer-capsule strong {
  color: var(--accent);
  font-size: 1rem;
}

/* ─── ARTICLE TYPOGRAPHY ─────────────────────────────── */

.article-header {
  padding: 52px 0 36px;
  border-bottom: 1px solid #e5e5ea;
  margin-bottom: 40px;
}

.article-label {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
  display: block;
}

.article-header h1 {
  font-family: var(--sans);
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: 20px;
}

.article-meta {
  font-family: var(--sans);
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

.article-meta .author {
  color: var(--accent);
  font-weight: 500;
}

.article-body {
  padding-bottom: 60px;
}

.article-body h2 {
  font-family: var(--sans);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  margin: 48px 0 16px;
  line-height: 1.3;
}

.article-body h3 {
  font-family: var(--sans);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin: 36px 0 12px;
  line-height: 1.35;
}

.article-body h4 {
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin: 28px 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.article-body p {
  margin-bottom: 22px;
  color: var(--text);
}

.article-body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-body a:hover { text-decoration: none; }

.article-body strong { font-weight: 700; }

.article-body em { font-style: italic; }

.article-body blockquote {
  border-left: 3px solid var(--accent);
  margin: 28px 0;
  padding: 4px 0 4px 24px;
  font-style: italic;
  color: var(--text-secondary);
}

.article-body ul, .article-body ol {
  margin: 0 0 22px 28px;
}

.article-body li {
  margin-bottom: 8px;
}

.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 28px 0;
  font-family: var(--sans);
  font-size: 0.88rem;
}

.article-body th {
  background: #0f2a4a;
  color: #fff;
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
}

.article-body td {
  padding: 10px 14px;
  border-bottom: 1px solid #e5e5ea;
  vertical-align: top;
}

.article-body tr:nth-child(even) td { background: #f5f5f7; }

.article-body hr {
  border: none;
  border-top: 1px solid #e5e5ea;
  margin: 48px 0;
}

/* ─── AUTHOR BIO ─────────────────────────────────────── */

.author-bio {
  border-top: 2px solid #e5e5ea;
  margin-top: 52px;
  padding-top: 28px;
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.author-bio strong {
  color: var(--text);
  font-size: 0.9rem;
}

.author-bio a { color: var(--accent); }

/* ─── SERIES NAV ─────────────────────────────────────── */

.series-nav {
  background: #f0f4f8;
  border: 1px solid #d0dcea;
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 40px 0;
  font-family: var(--sans);
  font-size: 0.85rem;
}

.series-nav h4 {
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
  margin-bottom: 12px;
}

.series-nav ol {
  margin: 0 0 0 18px;
  color: var(--text-secondary);
}

.series-nav li {
  margin-bottom: 6px;
}

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

.series-nav .current { font-weight: 600; color: var(--text); }

/* ─── POST CARDS ─────────────────────────────────────── */

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  margin: 40px 0;
}

.post-card {
  background: var(--bg-card);
  border: 1px solid #e5e5ea;
  border-radius: 8px;
  padding: 28px;
  transition: box-shadow 0.15s, border-color 0.15s;
  text-decoration: none;
  color: inherit;
  display: block;
}

.post-card:hover {
  box-shadow: 0 4px 16px rgba(26,79,138,0.1);
  border-color: var(--accent-border);
}

.post-card-num {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 10px;
  display: block;
}

.post-card h3 {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
  line-height: 1.35;
}

.post-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
  font-family: var(--sans);
}

.post-card .coming-soon {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-family: var(--sans);
  font-style: italic;
  margin-top: 10px;
}

/* ─── GLOSSARY ───────────────────────────────────────── */

.glossary-entry {
  padding: 32px 0;
  border-bottom: 1px solid #e5e5ea;
}

.glossary-entry:last-child { border-bottom: none; }

.glossary-term {
  font-family: var(--sans);
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f2a4a;
  margin-bottom: 8px;
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.glossary-term::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--accent-border);
  display: block;
}

.glossary-def {
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ─── SECTION HEADERS ────────────────────────────────── */

.section-header {
  padding: 56px 0 32px;
  border-bottom: 2px solid #0f2a4a;
  margin-bottom: 40px;
}

.section-header h1 {
  font-family: var(--sans);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  color: #0f2a4a;
  margin-bottom: 12px;
}

.section-header p {
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 600px;
  line-height: 1.6;
}

/* ─── CITATION BADGE ─────────────────────────────────── */

.citation-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f0f4f8;
  border: 1px solid #d0dcea;
  border-radius: 20px;
  padding: 4px 12px;
  font-family: var(--sans);
  font-size: 0.78rem;
  color: var(--accent);
  font-weight: 500;
  text-decoration: none;
  margin: 2px;
  transition: background 0.15s;
}

.citation-badge:hover { background: var(--accent-light); }

/* ─── CREDENTIALS BAR ────────────────────────────────── */

.credentials-bar {
  background: #0f2a4a;
  color: #b8d4ee;
  padding: 12px 24px;
  font-family: var(--sans);
  font-size: 0.78rem;
  text-align: center;
  letter-spacing: 0.3px;
}

.credentials-bar a { color: #7eb6e6; }

/* ─── FOOTER ─────────────────────────────────────────── */

.site-footer {
  background: #0f2a4a;
  color: #8ba9c5;
  padding: 40px 24px;
  margin-top: 80px;
  font-family: var(--sans);
  font-size: 0.82rem;
}

.footer-inner {
  max-width: var(--max-w-wide);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  justify-content: space-between;
}

.footer-col h4 {
  color: #c5d8ee;
  font-weight: 600;
  margin-bottom: 12px;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-col a {
  color: #8ba9c5;
  text-decoration: none;
}

.footer-col a:hover { color: #c5d8ee; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: 32px;
  padding-top: 20px;
  text-align: center;
  color: #5a7a96;
  font-size: 0.78rem;
}

/* ─── UTILITIES ──────────────────────────────────────── */

.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.text-center { text-align: center; }
.text-sans { font-family: var(--sans); }
.text-small { font-size: 0.85rem; }
.text-muted { color: var(--text-muted); }

/* ─── RESPONSIVE ─────────────────────────────────────── */

@media (max-width: 640px) {
  html { font-size: 16px; }
  .header-inner { padding: 0 16px; }
  .container, .container-wide { padding: 0 16px; }
  .site-nav a { padding: 6px 8px; font-size: 0.75rem; }
  .post-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; gap: 24px; }
}
