/* AItheism — editorial stylesheet. Self-contained, no external assets. */

:root {
  --paper: #faf8f3;
  --surface: #ffffff;
  --surface-2: #f3efe6;
  --ink: #1b1a17;
  --ink-soft: #34322c;
  --muted: #605c53;
  --line: #e6e0d4;
  --accent: #4338ca;
  --accent-ink: #372fb0;
  --accent-soft: rgba(67, 56, 202, 0.09);
  --shadow: 0 1px 2px rgba(27, 26, 23, 0.04), 0 8px 30px rgba(27, 26, 23, 0.06);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, Cambria, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --maxw: 1120px;
  --readw: 40rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #131319;
    --surface: #1a1a22;
    --surface-2: #20202a;
    --ink: #ece9e1;
    --ink-soft: #d7d3c8;
    --muted: #9a9488;
    --line: #2b2b36;
    --accent: #a9b4ff;
    --accent-ink: #c3ccff;
    --accent-soft: rgba(169, 180, 255, 0.12);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 10px 34px rgba(0, 0, 0, 0.4);
  }
}

:root[data-theme="dark"] {
  --paper: #131319;
  --surface: #1a1a22;
  --surface-2: #20202a;
  --ink: #ece9e1;
  --ink-soft: #d7d3c8;
  --muted: #9a9488;
  --line: #2b2b36;
  --accent: #a9b4ff;
  --accent-ink: #c3ccff;
  --accent-soft: rgba(169, 180, 255, 0.12);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 10px 34px rgba(0, 0, 0, 0.4);
}

:root[data-theme="light"] {
  --paper: #faf8f3;
  --surface: #ffffff;
  --surface-2: #f3efe6;
  --ink: #1b1a17;
  --ink-soft: #34322c;
  --muted: #605c53;
  --line: #e6e0d4;
  --accent: #4338ca;
  --accent-ink: #372fb0;
  --accent-soft: rgba(67, 56, 202, 0.09);
  --shadow: 0 1px 2px rgba(27, 26, 23, 0.04), 0 8px 30px rgba(27, 26, 23, 0.06);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent-ink); }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }

/* ---------- Skip link ---------- */
.skip {
  position: absolute; left: -999px; top: 0; background: var(--accent); color: #fff;
  padding: .6rem 1rem; border-radius: 0 0 8px 0; z-index: 100; font-family: var(--sans);
}
.skip:focus { left: 0; }

/* ---------- Header ---------- */
.site-header {
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.2) blur(6px);
  position: sticky; top: 0; z-index: 50;
}
.header-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: .85rem 0; flex-wrap: wrap;
}
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand .mark { width: 30px; height: 30px; flex: 0 0 auto; }
.brand .word { font-family: var(--serif); font-weight: 600; font-size: 1.3rem; letter-spacing: .2px; line-height: 1; }
.brand .word b { color: var(--accent); font-weight: 600; }
.nav { display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; font-family: var(--sans); }
.nav a {
  color: var(--ink-soft); text-decoration: none; font-size: .95rem; font-weight: 500;
  padding: .45rem .7rem; border-radius: 7px; white-space: nowrap;
}
.nav a:hover { background: var(--accent-soft); color: var(--accent-ink); }
.nav a[aria-current="page"] { color: var(--accent-ink); background: var(--accent-soft); }
.theme-btn {
  font-family: var(--sans); font-size: .85rem; cursor: pointer;
  background: transparent; color: var(--muted); border: 1px solid var(--line);
  border-radius: 7px; padding: .4rem .55rem; line-height: 1; display: inline-flex; align-items: center; gap: .35rem;
}
.theme-btn:hover { color: var(--ink); border-color: var(--muted); }

/* ---------- Generic sections ---------- */
main { display: block; }
.section { padding: 3.5rem 0; }
.section-sm { padding: 2.25rem 0; }
.eyebrow {
  font-family: var(--sans); font-size: .78rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--accent-ink); margin: 0 0 .75rem;
}
h1, h2, h3, h4 { font-family: var(--serif); color: var(--ink); line-height: 1.18; font-weight: 600; }
h1 { font-size: clamp(2rem, 5vw, 3.1rem); letter-spacing: -0.01em; margin: 0 0 .5rem; }
h2 { font-size: clamp(1.5rem, 3.4vw, 2rem); margin: 2.4rem 0 .8rem; }
h3 { font-size: 1.25rem; margin: 1.8rem 0 .5rem; }
p { margin: 0 0 1.1rem; }
hr { border: none; border-top: 1px solid var(--line); margin: 2.5rem 0; }

