
/* Art by Rachel — Modern Dark Rebuild */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  /* Dark theme palette — honours Rachel's original navy backgrounds */
  --bg-deep: #0d1628;          /* deepest navy: header, footer, sidebar */
  --bg-content: #15223d;       /* main content area, slightly lifted */
  --bg-card: #1f2e4f;           /* quote blocks, elevated surfaces */
  --bg-card-hover: #263a63;
  --line: rgba(255,255,255,0.08);

  --text-primary: #ece9d8;     /* warm off-white for body */
  --text-secondary: #b8bccb;   /* muted for meta */
  --text-muted: #8e94a8;

  --gold: #d4a84b;
  --gold-bright: #e8c168;
  --teal: #4dd0e1;
  --cream: #ffffcc;

  --shadow: 0 6px 24px rgba(0,0,0,0.45);
  --shadow-soft: 0 2px 10px rgba(0,0,0,0.3);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg-deep);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--gold-bright); }
a:hover { color: var(--cream); }

/* ── HEADER ── */
.site-header {
  background: var(--bg-deep);
  border-bottom: 1px solid var(--line);
  padding: 1.1rem 1.8rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.site-header h1 {
  font-family: 'Inter', sans-serif;
  font-size: clamp(1.05rem, 2.2vw, 1.4rem);
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text-primary);
}
.site-header h1 a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.site-header h1 a:hover { border-bottom-color: var(--gold); color: var(--text-primary); }
.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  color: var(--text-primary);
  padding: 0.4rem 0.7rem;
  cursor: pointer;
  font-size: 1.2rem;
  border-radius: 4px;
}

/* ── LAYOUT ── */
.page-wrapper {
  display: flex;
  flex: 1;
  min-height: 0;
}

/* ── SIDEBAR ── */
.sidebar {
  width: 220px;
  min-width: 220px;
  background: var(--bg-deep);
  overflow-y: auto;
  padding: 1rem 0;
  border-right: 1px solid var(--line);
}
.sidebar nav ul { list-style: none; }
.sidebar nav > ul > li { border-bottom: 1px solid rgba(255,255,255,0.04); }
.sidebar nav a {
  display: block;
  padding: 0.6rem 1.1rem;
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--text-secondary);
  text-decoration: none;
  line-height: 1.3;
  letter-spacing: 0.01em;
  transition: all 0.15s ease;
}
.sidebar nav a:hover, .sidebar nav a.active {
  background: rgba(212,168,75,0.08);
  color: var(--text-primary);
  padding-left: 1.4rem;
}
.sidebar nav a.active { color: var(--gold-bright); font-weight: 500; border-left: 2px solid var(--gold); padding-left: calc(1.1rem - 2px); }
.sidebar nav .subnav { display: none; background: rgba(0,0,0,0.25); }
.sidebar nav li.open > .subnav { display: block; }
.sidebar nav .subnav a {
  padding-left: 1.7rem;
  font-size: 0.76rem;
  color: var(--text-muted);
}
.sidebar nav .subnav a:hover { color: var(--text-primary); padding-left: 2rem; }
.sidebar nav .has-children > a::after { content: ' ›'; font-size: 0.75rem; opacity: 0.5; }
.sidebar nav .has-children.open > a::after { content: ' ⌄'; }

/* ── MAIN CONTENT ── */
.main-content {
  flex: 1;
  background: var(--bg-content);
  padding: 2.5rem 3rem 4rem;
  overflow-y: auto;
  min-width: 0;
}
.page-title {
  font-family: 'Inter', sans-serif;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--gold);
}
.section-title {
  font-family: 'Inter', sans-serif;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 2.5rem 0 1rem;
  letter-spacing: -0.005em;
}

/* ── QUOTES ── */
.quote-block {
  font-style: italic;
  font-size: 1rem;
  color: var(--text-primary);
  background: var(--bg-card);
  border-left: 3px solid var(--gold);
  padding: 1.1rem 1.4rem;
  margin: 1.5rem 0;
  line-height: 1.7;
  border-radius: 0 6px 6px 0;
}
.quote-block em { font-style: italic; }
.quote-block .attribution {
  display: block;
  margin-top: 0.6rem;
  font-size: 0.88rem;
  color: var(--gold-bright);
  font-style: normal;
  font-weight: 500;
  letter-spacing: 0.01em;
}

