/* ── Warm cream palette inspired by The Insect Hotel ── */
:root {
  --md-primary-fg-color: #5c3d2e;
  --md-primary-bg-color: #f5f0eb;
  --md-accent-fg-color: #8b4513;
  --md-default-bg-color: #f5f0eb;
  --md-footer-bg-color: #5c3d2e;
  --md-footer-fg-color: #f5f0eb;
}

/* Body background */
body,
.md-main {
  background-color: #f5f0eb;
}

/* Header bar — light cream, matching the page background */
.md-header {
  background-color: #f5f0eb;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 0;
  z-index: 100;
}

/* Header — centered logo + title */
.md-header__inner {
  display: flex;
  justify-content: center;
}

.md-header__title {
  flex-grow: 0;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  color: #5c3d2e;
}

.md-header__topic {
  color: #5c3d2e;
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  font-weight: 400;
  letter-spacing: 0.02em;
}

/* Push the ellipsis/options button to not offset the centering */
.md-header__option {
  position: absolute;
  right: 0.4rem;
}

/* Tabs row — light background with brown text, centered, always visible */
.md-tabs {
  background-color: #f5f0eb;
  border-bottom: 1px solid rgba(92, 61, 46, 0.1);
  position: sticky !important;
  top: 0 !important;
  z-index: 99;
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
  height: auto !important;
  overflow: visible !important;
}

/* Prevent MkDocs Material JS from hiding tabs on scroll */
.md-tabs[hidden],
.md-tabs[data-md-state="hidden"] {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
  height: auto !important;
  pointer-events: auto !important;
}

.md-tabs__list {
  justify-content: center;
}

.md-tabs__link {
  color: #5c3d2e !important;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  opacity: 1 !important;
}

.md-tabs__link--active,
.md-tabs__link:hover {
  color: #8b4513 !important;
  opacity: 1 !important;
}

/* Ellipsis icon in header */
.md-header .md-icon {
  color: #5c3d2e;
}

/* Remove search */
.md-search {
  display: none;
}

/* Remove repo link */
.md-header__source {
  display: none;
}

/* ── Content links ── */
.md-typeset a {
  color: #8b4513;
}

.md-typeset a:hover {
  color: #5c3d2e;
}

/* ── Typography ── */
.md-typeset h1 {
  font-family: 'Playfair Display', serif;
  font-weight: 400;
  font-size: 2.8rem;
  letter-spacing: 0.01em;
  color: #5c3d2e;
  margin-bottom: 0.5rem;
}

.md-typeset h2,
.md-typeset h3 {
  font-family: 'Playfair Display', serif;
  font-weight: 400;
  color: #5c3d2e;
}

.md-typeset {
  color: #3d3d3d;
  text-align: center;
}

/* Hide both sidebars — site is small, tabs are enough */
.md-sidebar--primary,
.md-sidebar--secondary {
  display: none !important;
}

/* Full-width grid, centered content */
.md-main__inner {
  display: flex;
  justify-content: center;
}

.md-content {
  max-width: 61rem;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

/* Sidebar nav links (kept for mobile toggle fallback) */
.md-nav__link {
  color: #5c3d2e;
}

.md-nav__link--active {
  color: #8b4513;
  font-weight: 600;
}

/* ── Gallery grid on home page ── */
.gallery-preview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 1.5rem;
}

.preview-section {
  text-align: center;
}

.preview-img {
  width: 100%;
  max-width: 480px;
  border-radius: 4px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.preview-img:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

/* ── Individual painting cards ── */
.painting {
  text-align: center;
  max-width: 720px;
  margin: 2rem auto;
}

.gallery-img {
  width: 100%;
  max-width: 720px;
  border-radius: 4px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.painting p {
  margin-top: 0.75rem;
  font-size: 1.05rem;
  color: #555;
}

/* ── Buttons — warm brown ── */
.md-button {
  border-color: #8b4513 !important;
  color: #8b4513 !important;
}

.md-button:hover {
  background-color: #8b4513 !important;
  color: #f5f0eb !important;
}

/* ── Footer ── */
.md-footer {
  background-color: #5c3d2e;
}

/* ── About page — left-align text ── */
.about-hero .md-typeset,
.about-hero,
.about-text {
  text-align: left;
}

.about-hero {
  display: flex;
  gap: 3rem;
  align-items: flex-start;
  margin-top: 1rem;
}

.about-photo {
  flex: 0 0 280px;
}

.about-img {
  width: 280px;
  border-radius: 6px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.about-text {
  flex: 1;
  font-size: 1.1rem;
  line-height: 1.8;
  color: #3d3d3d;
}

.about-text p {
  margin-bottom: 1rem;
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .gallery-preview {
    grid-template-columns: 1fr;
  }

  .md-typeset h1 {
    font-size: 2rem;
  }

  .about-hero {
    flex-direction: column;
    align-items: center;
  }

  .about-photo {
    flex: none;
  }

  .about-img {
    width: 220px;
  }
}
