/* AI and Catholicism - polished research archive theme */

:root {
  --paper: #fffdf8;
  --surface-muted: #f6f1e8;
  --ink: #1f2524;
  --muted: #62625b;
  --line: #ded6c8;
  --line-strong: #c4b58e;
  --blue: #173b57;
  --blue-dark: #102a3e;
  --gold: #9f7a28;
  --gold-soft: #eadfbd;
  --focus: #d69a00;
  font-size: 18px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(23, 59, 87, 0.06), transparent 360px),
    var(--paper);
  font-family: "Avenir Next", Avenir, "Segoe UI", system-ui, sans-serif;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--blue);
  text-decoration-color: rgba(159, 122, 40, 0.55);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--blue-dark);
  text-decoration-color: var(--gold);
}

a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.94);
}

.header-inner {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 1.15rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.brand {
  display: inline-flex;
  flex-direction: column;
  gap: 0.12rem;
  color: var(--ink);
  text-decoration: none;
}

.brand-name,
h1,
h2,
h3,
blockquote {
  font-family: Georgia, "Times New Roman", Times, serif;
}

.brand-name {
  color: var(--blue-dark);
  font-size: 1.18rem;
  font-weight: 700;
  line-height: 1.1;
}

.brand-line {
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav li {
  margin: 0;
}

.nav a {
  display: block;
  padding: 0.48rem 0.72rem;
  border-radius: 999px;
  color: var(--blue);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
}

.nav a[aria-current="page"] {
  color: var(--blue-dark);
  background: var(--gold-soft);
}

.nav a:hover {
  background: var(--surface-muted);
}

main {
  flex: 1;
  width: min(840px, calc(100% - 40px));
  margin: 0 auto;
  padding: 4.5rem 0 5rem;
}

.page-intro {
  margin-bottom: 2.75rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 0.65rem;
  color: var(--gold);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1.2;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  color: var(--blue-dark);
  font-size: clamp(2.35rem, 6vw, 4rem);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin: 3rem 0 0.75rem;
  color: var(--blue-dark);
  font-size: 1.45rem;
  line-height: 1.15;
}

h3 {
  margin: 1.6rem 0 0.55rem;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.2;
}

p {
  margin: 1rem 0;
}

.lead {
  max-width: 720px;
  margin: 1rem 0 0;
  color: #3f4543;
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 1.28rem;
  line-height: 1.55;
}

.quote-group {
  margin: 0 0 1.6rem;
  padding: 0.75rem;
  border: 1px solid rgba(196, 181, 142, 0.6);
  border-radius: 6px;
  background: rgba(246, 241, 232, 0.46);
}

.quote-group .quote:last-child {
  margin-bottom: 0;
}

.contact-panel {
  margin-top: 3rem;
  padding: 1.35rem 1.45rem;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: rgba(246, 241, 232, 0.62);
}

.contact-panel h2 {
  margin-top: 0;
}

.contact-panel .note {
  color: var(--muted);
  font-size: 0.9rem;
}

.quote {
  position: relative;
  margin: 0 0 1.15rem;
  padding: 1.2rem 1.35rem 1.05rem;
  border: 1px solid var(--line);
  border-left: 5px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 10px 28px rgba(29, 38, 37, 0.04);
}

.quote blockquote {
  margin: 0;
  color: #252927;
  font-size: 1.08rem;
  line-height: 1.66;
}

.quote blockquote p {
  margin: 0;
}

.quote figcaption {
  margin-top: 0.95rem;
  padding-top: 0.8rem;
  border-top: 1px solid rgba(222, 214, 200, 0.8);
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.author {
  color: var(--blue-dark);
  font-weight: 800;
}

.document {
  font-weight: 650;
}

.source-list {
  list-style: none;
  margin: 0.7rem 0 2rem;
  padding: 0;
  border-top: 1px solid var(--line);
}

.source-list li {
  margin: 0;
  padding: 0.92rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.source-list a {
  color: var(--blue-dark);
  font-weight: 700;
}

.source-list span {
  color: var(--muted);
  white-space: nowrap;
}

main > ul:not(.source-list) {
  padding-left: 1.2rem;
}

main > ul:not(.source-list) li {
  margin-bottom: 0.9rem;
}

.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--line);
  background: var(--blue-dark);
  color: rgba(255, 255, 255, 0.82);
}

.site-footer p {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 1rem 0;
  font-size: 0.88rem;
  line-height: 1.45;
}

.site-footer a {
  color: #ffffff;
  text-decoration-color: rgba(255, 255, 255, 0.5);
}

@media (max-width: 760px) {
  :root {
    font-size: 17px;
  }

  .header-inner {
    width: min(100% - 28px, 1120px);
    padding: 0.95rem 0 0.75rem;
    align-items: flex-start;
    flex-direction: column;
    gap: 0.85rem;
  }

  nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 0.15rem;
  }

  .nav {
    width: max-content;
    min-width: 100%;
  }

  .nav a {
    padding: 0.46rem 0.62rem;
    white-space: nowrap;
  }

  main {
    width: min(100% - 28px, 840px);
    padding: 3rem 0 4rem;
  }

  .page-intro {
    margin-bottom: 2rem;
  }

  h1 {
    font-size: 2.35rem;
  }

  .lead {
    font-size: 1.13rem;
  }

  .quote {
    padding: 1rem 1rem 0.9rem;
  }

  .quote blockquote {
    font-size: 1rem;
  }
}
