:root{
  color-scheme: light dark;
  --bg:#0b0c0f;
  --panel:rgba(255,255,255,.04);
  --border:rgba(255,255,255,.10);
  --text:rgba(255,255,255,.92);
  --muted:rgba(255,255,255,.70);
  --link:rgba(120,170,255,.95);
  --max: 900px;
  --radius: 18px;
}

@media (prefers-color-scheme: light){
  :root{
    --bg:#f6f7fb;
    --panel:rgba(0,0,0,.03);
    --border:rgba(0,0,0,.10);
    --text:rgba(0,0,0,.88);
    --muted:rgba(0,0,0,.60);
    --link:rgba(0,90,200,.95);
  }
}

* { box-sizing: border-box; }

/* Prevent short-page seam */
html {
  background: var(--bg);
}

body{
  margin:0;
  min-height:100vh;
  overflow-x:hidden;
  position:relative;

  background:
    radial-gradient(1200px 600px at 20% 10%, rgba(120,170,255,.10), transparent 55%),
    radial-gradient(1000px 500px at 80% 0%, rgba(255,255,255,.06), transparent 55%),
    var(--bg);

  color:var(--text);
  font:16px/1.75 system-ui,-apple-system,Segoe UI,Roboto,sans-serif;
}

/* Content sits above stars */
main{
  position:relative;
  z-index:1;
  max-width:var(--max);
  margin:0 auto;
  padding:44px 18px 70px;
}

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

h1{
  margin:0 0 6px;
  font-size:clamp(2rem,3vw,2.7rem);
  letter-spacing:-.02em;
}

.subtitle{ margin:0; color:var(--muted); }

.nav{
  margin-top:18px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:10px 12px;
  border-radius:999px;
  border:1px solid var(--border);
  background:rgba(0,0,0,.08);
}

.card{
  margin-top:22px;
  padding:16px;
  border-radius:var(--radius);
  border:1px solid var(--border);
  background:var(--panel);
  box-shadow:0 12px 30px rgba(0,0,0,.20);
}

.meta{
  display:flex;
  gap:14px;
  flex-wrap:wrap;
  color:var(--muted);
  font-size:.95rem;
}

hr.sep{
  border:0;
  height:1px;
  background:var(--border);
  margin:18px 0;
}

/* =========================
   Reader (Obsidian-like)
   ========================= */

.reader{
  font-family: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
  font-size:1.08rem;
}

/* Tighter, more "book" title inside the reader card */
.reader h1{
  font-family: inherit;
  font-size: 1.9rem;
  margin: 0 0 .6rem;
  letter-spacing: -0.015em;
}

/* Section hierarchy */
.reader h2{
  font-family: inherit;
  font-size: 1.45rem;
  margin: 2.2rem 0 .6rem;
}

.reader h3{
  font-family: inherit;
  font-size: 1.15rem;
  margin: 1.6rem 0 .35rem;
  opacity: .95;
}

/* Paragraph rhythm */
.reader p{
  margin: 0 0 1em;
}

/* Lists */
.reader ul, .reader ol{
  margin: .4em 0 1.2em 1.2em;
  padding: 0;
}
.reader li{
  margin: .35em 0;
}
.reader li ul, .reader li ol{
  margin-top: .4em;
}

/* Horizontal rules inside exported HTML */
.reader hr{
  border:0;
  height:1px;
  background: var(--border);
  margin: 2rem 0;
}

/* Blockquotes (nice for dramatic quotes / DM narration) */
.reader blockquote{
  margin: 1em 0;
  padding: .85em 1em;
  border-left: 3px solid var(--border);
  background: rgba(0,0,0,.06);
  border-radius: 12px;
}

/* Inline code + code blocks (in case your notes have them) */
.reader code{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: .95em;
  padding: .12em .35em;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(0,0,0,.08);
}
.reader pre{
  overflow:auto;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(0,0,0,.08);
}
.reader pre code{
  border: 0;
  padding: 0;
  background: transparent;
}

/* Obsidian internal-link style (so broken links look intentional) */
.reader .internal-link{
  text-decoration: underline dotted;
  opacity: .85;
}

/* =========================
   Pager + Footer
   ========================= */

.pager{
  display:flex;
  justify-content:space-between;
  gap:10px;
  margin-top:18px;
}

.pager a{
  flex:1;
  border:1px solid var(--border);
  border-radius:14px;
  padding:12px 14px;
  background:rgba(0,0,0,.06);
}

.pager a:hover{
  background:rgba(0,0,0,.10);
  text-decoration:none;
}

.footer{
  margin-top:40px;
  color:var(--muted);
  font-size:.95rem;
  font-style: italic;
}

/* =========================
   Maps gallery
   ========================= */

.gallery {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}

.map-card {
  display: block;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(0,0,0,.20);
}

.map-card:hover {
  border-color: rgba(255,255,255,.18);
  transform: translateY(-1px);
}

.map-thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
  background: rgba(0,0,0,.08);
}

.map-meta {
  padding: 12px 12px 14px;
}

.map-title {
  margin: 0 0 6px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.map-caption {
  margin: 0;
  color: var(--muted);
  font-size: .95rem;
}

.tags {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-flex;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,.08);
  color: var(--muted);
  font-size: .85rem;
}

/* motion respect */
@media (prefers-reduced-motion: no-preference) {
  .map-card { transition: transform .12s ease, border-color .12s ease; }
}

/* =========================
   Hero Logo
   ========================= */

.hero-logo{
  display: flex;
  justify-content: center;
  margin: 18px 0 28px;
}

.hero-logo img{
  display: block;
  width: min(220px, 70vw);
  height: auto;
  max-width: 260px;
  opacity: 0.95;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,0.6));
  transition: transform 0.25s ease;
}

