@import url('https://fonts.googleapis.com/css2?family=Cutive+Mono&display=swap');

/* Rest Energy — ellie's photography portfolio page */

body.rest-energy {
  max-width: 1080px;
  margin: 0 auto;
  padding: 60px 30px 100px;
}

/* ---- header (centered) ---- */
.re-header {
  position: relative;
  text-align: center;
  margin-bottom: 48px;
  padding-top: 4px;
}

.re-back {
  position: absolute;
  left: 0;
  top: 0;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: 0.04em;
}
.re-back:hover { color: var(--text-bright); text-decoration: underline; }

.re-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 34px;
}
.re-title img.section-label-img { height: 100px; width: auto; display: block; }
.re-subtitle {
  font-size: 1rem;
  font-style: italic;
  color: var(--text-muted);
}

/* ---- collection accordion (text list; click a name, photos drop down) ---- */
.re-acc {
  border-bottom: 1px solid rgba(233, 218, 177, 0.16);
}
.re-acc:first-of-type {
  border-top: 1px solid rgba(233, 218, 177, 0.16);
}
/* cancel the homepage's "section + section" spacing so rows stack evenly */
.re-acc + .re-acc { margin-top: 0; }

.re-acc-head {
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 6px;
  text-align: left;
  color: var(--text-main);
}

.re-acc-title {
  /* collection names — soft typewriter */
  font-family: 'Cutive Mono', monospace;
  font-size: 1.9rem;
  line-height: 1.2;
  color: var(--text-bright);
  text-transform: lowercase;
  letter-spacing: 0.005em;
  transition: color 0.18s ease;
}
.re-acc-head:hover .re-acc-title { color: #fff; }

.re-acc-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
  color: var(--text-muted);
}
.re-acc-count {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: lowercase;
}
.re-acc-count::after { content: ' photos'; }

/* drop-arrow indicator (chevron; points down, flips up when open) */
.re-acc-icon {
  width: 9px;
  height: 9px;
  margin-bottom: 4px;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg);
  transition: transform 0.3s ease;
}
.re-acc.open .re-acc-icon { transform: rotate(-135deg); }

/* preview strip — right-aligned taste of each collection while closed */
.re-strip {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 2px 6px 26px;
  overflow: hidden;
  flex-wrap: nowrap;
  cursor: pointer;
}
.re-strip img {
  height: 104px;
  width: auto;
  flex-shrink: 0;
  border-radius: 2px;
  border: 1px solid rgba(0, 0, 0, 0.3);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
  transition: filter 0.18s ease;
}
.re-strip:hover img { filter: brightness(1.08); }
.re-acc.open .re-strip { display: none; }

/* drop-down panel — animates height via grid-template-rows */
.re-acc-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.4s ease;
}
.re-acc.open .re-acc-panel { grid-template-rows: 1fr; }
.re-acc-inner { overflow: hidden; min-height: 0; }

.re-acc-tools {
  display: flex;
  justify-content: flex-end;
  padding: 14px 6px 34px;
}

.re-prints {
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  text-decoration: none;
  border: 1px solid rgba(233, 218, 177, 0.35);
  border-radius: 999px;
  padding: 6px 16px;
  transition: color 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}
.re-prints:hover {
  color: var(--text-bright);
  border-color: var(--text-bright);
  background: rgba(244, 237, 228, 0.06);
}

/* ---- justified photo grid (equal-height rows, flush edges; JS sizes each) ---- */
.re-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.re-photo {
  display: block;
  height: auto;           /* JS sets explicit width/height per row */
  object-fit: cover;
  border-radius: 3px;
  border: 1px solid rgba(0, 0, 0, 0.28);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
  cursor: zoom-in;
  transition: box-shadow 0.18s ease, filter 0.18s ease;
  filter: brightness(0.97);
}
.re-photo:hover {
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5);
  filter: brightness(1.07);
}

/* ---- lightbox / slideshow ---- */
.re-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(20, 24, 18, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 40px;
}
.re-lightbox[hidden] { display: none; }
body.re-lb-open { overflow: hidden; }

.re-lb-figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  max-width: 90vw;
}
.re-lb-img {
  max-width: 88vw;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 0;
  /* frame: crisp corners + light hairline + soft shadow */
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.6), 0 18px 50px rgba(0, 0, 0, 0.62);
}

.re-lb-cap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
  max-width: 70ch;
}
.re-lb-title {
  font-family: 'Cutive Mono', monospace;
  font-size: 1.05rem;
  color: var(--text-bright);
  text-transform: lowercase;
}
.re-lb-caption {
  font-size: 0.86rem;
  font-style: italic;
  line-height: 1.5;
  color: var(--text-main);
}
.re-lb-title[hidden], .re-lb-caption[hidden] { display: none; }
.re-lb-count {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-top: 2px;
}

.re-lb-close {
  position: absolute;
  top: 16px;
  right: 22px;
  background: none;
  border: none;
  color: var(--text-bright);
  font-size: 2.1rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 10px;
}
/* arrows: minimal chevrons, no box (option A) */
.re-lb-nav {
  background: none;
  border: none;
  color: rgba(243, 231, 187, 0.7);
  font-size: 2.8rem;
  line-height: 1;
  width: 46px;
  height: 46px;
  cursor: pointer;
  flex-shrink: 0;
  transition: color 0.16s ease, transform 0.16s ease;
}
.re-lb-nav:hover { color: #fff; transform: scale(1.18); }

.re-loading, .re-empty {
  font-style: italic;
  color: var(--text-muted);
  padding: 40px 0;
  text-align: center;
}

@media (max-width: 600px) {
  body.rest-energy { padding: 44px 20px 80px; }
  .re-title img.section-label-img { height: 72px; }
  .re-acc-title { font-size: 1.6rem; }
  .re-acc-count::after { content: ""; }
  .re-strip { gap: 6px; padding-bottom: 20px; }
  .re-strip img { height: 68px; }
  .re-grid { gap: 4px; }

  /* on phones the side arrows move to a row at the bottom, centered under
     the count — no box, off the photo */
  .re-lightbox {
    padding: 16px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr auto;
    align-items: center;
    row-gap: 2px;
  }
  .re-lb-figure {
    grid-row: 1;
    grid-column: 1 / 3;
    justify-self: center;
    align-self: center;
  }
  .re-lb-img { max-width: 92vw; }
  .re-lb-nav {
    background: none;
    width: auto;
    height: auto;
    font-size: 2rem;
    line-height: 1;
    color: rgba(243, 231, 187, 0.8);
    padding: 6px 30px 10px;
  }
  .re-lb-prev { grid-row: 2; grid-column: 1; justify-self: end; }
  .re-lb-next { grid-row: 2; grid-column: 2; justify-self: start; }
}
