/* ═══════════════════════════════════════════════════════
   djalanwhite.com — Alan Ray White Personal Site
   Purple + Gold + Black palette
   Dark default, light toggle
   ═══════════════════════════════════════════════════════ */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}

:root {
  --purple: #6b21a8;
  --purple-dark: #2d1b69;
  --purple-deep: #1a1028;
  --lavender: #f5f0fa;
  --lavender-mid: #e8ddf5;
  --gold: #d4a843;
  --gold-light: #f0c85a;
  --red: #dc2626;
  --text: #e8ddf5;
  --text-muted: #a99bc2;
  --bg: #1a1028;
  --card-bg: #251a38;
  --card-border: #3d2a5c;
  --nav-bg: rgba(26,16,40,0.95);
  --section-alt: #201530;
  --hero-overlay: rgba(26,16,40,0.82);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  scroll-behavior: smooth;
}

/* Light mode */
[data-theme="light"] {
  --text: #1a1028;
  --text-muted: #2d2645;
  --bg: #f5f0fa;
  --card-bg: #fff;
  --card-border: #b8a8d0;
  --nav-bg: rgba(245,240,250,0.97);
  --section-alt: #ede5f5;
  --hero-overlay: rgba(26,16,40,0.75);
}

/* ── Typography ── */
h1,h2,h3,h4 { font-family: Georgia, "Times New Roman", serif; font-weight: 700; line-height: 1.2; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.2rem); margin-bottom: .5em; }
h3 { font-size: clamp(1.1rem, 3vw, 1.5rem); }
a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }
[data-theme="light"] a { color: var(--purple); }
p { margin: .75rem 0; }

/* ── Layout ── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 1.25rem; }
section { padding: 4rem 0; }
section:nth-child(even):not(.hero) { background: var(--section-alt); }

/* ── Nav ── */
nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--card-border);
  padding: .6rem 0;
}
nav .container {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: .5rem;
}
nav .nav-brand {
  font-family: Georgia, serif; font-weight: 700;
  font-size: 1.5rem; color: var(--gold);
  white-space: nowrap; text-decoration: none;
}
[data-theme="light"] nav .nav-brand { color: var(--purple); }
nav .nav-links { display: flex; gap: .35rem; flex-wrap: wrap; align-items: center; }
nav .nav-links a {
  font-size: 1.05rem; padding: .35rem .7rem; border-radius: 4px;
  color: var(--text-muted); font-weight: 600; transition: all .2s;
}
nav .nav-links a:hover { color: var(--gold); background: rgba(212,168,67,.1); text-decoration: none; }
[data-theme="light"] nav .nav-links a { color: #3d3460; }
[data-theme="light"] nav .nav-links a:hover { color: var(--purple); background: var(--lavender-mid); }
nav .nav-links a.active { color: var(--gold); }
[data-theme="light"] nav .nav-links a.active { color: var(--purple); }
.theme-toggle {
  background: none; border: 1px solid var(--card-border);
  border-radius: 6px; padding: .3rem .6rem; cursor: pointer;
  font-size: .9rem; color: var(--text); transition: all .2s;
}
.theme-toggle:hover { border-color: var(--gold); }

/* ── Hero ── */
.hero {
  position: relative; text-align: center;
  background: var(--purple-deep);
  padding: 5rem 1rem 4rem;
  overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(107,33,168,.2) 0%, transparent 70%);
}
.hero .container { position: relative; z-index: 1; }
.hero h1 { color: #fff; margin-bottom: .75rem; }
.hero .subtitle {
  color: var(--gold); font-family: Georgia, serif;
  font-size: clamp(1.1rem, 3vw, 1.5rem); font-weight: 400;
  margin-bottom: 1.5rem;
}
.hero .hero-text {
  color: #c4b5d8; max-width: 650px; margin: 0 auto 2rem;
  font-size: 1.05rem;
}

/* ── Cards ── */
.card {
  background: var(--card-bg); border-radius: 12px;
  border: 1px solid var(--card-border);
  box-shadow: 0 2px 12px rgba(107,33,168,.06);
  transition: transform .3s, box-shadow .3s;
  overflow: hidden;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 8px 30px rgba(107,33,168,.15); }
.card-body { padding: 1.5rem; }
.card-body h3 { margin-bottom: .5rem; }

/* ── Book Cards (home page) ── */
.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem; margin: 2rem 0;
}
.book-card { text-align: center; }
.book-card img {
  width: 100%; max-width: 250px; height: auto;
  border-radius: 8px; margin: 0 auto 1rem;
  display: block;
  box-shadow: 0 8px 30px rgba(0,0,0,.3);
}
.book-card .tagline {
  font-family: Georgia, serif; font-style: italic;
  color: var(--text-muted); margin: .5rem 0 1rem;
}

