/* === Self-hosted Fonts === */
@font-face {
  font-family: 'EB Garamond';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url(fonts/eb-garamond-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'EB Garamond';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url(fonts/eb-garamond-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'EB Garamond';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/eb-garamond-italic-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'EB Garamond';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/eb-garamond-italic-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url(fonts/jetbrains-mono-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url(fonts/jetbrains-mono-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

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

:root {
  --bg:        #111111;
  --bg-code:   #1a1a1a;
  --text:      #e8e4d9;
  --text-muted:#a09a8e;
  --liturgical-color: #2E7D32;
  --liturgical-dim: #1a4a1c;
  --liturgical-dim: color-mix(in srgb, var(--liturgical-color) 55%, black);
  --border:    #2a2a2a;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'EB Garamond', Georgia, serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  font-size: 19px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

a {
  color: var(--liturgical-color);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* === Skip Navigation === */
.skip-nav {
  position: absolute; left: -999px; top: auto;
  width: 1px; height: 1px; overflow: hidden;
}
.skip-nav:focus {
  left: 0; top: 0; width: auto; height: auto;
  padding: 0.5rem 1rem;
  background: var(--liturgical-color); color: var(--bg);
  z-index: 999; overflow: visible;
}

/* === Header === */
header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 2rem 0 1.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 3rem;
}

.site-name {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.03em;
}

header nav {
  display: flex;
  gap: 1.4rem;
  flex-wrap: wrap;
}

header nav a {
  font-size: 0.95rem;
  color: var(--text-muted);
}

header nav a:hover {
  color: var(--liturgical-color);
  text-decoration: none;
}

/* === Hero === */
.hero {
  text-align: center;
  padding: 2rem 0;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.cross {
  font-size: 1.8rem;
  color: var(--liturgical-color);
  display: block;
  margin-bottom: 0.8rem;
}

.tagline {
  font-size: 1.05rem;
  color: var(--text-muted);
}

/* === Sections === */
section {
  margin-bottom: 3.5rem;
}

section h2 {
  font-size: 1.1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--liturgical-color);
  margin-bottom: 1.2rem;
}

section p {
  margin-bottom: 1rem;
}

section p:last-child {
  margin-bottom: 0;
}

/* === Project List === */
.project-list {
  list-style: none;
  padding: 0;
}

.project-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 1rem;
  line-height: 1.6;
}

.project-list li:first-child {
  border-top: 1px solid var(--border);
}

.project-list strong {
  color: var(--text);
}

/* === Articles === */
.article-list {
  list-style: none;
  padding: 0;
}

.article-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  line-height: 1.6;
}

.article-list li:first-child {
  border-top: 1px solid var(--border);
}

.article-date {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-right: 0.5rem;
  font-variant-numeric: tabular-nums;
}

.article-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.all-articles {
  margin-top: 1rem;
  font-size: 0.9rem;
}

/* === Footer === */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0 3rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.88rem;
}

footer .motto {
  margin-bottom: 0.3rem;
}

footer .footer-zap {
  margin-bottom: 0.3rem;
  font-size: 0.85rem;
}

/* === Lightning / Nostr === */
.lightning-addr {
  font-size: 0.95rem;
  margin-top: 1rem;
}

.nostr-npub {
  font-size: 0.88rem;
  margin-top: 0.5rem;
  color: var(--text-muted);
}

.nostr-label {
  color: var(--text-muted);
  margin-right: 0.3rem;
}

.npub {
  font-size: 0.75rem;
  word-break: break-all;
  user-select: all;
}

/* === Homepage Two-Column Grid === */
@media (min-width: 860px) {
  .homepage-grid {
    display: grid;
    grid-template-columns: 55fr 45fr;
    gap: 0 4rem;
    align-items: start;
  }

  .homepage-right {
    border-left: 1px solid var(--border);
    padding-left: 4rem;
  }

  .homepage-left section,
  .homepage-right section {
    margin-bottom: 3rem;
  }

  .homepage-left section:last-child,
  .homepage-right section:last-child {
    margin-bottom: 0;
  }
}

/* === Responsive === */
@media (max-width: 500px) {
  body { font-size: 17px; }
  header { flex-direction: column; gap: 0.8rem; }
  header nav { gap: 1rem; }
}


/* ============================================================
   ARTICLE PAGES
   (styles below are for article pages — do not remove)
   ============================================================ */

/* === Article Page Layout === */
.article-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 4rem 1.5rem 5rem;
}

.article-back {
  font-size: 0.9rem;
  margin-bottom: 2rem;
  color: var(--text-muted);
}
.article-back a {
  color: var(--liturgical-color);
  border-bottom: 1px solid var(--liturgical-dim);
}
.article-back a:hover { color: var(--text); border-color: var(--text); text-decoration: none; }

.article-header h1 {
  font-size: 2.2rem;
  line-height: 1.2;
  color: var(--liturgical-color);
  margin-bottom: 0.8rem;
}

.article-meta {
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.article-lead {
  font-size: 1.15rem;
  font-style: italic;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 0;
}

.article-rule {
  width: 60px;
  height: 1px;
  background: var(--liturgical-dim);
  border: none;
  margin: 2.5rem 0;
}

/* === Table of Contents === */
.article-toc {
  background: var(--bg-code);
  padding: 1.4rem 1.8rem;
  margin-bottom: 3rem;
  border-left: 3px solid var(--liturgical-dim);
}

.toc-title {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.8rem;
}

.article-toc ol {
  padding-left: 1.2rem;
  margin: 0;
}

.article-toc li { margin-bottom: 0.3rem; font-size: 0.95rem; }
.article-toc a { color: var(--liturgical-color); border-bottom: 1px solid transparent; }
.article-toc a:hover { color: var(--text); border-color: var(--text); text-decoration: none; }

/* === Article Body === */
.article-page section {
  padding: 0;
  max-width: 100%;
  margin: 0 0 3rem;
}

.article-page h2 {
  font-size: 1.6rem;
  color: var(--liturgical-color);
  margin-bottom: 1rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--border);
  text-transform: none;
  letter-spacing: 0;
}

.article-page h3 {
  font-size: 1.15rem;
  color: var(--text);
  margin: 1.8rem 0 0.8rem;
  text-transform: none;
  letter-spacing: 0;
}

.article-page p { margin-bottom: 1rem; }

.article-page ul, .article-page ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.article-page li { margin-bottom: 0.3rem; }

/* === Code === */
code {
  font-family: 'JetBrains Mono', 'Menlo', 'Monaco', monospace;
  font-size: 0.83em;
  background: var(--bg-code);
  padding: 0.1em 0.35em;
  color: var(--liturgical-color);
}

pre {
  background: var(--bg-code);
  color: var(--text);
  padding: 1.4rem 1.6rem;
  overflow-x: auto;
  margin: 1.2rem 0 1.5rem;
  border-left: 3px solid var(--liturgical-dim);
  line-height: 1.6;
}

pre code {
  font-size: 0.88rem;
  background: none;
  padding: 0;
  color: inherit;
}

/* === Tables === */
.article-page table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.2rem 0 1.5rem;
  font-size: 0.95rem;
}

.article-page th {
  background: var(--bg-code);
  text-align: left;
  padding: 0.6rem 1rem;
  font-weight: 600;
  color: var(--liturgical-color);
  border-bottom: 2px solid var(--liturgical-dim);
}

.article-page td {
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.article-page tr:last-child td { border-bottom: none; }

.article-page .table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.2rem 0 1.5rem;
}
.article-page .table-wrap table { margin: 0; }

/* === Aside === */
.aside {
  background: var(--bg-code);
  border-left: 3px solid var(--liturgical-dim);
  padding: 0.9rem 1.2rem;
  font-style: italic;
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 1rem 0 1.5rem;
}

/* === Article Related === */
.article-related {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  border-top: 1px solid var(--border);
}

.article-related h2 {
  font-size: 1.1rem;
  color: var(--liturgical-color);
  margin-bottom: 0.5rem;
}

.article-related p {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.article-related a {
  color: var(--liturgical-color);
  border-bottom: 1px solid var(--liturgical-dim);
}

.article-related a:hover { color: var(--text); border-color: var(--text); text-decoration: none; }

/* === Article Index Page === */
.articles-index { max-width: 940px; }

.articles-intro {
  font-style: italic;
  margin-bottom: 2.5rem;
  color: var(--text-muted);
}

.article-card {
  display: block;
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.article-card:first-of-type { border-top: 1px solid var(--border); }

.article-card:hover { text-decoration: none; }
.article-card:hover .article-card-title { color: var(--liturgical-color); }

.article-card-meta {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}

.article-card h3, .article-card h2 {
  font-size: 1.3rem;
  color: var(--text);
  margin-bottom: 0.4rem;
}

.article-card p {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.article-read {
  font-size: 0.88rem;
  color: var(--liturgical-color);
}

.cta-link {
  color: var(--liturgical-color);
  border-bottom: 1px solid var(--liturgical-dim);
}
.cta-link:hover { color: var(--text); border-color: var(--text); text-decoration: none; }

/* === Legacy / Article-page nav & footer compat === */
/* Article pages have a standalone <nav> (not inside <header>) */
nav:not(header nav) {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 3rem;
  flex-wrap: wrap;
  gap: 0.8rem;
}
nav:not(header nav) ul {
  list-style: none;
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
}
nav:not(header nav) a {
  color: var(--text-muted);
  font-size: 0.95rem;
}
nav:not(header nav) a:hover {
  color: var(--liturgical-color);
  text-decoration: none;
}

/* Article pages still use the old nav structure — keep these working */
nav .logo {
  color: var(--liturgical-color);
  font-size: 1rem;
  font-weight: 600;
}
nav .logo:hover { text-decoration: none; opacity: 0.8; }

/* Articles index uses section-title / section-rule */
.section-title {
  font-size: 1.6rem;
  color: var(--liturgical-color);
  margin-bottom: 0.5rem;
}
.section-rule {
  width: 60px;
  height: 1px;
  background: var(--liturgical-dim);
  border: none;
  margin: 0 0 2.5rem;
}

/* Footer compat for article pages */
.ichthys {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--text-muted);
}
.copy {
  font-size: 0.8rem;
  color: var(--text-muted);
  opacity: 0.6;
}

/* === Debate Pages === */
.debate-nav {
  font-size: 0.9rem;
  margin-bottom: 2rem;
  color: var(--text-muted);
}
.debate-nav a {
  color: var(--liturgical-color);
  border-bottom: 1px solid var(--liturgical-dim);
}
.debate-nav a:hover { color: var(--text); border-color: var(--text); text-decoration: none; }

.debate-page .speaker {
  margin: 2.5rem 0 1rem;
  padding: 0.8rem 1.2rem;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.debate-page .calvin {
  border-left: 4px solid #5a7fa8;
  background: rgba(90, 127, 168, 0.06);
  color: #8ab4e0;
}

.debate-page .bellarmine {
  border-left: 4px solid #a85a5a;
  background: rgba(168, 90, 90, 0.06);
  color: #e08a8a;
}

.debate-page .exchange-heading {
  font-size: 1.4rem;
  color: var(--liturgical-color);
  margin: 3rem 0 0.5rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--border);
}

.debate-page .exchange-heading:first-of-type {
  margin-top: 0;
}

/* === Debate Series Index === */
.debate-card {
  display: block;
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.debate-card:first-of-type { border-top: 1px solid var(--border); }
.debate-card:hover { text-decoration: none; }
.debate-card:hover h2 { color: var(--liturgical-color); }

.debate-card h2 {
  font-size: 1.3rem;
  color: var(--text);
  margin-bottom: 0.2rem;
}
.debate-card .debate-card-sub {
  font-size: 0.92rem;
  font-style: italic;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}
.debate-card p {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.debate-card .article-read {
  font-size: 0.88rem;
  color: var(--liturgical-color);
}
