@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600;700&family=Work+Sans:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap");

:root {
  --bg: #f1e9ff;
  --bg-mid: #efe4ff;
  --bg-end: #eadcff;
  --glow-1: #ffc48b;
  --glow-2: #c8a6ff;
  --wash-1: rgba(255, 126, 38, 0.22);
  --wash-2: rgba(140, 86, 255, 0.2);
  --wash-3: rgba(255, 214, 167, 0.2);
  --surface: #fff8ff;
  --surface-2: #f4ebff;
  --ink: #231634;
  --muted: #5f5175;
  --accent: #ff8f2a;
  --accent-2: #9658ff;
  --line: #d8c2f6;
  --hero-1: rgba(255, 143, 42, 0.14);
  --hero-2: rgba(150, 88, 255, 0.2);
  --hero-frame: rgba(165, 108, 242, 0.46);
  --hero-texture: rgba(255, 255, 255, 0.32);
  --eyebrow-border: rgba(150, 88, 255, 0.45);
  --blockquote-border: rgba(255, 143, 42, 0.7);
  --blockquote-ink: #433651;
  --tab-idle-bg: #f4ebff;
  --tab-active-ink: #fff7ef;
  --callout-bg: #f7efff;
  --topbar-bg: rgba(255, 248, 255, 0.86);
  --topbar-border: rgba(216, 194, 246, 0.75);
  --card-shadow: 0 10px 26px rgba(45, 23, 78, 0.08);
  --shadow: 0 12px 40px rgba(41, 25, 72, 0.12);
  --radius: 16px;
  --radius-sm: 10px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Work Sans", "Helvetica Neue", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 0%, var(--glow-1) 0, transparent 36%),
    radial-gradient(circle at 90% 100%, var(--glow-2) 0, transparent 34%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-mid) 35%, var(--bg-end) 100%);
  min-height: 100vh;
  line-height: 1.6;
  position: relative;
  transition: color 220ms ease;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    linear-gradient(120deg, var(--wash-1) 0%, transparent 56%),
    radial-gradient(circle at 84% 16%, var(--wash-2) 0, transparent 45%),
    radial-gradient(circle at 14% 84%, var(--wash-3) 0, transparent 44%);
  transition: none;
}

a {
  color: var(--accent-2);
  text-underline-offset: 2px;
}

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

.site-shell {
  max-width: 1080px;
  margin: 0 auto;
  padding: 1.25rem 1rem 3rem;
  position: relative;
  z-index: 1;
}

.topbar {
  position: sticky;
  top: 0.75rem;
  z-index: 10;
  background: var(--topbar-bg);
  backdrop-filter: blur(8px);
  border: 1px solid var(--topbar-border);
  border-radius: 999px;
  box-shadow: var(--shadow);
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: space-between;
  align-items: center;
  padding: 0.55rem 1rem;
  transition: background-color 360ms ease, border-color 360ms ease, box-shadow 360ms ease;
}

.brand {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.01em;
}

.topnav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.topnav a {
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.9rem;
  padding: 0.28rem 0.75rem;
}

.topnav a:hover,
.topnav a[aria-current="page"] {
  border-color: var(--line);
  background: var(--surface);
}

.hero {
  margin-top: 1.4rem;
  padding: clamp(1.4rem, 4vw, 2.6rem);
  border-radius: var(--radius);
  background:
    linear-gradient(120deg, var(--hero-1), var(--hero-2)),
    repeating-linear-gradient(
      -35deg,
      var(--hero-texture) 0 9px,
      transparent 9px 18px
    ),
    var(--surface);
  border: 1px solid var(--hero-frame);
  box-shadow: var(--shadow);
  transition: border-color 300ms ease, box-shadow 300ms ease;
}

.eyebrow {
  display: inline-block;
  border-radius: 999px;
  border: 1px solid var(--eyebrow-border);
  padding: 0.2rem 0.7rem;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: border-color 320ms ease, color 320ms ease;
}

h1,
h2,
h3 {
  font-family: "Cormorant Garamond", Georgia, serif;
  letter-spacing: 0.01em;
  line-height: 1.18;
  margin: 0.3rem 0 0.8rem;
}

h1 {
  font-size: clamp(2rem, 6vw, 3.3rem);
}

h2 {
  font-size: clamp(1.6rem, 4vw, 2.25rem);
}