.lede { font-size: 1.3rem; color: var(--ink-soft); line-height: 1.55; }

/* ---------- Hero ---------- */
.hero { padding: 4rem 0 2.5rem; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 3.5rem; align-items: center; }
.define {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  padding: 1.75rem 1.9rem; box-shadow: var(--shadow); position: relative;
}
.define::before {
  content: ""; position: absolute; left: 0; top: 1.75rem; bottom: 1.75rem; width: 3px;
  background: var(--accent); border-radius: 3px;
}
.define-word { font-family: var(--serif); font-size: 1.5rem; font-weight: 600; margin: 0 0 1.1rem; color: var(--ink); }
.define-pron { font-family: var(--sans); font-size: .9rem; font-weight: 400; font-style: italic; color: var(--muted); }
.define-senses { list-style: none; margin: 0; padding: 0; }
.define-senses li { font-size: 1.05rem; color: var(--ink-soft); margin-bottom: .9rem; line-height: 1.55; padding-left: 1.6rem; position: relative; }
.define-num { position: absolute; left: 0; color: var(--accent-ink); font-weight: 600; font-family: var(--sans); }
.define-note { font-family: var(--sans); font-size: .88rem; color: var(--muted); margin: 1rem 0 0; padding-top: 1rem; border-top: 1px solid var(--line); }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 2.25rem; }
  .define { max-width: 34rem; }
}
.hero .kicker {
  font-family: var(--sans); font-size: .82rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent-ink); margin-bottom: 1rem;
}
.hero h1 { max-width: 18ch; }
.hero .lede { max-width: 34rem; margin-top: 1rem; }
.hero-actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1.75rem; font-family: var(--sans); }

.btn {
  display: inline-flex; align-items: center; gap: .5rem; font-family: var(--sans);
  font-size: .98rem; font-weight: 600; text-decoration: none; padding: .7rem 1.2rem;
  border-radius: 9px; border: 1px solid transparent; cursor: pointer;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-ink); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-ink); }

/* ---------- Cards / grid ---------- */
.grid { display: grid; gap: 1.25rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 1.5rem; box-shadow: var(--shadow); display: flex; flex-direction: column;
}
a.card { text-decoration: none; color: var(--ink); transition: transform .12s ease, border-color .12s ease; }
a.card:hover { border-color: var(--accent); transform: translateY(-2px); }
.card .meta { font-family: var(--sans); font-size: .8rem; color: var(--muted); margin-bottom: .6rem; letter-spacing: .02em; }
.card h3 { margin: 0 0 .5rem; font-size: 1.3rem; }
.card p { color: var(--ink-soft); font-size: 1.02rem; margin: 0; }
.card .more { font-family: var(--sans); font-size: .9rem; font-weight: 600; color: var(--accent-ink); margin-top: 1rem; }

/* ---------- Article ---------- */
.article { padding: 3rem 0; }
.article-head { max-width: var(--readw); margin: 0 auto 2rem; }
.article-head h1 { font-size: clamp(2rem, 5.4vw, 3rem); }
.article-meta {
  font-family: var(--sans); font-size: .9rem; color: var(--muted);
  display: flex; gap: .8rem; flex-wrap: wrap; align-items: center; margin-top: 1rem;
}
.article-meta .dot { opacity: .5; }
.prose { max-width: var(--readw); margin: 0 auto; }
.prose > p:first-of-type { }
.prose h2 { border-top: 1px solid var(--line); padding-top: 1.6rem; }
.prose h2:first-child { border-top: none; padding-top: 0; }
.prose ul, .prose ol { margin: 0 0 1.2rem; padding-left: 1.3rem; }
.prose li { margin: .35rem 0; }
.prose blockquote {
  margin: 1.8rem 0; padding: .3rem 0 .3rem 1.3rem; border-left: 3px solid var(--accent);
  color: var(--ink-soft); font-style: italic; font-size: 1.18rem;
}
.prose blockquote cite { display: block; font-style: normal; font-size: .9rem; font-family: var(--sans); color: var(--muted); margin-top: .5rem; }
.prose code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .9em;
  background: var(--surface-2); padding: .12em .4em; border-radius: 5px;
}
.pullquote {
  font-family: var(--serif); font-size: clamp(1.35rem, 3.2vw, 1.7rem); line-height: 1.4;
  color: var(--ink); margin: 2.2rem 0; font-style: italic; text-align: center; max-width: 34rem;
  margin-left: auto; margin-right: auto;
}
.footnote-note {
  font-family: var(--sans); font-size: .9rem; color: var(--muted);
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px;
  padding: 1rem 1.2rem; margin: 2rem auto 0; max-width: var(--readw);
}

