/* ═══════════════════════════════════════════════
   Daniel Lundquist — Institutional Analysis
   Editorial design: warm ink, sharp structure
   ═══════════════════════════════════════════════ */

/* — Fonts — */
@import url('https://fonts.googleapis.com/css2?family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&family=Source+Sans+3:ital,wght@0,300;0,400;0,600;0,700;1,400&display=swap');

/* — Variables — */
:root {
  /* palette: warm ink on aged paper */
  --ink:        #1a1a1a;
  --ink-light:  #3d3d3d;
  --muted:      #6b6b6b;
  --subtle:     #999;
  --rule:       #d4d0cb;
  --rule-light: #e8e5e0;
  --bg:         #faf9f7;
  --bg-warm:    #f3f1ed;
  --bg-note:    #f0eeea;
  --accent:     #8b4513;
  --accent-hover:#a0522d;
  --link:       #2c5282;
  --link-hover: #1a365d;

  /* type scale */
  --font-serif: 'Libre Baskerville', Georgia, 'Times New Roman', serif;
  --font-sans:  'Source Sans 3', 'Segoe UI', system-ui, sans-serif;

  /* layout */
  --max-w: 680px;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
}

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

html {
  font-size: 17px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
}

/* — Layout — */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* — Header — */
.site-header {
  padding: var(--space-lg) 0 var(--space-md);
  border-bottom: 1px solid var(--rule);
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.site-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}

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

.site-nav {
  display: flex;
  gap: 1.5rem;
}

.site-nav a {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
  transition: color 0.2s;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--ink);
}

/* — Footer — */
.site-footer {
  margin-top: var(--space-xl);
  padding: var(--space-md) 0 var(--space-lg);
  border-top: 1px solid var(--rule);
}

.site-footer p {
  font-size: 0.8rem;
  color: var(--subtle);
  letter-spacing: 0.02em;
}

/* ═══════════════════════════════════════════════
   HOME PAGE
   ═══════════════════════════════════════════════ */
.hero {
  padding: var(--space-xl) 0 var(--space-lg);
  border-bottom: 1px solid var(--rule-light);
}

.hero-tagline {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 400;
  line-height: 1.4;
  color: var(--ink);
  max-width: 560px;
  margin-bottom: var(--space-md);
}

.hero-sub {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.65;
  max-width: 520px;
}

/* recent articles on homepage */
.recent-heading {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--subtle);
  margin-bottom: var(--space-md);
  padding-top: var(--space-lg);
}

/* ═══════════════════════════════════════════════
   ANALYSIS INDEX
   ═══════════════════════════════════════════════ */
.page-heading {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  padding-top: var(--space-lg);
  margin-bottom: var(--space-sm);
}

.list {
  margin-top: var(--space-sm);
}

.list-item {
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--rule-light);
}

.list-item:last-child {
  border-bottom: none;
}

.list-date {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--subtle);
  margin-bottom: 0.3rem;
}

.list-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 0.4rem;
}

.list-title a {
  color: var(--ink);
  text-decoration: none;
  transition: color 0.15s;
}

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

.list-desc {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.55;
}

/* ═══════════════════════════════════════════════
   ARTICLE / PROSE
   ═══════════════════════════════════════════════ */
.article-header {
  padding-top: var(--space-xl);
  margin-bottom: var(--space-lg);
  border-bottom: 1px solid var(--rule-light);
  padding-bottom: var(--space-lg);
}

.article-header h1 {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin-bottom: 0.6rem;
}

.subtitle {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-style: italic;
  color: var(--ink-light);
  line-height: 1.5;
  margin-bottom: 0.75rem;
}

.meta {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--subtle);
}

/* prose body */
.prose h2 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  margin: var(--space-lg) 0 var(--space-sm);
  padding-top: var(--space-sm);
  color: var(--ink);
}

.prose h3 {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  margin: var(--space-md) 0 var(--space-xs);
  color: var(--ink-light);
}

.prose h4 {
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 700;
  margin: var(--space-sm) 0 var(--space-xs);
  color: var(--muted);
}

.prose p {
  margin-bottom: 1.15rem;
}

.prose ul, .prose ol {
  margin-bottom: 1.15rem;
  padding-left: 1.4rem;
}

.prose li {
  margin-bottom: 0.45rem;
  line-height: 1.6;
}

.prose li::marker {
  color: var(--rule);
}

.prose a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-color: rgba(44,82,130,0.3);
  text-underline-offset: 2px;
  transition: text-decoration-color 0.15s;
}

.prose a:hover {
  text-decoration-color: var(--link);
  color: var(--link-hover);
}

.prose strong {
  font-weight: 700;
  color: var(--ink);
}

.prose em {
  font-style: italic;
}

/* note box */
.note {
  background: var(--bg-note);
  border-left: 3px solid var(--accent);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  border-radius: 0 4px 4px 0;
}

.note p:last-child {
  margin-bottom: 0;
}

/* callout box */
.callout {
  border-left: 2px solid var(--rule);
  padding: 0.75rem 0 0.75rem 1.25rem;
  margin: 1.5rem 0;
}

.callout h3 {
  margin-top: 0;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ink);
}

.callout p:last-child {
  margin-bottom: 0;
}

/* separator */
.sep {
  border: none;
  border-top: 1px solid var(--rule);
  margin: var(--space-lg) 0;
}

/* ═══════════════════════════════════════════════
   ABOUT PAGE
   ═══════════════════════════════════════════════ */
.about-content {
  padding-top: var(--space-xl);
}

.about-content p {
  margin-bottom: 1.15rem;
}

.about-thesis {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-style: italic;
  color: var(--ink-light);
  border-left: 3px solid var(--accent);
  padding-left: 1.25rem;
  margin: var(--space-md) 0 var(--space-lg);
  line-height: 1.55;
}

.contact {
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px solid var(--rule-light);
}

.contact h2 {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--subtle);
  margin-bottom: var(--space-sm);
}

.contact ul {
  list-style: none;
  padding: 0;
}

.contact li {
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
}

.contact a {
  color: var(--link);
  text-decoration: none;
}

.contact a:hover {
  text-decoration: underline;
}

/* ═══════════════════════════════════════════════
   404 PAGE
   ═══════════════════════════════════════════════ */
.not-found {
  padding-top: var(--space-xl);
  text-align: center;
}

.not-found h1 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  margin-bottom: var(--space-sm);
}

.not-found p {
  color: var(--muted);
  margin-bottom: var(--space-sm);
}

.not-found a {
  color: var(--link);
  text-decoration: none;
}

.not-found a:hover {
  text-decoration: underline;
}

/* ═══════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════ */
@media (max-width: 600px) {
  html { font-size: 16px; }

  .site-header .container {
    flex-direction: column;
    gap: 0.6rem;
  }

  .hero-tagline {
    font-size: 1.35rem;
  }

  .article-header h1 {
    font-size: 1.45rem;
  }

  .page-heading {
    font-size: 1.3rem;
  }
}

/* — Print — */
@media print {
  .site-header, .site-footer, .site-nav { display: none; }
  body { font-size: 11pt; color: #000; background: #fff; }
  .container { max-width: 100%; padding: 0; }
  a { color: #000; text-decoration: none; }
  .note, .callout { border-color: #999; background: #f5f5f5; }
}