h3 {
  font-size: clamp(1.25rem, 2.6vw, 1.55rem);
}

.deck {
  font-size: clamp(1rem, 2.1vw, 1.2rem);
  max-width: 70ch;
  color: var(--muted);
  margin-top: 0;
}

.grid {
  display: grid;
  gap: 1rem;
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 1rem 1rem 0.95rem;
  box-shadow: var(--card-shadow);
  transition: background-color 360ms ease, border-color 360ms ease, box-shadow 360ms ease;
}

.card h3,
.card h4 {
  margin-top: 0;
}

.section {
  margin-top: 1.3rem;
}

.section-title {
  margin-bottom: 0.2rem;
}

.section-copy {
  color: var(--muted);
  max-width: 72ch;
  margin-top: 0;
}

[data-theme-scope] {
  color: var(--ink);
}

.tab-list {
  margin: 0.6rem 0 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.tab-button {
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--tab-idle-bg);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  padding: 0.35rem 0.88rem;
  transition: background-color 260ms ease, border-color 260ms ease, color 260ms ease;
}

.tab-button[aria-selected="true"] {
  background: var(--accent-2);
  border-color: var(--accent-2);
  color: var(--tab-active-ink);
}

.tab-panels {
  position: relative;
}

.tab-panel {
  display: none;
}

.tab-panel.is-active {
  display: block;
  animation: panel-fade 180ms ease;
}

@keyframes panel-fade {
  from {
    opacity: 0;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

[data-theme-scope] .tab-button,
[data-theme-scope] .card,
[data-theme-scope] .callout,
[data-theme-scope] .section-copy,
[data-theme-scope] .section-title,
[data-theme-scope] .meta {
  transition: none !important;
}

[data-theme-scope] .tab-panel.is-active {
  animation: none;
}

.meta {
  font-family: "IBM Plex Mono", Menlo, Consolas, monospace;
  font-size: 0.82rem;
  color: var(--muted);
}

.callout {
  border-left: 4px solid var(--accent);
  padding: 0.75rem 0.95rem;
  margin: 1rem 0;
  background: var(--callout-bg);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  transition: background-color 360ms ease, border-color 360ms ease;
}

.read-more {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  text-decoration: none;
  font-weight: 600;
  margin-top: 0.45rem;
}

.read-more::after {
  content: "->";
}

.page-grid {
  display: grid;
  grid-template-columns: 1.5fr minmax(190px, 0.7fr);
  gap: 1rem;
  margin-top: 1.1rem;
}

.article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1rem, 2.5vw, 1.7rem);
  box-shadow: var(--shadow);
  transition: background-color 360ms ease, border-color 360ms ease, box-shadow 360ms ease;
}

.article p,
.article li {
  max-width: 72ch;
}

.article ol,
.article ul {
  padding-left: 1.15rem;
}

.article blockquote {
  margin: 0.8rem 0;
  padding-left: 0.9rem;
  border-left: 3px solid var(--blockquote-border);
  color: var(--blockquote-ink);
  transition: border-color 360ms ease, color 320ms ease;
}

.aside {
  position: sticky;
  top: 5rem;
  align-self: start;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.9rem;
  transition: background-color 360ms ease, border-color 360ms ease;
}

.aside h3 {
  margin-top: 0;
}

.cite {
  font-family: "IBM Plex Mono", Menlo, Consolas, monospace;
  font-size: 0.83rem;
}

.footnotes {
  margin-top: 1.3rem;
  border-top: 1px dashed var(--line);
  padding-top: 0.9rem;
}

.footer {
  margin-top: 1.6rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
  transition: border-color 360ms ease, color 320ms ease;
}

