:root {
  --bg: #0f0f0f;
  --card: #1a1a1a;
  --text: #e0e0e0;
  --muted: #aaa;
  --accent: #8a2be2;
}

/* Base styles */
body {
  margin: 0;
  padding: 0;
  background: linear-gradient(180deg, var(--bg), var(--card) 60%, var(--card));
  color: var(--text);
  font-family: "Fira Code", monospace;
  line-height: 1.7;
  background: Images/IMG_20250814_194119629.jpg:
  /* Background fade-in */
  opacity: 0;
  transition: opacity 0.8s ease;
}
body.loaded {
  opacity: 1;
}

/* Navigation */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: #111;
  position: sticky;
  top: 0;
  z-index: 100;
}
nav .logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--accent);
}
nav a {
  margin-left: 1.5rem;
  color: var(--text);
  text-decoration: none;
  transition: color 0.3s;
}
nav a:hover {
  color: var(--accent);
}

/* Header */
header {
  position: relative;
  text-align: center;
  padding: 6rem 2rem 4rem;
}
header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.65);
}
header h1,
header p {
  position: relative;
  z-index: 1;
}
header h1 {
  margin: 0;
  font-size: 3rem;
  color: var(--accent);
}
header p {
  font-size: 1.3rem;
  max-width: 700px;
  margin: 1.2rem auto 0;
  color: #ddd;
}

/* Sections */
.section {
  padding: 4rem 1.5rem;
  max-width: 900px;
  margin: auto;
  text-align: center;

  /* Section fade-in */
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.section.fade-in {
  opacity: 1;
  transform: translateY(0);
}
.section h2 {
  color: var(--accent);
  margin-bottom: 1.5rem;
  font-size: 2rem;
}
.section p {
  color: var(--text);
  margin-bottom: 1.5rem;
}

/* Book cards */
.book-list {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}
.book {
  background: var(--bg);
  padding: 1.5rem;
  border-radius: 10px;
  transition: transform 0.3s;
}
.book:hover {
  transform: translateY(-5px);
}
.book a {
  color: var(--accent);
  font-weight: bold;
  text-decoration: none;
}
.book span {
  display: block;
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}

/* Footer */
footer {
  text-align: center;
  padding: 3rem 1.5rem;
  background: linear-gradient(180deg, var(--card), var(--card) 60%, var(--bg));
  color: var(--muted);
}
footer a {
  color: var(--accent);
  text-decoration: none;
}
footer a:hover {
  text-decoration: underline;
}

/* Light mode */
body.light-mode {
  --bg: #fdfdfd;
  --card: #f5f5f5;
  --text: #111;
  --muted: #555;
  --accent: #8a2be2;
  background: linear-gradient(180deg, var(--bg), var(--card) 60%, var(--card));
  color: var(--text);
}

/* Responsive */
@media (max-width: 600px) {
  header h1 { font-size: 2.2rem; }
  header p { font-size: 1rem; }
  nav { flex-direction: column; gap: 0.5rem; }
}





/* ---- Hotfix: ensure readable text on dark bg ---- */
html, body {
  background: Images/IMG_20250814_194119629.jpg   /* your new bg */
  color: #eaeaea;               /* force light text */
  color-scheme: dark;
}

main, p, h1, h2, h3, h4, h5, h6, li, article, section {
  color: inherit;               /* inherit the light text */
}

a {
  color: #8a2be2;               /* accent links */
}

a:hover, a:focus {
  text-decoration: underline;
}

/* If you use header overlays anywhere, keep text above them */
header::before { pointer-events: none; }
header * { position: relative; z-index: 1; }

/* Make sure article container isn't behind anything weird */
.article-container {
  position: relative;
  z-index: 1;
  background: transparent;
}


