:root {
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Lexend', sans-serif;
  font-optical-sizing: auto;
  background: rgb(12, 27, 68);
  background-attachment: fixed;
  color: #f0f0f0;
  padding: 4rem 1rem 1rem;
  display: block;
  justify-content: center;
}

.hidden { display: none; }

.container {
  max-width: 1480px;
  width: 100%;
  margin: 0 auto;
  padding: 0;
}

h1 {
  text-align: center;
  font-size: 3rem;
  margin-bottom: 1rem;
  color: #ffffff;
}

p {
  font-size: 1.4rem;
  text-align: center;
  font-weight: 300;
  margin: 0 0 .2rem;
}

.btn-container {
  width: 100%;
  text-align: center;
  padding: 1rem 0;
}

h2 {
  text-align: center;
  letter-spacing: 0.4rem;
  font-weight: 200;
  font-size: 2.4rem;
  margin: 8rem 0 3rem;
  color: #ffffff;
  position: sticky;
  top: 0;
  background: rgba(12, 27, 68, .8);
  backdrop-filter: blur(10px);
  padding: 1rem;
  z-index: 10;
}

.orientation-tabs {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 2rem 0;
}

.orientation-tabs button {
  font-family: 'Lexend', sans-serif;
  background-color: transparent;
  border: none;
  height: 50px;
  padding: 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s ease-in-out;
  display: flex;
  flex-direction: row;
  gap: .5rem;
  align-items: center;
  justify-content: center;
}

.orientation-tabs .label {
  font-size: 1rem;
  color: #56CCFF;
  transition: opacity 0.2s;
}

.orientation-tabs button.active .label {
  opacity: 1;
  font-weight: 500;
  color: #fff;
}

.orientation-tabs button.active {
  background-color: #000322;
}

/* The small square icon */
.square-icon {
  width: 34px;
  height: 20px;
  border: 2px solid #56CCFF;
  border-radius: 2px;
  display: block;
  background-color: transparent;
  transition: background-color 0.2s, border-color 0.2s;
}
#portrait-btn .square-icon {
  width: 18px;
  height: 30px;
}

/* When parent button is active, fill the icon */
button.active .square-icon {
  background-color: #fff;
  border-color: #fff;
}

.loading, #last-updated {
  text-align: center;
  font-size: 1.1rem;
  opacity: 0.8;
  padding: 1rem 0;
  color: #56CCFF;
}

#last-updated {
  padding: 100px 0 200px;
}

.loading::after {
  content: "";
  display: inline-block;
  width: 0.8em;
  height: 0.8em;
  margin-left: 0.5rem;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin .8s linear infinite;
  vertical-align: -0.1em;
}

@keyframes spin { to { transform: rotate(360deg); } }

.hidden { display: none; }


.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2rem;
  padding: 20px;
}
.portrait-mode .gallery {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}


.painting {
  position: relative;
}

.painting a {
  display: block;
  color: inherit;
  text-decoration: none;
}

.painting img {
  width: 100%;
  height: auto;
  display: block;
    border-radius: 2px;
  box-shadow:
    rgba(6, 24, 44, 0.4) 0px 0px 0px 2px,
    rgba(6, 24, 44, 0.65) 0px 4px 6px -1px;
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.painting::after {
  content: '';
  display: block;
  height: 100%;
  position: absolute;
  top: 0;
  width: 100%;
  pointer-events: none;
}

.painting:hover img {
  box-shadow:
    white 0 0 0 4px,
    rgba(0, 0, 0, 0.5) 0 12px 30px;
  transform: scale(1.03);
}

.painting:hover img::after {
  box-shadow: inset 0px 0 1px 1px rgba(0, 0, 0, .7);
}

.info-overlay {
  position: absolute;
  bottom: 2px;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 2px;
  padding: 0.4rem;
  text-align: left;
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
}

.painting:hover .info-overlay {
  opacity: 1;
}

.info-overlay h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 300;
  color: white;
}


/* Mobile adjustments 
-----------------------------*/

@media (max-width: 600px) {
  p {
    font-size: 1.2rem;
  }

  h2 {
    font-size: 2rem;
    margin: 4rem 0 1rem;
    padding: .8rem;
  }

  .gallery {
    gap: 1rem;
    padding: 4px;
  }
}