[data-theme-scope][data-theme="christianity"] {
  --bg: #f1e9ff;
  --bg-mid: #efe4ff;
  --bg-end: #eadcff;
  --glow-1: #ffc48b;
  --glow-2: #c8a6ff;
  --wash-1: rgba(255, 126, 38, 0.22);
  --wash-2: rgba(140, 86, 255, 0.2);
  --wash-3: rgba(255, 214, 167, 0.2);
  --surface: #fff8ff;
  --surface-2: #f4ebff;
  --ink: #231634;
  --muted: #5f5175;
  --accent: #ff8f2a;
  --accent-2: #9658ff;
  --line: #d8c2f6;
  --hero-1: rgba(255, 143, 42, 0.14);
  --hero-2: rgba(150, 88, 255, 0.2);
  --hero-frame: rgba(165, 108, 242, 0.46);
  --hero-texture: rgba(255, 255, 255, 0.32);
  --eyebrow-border: rgba(150, 88, 255, 0.45);
  --blockquote-border: rgba(255, 143, 42, 0.7);
  --blockquote-ink: #433651;
  --tab-idle-bg: #f4ebff;
  --tab-active-ink: #fff7ef;
  --callout-bg: #f7efff;
  --topbar-bg: rgba(255, 248, 255, 0.86);
  --topbar-border: rgba(216, 194, 246, 0.75);
  --card-shadow: 0 10px 26px rgba(45, 23, 78, 0.08);
}

[data-theme-scope][data-theme="judaism"] {
  --bg: #f9f3de;
  --bg-mid: #f2e8c3;
  --bg-end: #e8dbad;
  --glow-1: #ffb347;
  --glow-2: #6d84c8;
  --wash-1: rgba(237, 169, 65, 0.22);
  --wash-2: rgba(44, 77, 156, 0.24);
  --wash-3: rgba(255, 249, 223, 0.32);
  --surface: #fffdf4;
  --surface-2: #f7efd5;
  --ink: #2c2514;
  --muted: #6a5a37;
  --accent: #c97a00;
  --accent-2: #2f4f9f;
  --line: #d8c58a;
  --hero-1: rgba(201, 122, 0, 0.15);
  --hero-2: rgba(47, 79, 159, 0.2);
  --hero-frame: rgba(47, 79, 159, 0.5);
  --hero-texture: rgba(255, 255, 255, 0.34);
  --eyebrow-border: rgba(47, 79, 159, 0.44);
  --blockquote-border: rgba(201, 122, 0, 0.68);
  --blockquote-ink: #4f4326;
  --tab-idle-bg: #f7efd5;
  --tab-active-ink: #f7f1e2;
  --callout-bg: #f9f0d7;
  --topbar-bg: rgba(255, 253, 244, 0.9);
  --topbar-border: rgba(216, 197, 138, 0.78);
  --card-shadow: 0 10px 24px rgba(83, 66, 28, 0.1);
}

[data-theme-scope][data-theme="buddhism"] {
  --bg: #e7f5f3;
  --bg-mid: #dff0ed;
  --bg-end: #d3e7e3;
  --glow-1: #f7a95c;
  --glow-2: #56cbb9;
  --wash-1: rgba(239, 154, 77, 0.24);
  --wash-2: rgba(31, 161, 142, 0.22);
  --wash-3: rgba(200, 246, 236, 0.28);
  --surface: #f3fffb;
  --surface-2: #e8f7f4;
  --ink: #103131;
  --muted: #386362;
  --accent: #cf7d2f;
  --accent-2: #0e8e7d;
  --line: #95d5cb;
  --hero-1: rgba(207, 125, 47, 0.17);
  --hero-2: rgba(14, 142, 125, 0.2);
  --hero-frame: rgba(19, 126, 114, 0.5);
  --hero-texture: rgba(255, 255, 255, 0.34);
  --eyebrow-border: rgba(14, 142, 125, 0.46);
  --blockquote-border: rgba(207, 125, 47, 0.7);
  --blockquote-ink: #2b5453;
  --tab-idle-bg: #e8f7f4;
  --tab-active-ink: #e9fffb;
  --callout-bg: #e6f5f3;
  --topbar-bg: rgba(243, 255, 251, 0.9);
  --topbar-border: rgba(149, 213, 203, 0.8);
  --card-shadow: 0 10px 24px rgba(20, 74, 68, 0.1);
}