/* ── QUOTE GRID (used on Quotes page for dense quote lists) ── */
.quote-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.2rem;
  margin: 1.5rem 0 2rem;
  max-width: 1100px;
}
.quote-grid .quote-block { margin: 0; }
.quote-subhead {
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-style: italic;
  margin: -0.5rem auto 1.5rem;
  max-width: 600px;
}

/* ── GALLERY GRID (used on gallery pages) ── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.8rem;
  margin: 1.5rem 0 2rem;
}
.painting-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  text-align: center;
}
.painting-card img {
  width: 100%;
  height: 220px;
  object-fit: contain;
  background: rgba(0,0,0,0.25);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s;
  padding: 4px;
}
.painting-card:hover img {
  transform: translateY(-3px);
  border-color: var(--gold);
  box-shadow: 0 10px 32px rgba(0,0,0,0.55);
}
.painting-card .caption {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-top: 0.6rem;
  line-height: 1.3;
  letter-spacing: 0.005em;
}

/* ── COLLECTION CARDS (used on overview pages) ── */
.collection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0;
}
.collection-card {
  background: var(--bg-card);
  overflow: hidden;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--text-primary);
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  display: flex;
  flex-direction: column;
}
.collection-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 38px rgba(0,0,0,0.55);
  background: var(--bg-card-hover);
}
.collection-card img {
  width: 100%;
  height: 190px;
  object-fit: cover;
}
.collection-card .card-label {
  padding: 0.85rem 1rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary);
  border-top: 1px solid var(--gold);
  text-align: center;
  letter-spacing: 0.01em;
}

/* ── DEDICATION (top of About Me) ── */
.dedication {
  max-width: 720px;
  margin: 0.5rem auto 2.5rem;
  padding: 1.4rem 1.6rem;
  text-align: center;
  font-style: italic;
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text-primary);
  border-top: 1px solid var(--gold);
  border-bottom: 1px solid var(--gold);
  background: rgba(212,168,75,0.04);
}
.dedication p { margin: 0; }
.dedication p + p { margin-top: 0.6rem; }

/* ── ABOUT PAGE ── */
.about-text { max-width: 760px; margin: 0 auto; }
.about-text p {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-primary);
  margin-bottom: 1.1rem;
}
.about-text .long-ago-link {
  display: block;
  text-align: center;
  font-size: 1rem;
  color: var(--gold-bright);
  font-weight: 500;
  margin: 1.8rem 0;
}
.about-text .long-ago-link a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--gold);
  padding-bottom: 2px;
}
.about-text .long-ago-link a:hover { color: var(--cream); border-bottom-color: var(--cream); }

/* Inline single painting on About page */
.about-painting {
  text-align: center;
  width: 100%;
}
.about-painting .title {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.6rem;
  letter-spacing: 0.01em;
}
.about-painting img {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s;
}
.about-painting img:hover { transform: translateY(-2px); border-color: var(--gold); }
.about-painting .subcaption {
  display: block;
  margin-top: 0.6rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-style: italic;
}

/* Feature painting (e.g. White Tiger at top of About) */
.about-painting.feature {
  max-width: 800px;
  margin: 2rem auto 2.5rem;
}

/* Solo painting (no paired quote) — centred, not full-width */
.about-painting.solo {
  max-width: 520px;
  margin: 2rem auto;
}

/* Solo tiny painting (e.g. Iris Pastel Drawing as side reference) */
.about-painting.thumb {
  max-width: 220px;
  margin: 1.5rem auto;
}
.about-painting.thumb .title { font-size: 0.85rem; color: var(--text-secondary); }

/* ── ABOUT ROW (side-by-side painting + quote) ── */
.about-row {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  margin: 3rem auto;
  max-width: 1000px;
}
.about-row > .about-painting { flex: 1.1; }
.about-row > .quote-block {
  flex: 1;
  margin: 0;          /* override stack margins */
  font-size: 1.05rem;
}
.about-row[data-image-side="right"] { flex-direction: row-reverse; }

/* Soft horizontal divider between sections */
.section-divider {
  border: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold), transparent);
  margin: 2.5rem auto;
  max-width: 720px;
  opacity: 0.5;
}

