/* font faces */
@font-face {
  font-family: 'American Typewriter';
  src: url('../fonts/american_typewriter/american_typewriter.woff') format('woff'),
       url('../fonts/american_typewriter/american_typewriter.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'American Typewriter';
  src: url('../fonts/american_typewriter_light/american_typewriter_light.woff') format('woff'),
       url('../fonts/american_typewriter_light/american_typewriter_light.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Apple Garamond';
  src: url('../fonts/AppleGaramond-regular/AppleGaramond.woff') format('woff'),
       url('../fonts/AppleGaramond-regular/AppleGaramond.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Apple Garamond';
  src: url('../fonts/AppleGaramond-Bold/AppleGaramond-Bold.woff') format('woff'),
       url('../fonts/AppleGaramond-Bold/AppleGaramond-Bold.ttf') format('truetype');
  font-weight: bold;
  font-style: normal;
  font-display: swap;
}


/* ---------- Base ---------- */

body {
    margin: 0;
    display: flex;
    flex-direction: column;
    line-height: 0;
    background-color: #fafafa;
    font-family: 'American Typewriter', 'Apple Garamond', sans-serif;
  }
  h1, h2, h3 { font-weight: normal; }
  h1 { font-size: 3em; margin: 0; line-height: 1.5}
  h2 { font-size: 2em; line-height: 1.2; }
  h3 { font-size: 1.5em; line-height: 1.2; }
  
  /* Typography & elements (from legacy root style.css) */
  p { margin-block-end: 1.4em; line-height: 1.5}
  video { border: 1px solid lightgray; width: 600px; }
  ol { font-size: 19px; }
  
  /*--------- INDEX/HOME PAGE ----------*/
  .page-links {
    display: flex;
    flex-wrap: wrap;
    margin: 50px 10px;
    text-align: center;
    justify-content: center;
    line-height: 1.5;
  }
  .page-links-link {
    font-size: 4em;
    padding: 20px 60px;
    text-decoration: none;
    color: inherit;
  }
  .page-links-link img {
    border: 1px solid black;
    max-height: 85px;
  }
  
  /* ---------- Series (gallery) header & nav ---------- */
  .header-gallery {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
  }
  .nav-gallery { position: absolute; left: 30px; }
  .nav-link-series { text-decoration: none; color: inherit; }
  
  /* ---------- Gallery grid ---------- */
  .gallery-frame{
    line-height: 0 !important;
    width: auto;
    height: 89vh; 
    margin: 30px 30px 0 30px;
    background-color: black;
    overflow-y: scroll;
    border-radius: 12px;
    scrollbar-width: none;
    display: flex;
    flex-direction: column;
  }
  
  /* Gallery frame themes */
  .gallery-frame.light-theme {
    background-color: white;
    border: 1px solid black;
  }
  
  /* CSS flexbox grid */

.gallery-grid{
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin: 25px;
  align-items: center; /* Change from flex-start to stretch */
  justify-content: space-evenly;
  scrollbar-width: none;
}
  
/* Custom grid configurations - smaller tiles for specific galleries */
.gallery-grid.compact {
  gap: 10px;
  margin: 20px;
}

.gallery-grid.compact .gallery-thumb {
  flex: 0 0 75px;
}

.gallery-grid.tight {
  gap: 5px;
  margin: 10px;
}

.gallery-grid.tight .gallery-thumb {
  flex: 0 0 80px;
}

.gallery-grid.sparse {
  gap: 100px;
  margin: 100px;
}

.gallery-grid.sparse .gallery-thumb {
  flex: 0 0 200px;
}
  
.gallery-thumb{
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 150px; /* Default size */
  padding: 15px;
}
  
.gallery-thumb img{
  display:block; 
  width:auto; 
  height:auto; 
  object-fit: contain;
  max-width: 100%;
  max-height: 100%;
}
  

/* ---------- Single Column Gallery Layout ---------- */
.gallery-single-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
}

.gallery-item-single-column {
  width: 100%;
  max-width: 100%;
  text-align: center;
}

.gallery-item-single-column img {
  width: 50%;
  height: auto;
}

/* Custom single-column layout configurations */
.gallery-single-column.wide img {
  width: 80%;
}

.gallery-single-column.narrow img {
  width: 40%;
}

.gallery-single-column.no-padding {
  padding: 0;
}


/* ---------- CSS-only Lightbox ---------- */

.lightbox {
  position: fixed;
  top: 30px;
  left: 30px;
  right: 30px;
  height: 89vh;
  max-height: 89vh;
  background: rgba(0,0,0,1);
  display: none;
  align-items: center; 
  justify-content: center;
  padding: 1rem;
  border-radius: 12px;
  box-sizing: border-box;
}

.lightbox:target { display: flex; }
.lightbox-img {
  max-width: 95%; max-height: 95%;
  display: block; object-fit: contain;
  /* border: 1px solid lightgray; */
}
.lightbox-video {
  max-width: 95%; max-height: 95%;
  display: block; object-fit: contain;
  border: 1px solid lightgray;
}
.lightbox-close {
  position: absolute;
  top: 50px;
  right: 40px;
  font-size: 3em;
  color: lightgray;
  text-decoration: none;
}
.lightbox-caption {
  color: #ddd; text-align: center;
  margin-top: .6rem; font-size: .95rem;
}

/* ---------- Tall-Long Gallery Layout ---------- */

.gallery-thumb.long {
  flex: 1 1 100%;
  min-width: 100%;
  padding: 0;
}

.gallery-thumb.tall {
  flex-basis: auto;
  min-width: 150px;
  padding: 0;
  max-height: 60vh;
  align-self: flex-start;
}

.gallery-thumb.tall img {
  max-height: 100%;
  width: auto;
  object-fit: contain;
}

.gallery-grid.tall-long {
  gap: 50px;
}

/* ---------- Gallery Notes ---------- */
.gallery-notes {
  max-width: 650px;
  margin: 50px auto;
  padding: 0 20px;
  line-height: 1.6;
  font-size: 16px;
  color: #333;
}

.gallery-notes h1 {
  font-size: 2.5em;
  margin-bottom: 0.5em;
  font-weight: normal;
}

.gallery-notes h2 {
  font-size: 2em;
  margin: 1.5em 0 0.5em 0;
  font-weight: normal;
}

.gallery-notes h3 {
  font-size: 1.5em;
  margin: 1.2em 0 0.5em 0;
  font-weight: normal;
}

.gallery-notes p {
  margin-bottom: 1.4em;
  line-height: 1.6;
}

.gallery-notes .centered-image {
  text-align: center;
  margin: 2em 0;
}

.gallery-notes .centered-image img {
  max-width: 100%;
  height: auto;
  border: 1px solid black;
}

.gallery-notes em {
  font-style: italic;
}

.gallery-notes strong {
  font-weight: bold;
}

.gallery-notes br {
  line-height: 2;
}
  
/* ---------- Mobile ---------- */
@media (max-width: 600px) {
  h1 { font-size: 2em; margin: 20px 60px; line-height: 1; }
  .page-links-link {
    font-size: 1.2em;
    padding: 10px 20px;
  }
  .page-links-link img {
    max-height: 20px;
  }
  .gallery-frame { 
    margin: 15px 15px 0; 
    height: 93vh;
  }
  .gallery-grid { margin: 20px; gap: 5px; }
  .gallery-thumb {
    padding: 10px; 
    flex: 0 0 50px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .gallery-thumb img { 
    max-width: 100px; 
    max-height: 100px;
    object-fit: contain;
  }
  .nav-gallery { left: 10px; }
  .lightbox {
    margin: 10px 10px 0;
    top: 0;
    left: 0;
    right: 0;
  }
  .gallery-notes {
    margin: 30px auto;
    padding: 0 15px;
    font-size: 15px;
  }
  .gallery-notes h1 {
    font-size: 2em;
  }
  .gallery-notes h2 {
    font-size: 1.7em;
  }
  .gallery-notes h3 {
    font-size: 1.4em;
  }
  
  /* Tall-Long Gallery Mobile Styles */
  .gallery-grid.tall-long {
    gap: 20px;
    margin: 20px;
  }
  
  .gallery-thumb.long img {
    max-width: none;
    max-height: none;
    width: 100%;
  }
  
  .gallery-thumb.tall {
    padding: 5px;
    max-height: 40vh;
    min-width: 80px;
  }
  
  .gallery-thumb.tall img {
    max-width: 100px;
    max-height: 100%;
  }
}
  
  