/* ===== NAV PANEL (HEADER) ===== */
.site-header {
  background-color: #800000; /* maroon */
  padding: 0.75rem 0;
}

.site-header .nav {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

.site-header .nav a {
  color: #ffffff; /* white text */
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: color 0.3s ease;
}

.site-header .nav a:hover,
.site-header .nav a[aria-current="page"] {
  color: #ffcccb; /* light pink highlight for hover/current */
}

/* ===== PAGE HEADING RIBBON ===== */
.page-heading {
  background-color: #800000; /* maroon */
  color: #ffffff; /* white text */
  padding: 2rem 1rem;
  text-align: center;
}

.page-heading h1 {
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
}

.page-heading p {
  margin-top: 0.5rem;
  font-size: 1.1rem;
}

/* ===== FOOTER RIBBON ===== */
.site-footer {
  background-color: #006400; /* dark green */
  color: #ffffff;
  text-align: center;
  padding: 1rem 0;
  margin-top: 2rem;
}
/* ----------------------
   Gallery Page
----------------------- */
.gallery { padding: 2rem 0; }
.gallery-header h1 { margin: 0 0 .25rem 0; }
.gallery-header .muted { color: var(--muted); font-size: .95rem; }

.albums { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 640px) { .albums { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px){ .albums { grid-template-columns: 1fr 1fr 1fr; } }

.album-card {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: .5rem;
  padding: .75rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  text-align: left;
}
.album-card:focus-visible { outline: 3px solid #2aa770; }
.album-thumb { aspect-ratio: 4/3; overflow: hidden; border-radius: 10px; background: #f5f5f5; display:flex; align-items:center; justify-content:center; }
.album-thumb img { width: 100%; height: 100%; object-fit: contain; }
.album-thumb.placeholder::after { content: "Image"; color: #aaa; font-size: .9rem; }
.album-meta h3 { margin: 0; font-size: 1.05rem; }
.album-meta .count { color: #666; font-size: .9rem; }

/* Lightbox (dialog) */
.lightbox { width: min(100%, 980px); border: none; border-radius: 16px; padding: 0; }
.lightbox::backdrop { background: rgba(0,0,0,.65); }
.lightbox-header { display: flex; align-items: center; justify-content: space-between; padding: .75rem 1rem; border-bottom: 1px solid #eee; }
.lightbox-body { position: relative; padding: 1rem; display: grid; place-items: center; }
.lightbox-body img { max-width: 100%; max-height: 70vh; object-fit: contain; background: #000; border-radius: 12px; }
.lightbox-footer { padding: .5rem 1rem 1rem; text-align: right; color: #555; }
.lightbox .close { background: transparent; border: none; font-size: 1.5rem; line-height: 1; cursor: pointer; }
.lightbox .nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,.5); color: #fff; border: none; font-size: 2rem; width: 44px; height: 44px; border-radius: 50%; cursor: pointer; display: grid; place-items: center; }
.lightbox .nav.prev { left: .5rem; }
.lightbox .nav.next { right: .5rem; }

/* ----------------------
   Projects Page
----------------------- */
.projects h1 { margin: 1.5rem 0 1rem; }
.project-section { margin: 1.25rem 0 2rem; }
.project-figure { margin: 0 0 1rem; }
.project-figure img { width: 100%; height: auto; display: block; border-radius: 12px; }
.project-figure figcaption { margin-top: .5rem; color: #333; }

/* ----------------------
   Utilities / Misc
----------------------- */
.hidden { display: none !important; }
.center { text-align: center; }
html, body { height: 100%; }
body { display: flex; flex-direction: column; }
main { flex: 1; }
/* ===== Gallery Lightbox ===== */
.lb.hidden { display: none; }

.lb {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.82);
  display: grid;
  place-items: center;
  z-index: 9999;
  padding: 2rem;
  touch-action: none; /* prevent browser gestures so our swipe works */
}

.lb-img {
  max-width: 100vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain; /* show whole photo (no cropping) */
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  border-radius: 12px;
}

.lb-caption {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0,0,0,0.6);
  background: rgba(0,0,0,0.3);
  padding: .4rem .7rem;
  border-radius: .5rem;
}

.lb-btn {
  position: absolute;
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: none;
  font-size: 2rem;
  line-height: 1;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background .2s ease;
}

.lb-btn:hover { background: rgba(255,255,255,0.25); }

.lb-close { top: 1rem; right: 1rem; }
.lb-prev  { left: 1rem;  top: 50%; transform: translateY(-50%); }
.lb-next  { right: 1rem; top: 50%; transform: translateY(-50%); }
/* ===== Gallery albums (grid + cards) ===== */
.gallery { padding-top: 1rem; }

.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.album-card {
  appearance: none;
  border: none;
  background: #ffffff;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  box-shadow: 0 6px 16px rgba(0,0,0,0.08);
  transition: transform .12s ease, box-shadow .12s ease;
}

.album-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.12);
}

.album-thumb {
  /* keep a consistent box for thumbnails even before image loads */
  aspect-ratio: 16 / 10;
  background: #f2f2f2;
}

.album-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;  /* crop to fill the tile; lightbox shows full image */
  display: block;
}

.album-meta {
  padding: .75rem 1rem 1rem;
}

.album-meta h3 {
  margin: 0 0 .25rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: #222;
}

.album-meta .count {
  font-size: .9rem;
  color: #555;
}

/* Utility in case needed elsewhere */
.hidden { display: none !important; }
/* ===== Sticky footer (gallery page only) ===== */
.page-gallery {
  min-height: 100vh;            /* fill full viewport height */
  display: flex;
  flex-direction: column;
}

.page-gallery main {
  flex: 1 0 auto;               /* push footer to the bottom */
}
/* ===== PAGE HEADING RIBBON (bottom-aligned content) ===== */
.page-heading {
  background-color: #800000;   /* maroon */
  color: #ffffff;              /* white text */
  text-align: center;
}

.page-heading .container {
  /* Push the heading + description to the bottom of the ribbon */
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  /* Control ribbon height; adjusts responsively */
  min-height: clamp(120px, 18vw, 220px);
  /* Tight lower padding so the description hugs the bottom nicely */
  padding: 1rem 1rem 0.6rem;
}

.page-heading h1 {
  margin: 0 0 0.4rem;          /* small gap above the description */
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
}

.page-heading p {
  margin: 0;                   /* hug the bottom edge */
  font-size: 1.1rem;
  opacity: 0.98;
}

/* Optional: slightly shorter band on small screens */
@media (max-width: 640px) {
  .page-heading .container {
    min-height: 120px;
    padding-bottom: 0.5rem;
  }
  .page-heading h1 { font-size: 1.75rem; }
  .page-heading p  { font-size: 1rem;   }
}

/* Optional: tighten spacing above footer on the gallery page */
.page-gallery .site-footer {
  margin-top: 0;                 /* overrides the default 2rem if you want it flush */
}
/* === Compact maroon page-heading ribbon (all pages) === */
.page-heading {
  background-color: #800000; /* maroon */
  color: #ffffff;            /* white text */
  text-align: center;
}

/* Keep content bottom-aligned, but shrink the band a lot */
.page-heading .container {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  /* Much smaller min height now */
  min-height: clamp(84px, 12vh, 140px);
  /* Tight padding so the description hugs the bottom */
  padding: 0.5rem 1rem 0.4rem;
}

.page-heading h1 {
  margin: 0 0 0.25rem;
  font-size: clamp(1.35rem, 2.4vw, 1.9rem);
  font-weight: 700;
  line-height: 1.2;
}

.page-heading p {
  margin: 0;
  font-size: clamp(0.95rem, 1.8vw, 1.1rem);
  opacity: 0.98;
}

/* Header (nav) also slightly tighter */
.site-header { padding: 0.5rem 0; }
.site-header .nav { gap: 1rem; }
.site-header .nav a { font-size: 0.95rem; }

/* Optional: even more compact on small screens */
@media (max-width: 640px) {
  .page-heading .container {
    min-height: 96px;
    padding-bottom: 0.45rem;
  }
  .page-heading h1 { font-size: 1.5rem; }
  .page-heading p  { font-size: 1rem;   }
}
/* === FORCE-COMPACT PAGE HEADING (global) === */
.page-heading { 
  background-color: #800000;  /* maroon */
  color: #fff;
  padding: 0 !important;      /* kill any earlier padding */
}

.page-heading > .container {
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-end !important;   /* bottom align */
  min-height: 88px !important;            /* much shorter band */
  padding: 0.4rem 1rem 0.35rem !important;/* tight bottom spacing */
}

.page-heading h1 {
  margin: 0 0 0.2rem !important;          /* prevent tall margins */
  font-size: 1.4rem !important;
  line-height: 1.2 !important;
  font-weight: 700;
}

.page-heading p {
  margin: 0 !important;
  font-size: 1rem !important;
  line-height: 1.3 !important;
  opacity: 0.98;
}

/* Even tighter on small screens */
@media (max-width: 640px) {
  .page-heading > .container {
    min-height: 80px !important;
    padding-bottom: 0.3rem !important;
  }
  .page-heading h1 { font-size: 1.25rem !important; }
  .page-heading p  { font-size: 0.95rem !important; }
}
/* === ULTRA-COMPACT NAV + PAGE-HEADING (global) === */

/* Nav bar: slightly tighter */
.site-header { padding: 0.35rem 0 !important; }
.site-header .nav { gap: 0.8rem !important; }
.site-header .nav a { font-size: 0.95rem !important; }

/* Page heading ribbon: very short + bottom-aligned content */
.page-heading { 
  background: #800000 !important;  /* maroon */
  color: #fff !important;
  padding: 0 !important;            /* kill stray padding */
  margin: 0 !important;             /* avoid margin stacking */
}
.page-heading > .container {
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-end !important;   /* pin text to bottom */
  row-gap: 0.15rem !important;            /* tiny space between title/desc */
  min-height: 64px !important;            /* <<< super compact height */
  padding: 0.25rem 0.75rem 0.3rem !important;
}
.page-heading h1 {
  margin: 0 0 0.15rem !important; 
  font-size: 1.2rem !important;
  line-height: 1.15 !important;
  font-weight: 700 !important;
}
.page-heading p {
  margin: 0 !important;
  font-size: 0.95rem !important;
  line-height: 1.2 !important;
  opacity: 0.98 !important;
}

/* Optional: even tighter on small screens */
@media (max-width: 640px) {
  .page-heading > .container {
    min-height: 58px !important;
    padding-bottom: 0.28rem !important;
  }
  .site-header .nav a { font-size: 0.93rem !important; }
}
/* === GALLERY PAGE: ultra-compact page-heading ribbon === */
.page-gallery .page-heading { padding: 0 !important; }

.page-gallery .page-heading > .container {
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-end !important;
  row-gap: 0.12rem !important;
  min-height: 48px !important;               /* much shorter band */
  padding: 0.2rem 0.75rem 0.25rem !important; /* tight bottom padding */
}

.page-gallery .page-heading h1 {
  margin: 0 0 0.1rem !important;
  font-size: 1.12rem !important;
  line-height: 1.15 !important;
}

.page-gallery .page-heading p {
  margin: 0 !important;
  font-size: 0.92rem !important;
  line-height: 1.15 !important;
  opacity: 0.98;
}

/* Optional: on very small screens, squeeze a bit more */
@media (max-width: 640px) {
  .page-gallery .page-heading > .container {
    min-height: 44px !important;
    padding-bottom: 0.22rem !important;
  }
  .page-gallery .page-heading h1 { font-size: 1.05rem !important; }
  .page-gallery .page-heading p  { font-size: 0.9rem  !important; }
}
/* Kill stray decorative dots or lines on the page-heading */
.page-heading::before,
.page-heading::after,
.page-heading .container::before,
.page-heading .container::after {
  content: none !important;
  display: none !important;
}
.page-gallery .page-heading > .container {
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-end !important;
  row-gap: 0.12rem !important;
  min-height: 48px !important;
  padding: 0.2rem 0.75rem 0.25rem !important;
}
/* ==== Founder section: text left, photo right ==== */
.founder { padding: 2rem 0; }
.founder-container { padding: 0 .5rem; } /* reduce left/right inset a bit */

.founder-grid {
  display: grid;
  grid-template-columns: 1.7fr 1fr; /* text wider than photo */
  gap: 1.25rem 2rem;
  align-items: center;
}

.founder-copy h2 {
  margin: 0 0 .6rem;
  font-size: 1.6rem;
  line-height: 1.25;
}

.founder-copy p {
  margin: 0;
  line-height: 1.6;
}

/* Photo block */
.founder-photo { margin: 0; }
.founder-photo img {
  display: block;
  width: 100%;
  height: auto;              /* use this if your image is already well-cropped */
  /* If you prefer a fixed-height crop, use the two lines below instead of height:auto
     height: 360px;
     object-fit: cover; */
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
}

/* Safety resets against legacy floats or styles */
#founder img { float: none !important; }
.founder-grid > * { min-width: 0; }

/* Responsive: stack neatly on small screens */
@media (max-width: 900px) {
  .founder-grid {
    grid-template-columns: 1fr;  /* single column */
    gap: 1rem;
  }
  /* Put photo above or below the text — choose one of these: */

  /* A) Photo above text on mobile: */
  .founder-photo { order: -1; }

  /* B) Photo below text on mobile:
     .founder-photo { order: 1; } */
}
.founder-photo img {
  display: block !important;
  max-width: 100% !important;
  height: auto !important;
  visibility: visible !important;
}
.founder-grid {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 1.25rem 2rem;
  align-items: center;
}
#founder img { float: none !important; }
/* === Ensure descriptive text is comfortably readable (>= 18px) === */
:where(p, li, figcaption, .album-meta, .page-heading p, .project-block p, .founder-copy p) {
  font-size: clamp(18px, 1rem, 1.05rem);  /* never smaller than 14px; ~16px typical */
  line-height: 1.55;
}
/* === TYPOGRAPHY OVERRIDES — 2025-09-05 === */
html { font-size: 16px; }            /* standard base */
body { font-size: 1rem; line-height: 1.7; }

/* General descriptive text */
p, li, dd, figcaption { font-size: 1.0625rem; }  /* ~17px for comfy reading */

/* Common “description/message” areas (safe even if some classes don’t exist) */
.section-desc,
.card p, .card li,
.project-card p, .project-card .desc,
.founder p,
.album-meta, .gallery .album-meta,
.team-card p, .team-card li,
.footer, .footer p {
  font-size: 1.0625rem;
  line-height: 1.7;
}

/* Optional: slightly larger intro blurbs */
.lead, .page-intro, .hero p { font-size: 1.125rem; } /* ~18px */

/* Optional: make small UI notes/buttons not oversized */
small, .note, .helper-text { font-size: clamp(16px, .9rem, .95rem); }

/* Keep headings as-is (no change) */
/* === GALLERY PAGE TWEAKS — 2025-09-05 === */
.page-heading,
.page-title,
.gallery .page-heading {
  padding: 0.75rem 0 0.5rem !important;  /* trim height */
  margin: 0 !important;
}

/* If any decorative dots were injected via ::after, kill them */
.page-heading::after,
.nav::after,
.header::after,
.gallery .page-heading::after {
  content: none !important;
  display: none !important;
}

/* General nav padding so the maroon ribbon isn't too tall */
.site-header .nav {
  padding: 0.5rem 0 !important;
  line-height: 1.2 !important;
}
/* === LIGHTBOX MINIMAL === */
.lightbox[hidden] { display: none !important; }
.lightbox {
  position: fixed; inset: 0; background: rgba(0,0,0,.85);
  display: grid; place-items: center; z-index: 9999;
}
.lightbox img { max-width: 92vw; max-height: 88vh; display: block; }
.lightbox .close, .lightbox .prev, .lightbox .next {
  position: absolute; border: 0; background: transparent; font-size: 2rem; cursor: pointer;
  color: #fff; line-height: 1;
}
.lightbox .close { top: 10px; right: 16px; }
.lightbox .prev  { left: 16px; top: 50%; transform: translateY(-50%); }
.lightbox .next  { right: 16px; top: 50%; transform: translateY(-50%); }
.lightbox .count {
  position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%);
  color: #fff; font-size: 0.95rem; opacity: .85;
}
/* === PROJECT IMAGES & CAPTIONS — 2025-09-05 === */
.project-figure { margin: 1rem 0 1.25rem; }
.project-figure img { display: block; max-width: 100%; height: auto; border-radius: 10px; }
.project-figure figcaption { font-style: italic; font-size: 0.95rem; margin-top: 0.5rem; opacity: .9; line-height: 1.5; }
.project-figure { margin: 1rem 0; text-align: center; }
.project-figure img { max-width: 100%; height: auto; display: block; margin: 0 auto; }
.project-figure figcaption { margin-top: .5rem; font-style: italic; }
.gallery-lite {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin: 1rem 0 2rem;
}
.gallery-lite img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: .75rem;
}
.gallery-lite figcaption {
  margin-top: .5rem;
  font-size: .95rem;
  font-style: italic;
  line-height: 1.35;
}
.muted { opacity: .75; font-size: .95rem; }
#lightbox { z-index: 9999; }