[data-theme-scope][data-theme="sikhism"] {
  --bg: #fdf2e3;
  --bg-mid: #f7e8ce;
  --bg-end: #eed8b1;
  --glow-1: #ff9b36;
  --glow-2: #3f6bc7;
  --wash-1: rgba(255, 144, 48, 0.26);
  --wash-2: rgba(52, 93, 195, 0.24);
  --wash-3: rgba(255, 239, 205, 0.32);
  --surface: #fffaf2;
  --surface-2: #f8efd9;
  --ink: #2f2617;
  --muted: #6a5837;
  --accent: #e77510;
  --accent-2: #2d57b0;
  --line: #dec8a0;
  --hero-1: rgba(231, 117, 16, 0.18);
  --hero-2: rgba(45, 87, 176, 0.2);
  --hero-frame: rgba(45, 87, 176, 0.52);
  --hero-texture: rgba(255, 255, 255, 0.34);
  --eyebrow-border: rgba(45, 87, 176, 0.44);
  --blockquote-border: rgba(231, 117, 16, 0.72);
  --blockquote-ink: #524124;
  --tab-idle-bg: #f8efd9;
  --tab-active-ink: #fff6e9;
  --callout-bg: #f9edd2;
  --topbar-bg: rgba(255, 250, 242, 0.9);
  --topbar-border: rgba(222, 200, 160, 0.82);
  --card-shadow: 0 10px 24px rgba(97, 65, 20, 0.1);
}

[data-theme-scope][data-theme="sufism"] {
  --bg: #2d1d35;
  --bg-mid: #3a2646;
  --bg-end: #4a315c;
  --glow-1: #ff9355;
  --glow-2: #d983f2;
  --wash-1: rgba(255, 135, 74, 0.2);
  --wash-2: rgba(203, 126, 247, 0.26);
  --wash-3: rgba(38, 18, 58, 0.58);
  --surface: #3b2a45;
  --surface-2: #4a3658;
  --ink: #f8efff;
  --muted: #dcc8ea;
  --accent: #ff9a52;
  --accent-2: #d586f0;
  --line: #7d5a95;
  --hero-1: rgba(255, 154, 82, 0.24);
  --hero-2: rgba(213, 134, 240, 0.26);
  --hero-frame: rgba(212, 153, 248, 0.56);
  --hero-texture: rgba(255, 255, 255, 0.1);
  --eyebrow-border: rgba(213, 134, 240, 0.6);
  --blockquote-border: rgba(255, 154, 82, 0.82);
  --blockquote-ink: #f4e6ff;
  --tab-idle-bg: #4a3658;
  --tab-active-ink: #2f1d39;
  --callout-bg: #4b3658;
  --topbar-bg: rgba(59, 42, 69, 0.9);
  --topbar-border: rgba(125, 90, 149, 0.85);
  --card-shadow: 0 10px 24px rgba(10, 4, 15, 0.42);
  --shadow: 0 12px 40px rgba(10, 4, 15, 0.45);
}

[data-theme-scope][data-theme="hinduism"] {
  --bg: #fef3e6;
  --bg-mid: #fae6cb;
  --bg-end: #f1d1a8;
  --glow-1: #ff8f2a;
  --glow-2: #b250c4;
  --wash-1: rgba(255, 126, 36, 0.24);
  --wash-2: rgba(176, 72, 200, 0.26);
  --wash-3: rgba(255, 213, 137, 0.3);
  --surface: #fff9f1;
  --surface-2: #fbeedc;
  --ink: #2d1b23;
  --muted: #6a4856;
  --accent: #e56700;
  --accent-2: #8d2fa6;
  --line: #e2c59e;
  --hero-1: rgba(229, 103, 0, 0.18);
  --hero-2: rgba(141, 47, 166, 0.22);
  --hero-frame: rgba(141, 47, 166, 0.54);
  --hero-texture: rgba(255, 255, 255, 0.34);
  --eyebrow-border: rgba(141, 47, 166, 0.48);
  --blockquote-border: rgba(229, 103, 0, 0.74);
  --blockquote-ink: #4d2f3f;
  --tab-idle-bg: #fbeedc;
  --tab-active-ink: #fff7e9;
  --callout-bg: #f9ebd9;
  --topbar-bg: rgba(255, 249, 241, 0.9);
  --topbar-border: rgba(226, 197, 158, 0.84);
  --card-shadow: 0 10px 24px rgba(98, 46, 62, 0.12);
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
  animation: rise 0.56s ease forwards;
}

.reveal[data-delay="1"] {
  animation-delay: 0.08s;
}

.reveal[data-delay="2"] {
  animation-delay: 0.16s;
}

.reveal[data-delay="3"] {
  animation-delay: 0.24s;
}

@keyframes rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 940px) {
  .grid.two,
  .grid.three,
  .page-grid {
    grid-template-columns: 1fr;
  }

  .aside {
    position: static;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    animation: none;
  }
}