/* ── Buttons ── */
.btn {
  display: inline-block; font-weight: 700; font-size: 1rem;
  padding: .75rem 1.75rem; border-radius: 8px;
  text-decoration: none; transition: transform .2s, box-shadow .2s;
  cursor: pointer; border: none;
}
.btn:hover { transform: translateY(-2px); text-decoration: none; }
.btn-gold {
  background: linear-gradient(135deg, var(--gold), #b8922e);
  color: #1a1028;
  box-shadow: 0 4px 20px rgba(212,168,67,.3);
}
.btn-gold:hover { box-shadow: 0 8px 30px rgba(212,168,67,.5); color: #1a1028; }
.btn-outline {
  background: transparent;
  border: 2px solid var(--gold);
  color: var(--gold);
}
[data-theme="light"] .btn-outline { border-color: var(--purple); color: var(--purple); }
.btn-outline:hover { background: var(--gold); color: #1a1028; }
[data-theme="light"] .btn-outline:hover { background: var(--purple); color: #fff; }

/* ── Pull Quote ── */
.pull-quote {
  max-width: 700px; margin: 3rem auto; padding: 2rem;
  border-left: 4px solid var(--gold); font-family: Georgia, serif;
  font-style: italic; font-size: 1.15rem;
  background: var(--card-bg); border-radius: 0 12px 12px 0;
  border: 1px solid var(--card-border); border-left: 4px solid var(--gold);
}
.pull-quote cite {
  display: block; font-style: normal; font-weight: 600;
  font-size: .85rem; color: var(--text-muted); margin-top: .75rem;
}

/* ── Reviews ── */
.reviews-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem; margin: 2rem 0;
}
.review-card {
  background: var(--card-bg); border-radius: 12px;
  border: 1px solid var(--card-border); padding: 1.5rem;
  position: relative;
}
.review-card::before {
  content: '\201C'; font-family: Georgia, serif;
  font-size: 4rem; color: var(--gold); opacity: .3;
  position: absolute; top: .1rem; left: .8rem; line-height: 1;
}
.review-card p { font-style: italic; padding-top: .5rem; font-size: .95rem; }
.review-card cite {
  display: block; font-style: normal; font-weight: 600;
  font-size: .85rem; color: var(--gold); margin-top: .5rem;
}
[data-theme="light"] .review-card cite { color: var(--purple); }

/* ── Author Grid (about page) ── */
.author-grid {
  display: grid; grid-template-columns: auto 1fr;
  gap: 2rem; align-items: start; margin: 2rem 0;
}
@media (max-width: 640px) { .author-grid { grid-template-columns: 1fr; } }
.author-photo {
  width: 220px; border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,.3);
  justify-self: center;
}

/* ── Photo Gallery ── */
.photo-gallery {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem; margin: 2rem 0;
}
.photo-gallery img {
  width: 100%; height: auto; object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,.2);
  align-self: end;
}

/* ── Timeline ── */
.timeline { max-width: 700px; margin: 2rem auto; }
.timeline-item {
  display: flex; gap: 1.25rem; padding: 1.25rem 0;
  border-bottom: 1px solid var(--card-border);
}
.timeline-item:last-child { border-bottom: none; }
.timeline-year {
  font-family: Georgia, serif; font-weight: 700;
  font-size: 1.1rem; color: var(--gold); min-width: 80px;
  flex-shrink: 0;
}
[data-theme="light"] .timeline-year { color: var(--purple); }

/* ── Book Detail Page ── */
.book-hero {
  display: grid; grid-template-columns: auto 1fr;
  gap: 3rem; align-items: center; margin: 2rem 0;
}
@media (max-width: 640px) {
  .book-hero { grid-template-columns: 1fr; text-align: center; }
}
.book-cover {
  max-width: 280px; width: 100%; border-radius: 8px;
  box-shadow: 0 12px 40px rgba(0,0,0,.4);
  justify-self: center;
}
.book-meta { font-size: .9rem; color: var(--text-muted); margin: 1rem 0; }

/* ── Celebrity Grid (RATB) ── */
.celeb-grid {
  display: flex; flex-wrap: wrap; gap: .5rem;
  justify-content: center; margin: 2rem 0;
}
.celeb-tag {
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: 20px; padding: .3rem .9rem;
  font-size: .85rem; color: var(--text-muted);
  white-space: nowrap;
}

/* ── Contact ── */
.contact-card {
  max-width: 600px; margin: 2rem auto;
  background: var(--card-bg); border-radius: 12px;
  border: 1px solid var(--card-border); padding: 2.5rem;
  text-align: center;
}
.contact-card .contact-icon { font-size: 3rem; margin-bottom: 1rem; }
.contact-card .btn { margin-top: 1.5rem; }

/* ── Footer ── */
footer {
  text-align: center; padding: 2rem 1rem;
  font-size: .8rem; color: var(--text-muted);
  border-top: 1px solid var(--card-border);
}

/* ── Section Helpers ── */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.section-intro {
  max-width: 700px; margin: 0 auto 2rem;
  text-align: center; font-size: 1.05rem; color: var(--text-muted);
}
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }

/* ── Animations ── */
.fade-in {
  opacity: 0; transform: translateY(24px);
  transition: opacity .6s ease, transform .6s ease;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ── Print ── */
@media print {
  nav, .theme-toggle { display: none !important; }
  section { padding: 1.5rem 0; break-inside: avoid; }
  .hero { background: #fff; }
  .hero h1, .hero .subtitle { color: #1a1028; }
}