/* Thank-you / gratitude note — bold prose, no italics, no attribution */
.gratitude-note {
  font-weight: 500;
  text-align: center;
  max-width: 720px;
  margin: 2rem auto;
  padding: 1.2rem 1.4rem;
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text-primary);
  background: rgba(212,168,75,0.06);
  border-top: 1px solid var(--gold);
  border-bottom: 1px solid var(--gold);
}

/* Closing benediction (e.g. Francis Bacon at bottom of About) */
.closing-benediction {
  text-align: center;
  font-style: italic;
  font-size: 1.05rem;
  color: var(--text-primary);
  margin: 3rem auto 1rem;
  max-width: 640px;
  line-height: 1.75;
}
.closing-benediction .attribution {
  display: block;
  margin-top: 0.4rem;
  font-style: normal;
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--gold-bright);
  letter-spacing: 0.01em;
}

.about-contact-line {
  text-align: center;
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin: 1.4rem auto;
}

/* ── CONTACT PAGE ── */
.contact-section { margin-bottom: 2rem; max-width: 760px; }
.contact-section h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 2rem 0 0.7rem;
  letter-spacing: -0.005em;
  border-bottom: 1px solid var(--gold);
  padding-bottom: 0.3rem;
}
.contact-section p, .contact-section li {
  font-size: 0.97rem;
  line-height: 1.75;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
}
.contact-section ul { padding-left: 1.2rem; }
.contact-section a { color: var(--gold-bright); text-decoration: none; border-bottom: 1px solid rgba(212,168,75,0.4); }
.contact-section a:hover { color: var(--cream); border-bottom-color: var(--cream); }
.contact-email {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--gold-bright);
}

/* ── LIGHTBOX ── */
#lightbox {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.94);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  padding: 1rem;
}
#lightbox.open { display: flex; flex-direction: column; }
#lightbox img {
  max-width: 90vw;
  max-height: 82vh;
  object-fit: contain;
  border: 1px solid var(--gold);
  box-shadow: 0 10px 50px rgba(0,0,0,0.8);
}
#lightbox .lb-caption {
  color: var(--text-primary);
  font-size: 1.05rem;
  margin-top: 1rem;
  font-style: italic;
  letter-spacing: 0.01em;
}
#lightbox .lb-close {
  position: absolute;
  top: 1rem; right: 1.5rem;
  color: var(--text-primary); font-size: 2rem;
  cursor: pointer; background: none; border: none;
  line-height: 1;
}
#lightbox .lb-nav {
  display: flex; gap: 2rem; margin-top: 0.8rem;
}
#lightbox .lb-nav button {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--text-primary); padding: 0.5rem 1.3rem;
  cursor: pointer; border-radius: 4px; font-size: 1.2rem;
  transition: background 0.2s, border-color 0.2s;
}
#lightbox .lb-nav button:hover { background: rgba(212,168,75,0.2); border-color: var(--gold); }

/* ── FOOTER ── */
.site-footer {
  background: var(--bg-deep);
  color: var(--text-muted);
  text-align: center;
  padding: 1.2rem;
  font-size: 0.8rem;
  border-top: 1px solid var(--line);
  letter-spacing: 0.02em;
}
.site-footer a { color: var(--gold-bright); text-decoration: none; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .about-row,
  .about-row[data-image-side="right"] {
    flex-direction: column;
    gap: 1.5rem;
  }
  .about-row > .about-painting,
  .about-row > .quote-block { flex: none; width: 100%; }
}
@media (max-width: 768px) {
  .menu-toggle { display: block; }
  .page-wrapper { flex-direction: column; }
  .sidebar {
    width: 100%;
    min-width: unset;
    max-height: 0;
    overflow: hidden;
    padding: 0;
    transition: max-height 0.3s ease;
    border-right: none;
    border-bottom: 1px solid var(--line);
  }
  .sidebar.open { max-height: 80vh; overflow-y: auto; padding: 1rem 0; }
  .main-content { padding: 1.4rem 1.2rem 2.5rem; }
  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1rem; }
  .painting-card img { height: 160px; }
  .collection-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
}
@media (max-width: 480px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}
