/* Font Definitions */
@font-face {
  font-family: 'SuisseIntl';
  src: url(../fonts/SuisseIntl-Book-WebS.woff) format("woff");
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: 'SuisseIntl';
  src: url(../fonts/SuisseIntl-BookItalic-WebS.woff) format("woff");
  font-weight: 500;
  font-style: italic;
}

@font-face {
  font-family: 'SuisseIntl';
  src: url(../fonts/SuisseIntl-SemiBold-WebS.woff) format("woff");
  font-weight: 600;
  font-style: normal;
}

@font-face {
  font-family: 'SuisseNeue';
  src: url(../fonts/SuisseNeue-Medium-WebS.woff) format("woff");
  font-weight: 400;
  font-style: normal;
}

/* Reset Styles */
* {
  margin: 0;
  padding: 0;
  border: 0;
  outline: 0;
  font-size: 100%;
  vertical-align: baseline;
  background: transparent;
}

/* Links */
a, a:visited {
  color: blue;
}

/* Body */
body {
  font-family: 'SuisseIntl';
  font-weight: normal;
  font-size: 12.0px;
  line-height: 1.2;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding: 24px;
  overflow: -moz-scrollbars-none;
  -ms-overflow-style: none;
}

/* Images */
img.instagram {
  max-width: 100%;
}

img.lazyload {
  background-color: white; /* Light grey background */
  min-width: 100%; /* or specific px value */
  min-height: 300px; 
}

/* Form */
form {
  display: inline;
}

/* Headings */
h1 {
  text-decoration: underline;
  font-size: 1.2em;
  font-weight: normal;
}


/* Lists */
ul {
  list-style-type: none;
}

ul.text {
  margin-bottom: 1em;
}

li {
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
  break-inside: avoid;
  /* white-space: nowrap; */
}

li::after {
  content: "\A \A ";
  white-space: pre;
}

/* Remove extra spacing for mobile gallery images */
.mobile-gallery li::after {
  content: "";
}

/* Match desktop spacing on mobile */
.mobile-gallery li {
  padding-bottom: 1em;
}

li:last-child {
  break-before: avoid-column;
}

li:first-child {
  break-after: avoid;
}

/* Category */
.category {
  text-decoration: underline;
  font-size: 1.2em;
}

/* Gallery */
#exh_wrapper {
  position: fixed;
  width: 100vw;
  right: -101vw;
  height: 100vh;
  top: 0;
  overflow-x: hidden;
  overflow-y: auto;
  border-left: none;
  background-color: white;
  /* transition: right 0.5s; */
}

#button {
  position: fixed;
  top: 3vw;
  right: 4.5vw;
  text-align: right;
  font-size: 3em;
  font-weight: 600;
  color: rgb(0, 0, 255);
  cursor: pointer;
  z-index: 99999; 
}

.caption {
  margin: 0.5em 0; /* Mobile: only top/bottom margin */
}

/* Desktop: add left/right margins for gallery spacing */
@media only screen and (min-width: 700px) {
  .caption {
    margin: 0.5em 0.5em 0.5em 0; /* Desktop: all sides margin */
  }
}

.credits {
  color: rgba(0, 0, 0, 0.2);
}

.year {
  color: rgba(0, 0, 0, 0.2);
}

.gray {
  color: rgba(0, 0, 0, 0.2);
}

.year-group {
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
  break-inside: avoid;
  display: inline-block;
  width: 100%;
}

#exh_wrapper::-webkit-scrollbar,
body::-webkit-scrollbar {
  width: 0 !important;
}

/* Media Queries */
@media only screen and (min-width: 700px) {
  body {
      width: calc(50vw - 4.5em);
  }

  article {
      -webkit-column-width: 350px;
      -moz-column-width: 350px;
      column-width: 350px;
      -webkit-column-gap: 2.5em;
      -moz-column-gap: 2.5em;
      column-gap: 2.5em;
  }

  #button {
      display: none;
  }

  #exh_wrapper {
      width: 50vw;
      right: 0vw;
      display: inline;
  }
}

@media only screen and (min-width: 1200px) {
  body {
      width: calc(65vw - 4.5em);
  }

  #exh_wrapper {
      width: 35vw;
      right: 0vw;
  }
  
  /* Top filter stays full width on larger screens */
  .filter-section.top-filter {
    width: 100%;
  }
}

/* Gallery Slides */
.exh_slide {
  padding-bottom: 1em;
}

.exh_photo {
  max-width: 100%;
  max-height: 100%;
  display: block;
}