.tag {
  display: inline-block; font-family: var(--sans); font-size: .74rem; font-weight: 600;
  letter-spacing: .04em; text-transform: uppercase; color: var(--accent-ink);
  background: var(--accent-soft); padding: .2rem .55rem; border-radius: 999px;
}

.colw { max-width: 42rem; margin: 0 auto; }
.colw .callout, .colw .reading-list, .colw .entry-list { max-width: none; margin-left: 0; margin-right: 0; }

/* essay list rows */
.entry-list { max-width: var(--readw); margin: 0 auto; list-style: none; padding: 0; }
.entry {
  border-top: 1px solid var(--line); padding: 1.6rem 0; display: block; text-decoration: none; color: var(--ink);
}
.entry:first-child { border-top: none; }
.entry .meta { font-family: var(--sans); font-size: .82rem; color: var(--muted); margin-bottom: .35rem; }
.entry h3 { margin: 0 0 .4rem; font-size: 1.45rem; }
.entry:hover h3 { color: var(--accent-ink); }
.entry p { color: var(--ink-soft); margin: 0; font-size: 1.05rem; }

/* reading list */
.reading-list { max-width: var(--readw); margin: 0 auto; list-style: none; padding: 0; }
.reading-item { border-top: 1px solid var(--line); padding: 1.4rem 0; }
.reading-item:first-child { border-top: none; }
.reading-item .work { font-weight: 600; font-size: 1.15rem; }
.reading-item .byline { font-family: var(--sans); font-size: .85rem; color: var(--muted); margin: .2rem 0 .5rem; }
.reading-item p { margin: 0; color: var(--ink-soft); font-size: 1.02rem; }

/* FAQ */
.faq { max-width: var(--readw); margin: 0 auto; }
.faq details {
  border: 1px solid var(--line); border-radius: 12px; padding: .35rem 1.1rem;
  margin-bottom: .8rem; background: var(--surface);
}
.faq summary {
  cursor: pointer; font-weight: 600; font-size: 1.1rem; padding: .8rem 0;
  list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--sans); color: var(--accent); font-size: 1.4rem; line-height: 1; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: 0 0 1rem; color: var(--ink-soft); }

/* callout */
.callout {
  background: var(--surface-2); border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: 12px; padding: 1.3rem 1.5rem; margin: 2rem auto; max-width: var(--readw);
}
.callout h3 { margin-top: 0; }
.callout p:last-child { margin-bottom: 0; }

.center { text-align: center; }
.muted { color: var(--muted); }
.divider-label {
  font-family: var(--sans); text-transform: uppercase; letter-spacing: .12em; font-size: .78rem;
  font-weight: 700; color: var(--muted); text-align: center; margin: 0 0 1.5rem;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line); background: var(--surface-2);
  padding: 3rem 0 2.5rem; margin-top: 3rem; font-family: var(--sans);
}
.footer-grid { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.footer-about { max-width: 22rem; }
.footer-about .word { font-family: var(--serif); font-size: 1.15rem; font-weight: 600; color: var(--ink); }
.footer-about p { font-size: .92rem; color: var(--muted); margin: .6rem 0 0; line-height: 1.55; }
.footer-nav { display: flex; gap: 3rem; flex-wrap: wrap; }
.footer-col h4 { font-family: var(--sans); font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 .8rem; }
.footer-col a { display: block; color: var(--ink-soft); text-decoration: none; font-size: .95rem; margin-bottom: .5rem; }
.footer-col a:hover { color: var(--accent-ink); }
.footer-bottom {
  margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  font-size: .85rem; color: var(--muted);
}
.footer-bottom a { color: var(--muted); }
.footer-bottom a:hover { color: var(--accent-ink); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  body { font-size: 1.06rem; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .section { padding: 2.5rem 0; }
  .hero { padding: 2.75rem 0 1.5rem; }
  .header-row { padding: .7rem 0; }
  .brand .word { font-size: 1.15rem; }
  .nav a { padding: .4rem .5rem; font-size: .9rem; }
  .footer-grid { flex-direction: column; gap: 1.75rem; }
  .footer-nav { gap: 2rem; }
  .lede { font-size: 1.15rem; }
}
@media (max-width: 380px) {
  .nav { gap: .1rem; }
  .nav a { padding: .35rem .4rem; }
}