.hero-logo img:hover{
  transform: scale(1.03);
}

/* Centered header layout */
.centered-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-top: 20px;
  margin-bottom: 16px;
}

.centered-header .header-content > * {
  margin-left: auto;
  margin-right: auto;
}

/* Adjust spacing for pills in centered layout */
.centered-header .nav {
  justify-content: center;
  gap: 10px;
  margin-top: 12px;
}

/* =========================
   Starry Background
   ========================= */

/* Stars layer ABOVE gradient, BELOW content */
body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-repeat: repeat;
  animation: twinkle 60s linear infinite;
}

/* Small stars */
body::before {
  background-image:
    radial-gradient(2px 2px at 20% 30%, rgba(255,255,255,0.8), transparent),
    radial-gradient(1.5px 1.5px at 70% 80%, rgba(255,255,255,0.7), transparent),
    radial-gradient(1px 1px at 40% 60%, rgba(255,255,255,0.6), transparent),
    radial-gradient(2px 2px at 90% 20%, rgba(255,255,255,0.8), transparent);
  background-size: 600px 600px;
  opacity: 0.6;
}

/* Slightly larger, slower layer */
body::after {
  background-image:
    radial-gradient(2px 2px at 50% 10%, rgba(255,255,255,0.9), transparent),
    radial-gradient(1.5px 1.5px at 10% 90%, rgba(255,255,255,0.7), transparent),
    radial-gradient(2px 2px at 80% 40%, rgba(255,255,255,0.8), transparent);
  background-size: 900px 900px;
  opacity: 0.4;
  animation-duration: 90s;
}

/* Subtle drift */
@keyframes twinkle {
  from { transform: translate(0, 0); }
  to   { transform: translate(-500px, -500px); }
}

/* =========================
   Section Hero (Sessions page)
   ========================= */

.section-hero {
  text-align: center;
  margin-top: 40px;
  margin-bottom: 40px;
}

.section-hero img {
  max-width: 460px;
  width: 100%;
  height: auto;
  margin-bottom: 20px;
  opacity: 0.95;
  filter: drop-shadow(0 8px 28px rgba(0,0,0,0.6));
  transition: transform 0.3s ease;
}

.section-hero img:hover {
  transform: scale(1.04);
}

.section-hero h1 {
  font-size: 2.2rem;
  margin-bottom: 8px;
}

.section-hero .subtitle {
  opacity: 0.8;
  font-size: 1rem;
}

/* =========================
   Tijdlijn (robust)
   ========================= */

.timeline{
  position: relative;
  margin: 0;              /* omdat hij al in .card zit */
  padding: 10px 0 10px 2.6rem;
}

.timeline::before{
  content:"";
  position:absolute;
  left: 18px;
  top: 10px;
  bottom: 10px;           /* beter dan height:100% */
  width: 2px;
  background: rgba(255,255,255,.22);
  z-index: 0;
}

.timeline-item{
  position: relative;
  margin: 0 0 2.2rem;
  padding-left: 1.2rem;
  z-index: 1;             /* content boven de lijn */
}

.timeline-item::before{
  content:"";
  position:absolute;
  left: -18px;            /* bolletje op de lijn */
  top: 6px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #7a5cff;
  box-shadow: 0 0 12px #7a5cff88;
  z-index: 2;
}

.timeline-item.major::before{
  background: crimson;
  box-shadow: 0 0 18px crimson;
}

.timeline-item.gap::before{
  background: gray;
  box-shadow: none;
}

.timeline-date{
  font-size: .9rem;
  color: var(--muted);
  margin-bottom: .35rem;
}

.timeline-content{
  background: transparent;             /* omdat .card al de achtergrond doet */
  border: 0;
  padding: 0;
}

.timeline-content h3{
  margin: 0 0 .35rem;
}

/* ===== Character layout fix ===== */

.characters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
  justify-items: center;
}

.characters .map-card {
  max-width: 320px;   /* Dit maakt ze niet meer gigantisch */
  width: 100%;
}

.character-thumb {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: top;
  display: block;
}

/* =========================
   Vampire Theme (Carpe Noctem)
   Add: <body class="vampire">
   ========================= */

body.vampire{
  /* Blood-red glow like the homepage */
  background:
    radial-gradient(1200px 700px at 50% -20%, rgba(160, 20, 40, 0.22), transparent 60%),
    radial-gradient(900px 500px at 10% 10%, rgba(140, 0, 30, 0.14), transparent 55%),
    radial-gradient(900px 500px at 90% 15%, rgba(140, 0, 30, 0.10), transparent 55%),
    var(--bg);
}

/* Subtle "blood lacquer" on pills + hover */
body.vampire .pill{
  border-color: rgba(160, 20, 40, 0.35);
  box-shadow: 0 0 0 1px rgba(160, 20, 40, 0.08) inset;
}

body.vampire .pill:hover{
  box-shadow:
    0 0 0 1px rgba(160, 20, 40, 0.22) inset,
    0 10px 30px rgba(0,0,0,0.25);
  transform: translateY(-1px);
  text-decoration: none;
}

/* Slight crimson glow on hero images */
body.vampire .hero-logo img,
body.vampire .section-hero img{
  filter: drop-shadow(0 10px 24px rgba(160, 20, 40, 0.25));
}

/* Optional: make timeline dots more "nocturnal" */
body.vampire .timeline-item::before{
  background: #a01428;
  box-shadow: 0 0 12px rgba(160, 20, 40, 0.55);
}

body.vampire .timeline-item.major::before{
  background: crimson;
  box-shadow: 0 0 18px crimson;
}