/* Instagram Photos */
.instagram.landscape,
.instagram.portrait {
  height: 100%;
  width: auto;
  display: block;
  margin-left: auto;
  margin-right: auto;
  position: relative;
}

.image-container {
  width: 100%;
  position: relative;
  height: 250px;
  filter: grayscale(100%);
  /* transition: filter 5s ease; */
}
/* 
.image-container:hover {
  filter: grayscale(0%);
  transition: filter 0.75s ease;
} */

.bg-image {
  -webkit-filter: url("#sharpBlur");
  filter: url("#sharpBlur");
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: -1;
  transform: translate3d(0, 0, 0);
}

.hidenfilter {
  border: 0;
  clip: rect(0 0 0 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
}

/* Highlight Animation */
@keyframes pulseAnimation {
  0%, 100% {
      background-color: rgb(255, 255, 0);
  }
  50% {
      background-color: rgb(255, 255, 200);
  }
}

span.highlight {
  background-color: yellow;
  animation: pulseAnimation 4s infinite ease-in-out;
}

span.highlight {
  color: black;
}

/* Work Filter Toggle */
.filter-section {
  margin: 0;
}

.filter-section.top-filter {
  position: sticky;
  top: 24px;
  width: 100%;
  z-index: 1000;
  margin: 0 0 2em 0;
}

/* Mobile: Make filter globally sticky */
@media only screen and (max-width: 699px) {
  .filter-section.top-filter {
    position: fixed;
    top: 24px;
    left: 24px;
    right: 24px;
    width: auto;
    background-color: white;
  }
  
  /* Add top margin to article to prevent content overlap */
  article {
    margin-top: 48px; /* Reduced from 60px as you suggested */
  }
}

.filter-rectangle {
  width: 100%;
  height: 2.0em; /* Twice the height of a normal line */
  background-color: white;
  border: 1px solid black;
  display: flex;
  line-height: 1.2;
  box-sizing: border-box;
}

.filter-rectangle input[type="radio"] {
  display: none;
}

.filter-option {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'SuisseIntl';
  font-size: 12px;
  color: black;
  background-color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  border-right: 1px solid black;
}

.filter-option:last-child {
  border-right: none;
}

.filter-rectangle input[type="radio"]:checked + .filter-option {
  background-color: blue;
  color: white;
}

/* Filter States */
.filter-solo .terra0 {
  opacity: 0.2;
  /* transition: opacity 0.3s ease; */
  filter: grayscale(100%);
}

.filter-solo .terra0  .gray {
  color: black;
  /* transition: color 0.3s ease; */
}

.filter-terra0 .solo {
  opacity: 0.2;
  /* transition: opacity 0.3s ease; */
  filter: grayscale(100%);
}

.filter-terra0 .solo .gray {
  color: black;
  /* transition: color 0.3s ease; */
}

.filter-all .solo,
.filter-all .terra0 {
  opacity: 1;
  /* transition: opacity 0.3s ease; */
}

/* Keep year spans visible regardless of filter */
.filter-solo .terra0 .year,
.filter-terra0 .solo .year {
  opacity: 1 !important;
  filter: none !important;
  color: rgba(0, 0, 0, 0.2) !important;
}


/* Mobile Gallery Section */
.mobile-gallery {
  display: block;
}

.mobile-gallery ul.text {
  margin-bottom: 1em;
}

.mobile-gallery .category {
  text-decoration: underline;
  font-size: 1.2em;
}

/* Hide mobile gallery on desktop, show sliding gallery */
@media only screen and (min-width: 700px) {
  .mobile-gallery {
    display: none;
  }
  
  /* Top filter stays full width on desktop */
  .filter-section.top-filter {
    width: 100%;
  }
}

/* Hide sliding gallery on mobile, show mobile gallery */
@media only screen and (max-width: 699px) {
  #exh_wrapper {
    display: none !important;
  }
  
  #button {
    display: none !important;
  }
  
  .mobile-gallery {
    display: block;
  }
}

/* Gallery Filter States */
.filter-solo .mobile-gallery .terra0,
.filter-solo #exh_wrapper .terra0 {
  opacity: 0.2;
  /* transition: opacity 0.3s ease; */
}

.filter-terra0 .mobile-gallery .solo,
.filter-terra0 #exh_wrapper .solo {
  opacity: 0.2;
  /* transition: opacity 0.3s ease; */
}

.filter-all .mobile-gallery .solo,
.filter-all .mobile-gallery .terra0,
.filter-all #exh_wrapper .solo,
.filter-all #exh_wrapper .terra0 {
  opacity: 1;
  /* transition: opacity 0.3s ease; */
}
